@sis-cc/dotstatsuite-components 13.0.1 → 13.0.2
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.
|
@@ -32,7 +32,7 @@ var getAttributeRegisters = function getAttributeRegisters(attribute, parsedDime
|
|
|
32
32
|
if (R.propEq('id', customAttributes.decimals, attribute)) {
|
|
33
33
|
return [registerAttrId(['decimals'], attribute.id), registerAttr(attribute)];
|
|
34
34
|
}
|
|
35
|
-
if (R.hasPath(['relationship', 'none'], attribute)) {
|
|
35
|
+
if (R.hasPath(['relationship', 'none'], attribute) || R.hasPath(['relationship', 'dataflow'], attribute)) {
|
|
36
36
|
return [registerAttrId(['dataflow'], attribute.id), registerAttr(attribute)];
|
|
37
37
|
}
|
|
38
38
|
if (R.pathEq(['relationship', 'primaryMeasure'], 'OBS_VALUE', attribute) || R.hasPath(['relationship', 'observation'], attribute)) {
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ const getAttributeRegisters = (attribute, parsedDimensionsIds, customAttributes)
|
|
|
17
17
|
if (R.propEq('id', customAttributes.decimals, attribute)) {
|
|
18
18
|
return [registerAttrId(['decimals'], attribute.id), registerAttr(attribute)];
|
|
19
19
|
}
|
|
20
|
-
if (R.hasPath(['relationship', 'none'], attribute)) {
|
|
20
|
+
if (R.hasPath(['relationship', 'none'], attribute) || R.hasPath(['relationship', 'dataflow'], attribute)) {
|
|
21
21
|
return [registerAttrId(['dataflow'], attribute.id), registerAttr(attribute)];
|
|
22
22
|
}
|
|
23
23
|
if (R.pathEq(['relationship', 'primaryMeasure'], 'OBS_VALUE', attribute) || R.hasPath(['relationship', 'observation'], attribute)) {
|
|
@@ -27,7 +27,9 @@ const attributes = [
|
|
|
27
27
|
{ id: 'a17', relationship: { primaryMeasure: 'OBS_VALUE' }, values: [{ id: 'a17v1' }] }, // blacklisted
|
|
28
28
|
{ id: 'a18', relationship: { primaryMeasure: 'OBS_VALUE' }, values: [{ id: 'a18v1' }, { id: 'a18v2' }] }, // blacklisted value
|
|
29
29
|
{ id: 'a19', relationship: { none: {} }, values: [{ id: 'a19v1' }] }, // dataset relationship
|
|
30
|
-
{ id: 'a20', relationship: { primaryMeasure: 'OBS_VALUE' }, values: [{ id: 'a20v1' }] } // units attribute
|
|
30
|
+
{ id: 'a20', relationship: { primaryMeasure: 'OBS_VALUE' }, values: [{ id: 'a20v1' }] }, // units attribute
|
|
31
|
+
{ id: 'a21', relationship: { dataflow: {} }, values: [{ id: 'a21v0' }] }, // alternative dataflow relationship
|
|
32
|
+
{ id: 'a22', relationship: { observation: {} }, values: [{ id: 'a22v0' }] }, // alternative observation relationship
|
|
31
33
|
];
|
|
32
34
|
|
|
33
35
|
const customAttributes = {
|
|
@@ -58,13 +60,15 @@ describe('parseAttributes test', () => {
|
|
|
58
60
|
a15: { id: 'a15', index: 15, relationship: { dimensions: ['d3'] }, values: [{ id: 'a15v1' }] },
|
|
59
61
|
a16: { id: 'a16', index: 16, relationship: { dimensions: ['d6'] }, values: [{ id: 'a16v1' }] },
|
|
60
62
|
a18: { id: 'a18', index: 18, relationship: { primaryMeasure: 'OBS_VALUE' }, values: [{ id: 'a18v1' }, null] },
|
|
61
|
-
a19: { id: 'a19', index: 19, relationship: { none: {} }, values: [{ id: 'a19v1' }] }
|
|
63
|
+
a19: { id: 'a19', index: 19, relationship: { none: {} }, values: [{ id: 'a19v1' }] },
|
|
64
|
+
a21: { id: 'a21', index: 21, relationship: { dataflow: {} }, values: [{ id: 'a21v0' }] },
|
|
65
|
+
a22: { id: 'a22', index: 22, relationship: { observation: {} }, values: [{ id: 'a22v0' }] },
|
|
62
66
|
},
|
|
63
67
|
attributesIdsIndexedByTargets: {
|
|
64
|
-
observations: ['a6', 'a18'],
|
|
68
|
+
observations: ['a6', 'a18', 'a22'],
|
|
65
69
|
oneValueDimensions: { d1: ['a8', 'a14'] },
|
|
66
70
|
manyValuesDimensions: ['a9', 'a11'],
|
|
67
|
-
dataflow: ['a10', 'a19'],
|
|
71
|
+
dataflow: ['a10', 'a19', 'a21'],
|
|
68
72
|
series: ['a12', 'a13'],
|
|
69
73
|
prefscale: ['a15'],
|
|
70
74
|
decimals: ['a16'],
|