@sis-cc/dotstatsuite-visions 6.6.4 → 7.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.
Files changed (57) hide show
  1. package/es/AuthDialog/index.js +3 -2
  2. package/es/CollapsibleTree/Collapse.js +97 -0
  3. package/es/CollapsibleTree/CollapsibleTree.js +171 -0
  4. package/es/CollapsibleTree/index.js +44 -0
  5. package/es/DataEdit/Input.js +1 -1
  6. package/es/DataHeader/DataHeader.js +31 -7
  7. package/es/InfoIcon/InfoIcon.js +37 -0
  8. package/es/TableHtml5/TableHtml5.js +20 -3
  9. package/es/TableHtml5/cell.js +8 -2
  10. package/es/TableHtml5/flags.js +2 -0
  11. package/es/TableHtml5/index.js +1 -0
  12. package/es/TableHtml5/section.js +15 -2
  13. package/es/TableHtml5/sectionHeader.js +13 -6
  14. package/es/TableHtml5/sideIcon.js +26 -0
  15. package/es/TableHtml5/subHeader.js +11 -1
  16. package/es/index.js +1 -1
  17. package/es/theme.js +13 -0
  18. package/lib/AuthDialog/index.js +6 -5
  19. package/lib/CollapsibleTree/Collapse.js +126 -0
  20. package/lib/CollapsibleTree/CollapsibleTree.js +216 -0
  21. package/lib/{Table → CollapsibleTree}/index.js +2 -2
  22. package/lib/DataEdit/Input.js +1 -1
  23. package/lib/DataHeader/DataHeader.js +34 -7
  24. package/lib/InfoIcon/InfoIcon.js +56 -0
  25. package/lib/TableHtml5/TableHtml5.js +20 -3
  26. package/lib/TableHtml5/cell.js +11 -2
  27. package/lib/TableHtml5/flags.js +2 -0
  28. package/lib/TableHtml5/section.js +17 -1
  29. package/lib/TableHtml5/sectionHeader.js +16 -6
  30. package/lib/TableHtml5/sideIcon.js +46 -0
  31. package/lib/TableHtml5/subHeader.js +14 -1
  32. package/lib/index.js +10 -10
  33. package/lib/theme.js +13 -0
  34. package/package.json +6 -7
  35. package/es/Table/Table.js +0 -170
  36. package/es/Table/header.js +0 -91
  37. package/es/Table/index.js +0 -56
  38. package/es/Table/itemCell.js +0 -54
  39. package/es/Table/row-header.js +0 -84
  40. package/es/Table/section-header.js +0 -115
  41. package/es/Table/section-rows.js +0 -101
  42. package/es/Table/styles.js +0 -52
  43. package/es/Table/tableCell.js +0 -29
  44. package/es/Table/tooltip.js +0 -85
  45. package/es/Table/useStyles.js +0 -34
  46. package/es/Table/valueCell.js +0 -63
  47. package/lib/Table/Table.js +0 -203
  48. package/lib/Table/header.js +0 -116
  49. package/lib/Table/itemCell.js +0 -74
  50. package/lib/Table/row-header.js +0 -113
  51. package/lib/Table/section-header.js +0 -145
  52. package/lib/Table/section-rows.js +0 -134
  53. package/lib/Table/styles.js +0 -69
  54. package/lib/Table/tableCell.js +0 -50
  55. package/lib/Table/tooltip.js +0 -104
  56. package/lib/Table/useStyles.js +0 -41
  57. package/lib/Table/valueCell.js +0 -86
@@ -19,12 +19,12 @@
19
19
  * onClose: PropTypes.func.isRequired,
20
20
  * onSubmit: PropTypes.func.isRequired
21
21
  * };
22
+ * @demoReady
22
23
  */
23
24
 
24
25
  import React, { useState } from 'react';
25
26
  import PropTypes from 'prop-types';
26
27
  import { isEmpty } from 'ramda';
27
- import Button from '../Button';
28
28
  import Checkbox from '@material-ui/core/Checkbox';
29
29
  import CloseIcon from '@material-ui/icons/Close';
30
30
  import Dialog from '@material-ui/core/Dialog';
