@sis-cc/dotstatsuite-visions 11.1.0 → 11.3.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.
@@ -157,7 +157,7 @@ HierarchicalFilter.propTypes = process.env.NODE_ENV !== "production" ? {
157
157
  label: PropTypes.string,
158
158
  labels: PropTypes.shape({
159
159
  disableItemLabel: PropTypes.string,
160
- placeholder: PropTypes.string
160
+ placeholder: PropTypes.func
161
161
  }),
162
162
  labelRenderer: PropTypes.func,
163
163
  Tag: PropTypes.func,
@@ -20,8 +20,7 @@ var useStyles = makeStyles(function () {
20
20
  var NO_RESULT_MESSAGE_ID = 'noResultMessage';
21
21
 
22
22
  var NoData = function NoData(_ref) {
23
- var _ref$icon = _ref.icon,
24
- icon = _ref$icon === undefined ? React.createElement(Error, { color: 'primary', fontSize: 'large' }) : _ref$icon,
23
+ var icon = _ref.icon,
25
24
  message = _ref.message;
26
25
 
27
26
  var classes = useStyles();
@@ -31,7 +30,7 @@ var NoData = function NoData(_ref) {
31
30
  React.createElement(
32
31
  Typography,
33
32
  { variant: 'subtitle1', noWrap: true, align: 'center' },
34
- icon
33
+ icon || React.createElement(Error, { color: 'primary', fontSize: 'large' })
35
34
  ),
36
35
  React.createElement(
37
36
  Typography,
@@ -5,7 +5,7 @@ import Typography from '@material-ui/core/Typography';
5
5
  import Grid from '@material-ui/core/Grid';
6
6
  import { makeStyles } from '@material-ui/core/styles';
7
7
  import cx from 'classnames';
8
- import { Droppable } from 'react-beautiful-dnd';
8
+ import { Droppable } from '@hello-pangea/dnd';
9
9
  import DnDItem from './DnDItem';
10
10
  import { getLight, getDark } from '../utils';
11
11
  import { BOX } from './constants';
@@ -8,7 +8,7 @@ import { makeStyles } from '@material-ui/core/styles';
8
8
  import Typography from '@material-ui/core/Typography';
9
9
  import Select from '@material-ui/core/Select';
10
10
  import MenuItem from '@material-ui/core/MenuItem';
11
- import { Draggable } from 'react-beautiful-dnd';
11
+ import { Draggable } from '@hello-pangea/dnd';
12
12
  import { getLight, getDark } from '../utils';
13
13
  import { BOX, wcagId } from './constants';
14
14
 
@@ -12,8 +12,9 @@ import Reorder from '@material-ui/icons/Reorder';
12
12
  import ViewQuilt from '@material-ui/icons/ViewQuiltOutlined';
13
13
  import Undo from '@material-ui/icons/Undo';
14
14
  import Done from '@material-ui/icons/Done';
15
+ import CheckBoxIcon from '@material-ui/icons/CheckBoxOutlineBlankOutlined';
15
16
  import { makeStyles } from '@material-ui/core/styles';
16
- import { DragDropContext } from 'react-beautiful-dnd';
17
+ import { DragDropContext } from '@hello-pangea/dnd';
17
18
  import { withBlank } from '../utils';
18
19
  import TablePreview from '../TablePreview';
19
20
  import Box from './Box';
@@ -327,7 +328,7 @@ var TableLayout = function TableLayout(_ref) {
327
328
  'aria-label': R.prop('activationLabel', optionalItem),
328
329
  color: 'primary',
329
330
  onClick: isOptionalActivated ? deactivateOptionalItem : activateOptionalItem,
330
- startIcon: React.createElement(Done, null)
331
+ startIcon: isOptionalActivated ? React.createElement(Done, null) : React.createElement(CheckBoxIcon, null)
331
332
  },
332
333
  React.createElement(
333
334
  Typography,
@@ -186,7 +186,7 @@ HierarchicalFilter.propTypes = process.env.NODE_ENV !== "production" ? {
186
186
  label: _propTypes2.default.string,
187
187
  labels: _propTypes2.default.shape({
188
188
  disableItemLabel: _propTypes2.default.string,
189
- placeholder: _propTypes2.default.string
189
+ placeholder: _propTypes2.default.func
190
190
  }),
191
191
  labelRenderer: _propTypes2.default.func,
192
192
  Tag: _propTypes2.default.func,
@@ -38,8 +38,7 @@ var useStyles = (0, _styles.makeStyles)(function () {
38
38
  var NO_RESULT_MESSAGE_ID = 'noResultMessage';
39
39
 
40
40
  var NoData = function NoData(_ref) {
41
- var _ref$icon = _ref.icon,
42
- icon = _ref$icon === undefined ? _react2.default.createElement(_Error2.default, { color: 'primary', fontSize: 'large' }) : _ref$icon,
41
+ var icon = _ref.icon,
43
42
  message = _ref.message;
44
43
 
45
44
  var classes = useStyles();
@@ -49,7 +48,7 @@ var NoData = function NoData(_ref) {
49
48
  _react2.default.createElement(
50
49
  _Typography2.default,
51
50
  { variant: 'subtitle1', noWrap: true, align: 'center' },
52
- icon
51
+ icon || _react2.default.createElement(_Error2.default, { color: 'primary', fontSize: 'large' })
53
52
  ),
54
53
  _react2.default.createElement(
55
54
  _Typography2.default,
@@ -29,7 +29,7 @@ var _classnames = require('classnames');
29
29
 
30
30
  var _classnames2 = _interopRequireDefault(_classnames);
31
31
 
32
- var _reactBeautifulDnd = require('react-beautiful-dnd');
32
+ var _dnd = require('@hello-pangea/dnd');
33
33
 
34
34
  var _DnDItem = require('./DnDItem');
35
35
 
@@ -108,7 +108,7 @@ var Box = function Box(_ref2) {
108
108
  )
109
109
  ),
110
110
  _react2.default.createElement(
111
- _reactBeautifulDnd.Droppable,
111
+ _dnd.Droppable,
112
112
  { droppableId: dropZoneLabel },
113
113
  function (provided, snapshot) {
114
114
  var _cx;
@@ -35,7 +35,7 @@ var _MenuItem = require('@material-ui/core/MenuItem');
35
35
 
36
36
  var _MenuItem2 = _interopRequireDefault(_MenuItem);
37
37
 
38
- var _reactBeautifulDnd = require('react-beautiful-dnd');
38
+ var _dnd = require('@hello-pangea/dnd');
39
39
 
40
40
  var _utils = require('../utils');
41
41
 
@@ -108,7 +108,7 @@ var DnDItem = function DnDItem(_ref2) {
108
108
  var classes = useStyles();
109
109
  var selectItem = R.prop(item.id)(itemButtonProps);
110
110
  return _react2.default.createElement(
111
- _reactBeautifulDnd.Draggable,
111
+ _dnd.Draggable,
112
112
  { key: item.id, draggableId: item.id, index: index, isDragDisabled: R.not(canDrag) },
113
113
  function (provided) {
114
114
  var _cx, _cx2;
@@ -53,9 +53,13 @@ var _Done = require('@material-ui/icons/Done');
53
53
 
54
54
  var _Done2 = _interopRequireDefault(_Done);
55
55
 
56
+ var _CheckBoxOutlineBlankOutlined = require('@material-ui/icons/CheckBoxOutlineBlankOutlined');
57
+
58
+ var _CheckBoxOutlineBlankOutlined2 = _interopRequireDefault(_CheckBoxOutlineBlankOutlined);
59
+
56
60
  var _styles = require('@material-ui/core/styles');
57
61
 
58
- var _reactBeautifulDnd = require('react-beautiful-dnd');
62
+ var _dnd = require('@hello-pangea/dnd');
59
63
 
60
64
  var _utils = require('../utils');
61
65
 
@@ -297,7 +301,7 @@ var TableLayout = function TableLayout(_ref) {
297
301
  labels.wcagDragExplanation
298
302
  ),
299
303
  _react2.default.createElement(
300
- _reactBeautifulDnd.DragDropContext,
304
+ _dnd.DragDropContext,
301
305
  {
302
306
  onDragEnd: onDragEnd(currentLayout),
303
307
  onDragStart: onDragStart,
@@ -383,7 +387,7 @@ var TableLayout = function TableLayout(_ref) {
383
387
  'aria-label': R.prop('activationLabel', optionalItem),
384
388
  color: 'primary',
385
389
  onClick: isOptionalActivated ? deactivateOptionalItem : activateOptionalItem,
386
- startIcon: _react2.default.createElement(_Done2.default, null)
390
+ startIcon: isOptionalActivated ? _react2.default.createElement(_Done2.default, null) : _react2.default.createElement(_CheckBoxOutlineBlankOutlined2.default, null)
387
391
  },
388
392
  _react2.default.createElement(
389
393
  _Typography2.default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-visions",
3
- "version": "11.1.0",
3
+ "version": "11.3.0",
4
4
  "description": "Library of visual components",
5
5
  "author": "OECD",
6
6
  "homepage": "https://visions-qa.siscc.org/#o",
@@ -36,7 +36,7 @@
36
36
  "numeral": "^2.0.6",
37
37
  "prop-types": "^15.7.2",
38
38
  "ramda": "^0.27.0",
39
- "react-beautiful-dnd": "^13.0.0",
39
+ "@hello-pangea/dnd": "^16.6.0",
40
40
  "react-draggable": "^4.4.5",
41
41
  "react-error-boundary": "^4.0.10",
42
42
  "react-virtualized": "^9.21.2"