@sis-cc/dotstatsuite-visions 6.6.0 → 6.6.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.
Files changed (293) hide show
  1. package/es/Alert/Alert.js +135 -66
  2. package/es/Alert/index.js +1 -0
  3. package/es/ApiQueries/ApiQueries.js +79 -45
  4. package/es/ApiQueries/Query.js +105 -65
  5. package/es/ApiQueries/index.js +1 -0
  6. package/es/AuthDialog/index.js +103 -62
  7. package/es/Breadcrumbs/Breadcrumbs.js +38 -21
  8. package/es/Breadcrumbs/index.js +1 -0
  9. package/es/Button/Button.js +28 -11
  10. package/es/Button/index.js +1 -0
  11. package/es/ChartsConfig/Axis.js +76 -72
  12. package/es/ChartsConfig/ButtonGroup.js +51 -29
  13. package/es/ChartsConfig/ChartsConfig.js +187 -87
  14. package/es/ChartsConfig/ContainerTitle.js +36 -15
  15. package/es/ChartsConfig/Focus.js +48 -37
  16. package/es/ChartsConfig/Frequency.js +36 -24
  17. package/es/ChartsConfig/Series.js +43 -28
  18. package/es/ChartsConfig/Size.js +50 -36
  19. package/es/ChartsConfig/index.js +1 -0
  20. package/es/ChartsConfig/styles.js +4 -4
  21. package/es/ChartsConfig/utils.js +5 -1
  22. package/es/Chips/Chips.js +154 -99
  23. package/es/Chips/index.js +1 -0
  24. package/es/CollapseButtons/CollapseButtons.js +101 -61
  25. package/es/CollapseButtons/Item.js +70 -45
  26. package/es/CollapseButtons/Paper.js +21 -7
  27. package/es/CollapseButtons/index.js +1 -0
  28. package/es/DataEdit/DataEdit.js +124 -67
  29. package/es/DataEdit/Input.js +58 -27
  30. package/es/DataEdit/index.js +1 -0
  31. package/es/DataFooter/DataFooter.js +115 -68
  32. package/es/DataFooter/index.js +1 -0
  33. package/es/DataHeader/DataHeader.js +113 -75
  34. package/es/DataHeader/Flags.js +21 -8
  35. package/es/DataHeader/Title.js +15 -2
  36. package/es/DataHeader/TooltipHeader.js +63 -33
  37. package/es/DataHeader/index.js +1 -0
  38. package/es/DataHeader/utils.js +8 -8
  39. package/es/Dataflow/Dataflow.js +226 -132
  40. package/es/Dataflow/index.js +1 -0
  41. package/es/ExpansionPanel/ExpansionPanel.js +79 -42
  42. package/es/ExpansionPanel/index.js +1 -0
  43. package/es/ExpansionPanel/styles.js +5 -3
  44. package/es/Icons/AccessibilityFilled.js +8 -6
  45. package/es/Icons/AccessibilityOutlined.js +8 -6
  46. package/es/Icons/AccountFilled.js +8 -6
  47. package/es/Icons/AccountOutlined.js +8 -6
  48. package/es/Icons/Api.js +8 -6
  49. package/es/Icons/Asterisk.js +8 -6
  50. package/es/Icons/Bar.js +8 -6
  51. package/es/Icons/CopyContent.js +8 -6
  52. package/es/Icons/Cross.js +8 -6
  53. package/es/Icons/HSymbol.js +8 -6
  54. package/es/Icons/Row.js +8 -6
  55. package/es/Icons/Scatter.js +8 -6
  56. package/es/Icons/StackedBar.js +8 -6
  57. package/es/Icons/StackedRow.js +8 -6
  58. package/es/Icons/Timeline.js +8 -6
  59. package/es/Icons/VSymbol.js +8 -6
  60. package/es/Icons/Warning.js +14 -11
  61. package/es/Icons/index.js +1 -0
  62. package/es/Input/Input.js +56 -26
  63. package/es/Input/index.js +1 -0
  64. package/es/Input/with-input.js +25 -30
  65. package/es/InputNumber/InputNumber.js +51 -31
  66. package/es/InputNumber/index.js +1 -0
  67. package/es/LabelDivider/LabelDivider.js +18 -7
  68. package/es/LabelDivider/index.js +1 -0
  69. package/es/Loading/Loading.js +18 -9
  70. package/es/Loading/index.js +1 -0
  71. package/es/Logo/Logo.js +17 -11
  72. package/es/Logo/index.js +1 -0
  73. package/es/NoData/NoData.js +25 -17
  74. package/es/NoData/index.js +1 -0
  75. package/es/Pagination/Pagination.js +114 -70
  76. package/es/Pagination/index.js +1 -0
  77. package/es/PeriodPicker/PeriodPicker.js +124 -101
  78. package/es/PeriodPicker/constants.js +13 -78
  79. package/es/PeriodPicker/index.js +1 -0
  80. package/es/PeriodPicker/lib.js +23 -37
  81. package/es/PeriodPicker/styles.js +1 -0
  82. package/es/ScopeList/Header.js +60 -41
  83. package/es/ScopeList/Item.js +144 -98
  84. package/es/ScopeList/ScopeList.js +184 -132
  85. package/es/ScopeList/Selection.js +93 -51
  86. package/es/ScopeList/index.js +1 -0
  87. package/es/ScopeList/styles.js +3 -2
  88. package/es/ScopeList/with-scope-list.js +88 -151
  89. package/es/Select/Select.js +60 -44
  90. package/es/Select/index.js +1 -0
  91. package/es/Share/Form.js +88 -58
  92. package/es/Share/Mode.js +46 -30
  93. package/es/Share/Share.js +64 -41
  94. package/es/Share/index.js +1 -0
  95. package/es/SisccFooter/SisccFooter.js +36 -29
  96. package/es/SisccFooter/index.js +1 -0
  97. package/es/Spotlight/Fields.js +71 -37
  98. package/es/Spotlight/Spotlight.js +92 -51
  99. package/es/Spotlight/index.js +1 -0
  100. package/es/Spotlight/useSpotlight.js +13 -33
  101. package/es/Spotlight/useStyles.js +4 -2
  102. package/es/Table/Table.js +71 -50
  103. package/es/Table/header.js +50 -36
  104. package/es/Table/index.js +1 -0
  105. package/es/Table/itemCell.js +25 -13
  106. package/es/Table/row-header.js +50 -31
  107. package/es/Table/section-header.js +55 -30
  108. package/es/Table/section-rows.js +62 -38
  109. package/es/Table/styles.js +8 -2
  110. package/es/Table/tableCell.js +17 -7
  111. package/es/Table/tooltip.js +41 -21
  112. package/es/Table/useStyles.js +3 -2
  113. package/es/Table/valueCell.js +41 -26
  114. package/es/TableFooter/TableFooter.js +70 -42
  115. package/es/TableFooter/index.js +1 -0
  116. package/es/TableHeader/TableHeader.js +36 -18
  117. package/es/TableHeader/index.js +1 -0
  118. package/es/TableHtml5/TableHtml5.js +72 -60
  119. package/es/TableHtml5/cell.js +55 -35
  120. package/es/TableHtml5/flags.js +58 -29
  121. package/es/TableHtml5/header.js +67 -48
  122. package/es/TableHtml5/index.js +1 -0
  123. package/es/TableHtml5/section.js +121 -83
  124. package/es/TableHtml5/sectionHeader.js +72 -45
  125. package/es/TableHtml5/subHeader.js +63 -44
  126. package/es/TableLayout/Box.js +66 -33
  127. package/es/TableLayout/DnDItem.js +68 -37
  128. package/es/TableLayout/TableLayout.js +177 -105
  129. package/es/TableLayout/constants.js +2 -0
  130. package/es/TableLayout/index.js +1 -0
  131. package/es/TableLayout/lib.js +3 -1
  132. package/es/TablePreview/TablePreview.js +176 -99
  133. package/es/TablePreview/index.js +1 -0
  134. package/es/TablePreview/lib.js +4 -5
  135. package/es/TablePreview/styles.js +1 -0
  136. package/es/Tag/Tag.js +21 -5
  137. package/es/Tag/index.js +1 -0
  138. package/es/ToggleButton/ToggleButton.js +29 -17
  139. package/es/ToggleButton/index.js +1 -0
  140. package/es/Tooltip/Tooltip.js +32 -20
  141. package/es/Tooltip/index.js +1 -0
  142. package/es/VerticalButton/VerticalButton.js +22 -17
  143. package/es/VerticalButton/index.js +1 -0
  144. package/es/index.js +4 -2
  145. package/es/theme.js +14 -22
  146. package/es/utils.js +14 -16
  147. package/lib/Alert/Alert.js +168 -87
  148. package/lib/Alert/index.js +12 -7
  149. package/lib/ApiQueries/ApiQueries.js +105 -61
  150. package/lib/ApiQueries/Query.js +132 -85
  151. package/lib/ApiQueries/index.js +12 -7
  152. package/lib/AuthDialog/index.js +137 -82
  153. package/lib/Breadcrumbs/Breadcrumbs.js +68 -39
  154. package/lib/Breadcrumbs/index.js +12 -7
  155. package/lib/Button/Button.js +47 -28
  156. package/lib/Button/index.js +12 -7
  157. package/lib/ChartsConfig/Axis.js +100 -88
  158. package/lib/ChartsConfig/ButtonGroup.js +74 -43
  159. package/lib/ChartsConfig/ChartsConfig.js +236 -113
  160. package/lib/ChartsConfig/ContainerTitle.js +59 -30
  161. package/lib/ChartsConfig/Focus.js +71 -53
  162. package/lib/ChartsConfig/Frequency.js +59 -39
  163. package/lib/ChartsConfig/Series.js +70 -45
  164. package/lib/ChartsConfig/Size.js +77 -53
  165. package/lib/ChartsConfig/index.js +12 -7
  166. package/lib/ChartsConfig/styles.js +11 -16
  167. package/lib/ChartsConfig/utils.js +13 -14
  168. package/lib/Chips/Chips.js +192 -122
  169. package/lib/Chips/index.js +12 -7
  170. package/lib/CollapseButtons/CollapseButtons.js +134 -84
  171. package/lib/CollapseButtons/Item.js +98 -64
  172. package/lib/CollapseButtons/Paper.js +41 -19
  173. package/lib/CollapseButtons/index.js +12 -7
  174. package/lib/DataEdit/DataEdit.js +156 -88
  175. package/lib/DataEdit/Input.js +82 -42
  176. package/lib/DataEdit/index.js +12 -7
  177. package/lib/DataFooter/DataFooter.js +144 -88
  178. package/lib/DataFooter/index.js +12 -7
  179. package/lib/DataHeader/DataHeader.js +158 -106
  180. package/lib/DataHeader/Flags.js +34 -18
  181. package/lib/DataHeader/Title.js +27 -11
  182. package/lib/DataHeader/TooltipHeader.js +79 -48
  183. package/lib/DataHeader/index.js +12 -7
  184. package/lib/DataHeader/utils.js +10 -16
  185. package/lib/Dataflow/Dataflow.js +277 -159
  186. package/lib/Dataflow/index.js +12 -7
  187. package/lib/ExpansionPanel/ExpansionPanel.js +116 -63
  188. package/lib/ExpansionPanel/index.js +12 -7
  189. package/lib/ExpansionPanel/styles.js +12 -15
  190. package/lib/Icons/AccessibilityFilled.js +17 -15
  191. package/lib/Icons/AccessibilityOutlined.js +17 -15
  192. package/lib/Icons/AccountFilled.js +17 -15
  193. package/lib/Icons/AccountOutlined.js +17 -15
  194. package/lib/Icons/Api.js +17 -15
  195. package/lib/Icons/Asterisk.js +17 -15
  196. package/lib/Icons/Bar.js +17 -15
  197. package/lib/Icons/CopyContent.js +17 -15
  198. package/lib/Icons/Cross.js +17 -15
  199. package/lib/Icons/HSymbol.js +17 -15
  200. package/lib/Icons/Row.js +17 -15
  201. package/lib/Icons/Scatter.js +17 -15
  202. package/lib/Icons/StackedBar.js +17 -15
  203. package/lib/Icons/StackedRow.js +17 -15
  204. package/lib/Icons/Timeline.js +17 -15
  205. package/lib/Icons/VSymbol.js +17 -15
  206. package/lib/Icons/Warning.js +31 -27
  207. package/lib/Icons/index.js +152 -68
  208. package/lib/Input/Input.js +85 -47
  209. package/lib/Input/index.js +12 -7
  210. package/lib/Input/with-input.js +35 -38
  211. package/lib/InputNumber/InputNumber.js +80 -50
  212. package/lib/InputNumber/index.js +12 -7
  213. package/lib/LabelDivider/LabelDivider.js +37 -23
  214. package/lib/LabelDivider/index.js +12 -7
  215. package/lib/Loading/Loading.js +35 -20
  216. package/lib/Loading/index.js +12 -7
  217. package/lib/Logo/Logo.js +28 -20
  218. package/lib/Logo/index.js +12 -7
  219. package/lib/NoData/NoData.js +42 -28
  220. package/lib/NoData/index.js +12 -7
  221. package/lib/Pagination/Pagination.js +150 -91
  222. package/lib/Pagination/index.js +12 -7
  223. package/lib/PeriodPicker/PeriodPicker.js +150 -121
  224. package/lib/PeriodPicker/constants.js +37 -126
  225. package/lib/PeriodPicker/index.js +12 -7
  226. package/lib/PeriodPicker/lib.js +61 -99
  227. package/lib/PeriodPicker/styles.js +4 -7
  228. package/lib/ScopeList/Header.js +88 -58
  229. package/lib/ScopeList/Item.js +177 -116
  230. package/lib/ScopeList/ScopeList.js +234 -160
  231. package/lib/ScopeList/Selection.js +131 -70
  232. package/lib/ScopeList/index.js +12 -7
  233. package/lib/ScopeList/styles.js +9 -10
  234. package/lib/ScopeList/with-scope-list.js +108 -199
  235. package/lib/Select/Select.js +80 -59
  236. package/lib/Select/index.js +12 -7
  237. package/lib/Share/Form.js +119 -77
  238. package/lib/Share/Mode.js +78 -49
  239. package/lib/Share/Share.js +91 -59
  240. package/lib/Share/index.js +12 -7
  241. package/lib/SisccFooter/SisccFooter.js +63 -44
  242. package/lib/SisccFooter/index.js +12 -7
  243. package/lib/Spotlight/Fields.js +100 -54
  244. package/lib/Spotlight/Spotlight.js +136 -75
  245. package/lib/Spotlight/index.js +12 -7
  246. package/lib/Spotlight/useSpotlight.js +20 -44
  247. package/lib/Spotlight/useStyles.js +12 -15
  248. package/lib/Table/Table.js +102 -69
  249. package/lib/Table/header.js +70 -51
  250. package/lib/Table/index.js +12 -7
  251. package/lib/Table/itemCell.js +41 -25
  252. package/lib/Table/row-header.js +75 -49
  253. package/lib/Table/section-header.js +82 -50
  254. package/lib/Table/section-rows.js +94 -60
  255. package/lib/Table/styles.js +25 -23
  256. package/lib/Table/tableCell.js +37 -19
  257. package/lib/Table/tooltip.js +54 -36
  258. package/lib/Table/useStyles.js +8 -11
  259. package/lib/Table/valueCell.js +59 -39
  260. package/lib/TableFooter/TableFooter.js +93 -57
  261. package/lib/TableFooter/index.js +12 -7
  262. package/lib/TableHeader/TableHeader.js +56 -32
  263. package/lib/TableHeader/index.js +12 -7
  264. package/lib/TableHtml5/TableHtml5.js +100 -78
  265. package/lib/TableHtml5/cell.js +84 -52
  266. package/lib/TableHtml5/flags.js +82 -48
  267. package/lib/TableHtml5/header.js +97 -66
  268. package/lib/TableHtml5/index.js +17 -8
  269. package/lib/TableHtml5/section.js +163 -108
  270. package/lib/TableHtml5/sectionHeader.js +102 -64
  271. package/lib/TableHtml5/subHeader.js +93 -64
  272. package/lib/TableLayout/Box.js +97 -54
  273. package/lib/TableLayout/DnDItem.js +98 -58
  274. package/lib/TableLayout/TableLayout.js +232 -140
  275. package/lib/TableLayout/constants.js +6 -8
  276. package/lib/TableLayout/index.js +12 -7
  277. package/lib/TableLayout/lib.js +9 -14
  278. package/lib/TablePreview/TablePreview.js +205 -118
  279. package/lib/TablePreview/index.js +12 -7
  280. package/lib/TablePreview/lib.js +19 -30
  281. package/lib/TablePreview/styles.js +6 -7
  282. package/lib/Tag/Tag.js +38 -19
  283. package/lib/Tag/index.js +12 -7
  284. package/lib/ToggleButton/ToggleButton.js +55 -33
  285. package/lib/ToggleButton/index.js +12 -7
  286. package/lib/Tooltip/Tooltip.js +50 -34
  287. package/lib/Tooltip/index.js +12 -7
  288. package/lib/VerticalButton/VerticalButton.js +46 -40
  289. package/lib/VerticalButton/index.js +12 -7
  290. package/lib/index.js +304 -137
  291. package/lib/theme.js +17 -31
  292. package/lib/utils.js +31 -46
  293. package/package.json +10 -2
