@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,8 +1,10 @@
1
1
  import React from 'react';
2
+ import PropTypes from 'prop-types';
2
3
  import { makeStyles } from '@material-ui/core/styles';
3
4
  import Paper from '@material-ui/core/Paper';
4
5
  import Grid from '@material-ui/core/Grid';
5
6
  import cx from 'classnames';
7
+
6
8
  var useStyles = makeStyles(function (theme) {
7
9
  return {
8
10
  paper: {
@@ -23,14 +25,26 @@ var CustomPaper = function CustomPaper(_ref) {
23
25
 
24
26
  var isMobileView = _ref.isMobileView,
25
27
  children = _ref.children;
28
+
26
29
  var classes = useStyles();
27
- return /*#__PURE__*/React.createElement(Paper, {
28
- classes: {
29
- root: cx(classes.paper, (_cx = {}, _cx[classes.mobileView] = isMobileView, _cx))
30
- }
31
- }, /*#__PURE__*/React.createElement(Grid, {
32
- container: true
33
- }, children));
30
+ return React.createElement(
31
+ Paper,
32
+ {
33
+ classes: {
34
+ root: cx(classes.paper, (_cx = {}, _cx[classes.mobileView] = isMobileView, _cx))
35
+ }
36
+ },
37
+ React.createElement(
38
+ Grid,
39
+ { container: true },
40
+ children
41
+ )
42
+ );
34
43
  };
35
44
 
45
+ CustomPaper.propTypes = process.env.NODE_ENV !== "production" ? {
46
+ isMobileView: PropTypes.bool,
47
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
48
+ } : {};
49
+
36
50
  export default CustomPaper;
@@ -86,4 +86,5 @@
86
86
  *
87
87
  * @demoReady
88
88
  */
89
+
89
90
  export { default } from './CollapseButtons';
@@ -1,5 +1,7 @@
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';
4
+ import PropTypes from 'prop-types';
3
5
  import * as R from 'ramda';
4
6
  import Grid from '@material-ui/core/Grid';
5
7
  import Typography from '@material-ui/core/Typography';
@@ -9,6 +11,7 @@ import { makeStyles } from '@material-ui/styles';
9
11
  import FormControlLabel from '@material-ui/core/FormControlLabel';
10
12
  import Input from './Input';
11
13
  import { withBlank } from '../utils';
14
+
12
15
  var useStyles = makeStyles(function (theme) {
13
16
  return {
14
17
  root: _extends({
@@ -28,85 +31,139 @@ var useStyles = makeStyles(function (theme) {
28
31
  var DataEdit = function DataEdit(_ref) {
29
32
  var labels = _ref.labels,
30
33
  properties = _ref.properties;
34
+
31
35
  var classes = useStyles();
32
36
  var _properties$title = properties.title,
33
- title = _properties$title === void 0 ? {} : _properties$title,
37
+ title = _properties$title === undefined ? {} : _properties$title,
34
38
  _properties$subtitle = properties.subtitle,
35
- subtitle = _properties$subtitle === void 0 ? {} : _properties$subtitle,
39
+ subtitle = _properties$subtitle === undefined ? {} : _properties$subtitle,
36
40
  _properties$source = properties.source,
37
- source = _properties$source === void 0 ? {} : _properties$source,
41
+ source = _properties$source === undefined ? {} : _properties$source,
38
42
  _properties$logo = properties.logo,
39
- logo = _properties$logo === void 0 ? {} : _properties$logo,
43
+ logo = _properties$logo === undefined ? {} : _properties$logo,
40
44
  _properties$copyright = properties.copyright,
41
- copyright = _properties$copyright === void 0 ? {} : _properties$copyright;
45
+ copyright = _properties$copyright === undefined ? {} : _properties$copyright;
46
+
42
47
  var resetLabel = R.prop('reset', labels);
43
- return /*#__PURE__*/React.createElement(Grid, {
44
- "data-testid": "data-edit-test-id",
45
- spacing: 2,
46
- container: true,
47
- className: classes.root
48
- }, /*#__PURE__*/React.createElement(Grid, {
49
- item: true,
50
- xs: 12
51
- }, /*#__PURE__*/React.createElement(Grid, {
52
- container: true
53
- }, /*#__PURE__*/React.createElement(Grid, {
54
- item: true,
55
- xs: 12
56
- }, /*#__PURE__*/React.createElement(Typography, {
57
- variant: "h6",
58
- className: classes.title
59
- }, 'Information'))), /*#__PURE__*/React.createElement(Grid, {
60
- spacing: 2,
61
- container: true
62
- }, R.or(R.prop('isActive')(title), R.prop('isActive')(subtitle)) && /*#__PURE__*/React.createElement(Grid, {
63
- item: true,
64
- xs: 12,
65
- sm: 12,
66
- md: 12,
67
- lg: 6
68
- }, R.prop('isActive')(title) && /*#__PURE__*/React.createElement(Input, _extends({
69
- fullWidth: true,
70
- label: R.prop('title', labels),
71
- resetLabel: resetLabel
72
- }, R.dissoc('isDefault', title))), R.prop('isActive')(subtitle) && /*#__PURE__*/React.createElement(Input, _extends({
73
- fullWidth: true,
74
- label: R.prop('subtitle', labels),
75
- resetLabel: resetLabel
76
- }, R.dissoc('isDefault', subtitle)))), /*#__PURE__*/React.createElement(Grid, {
77
- item: true,
78
- xs: 12,
79
- sm: 12,
80
- md: 12,
81
- lg: 6
82
- }, R.prop('isActive')(source) && /*#__PURE__*/React.createElement(Input, _extends({
83
- fullWidth: true,
84
- label: R.prop('source', labels),
85
- resetLabel: resetLabel
86
- }, R.dissoc('isDefault', source))), /*#__PURE__*/React.createElement(Container, {
87
- disableGutters: true,
88
- className: classes.checkboxes
89
- }, R.map(function (item) {
90
- if (R.pipe(R.prop('isActive'), R.not)(item)) return;
91
- var id = R.prop('id')(item);
92
- return /*#__PURE__*/React.createElement(FormControlLabel, {
93
- key: id,
94
- control: /*#__PURE__*/React.createElement(Checkbox, _extends({
95
- color: "primary",
96
- inputProps: {
97
- 'aria-label': R.prop(id)(labels)
98
- }
99
- }, R.omit(['isActive'])(item))),
100
- label: R.prop(id)(labels)
101
- });
102
- })([logo, copyright]))))));
48
+
49
+ return React.createElement(
50
+ Grid,
51
+ { 'data-testid': 'data-edit-test-id', spacing: 2, container: true, className: classes.root },
52
+ React.createElement(
53
+ Grid,
54
+ { item: true, xs: 12 },
55
+ React.createElement(
56
+ Grid,
57
+ { container: true },
58
+ React.createElement(
59
+ Grid,
60
+ { item: true, xs: 12 },
61
+ React.createElement(
62
+ Typography,
63
+ { variant: 'h6', className: classes.title },
64
+ 'Information'
65
+ )
66
+ )
67
+ ),
68
+ React.createElement(
69
+ Grid,
70
+ { spacing: 2, container: true },
71
+ R.or(R.prop('isActive')(title), R.prop('isActive')(subtitle)) && React.createElement(
72
+ Grid,
73
+ { item: true, xs: 12, sm: 12, md: 12, lg: 6 },
74
+ R.prop('isActive')(title) && React.createElement(Input, _extends({
75
+ fullWidth: true,
76
+ label: R.prop('title', labels),
77
+ resetLabel: resetLabel
78
+ }, R.dissoc('isDefault', title))),
79
+ R.prop('isActive')(subtitle) && React.createElement(Input, _extends({
80
+ fullWidth: true,
81
+ label: R.prop('subtitle', labels),
82
+ resetLabel: resetLabel
83
+ }, R.dissoc('isDefault', subtitle)))
84
+ ),
85
+ React.createElement(
86
+ Grid,
87
+ { item: true, xs: 12, sm: 12, md: 12, lg: 6 },
88
+ R.prop('isActive')(source) && React.createElement(Input, _extends({
89
+ fullWidth: true,
90
+ label: R.prop('source', labels),
91
+ resetLabel: resetLabel
92
+ }, R.dissoc('isDefault', source))),
93
+ React.createElement(
94
+ Container,
95
+ { disableGutters: true, className: classes.checkboxes },
96
+ R.map(function (item) {
97
+ if (R.pipe(R.prop('isActive'), R.not)(item)) return;
98
+ var id = R.prop('id')(item);
99
+ return React.createElement(FormControlLabel, {
100
+ key: id,
101
+ control: React.createElement(Checkbox, _extends({
102
+ color: 'primary',
103
+ inputProps: { 'aria-label': R.prop(id)(labels) }
104
+ }, R.omit(['isActive'])(item))),
105
+ label: R.prop(id)(labels)
106
+ });
107
+ })([logo, copyright])
108
+ )
109
+ )
110
+ )
111
+ )
112
+ );
103
113
  };
104
114
 
115
+ DataEdit.propTypes = process.env.NODE_ENV !== "production" ? {
116
+ labels: PropTypes.shape({
117
+ title: PropTypes.string,
118
+ subtitle: PropTypes.string,
119
+ source: PropTypes.string,
120
+ logo: PropTypes.string,
121
+ copyright: PropTypes.string,
122
+ reset: PropTypes.string
123
+ }),
124
+ properties: PropTypes.shape({
125
+ title: PropTypes.shape({
126
+ id: PropTypes.string,
127
+ isActive: PropTypes.bool,
128
+ onSubmit: PropTypes.func,
129
+ onReset: PropTypes.func,
130
+ value: PropTypes.string
131
+ }),
132
+ subtitle: PropTypes.shape({
133
+ id: PropTypes.string,
134
+ isActive: PropTypes.bool,
135
+ onSubmit: PropTypes.func,
136
+ onReset: PropTypes.func,
137
+ value: PropTypes.string
138
+ }),
139
+ source: PropTypes.shape({
140
+ id: PropTypes.string,
141
+ isActive: PropTypes.bool,
142
+ onSubmit: PropTypes.func,
143
+ onReset: PropTypes.func,
144
+ value: PropTypes.string
145
+ }),
146
+ logo: PropTypes.shape({
147
+ id: PropTypes.string,
148
+ isActive: PropTypes.bool,
149
+ onChange: PropTypes.func,
150
+ checked: PropTypes.bool
151
+ }),
152
+ copyright: PropTypes.shape({
153
+ id: PropTypes.string,
154
+ isActive: PropTypes.bool,
155
+ onChange: PropTypes.func,
156
+ checked: PropTypes.bool
157
+ })
158
+ })
159
+ } : {};
160
+
105
161
  var isAllInactive = R.pipe(R.pluck('isActive'), R.all(R.identity), R.not);
162
+
106
163
  export default withBlank(function (_ref2) {
107
164
  var isBlank = _ref2.isBlank,
108
165
  _ref2$properties = _ref2.properties,
109
- properties = _ref2$properties === void 0 ? {} : _ref2$properties;
166
+ properties = _ref2$properties === undefined ? {} : _ref2$properties;
110
167
  return {
111
168
  isBlank: R.any(R.identity)([isBlank, R.isEmpty(properties), isAllInactive(properties)])
112
169
  };
@@ -1,7 +1,9 @@
1
- import _extends from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends";
2
- import _objectWithoutPropertiesLoose from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- var _excluded = ["id", "value", "onSubmit", "onReset", "resetLabel", "placeholder"];
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
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
4
+
4
5
  import React, { useEffect, useState } from 'react';
6
+ import PropTypes from 'prop-types';
5
7
  import * as R from 'ramda';
6
8
  import { makeStyles } from '@material-ui/core/styles';
7
9
  import TextField from '@material-ui/core/TextField';
@@ -9,6 +11,7 @@ import InputAdornment from '@material-ui/core/InputAdornment';
9
11
  import IconButton from '@material-ui/core/IconButton';
10
12
  import Done from '@material-ui/icons/Done';
11
13
  import RotateLeftIcon from '@material-ui/icons/RotateLeft';
14
+
12
15
  var useStyles = makeStyles(function (theme) {
13
16
  return {
14
17
  visibility: {
@@ -28,29 +31,40 @@ var useStyles = makeStyles(function (theme) {
28
31
 
29
32
  var LefttIcon = function LefttIcon(_ref) {
30
33
  var Icon = _ref.Icon;
31
- return /*#__PURE__*/React.createElement(Icon, null);
34
+ return React.createElement(Icon, null);
32
35
  };
33
36
 
37
+ LefttIcon.propTypes = process.env.NODE_ENV !== "production" ? {
38
+ Icon: PropTypes.object
39
+ } : {};
40
+
34
41
  var RightIcon = function RightIcon(_ref2) {
35
42
  var onSubmit = _ref2.onSubmit,
36
43
  _ref2$Icon = _ref2.Icon,
37
- Icon = _ref2$Icon === void 0 ? Done : _ref2$Icon;
38
- return /*#__PURE__*/React.createElement(IconButton, {
39
- color: "primary",
40
- onClick: function onClick() {
41
- return onSubmit();
42
- }
43
- }, /*#__PURE__*/React.createElement(Icon, null));
44
+ Icon = _ref2$Icon === undefined ? Done : _ref2$Icon;
45
+ return React.createElement(
46
+ IconButton,
47
+ { color: 'primary', onClick: function onClick() {
48
+ return onSubmit();
49
+ } },
50
+ React.createElement(Icon, null)
51
+ );
44
52
  };
45
53
 
46
- export var MyInput = function MyInput(_ref3) {
54
+ RightIcon.propTypes = process.env.NODE_ENV !== "production" ? {
55
+ Icon: PropTypes.object,
56
+ onSubmit: PropTypes.func,
57
+ classes: PropTypes.object
58
+ } : {};
59
+
60
+ var MyInput = function MyInput(_ref3) {
47
61
  var id = _ref3.id,
48
62
  value = _ref3.value,
49
63
  onSubmit = _ref3.onSubmit,
50
64
  onReset = _ref3.onReset,
51
65
  resetLabel = _ref3.resetLabel,
52
66
  placeholder = _ref3.placeholder,
53
- props = _objectWithoutPropertiesLoose(_ref3, _excluded);
67
+ props = _objectWithoutProperties(_ref3, ['id', 'value', 'onSubmit', 'onReset', 'resetLabel', 'placeholder']);
54
68
 
55
69
  var classes = useStyles();
56
70
 
@@ -61,7 +75,8 @@ export var MyInput = function MyInput(_ref3) {
61
75
  useEffect(function () {
62
76
  setInputValue(value);
63
77
  }, [value]);
64
- var resetId = "reset-" + id;
78
+
79
+ var resetId = 'reset-' + id;
65
80
 
66
81
  var handleBlur = function handleBlur(event) {
67
82
  if (R.is(Function, onSubmit) && inputValue !== value) {
@@ -89,23 +104,28 @@ export var MyInput = function MyInput(_ref3) {
89
104
  setInputValue(event.target.value);
90
105
  };
91
106
 
92
- var endAdornment = R.is(Function, onReset) || inputValue !== value ? /*#__PURE__*/React.createElement(InputAdornment, {
93
- position: "end"
94
- }, /*#__PURE__*/React.createElement(IconButton, {
95
- id: resetId,
96
- "aria-label": resetLabel,
97
- onKeyPress: onEnterLabel,
98
- onClick: handleReset
99
- }, /*#__PURE__*/React.createElement(RotateLeftIcon, {
100
- fontSize: "small"
101
- }))) : null;
102
- return /*#__PURE__*/React.createElement(TextField, _extends({
107
+ var endAdornment = R.is(Function, onReset) || inputValue !== value ? React.createElement(
108
+ InputAdornment,
109
+ { position: 'end' },
110
+ React.createElement(
111
+ IconButton,
112
+ {
113
+ id: resetId,
114
+ 'aria-label': resetLabel,
115
+ onKeyPress: onEnterLabel,
116
+ onClick: handleReset
117
+ },
118
+ React.createElement(RotateLeftIcon, { fontSize: 'small' })
119
+ )
120
+ ) : null;
121
+
122
+ return React.createElement(TextField, _extends({
103
123
  inputProps: {
104
124
  className: classes.input
105
125
  },
106
126
  onBlur: handleBlur,
107
- margin: "dense",
108
- variant: "outlined",
127
+ margin: 'dense',
128
+ variant: 'outlined',
109
129
  onKeyPress: onEnterLabel,
110
130
  onChange: handleChange,
111
131
  id: id,
@@ -116,4 +136,15 @@ export var MyInput = function MyInput(_ref3) {
116
136
  placeholder: R.is(Number)(placeholder) ? R.toString(placeholder) : placeholder
117
137
  }, R.omit(['isActive'])(props)));
118
138
  };
139
+
140
+ export { MyInput };
141
+ MyInput.propTypes = process.env.NODE_ENV !== "production" ? {
142
+ id: PropTypes.string,
143
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
144
+ onSubmit: PropTypes.func,
145
+ onReset: PropTypes.func,
146
+ resetLabel: PropTypes.string,
147
+ placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
148
+ } : {};
149
+
119
150
  export default MyInput;
@@ -66,4 +66,5 @@
66
66
  * }
67
67
  * }
68
68
  */
69
+
69
70
  export { default } from './DataEdit';
@@ -1,4 +1,5 @@
1
1
  import React, { Fragment } from 'react';
2
+ import PropTypes from 'prop-types';
2
3
  import * as R from 'ramda';
3
4
  import useSize from '@react-hook/size';
4
5
  import Grid from '@material-ui/core/Grid';
@@ -7,7 +8,9 @@ import Link from '@material-ui/core/Link';
7
8
  import { makeStyles } from '@material-ui/core/styles';
8
9
  import { Tooltip } from '../';
9
10
  import { T4_BREAKPOINTS } from '../theme';
11
+
10
12
  var HEIGHT = 42;
13
+
11
14
  var useStyles = makeStyles(function (theme) {
12
15
  return {
13
16
  footer: {
@@ -20,6 +23,7 @@ var useStyles = makeStyles(function (theme) {
20
23
  padding: function padding(_ref) {
21
24
  var isWidthUp = _ref.isWidthUp,
22
25
  isSourced = _ref.isSourced;
26
+
23
27
  if (isWidthUp(T4_BREAKPOINTS.sm) && isSourced) return 0;
24
28
  return theme.spacing(0, 1, 0, 1);
25
29
  }
@@ -30,6 +34,7 @@ var useStyles = makeStyles(function (theme) {
30
34
  typo: {
31
35
  fontSize: function fontSize(_ref2) {
32
36
  var isWidthUp = _ref2.isWidthUp;
37
+
33
38
  if (isWidthUp(T4_BREAKPOINTS.lg)) return 14;
34
39
  return 12;
35
40
  }
@@ -46,6 +51,7 @@ var DataFooter = function DataFooter(_ref3) {
46
51
  source = _ref3.source,
47
52
  copyright = _ref3.copyright,
48
53
  legend = _ref3.legend;
54
+
49
55
  var target = React.useRef(null);
50
56
 
51
57
  var _useSize = useSize(target),
@@ -54,74 +60,115 @@ var DataFooter = function DataFooter(_ref3) {
54
60
  var isWidthUp = R.gt(width);
55
61
  var isSourced = source && source.label && source.link;
56
62
  var isCopyrighted = copyright && copyright.label && copyright.content;
57
- var classes = useStyles({
58
- isWidthUp: isWidthUp,
59
- isSourced: isSourced
60
- });
61
- if (!isWidthUp(T4_BREAKPOINTS.xs)) return /*#__PURE__*/React.createElement(Grid, {
62
- ref: target
63
- });
64
- return /*#__PURE__*/React.createElement(Grid, {
65
- ref: target,
66
- container: true,
67
- className: classes.footer,
68
- direction: "row",
69
- justifyContent: "flex-end",
70
- alignItems: "center"
71
- }, /*#__PURE__*/React.createElement(Grid, {
72
- item: true,
73
- className: classes.legend
74
- }, isWidthUp(T4_BREAKPOINTS.sm) && legend), /*#__PURE__*/React.createElement(Grid, {
75
- item: true,
76
- style: {
77
- alignSelf: 'flex-end'
78
- }
79
- }, /*#__PURE__*/React.createElement(Grid, {
80
- container: true,
81
- justifyContent: "flex-end",
82
- alignItems: "center",
83
- className: classes.footer,
84
- spacing: 0
85
- }, /*#__PURE__*/React.createElement(Grid, {
86
- item: true,
87
- className: classes.copyright
88
- }, isCopyrighted && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
89
- title: /*#__PURE__*/React.createElement(Typography, {
90
- variant: "body2"
91
- }, copyright.content),
92
- variant: "light",
93
- tabIndex: 0,
94
- "aria-hidden": false,
95
- placement: "top",
96
- enterNextDelay: 100,
97
- interactive: true,
98
- arrow: true
99
- }, /*#__PURE__*/React.createElement(Typography, {
100
- variant: "body2",
101
- className: classes.typo,
102
- style: {
103
- cursor: 'pointer'
104
- }
105
- }, copyright.label)), /*#__PURE__*/React.createElement(Typography, {
106
- variant: "srOnly"
107
- }, copyright.content))), isWidthUp(T4_BREAKPOINTS.sm) && isSourced && /*#__PURE__*/React.createElement(Grid, {
108
- item: true,
109
- className: classes.source
110
- }, /*#__PURE__*/React.createElement(Typography, {
111
- variant: "body2",
112
- className: classes.typo
113
- }, /*#__PURE__*/React.createElement(Link, {
114
- href: source.link,
115
- rel: "noopener noreferrer",
116
- target: "_blank",
117
- variant: "body2"
118
- }, source.label))), isWidthUp(T4_BREAKPOINTS.xs) && logo && /*#__PURE__*/React.createElement(Grid, {
119
- item: true
120
- }, /*#__PURE__*/React.createElement("img", {
121
- src: logo,
122
- alt: "logo",
123
- className: classes.logo
124
- })))));
63
+ var classes = useStyles({ isWidthUp: isWidthUp, isSourced: isSourced });
64
+
65
+ if (!isWidthUp(T4_BREAKPOINTS.xs)) return React.createElement(Grid, { ref: target });
66
+
67
+ return React.createElement(
68
+ Grid,
69
+ {
70
+ ref: target,
71
+ container: true,
72
+ className: classes.footer,
73
+ direction: 'row',
74
+ justifyContent: 'flex-end',
75
+ alignItems: 'center'
76
+ },
77
+ React.createElement(
78
+ Grid,
79
+ { item: true, className: classes.legend },
80
+ isWidthUp(T4_BREAKPOINTS.sm) && legend
81
+ ),
82
+ React.createElement(
83
+ Grid,
84
+ { item: true, style: { alignSelf: 'flex-end' } },
85
+ React.createElement(
86
+ Grid,
87
+ {
88
+ container: true,
89
+ justifyContent: 'flex-end',
90
+ alignItems: 'center',
91
+ className: classes.footer,
92
+ spacing: 0
93
+ },
94
+ React.createElement(
95
+ Grid,
96
+ { item: true, className: classes.copyright },
97
+ isCopyrighted && React.createElement(
98
+ Fragment,
99
+ null,
100
+ React.createElement(
101
+ Tooltip,
102
+ {
103
+ title: React.createElement(
104
+ Typography,
105
+ { variant: 'body2' },
106
+ copyright.content
107
+ ),
108
+ variant: 'light',
109
+ tabIndex: 0,
110
+ 'aria-hidden': false,
111
+ placement: 'top',
112
+ enterNextDelay: 100,
113
+ interactive: true,
114
+ arrow: true
115
+ },
116
+ React.createElement(
117
+ Typography,
118
+ {
119
+ variant: 'body2',
120
+ className: classes.typo,
121
+ style: { cursor: 'pointer' }
122
+ },
123
+ copyright.label
124
+ )
125
+ ),
126
+ React.createElement(
127
+ Typography,
128
+ { variant: 'srOnly' },
129
+ copyright.content
130
+ )
131
+ )
132
+ ),
133
+ isWidthUp(T4_BREAKPOINTS.sm) && isSourced && React.createElement(
134
+ Grid,
135
+ { item: true, className: classes.source },
136
+ React.createElement(
137
+ Typography,
138
+ { variant: 'body2', className: classes.typo },
139
+ React.createElement(
140
+ Link,
141
+ {
142
+ href: source.link,
143
+ rel: 'noopener noreferrer',
144
+ target: '_blank',
145
+ variant: 'body2'
146
+ },
147
+ source.label
148
+ )
149
+ )
150
+ ),
151
+ isWidthUp(T4_BREAKPOINTS.xs) && logo && React.createElement(
152
+ Grid,
153
+ { item: true },
154
+ React.createElement('img', { src: logo, alt: 'logo', className: classes.logo })
155
+ )
156
+ )
157
+ )
158
+ );
125
159
  };
126
160
 
161
+ DataFooter.propTypes = process.env.NODE_ENV !== "production" ? {
162
+ logo: PropTypes.string,
163
+ source: PropTypes.shape({
164
+ label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
165
+ link: PropTypes.string
166
+ }),
167
+ copyright: PropTypes.shape({
168
+ label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
169
+ content: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
170
+ }),
171
+ legend: PropTypes.element
172
+ } : {};
173
+
127
174
  export default DataFooter;
@@ -28,4 +28,5 @@
28
28
  * @demoReady
29
29
  *
30
30
  */
31
+
31
32
  export { default } from './DataFooter';