@sis-cc/dotstatsuite-components 17.30.1 → 17.30.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.
@@ -171,7 +171,7 @@ var getReportedTimePeriodNote = exports.getReportedTimePeriodNote = function get
171
171
  }
172
172
  var formatedStart = _dateFns2.default.format(start, 'YYYY-MM-DD');
173
173
  var formatedEnd = _dateFns2.default.format(end, 'YYYY-MM-DD');
174
- return { label: formatedStart + ' - ' + formatedEnd };
174
+ return { value: { name: formatedStart + ' - ' + formatedEnd } };
175
175
  };
176
176
 
177
177
  var getTimePeriodLabel = exports.getTimePeriodLabel = function getTimePeriodLabel(locale) {
@@ -35,6 +35,8 @@ var dimensionValueDisplay = exports.dimensionValueDisplay = function dimensionVa
35
35
  // a non-coded component (dim | attr) has no name, names nor label
36
36
  // the only valid thing to display is the id
37
37
  if ((0, _get3.default)(dimensionValue, 'isNonCoded', false)) return id;
38
+ //auto-generated flags have no id nor name
39
+ if ((0, _isEmpty3.default)(id) && (0, _isEmpty3.default)(name)) return '';
38
40
  switch (display) {
39
41
  case 'label':
40
42
  return (0, _isEmpty3.default)(name) ? '[' + id + ']' : name;
@@ -89,7 +89,7 @@ var getValuesEnhanced = exports.getValuesEnhanced = function getValuesEnhanced(_
89
89
  id: id,
90
90
  display: !isHidden,
91
91
  start: start ? start.toISOString() : null,
92
- notes: notes,
92
+ flags: notes,
93
93
  __indexPosition: __indexPosition,
94
94
  __index: __index,
95
95
  isNonCoded: isNonCoded(value)
@@ -33,7 +33,7 @@ var getValueData = function getValueData(index, dimension, parentsIndexes) {
33
33
  var missingParents = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
34
34
  return {
35
35
  dimension: R.pick(['id', 'name', '__index'], dimension),
36
- value: (0, _extends3.default)({}, R.pipe(R.pathOr({}, ['values', index]), R.pick(['id', 'name', 'isNonCoded']))(dimension), {
36
+ value: (0, _extends3.default)({}, R.pipe(R.pathOr({}, ['values', index]), R.pick(['id', 'name', 'isNonCoded', 'flags']))(dimension), {
37
37
  parents: parentsIndexes,
38
38
  missingParents: missingParents
39
39
  })
@@ -43,7 +43,6 @@ var getLayoutCoordinatesValidator = exports.getLayoutCoordinatesValidator = func
43
43
  notInTop[key] = key;
44
44
  }
45
45
  }, keys);
46
- return res;
47
- //return res && !R.isEmpty(notInTop);
46
+ return res && !R.isEmpty(notInTop);
48
47
  };
49
48
  };
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.30.1",
4
+ "version": "17.30.3",
5
5
  "main": "lib/index.js",
6
6
  "author": "OECD",
7
7
  "license": "MIT",
@@ -108,7 +108,7 @@ export const getReportedTimePeriodNote = (reportYearStart, start, end, freq) =>
108
108
  }
109
109
  const formatedStart = dateFns.format(start, 'YYYY-MM-DD');
110
110
  const formatedEnd = dateFns.format(end, 'YYYY-MM-DD');
111
- return ({ label: `${formatedStart} - ${formatedEnd}` });
111
+ return ({ value: { name: `${formatedStart} - ${formatedEnd}` } });
112
112
  };
113
113
 
114
114
 
@@ -8,6 +8,8 @@ export const dimensionValueDisplay =
8
8
  // a non-coded component (dim | attr) has no name, names nor label
9
9
  // the only valid thing to display is the id
10
10
  if (get(dimensionValue, 'isNonCoded', false)) return id;
11
+ //auto-generated flags have no id nor name
12
+ if (isEmpty(id) && isEmpty(name)) return ''
11
13
  switch (display) {
12
14
  case 'label':
13
15
  return isEmpty(name) ? `[${id}]` : name;
@@ -71,7 +71,7 @@ export const getValuesEnhanced = ({
71
71
  id,
72
72
  display: !isHidden,
73
73
  start: start ? start.toISOString() : null,
74
- notes,
74
+ flags: notes,
75
75
  __indexPosition,
76
76
  __index,
77
77
  isNonCoded: isNonCoded(value),
@@ -5,7 +5,7 @@ import { getLayoutCoordinatesValidator } from '../utils';
5
5
  const getValueData = (index, dimension, parentsIndexes, missingParents = []) => ({
6
6
  dimension: R.pick(['id', 'name', '__index'], dimension),
7
7
  value: {
8
- ...R.pipe(R.pathOr({}, ['values', index]), R.pick(['id', 'name', 'isNonCoded']))(dimension),
8
+ ...R.pipe(R.pathOr({}, ['values', index]), R.pick(['id', 'name', 'isNonCoded', 'flags']))(dimension),
9
9
  parents: parentsIndexes,
10
10
  missingParents
11
11
  }
@@ -33,6 +33,5 @@ export const getLayoutCoordinatesValidator = (layoutCoordinates, topCoordinates=
33
33
  notInTop[key] = key;
34
34
  }
35
35
  }, keys);
36
- return res;
37
- //return res && !R.isEmpty(notInTop);
36
+ return res && !R.isEmpty(notInTop);
38
37
  };