@hestia-earth/ui-components 0.5.1 → 0.5.2

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.
@@ -5822,7 +5822,7 @@
5822
5822
  return ({
5823
5823
  id: transformation === null || transformation === void 0 ? void 0 : transformation['@id'],
5824
5824
  key: 'transformation',
5825
- configModels: ['cycle']
5825
+ configModels: ['cycle/transformation']
5826
5826
  });
5827
5827
  }); };
5828
5828
  var includeCycleSubValue = function (subValues) { return subValues.some(function (v) { return v.key !== 'property'; }); };
@@ -5933,7 +5933,9 @@
5933
5933
  // handle "input.hestiaAggregatedData"
5934
5934
  findMatchingModel(models, modelKeyParams(node, (type === null || type === void 0 ? void 0 : type.toLowerCase()) + "." + methodId)) ||
5935
5935
  // handle "transformation"
5936
- ((subValue === null || subValue === void 0 ? void 0 : subValue.key) ? findMatchingModel(models, modelKeyParams(node, subValue === null || subValue === void 0 ? void 0 : subValue.key)) : undefined)
5936
+ ((subValue === null || subValue === void 0 ? void 0 : subValue.key) ? findMatchingModel(models, modelKeyParams(node, subValue === null || subValue === void 0 ? void 0 : subValue.key)) : undefined) ||
5937
+ // handle "transformation/excreta" and other models with "/"
5938
+ (methodId.includes('/') ? findMatchingModel(models, { model: methodId.split('/')[0], modelKey: methodId.split('/')[1] }) : undefined)
5937
5939
  };
5938
5940
  };
5939
5941
  };
@@ -6055,17 +6057,12 @@
6055
6057
  _c$1[exports.LogStatus.dataProvided] = 'dark',
6056
6058
  _c$1[exports.LogStatus.notRequired] = 'grey',
6057
6059
  _c$1);
6058
- var methodIdLabel = function (methodId, model) { return ((model === null || model === void 0 ? void 0 : model.modelKey) && methodId === 'cycle'
6060
+ var methodIdLabel = function (methodId, model) { return (methodId
6059
6061
  ? ({
6060
- transformation: 'Data From Transformation'
6061
- })[model.modelKey]
6062
- : methodId
6063
- ? ({
6064
- // TODO: this is displayed for all transformation models and is not accurate, find a better solution
6065
- // transformation: 'Data From Transformation',
6066
- impact_assessment: 'Data From Cycle'
6067
- })[methodId]
6068
- : '') || utils.keyToLabel(methodId); };
6062
+ 'cycle/transformation': 'Data From Transformation',
6063
+ impact_assessment: 'Data From Cycle'
6064
+ })[methodId]
6065
+ : '') || (methodId.includes('/') ? methodId.split('/')[0] : utils.keyToLabel(methodId)); };
6069
6066
  var getModelsAt = function (log, index) { return ('modelsInSubValues' in log ? !log.modelsInSubValues || !log.isOpen : true) && log.configModels[index]; };
6070
6067
  var requirementKeys = function (requirements) { return Object.keys(requirements).filter(function (k) { return !nodeTypesLowerCase.includes(k); }); };
6071
6068
  var requirementColor = function (value) { return !value || ['None', 'False', '0', '0.0'].includes(value) ? 'danger' : 'white'; };