@sis-cc/dotstatsuite-components 12.1.0 → 12.1.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.
|
@@ -112,13 +112,18 @@ var prepareData = exports.prepareData = function prepareData(sdmxJson, customAtt
|
|
|
112
112
|
|
|
113
113
|
var seriesAttributesIds = R.propOr([], 'series', attributesIdsIndexedByTargets);
|
|
114
114
|
var observationsAttributesIds = R.propOr([], 'observations', attributesIdsIndexedByTargets);
|
|
115
|
+
var obsUnitsIds = R.pipe(function (_ref) {
|
|
116
|
+
var attributes = _ref.attributes,
|
|
117
|
+
dimensions = _ref.dimensions;
|
|
118
|
+
return R.merge(attributes.series || {}, dimensions.series || {});
|
|
119
|
+
}, R.values, R.pluck('id'))(unitsArtefacts);
|
|
115
120
|
var options = {
|
|
116
121
|
attachmentSeriesIndexes: attachmentSeriesIndexes,
|
|
117
122
|
customAttributes: customAttributes,
|
|
118
123
|
noDisplayIndexes: noDisplayIndexes,
|
|
119
124
|
notDisplayedCodes: notDisplayedCodes,
|
|
120
125
|
attributesIds: R.concat(seriesAttributesIds, observationsAttributesIds),
|
|
121
|
-
unitsIds:
|
|
126
|
+
unitsIds: obsUnitsIds
|
|
122
127
|
};
|
|
123
128
|
|
|
124
129
|
var _observations = (0, _getObservations.getObservations)(sdmxJson);
|
package/package.json
CHANGED
|
@@ -79,13 +79,18 @@ export const prepareData = (sdmxJson, customAttributes, unitsProps={}) => {
|
|
|
79
79
|
|
|
80
80
|
const seriesAttributesIds = R.propOr([], 'series', attributesIdsIndexedByTargets);
|
|
81
81
|
const observationsAttributesIds = R.propOr([], 'observations', attributesIdsIndexedByTargets);
|
|
82
|
+
const obsUnitsIds = R.pipe(
|
|
83
|
+
({ attributes, dimensions }) => R.merge(attributes.series || {}, dimensions.series || {}),
|
|
84
|
+
R.values,
|
|
85
|
+
R.pluck('id')
|
|
86
|
+
)(unitsArtefacts);
|
|
82
87
|
const options = {
|
|
83
88
|
attachmentSeriesIndexes,
|
|
84
89
|
customAttributes,
|
|
85
90
|
noDisplayIndexes,
|
|
86
91
|
notDisplayedCodes,
|
|
87
92
|
attributesIds: R.concat(seriesAttributesIds, observationsAttributesIds),
|
|
88
|
-
unitsIds:
|
|
93
|
+
unitsIds: obsUnitsIds
|
|
89
94
|
};
|
|
90
95
|
|
|
91
96
|
const _observations = getObservations(sdmxJson);
|