@sis-cc/dotstatsuite-components 12.1.0 → 12.1.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.
- package/lib/rules/src/table/preparators/prepareData.js +7 -2
- package/lib/viewer/src/footer.js +4 -3
- package/lib/viewer/src/index.js +1 -1
- package/package.json +1 -1
- package/src/rules/src/table/preparators/prepareData.js +10 -2
- package/src/viewer/src/footer.js +2 -1
- package/src/viewer/src/index.js +1 -1
|
@@ -112,13 +112,18 @@ var prepareData = exports.prepareData = function prepareData(sdmxJson, customAtt
|
|
|
112
112
|
|
|
113
113
|
var seriesAttributesIds = R.propOr([], 'series', attributesIdsIndexedByTargets);
|
|
114
114
|
var observationsAttributesIds = R.propOr([], 'observations', attributesIdsIndexedByTargets);
|
|
115
|
+
var obsUnitsIds = R.pipe(function (_ref) {
|
|
116
|
+
var attributes = _ref.attributes,
|
|
117
|
+
dimensions = _ref.dimensions;
|
|
118
|
+
return R.merge(attributes.series || {}, dimensions.series || {});
|
|
119
|
+
}, R.values, R.pluck('id'))(unitsArtefacts);
|
|
115
120
|
var options = {
|
|
116
121
|
attachmentSeriesIndexes: attachmentSeriesIndexes,
|
|
117
122
|
customAttributes: customAttributes,
|
|
118
123
|
noDisplayIndexes: noDisplayIndexes,
|
|
119
124
|
notDisplayedCodes: notDisplayedCodes,
|
|
120
125
|
attributesIds: R.concat(seriesAttributesIds, observationsAttributesIds),
|
|
121
|
-
unitsIds:
|
|
126
|
+
unitsIds: obsUnitsIds
|
|
122
127
|
};
|
|
123
128
|
|
|
124
129
|
var _observations = (0, _getObservations.getObservations)(sdmxJson);
|
|
@@ -145,7 +150,7 @@ var prepareData = exports.prepareData = function prepareData(sdmxJson, customAtt
|
|
|
145
150
|
}, dimensionsAttributesValues);
|
|
146
151
|
|
|
147
152
|
var metadataCoordinates = (0, _getMetadataCoordinates.getMetadataCoordinates)(sdmxJson);
|
|
148
|
-
var headerAttributesIds = R.concat(attributesIdsIndexedByTargets.dataflow || [], attributesIdsIndexedByTargets.oneValueDimensions ||
|
|
153
|
+
var headerAttributesIds = R.concat(attributesIdsIndexedByTargets.dataflow || [], R.pipe(R.values, R.unnest)(attributesIdsIndexedByTargets.oneValueDimensions || {}));
|
|
149
154
|
var headerAttributes = R.pick(headerAttributesIds, attributesIndexedByIds);
|
|
150
155
|
var headerAdvancedAttrIds = R.pipe(R.filter(function (id) {
|
|
151
156
|
return !R.includes(id, customAttributes.flags || []) && !R.includes(id, customAttributes.footnotes || []);
|
package/lib/viewer/src/footer.js
CHANGED
|
@@ -35,12 +35,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
35
35
|
var Footer = function Footer(_ref) {
|
|
36
36
|
var type = _ref.type,
|
|
37
37
|
chartData = _ref.chartData,
|
|
38
|
-
options = _ref.options,
|
|
39
38
|
source = _ref.source,
|
|
40
39
|
logo = _ref.logo,
|
|
41
40
|
copyright = _ref.copyright,
|
|
42
41
|
onSize = _ref.onSize,
|
|
43
|
-
chartOptions = _ref.chartOptions
|
|
42
|
+
chartOptions = _ref.chartOptions,
|
|
43
|
+
isSticky = _ref.isSticky;
|
|
44
44
|
|
|
45
45
|
var target = _react2.default.useRef(null);
|
|
46
46
|
|
|
@@ -63,7 +63,8 @@ var Footer = function Footer(_ref) {
|
|
|
63
63
|
source: source,
|
|
64
64
|
logo: logo,
|
|
65
65
|
copyright: copyright,
|
|
66
|
-
legend: legend
|
|
66
|
+
legend: legend,
|
|
67
|
+
isSticky: isSticky
|
|
67
68
|
})
|
|
68
69
|
);
|
|
69
70
|
};
|
package/lib/viewer/src/index.js
CHANGED
|
@@ -58,7 +58,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
58
58
|
|
|
59
59
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
60
60
|
|
|
61
|
-
var useStyles = (0, _styles.makeStyles)(function (
|
|
61
|
+
var useStyles = (0, _styles.makeStyles)(function () {
|
|
62
62
|
return {
|
|
63
63
|
container: {
|
|
64
64
|
borderColor: '#007bc7',
|
package/package.json
CHANGED
|
@@ -79,13 +79,18 @@ export const prepareData = (sdmxJson, customAttributes, unitsProps={}) => {
|
|
|
79
79
|
|
|
80
80
|
const seriesAttributesIds = R.propOr([], 'series', attributesIdsIndexedByTargets);
|
|
81
81
|
const observationsAttributesIds = R.propOr([], 'observations', attributesIdsIndexedByTargets);
|
|
82
|
+
const obsUnitsIds = R.pipe(
|
|
83
|
+
({ attributes, dimensions }) => R.merge(attributes.series || {}, dimensions.series || {}),
|
|
84
|
+
R.values,
|
|
85
|
+
R.pluck('id')
|
|
86
|
+
)(unitsArtefacts);
|
|
82
87
|
const options = {
|
|
83
88
|
attachmentSeriesIndexes,
|
|
84
89
|
customAttributes,
|
|
85
90
|
noDisplayIndexes,
|
|
86
91
|
notDisplayedCodes,
|
|
87
92
|
attributesIds: R.concat(seriesAttributesIds, observationsAttributesIds),
|
|
88
|
-
unitsIds:
|
|
93
|
+
unitsIds: obsUnitsIds
|
|
89
94
|
};
|
|
90
95
|
|
|
91
96
|
const _observations = getObservations(sdmxJson);
|
|
@@ -140,7 +145,10 @@ export const prepareData = (sdmxJson, customAttributes, unitsProps={}) => {
|
|
|
140
145
|
);
|
|
141
146
|
|
|
142
147
|
const metadataCoordinates = getMetadataCoordinates(sdmxJson);
|
|
143
|
-
const headerAttributesIds = R.concat(
|
|
148
|
+
const headerAttributesIds = R.concat(
|
|
149
|
+
attributesIdsIndexedByTargets.dataflow || [],
|
|
150
|
+
R.pipe(R.values, R.unnest)(attributesIdsIndexedByTargets.oneValueDimensions || {})
|
|
151
|
+
);
|
|
144
152
|
const headerAttributes = R.pick(headerAttributesIds, attributesIndexedByIds);
|
|
145
153
|
const headerAdvancedAttrIds = R.pipe(
|
|
146
154
|
R.filter(id => !R.includes(id, customAttributes.flags || []) && !R.includes(id, customAttributes.footnotes || [])),
|
package/src/viewer/src/footer.js
CHANGED
|
@@ -5,7 +5,7 @@ import { DataFooter } from '@sis-cc/dotstatsuite-visions';
|
|
|
5
5
|
import ChartLegends from './legends/ChartLegends';
|
|
6
6
|
import { isChartNoData } from './utils';
|
|
7
7
|
|
|
8
|
-
const Footer = ({ type, chartData,
|
|
8
|
+
const Footer = ({ type, chartData, source, logo, copyright, onSize, chartOptions, isSticky }) => {
|
|
9
9
|
const target = React.useRef(null);
|
|
10
10
|
const [width, height] = useSize(target);
|
|
11
11
|
|
|
@@ -23,6 +23,7 @@ const Footer = ({ type, chartData, options, source, logo, copyright, onSize, cha
|
|
|
23
23
|
logo={logo}
|
|
24
24
|
copyright={copyright}
|
|
25
25
|
legend={legend}
|
|
26
|
+
isSticky={isSticky}
|
|
26
27
|
/>
|
|
27
28
|
</div>
|
|
28
29
|
);
|
package/src/viewer/src/index.js
CHANGED