@hestia-earth/ui-components 0.43.26 → 0.43.27

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.
@@ -769,10 +769,14 @@ const polygonBounds = (polygon) => {
769
769
  // resource avoids both. Keep these in sync with the getters in `@hestia-earth/glossary/index.mjs`.
770
770
  const getDefaultModelId = (id) => defaultModelId[id];
771
771
  const getModelGroup = (id, modelId) => (modelGroups[id] || {})[modelId];
772
- const isInSystemBoundary = (id) => {
772
+ /**
773
+ * Whether the term is in the default HESTIA system boundary, or `fallback` when the lookup does not list it.
774
+ */
775
+ const isInSystemBoundaryOr = (id, fallback) => {
773
776
  const value = inHestiaDefaultSystemBoundary[id];
774
- return !value || value === 'true';
777
+ return value ? `${value}` === 'true' : fallback;
775
778
  };
779
+ const isInSystemBoundary = (id) => isInSystemBoundaryOr(id, true);
776
780
  // the resource is the list of ids the lookup is true for; built into a Set once, as the glossary does
777
781
  const plantations = new Set(plantationIds);
778
782
  /**
@@ -9744,11 +9748,10 @@ class NodeJLogModelsComponent {
9744
9748
  const selected = this.term();
9745
9749
  if (selected)
9746
9750
  return group.term?.name?.toLowerCase().includes(selected.name.toLowerCase());
9747
- // hide non-system-boundary terms with no recalculation when "only required" is on
9751
+ // when "only required" is on, terms the system boundary lookup does not list show if recalculated or failed
9748
9752
  return (!this.onlyRequired() ||
9749
9753
  !this.filteredType() ||
9750
- isInSystemBoundary(group.termId) ||
9751
- group.rows.some(row => row.isRecalculated || row.isFailed));
9754
+ isInSystemBoundaryOr(group.termId, group.rows.some(row => row.isRecalculated || row.isFailed)));
9752
9755
  }), ...(ngDevMode ? [{ debugName: "groups" }] : []));
9753
9756
  this.hasLogs = computed(() => !isEmpty(this.jlog()), ...(ngDevMode ? [{ debugName: "hasLogs" }] : []));
9754
9757
  this.methodModelsCount = computed(() => Math.max(1, jLogModelCount(this.allGroups())), ...(ngDevMode ? [{ debugName: "methodModelsCount" }] : []));
@@ -9854,11 +9857,7 @@ const methodIdLabel = (methodId, _model) => (methodId
9854
9857
  }[methodId]
9855
9858
  : '') || (methodId.includes('/') ? methodId.split('/')[0] : keyToLabel(methodId));
9856
9859
  const getModelsAt = (log, index) => ('modelsInSubValues' in log ? !log.modelsInSubValues || !log.isOpen : true) && log.configModels?.[index];
9857
- const isSystemBoundary = (termId) => ({ isRecalculated, isRequired }) => {
9858
- // only exists for some terms
9859
- const inSystemBoundary = isInSystemBoundary(termId);
9860
- return inSystemBoundary || [isRecalculated, isRequired].some(Boolean);
9861
- };
9860
+ const isSystemBoundary = (termId) => ({ isRecalculated, isRequired }) => isInSystemBoundaryOr(termId, [isRecalculated, isRequired].some(Boolean));
9862
9861
  const isGenericTerm = (termId) => [termId.startsWith('excreta')].every(Boolean);
9863
9862
  const extraTermIdsFromConfig = (config, key, logs) => unique([
9864
9863
  ...(config?.models || [])