@sis-cc/dotstatsuite-components 15.0.21 → 16.1.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 +1 -145
- package/lib/rules/src/table/index.js +0 -42
- package/lib/rules2/src/constants.js +4 -1
- package/lib/rules2/src/enhanceObservations.js +98 -0
- package/lib/rules2/src/getAttributesSeries.js +33 -0
- package/lib/rules2/src/getCombinationDefinitions.js +48 -0
- package/lib/rules2/src/getHeaderCombinations.js +42 -0
- package/lib/rules2/src/getHeaderSubtitle.js +41 -0
- package/lib/rules2/src/getManyValuesDimensions.js +39 -0
- package/lib/rules2/src/getOneValueDimensions.js +46 -0
- package/lib/rules2/src/hasCellMetadata.js +1 -1
- package/lib/rules2/src/index.js +186 -18
- package/lib/rules2/src/parseAttributes.js +50 -0
- package/lib/rules2/src/parseCombinations.js +54 -0
- package/lib/rules2/src/parseMetadataSeries.js +4 -2
- package/lib/rules2/src/prepareData.js +74 -0
- package/lib/{rules/src/table/preparators/getAttributeValue.js → rules2/src/refineAttributes.js} +13 -11
- package/lib/rules2/src/table/getCells.js +74 -0
- package/lib/rules2/src/table/getCellsAttributesIds.js +63 -0
- package/lib/rules2/src/table/getCombinationDimensionsData.js +47 -0
- package/lib/rules2/src/table/getCuratedCells.js +28 -0
- package/lib/rules2/src/table/getFlagsAndNotes.js +28 -0
- package/lib/rules2/src/table/getIndexedCombinationsByDisplay.js +31 -0
- package/lib/rules2/src/table/getLayout.js +93 -0
- package/lib/rules2/src/table/getLayoutData.js +202 -0
- package/lib/{rules/src/table/factories → rules2/src/table}/getSortedLayoutIndexes.js +55 -40
- package/lib/rules2/src/table/getTableProps.js +64 -0
- package/lib/rules2/src/table/parseValueHierarchy.js +55 -0
- package/lib/{rules/src/table/factories → rules2/src/table}/refineLayoutSize.js +17 -8
- package/lib/rules2/src/{hasLayoutEntryMetadata.js → utils.js} +9 -6
- package/package.json +1 -1
- package/src/rules/src/index.js +1 -19
- package/src/rules/src/table/index.js +0 -4
- package/src/rules2/src/constants.js +3 -0
- package/src/rules2/src/enhanceObservations.js +88 -0
- package/src/rules2/src/getAttributesSeries.js +29 -0
- package/src/rules2/src/getCombinationDefinitions.js +29 -0
- package/src/rules2/src/getHeaderCombinations.js +39 -0
- package/src/rules2/src/getHeaderSubtitle.js +34 -0
- package/src/rules2/src/getManyValuesDimensions.js +34 -0
- package/src/rules2/src/getOneValueDimensions.js +33 -0
- package/src/rules2/src/hasCellMetadata.js +1 -1
- package/src/rules2/src/index.js +21 -6
- package/src/rules2/src/parseAttributes.js +36 -0
- package/src/rules2/src/parseCombinations.js +36 -0
- package/src/rules2/src/parseMetadataSeries.js +3 -2
- package/src/rules2/src/prepareData.js +50 -0
- package/src/rules2/src/refineAttributes.js +16 -0
- package/src/rules2/src/table/getCells.js +72 -0
- package/src/rules2/src/table/getCellsAttributesIds.js +38 -0
- package/src/rules2/src/table/getCombinationDimensionsData.js +38 -0
- package/src/rules2/src/table/getCuratedCells.js +33 -0
- package/src/rules2/src/table/getFlagsAndNotes.js +21 -0
- package/src/rules2/src/table/getIndexedCombinationsByDisplay.js +16 -0
- package/src/rules2/src/table/getLayout.js +80 -0
- package/src/rules2/src/table/getLayoutData.js +183 -0
- package/src/rules2/src/table/getSortedLayoutIndexes.js +119 -0
- package/src/rules2/src/table/getTableProps.js +36 -0
- package/src/rules2/src/table/parseValueHierarchy.js +27 -0
- package/src/{rules/src/table/factories → rules2/src/table}/refineLayoutSize.js +24 -8
- package/src/rules2/src/utils.js +12 -0
- package/test/enhanceObservations2.test.js +219 -0
- package/test/getAttributesSeries.test.js +58 -0
- package/test/getCells.test.js +6 -40
- package/test/getCombinationDimensionsData.test.js +48 -0
- package/test/getSortedLayoutIndexes.test.js +1025 -3
- package/test/mocks/OECD_SNA_TABLE1_1.0_-_AUS_V_metadata.json +2 -2
- package/test/parseAttributes.test.js +17 -62
- package/test/parseMetadataSeries.test.js +1 -1
- package/test/parseValueHierarchy.test.js +88 -0
- package/test/refineLayoutSize.test.js +2621 -1
- package/lib/rules/src/table/factories/getCells.js +0 -97
- package/lib/rules/src/table/factories/getConfirmedSeriesAttributesIds.js +0 -26
- package/lib/rules/src/table/factories/getCuratedCells.js +0 -45
- package/lib/rules/src/table/factories/getLayoutData.js +0 -168
- package/lib/rules/src/table/factories/getLayoutWithFlags.js +0 -133
- package/lib/rules/src/table/factories/getTableCells.js +0 -24
- package/lib/rules/src/table/factories/getTableData.js +0 -98
- package/lib/rules/src/table/preparators/getDimensionsAttributesRegisters.js +0 -43
- package/lib/rules/src/table/preparators/getManyValuesDimensions.js +0 -33
- package/lib/rules/src/table/preparators/getOneValueDimensions.js +0 -24
- package/lib/rules/src/table/preparators/getUniqValuesAttributes.js +0 -36
- package/lib/rules/src/table/preparators/parseAttributes.js +0 -84
- package/lib/rules/src/table/preparators/parseAttributesValuesFromObservations.js +0 -22
- package/lib/rules/src/table/preparators/parseDimensionsIds.js +0 -22
- package/lib/rules/src/table/preparators/prepareData.js +0 -191
- package/lib/rules/src/table/preparators/refineObservationsAttributesValues.js +0 -31
- package/lib/rules/src/table/preparators/refineSeriesAttributesValues.js +0 -23
- package/lib/rules/src/table/units/appendUnitsInLayoutData.js +0 -82
- package/lib/rules/src/table/units/appendUnitsInLayoutDataEntry.js +0 -45
- package/lib/rules/src/table/units/cleanUnitsInLayoutData.js +0 -66
- package/lib/rules/src/table/units/getAttachmentSeriesIndexes.js +0 -25
- package/lib/rules/src/table/units/getHeaderUnits.js +0 -35
- package/lib/rules/src/table/units/getUnitsArtefacts.js +0 -85
- package/lib/rules/src/table/units/getUnitsCodes.js +0 -23
- package/lib/rules/src/table/units/getUnitsDefinition.js +0 -33
- package/lib/rules/src/table/units/getUnitsDisplay.js +0 -33
- package/lib/rules/src/table/units/getUnitsSerieIndexes.js +0 -23
- package/lib/rules/src/table/units/getUnitsSeries.js +0 -49
- package/lib/rules/src/table/units/getUnitsinLayout.js +0 -74
- package/lib/rules/src/table/units/refineDimSeriesUnits.js +0 -44
- package/lib/rules2/src/getAdvancedAttributes.js +0 -124
- package/lib/rules2/src/invertTime.js +0 -33
- package/src/rules/src/table/factories/getCells.js +0 -102
- package/src/rules/src/table/factories/getConfirmedSeriesAttributesIds.js +0 -27
- package/src/rules/src/table/factories/getCuratedCells.js +0 -40
- package/src/rules/src/table/factories/getLayoutData.js +0 -171
- package/src/rules/src/table/factories/getLayoutWithFlags.js +0 -137
- package/src/rules/src/table/factories/getSortedLayoutIndexes.js +0 -108
- package/src/rules/src/table/factories/getTableCells.js +0 -16
- package/src/rules/src/table/factories/getTableData.js +0 -86
- package/src/rules/src/table/preparators/getAttributeValue.js +0 -17
- package/src/rules/src/table/preparators/getDimensionsAttributesRegisters.js +0 -51
- package/src/rules/src/table/preparators/getManyValuesDimensions.js +0 -19
- package/src/rules/src/table/preparators/getOneValueDimensions.js +0 -17
- package/src/rules/src/table/preparators/getUniqValuesAttributes.js +0 -24
- package/src/rules/src/table/preparators/parseAttributes.js +0 -113
- package/src/rules/src/table/preparators/parseAttributesValuesFromObservations.js +0 -16
- package/src/rules/src/table/preparators/parseDimensionsIds.js +0 -17
- package/src/rules/src/table/preparators/prepareData.js +0 -197
- package/src/rules/src/table/preparators/refineObservationsAttributesValues.js +0 -22
- package/src/rules/src/table/preparators/refineSeriesAttributesValues.js +0 -11
- package/src/rules/src/table/units/appendUnitsInLayoutData.js +0 -56
- package/src/rules/src/table/units/appendUnitsInLayoutDataEntry.js +0 -38
- package/src/rules/src/table/units/cleanUnitsInLayoutData.js +0 -65
- package/src/rules/src/table/units/getAttachmentSeriesIndexes.js +0 -27
- package/src/rules/src/table/units/getHeaderUnits.js +0 -32
- package/src/rules/src/table/units/getUnitsArtefacts.js +0 -90
- package/src/rules/src/table/units/getUnitsCodes.js +0 -22
- package/src/rules/src/table/units/getUnitsDefinition.js +0 -34
- package/src/rules/src/table/units/getUnitsDisplay.js +0 -19
- package/src/rules/src/table/units/getUnitsSerieIndexes.js +0 -12
- package/src/rules/src/table/units/getUnitsSeries.js +0 -41
- package/src/rules/src/table/units/getUnitsinLayout.js +0 -71
- package/src/rules/src/table/units/refineDimSeriesUnits.js +0 -26
- package/src/rules2/src/getAdvancedAttributes.js +0 -111
- package/src/rules2/src/hasLayoutEntryMetadata.js +0 -9
- package/src/rules2/src/invertTime.js +0 -22
- package/test/advanced-attributes-parsing-perf.test.js +0 -16
- package/test/appendUnitsInLayoutDataEntry.test.js +0 -65
- package/test/cleanUnitsInLayoutData.test.js +0 -85
- package/test/enhanceObservations.test.js +0 -340
- package/test/getAttachmentSeriesIndexes.test.js +0 -35
- package/test/getConfirmedSeriesAttributesIds.test.js +0 -27
- package/test/getDataflowAdvancedAttributes.test.js +0 -32
- package/test/getHeaderUnits.test.js +0 -51
- package/test/getLayoutData.test.js +0 -206
- package/test/getLayoutDataWithFlags.test.js +0 -142
- package/test/getOneValueDimensions.test.js +0 -26
- package/test/getSeriesAdvancedAttributes.test.js +0 -32
- package/test/getSubtitleFlags.test.js +0 -42
- package/test/getTableData.test.js +0 -1317
- package/test/getUnitsArtefacts.test.js +0 -117
- package/test/getUnitsDefinition.test.js +0 -37
- package/test/getUnitsInLayout.test.js +0 -77
- package/test/getUnitsSeries.test.js +0 -154
- package/test/invertTime.test.js +0 -77
- package/test/parseAttributesValuesFromObservations.test.js +0 -45
- package/test/parseDimensionsIds.test.js +0 -20
- package/test/prepareData.test.js +0 -29
- package/test/refineObservationsAttributesValues.test.js +0 -33
- package/test/table-invert-time-perf.test.js +0 -11
- package/test/table-layout-perf.test.js +0 -74
- package/test/table-prep-duplicate-perf.test.js +0 -15
- package/test/table-prep-perf.test.js +0 -61
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
for Dataflow attributes and 'single values' dimensions
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export const getUniqValuesAttributes = (attributesIds, attributes, noDisplayIndexes) => R.pipe(
|
|
8
|
-
R.pick(attributesIds),
|
|
9
|
-
R.mapObjIndexed(
|
|
10
|
-
(attribute) => {
|
|
11
|
-
const value = R.head(attribute.values);
|
|
12
|
-
const annotationsIndexes = R.propOr([], 'annotations', value);
|
|
13
|
-
const noDisplayValueIndexes = R.intersection(annotationsIndexes, noDisplayIndexes);
|
|
14
|
-
if (!R.isEmpty(noDisplayValueIndexes)) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
return ({
|
|
18
|
-
...R.pick(['id', 'name'], attribute),
|
|
19
|
-
value: R.head(attribute.values)
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
),
|
|
23
|
-
R.filter(R.pipe(R.isNil, R.not))
|
|
24
|
-
)(attributes);
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
import { REPORTING_YEAR_START_DAY, REPYEARSTART } from '../../constants';
|
|
3
|
-
|
|
4
|
-
const registerAttrId = (path, id) => R.over(
|
|
5
|
-
R.lensPath(R.prepend('attributesIdsIndexedByTargets', path)),
|
|
6
|
-
R.ifElse(R.isNil, R.always([id]), R.append(id))
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
const _registerAttr = rejected=>(attr) => R.set(
|
|
10
|
-
R.lensPath(['attributesIndexedByIds', attr.id]),
|
|
11
|
-
R.over(R.lensProp('values'),R.map(v=> R.includes(R.prop('id')(v),rejected)? null : v))(attr)
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
const getAttributeRegisters = (attribute, parsedDimensionsIds, customAttributes) => {
|
|
15
|
-
const registerAttr = _registerAttr(R.propOr([],'rejectedValueIds')(customAttributes))
|
|
16
|
-
if (R.propEq('id', customAttributes.prefscale, attribute)) {
|
|
17
|
-
return [registerAttrId(['prefscale'], attribute.id), registerAttr(attribute)];
|
|
18
|
-
}
|
|
19
|
-
if (R.propEq('id', customAttributes.decimals, attribute)) {
|
|
20
|
-
return [registerAttrId(['decimals'], attribute.id), registerAttr(attribute)];
|
|
21
|
-
}
|
|
22
|
-
if (R.hasPath(['relationship', 'none'], attribute) || R.hasPath(['relationship', 'dataflow'], attribute)) {
|
|
23
|
-
return [registerAttrId(['dataflow'], attribute.id), registerAttr(attribute)];
|
|
24
|
-
}
|
|
25
|
-
if (R.pathEq(['relationship', 'primaryMeasure'], 'OBS_VALUE', attribute) || R.hasPath(['relationship', 'observation'], attribute)) {
|
|
26
|
-
return [registerAttrId(['observations'], attribute.id), registerAttr(attribute)];
|
|
27
|
-
}
|
|
28
|
-
const targetDimensions = R.pathOr([], ['relationship', 'dimensions'], attribute);
|
|
29
|
-
if (R.isEmpty(targetDimensions)) {
|
|
30
|
-
return [];
|
|
31
|
-
}
|
|
32
|
-
if (R.length(targetDimensions) === 1) {
|
|
33
|
-
return R.ifElse(
|
|
34
|
-
R.flip(R.has)(parsedDimensionsIds.oneValue),
|
|
35
|
-
R.always([
|
|
36
|
-
registerAttrId(['oneValueDimensions', R.head(targetDimensions)], attribute.id),
|
|
37
|
-
registerAttr(attribute)
|
|
38
|
-
]),
|
|
39
|
-
R.always([
|
|
40
|
-
registerAttrId(['manyValuesDimensions'], attribute.id),
|
|
41
|
-
registerAttr(R.assoc(
|
|
42
|
-
'targetIndex',
|
|
43
|
-
R.prop(R.head(targetDimensions), parsedDimensionsIds.manyValues),
|
|
44
|
-
attribute
|
|
45
|
-
))
|
|
46
|
-
])
|
|
47
|
-
)(R.head(targetDimensions));
|
|
48
|
-
}
|
|
49
|
-
const manyValuesTargetDimensions = R.without(R.keys(parsedDimensionsIds.oneValue), targetDimensions);
|
|
50
|
-
const size = R.length(manyValuesTargetDimensions);
|
|
51
|
-
if (size === 0) {
|
|
52
|
-
return [registerAttrId(['dataflow'], attribute.id), registerAttr(attribute)];
|
|
53
|
-
}
|
|
54
|
-
if (size === 1) {
|
|
55
|
-
return [
|
|
56
|
-
registerAttrId(['manyValuesDimensions'], attribute.id),
|
|
57
|
-
registerAttr(R.assoc(
|
|
58
|
-
'targetIndex',
|
|
59
|
-
R.prop(R.head(manyValuesTargetDimensions), parsedDimensionsIds.manyValues),
|
|
60
|
-
attribute
|
|
61
|
-
))
|
|
62
|
-
];
|
|
63
|
-
}
|
|
64
|
-
return [
|
|
65
|
-
registerAttrId(['series'], attribute.id),
|
|
66
|
-
registerAttr(
|
|
67
|
-
R.assoc(
|
|
68
|
-
'targetIndexes',
|
|
69
|
-
R.reduce(
|
|
70
|
-
(acc, dimId) => {
|
|
71
|
-
const index = R.prop(dimId, parsedDimensionsIds.manyValues);
|
|
72
|
-
return R.assoc(String(index), index, acc);
|
|
73
|
-
},
|
|
74
|
-
{},
|
|
75
|
-
manyValuesTargetDimensions
|
|
76
|
-
),
|
|
77
|
-
attribute
|
|
78
|
-
)
|
|
79
|
-
)
|
|
80
|
-
]
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const parseAttributes = ({ attributes, parsedDimensionsIds, customAttributes }) => R.addIndex(R.reduce)(
|
|
84
|
-
(acc, attribute, attributeIndex) => {
|
|
85
|
-
const values = R.propOr([], 'values', attribute);
|
|
86
|
-
|
|
87
|
-
if (R.isEmpty(values) || !R.propOr(true, 'display', attribute) || R.includes(attribute.id, R.propOr([], 'units', customAttributes))) {
|
|
88
|
-
return acc;
|
|
89
|
-
}
|
|
90
|
-
if (R.includes(attribute.id, [REPORTING_YEAR_START_DAY, REPYEARSTART])) return acc;
|
|
91
|
-
|
|
92
|
-
const registers = getAttributeRegisters(
|
|
93
|
-
R.pipe(
|
|
94
|
-
R.assoc('index', attributeIndex),
|
|
95
|
-
R.over(
|
|
96
|
-
R.lensProp('values'),
|
|
97
|
-
R.map((value) => {
|
|
98
|
-
if (!R.propOr(true, 'display', value)) {
|
|
99
|
-
return null;
|
|
100
|
-
}
|
|
101
|
-
return value;
|
|
102
|
-
})
|
|
103
|
-
)
|
|
104
|
-
)(attribute),
|
|
105
|
-
parsedDimensionsIds,
|
|
106
|
-
customAttributes,
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
return R.pipeWith(R.flip(R.applyTo), registers)(acc);
|
|
110
|
-
},
|
|
111
|
-
{ attributesIndexedByIds: {}, attributesIdsIndexedByTargets: {} },
|
|
112
|
-
attributes
|
|
113
|
-
);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
|
|
3
|
-
export const parseAttributesValuesFromObservations = (observations, registers) => R.pipe(
|
|
4
|
-
R.values,
|
|
5
|
-
R.reduce(
|
|
6
|
-
(acc, observation) => {
|
|
7
|
-
const observationRegisters = R.map(
|
|
8
|
-
getRegister => getRegister(observation),
|
|
9
|
-
registers
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
return R.pipeWith(R.flip(R.applyTo), observationRegisters)(acc);
|
|
13
|
-
},
|
|
14
|
-
{}
|
|
15
|
-
)
|
|
16
|
-
)(observations);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
|
|
3
|
-
export const parseDimensionsIds = R.addIndex(R.reduce)(
|
|
4
|
-
(acc, dimension, dimensionIndex) => {
|
|
5
|
-
const values = R.propOr([], 'values', dimension);
|
|
6
|
-
const size = R.length(values);
|
|
7
|
-
if (R.equals(0, size)) {
|
|
8
|
-
return acc;
|
|
9
|
-
}
|
|
10
|
-
const target = R.equals(1, size) ? 'oneValue' : 'manyValues';
|
|
11
|
-
return R.set(
|
|
12
|
-
R.lensPath([target, dimension.id]),
|
|
13
|
-
dimensionIndex
|
|
14
|
-
)(acc);
|
|
15
|
-
},
|
|
16
|
-
{ manyValues: {}, oneValue: {} }
|
|
17
|
-
);
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
import { getObservationsType } from '../../properties/getObservationsType';
|
|
3
|
-
import { parseDimensionsIds } from './parseDimensionsIds';
|
|
4
|
-
import { parseAttributes } from './parseAttributes';
|
|
5
|
-
import { getDimensionsAttributesRegisters } from './getDimensionsAttributesRegisters';
|
|
6
|
-
import { parseAttributesValuesFromObservations } from './parseAttributesValuesFromObservations';
|
|
7
|
-
import { getOneValueDimensions } from './getOneValueDimensions';
|
|
8
|
-
import { getManyValuesDimensions } from './getManyValuesDimensions';
|
|
9
|
-
import { getAttributeValue } from './getAttributeValue';
|
|
10
|
-
import { refineSeriesAttributesValues } from './refineSeriesAttributesValues';
|
|
11
|
-
|
|
12
|
-
import { getUnitsDefinition } from '../units/getUnitsDefinition';
|
|
13
|
-
import { getUnitsArtefacts } from '../units/getUnitsArtefacts';
|
|
14
|
-
import { getHeaderUnits } from '../units/getHeaderUnits';
|
|
15
|
-
import { getAttachmentSeriesIndexes } from '../units/getAttachmentSeriesIndexes';
|
|
16
|
-
import { getUnitsSeries } from '../units/getUnitsSeries';
|
|
17
|
-
|
|
18
|
-
import { getObservations } from '../../preparators/getObservations';
|
|
19
|
-
import { enhanceObservations } from '../../preparators/enhanceObservations';
|
|
20
|
-
|
|
21
|
-
import { getMetadataCoordinates } from '../../../../rules2/src/getMetadataCoordinates';
|
|
22
|
-
import {
|
|
23
|
-
getDataflowAdvancedAttributes,
|
|
24
|
-
getObservationsAdvancedAttributes,
|
|
25
|
-
getSeriesAdvancedAttributes
|
|
26
|
-
} from '../../../../rules2/src/getAdvancedAttributes';
|
|
27
|
-
import { duplicateObs } from '../../../../rules2/src/duplicateObservations';
|
|
28
|
-
import { hierarchiseDimensionWithAdvancedHierarchy } from '../../../../rules2/src/hierarchiseDimensionWithAdvancedHierarchy';
|
|
29
|
-
import { hierarchiseDimensionWithNativeHierarchy } from '../../../../rules2/src/hierarchiseDimensionWithNativeHierarchy';
|
|
30
|
-
|
|
31
|
-
export const prepareData = (sdmxJson, customAttributes, unitsProps={}, _options={}) => {
|
|
32
|
-
const {
|
|
33
|
-
defaultCodes=[],
|
|
34
|
-
annotationsDefinitionCodes={},
|
|
35
|
-
rejectedValueIds=[],
|
|
36
|
-
} = R.pick(['defaultCodes', 'annotationsDefinitionCodes', 'rejectedValueIds'], unitsProps);
|
|
37
|
-
const unitsDefinitionCodes = getUnitsDefinition({
|
|
38
|
-
defaultCodes, annotationsDefinitionCodes, data: sdmxJson
|
|
39
|
-
});
|
|
40
|
-
const _customAttributes = R.assoc('units', unitsDefinitionCodes, customAttributes);
|
|
41
|
-
const dimensions = R.pathOr([], ['data', 'structure', 'dimensions', 'observation'], sdmxJson);
|
|
42
|
-
|
|
43
|
-
const hierarchies = _options.hierarchies || {};
|
|
44
|
-
const dimensionsIndexedByIds = R.indexBy(R.prop('id'), dimensions);
|
|
45
|
-
|
|
46
|
-
const parsedDimensionsIds = parseDimensionsIds(dimensions);
|
|
47
|
-
|
|
48
|
-
//------------------------------------------------------------------
|
|
49
|
-
const unitsArtefacts = getUnitsArtefacts({ unitsDefinitionCodes, data: sdmxJson });
|
|
50
|
-
const headerUnits = getHeaderUnits({ unitsArtefacts, unitsDefinitionCodes, rejectedValueIds });
|
|
51
|
-
const _dimensions = R.pipe(
|
|
52
|
-
R.pathOr([], ['data', 'structure', 'dimensions', 'observation']),
|
|
53
|
-
R.indexBy(R.prop('id'))
|
|
54
|
-
)(sdmxJson);
|
|
55
|
-
const attachmentSeriesIndexes = getAttachmentSeriesIndexes({ dimensions: _dimensions, unitsArtefacts });
|
|
56
|
-
//------------------------------------------------------------------
|
|
57
|
-
|
|
58
|
-
const attributes = R.pathOr([], ['data', 'structure', 'attributes', 'observation'], sdmxJson);
|
|
59
|
-
|
|
60
|
-
const { attributesIndexedByIds, attributesIdsIndexedByTargets } = parseAttributes({
|
|
61
|
-
attributes: R.concat(
|
|
62
|
-
attributes,
|
|
63
|
-
R.pathOr([], ['data', 'structure', 'attributes', 'dataSet'], sdmxJson),
|
|
64
|
-
),
|
|
65
|
-
parsedDimensionsIds,
|
|
66
|
-
customAttributes: _customAttributes,
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
const seriesAttributesIds = R.propOr([], 'series', attributesIdsIndexedByTargets);
|
|
70
|
-
const observationsAttributesIds = R.propOr([], 'observations', attributesIdsIndexedByTargets);
|
|
71
|
-
const obsUnitsIds = R.pipe(
|
|
72
|
-
({ attributes, dimensions }) => R.merge(attributes.series || {}, dimensions.series || {}),
|
|
73
|
-
R.keys
|
|
74
|
-
)(unitsArtefacts);
|
|
75
|
-
const options = {
|
|
76
|
-
attachmentSeriesIndexes,
|
|
77
|
-
customAttributes,
|
|
78
|
-
attributesIds: R.concat(seriesAttributesIds, observationsAttributesIds),
|
|
79
|
-
unitsIds: obsUnitsIds,
|
|
80
|
-
rejectedValueIds
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
const _observations = getObservations(sdmxJson);
|
|
84
|
-
const observations = enhanceObservations(dimensions, _observations, attributes, options);
|
|
85
|
-
//------------------------------------------------------------------
|
|
86
|
-
const unitsSeries = getUnitsSeries(observations);
|
|
87
|
-
const unitsAttachmentSeriesIds = R.pipe(
|
|
88
|
-
R.props(attachmentSeriesIndexes),
|
|
89
|
-
R.pluck('id')
|
|
90
|
-
)(dimensions);
|
|
91
|
-
//------------------------------------------------------------------
|
|
92
|
-
const attributesRegisters = getDimensionsAttributesRegisters(
|
|
93
|
-
attributesIdsIndexedByTargets,
|
|
94
|
-
attributesIndexedByIds
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
const dimensionsAttributesValues = parseAttributesValuesFromObservations( // => { series: { key: { attrId: [...indexes] } }, dimensions: {} }
|
|
98
|
-
observations,
|
|
99
|
-
attributesRegisters
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
const dataflowAttributes = R.mapObjIndexed(
|
|
103
|
-
attribute => getAttributeValue(attribute, 0),
|
|
104
|
-
R.pipe(
|
|
105
|
-
R.pick(
|
|
106
|
-
R.propOr([], 'dataflow', attributesIdsIndexedByTargets),
|
|
107
|
-
),
|
|
108
|
-
R.filter(R.complement(R.isNil))
|
|
109
|
-
)(attributesIndexedByIds)
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
const oneValueDimensions = getOneValueDimensions(
|
|
113
|
-
R.pipe(
|
|
114
|
-
R.pick(R.keys(parsedDimensionsIds.oneValue)),
|
|
115
|
-
R.omit(unitsDefinitionCodes)
|
|
116
|
-
)(dimensionsIndexedByIds),
|
|
117
|
-
attributesIdsIndexedByTargets.oneValueDimensions,
|
|
118
|
-
attributesIndexedByIds,
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
const manyValuesDimensions = getManyValuesDimensions(
|
|
122
|
-
dimensionsIndexedByIds,
|
|
123
|
-
parsedDimensionsIds.manyValues,
|
|
124
|
-
dimensionsAttributesValues.dimensions,
|
|
125
|
-
attributesIndexedByIds,
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
const seriesAttributesValues = R.map(
|
|
129
|
-
series => refineSeriesAttributesValues(series, attributesIndexedByIds),
|
|
130
|
-
dimensionsAttributesValues
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
const metadataCoordinates = getMetadataCoordinates(sdmxJson);
|
|
134
|
-
const headerAttributesIds = R.concat(
|
|
135
|
-
attributesIdsIndexedByTargets.dataflow || [],
|
|
136
|
-
R.pipe(R.values, R.unnest)(attributesIdsIndexedByTargets.oneValueDimensions || {})
|
|
137
|
-
);
|
|
138
|
-
const headerAttributes = R.pick(headerAttributesIds, attributesIndexedByIds);
|
|
139
|
-
const headerAdvancedAttrIds = R.pipe(
|
|
140
|
-
R.filter(id => !R.includes(id, customAttributes.flags || []) && !R.includes(id, customAttributes.notes || [])),
|
|
141
|
-
)(headerAttributesIds);
|
|
142
|
-
|
|
143
|
-
const dataflowAdvancedAttributes = getDataflowAdvancedAttributes(
|
|
144
|
-
headerAttributes,
|
|
145
|
-
R.pick(R.keys(parsedDimensionsIds.oneValue), dimensionsIndexedByIds),
|
|
146
|
-
headerAdvancedAttrIds,
|
|
147
|
-
R.length(dimensions)
|
|
148
|
-
);
|
|
149
|
-
|
|
150
|
-
const observationsAdvancedAttributesIds = R.filter(
|
|
151
|
-
id => !R.includes(id, customAttributes.flags || []) && !R.includes(id, customAttributes.notes || []),
|
|
152
|
-
attributesIdsIndexedByTargets.observations || []
|
|
153
|
-
);
|
|
154
|
-
const observationsAdvancedAttributes = getObservationsAdvancedAttributes(observations, observationsAdvancedAttributesIds);
|
|
155
|
-
|
|
156
|
-
const seriesAdvancedAttributesIds = R.filter(
|
|
157
|
-
id => !R.includes(id, customAttributes.flags || []) && !R.includes(id, customAttributes.notes || []),
|
|
158
|
-
R.concat(attributesIdsIndexedByTargets.series || [], attributesIdsIndexedByTargets.manyValuesDimensions || [])
|
|
159
|
-
);
|
|
160
|
-
|
|
161
|
-
const seriesAdvancedAttributes = getSeriesAdvancedAttributes(
|
|
162
|
-
seriesAttributesValues,
|
|
163
|
-
dimensions,
|
|
164
|
-
seriesAdvancedAttributesIds
|
|
165
|
-
);
|
|
166
|
-
|
|
167
|
-
const hierarchisedDimensions = R.map(dim => {
|
|
168
|
-
if (R.isEmpty(R.propOr({}, dim.id, hierarchies))) {
|
|
169
|
-
return hierarchiseDimensionWithNativeHierarchy(dim);
|
|
170
|
-
}
|
|
171
|
-
return hierarchiseDimensionWithAdvancedHierarchy(dim, R.prop(dim.id, hierarchies));
|
|
172
|
-
})(manyValuesDimensions);
|
|
173
|
-
|
|
174
|
-
const duplicatedObservations = duplicateObs(R.values(hierarchisedDimensions), observations);
|
|
175
|
-
return ({
|
|
176
|
-
dimensions: {
|
|
177
|
-
one: oneValueDimensions,
|
|
178
|
-
many: hierarchisedDimensions,
|
|
179
|
-
length: R.length(dimensions)
|
|
180
|
-
},
|
|
181
|
-
units: {
|
|
182
|
-
headerUnits,
|
|
183
|
-
rejectedValueIds,
|
|
184
|
-
unitsDefinitionCodes,
|
|
185
|
-
unitsAttachmentSeriesIds,
|
|
186
|
-
unitsSeries,
|
|
187
|
-
},
|
|
188
|
-
metadataCoordinates,
|
|
189
|
-
advancedAttributes: { ...dataflowAdvancedAttributes, ...observationsAdvancedAttributes, ...seriesAdvancedAttributes },
|
|
190
|
-
observations: duplicatedObservations,
|
|
191
|
-
observationsType: getObservationsType(sdmxJson.data),
|
|
192
|
-
dataflowAttributes,
|
|
193
|
-
dataflowName: R.path(['data', 'structure', 'name'], sdmxJson),
|
|
194
|
-
seriesAttributes: R.props(seriesAttributesIds, attributesIndexedByIds),
|
|
195
|
-
seriesAttributesValues: seriesAttributesValues.series || {}
|
|
196
|
-
});
|
|
197
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
import { getAttributeValue } from './getAttributeValue';
|
|
3
|
-
/*
|
|
4
|
-
After parsing series attributes or 'many values' dimensions attributes from observations,
|
|
5
|
-
filter to keep only single uniq non null occurences, and return the corresponding attribute value
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export const refineObservationsAttributesValues = (attributesByIds) => R.pipe(
|
|
10
|
-
R.mapObjIndexed(
|
|
11
|
-
(indexes, attributeId) => {
|
|
12
|
-
const uniqed = R.uniq(indexes);
|
|
13
|
-
if (R.length(uniqed) !== 1) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
const valueIndex = R.head(uniqed);
|
|
17
|
-
|
|
18
|
-
return getAttributeValue(R.propOr({}, attributeId, attributesByIds), valueIndex);
|
|
19
|
-
}
|
|
20
|
-
),
|
|
21
|
-
R.filter(R.complement(R.isNil))
|
|
22
|
-
);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
import { refineObservationsAttributesValues } from './refineObservationsAttributesValues';
|
|
3
|
-
|
|
4
|
-
export const refineSeriesAttributesValues = (seriesAttributeIndexes, attributesByIds) => R.pipe(
|
|
5
|
-
R.mapObjIndexed(
|
|
6
|
-
(serieAttributes, serieKey) => ({
|
|
7
|
-
attributes: refineObservationsAttributesValues(attributesByIds)(serieAttributes),
|
|
8
|
-
serie: R.split(':', serieKey)
|
|
9
|
-
})
|
|
10
|
-
),
|
|
11
|
-
)(seriesAttributeIndexes);
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
import { appendUnitsInLayoutDataEntry } from './appendUnitsInLayoutDataEntry';
|
|
3
|
-
import { getUnitsSerieIndexes } from './getUnitsSerieIndexes';
|
|
4
|
-
|
|
5
|
-
export const appendUnitsInLayoutData = ({
|
|
6
|
-
display, // label || code || both
|
|
7
|
-
layoutIds,
|
|
8
|
-
rejectedValueIds,
|
|
9
|
-
unitDimension,
|
|
10
|
-
unitsDisplay,
|
|
11
|
-
unitsSeries,
|
|
12
|
-
unitsDefinitionCodes,
|
|
13
|
-
unitsIndexes, // { header: [], sections: [], rows: [] }
|
|
14
|
-
partialUnitSerieIndexes, // here it is blank (only 'x' in the array)
|
|
15
|
-
}) => (layoutData) => {
|
|
16
|
-
switch (unitsDisplay) {
|
|
17
|
-
case 'header':
|
|
18
|
-
return R.evolve({
|
|
19
|
-
'headerData': R.map(appendUnitsInLayoutDataEntry({
|
|
20
|
-
display, unitDimension, unitsSeries, unitsDefinitionCodes,
|
|
21
|
-
unitsIndexes: unitsIndexes.header, partialUnitSerieIndexes,
|
|
22
|
-
rejectedValueIds
|
|
23
|
-
}))
|
|
24
|
-
}, layoutData);
|
|
25
|
-
case 'sections':
|
|
26
|
-
return R.evolve({
|
|
27
|
-
'sectionsData': R.map(
|
|
28
|
-
([section, rows]) => ([
|
|
29
|
-
appendUnitsInLayoutDataEntry({
|
|
30
|
-
display, unitDimension, unitsSeries, unitsDefinitionCodes,
|
|
31
|
-
unitsIndexes: unitsIndexes.sections, partialUnitSerieIndexes,
|
|
32
|
-
rejectedValueIds
|
|
33
|
-
})(section),
|
|
34
|
-
rows])
|
|
35
|
-
)
|
|
36
|
-
}, layoutData);
|
|
37
|
-
case 'rows':
|
|
38
|
-
return R.evolve({
|
|
39
|
-
'sectionsData': R.map(([section, rows]) => {
|
|
40
|
-
const sectionSerieIndexes = getUnitsSerieIndexes({
|
|
41
|
-
unitsIndexes: unitsIndexes.sections,
|
|
42
|
-
partialUnitSerieIndexes
|
|
43
|
-
})(section);
|
|
44
|
-
const unitsCodes = R.without(layoutIds.sections, unitsDefinitionCodes);
|
|
45
|
-
const unitsInRows = R.map(appendUnitsInLayoutDataEntry({
|
|
46
|
-
display, unitDimension, unitsSeries, unitsDefinitionCodes: unitsCodes,
|
|
47
|
-
unitsIndexes: unitsIndexes.rows, partialUnitSerieIndexes: sectionSerieIndexes,
|
|
48
|
-
rejectedValueIds
|
|
49
|
-
}))(rows);
|
|
50
|
-
return [section, unitsInRows];
|
|
51
|
-
})
|
|
52
|
-
}, layoutData);
|
|
53
|
-
default:
|
|
54
|
-
return layoutData;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
import { getUnitsSerieIndexes } from './getUnitsSerieIndexes';
|
|
3
|
-
import { dimensionValueDisplay } from '../../dimension-utils';
|
|
4
|
-
|
|
5
|
-
export const appendUnitsInLayoutDataEntry = ({
|
|
6
|
-
display, // label || code || both
|
|
7
|
-
rejectedValueIds=[],
|
|
8
|
-
unitDimension, // { id: 'UNITS', name: 'Units' }; provided y DE
|
|
9
|
-
unitsSeries, // all the units series parsed through observations
|
|
10
|
-
unitsDefinitionCodes, // all units dimensions and attributes ids in array (used to guarantee the order of the concatenated data)
|
|
11
|
-
unitsIndexes, // indexes of all the dimensions attached to the units in the layout data entry
|
|
12
|
-
partialUnitSerieIndexes // array of indexes to complete with units values indexes of the layout entry to retrieve tthe corresponding units serie
|
|
13
|
-
}) => (layoutDataEntry) => { // [{ dimension: {}, value: {} }]
|
|
14
|
-
const unitsSerie = R.pipe(
|
|
15
|
-
getUnitsSerieIndexes({ unitsIndexes, partialUnitSerieIndexes }),
|
|
16
|
-
R.join(':'),
|
|
17
|
-
R.flip(R.propOr({}))(unitsSeries)
|
|
18
|
-
)(layoutDataEntry);
|
|
19
|
-
|
|
20
|
-
const unitsData = {
|
|
21
|
-
dimension: unitDimension,
|
|
22
|
-
value: R.pipe(
|
|
23
|
-
R.props(unitsDefinitionCodes),
|
|
24
|
-
R.reduce((acc, unit) => {
|
|
25
|
-
const value = R.prop('value', unit);
|
|
26
|
-
if (R.isNil(unit) || R.includes(value.id, rejectedValueIds)) {
|
|
27
|
-
return acc;
|
|
28
|
-
}
|
|
29
|
-
const unitLabel = dimensionValueDisplay(display)(R.propOr({}, 'value', unit));
|
|
30
|
-
return R.isEmpty(acc.id)
|
|
31
|
-
? { id: value.id, unitsLabel: unitLabel }
|
|
32
|
-
: { id: `${acc.id} - ${value.id}` , unitsLabel: `${acc.unitsLabel}, ${unitLabel}` };
|
|
33
|
-
}, { id: '', unitsLabel: '' })
|
|
34
|
-
)(unitsSerie)
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return R.append(unitsData, layoutDataEntry);
|
|
38
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
|
|
3
|
-
const formatUnitsInLayoutSerie = R.over(
|
|
4
|
-
R.lensIndex(-1),
|
|
5
|
-
(units) => {
|
|
6
|
-
const label = R.path(['value', 'unitsLabel'], units);
|
|
7
|
-
return R.assocPath(['value', 'label'], label, units);
|
|
8
|
-
}
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
const removeUnitsDimensions = (indexes) => R.addIndex(R.reject)(
|
|
12
|
-
(entry, index) => R.includes(index, indexes)
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
export const cleanUnitsInLayoutData = ({
|
|
16
|
-
unitsDisplay, // sections, headers, rows or cells
|
|
17
|
-
unitsLayoutIndexes, // indexes to remove from the layout data
|
|
18
|
-
}) => (layoutData) => {
|
|
19
|
-
switch (unitsDisplay) {
|
|
20
|
-
case 'header':
|
|
21
|
-
return R.evolve({
|
|
22
|
-
headerData: R.map(
|
|
23
|
-
R.over(
|
|
24
|
-
R.lensProp('data'),
|
|
25
|
-
R.pipe(
|
|
26
|
-
removeUnitsDimensions(unitsLayoutIndexes.header),
|
|
27
|
-
formatUnitsInLayoutSerie
|
|
28
|
-
)
|
|
29
|
-
)
|
|
30
|
-
)
|
|
31
|
-
})(layoutData);
|
|
32
|
-
case 'sections':
|
|
33
|
-
return R.evolve({
|
|
34
|
-
sectionsData: R.map(
|
|
35
|
-
([section, rows]) => {
|
|
36
|
-
const updatedSection = R.over(
|
|
37
|
-
R.lensProp('data'),
|
|
38
|
-
R.pipe(
|
|
39
|
-
removeUnitsDimensions(unitsLayoutIndexes.sections),
|
|
40
|
-
formatUnitsInLayoutSerie
|
|
41
|
-
)
|
|
42
|
-
)(section);
|
|
43
|
-
return ([updatedSection, rows]);
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
})(layoutData);
|
|
47
|
-
case 'rows':
|
|
48
|
-
return R.evolve({
|
|
49
|
-
sectionsData: R.map(
|
|
50
|
-
([section, rows]) => {
|
|
51
|
-
const updatedRows = R.map(R.over(
|
|
52
|
-
R.lensProp('data'),
|
|
53
|
-
R.pipe(
|
|
54
|
-
removeUnitsDimensions(unitsLayoutIndexes.rows),
|
|
55
|
-
formatUnitsInLayoutSerie
|
|
56
|
-
)
|
|
57
|
-
), rows);
|
|
58
|
-
return ([section, updatedRows]);
|
|
59
|
-
}
|
|
60
|
-
)
|
|
61
|
-
})(layoutData);
|
|
62
|
-
default:
|
|
63
|
-
return layoutData;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
|
|
3
|
-
export const getAttachmentSeriesIndexes = ({
|
|
4
|
-
unitsArtefacts,
|
|
5
|
-
dimensions // { id: { __index, ...dim } }
|
|
6
|
-
}) => {
|
|
7
|
-
const targettedDimensionsCodes = R.pipe(
|
|
8
|
-
R.pathOr({}, ['attributes', 'series']),
|
|
9
|
-
R.values,
|
|
10
|
-
R.map(R.pathOr([], ['relationship', 'dimensions'])),
|
|
11
|
-
R.unnest
|
|
12
|
-
)(unitsArtefacts);
|
|
13
|
-
|
|
14
|
-
const unitsDimensionsCodes = R.pipe(
|
|
15
|
-
R.pathOr({}, ['dimensions', 'series']),
|
|
16
|
-
R.reject(R.propOr(false, 'header')),
|
|
17
|
-
R.keys,
|
|
18
|
-
)(unitsArtefacts);
|
|
19
|
-
|
|
20
|
-
return R.pipe(
|
|
21
|
-
R.props(R.concat(unitsDimensionsCodes, targettedDimensionsCodes)),
|
|
22
|
-
R.filter(dim => !R.isNil(dim)),
|
|
23
|
-
R.pluck('__index'),
|
|
24
|
-
R.uniq,
|
|
25
|
-
R.sortBy(R.identity)
|
|
26
|
-
)(dimensions);
|
|
27
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as R from 'ramda';
|
|
2
|
-
|
|
3
|
-
export const getHeaderUnits = ({
|
|
4
|
-
rejectedValueIds=[],
|
|
5
|
-
unitsArtefacts, // { dimensions: { header: { id: dim, ... }, series: {} }, attributes: { header: {}, series: {} } }
|
|
6
|
-
unitsDefinitionCodes=[]
|
|
7
|
-
}) => {
|
|
8
|
-
const artefacts = R.converge(
|
|
9
|
-
R.merge,
|
|
10
|
-
[
|
|
11
|
-
R.pathOr({}, ['dimensions', 'header']),
|
|
12
|
-
R.pathOr({}, ['attributes', 'header'])
|
|
13
|
-
]
|
|
14
|
-
)(unitsArtefacts);
|
|
15
|
-
|
|
16
|
-
return R.pipe(
|
|
17
|
-
R.props(unitsDefinitionCodes),
|
|
18
|
-
R.reduce(
|
|
19
|
-
(acc, entry) => {
|
|
20
|
-
if (R.isNil(entry) || !(R.propOr(true, 'display', entry)) || !(R.pathOr(true, ['values', 0, 'display'], entry))
|
|
21
|
-
|| R.includes(R.path(['values', 0, 'id'], entry), rejectedValueIds)) {
|
|
22
|
-
return acc;
|
|
23
|
-
}
|
|
24
|
-
return R.append(
|
|
25
|
-
{ ...R.pick(['id', 'name'], entry), value: R.path(['values', 0], entry) },
|
|
26
|
-
acc
|
|
27
|
-
);
|
|
28
|
-
},
|
|
29
|
-
[]
|
|
30
|
-
)
|
|
31
|
-
)(artefacts);
|
|
32
|
-
};
|