@sis-cc/dotstatsuite-components 8.13.0 → 8.14.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.
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getChartOptions = exports.symbolMarkers = exports.FOCUS_COLORS = undefined;
7
7
 
8
+ var _extends2 = require('babel-runtime/helpers/extends');
9
+
10
+ var _extends3 = _interopRequireDefault(_extends2);
11
+
8
12
  var _ramda = require('ramda');
9
13
 
10
14
  var R = _interopRequireWildcard(_ramda);
@@ -23,10 +27,10 @@ var _getTooltipOptions = require('./getTooltipOptions');
23
27
 
24
28
  var _constants = require('../constants');
25
29
 
26
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
-
28
30
  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; } }
29
31
 
32
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
+
30
34
  var FOCUS_COLORS = exports.FOCUS_COLORS = {
31
35
  highlightColors: ['#E73741', '#0F8FD9', '#993484', '#DF521E', '#719E24', '#E1B400', '#32A674', '#0B68AF'],
32
36
  baselineColors: ['#0B1E2D']
@@ -74,7 +78,7 @@ var getChartOptions = exports.getChartOptions = function getChartOptions(data, t
74
78
  base: (0, _getBaseOptions.getBaseOptions)(type, options),
75
79
  grid: (0, _getGridOptions.getGridOptions)(type, options),
76
80
  map: R.pipe(R.propOr({}, 'map'), R.mergeRight({ intBoundariesColor: '#8EA4B1' }))(options),
77
- serie: {
81
+ serie: (0, _extends3.default)({}, R.propOr({}, 'serie', options), {
78
82
  annotation: getAnnotationOptions(type, options),
79
83
  choropleth: R.pipe(R.pathOr({}, ['serie', 'choropleth']), R.mergeRight({
80
84
  divisions: 4,
@@ -97,6 +101,6 @@ var getChartOptions = exports.getChartOptions = function getChartOptions(data, t
97
101
  highlightColors: R.pathOr(FOCUS_COLORS.highlightColors, ['serie', 'highlightColors'], options),
98
102
  baselineColors: R.pathOr(FOCUS_COLORS.baselineColors, ['serie', 'baselineColors'], options),
99
103
  tooltip: (0, _getTooltipOptions.getTooltipOptions)(data, type, options, tooltipFonts, timeFormats, locale)
100
- }
104
+ })
101
105
  };
102
106
  };
@@ -34,6 +34,10 @@ var sampleFilterSeries = function sampleFilterSeries(series) {
34
34
  var lineFilterSeries = R.filter(isFocused);
35
35
 
36
36
  exports.default = function (series, type, options) {
37
+ var responsiveFocusFilter = R.pathOr(true, ['serie', 'responsiveFocusFilter'], options);
38
+ if (!responsiveFocusFilter) {
39
+ return series;
40
+ }
37
41
  var height = R.path(['base', 'height'], options);
38
42
  var width = R.path(['base', 'width'], options);
39
43
  var minWidth = R.path(['base', 'minDisplayWidth'], options);
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": "8.13.0",
4
+ "version": "8.14.0",
5
5
  "main": "lib/index.js",
6
6
  "author": "OECD",
7
7
  "license": "MIT",
@@ -80,6 +80,7 @@ export const getChartOptions = (data, type, options, tooltipFonts, timeFormats,
80
80
  R.mergeRight({ intBoundariesColor: '#8EA4B1' })
81
81
  )(options),
82
82
  serie: {
83
+ ...R.propOr({}, 'serie', options),
83
84
  annotation: getAnnotationOptions(type, options),
84
85
  choropleth: R.pipe(
85
86
  R.pathOr({}, ['serie', 'choropleth']),
@@ -20,6 +20,10 @@ const sampleFilterSeries = (series) => (
20
20
  const lineFilterSeries = R.filter(isFocused);
21
21
 
22
22
  export default (series, type, options) => {
23
+ const responsiveFocusFilter = R.pathOr(true, ['serie', 'responsiveFocusFilter'], options);
24
+ if (!responsiveFocusFilter) {
25
+ return series;
26
+ }
23
27
  const height = R.path(['base', 'height'], options);
24
28
  const width = R.path(['base', 'width'], options);
25
29
  const minWidth = R.path(['base', 'minDisplayWidth'], options);