@hestia-earth/ui-components 0.5.0 → 0.5.1
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.
- package/bundles/hestia-earth-ui-components.umd.js +30 -23
- package/bundles/hestia-earth-ui-components.umd.js.map +1 -1
- package/esm2015/node/node-logs-models/node-logs-models.component.js +3 -2
- package/esm2015/node/node-logs-models/node-logs-models.model.js +29 -23
- package/fesm2015/hestia-earth-ui-components.js +30 -23
- package/fesm2015/hestia-earth-ui-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -5700,28 +5700,34 @@
|
|
|
5700
5700
|
exports.LogStatus.success,
|
|
5701
5701
|
exports.LogStatus.error
|
|
5702
5702
|
].includes(status) && hasLogs(logs); };
|
|
5703
|
-
var logStatus = function (data, logs, index) {
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
: isRunOrchestrator(logs)
|
|
5707
|
-
? ('shouldRun' in logs
|
|
5708
|
-
? logs.shouldRun
|
|
5709
|
-
? data.isRecalculated
|
|
5710
|
-
? exports.LogStatus.success
|
|
5711
|
-
: exports.LogStatus.dataProvided
|
|
5712
|
-
: data.isRecalculated && index > 0
|
|
5713
|
-
? exports.LogStatus.skipHierarchy
|
|
5714
|
-
: exports.LogStatus.error
|
|
5715
|
-
: exports.LogStatus.dataProvided)
|
|
5716
|
-
: data.isRecalculated
|
|
5717
|
-
? exports.LogStatus.skipHierarchy
|
|
5718
|
-
: exports.LogStatus.dataProvided)
|
|
5719
|
-
: ([
|
|
5703
|
+
var logStatus = function (data, logs, index) {
|
|
5704
|
+
var withLogs = hasLog(logs);
|
|
5705
|
+
var isCalculated = [
|
|
5720
5706
|
typeof data.originalValue === 'undefined',
|
|
5721
5707
|
data.isRecalculated // is recalculated
|
|
5722
|
-
].every(Boolean)
|
|
5723
|
-
|
|
5724
|
-
|
|
5708
|
+
].every(Boolean);
|
|
5709
|
+
// can be not required for a specific model
|
|
5710
|
+
var isRequired = !!logs && 'runRequired' in logs ? logs.runRequired : data.isRequired;
|
|
5711
|
+
return withLogs
|
|
5712
|
+
? (!isRequired
|
|
5713
|
+
? exports.LogStatus.notRequired
|
|
5714
|
+
: isRunOrchestrator(logs)
|
|
5715
|
+
? ('shouldRun' in logs
|
|
5716
|
+
? logs.shouldRun
|
|
5717
|
+
? data.isRecalculated
|
|
5718
|
+
? exports.LogStatus.success
|
|
5719
|
+
: exports.LogStatus.dataProvided
|
|
5720
|
+
: data.isRecalculated && index > 0
|
|
5721
|
+
? exports.LogStatus.skipHierarchy
|
|
5722
|
+
: exports.LogStatus.error
|
|
5723
|
+
: exports.LogStatus.dataProvided)
|
|
5724
|
+
: data.isRecalculated
|
|
5725
|
+
? exports.LogStatus.skipHierarchy
|
|
5726
|
+
: exports.LogStatus.dataProvided)
|
|
5727
|
+
: (isCalculated
|
|
5728
|
+
? exports.LogStatus.skipHierarchy
|
|
5729
|
+
: exports.LogStatus.dataProvided);
|
|
5730
|
+
};
|
|
5725
5731
|
var mergeSubValues = function (values) { return Object.values(values.reduce(function (prev, _b) {
|
|
5726
5732
|
var id = _b.id, key = _b.key, configModels = _b.configModels;
|
|
5727
5733
|
var uniqueKey = [key, id].filter(Boolean).join('.');
|
|
@@ -5927,7 +5933,7 @@
|
|
|
5927
5933
|
// handle "input.hestiaAggregatedData"
|
|
5928
5934
|
findMatchingModel(models, modelKeyParams(node, (type === null || type === void 0 ? void 0 : type.toLowerCase()) + "." + methodId)) ||
|
|
5929
5935
|
// handle "transformation"
|
|
5930
|
-
findMatchingModel(models, modelKeyParams(node, subValue === null || subValue === void 0 ? void 0 : subValue.key))
|
|
5936
|
+
((subValue === null || subValue === void 0 ? void 0 : subValue.key) ? findMatchingModel(models, modelKeyParams(node, subValue === null || subValue === void 0 ? void 0 : subValue.key)) : undefined)
|
|
5931
5937
|
};
|
|
5932
5938
|
};
|
|
5933
5939
|
};
|
|
@@ -6026,7 +6032,7 @@
|
|
|
6026
6032
|
], __read(blankNodeLogs.flatMap(function (v) { return __spreadArray(__spreadArray([
|
|
6027
6033
|
v.configModels.length
|
|
6028
6034
|
], __read((v.subValues.map(function (s) { var _a; return ((_a = s.configModels) === null || _a === void 0 ? void 0 : _a.length) || 0; })))), __read((v.keys.map(function (s) { var _a; return ((_a = s.configModels) === null || _a === void 0 ? void 0 : _a.length) || 0; })))); })))); };
|
|
6029
|
-
var logValueArray = function (value) { return value.includes(
|
|
6035
|
+
var logValueArray = function (value) { return [';', ':'].some(function (v) { return value.includes(v); }) ?
|
|
6030
6036
|
value.split(';').flatMap(function (v) {
|
|
6031
6037
|
var res = v.split('_').map(function (vv) { return vv.split(':'); });
|
|
6032
6038
|
return res.length <= 1 ? res.flat() : Object.fromEntries(res);
|
|
@@ -6055,7 +6061,8 @@
|
|
|
6055
6061
|
})[model.modelKey]
|
|
6056
6062
|
: methodId
|
|
6057
6063
|
? ({
|
|
6058
|
-
|
|
6064
|
+
// TODO: this is displayed for all transformation models and is not accurate, find a better solution
|
|
6065
|
+
// transformation: 'Data From Transformation',
|
|
6059
6066
|
impact_assessment: 'Data From Cycle'
|
|
6060
6067
|
})[methodId]
|
|
6061
6068
|
: '') || utils.keyToLabel(methodId); };
|