@sis-cc/dotstatsuite-components 17.18.0 → 17.20.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.
package/lib/rules/src/index.js
CHANGED
|
@@ -403,7 +403,7 @@ var _extractSdmxArtefacts = function _extractSdmxArtefacts(data) {
|
|
|
403
403
|
name: extractDataName(data),
|
|
404
404
|
observations: R.pipe(R.pathOr({}, ['dataSets', 0, 'observations']), R.mapObjIndexed(function (obs) {
|
|
405
405
|
return R.over(R.lensIndex(0), function (val) {
|
|
406
|
-
return Number(val);
|
|
406
|
+
return R.isNil(val) ? null : Number(val);
|
|
407
407
|
})(obs);
|
|
408
408
|
}), R.reject(R.pipe(R.head, R.anyPass([R.isNil, isNaN]))))(data),
|
|
409
409
|
source: (0, _get3.default)(data, 'header.links[0].href', null)
|
|
@@ -75,7 +75,7 @@ var parseCombinations = exports.parseCombinations = function parseCombinations(c
|
|
|
75
75
|
relationship = attribute.series && isDisplayable ? R.pipe(R.reject(function (id) {
|
|
76
76
|
return R.has(id, ids);
|
|
77
77
|
}), R.concat(relationship))(attribute.relationship) : relationship;
|
|
78
|
-
ids = attribute.series ? (0, _extends4.default)({}, ids, R.indexBy(R.identity, attribute.relationship)) : ids;
|
|
78
|
+
ids = attribute.series && isDisplayable ? (0, _extends4.default)({}, ids, R.indexBy(R.identity, attribute.relationship)) : ids;
|
|
79
79
|
displayable_values_count = isDisplayable ? displayable_values_count + R.length(displayableValues) : displayable_values_count;
|
|
80
80
|
return attribute.series && isDisplayable;
|
|
81
81
|
}, comb.concepts);
|
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.
|
|
4
|
+
"version": "17.20.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "OECD",
|
|
7
7
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@react-hook/size": "^2.1.1",
|
|
27
|
-
"@sis-cc/dotstatsuite-d3-charts": "^8.
|
|
27
|
+
"@sis-cc/dotstatsuite-d3-charts": "^8.3.0",
|
|
28
28
|
"date-fns": "^1.30.1",
|
|
29
29
|
"lodash": "^4.17.2",
|
|
30
30
|
"lodash.compose": "^2.4.1",
|
package/src/rules/src/index.js
CHANGED
|
@@ -64,7 +64,7 @@ const _extractSdmxArtefacts = (data) => {
|
|
|
64
64
|
name: extractDataName(data),
|
|
65
65
|
observations: R.pipe(
|
|
66
66
|
R.pathOr({}, ['dataSets', 0, 'observations']),
|
|
67
|
-
R.mapObjIndexed(obs => R.over(R.lensIndex(0), val => Number(val))(obs)),
|
|
67
|
+
R.mapObjIndexed(obs => R.over(R.lensIndex(0), val => R.isNil(val) ? null : Number(val))(obs)),
|
|
68
68
|
R.reject(R.pipe(R.head, R.anyPass([R.isNil, isNaN]))),
|
|
69
69
|
)(data),
|
|
70
70
|
source: get(data, 'header.links[0].href', null),
|
|
@@ -72,7 +72,7 @@ export const parseCombinations = (
|
|
|
72
72
|
R.concat(relationship),
|
|
73
73
|
)(attribute.relationship)
|
|
74
74
|
: relationship;
|
|
75
|
-
ids = attribute.series
|
|
75
|
+
ids = attribute.series && isDisplayable
|
|
76
76
|
? { ...ids, ...R.indexBy(R.identity, attribute.relationship) }
|
|
77
77
|
: ids;
|
|
78
78
|
displayable_values_count = isDisplayable
|
|
@@ -17,6 +17,7 @@ describe('parseCombinations tests', () => {
|
|
|
17
17
|
{ id: 'COMB11', concepts: ['DIM4', 'DIM7'] },
|
|
18
18
|
{ id: 'COMB12', concepts: ['DIM4', 'ATTR7'] },
|
|
19
19
|
{ id: 'COMB13', concepts: ['DIM7', 'ATTR7'] },
|
|
20
|
+
{ id: 'COMB14', concepts: ['DIM3', 'ATTR5', 'ATTR8'] }
|
|
20
21
|
];
|
|
21
22
|
|
|
22
23
|
const dimensions = [
|
|
@@ -78,6 +79,12 @@ describe('parseCombinations tests', () => {
|
|
|
78
79
|
relationship: [],
|
|
79
80
|
values: [],
|
|
80
81
|
},
|
|
82
|
+
{
|
|
83
|
+
id: 'ATTR8',
|
|
84
|
+
series: true,
|
|
85
|
+
relationship: ['DIM5'],
|
|
86
|
+
values: [{ id: 'v' }],
|
|
87
|
+
},
|
|
81
88
|
];
|
|
82
89
|
|
|
83
90
|
expect(
|
|
@@ -159,6 +166,13 @@ describe('parseCombinations tests', () => {
|
|
|
159
166
|
display: false,
|
|
160
167
|
header: true,
|
|
161
168
|
},
|
|
169
|
+
{
|
|
170
|
+
id: 'COMB14',
|
|
171
|
+
concepts: ['DIM3', 'ATTR5', 'ATTR8'],
|
|
172
|
+
relationship: ['DIM3', 'DIM5'],
|
|
173
|
+
display: true,
|
|
174
|
+
series: true,
|
|
175
|
+
},
|
|
162
176
|
]);
|
|
163
177
|
});
|
|
164
178
|
});
|