@@ -1,31 +1,32 @@
1
1
  import React from 'react';
2
2
  import * as R from 'ramda';
3
+ import PropTypes from 'prop-types';
3
4
  import cx from 'classnames';
4
5
  import { makeStyles } from '@material-ui/core/styles';
5
6
  import TableCell from '@material-ui/core/TableCell';
6
7
  import Typography from '@material-ui/core/Typography';
7
8
  import Link from '@material-ui/core/Link';
8
9
  import Flags from './flags';
10
+
9
11
  var useStyles = makeStyles(function (theme) {
10
12
  return {
11
13
  cell: {
12
- borderBottom: "1px solid " + theme.palette.grey[500],
13
- borderRight: "1px solid " + theme.palette.grey[500],
14
- padding: theme.spacing(0.5) + "px " + theme.spacing(1) + "px",
14
+ borderBottom: '1px solid ' + theme.palette.grey[500],
15
+ borderRight: '1px solid ' + theme.palette.grey[500],
16
+ padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
15
17
  verticalAlign: 'baseline',
16
18
  color: theme.palette.grey['A700'],
17
19
  '&:hover': {
18
- boxShadow: "inset 0 0 0 2px " + theme.palette.primary.main
20
+ boxShadow: 'inset 0 0 0 2px ' + theme.palette.primary.main
19
21
  }
20
22
  },
21
23
  active: {
22
- boxShadow: "inset 0 0 0 2px " + theme.palette.primary.main
24
+ boxShadow: 'inset 0 0 0 2px ' + theme.palette.primary.main
23
25
  },
24
26
  highlight: theme.mixins.table.cellHighlight,
25
27
  oneCell: {
26
- border: "1px solid " + theme.palette.grey[500],
28
+ border: '1px solid ' + theme.palette.grey[500],
27
29
  display: 'block' // MUI TableCell is inline-block
28
-
29
30
  },
30
31
  link: {
31
32
  position: 'inherit',
@@ -42,41 +43,60 @@ var Cell = function Cell(_ref) {
42
43
  headers = _ref.headers,
43
44
  isOne = _ref.isOne,
44
45
  _ref$indexedDimValIds = _ref.indexedDimValIds,
45
- indexedDimValIds = _ref$indexedDimValIds === void 0 ? {} : _ref$indexedDimValIds,
46
+ indexedDimValIds = _ref$indexedDimValIds === undefined ? {} : _ref$indexedDimValIds,
46
47
  cellHandler = _ref.cellHandler,
47
48
  activeCellHandler = _ref.activeCellHandler,
48
49
  isActive = _ref.isActive,
49
50
  isHighlight = _ref.isHighlight;
51
+
50
52
  var classes = useStyles();
51
53
  var hasFlag = R.not(R.isEmpty(flags));
52
- var uiValue = R.is(Function, cellHandler) && !R.isEmpty(indexedDimValIds) ? /*#__PURE__*/React.createElement(Link, {
53
- component: "button",
54
- variant: "body1",
55
- color: "inherit",
56
- underline: "always",
57
- onClick: function onClick() {
58
- return cellHandler({
59
- indexedDimValIds: indexedDimValIds
60
- });
54
+ var uiValue = R.is(Function, cellHandler) && !R.isEmpty(indexedDimValIds) ? React.createElement(
55
+ Link,
56
+ {
57
+ component: 'button',
58
+ variant: 'body1',
59
+ color: 'inherit',
60
+ underline: 'always',
61
+ onClick: function onClick() {
62
+ return cellHandler({ indexedDimValIds: indexedDimValIds });
63
+ },
64
+ className: classes.link
61
65
  },
62
- className: classes.link
63
- }, value) : value;
64
- return /*#__PURE__*/React.createElement(TableCell, {
65
- component: isOne ? 'div' : undefined,
66
- className: cx(classes.cell, (_cx = {}, _cx[classes.oneCell] = isOne, _cx[classes.active] = isActive, _cx[classes.highlight] = isHighlight, _cx)),
67
- headers: headers,
68
- onClick: activeCellHandler
69
- }, /*#__PURE__*/React.createElement("div", {
70
- style: {
71
- textAlign: 'right'
72
- }
73
- }, /*#__PURE__*/React.createElement(Typography, {
74
- variant: "body1",
75
- tabIndex: 0,
76
- noWrap: hasFlag
77
- }, hasFlag && /*#__PURE__*/React.createElement(Flags, {
78
- flags: flags
79
- }), uiValue)));
66
+ value
67
+ ) : value;
68
+
69
+ return React.createElement(
70
+ TableCell,
71
+ {
72
+ component: isOne ? 'div' : undefined,
73
+ className: cx(classes.cell, (_cx = {}, _cx[classes.oneCell] = isOne, _cx[classes.active] = isActive, _cx[classes.highlight] = isHighlight, _cx)),
74
+ headers: headers,
75
+ onClick: activeCellHandler
76
+ },
77
+ React.createElement(
78
+ 'div',
79
+ { style: { textAlign: 'right' } },
80
+ React.createElement(
81
+ Typography,
82
+ { variant: 'body1', tabIndex: 0, noWrap: hasFlag },
83
+ hasFlag && React.createElement(Flags, { flags: flags }),
84
+ uiValue
85
+ )
86
+ )
87
+ );
80
88
  };
81
89
 
90
+ Cell.propTypes = process.env.NODE_ENV !== "production" ? {
91
+ flags: PropTypes.array,
92
+ isOne: PropTypes.bool,
93
+ value: PropTypes.string,
94
+ headers: PropTypes.string,
95
+ indexedDimValIds: PropTypes.object,
96
+ cellHandler: PropTypes.func,
97
+ isActive: PropTypes.bool,
98
+ isHighlight: PropTypes.bool,
99
+ activeCellHandler: PropTypes.func
100
+ } : {};
101
+
82
102
  export default Cell;
@@ -1,11 +1,14 @@
1
- import _extends from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends";
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, { Fragment } from 'react';
4
+ import PropTypes from 'prop-types';
3
5
  import * as R from 'ramda';
4
6
  import cx from 'classnames';
5
7
  import { makeStyles } from '@material-ui/core/styles';
6
8
  import Typography from '@material-ui/core/Typography';
7
9
  import Tooltip from '@material-ui/core/Tooltip';
8
10
  import { Asterisk } from '../';
11
+
9
12
  var useStyles = makeStyles(function (theme) {
10
13
  return {
11
14
  content: _extends({
@@ -39,42 +42,68 @@ var Flags = function Flags(_ref) {
39
42
  var _cx;
40
43
 
41
44
  var _ref$flags = _ref.flags,
42
- flags = _ref$flags === void 0 ? [] : _ref$flags,
45
+ flags = _ref$flags === undefined ? [] : _ref$flags,
43
46
  isHeader = _ref.isHeader;
47
+
44
48
  var classes = useStyles();
45
49
  var noFlags = R.isNil(flags) || R.isEmpty(flags);
46
50
  if (noFlags) return null;
51
+
47
52
  var hasUncoded = R.any(R.complement(R.has('code')), flags);
48
53
  var codedIcons = R.pipe(R.reduce(function (acc, flag) {
49
54
  return R.when(R.always(R.has('code', flag)), R.append(flag.code))(acc);
50
55
  }, []), R.join(','))(flags);
51
- var content = /*#__PURE__*/React.createElement("ul", {
52
- className: classes.content
53
- }, R.addIndex(R.map)(function (_ref2, index) {
54
- var label = _ref2.label;
55
- return /*#__PURE__*/React.createElement("li", {
56
- key: index
57
- }, label);
58
- }, flags));
59
- return /*#__PURE__*/React.createElement(Tooltip, {
60
- tabIndex: 0,
61
- "aria-label": R.pipe(R.pluck('label'), R.join(', '))(flags),
62
- "aria-hidden": false,
63
- title: content,
64
- placement: "top"
65
- }, /*#__PURE__*/React.createElement("span", {
66
- className: cx(classes.flags, (_cx = {}, _cx[classes.header] = isHeader, _cx))
67
- }, R.not(R.isEmpty(codedIcons)) && codedIcons, R.and(R.not(R.isEmpty(codedIcons)), hasUncoded) && /*#__PURE__*/React.createElement(React.Fragment, null, ","), hasUncoded && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Asterisk, {
68
- className: classes.svg,
69
- style: {
70
- fontSize: 11
71
- }
72
- }), /*#__PURE__*/React.createElement(Typography, {
73
- variant: "srOnly"
74
- }, "* " + R.addIndex(R.map)(function (_ref3) {
75
- var label = _ref3.label;
76
- return label;
77
- }, flags)))));
56
+
57
+ var content = React.createElement(
58
+ 'ul',
59
+ { className: classes.content },
60
+ R.addIndex(R.map)(function (_ref2, index) {
61
+ var label = _ref2.label;
62
+ return React.createElement(
63
+ 'li',
64
+ { key: index },
65
+ label
66
+ );
67
+ }, flags)
68
+ );
69
+ return React.createElement(
70
+ Tooltip,
71
+ {
72
+ tabIndex: 0,
73
+ 'aria-label': R.pipe(R.pluck('label'), R.join(', '))(flags),
74
+ 'aria-hidden': false,
75
+ title: content,
76
+ placement: 'top'
77
+ },
78
+ React.createElement(
79
+ 'span',
80
+ { className: cx(classes.flags, (_cx = {}, _cx[classes.header] = isHeader, _cx)) },
81
+ R.not(R.isEmpty(codedIcons)) && codedIcons,
82
+ R.and(R.not(R.isEmpty(codedIcons)), hasUncoded) && React.createElement(
83
+ React.Fragment,
84
+ null,
85
+ ','
86
+ ),
87
+ hasUncoded && React.createElement(
88
+ Fragment,
89
+ null,
90
+ React.createElement(Asterisk, { className: classes.svg, style: { fontSize: 11 } }),
91
+ React.createElement(
92
+ Typography,
93
+ { variant: 'srOnly' },
94
+ '* ' + R.addIndex(R.map)(function (_ref3) {
95
+ var label = _ref3.label;
96
+ return label;
97
+ }, flags)
98
+ )
99
+ )
100
+ )
101
+ );
78
102
  };
79
103
 
104
+ Flags.propTypes = process.env.NODE_ENV !== "production" ? {
105
+ flags: PropTypes.array,
106
+ isHeader: PropTypes.bool
107
+ } : {};
108
+
80
109
  export default Flags;
@@ -1,20 +1,22 @@
1
1
  import React from 'react';
2
2
  import * as R from 'ramda';
3
+ import PropTypes from 'prop-types';
3
4
  import cx from 'classnames';
4
5
  import Typography from '@material-ui/core/Typography';
5
6
  import { makeStyles } from '@material-ui/core/styles';
6
7
  import TableCell from '@material-ui/core/TableCell';
7
8
  import TableRow from '@material-ui/core/TableRow';
8
9
  import Flags from './flags';
10
+
9
11
  var useStyles = makeStyles(function (theme) {
10
12
  return {
11
13
  tableHeadCell: {
12
14
  color: theme.palette.getContrastText(theme.palette.primary.main),
13
15
  backgroundColor: theme.palette.primary.main,
14
16
  border: 'inherit',
15
- borderBottom: "1px solid " + theme.palette.grey[500],
16
- borderRight: "1px solid " + theme.palette.grey[500],
17
- padding: theme.spacing(0.5) + "px " + theme.spacing(1) + "px",
17
+ borderBottom: '1px solid ' + theme.palette.grey[500],
18
+ borderRight: '1px solid ' + theme.palette.grey[500],
19
+ padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
18
20
  verticalAlign: 'middle',
19
21
  '&:focus ': {
20
22
  opacity: '.85'
@@ -44,6 +46,7 @@ var useStyles = makeStyles(function (theme) {
44
46
  }
45
47
  };
46
48
  });
49
+
47
50
  var timesIndexed = R.addIndex(R.times);
48
51
  var mapIndexed = R.addIndex(R.map);
49
52
 
@@ -51,59 +54,75 @@ var Header = function Header(_ref) {
51
54
  var headerData = _ref.headerData,
52
55
  valuesHeaderData = _ref.valuesHeaderData,
53
56
  xLayoutDataLength = _ref.xLayoutDataLength;
57
+
54
58
  var classes = useStyles();
55
59
  if (R.compose(R.anyPass([R.isNil, R.isEmpty]), R.path([0, 'data']))(headerData)) return null;
56
60
  return timesIndexed(function (index) {
57
61
  var _cx;
58
62
 
59
63
  var flags = R.path([0, 'data', index, 'dimension', 'flags'], headerData);
60
- var id = "header_" + index;
61
- return /*#__PURE__*/React.createElement(TableRow, {
62
- key: id
63
- }, /*#__PURE__*/React.createElement(TableCell, {
64
- component: "th",
65
- padding: "none",
66
- align: "center",
67
- className: cx(classes.tableHeadCell, (_cx = {}, _cx[classes.topCell] = R.not(R.isEmpty(flags)), _cx)),
68
- colSpan: R.inc(xLayoutDataLength),
69
- id: id,
70
- tabIndex: 0,
71
- style: {
72
- position: 'sticky',
73
- left: 0,
74
- zIndex: 1
75
- }
76
- }, /*#__PURE__*/React.createElement("div", {
77
- className: classes.cellContentRight
78
- }, /*#__PURE__*/React.createElement(Typography, {
79
- variant: "body1",
80
- className: classes.cellLabelHeader
81
- }, R.path([0, 'data', index, 'dimension', 'label'], headerData), /*#__PURE__*/React.createElement(Flags, {
82
- flags: flags,
83
- isHeader: true
84
- })))), mapIndexed(function (headerItem, idx) {
85
- var _cx2;
64
+ var id = 'header_' + index;
65
+ return React.createElement(
66
+ TableRow,
67
+ { key: id },
68
+ React.createElement(
69
+ TableCell,
70
+ {
71
+ component: 'th',
72
+ padding: 'none',
73
+ align: 'center',
74
+ className: cx(classes.tableHeadCell, (_cx = {}, _cx[classes.topCell] = R.not(R.isEmpty(flags)), _cx)),
75
+ colSpan: R.inc(xLayoutDataLength),
76
+ id: id,
77
+ tabIndex: 0,
78
+ style: { position: 'sticky', left: 0, zIndex: 1 }
79
+ },
80
+ React.createElement(
81
+ 'div',
82
+ { className: classes.cellContentRight },
83
+ React.createElement(
84
+ Typography,
85
+ { variant: 'body1', className: classes.cellLabelHeader },
86
+ R.path([0, 'data', index, 'dimension', 'label'], headerData),
87
+ React.createElement(Flags, { flags: flags, isHeader: true })
88
+ )
89
+ )
90
+ ),
91
+ mapIndexed(function (headerItem, idx) {
92
+ var _cx2;
86
93
 
87
- var flags = R.prop('flags', headerItem);
88
- return /*#__PURE__*/React.createElement(TableCell, {
89
- key: R.prop('id', headerItem) + "-" + idx,
90
- component: "th",
91
- className: cx(classes.tableHeadCell, (_cx2 = {}, _cx2[classes.topCell] = R.not(R.isEmpty(flags)), _cx2)),
92
- id: idx + "_" + index,
93
- headers: "header_" + index,
94
- colSpan: R.prop('spanCount', headerItem),
95
- tabIndex: 0
96
- }, /*#__PURE__*/React.createElement("div", {
97
- className: classes.cellContentCenter
98
- }, /*#__PURE__*/React.createElement(Typography, {
99
- className: classes.stickyLabel,
100
- variant: "body1"
101
- }, R.prop('label', headerItem), /*#__PURE__*/React.createElement(Flags, {
102
- flags: flags,
103
- isHeader: true
104
- }))));
105
- }, R.nth(index, valuesHeaderData)));
94
+ var flags = R.prop('flags', headerItem);
95
+ return React.createElement(
96
+ TableCell,
97
+ {
98
+ key: R.prop('id', headerItem) + '-' + idx,
99
+ component: 'th',
100
+ className: cx(classes.tableHeadCell, (_cx2 = {}, _cx2[classes.topCell] = R.not(R.isEmpty(flags)), _cx2)),
101
+ id: idx + '_' + index,
102
+ headers: 'header_' + index,
103
+ colSpan: R.prop('spanCount', headerItem),
104
+ tabIndex: 0
105
+ },
106
+ React.createElement(
107
+ 'div',
108
+ { className: classes.cellContentCenter },
109
+ React.createElement(
110
+ Typography,
111
+ { className: classes.stickyLabel, variant: 'body1' },
112
+ R.prop('label', headerItem),
113
+ React.createElement(Flags, { flags: flags, isHeader: true })
114
+ )
115
+ )
116
+ );
117
+ }, R.nth(index, valuesHeaderData))
118
+ );
106
119
  }, R.compose(R.length, R.pathOr([], [0, 'data']))(headerData));
107
120
  };
108
121
 
122
+ Header.propTypes = process.env.NODE_ENV !== "production" ? {
123
+ headerData: PropTypes.array,
124
+ valuesHeaderData: PropTypes.array,
125
+ xLayoutDataLength: PropTypes.number
126
+ } : {};
127
+
109
128
  export default Header;
@@ -56,5 +56,6 @@
56
56
  * }
57
57
  * }
58
58
  */
59
+
59
60
  export { default } from './TableHtml5';
60
61
  export { default as Cell } from './cell';
@@ -1,6 +1,8 @@
1
- import _extends from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends";
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
4
  import * as R from 'ramda';
5
+ import PropTypes from 'prop-types';
4
6
  import cx from 'classnames';
5
7
  import Typography from '@material-ui/core/Typography';
6
8
  import { makeStyles } from '@material-ui/core/styles';
@@ -11,14 +13,15 @@ import SectionHeader from './sectionHeader';
11
13
  import Cell from './cell';
12
14
  import { getLight } from '../utils';
13
15
  import Flags from './flags';
16
+
14
17
  var useStyles = makeStyles(function (theme) {
15
18
  return {
16
19
  rowTitle: {
17
20
  backgroundColor: getLight(theme) || theme.palette.secondary.light,
18
21
  border: 'inherit',
19
- borderBottom: "1px solid " + theme.palette.grey[500],
20
- borderRight: "1px solid " + theme.palette.grey[500],
21
- padding: theme.spacing(0.5) + "px " + theme.spacing(1) + "px",
22
+ borderBottom: '1px solid ' + theme.palette.grey[500],
23
+ borderRight: '1px solid ' + theme.palette.grey[500],
24
+ padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px',
22
25
  color: theme.palette.grey['A700'],
23
26
  verticalAlign: 'middle'
24
27
  },
@@ -27,9 +30,9 @@ var useStyles = makeStyles(function (theme) {
27
30
  backgroundColor: theme.palette.grey[200],
28
31
  verticalAlign: 'top',
29
32
  border: 'inherit',
30
- borderBottom: "1px solid " + theme.palette.grey[500],
31
- borderRight: "1px solid " + theme.palette.grey[500],
32
- padding: theme.spacing(0.5) + "px " + theme.spacing(1) + "px"
33
+ borderBottom: '1px solid ' + theme.palette.grey[500],
34
+ borderRight: '1px solid ' + theme.palette.grey[500],
35
+ padding: theme.spacing(0.5) + 'px ' + theme.spacing(1) + 'px'
33
36
  },
34
37
  cellContent: {
35
38
  display: 'flex',
@@ -63,90 +66,125 @@ var Section = function Section(_ref) {
63
66
  sectionIndex = _ref.sectionIndex,
64
67
  nbColumnsByRows = _ref.nbColumnsByRows,
65
68
  subHeadCellsWidth = _ref.subHeadCellsWidth;
69
+
66
70
  var classes = useStyles();
67
71
  var currentSection = R.path([0, 'key'], section);
68
72
  var headerNumberRows = R.length(nbColumnsByRows);
69
73
  var maxColumns = R.last(nbColumnsByRows);
70
- return /*#__PURE__*/React.createElement(TableBody, null, /*#__PURE__*/React.createElement(SectionHeader, {
71
- headerData: headerData,
72
- section: section,
73
- currentSection: currentSection,
74
- xLayoutDataLength: xLayoutDataLength,
75
- headerHeight: headerHeight
76
- }), R.map(function (sectionbody) {
77
- var _cx2;
78
74
 
79
- var rowId = sectionbody.key + "_" + sectionIndex;
80
- var rowIds = R.pipe(R.map(function (index) {
81
- return sectionbody.key + "_" + sectionIndex + "_" + index;
82
- }), R.join(' '))(R.times(R.identity, R.length(R.prop('data', sectionbody))));
83
- return /*#__PURE__*/React.createElement(TableRow, {
84
- key: sectionbody.key
85
- }, mapIndexed(function (cell, index) {
86
- var _cx;
75
+ return React.createElement(
76
+ TableBody,
77
+ null,
78
+ React.createElement(SectionHeader, {
79
+ headerData: headerData,
80
+ section: section,
81
+ currentSection: currentSection,
82
+ xLayoutDataLength: xLayoutDataLength,
83
+ headerHeight: headerHeight
84
+ }),
85
+ R.map(function (sectionbody) {
86
+ var _cx2;
87
+
88
+ var rowId = sectionbody.key + '_' + sectionIndex;
89
+ var rowIds = R.pipe(R.map(function (index) {
90
+ return sectionbody.key + '_' + sectionIndex + '_' + index;
91
+ }), R.join(' '))(R.times(R.identity, R.length(R.prop('data', sectionbody))));
92
+ return React.createElement(
93
+ TableRow,
94
+ { key: sectionbody.key },
95
+ mapIndexed(function (cell, index) {
96
+ var _cx;
87
97
 
88
- var flags = R.path(['value', 'flags'], cell);
89
- var id = rowId + "_" + index; // special space is used for hierarchy U+2007 &#8199; &numsp;
98
+ var flags = R.path(['value', 'flags'], cell);
99
+ var id = rowId + '_' + index;
90
100
 
91
- var hierarchySpace = R.pipe(R.pathOr([], ['value', 'parents']), R.when(R.isNil, R.always([])), R.length, // eslint-disable-next-line no-irregular-whitespace
92
- R.times(function () {
93
- return '·  ';
94
- }))(cell);
95
- return /*#__PURE__*/React.createElement(TableCell, {
96
- key: id,
97
- className: cx(classes.rowTitle, (_cx = {}, _cx[classes.topCell] = R.not(R.isEmpty(flags)), _cx[classes.highlight] = R.prop(rowId)(activeCellIds), _cx)),
98
- id: id,
99
- headers: "subHeader_" + index + " " + currentSection,
100
- component: "th",
101
- style: {
102
- position: 'sticky',
103
- left: subHeadCellsWidth[index],
104
- zIndex: 1
105
- }
106
- }, /*#__PURE__*/React.createElement("div", {
107
- className: classes.cellContent
108
- }, !R.isEmpty(hierarchySpace) && /*#__PURE__*/React.createElement("div", {
109
- className: classes.hierarchySpace
110
- }, hierarchySpace), /*#__PURE__*/React.createElement(Typography, {
111
- variant: "body1",
112
- tabIndex: 0
113
- }, R.path(['value', 'label'], cell), /*#__PURE__*/React.createElement(Flags, {
114
- flags: flags
115
- }))));
116
- }, R.prop('data', sectionbody)), /*#__PURE__*/React.createElement(TableCell, {
117
- className: cx(classes.fillerCell, (_cx2 = {}, _cx2[classes.highlight] = R.prop(rowId)(activeCellIds), _cx2)),
118
- style: {
119
- position: 'sticky',
120
- left: R.last(subHeadCellsWidth)
121
- }
122
- }, /*#__PURE__*/React.createElement("div", {
123
- className: classes.flagContainer
124
- }, /*#__PURE__*/React.createElement(Flags, {
125
- flags: R.prop('flags', sectionbody)
126
- }))), mapIndexed(function (item, columnIndex) {
127
- var columnIds = R.pipe(R.times(R.identity), R.map(function (rowIndex) {
128
- var columnId = R.divide(columnIndex, R.divide(maxColumns, R.nth(rowIndex, nbColumnsByRows)));
129
- return Math.floor(columnId || 0) + "_" + rowIndex;
130
- }), R.join(' '))(headerNumberRows);
131
- var intersectionCellId = rowId + "/" + columnIndex;
132
- var isActive = R.pipe(R.propOr({}, 'intersectionCellId'), R.equals(intersectionCellId))(activeCellIds);
133
- return /*#__PURE__*/React.createElement(Cell, _extends({
134
- key: intersectionCellId
135
- }, R.pathOr({
136
- value: '..'
137
- }, [item.key, currentSection, sectionbody.key, 0], cells), {
138
- headers: rowIds + " " + columnIds + " " + currentSection,
139
- cellHandler: cellHandler,
140
- isActive: isActive,
141
- isHighlight: R.any(R.identity)([R.prop(rowId)(activeCellIds), R.prop(columnIndex)(activeCellIds)]),
142
- activeCellHandler: R.is(Function)(activeCellHandler) ? function () {
143
- var _activeCellHandler;
101
+ // special space is used for hierarchy U+2007 &#8199; &numsp;
102
+ var hierarchySpace = R.pipe(R.pathOr([], ['value', 'parents']), R.when(R.isNil, R.always([])), R.length,
103
+ // eslint-disable-next-line no-irregular-whitespace
104
+ R.times(function () {
105
+ return '·  ';
106
+ }))(cell);
144
107
 
145
- return activeCellHandler((_activeCellHandler = {}, _activeCellHandler[rowId] = R.not(isActive), _activeCellHandler[columnIndex] = R.not(isActive), _activeCellHandler.intersectionCellId = isActive ? null : intersectionCellId, _activeCellHandler));
146
- } : null
147
- }));
148
- }, headerData));
149
- }, R.nth(1, section)));
108
+ return React.createElement(
109
+ TableCell,
110
+ {
111
+ key: id,
112
+ className: cx(classes.rowTitle, (_cx = {}, _cx[classes.topCell] = R.not(R.isEmpty(flags)), _cx[classes.highlight] = R.prop(rowId)(activeCellIds), _cx)),
113
+ id: id,
114
+ headers: 'subHeader_' + index + ' ' + currentSection,
115
+ component: 'th',
116
+ style: { position: 'sticky', left: subHeadCellsWidth[index], zIndex: 1 }
117
+ },
118
+ React.createElement(
119
+ 'div',
120
+ { className: classes.cellContent },
121
+ !R.isEmpty(hierarchySpace) && React.createElement(
122
+ 'div',
123
+ { className: classes.hierarchySpace },
124
+ hierarchySpace
125
+ ),
126
+ React.createElement(
127
+ Typography,
128
+ { variant: 'body1', tabIndex: 0 },
129
+ R.path(['value', 'label'], cell),
130
+ React.createElement(Flags, { flags: flags })
131
+ )
132
+ )
133
+ );
134
+ }, R.prop('data', sectionbody)),
135
+ React.createElement(
136
+ TableCell,
137
+ {
138
+ className: cx(classes.fillerCell, (_cx2 = {}, _cx2[classes.highlight] = R.prop(rowId)(activeCellIds), _cx2)),
139
+ style: { position: 'sticky', left: R.last(subHeadCellsWidth) }
140
+ },
141
+ React.createElement(
142
+ 'div',
143
+ { className: classes.flagContainer },
144
+ React.createElement(Flags, { flags: R.prop('flags', sectionbody) })
145
+ )
146
+ ),
147
+ mapIndexed(function (item, columnIndex) {
148
+ var columnIds = R.pipe(R.times(R.identity), R.map(function (rowIndex) {
149
+ var columnId = R.divide(columnIndex, R.divide(maxColumns, R.nth(rowIndex, nbColumnsByRows)));
150
+ return Math.floor(columnId || 0) + '_' + rowIndex;
151
+ }), R.join(' '))(headerNumberRows);
152
+
153
+ var intersectionCellId = rowId + '/' + columnIndex;
154
+ var isActive = R.pipe(R.propOr({}, 'intersectionCellId'), R.equals(intersectionCellId))(activeCellIds);
155
+ return React.createElement(Cell, _extends({
156
+ key: intersectionCellId
157
+ }, R.pathOr({ value: '..' }, [item.key, currentSection, sectionbody.key, 0], cells), {
158
+ headers: rowIds + ' ' + columnIds + ' ' + currentSection,
159
+ cellHandler: cellHandler,
160
+ isActive: isActive,
161
+ isHighlight: R.any(R.identity)([R.prop(rowId)(activeCellIds), R.prop(columnIndex)(activeCellIds)]),
162
+ activeCellHandler: R.is(Function)(activeCellHandler) ? function () {
163
+ var _activeCellHandler;
164
+
165
+ return activeCellHandler((_activeCellHandler = {}, _activeCellHandler[rowId] = R.not(isActive), _activeCellHandler[columnIndex] = R.not(isActive), _activeCellHandler.intersectionCellId = isActive ? null : intersectionCellId, _activeCellHandler));
166
+ } : null
167
+ }));
168
+ }, headerData)
169
+ );
170
+ }, R.nth(1, section))
171
+ );
150
172
  };
151
173
 
174
+ Section.propTypes = process.env.NODE_ENV !== "production" ? {
175
+ cells: PropTypes.object,
176
+ headerData: PropTypes.array,
177
+ section: PropTypes.array,
178
+ xLayoutDataLength: PropTypes.number,
179
+ cellHandler: PropTypes.func,
180
+ activeCellHandler: PropTypes.func,
181
+ activeCellIds: PropTypes.object,
182
+ headerHeight: PropTypes.number,
183
+ sectionIndex: PropTypes.number,
184
+ headerNumberRows: PropTypes.number,
185
+ nbColumnsByRows: PropTypes.array,
186
+ maxColumns: PropTypes.number,
187
+ subHeadCellsWidth: PropTypes.arrayOf(PropTypes.number)
188
+ } : {};
189
+
152
190
  export default Section;