@@ -33,8 +33,9 @@ import PersonIcon from '@material-ui/icons/Person';
33
33
  import TextField from '@material-ui/core/TextField';
34
34
  import Typography from '@material-ui/core/Typography';
35
35
  import { makeStyles } from '@material-ui/core/styles';
36
+ import Button from '../Button';
36
37
 
37
- var useStyles = makeStyles(function (theme) {
38
+ var useStyles = makeStyles(function () {
38
39
  return {
39
40
  header: {
40
41
  color: 'grey',
@@ -0,0 +1,97 @@
1
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
+
3
+ import React, { useEffect } from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import cx from 'classnames';
6
+ import { pathOr } from 'ramda';
7
+ import { makeStyles, useTheme } from '@material-ui/core/styles';
8
+ import Collapse from '@material-ui/core/Collapse';
9
+ import Button from '@material-ui/core/Button';
10
+ import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
11
+ import KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';
12
+
13
+ var VARIANT_ICON = 'icon';
14
+ export var VARIANT_BOLD = 'bold';
15
+
16
+ var useStyles = makeStyles(function (theme) {
17
+ var _ref;
18
+
19
+ return _ref = {
20
+ buttonExpand: {
21
+ display: 'flex',
22
+ justifyContent: 'space-between'
23
+ }
24
+ }, _ref['button' + VARIANT_ICON] = {
25
+ color: theme.palette.primary.main,
26
+ backgroundColor: 'rgba(24, 32, 38, 0.04)',
27
+ margin: theme.spacing(1, 0)
28
+ }, _ref['button' + VARIANT_BOLD] = _extends({
29
+ marginBottom: theme.spacing(1),
30
+ padding: theme.spacing(0.5, 0, 1, 0),
31
+ '&:hover': {
32
+ backgroundColor: 'unset'
33
+ }
34
+ }, pathOr({}, ['mixins', 'collapsibleTree', 'buttonSublevel'], theme)), _ref['collapsibleContainer' + VARIANT_BOLD] = {
35
+ borderTop: '2px solid black',
36
+ marginTop: theme.spacing(2),
37
+ marginBottom: theme.spacing(2)
38
+ }, _ref;
39
+ });
40
+
41
+ var CollapseComponent = function CollapseComponent(_ref2) {
42
+ var label = _ref2.label,
43
+ isOpen = _ref2.isOpen,
44
+ children = _ref2.children,
45
+ _ref2$variant = _ref2.variant,
46
+ variant = _ref2$variant === undefined ? VARIANT_ICON : _ref2$variant,
47
+ level = _ref2.level;
48
+
49
+ var classes = useStyles();
50
+ var theme = useTheme();
51
+
52
+ var _React$useState = React.useState(isOpen),
53
+ open = _React$useState[0],
54
+ setOpen = _React$useState[1];
55
+
56
+ useEffect(function () {
57
+ return setOpen(isOpen);
58
+ }, [isOpen]);
59
+
60
+ return React.createElement(
61
+ 'div',
62
+ {
63
+ className: cx(classes['collapsibleContainer' + variant]),
64
+ style: {
65
+ marginRight: theme.spacing(level * 2),
66
+ marginLeft: theme.spacing(level * 2)
67
+ }
68
+ },
69
+ React.createElement(
70
+ Button,
71
+ {
72
+ className: cx(classes.buttonExpand, classes['button' + variant]),
73
+ onClick: function onClick() {
74
+ return setOpen(!open);
75
+ },
76
+ fullWidth: true
77
+ },
78
+ label,
79
+ open ? React.createElement(KeyboardArrowUpIcon, { color: 'primary' }) : React.createElement(KeyboardArrowDownIcon, { color: 'primary' })
80
+ ),
81
+ React.createElement(
82
+ Collapse,
83
+ { 'in': open, timeout: 'auto' },
84
+ children
85
+ )
86
+ );
87
+ };
88
+
89
+ CollapseComponent.propTypes = process.env.NODE_ENV !== "production" ? {
90
+ label: PropTypes.string,
91
+ isOpen: PropTypes.bool,
92
+ children: PropTypes.node,
93
+ variant: PropTypes.oneOf([VARIANT_ICON, VARIANT_BOLD]),
94
+ level: PropTypes.number
95
+ } : {};
96
+
97
+ export default CollapseComponent;
@@ -0,0 +1,171 @@
1
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
+
3
+ import React, { useState, Fragment, useEffect } from 'react';
4
+ import * as R from 'ramda';
5
+ import PropTypes from 'prop-types';
6
+ import Container from '@material-ui/core/Container';
7
+ import { makeStyles } from '@material-ui/core/styles';
8
+ import Typography from '@material-ui/core/Typography';
9
+ import Divider from '@material-ui/core/Divider';
10
+ import Button from '@material-ui/core/Button';
11
+ import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
12
+ import KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';
13
+ import CircularProgress from '@material-ui/core/CircularProgress';
14
+ import Grid from '@material-ui/core/Grid';
15
+ import Collapse, { VARIANT_BOLD } from './Collapse';
16
+
17
+ var useStyles = makeStyles(function (theme) {
18
+ return {
19
+ title: _extends({
20
+ fontWeight: 'bold'
21
+ }, R.pathOr({}, ['mixins', 'collapsibleTree', 'title'], theme)),
22
+ divider: {
23
+ marginBottom: theme.spacing(2)
24
+ },
25
+ spacingValue: {
26
+ marginLeft: theme.spacing(2),
27
+ marginRight: theme.spacing(2),
28
+ marginBottom: theme.spacing(2)
29
+ }
30
+ };
31
+ });
32
+
33
+ var CollapsibleTree = function CollapsibleTree(_ref) {
34
+ var _ref$data = _ref.data,
35
+ data = _ref$data === undefined ? [] : _ref$data,
36
+ _ref$defaultDepthLeve = _ref.defaultDepthLevel,
37
+ defaultDepthLevel = _ref$defaultDepthLeve === undefined ? 1 : _ref$defaultDepthLeve,
38
+ isLoading = _ref.isLoading,
39
+ children = _ref.children,
40
+ labels = _ref.labels,
41
+ _ref$testId = _ref.testId,
42
+ testId = _ref$testId === undefined ? 'collapsible-tree' : _ref$testId;
43
+
44
+ var classes = useStyles();
45
+
46
+ var _useState = useState(defaultDepthLevel),
47
+ depthLevel = _useState[0],
48
+ setDepthLevel = _useState[1];
49
+
50
+ useEffect(function () {
51
+ return setDepthLevel(defaultDepthLevel);
52
+ }, [defaultDepthLevel]);
53
+
54
+ if (isLoading) {
55
+ return React.createElement(
56
+ Grid,
57
+ { container: true, item: true, justifyContent: 'center' },
58
+ React.createElement(CircularProgress, null)
59
+ );
60
+ }
61
+
62
+ var handleCollapse = function handleCollapse(isAllOpen) {
63
+ if (isAllOpen) return setDepthLevel(undefined);
64
+ return setDepthLevel(defaultDepthLevel);
65
+ };
66
+
67
+ var isAllOpen = depthLevel >= defaultDepthLevel;
68
+ var buttonAllOpenLabel = isAllOpen ? R.prop('collapseAll', labels) : R.prop('expandAll', labels);
69
+
70
+ return React.createElement(
71
+ Fragment,
72
+ null,
73
+ React.createElement(
74
+ Container,
75
+ { disableGutters: true, 'data-testid': testId },
76
+ React.createElement(
77
+ Button,
78
+ {
79
+ 'aria-label': buttonAllOpenLabel,
80
+ color: 'primary',
81
+ endIcon: isAllOpen ? React.createElement(KeyboardArrowDownIcon, { color: 'primary' }) : React.createElement(KeyboardArrowUpIcon, { color: 'primary' }),
82
+ onClick: function onClick() {
83
+ return handleCollapse(isAllOpen);
84
+ }
85
+ },
86
+ buttonAllOpenLabel
87
+ ),
88
+ children
89
+ ),
90
+ R.map(function (_ref2) {
91
+ var id = _ref2.id,
92
+ label = _ref2.label,
93
+ _ref2$children = _ref2.children,
94
+ children = _ref2$children === undefined ? [] : _ref2$children;
95
+
96
+ return React.createElement(
97
+ Fragment,
98
+ { key: id },
99
+ React.createElement(Divider, { className: classes.divider }),
100
+ React.createElement(
101
+ Typography,
102
+ { variant: 'h5', className: classes.title },
103
+ label
104
+ ),
105
+ R.map(function (_ref3) {
106
+ var id = _ref3.id,
107
+ label = _ref3.label,
108
+ children = _ref3.children,
109
+ value = _ref3.value;
110
+
111
+ return React.createElement(
112
+ Collapse,
113
+ { key: id, level: 0, label: label, isOpen: depthLevel >= 0 },
114
+ value && React.createElement(
115
+ Typography,
116
+ { className: classes.spacingValue, variant: 'body2' },
117
+ value
118
+ ),
119
+ children && R.map(function (_ref4) {
120
+ var id = _ref4.id,
121
+ label = _ref4.label,
122
+ value = _ref4.value;
123
+
124
+ return React.createElement(
125
+ Collapse,
126
+ {
127
+ key: id,
128
+ level: 1,
129
+ variant: VARIANT_BOLD,
130
+ label: label,
131
+ isOpen: depthLevel >= 1
132
+ },
133
+ React.createElement(
134
+ Typography,
135
+ { variant: 'body2' },
136
+ value
137
+ )
138
+ );
139
+ }, children)
140
+ );
141
+ }, children)
142
+ );
143
+ }, data)
144
+ );
145
+ };
146
+
147
+ CollapsibleTree.propTypes = process.env.NODE_ENV !== "production" ? {
148
+ data: PropTypes.arrayOf(PropTypes.shape({
149
+ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
150
+ label: PropTypes.string,
151
+ children: PropTypes.arrayOf(PropTypes.shape({
152
+ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
153
+ label: PropTypes.string,
154
+ children: PropTypes.arrayOf(PropTypes.shape({
155
+ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
156
+ label: PropTypes.string,
157
+ value: PropTypes.string
158
+ }))
159
+ }))
160
+ })),
161
+ defaultDepthLevel: PropTypes.number,
162
+ isLoading: PropTypes.bool,
163
+ children: PropTypes.node,
164
+ labels: PropTypes.shape({
165
+ collapseAll: PropTypes.string,
166
+ expandAll: PropTypes.string
167
+ }),
168
+ testId: PropTypes.string
169
+ } : {};
170
+
171
+ export default CollapsibleTree;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * CollapsibleTree is a component that show you a tree structure with a button to expand/collapse each node.
3
+ * defaultDepthLevel is the maximum level that will be open by "collapse all" button value could be 0|1. set to 1 by default.
4
+ *
5
+ * @memberOf VISIONS
6
+ * @name CollapsibleTree
7
+ * @tag component
8
+ * @api public
9
+ * @props
10
+ * CollapsibleTree.propTypes = {
11
+ * data: PropTypes.arrayOf(PropTypes.shape({
12
+ * id: PropTypes.string.isRequired,
13
+ * label: PropTypes.string,
14
+ * children: PropTypes.arrayOf(PropTypes.shape({
15
+ * id: PropTypes.string.isRequired,
16
+ * label: PropTypes.string,
17
+ * children: PropTypes.arrayOf(PropTypes.shape({
18
+ * id: PropTypes.string.isRequired,
19
+ * label: PropTypes.string,
20
+ * value: PropTypes.string,
21
+ * })),
22
+ * }))
23
+ * })),
24
+ * defaultDepthLevel: PropTypes.number,
25
+ * testId: PropTypes.string,
26
+ *};
27
+ * @theme
28
+ * {
29
+ * palette: {
30
+ * primary: {
31
+ * main: // color label button
32
+ * },
33
+ * }
34
+ * mixins: {
35
+ * CollapsibleTree: {
36
+ * title: {
37
+ * // font, color, of titles
38
+ * },
39
+ * }
40
+ * @demoReady
41
+ *
42
+ */
43
+
44
+ export { default } from './CollapsibleTree';
@@ -12,7 +12,7 @@ import IconButton from '@material-ui/core/IconButton';
12
12
  import Done from '@material-ui/icons/Done';
13
13
  import RotateLeftIcon from '@material-ui/icons/RotateLeft';
14
14
 
15
- var useStyles = makeStyles(function (theme) {
15
+ var useStyles = makeStyles(function () {
16
16
  return {
17
17
  visibility: {
18
18
  visibility: 'hidden'
@@ -15,6 +15,7 @@ import Flags from './Flags';
15
15
  import TooltipHeader from './TooltipHeader';
16
16
  import { getReducedContent } from './utils';
17
17
  import { Tooltip, Warning as WarningIcon } from '../';
18
+ import InfoIcon from '../InfoIcon/InfoIcon';
18
19
 
19
20
  var useStyles = makeStyles(function (theme) {
20
21
  return {
@@ -97,13 +98,33 @@ var useStyles = makeStyles(function (theme) {
97
98
  };
98
99
  });
99
100
 
100
- var DataHeader = function DataHeader(_ref4) {
101
- var children = _ref4.children,
102
- title = _ref4.title,
103
- _ref4$subtitle = _ref4.subtitle,
104
- subtitle = _ref4$subtitle === undefined ? [] : _ref4$subtitle,
105
- uprs = _ref4.uprs,
106
- disclaimer = _ref4.disclaimer;
101
+ var SideIcon = function SideIcon(_ref4) {
102
+ var sideProps = _ref4.sideProps,
103
+ sideToggle = _ref4.sideToggle;
104
+
105
+ if (R.isNil(sideProps) || !R.is(Function, sideToggle)) {
106
+ return null;
107
+ }
108
+ var isSelected = R.propOr(false, 'isSelected', sideProps);
109
+ return React.createElement(InfoIcon, { onClick: function onClick() {
110
+ return sideToggle(sideProps);
111
+ }, isSelected: isSelected });
112
+ };
113
+
114
+ SideIcon.propTypes = process.env.NODE_ENV !== "production" ? {
115
+ sideProps: PropTypes.object,
116
+ sideToggle: PropTypes.func
117
+ } : {};
118
+
119
+ var DataHeader = function DataHeader(_ref5) {
120
+ var children = _ref5.children,
121
+ title = _ref5.title,
122
+ _ref5$subtitle = _ref5.subtitle,
123
+ subtitle = _ref5$subtitle === undefined ? [] : _ref5$subtitle,
124
+ uprs = _ref5.uprs,
125
+ disclaimer = _ref5.disclaimer,
126
+ sideProps = _ref5.sideProps,
127
+ sideToggle = _ref5.sideToggle;
107
128
 
108
129
  var target = React.useRef(null);
109
130
 
@@ -186,6 +207,7 @@ var DataHeader = function DataHeader(_ref4) {
186
207
  React.createElement(
187
208
  'div',
188
209
  { className: classes.children },
210
+ React.createElement(SideIcon, { sideProps: sideProps, sideToggle: sideToggle }),
189
211
  R.not(R.isEmpty(reducedContent)) && React.createElement(
190
212
  TooltipHeader,
191
213
  { classes: classes, content: reducedContent },
@@ -222,6 +244,8 @@ DataHeader.propTypes = process.env.NODE_ENV !== "production" ? {
222
244
  header: PropTypes.string,
223
245
  label: PropTypes.string
224
246
  }),
247
+ sideProps: PropTypes.object,
248
+ sideToggle: PropTypes.func,
225
249
  disclaimer: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
226
250
  children: PropTypes.node
227
251
  } : {};
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { makeStyles } from '@material-ui/core/styles';
4
+ import MuiInfoIcon from '@material-ui/icons//Info';
5
+ import IconButton from '@material-ui/core/IconButton';
6
+
7
+ var useStyles = makeStyles(function (theme) {
8
+ return {
9
+ icon: {
10
+ color: function color(_ref) {
11
+ var isSelected = _ref.isSelected;
12
+ return isSelected ? theme.palette.highlight.hl1 : theme.palette.primary.main;
13
+ },
14
+ padding: 0
15
+ }
16
+ };
17
+ });
18
+
19
+ var InfoIcon = function InfoIcon(_ref2) {
20
+ var onClick = _ref2.onClick,
21
+ _ref2$isSelected = _ref2.isSelected,
22
+ isSelected = _ref2$isSelected === undefined ? false : _ref2$isSelected;
23
+
24
+ var classes = useStyles({ isSelected: isSelected });
25
+ return React.createElement(
26
+ IconButton,
27
+ { size: 'small', className: classes.icon, onClick: onClick, 'data-testid': 'ref-md-info' },
28
+ React.createElement(MuiInfoIcon, { fontSize: 'small' })
29
+ );
30
+ };
31
+
32
+ InfoIcon.propTypes = process.env.NODE_ENV !== "production" ? {
33
+ onClick: PropTypes.func.isRequired,
34
+ isSelected: PropTypes.bool
35
+ } : {};
36
+
37
+ export default InfoIcon;
@@ -68,7 +68,11 @@ var TableHtml5 = function TableHtml5(_ref) {
68
68
  sectionsData = _ref$sectionsData === undefined ? [] : _ref$sectionsData,
69
69
  cellHandler = _ref.cellHandler,
70
70
  activeCellIds = _ref.activeCellIds,
71
- activeCellHandler = _ref.activeCellHandler;
71
+ activeCellHandler = _ref.activeCellHandler,
72
+ sideToggle = _ref.sideToggle,
73
+ selectedSideCoord = _ref.selectedSideCoord,
74
+ _ref$testId = _ref.testId,
75
+ testId = _ref$testId === undefined ? 'vis-table' : _ref$testId;
72
76
 
73
77
  var classes = useStyles();
74
78
 
@@ -112,7 +116,13 @@ var TableHtml5 = function TableHtml5(_ref) {
112
116
  var nbColumnsByRows = R.map(R.length)(valuesHeaderData);
113
117
  return React.createElement(
114
118
  Table,
115
- { className: classes.table, 'aria-label': 'table', size: 'small', style: { padding: '0px 0px' } },
119
+ {
120
+ className: classes.table,
121
+ 'aria-label': 'table',
122
+ size: 'small',
123
+ style: { padding: '0px 0px' },
124
+ 'data-testid': testId
125
+ },
116
126
  React.createElement(
117
127
  'thead',
118
128
  { ref: headerRef, className: classes.stickyHeader },
@@ -126,6 +136,8 @@ var TableHtml5 = function TableHtml5(_ref) {
126
136
  headerData: headerData,
127
137
  xLayoutData: xLayoutData,
128
138
  activeCellIds: activeCellIds,
139
+ sideToggle: sideToggle,
140
+ selectedSideCoord: selectedSideCoord,
129
141
  ref: subHeadCellsRef,
130
142
  subHeadCellsWidth: subHeadCellsWidth
131
143
  })
@@ -143,6 +155,8 @@ var TableHtml5 = function TableHtml5(_ref) {
143
155
  cellHandler: cellHandler,
144
156
  activeCellIds: activeCellIds,
145
157
  activeCellHandler: activeCellHandler,
158
+ sideToggle: sideToggle,
159
+ selectedSideCoord: selectedSideCoord,
146
160
  subHeadCellsWidth: subHeadCellsWidth
147
161
  });
148
162
  }, sectionsData)
@@ -155,7 +169,10 @@ TableHtml5.propTypes = process.env.NODE_ENV !== "production" ? {
155
169
  sectionsData: PropTypes.array,
156
170
  cellHandler: PropTypes.func,
157
171
  activeCellHandler: PropTypes.func,
158
- activeCellIds: PropTypes.object
172
+ activeCellIds: PropTypes.object,
173
+ sideToggle: PropTypes.func,
174
+ selectedSideCoord: PropTypes.object,
175
+ testId: PropTypes.string
159
176
  } : {};
160
177
 
161
178
  export default TableHtml5;
@@ -6,6 +6,7 @@ import { makeStyles } from '@material-ui/core/styles';
6
6
  import TableCell from '@material-ui/core/TableCell';
7
7
  import Typography from '@material-ui/core/Typography';
8
8
  import Link from '@material-ui/core/Link';
9
+ import SideIcon from './sideIcon';
9
10
  import Flags from './flags';
10
11
 
11
12
  var useStyles = makeStyles(function (theme) {
@@ -47,7 +48,9 @@ var Cell = function Cell(_ref) {
47
48
  cellHandler = _ref.cellHandler,
48
49
  activeCellHandler = _ref.activeCellHandler,
49
50
  isActive = _ref.isActive,
50
- isHighlight = _ref.isHighlight;
51
+ isHighlight = _ref.isHighlight,
52
+ sideProps = _ref.sideProps,
53
+ sideToggle = _ref.sideToggle;
51
54
 
52
55
  var classes = useStyles();
53
56
  var hasFlag = R.not(R.isEmpty(flags));
@@ -80,6 +83,7 @@ var Cell = function Cell(_ref) {
80
83
  React.createElement(
81
84
  Typography,
82
85
  { variant: 'body1', tabIndex: 0, noWrap: hasFlag },
86
+ React.createElement(SideIcon, { sideProps: sideProps, sideToggle: sideToggle }),
83
87
  hasFlag && React.createElement(Flags, { flags: flags }),
84
88
  uiValue
85
89
  )
@@ -96,7 +100,9 @@ Cell.propTypes = process.env.NODE_ENV !== "production" ? {
96
100
  cellHandler: PropTypes.func,
97
101
  isActive: PropTypes.bool,
98
102
  isHighlight: PropTypes.bool,
99
- activeCellHandler: PropTypes.func
103
+ activeCellHandler: PropTypes.func,
104
+ sideProps: PropTypes.object,
105
+ sideToggle: PropTypes.func
100
106
  } : {};
101
107
 
102
108
  export default Cell;
@@ -25,6 +25,7 @@ var useStyles = makeStyles(function (theme) {
25
25
  borderColor: 'inherit',
26
26
  margin: theme.spacing(0, 0.5),
27
27
  whiteSpace: 'nowrap',
28
+ display: 'inline',
28
29
  fontWeight: 'bold',
29
30
  fontStyle: 'normal',
30
31
  textTransform: 'uppercase'
@@ -87,6 +88,7 @@ var Flags = function Flags(_ref) {
87
88
  hasUncoded && React.createElement(
88
89
  Fragment,
89
90
  null,
91
+ '\xA0',
90
92
  React.createElement(Asterisk, { className: classes.svg, style: { fontSize: 11 } }),
91
93
  React.createElement(
92
94
  Typography,
@@ -13,6 +13,7 @@
13
13
  * cellHandler: PropTypes.func,
14
14
  * activeCellHandler: PropTypes.func,
15
15
  * activeCellIds: PropTypes.string,
16
+ * selectedSideCoord: PropTypes.object,
16
17
  * };
17
18
  * @theme
18
19
  * {
@@ -1,6 +1,6 @@
1
1
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
2
 
3
- import React from 'react';
3
+ import React, { Fragment } from 'react';
4
4
  import * as R from 'ramda';
5
5
  import PropTypes from 'prop-types';
6
6
  import cx from 'classnames';
@@ -11,6 +11,7 @@ import TableCell from '@material-ui/core/TableCell';
11
11
  import TableRow from '@material-ui/core/TableRow';
12
12
  import SectionHeader from './sectionHeader';
13
13
  import Cell from './cell';
14
+ import SideIcon from './sideIcon';
14
15
  import { getLight, getIsRtl } from '../utils';
15
16
  import Flags from './flags';
16
17
 
@@ -70,6 +71,8 @@ var Section = function Section(_ref) {
70
71
  headerHeight = _ref.headerHeight,
71
72
  sectionIndex = _ref.sectionIndex,
72
73
  nbColumnsByRows = _ref.nbColumnsByRows,
74
+ sideToggle = _ref.sideToggle,
75
+ selectedSideCoord = _ref.selectedSideCoord,
73
76
  subHeadCellsWidth = _ref.subHeadCellsWidth;
74
77
 
75
78
  var classes = useStyles();
@@ -87,7 +90,9 @@ var Section = function Section(_ref) {
87
90
  section: section,
88
91
  currentSection: currentSection,
89
92
  xLayoutDataLength: xLayoutDataLength,
90
- headerHeight: headerHeight
93
+ headerHeight: headerHeight,
94
+ sideToggle: sideToggle,
95
+ selectedSideCoord: selectedSideCoord
91
96
  }),
92
97
  R.map(function (sectionbody) {
93
98
  var _cx2;
@@ -148,6 +153,11 @@ var Section = function Section(_ref) {
148
153
  React.createElement(
149
154
  'div',
150
155
  { className: classes.flagContainer },
156
+ React.createElement(SideIcon, {
157
+ sideProps: R.prop('sideProps', sectionbody),
158
+ sideToggle: sideToggle,
159
+ selectedSideCoord: selectedSideCoord
160
+ }),
151
161
  React.createElement(Flags, { flags: R.prop('flags', sectionbody) })
152
162
  )
153
163
  ),
@@ -164,6 +174,7 @@ var Section = function Section(_ref) {
164
174
  }, R.pathOr({ value: '..' }, [item.key, currentSection, sectionbody.key, 0], cells), {
165
175
  headers: rowIds + ' ' + columnIds + ' ' + currentSection,
166
176
  cellHandler: cellHandler,
177
+ sideToggle: sideToggle,
167
178
  isActive: isActive,
168
179
  isHighlight: R.any(R.identity)([R.prop(rowId)(activeCellIds), R.prop(columnIndex)(activeCellIds)]),
169
180
  activeCellHandler: R.is(Function)(activeCellHandler) ? function () {
@@ -191,6 +202,8 @@ Section.propTypes = process.env.NODE_ENV !== "production" ? {
191
202
  headerNumberRows: PropTypes.number,
192
203
  nbColumnsByRows: PropTypes.array,
193
204
  maxColumns: PropTypes.number,
205
+ sideToggle: PropTypes.func,
206
+ selectedSideCoord: PropTypes.object,
194
207
  subHeadCellsWidth: PropTypes.arrayOf(PropTypes.number)
195
208
  } : {};
196
209
 
@@ -8,6 +8,7 @@ import { makeStyles } from '@material-ui/core/styles';
8
8
  import Lens from '@material-ui/icons/Lens';
9
9
  import TableCell from '@material-ui/core/TableCell';
10
10
  import TableRow from '@material-ui/core/TableRow';
11
+ import SideIcon from './sideIcon';
11
12
  import Flags from './flags';
12
13
  import { getDark } from '../utils';
13
14
 
@@ -41,9 +42,6 @@ var useStyles = makeStyles(function (theme) {
41
42
  containerTextSection: {
42
43
  display: 'flex',
43
44
  alignItems: 'center'
44
- },
45
- flag: {
46
- height: 0
47
45
  }
48
46
  };
49
47
  });
@@ -54,7 +52,9 @@ var SectionHeader = function SectionHeader(_ref) {
54
52
  section = _ref.section,
55
53
  currentSection = _ref.currentSection,
56
54
  xLayoutDataLength = _ref.xLayoutDataLength,
57
- headerHeight = _ref.headerHeight;
55
+ headerHeight = _ref.headerHeight,
56
+ sideToggle = _ref.sideToggle,
57
+ selectedSideCoord = _ref.selectedSideCoord;
58
58
 
59
59
  var classes = useStyles();
60
60
  if (R.compose(R.anyPass([R.isNil, R.isEmpty]), R.path([0, 'data']))(section)) return null;
@@ -108,7 +108,12 @@ var SectionHeader = function SectionHeader(_ref) {
108
108
  ),
109
109
  React.createElement(
110
110
  'div',
111
- { className: classes.flag },
111
+ null,
112
+ React.createElement(SideIcon, {
113
+ sideProps: R.path([0, 'sideProps'], section),
114
+ sideToggle: sideToggle,
115
+ selectedSideCoord: selectedSideCoord
116
+ }),
112
117
  React.createElement(Flags, { flags: R.path([0, 'flags'], section) })
113
118
  )
114
119
  )
@@ -121,7 +126,9 @@ SectionHeader.propTypes = process.env.NODE_ENV !== "production" ? {
121
126
  section: PropTypes.array,
122
127
  currentSection: PropTypes.string,
123
128
  xLayoutDataLength: PropTypes.number,
124
- headerHeight: PropTypes.number
129
+ headerHeight: PropTypes.number,
130
+ sideToggle: PropTypes.func,
131
+ selectedSideCoord: PropTypes.object
125
132
  } : {};
126
133
 
127
134
  export default SectionHeader;