@sis-cc/dotstatsuite-components 11.0.0 → 11.0.1
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/rules2/src/constants.js +2 -2
- package/lib/rules2/src/index.js +11 -5
- package/lib/rules2/src/{json2.0DataFormatPatch.js → sdmx3.0DataFormatPatch.js} +2 -2
- package/package.json +1 -1
- package/src/rules2/src/constants.js +2 -2
- package/src/rules2/src/index.js +5 -2
- package/src/rules2/src/{json2.0DataFormatPatch.js → sdmx3.0DataFormatPatch.js} +1 -1
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var SDMX_3_0_JSON_DATA_FORMAT = exports.SDMX_3_0_JSON_DATA_FORMAT = 'application/vnd.sdmx.data+json;version=2.0';
|
|
7
|
+
var SDMX_3_0_CSV_DATA_FORMAT = exports.SDMX_3_0_CSV_DATA_FORMAT = 'application/vnd.sdmx.data+csv;version=2.0';
|
package/lib/rules2/src/index.js
CHANGED
|
@@ -6,10 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
|
|
7
7
|
var _constants = require('./constants');
|
|
8
8
|
|
|
9
|
-
Object.defineProperty(exports, '
|
|
9
|
+
Object.defineProperty(exports, 'SDMX_3_0_JSON_DATA_FORMAT', {
|
|
10
10
|
enumerable: true,
|
|
11
11
|
get: function get() {
|
|
12
|
-
return _constants.
|
|
12
|
+
return _constants.SDMX_3_0_JSON_DATA_FORMAT;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, 'SDMX_3_0_CSV_DATA_FORMAT', {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function get() {
|
|
18
|
+
return _constants.SDMX_3_0_CSV_DATA_FORMAT;
|
|
13
19
|
}
|
|
14
20
|
});
|
|
15
21
|
|
|
@@ -31,11 +37,11 @@ Object.defineProperty(exports, 'parseMetadataSeries', {
|
|
|
31
37
|
}
|
|
32
38
|
});
|
|
33
39
|
|
|
34
|
-
var
|
|
40
|
+
var _sdmx = require('./sdmx3.0DataFormatPatch');
|
|
35
41
|
|
|
36
|
-
Object.defineProperty(exports, '
|
|
42
|
+
Object.defineProperty(exports, 'sdmx_3_0_DataFormatPatch', {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
get: function get() {
|
|
39
|
-
return
|
|
45
|
+
return _sdmx.sdmx_3_0_DataFormatPatch;
|
|
40
46
|
}
|
|
41
47
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.sdmx_3_0_DataFormatPatch = undefined;
|
|
7
7
|
|
|
8
8
|
var _ramda = require('ramda');
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ var R = _interopRequireWildcard(_ramda);
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var sdmx_3_0_DataFormatPatch = exports.sdmx_3_0_DataFormatPatch = function sdmx_3_0_DataFormatPatch(sdmxJson) {
|
|
15
15
|
var dataSet = R.pipe(R.pathOr({}, ['data', 'dataSets']), R.head)(sdmxJson);
|
|
16
16
|
var structureIndex = R.prop('structure', dataSet);
|
|
17
17
|
var structure = R.pipe(R.pathOr([], ['data', 'structures']), R.nth(structureIndex))(sdmxJson);
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const
|
|
2
|
-
export const
|
|
1
|
+
export const SDMX_3_0_JSON_DATA_FORMAT = 'application/vnd.sdmx.data+json;version=2.0';
|
|
2
|
+
export const SDMX_3_0_CSV_DATA_FORMAT = 'application/vnd.sdmx.data+csv;version=2.0';
|
package/src/rules2/src/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {
|
|
2
|
+
SDMX_3_0_JSON_DATA_FORMAT,
|
|
3
|
+
SDMX_3_0_CSV_DATA_FORMAT
|
|
4
|
+
} from './constants';
|
|
2
5
|
|
|
3
6
|
export { getSidebarData } from './getSidebarData';
|
|
4
7
|
export { parseMetadataSeries } from './parseMetadataSeries';
|
|
5
|
-
export {
|
|
8
|
+
export { sdmx_3_0_DataFormatPatch } from './sdmx3.0DataFormatPatch';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as R from 'ramda';
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const sdmx_3_0_DataFormatPatch = (sdmxJson) => {
|
|
4
4
|
const dataSet = R.pipe(R.pathOr({}, ['data', 'dataSets']), R.head)(sdmxJson);
|
|
5
5
|
const structureIndex = R.prop('structure', dataSet);
|
|
6
6
|
const structure = R.pipe(R.pathOr([], ['data', 'structures']), R.nth(structureIndex))(sdmxJson);
|