@sis-cc/dotstatsuite-components 17.7.0 → 17.8.0

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.
@@ -126,12 +126,13 @@ var dataTransformer = exports.dataTransformer = function dataTransformer(dataNew
126
126
  var getAttrObservations = R.propOr([], 'observation');
127
127
  var attrObservations = getAttrObservations(attributes);
128
128
 
129
- var resAttrObservations = R.map(function (observation) {
129
+ var resAttrObservations = R.addIndex(R.map)(function (observation, index) {
130
130
  var obsAnnotations = R.props(observation.annotations || [], annotations);
131
131
  return (0, _extends3.default)({}, observation, {
132
+ __index: index,
132
133
  display: !R.has(observation.id, hiddenIds) && !(0, _sdmxData.getIsHidden)(obsAnnotations),
133
134
  name: (0, _dotstatsuiteSdmxjs.getRefinedName)(observation),
134
- values: getValues(observation.values || [], observation.id),
135
+ values: getValuesEnhanced(locale, annotations, false, observation.id)(R.propOr([], 'values', observation)),
135
136
  roles: !R.isNil(observation.role) ? R.head(observation.role) : null
136
137
  });
137
138
  }, attrObservations);
@@ -141,7 +142,7 @@ var dataTransformer = exports.dataTransformer = function dataTransformer(dataNew
141
142
  return (0, _extends3.default)({}, attr, {
142
143
  display: !R.has(attr.id, hiddenIds) && !(0, _sdmxData.getIsHidden)(attrAnnotations),
143
144
  name: (0, _dotstatsuiteSdmxjs.getRefinedName)(attr),
144
- values: getValues(attr.values || [], attr.id)
145
+ values: getValuesEnhanced(locale, annotations, false, attr.id)(R.propOr([], 'values', attr))
145
146
  });
146
147
  }, R.propOr([], 'dataSet', attributes));
147
148
 
@@ -398,4 +398,13 @@ Object.defineProperty(exports, 'getTableLabelAccessor', {
398
398
  get: function get() {
399
399
  return _getTableLabelAccessor.getTableLabelAccessor;
400
400
  }
401
+ });
402
+
403
+ var _parseValueHierarchy = require('./table/parseValueHierarchy');
404
+
405
+ Object.defineProperty(exports, 'parseValueHierarchy', {
406
+ enumerable: true,
407
+ get: function get() {
408
+ return _parseValueHierarchy.parseValueHierarchy;
409
+ }
401
410
  });
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": "17.7.0",
4
+ "version": "17.8.0",
5
5
  "main": "lib/index.js",
6
6
  "author": "OECD",
7
7
  "license": "MIT",
@@ -117,13 +117,14 @@ export const dataTransformer = (dataNew, options = {}) => {
117
117
  const getAttrObservations = R.propOr([], 'observation');
118
118
  const attrObservations = getAttrObservations(attributes);
119
119
 
120
- const resAttrObservations = R.map((observation) => {
120
+ const resAttrObservations = R.addIndex(R.map)((observation, index) => {
121
121
  const obsAnnotations = R.props(observation.annotations || [], annotations);
122
122
  return ({
123
123
  ...observation,
124
+ __index: index,
124
125
  display: !R.has(observation.id, hiddenIds) && !getIsHidden(obsAnnotations),
125
126
  name: getRefinedName(observation),
126
- values: getValues(observation.values || [], observation.id),
127
+ values: getValuesEnhanced(locale, annotations, false, observation.id)(R.propOr([], 'values', observation)),
127
128
  roles: !R.isNil(observation.role) ? R.head(observation.role) : null,
128
129
  });
129
130
  }, attrObservations);
@@ -135,7 +136,7 @@ export const dataTransformer = (dataNew, options = {}) => {
135
136
  ...attr,
136
137
  display: !R.has(attr.id, hiddenIds) && !getIsHidden(attrAnnotations),
137
138
  name: getRefinedName(attr),
138
- values: getValues(attr.values || [], attr.id)
139
+ values: getValuesEnhanced(locale, annotations, false, attr.id)(R.propOr([], 'values', attr)),
139
140
  });
140
141
  },
141
142
  R.propOr([], 'dataSet', attributes)
@@ -45,3 +45,4 @@ export { getCuratedCells } from './table/getCuratedCells';
45
45
  export { prepareData } from './prepareData';
46
46
  export { getTableProps } from './table/getTableProps';
47
47
  export { getTableLabelAccessor } from './table/getTableLabelAccessor';
48
+ export { parseValueHierarchy } from './table/parseValueHierarchy';