@sis-cc/dotstatsuite-components 15.0.2 → 15.0.3

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.
@@ -86,9 +86,7 @@ var prepareData = exports.prepareData = function prepareData(sdmxJson, customAtt
86
86
  //------------------------------------------------------------------
87
87
  var unitsArtefacts = (0, _getUnitsArtefacts.getUnitsArtefacts)({ unitsDefinitionCodes: unitsDefinitionCodes, data: sdmxJson });
88
88
  var headerUnits = (0, _getHeaderUnits.getHeaderUnits)({ unitsArtefacts: unitsArtefacts, unitsDefinitionCodes: unitsDefinitionCodes, rejectedValueIds: rejectedValueIds });
89
- var _dimensions = R.pipe(R.pathOr([], ['data', 'structure', 'dimensions', 'observation']), R.addIndex(R.map)(function (dim, index) {
90
- return R.assoc('index', index, dim);
91
- }), R.indexBy(R.prop('id')))(sdmxJson);
89
+ var _dimensions = R.pipe(R.pathOr([], ['data', 'structure', 'dimensions', 'observation']), R.indexBy(R.prop('id')))(sdmxJson);
92
90
  var attachmentSeriesIndexes = (0, _getAttachmentSeriesIndexes.getAttachmentSeriesIndexes)({ dimensions: _dimensions, unitsArtefacts: unitsArtefacts });
93
91
  //------------------------------------------------------------------
94
92
 
@@ -21,5 +21,5 @@ var getAttachmentSeriesIndexes = exports.getAttachmentSeriesIndexes = function g
21
21
 
22
22
  return R.pipe(R.props(R.concat(unitsDimensionsCodes, targettedDimensionsCodes)), R.filter(function (dim) {
23
23
  return !R.isNil(dim);
24
- }), R.pluck('index'), R.uniq, R.sortBy(R.identity))(dimensions);
24
+ }), R.pluck('__index'), R.uniq, R.sortBy(R.identity))(dimensions);
25
25
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-components",
3
3
  "description": "Set components based on React.",
4
- "version": "15.0.2",
4
+ "version": "15.0.3",
5
5
  "main": "lib/index.js",
6
6
  "author": "OECD",
7
7
  "license": "MIT",
@@ -50,7 +50,6 @@ export const prepareData = (sdmxJson, customAttributes, unitsProps={}, _options=
50
50
  const headerUnits = getHeaderUnits({ unitsArtefacts, unitsDefinitionCodes, rejectedValueIds });
51
51
  const _dimensions = R.pipe(
52
52
  R.pathOr([], ['data', 'structure', 'dimensions', 'observation']),
53
- R.addIndex(R.map)((dim, index) => R.assoc('index', index, dim)),
54
53
  R.indexBy(R.prop('id'))
55
54
  )(sdmxJson);
56
55
  const attachmentSeriesIndexes = getAttachmentSeriesIndexes({ dimensions: _dimensions, unitsArtefacts });
@@ -2,7 +2,7 @@ import * as R from 'ramda';
2
2
 
3
3
  export const getAttachmentSeriesIndexes = ({
4
4
  unitsArtefacts,
5
- dimensions // { id: { index, ...dim } }
5
+ dimensions // { id: { __index, ...dim } }
6
6
  }) => {
7
7
  const targettedDimensionsCodes = R.pipe(
8
8
  R.pathOr({}, ['attributes', 'series']),
@@ -20,7 +20,7 @@ export const getAttachmentSeriesIndexes = ({
20
20
  return R.pipe(
21
21
  R.props(R.concat(unitsDimensionsCodes, targettedDimensionsCodes)),
22
22
  R.filter(dim => !R.isNil(dim)),
23
- R.pluck('index'),
23
+ R.pluck('__index'),
24
24
  R.uniq,
25
25
  R.sortBy(R.identity)
26
26
  )(dimensions);