@sis-cc/dotstatsuite-visions 6.4.3 → 6.6.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.
- package/es/Alert/Alert.js +66 -135
- package/es/Alert/index.js +0 -1
- package/es/ApiQueries/ApiQueries.js +45 -79
- package/es/ApiQueries/Query.js +65 -105
- package/es/ApiQueries/index.js +0 -1
- package/es/AuthDialog/index.js +169 -0
- package/es/Breadcrumbs/Breadcrumbs.js +21 -38
- package/es/Breadcrumbs/index.js +0 -1
- package/es/Button/Button.js +11 -28
- package/es/Button/index.js +0 -1
- package/es/ChartsConfig/Axis.js +72 -76
- package/es/ChartsConfig/ButtonGroup.js +29 -51
- package/es/ChartsConfig/ChartsConfig.js +87 -187
- package/es/ChartsConfig/ContainerTitle.js +15 -36
- package/es/ChartsConfig/Focus.js +37 -48
- package/es/ChartsConfig/Frequency.js +24 -36
- package/es/ChartsConfig/Series.js +28 -43
- package/es/ChartsConfig/Size.js +36 -50
- package/es/ChartsConfig/index.js +0 -1
- package/es/ChartsConfig/styles.js +4 -4
- package/es/ChartsConfig/utils.js +1 -5
- package/es/Chips/Chips.js +99 -154
- package/es/Chips/index.js +0 -1
- package/es/CollapseButtons/CollapseButtons.js +63 -99
- package/es/CollapseButtons/Item.js +45 -70
- package/es/CollapseButtons/Paper.js +7 -21
- package/es/CollapseButtons/index.js +3 -1
- package/es/DataEdit/DataEdit.js +67 -124
- package/es/DataEdit/Input.js +27 -58
- package/es/DataEdit/index.js +0 -1
- package/es/DataFooter/DataFooter.js +68 -115
- package/es/DataFooter/index.js +0 -1
- package/es/DataHeader/DataHeader.js +75 -113
- package/es/DataHeader/Flags.js +8 -21
- package/es/DataHeader/Title.js +2 -15
- package/es/DataHeader/TooltipHeader.js +33 -63
- package/es/DataHeader/index.js +0 -1
- package/es/DataHeader/utils.js +8 -8
- package/es/Dataflow/Dataflow.js +132 -226
- package/es/Dataflow/index.js +0 -1
- package/es/ExpansionPanel/ExpansionPanel.js +42 -79
- package/es/ExpansionPanel/index.js +0 -1
- package/es/ExpansionPanel/styles.js +3 -5
- package/es/Icons/AccessibilityFilled.js +6 -8
- package/es/Icons/AccessibilityOutlined.js +6 -8
- package/es/Icons/AccountFilled.js +6 -8
- package/es/Icons/AccountOutlined.js +6 -8
- package/es/Icons/Api.js +6 -8
- package/es/Icons/Asterisk.js +6 -8
- package/es/Icons/Bar.js +6 -8
- package/es/Icons/CopyContent.js +6 -8
- package/es/Icons/Cross.js +6 -8
- package/es/Icons/HSymbol.js +6 -8
- package/es/Icons/Row.js +6 -8
- package/es/Icons/Scatter.js +6 -8
- package/es/Icons/StackedBar.js +6 -8
- package/es/Icons/StackedRow.js +6 -8
- package/es/Icons/Timeline.js +6 -8
- package/es/Icons/VSymbol.js +6 -8
- package/es/Icons/Warning.js +11 -14
- package/es/Icons/index.js +0 -1
- package/es/Input/Input.js +26 -56
- package/es/Input/index.js +0 -1
- package/es/Input/with-input.js +30 -25
- package/es/InputNumber/InputNumber.js +31 -51
- package/es/InputNumber/index.js +0 -1
- package/es/LabelDivider/LabelDivider.js +7 -18
- package/es/LabelDivider/index.js +0 -1
- package/es/Loading/Loading.js +9 -18
- package/es/Loading/index.js +0 -1
- package/es/Logo/Logo.js +11 -17
- package/es/Logo/index.js +0 -1
- package/es/NoData/NoData.js +17 -25
- package/es/NoData/index.js +0 -1
- package/es/Pagination/Pagination.js +70 -114
- package/es/Pagination/index.js +0 -1
- package/es/PeriodPicker/PeriodPicker.js +101 -124
- package/es/PeriodPicker/constants.js +78 -13
- package/es/PeriodPicker/index.js +0 -1
- package/es/PeriodPicker/lib.js +37 -23
- package/es/PeriodPicker/styles.js +0 -1
- package/es/ScopeList/Header.js +41 -60
- package/es/ScopeList/Item.js +98 -144
- package/es/ScopeList/ScopeList.js +132 -184
- package/es/ScopeList/Selection.js +51 -93
- package/es/ScopeList/index.js +0 -1
- package/es/ScopeList/styles.js +2 -3
- package/es/ScopeList/with-scope-list.js +151 -88
- package/es/Select/Select.js +44 -60
- package/es/Select/index.js +0 -1
- package/es/Share/Form.js +58 -88
- package/es/Share/Mode.js +30 -46
- package/es/Share/Share.js +41 -64
- package/es/Share/index.js +0 -1
- package/es/SisccFooter/SisccFooter.js +29 -36
- package/es/SisccFooter/index.js +0 -1
- package/es/Spotlight/Fields.js +37 -71
- package/es/Spotlight/Spotlight.js +51 -92
- package/es/Spotlight/index.js +0 -1
- package/es/Spotlight/useSpotlight.js +33 -13
- package/es/Spotlight/useStyles.js +2 -4
- package/es/Table/Table.js +50 -71
- package/es/Table/header.js +36 -50
- package/es/Table/index.js +0 -1
- package/es/Table/itemCell.js +13 -25
- package/es/Table/row-header.js +31 -50
- package/es/Table/section-header.js +30 -55
- package/es/Table/section-rows.js +38 -62
- package/es/Table/styles.js +2 -8
- package/es/Table/tableCell.js +7 -17
- package/es/Table/tooltip.js +21 -41
- package/es/Table/useStyles.js +2 -3
- package/es/Table/valueCell.js +26 -41
- package/es/TableFooter/TableFooter.js +42 -70
- package/es/TableFooter/index.js +0 -1
- package/es/TableHeader/TableHeader.js +18 -36
- package/es/TableHeader/index.js +0 -1
- package/es/TableHtml5/TableHtml5.js +71 -68
- package/es/TableHtml5/cell.js +35 -55
- package/es/TableHtml5/flags.js +29 -58
- package/es/TableHtml5/header.js +48 -66
- package/es/TableHtml5/index.js +0 -1
- package/es/TableHtml5/section.js +86 -120
- package/es/TableHtml5/sectionHeader.js +45 -72
- package/es/TableHtml5/subHeader.js +48 -58
- package/es/TableLayout/Box.js +33 -66
- package/es/TableLayout/DnDItem.js +37 -68
- package/es/TableLayout/TableLayout.js +105 -177
- package/es/TableLayout/constants.js +0 -2
- package/es/TableLayout/index.js +0 -1
- package/es/TableLayout/lib.js +1 -3
- package/es/TablePreview/TablePreview.js +99 -176
- package/es/TablePreview/index.js +0 -1
- package/es/TablePreview/lib.js +5 -4
- package/es/TablePreview/styles.js +0 -1
- package/es/Tag/Tag.js +5 -21
- package/es/Tag/index.js +0 -1
- package/es/ToggleButton/ToggleButton.js +28 -34
- package/es/ToggleButton/index.js +3 -1
- package/es/Tooltip/Tooltip.js +20 -32
- package/es/Tooltip/index.js +0 -1
- package/es/VerticalButton/VerticalButton.js +17 -22
- package/es/VerticalButton/index.js +0 -1
- package/es/index.js +3 -4
- package/es/theme.js +32 -14
- package/es/utils.js +16 -14
- package/lib/Alert/Alert.js +87 -168
- package/lib/Alert/index.js +7 -12
- package/lib/ApiQueries/ApiQueries.js +61 -105
- package/lib/ApiQueries/Query.js +85 -132
- package/lib/ApiQueries/index.js +7 -12
- package/lib/AuthDialog/index.js +193 -0
- package/lib/Breadcrumbs/Breadcrumbs.js +39 -68
- package/lib/Breadcrumbs/index.js +7 -12
- package/lib/Button/Button.js +28 -47
- package/lib/Button/index.js +7 -12
- package/lib/ChartsConfig/Axis.js +88 -100
- package/lib/ChartsConfig/ButtonGroup.js +43 -74
- package/lib/ChartsConfig/ChartsConfig.js +113 -236
- package/lib/ChartsConfig/ContainerTitle.js +30 -59
- package/lib/ChartsConfig/Focus.js +53 -71
- package/lib/ChartsConfig/Frequency.js +39 -59
- package/lib/ChartsConfig/Series.js +45 -70
- package/lib/ChartsConfig/Size.js +53 -77
- package/lib/ChartsConfig/index.js +7 -12
- package/lib/ChartsConfig/styles.js +16 -11
- package/lib/ChartsConfig/utils.js +14 -13
- package/lib/Chips/Chips.js +122 -192
- package/lib/Chips/index.js +7 -12
- package/lib/CollapseButtons/CollapseButtons.js +86 -132
- package/lib/CollapseButtons/Item.js +64 -98
- package/lib/CollapseButtons/Paper.js +19 -41
- package/lib/CollapseButtons/index.js +7 -12
- package/lib/DataEdit/DataEdit.js +88 -156
- package/lib/DataEdit/Input.js +42 -82
- package/lib/DataEdit/index.js +7 -12
- package/lib/DataFooter/DataFooter.js +88 -144
- package/lib/DataFooter/index.js +7 -12
- package/lib/DataHeader/DataHeader.js +106 -158
- package/lib/DataHeader/Flags.js +18 -34
- package/lib/DataHeader/Title.js +11 -27
- package/lib/DataHeader/TooltipHeader.js +48 -79
- package/lib/DataHeader/index.js +7 -12
- package/lib/DataHeader/utils.js +16 -10
- package/lib/Dataflow/Dataflow.js +159 -277
- package/lib/Dataflow/index.js +7 -12
- package/lib/ExpansionPanel/ExpansionPanel.js +63 -116
- package/lib/ExpansionPanel/index.js +7 -12
- package/lib/ExpansionPanel/styles.js +15 -12
- package/lib/Icons/AccessibilityFilled.js +15 -17
- package/lib/Icons/AccessibilityOutlined.js +15 -17
- package/lib/Icons/AccountFilled.js +15 -17
- package/lib/Icons/AccountOutlined.js +15 -17
- package/lib/Icons/Api.js +15 -17
- package/lib/Icons/Asterisk.js +15 -17
- package/lib/Icons/Bar.js +15 -17
- package/lib/Icons/CopyContent.js +15 -17
- package/lib/Icons/Cross.js +15 -17
- package/lib/Icons/HSymbol.js +15 -17
- package/lib/Icons/Row.js +15 -17
- package/lib/Icons/Scatter.js +15 -17
- package/lib/Icons/StackedBar.js +15 -17
- package/lib/Icons/StackedRow.js +15 -17
- package/lib/Icons/Timeline.js +15 -17
- package/lib/Icons/VSymbol.js +15 -17
- package/lib/Icons/Warning.js +27 -31
- package/lib/Icons/index.js +68 -152
- package/lib/Input/Input.js +47 -85
- package/lib/Input/index.js +7 -12
- package/lib/Input/with-input.js +38 -35
- package/lib/InputNumber/InputNumber.js +50 -80
- package/lib/InputNumber/index.js +7 -12
- package/lib/LabelDivider/LabelDivider.js +23 -37
- package/lib/LabelDivider/index.js +7 -12
- package/lib/Loading/Loading.js +20 -35
- package/lib/Loading/index.js +7 -12
- package/lib/Logo/Logo.js +20 -28
- package/lib/Logo/index.js +7 -12
- package/lib/NoData/NoData.js +28 -42
- package/lib/NoData/index.js +7 -12
- package/lib/Pagination/Pagination.js +91 -150
- package/lib/Pagination/index.js +7 -12
- package/lib/PeriodPicker/PeriodPicker.js +121 -150
- package/lib/PeriodPicker/constants.js +126 -37
- package/lib/PeriodPicker/index.js +7 -12
- package/lib/PeriodPicker/lib.js +99 -61
- package/lib/PeriodPicker/styles.js +7 -4
- package/lib/ScopeList/Header.js +58 -88
- package/lib/ScopeList/Item.js +116 -177
- package/lib/ScopeList/ScopeList.js +160 -234
- package/lib/ScopeList/Selection.js +70 -131
- package/lib/ScopeList/index.js +7 -12
- package/lib/ScopeList/styles.js +10 -9
- package/lib/ScopeList/with-scope-list.js +199 -108
- package/lib/Select/Select.js +59 -80
- package/lib/Select/index.js +7 -12
- package/lib/Share/Form.js +77 -119
- package/lib/Share/Mode.js +49 -78
- package/lib/Share/Share.js +59 -91
- package/lib/Share/index.js +7 -12
- package/lib/SisccFooter/SisccFooter.js +44 -63
- package/lib/SisccFooter/index.js +7 -12
- package/lib/Spotlight/Fields.js +54 -100
- package/lib/Spotlight/Spotlight.js +75 -136
- package/lib/Spotlight/index.js +7 -12
- package/lib/Spotlight/useSpotlight.js +44 -20
- package/lib/Spotlight/useStyles.js +15 -12
- package/lib/Table/Table.js +69 -102
- package/lib/Table/header.js +51 -70
- package/lib/Table/index.js +7 -12
- package/lib/Table/itemCell.js +25 -41
- package/lib/Table/row-header.js +49 -75
- package/lib/Table/section-header.js +50 -82
- package/lib/Table/section-rows.js +60 -94
- package/lib/Table/styles.js +23 -25
- package/lib/Table/tableCell.js +19 -37
- package/lib/Table/tooltip.js +36 -54
- package/lib/Table/useStyles.js +11 -8
- package/lib/Table/valueCell.js +39 -59
- package/lib/TableFooter/TableFooter.js +57 -93
- package/lib/TableFooter/index.js +7 -12
- package/lib/TableHeader/TableHeader.js +32 -56
- package/lib/TableHeader/index.js +7 -12
- package/lib/TableHtml5/TableHtml5.js +90 -97
- package/lib/TableHtml5/cell.js +52 -84
- package/lib/TableHtml5/flags.js +48 -82
- package/lib/TableHtml5/header.js +66 -96
- package/lib/TableHtml5/index.js +8 -17
- package/lib/TableHtml5/section.js +111 -162
- package/lib/TableHtml5/sectionHeader.js +64 -102
- package/lib/TableHtml5/subHeader.js +68 -88
- package/lib/TableLayout/Box.js +54 -97
- package/lib/TableLayout/DnDItem.js +58 -98
- package/lib/TableLayout/TableLayout.js +140 -232
- package/lib/TableLayout/constants.js +8 -6
- package/lib/TableLayout/index.js +7 -12
- package/lib/TableLayout/lib.js +14 -9
- package/lib/TablePreview/TablePreview.js +118 -205
- package/lib/TablePreview/index.js +7 -12
- package/lib/TablePreview/lib.js +30 -19
- package/lib/TablePreview/styles.js +7 -6
- package/lib/Tag/Tag.js +19 -38
- package/lib/Tag/index.js +7 -12
- package/lib/ToggleButton/ToggleButton.js +44 -60
- package/lib/ToggleButton/index.js +7 -12
- package/lib/Tooltip/Tooltip.js +34 -50
- package/lib/Tooltip/index.js +7 -12
- package/lib/VerticalButton/VerticalButton.js +40 -46
- package/lib/VerticalButton/index.js +7 -12
- package/lib/index.js +138 -296
- package/lib/theme.js +41 -17
- package/lib/utils.js +46 -31
- package/package.json +2 -10
package/es/Table/header.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import _extends from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends";
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
3
|
import * as R from 'ramda';
|
|
6
4
|
import sizeMe from 'react-sizeme';
|
|
7
5
|
import { makeStyles } from '@material-ui/core/styles';
|
|
8
6
|
import { Cell } from './styles';
|
|
9
7
|
import ItemCell from './itemCell';
|
|
10
|
-
|
|
11
8
|
var useStyles = makeStyles(function (theme) {
|
|
12
9
|
return {
|
|
13
10
|
root: {
|
|
@@ -20,17 +17,23 @@ var useStyles = makeStyles(function (theme) {
|
|
|
20
17
|
}
|
|
21
18
|
};
|
|
22
19
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
var YVector = sizeMe({
|
|
21
|
+
noPlaceholder: true,
|
|
22
|
+
monitorHeight: true,
|
|
23
|
+
monitorWidth: false
|
|
24
|
+
})(Cell);
|
|
26
25
|
var mergeHeaderCells = R.reduce(function (acc, headerCell) {
|
|
27
26
|
var previousCell = R.last(acc);
|
|
28
27
|
var cellValue = R.prop('key', headerCell);
|
|
29
28
|
var previousCellValue = R.prop('key', previousCell);
|
|
29
|
+
|
|
30
30
|
if (cellValue !== previousCellValue) {
|
|
31
31
|
return R.append(R.assoc('spanCount', 1, headerCell), acc);
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
|
|
34
|
+
return R.over(R.lensIndex(-1), R.evolve({
|
|
35
|
+
spanCount: R.add(1)
|
|
36
|
+
}), acc);
|
|
34
37
|
}, []);
|
|
35
38
|
|
|
36
39
|
var Header = function Header(_ref) {
|
|
@@ -38,54 +41,37 @@ var Header = function Header(_ref) {
|
|
|
38
41
|
onYVectorSize = _ref.onYVectorSize,
|
|
39
42
|
getYOffset = _ref.getYOffset,
|
|
40
43
|
xColumnCount = _ref.xColumnCount;
|
|
41
|
-
|
|
42
44
|
var classes = useStyles();
|
|
43
45
|
if (R.equals([''], data)) return null;
|
|
44
46
|
var getDimensionFromRow = R.pipe(R.head, R.prop('dimension'));
|
|
45
47
|
var nRows = R.length(data);
|
|
46
|
-
|
|
47
48
|
return R.addIndex(R.map)(function (headerRow, i) {
|
|
48
|
-
return React.createElement(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
yOffset: getYOffset(i),
|
|
74
|
-
spanCount: spanCount,
|
|
75
|
-
className: classes.root
|
|
76
|
-
},
|
|
77
|
-
React.createElement(ItemCell, _extends({ justifyContent: 'center', sticky: spanCount > 1 }, value))
|
|
78
|
-
);
|
|
79
|
-
}))(headerRow)
|
|
80
|
-
);
|
|
49
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
50
|
+
key: "header-row-" + i
|
|
51
|
+
}, /*#__PURE__*/React.createElement(YVector, {
|
|
52
|
+
yOffset: getYOffset(i),
|
|
53
|
+
onSize: onYVectorSize(i),
|
|
54
|
+
spanCount: xColumnCount,
|
|
55
|
+
className: classes.root
|
|
56
|
+
}, /*#__PURE__*/React.createElement(ItemCell, _extends({
|
|
57
|
+
justifyContent: "flex-end",
|
|
58
|
+
fontWeight: "bold",
|
|
59
|
+
fontStyle: "italic"
|
|
60
|
+
}, getDimensionFromRow(headerRow)))), R.pipe(R.when(R.always(i !== nRows - 1), mergeHeaderCells), // don't want merge of cells in the last row
|
|
61
|
+
R.addIndex(R.map)(function (_ref2, j) {
|
|
62
|
+
var value = _ref2.value,
|
|
63
|
+
spanCount = _ref2.spanCount;
|
|
64
|
+
return /*#__PURE__*/React.createElement(Cell, {
|
|
65
|
+
key: "header-column-" + j,
|
|
66
|
+
yOffset: getYOffset(i),
|
|
67
|
+
spanCount: spanCount,
|
|
68
|
+
className: classes.root
|
|
69
|
+
}, /*#__PURE__*/React.createElement(ItemCell, _extends({
|
|
70
|
+
justifyContent: "center",
|
|
71
|
+
sticky: spanCount > 1
|
|
72
|
+
}, value)));
|
|
73
|
+
}))(headerRow));
|
|
81
74
|
})(data);
|
|
82
75
|
};
|
|
83
76
|
|
|
84
|
-
Header.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
85
|
-
data: PropTypes.array.isRequired,
|
|
86
|
-
xColumnCount: PropTypes.number.isRequired,
|
|
87
|
-
onYVectorSize: PropTypes.func.isRequired,
|
|
88
|
-
getYOffset: PropTypes.func.isRequired
|
|
89
|
-
} : {};
|
|
90
|
-
|
|
91
77
|
export default Header;
|
package/es/Table/index.js
CHANGED
package/es/Table/itemCell.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import * as R from 'ramda';
|
|
4
3
|
import ItemTooltip from './tooltip';
|
|
5
4
|
|
|
@@ -12,8 +11,7 @@ var ItemCell = function ItemCell(_ref) {
|
|
|
12
11
|
fontWeight = _ref.fontWeight,
|
|
13
12
|
fontStyle = _ref.fontStyle,
|
|
14
13
|
_ref$sticky = _ref.sticky,
|
|
15
|
-
sticky = _ref$sticky ===
|
|
16
|
-
|
|
14
|
+
sticky = _ref$sticky === void 0 ? false : _ref$sticky;
|
|
17
15
|
var style = {
|
|
18
16
|
display: 'flex',
|
|
19
17
|
flexDirection: 'row',
|
|
@@ -27,28 +25,18 @@ var ItemCell = function ItemCell(_ref) {
|
|
|
27
25
|
paddingLeft: R.pipe(R.when(R.isNil, R.always([])), R.length, R.multiply(12))(parents),
|
|
28
26
|
height: '100%'
|
|
29
27
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
'
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
style: style
|
|
30
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
style: sticky ? {
|
|
32
|
+
display: 'inline-block',
|
|
33
|
+
position: 'sticky',
|
|
34
|
+
left: 8,
|
|
35
|
+
right: 8
|
|
36
|
+
} : {}
|
|
37
|
+
}, label, /*#__PURE__*/React.createElement(ItemTooltip, {
|
|
38
|
+
flags: flags
|
|
39
|
+
})));
|
|
41
40
|
};
|
|
42
41
|
|
|
43
|
-
ItemCell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
44
|
-
label: PropTypes.string,
|
|
45
|
-
flags: PropTypes.array,
|
|
46
|
-
parents: PropTypes.array,
|
|
47
|
-
justifyContent: PropTypes.string,
|
|
48
|
-
fontWeight: PropTypes.string,
|
|
49
|
-
fontStyle: PropTypes.string,
|
|
50
|
-
alignItems: PropTypes.string,
|
|
51
|
-
sticky: PropTypes.bool
|
|
52
|
-
} : {};
|
|
53
|
-
|
|
54
42
|
export default React.memo(ItemCell);
|
package/es/Table/row-header.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import _extends from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends";
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
3
|
import cx from 'classnames';
|
|
6
4
|
import * as R from 'ramda';
|
|
7
5
|
import { makeStyles } from '@material-ui/core/styles';
|
|
@@ -9,7 +7,6 @@ import sizeMe from 'react-sizeme';
|
|
|
9
7
|
import { Cell } from './styles';
|
|
10
8
|
import ItemCell from './itemCell';
|
|
11
9
|
import { getLight } from '../utils';
|
|
12
|
-
|
|
13
10
|
var useStyles = makeStyles(function (theme) {
|
|
14
11
|
return {
|
|
15
12
|
root: {
|
|
@@ -22,8 +19,11 @@ var useStyles = makeStyles(function (theme) {
|
|
|
22
19
|
highlight: theme.mixins.table.cellHighlight
|
|
23
20
|
};
|
|
24
21
|
});
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
var XVector = sizeMe({
|
|
23
|
+
noPlaceholder: true,
|
|
24
|
+
monitorHeight: true,
|
|
25
|
+
monitorWidth: false
|
|
26
|
+
})(Cell);
|
|
27
27
|
|
|
28
28
|
var RowHeader = function RowHeader(_ref) {
|
|
29
29
|
var data = _ref.data,
|
|
@@ -32,53 +32,34 @@ var RowHeader = function RowHeader(_ref) {
|
|
|
32
32
|
getYOffset = _ref.getYOffset,
|
|
33
33
|
yOffset = _ref.yOffset,
|
|
34
34
|
activeCellIds = _ref.activeCellIds;
|
|
35
|
-
|
|
36
35
|
var classes = useStyles();
|
|
37
36
|
if (R.isEmpty(data)) return null;
|
|
37
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, R.addIndex(R.map)(function (rowColumn, i) {
|
|
38
|
+
return /*#__PURE__*/React.createElement(XVector, {
|
|
39
|
+
key: "row-column-" + i,
|
|
40
|
+
yOffset: getYOffset(yOffset),
|
|
41
|
+
onSize: onYVectorSize(yOffset),
|
|
42
|
+
className: classes.root
|
|
43
|
+
}, /*#__PURE__*/React.createElement(ItemCell, _extends({
|
|
44
|
+
justifyContent: "flex-start",
|
|
45
|
+
fontWeight: "bold",
|
|
46
|
+
fontStyle: "italic"
|
|
47
|
+
}, R.propOr({}, 'dimension', rowColumn))));
|
|
48
|
+
}, data), /*#__PURE__*/React.createElement(Cell, {
|
|
49
|
+
yOffset: getYOffset(yOffset),
|
|
50
|
+
className: classes.sep
|
|
51
|
+
}), R.addIndex(R.map)(function (header, j) {
|
|
52
|
+
var _cx;
|
|
38
53
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
onSize: onYVectorSize(yOffset),
|
|
49
|
-
className: classes.root
|
|
50
|
-
},
|
|
51
|
-
React.createElement(ItemCell, _extends({
|
|
52
|
-
justifyContent: 'flex-start',
|
|
53
|
-
fontWeight: 'bold',
|
|
54
|
-
fontStyle: 'italic'
|
|
55
|
-
}, R.propOr({}, 'dimension', rowColumn)))
|
|
56
|
-
);
|
|
57
|
-
}, data),
|
|
58
|
-
React.createElement(Cell, { yOffset: getYOffset(yOffset), className: classes.sep }),
|
|
59
|
-
R.addIndex(R.map)(function (header, j) {
|
|
60
|
-
var _cx;
|
|
61
|
-
|
|
62
|
-
return React.createElement(
|
|
63
|
-
Cell,
|
|
64
|
-
{
|
|
65
|
-
key: 'row-header-' + j,
|
|
66
|
-
yOffset: getYOffset(yOffset),
|
|
67
|
-
className: cx(classes.sep, (_cx = {}, _cx[classes.highlight] = R.prop('col-' + j)(activeCellIds), _cx))
|
|
68
|
-
},
|
|
69
|
-
React.createElement(ItemCell, _extends({ justifyContent: 'center', alignItems: 'end' }, header))
|
|
70
|
-
);
|
|
71
|
-
}, headerData)
|
|
72
|
-
);
|
|
54
|
+
return /*#__PURE__*/React.createElement(Cell, {
|
|
55
|
+
key: "row-header-" + j,
|
|
56
|
+
yOffset: getYOffset(yOffset),
|
|
57
|
+
className: cx(classes.sep, (_cx = {}, _cx[classes.highlight] = R.prop("col-" + j)(activeCellIds), _cx))
|
|
58
|
+
}, /*#__PURE__*/React.createElement(ItemCell, _extends({
|
|
59
|
+
justifyContent: "center",
|
|
60
|
+
alignItems: "end"
|
|
61
|
+
}, header)));
|
|
62
|
+
}, headerData));
|
|
73
63
|
};
|
|
74
64
|
|
|
75
|
-
RowHeader.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
76
|
-
data: PropTypes.array.isRequired,
|
|
77
|
-
headerData: PropTypes.array.isRequired,
|
|
78
|
-
yOffset: PropTypes.number.isRequired,
|
|
79
|
-
onYVectorSize: PropTypes.func.isRequired,
|
|
80
|
-
getYOffset: PropTypes.func.isRequired,
|
|
81
|
-
activeCellIds: PropTypes.object
|
|
82
|
-
} : {};
|
|
83
|
-
|
|
84
65
|
export default RowHeader;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import cx from 'classnames';
|
|
4
3
|
import * as R from 'ramda';
|
|
5
4
|
import Lens from '@material-ui/icons/Lens';
|
|
@@ -8,7 +7,6 @@ import { makeStyles } from '@material-ui/core/styles';
|
|
|
8
7
|
import { Cell } from './styles';
|
|
9
8
|
import ItemTooltip from './tooltip';
|
|
10
9
|
import { getDark } from '../utils';
|
|
11
|
-
|
|
12
10
|
var Dot = withStyles(function (theme) {
|
|
13
11
|
return {
|
|
14
12
|
root: {
|
|
@@ -17,7 +15,6 @@ var Dot = withStyles(function (theme) {
|
|
|
17
15
|
}
|
|
18
16
|
};
|
|
19
17
|
})(Lens);
|
|
20
|
-
|
|
21
18
|
var useStyles = makeStyles(function (theme) {
|
|
22
19
|
return {
|
|
23
20
|
zCell: {
|
|
@@ -53,63 +50,41 @@ var SectionHeader = function SectionHeader(_ref) {
|
|
|
53
50
|
columnCount = _ref.columnCount,
|
|
54
51
|
yOffset = _ref.yOffset,
|
|
55
52
|
isRtl = _ref.isRtl;
|
|
56
|
-
|
|
57
53
|
var classes = useStyles();
|
|
58
54
|
if (R.isEmpty(R.propOr([], 'data', section))) return null;
|
|
59
55
|
var data = R.propOr([], 'data', section);
|
|
60
56
|
var hasFlag = R.find(R.pipe(R.path(['value', 'flags']), R.isEmpty, R.not))(data);
|
|
61
|
-
return React.createElement(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
return /*#__PURE__*/React.createElement(Cell, {
|
|
58
|
+
spanCount: columnCount,
|
|
59
|
+
yOffset: yOffset,
|
|
60
|
+
className: classes.zCell
|
|
61
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: classes.zAtom,
|
|
63
|
+
style: hasFlag ? {
|
|
64
|
+
paddingTop: 0
|
|
65
|
+
} : undefined
|
|
66
|
+
}, R.pipe(R.addIndex(R.map)(function (entry, index) {
|
|
67
|
+
var _cx;
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
R.pathOr('', ['value', 'label'], entry)
|
|
90
|
-
),
|
|
91
|
-
R.not(R.isEmpty(R.pathOr([], ['value', 'flags'], entry))) && React.createElement(
|
|
92
|
-
React.Fragment,
|
|
93
|
-
null,
|
|
94
|
-
'\xA0'
|
|
95
|
-
),
|
|
96
|
-
React.createElement(ItemTooltip, { flags: R.pathOr([], ['value', 'flags'], entry) })
|
|
97
|
-
);
|
|
98
|
-
}))(data)
|
|
99
|
-
),
|
|
100
|
-
React.createElement(
|
|
101
|
-
'div',
|
|
102
|
-
{ className: classes.zAtom, style: hasFlag ? { paddingTop: 0 } : undefined },
|
|
103
|
-
React.createElement(ItemTooltip, { flags: R.propOr([], 'flags', section) })
|
|
104
|
-
)
|
|
105
|
-
);
|
|
69
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
70
|
+
key: index
|
|
71
|
+
}, R.not(R.equals(index, 0)) && /*#__PURE__*/React.createElement("span", {
|
|
72
|
+
className: classes.zQuant
|
|
73
|
+
}, /*#__PURE__*/React.createElement(Dot, null)), /*#__PURE__*/React.createElement("span", {
|
|
74
|
+
className: cx(classes.zQuant, classes.zQuantDimension, (_cx = {}, _cx[classes.zQuantDimensionRtl] = isRtl, _cx))
|
|
75
|
+
}, R.pathOr('', ['dimension', 'label'], entry), ':'), /*#__PURE__*/React.createElement("span", {
|
|
76
|
+
className: classes.zQuant
|
|
77
|
+
}, R.pathOr('', ['value', 'label'], entry)), R.not(R.isEmpty(R.pathOr([], ['value', 'flags'], entry))) && /*#__PURE__*/React.createElement(React.Fragment, null, "\xA0"), /*#__PURE__*/React.createElement(ItemTooltip, {
|
|
78
|
+
flags: R.pathOr([], ['value', 'flags'], entry)
|
|
79
|
+
}));
|
|
80
|
+
}))(data)), /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
className: classes.zAtom,
|
|
82
|
+
style: hasFlag ? {
|
|
83
|
+
paddingTop: 0
|
|
84
|
+
} : undefined
|
|
85
|
+
}, /*#__PURE__*/React.createElement(ItemTooltip, {
|
|
86
|
+
flags: R.propOr([], 'flags', section)
|
|
87
|
+
})));
|
|
106
88
|
};
|
|
107
89
|
|
|
108
|
-
SectionHeader.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
109
|
-
section: PropTypes.object.isRequired,
|
|
110
|
-
yOffset: PropTypes.number.isRequired,
|
|
111
|
-
columnCount: PropTypes.number.isRequired,
|
|
112
|
-
isRtl: PropTypes.bool
|
|
113
|
-
} : {};
|
|
114
|
-
|
|
115
90
|
export default React.memo(SectionHeader);
|
package/es/Table/section-rows.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import _extends from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends";
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
3
|
import cx from 'classnames';
|
|
6
4
|
import * as R from 'ramda';
|
|
7
5
|
import { Cell } from './styles';
|
|
@@ -20,75 +18,54 @@ var SectionRows = function SectionRows(_ref) {
|
|
|
20
18
|
activeCellIds = _ref.activeCellIds,
|
|
21
19
|
activeCellHandler = _ref.activeCellHandler,
|
|
22
20
|
cellValueAccessor = _ref.cellValueAccessor;
|
|
23
|
-
|
|
24
21
|
var classes = useStyles();
|
|
25
|
-
|
|
26
22
|
if (R.lte(yColumnCount, 0)) return null;
|
|
27
23
|
return R.addIndex(R.map)(function (row, i) {
|
|
28
24
|
var _cx2;
|
|
29
25
|
|
|
30
|
-
var key = i +
|
|
31
|
-
return React.createElement(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
var key = i + "-" + sectionData.key + "-" + row.key;
|
|
27
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
28
|
+
style: {
|
|
29
|
+
display: 'contents'
|
|
30
|
+
},
|
|
31
|
+
key: key
|
|
32
|
+
}, R.addIndex(R.map)(function (entry, columnIndex) {
|
|
33
|
+
var _cx;
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
className: cx(classes.sCell, (_cx2 = {}, _cx2[classes.highlight] = R.prop(key)(activeCellIds), _cx2))
|
|
51
|
-
},
|
|
52
|
-
React.createElement(ItemTooltip, { flags: R.propOr([], 'flags', row) })
|
|
53
|
-
),
|
|
54
|
-
R.addIndex(R.map)(function (column, columnIndex) {
|
|
55
|
-
var _cx3;
|
|
35
|
+
return /*#__PURE__*/React.createElement(Cell, {
|
|
36
|
+
key: columnIndex,
|
|
37
|
+
parents: R.pathOr([], ['value', 'parents'], entry),
|
|
38
|
+
className: cx(classes.xCell, classes.xCellDimension, (_cx = {}, _cx[classes.highlight] = R.prop(key)(activeCellIds), _cx))
|
|
39
|
+
}, /*#__PURE__*/React.createElement(ItemCell, _extends({
|
|
40
|
+
justifyContent: "flex-start"
|
|
41
|
+
}, R.propOr({}, 'value', entry))));
|
|
42
|
+
}, R.propOr([], 'data', row)), /*#__PURE__*/React.createElement(Cell, {
|
|
43
|
+
className: cx(classes.sCell, (_cx2 = {}, _cx2[classes.highlight] = R.prop(key)(activeCellIds), _cx2))
|
|
44
|
+
}, /*#__PURE__*/React.createElement(ItemTooltip, {
|
|
45
|
+
flags: R.propOr([], 'flags', row)
|
|
46
|
+
})), R.addIndex(R.map)(function (column, columnIndex) {
|
|
47
|
+
var _cx3;
|
|
56
48
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
onClick: R.is(Function, activeCellHandler) ? function () {
|
|
66
|
-
var _activeCellHandler;
|
|
49
|
+
var keyCol = "col-" + columnIndex;
|
|
50
|
+
var intersectionCellId = key + "/" + keyCol;
|
|
51
|
+
var isActive = R.pipe(R.propOr({}, 'intersectionCellId'), R.equals(intersectionCellId))(activeCellIds);
|
|
52
|
+
return /*#__PURE__*/React.createElement(Cell, {
|
|
53
|
+
key: keyCol,
|
|
54
|
+
className: cx(classes.xCell, classes.xCellValue, (_cx3 = {}, _cx3[classes.xCellActive] = isActive, _cx3[classes.highlight] = R.any(R.identity)([R.prop(key)(activeCellIds), R.prop(keyCol)(activeCellIds)]), _cx3)),
|
|
55
|
+
onClick: R.is(Function, activeCellHandler) ? function () {
|
|
56
|
+
var _activeCellHandler;
|
|
67
57
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
);
|
|
58
|
+
return activeCellHandler((_activeCellHandler = {}, _activeCellHandler[key] = R.not(isActive), _activeCellHandler[keyCol] = R.not(isActive), _activeCellHandler.intersectionCellId = isActive ? null : intersectionCellId, _activeCellHandler));
|
|
59
|
+
} : null
|
|
60
|
+
}, /*#__PURE__*/React.createElement(ValueCell, _extends({}, R.pipe(R.pathOr({
|
|
61
|
+
value: '..'
|
|
62
|
+
}, [column.key, sectionData.key, row.key, 0]), cellValueAccessor)(cells), {
|
|
63
|
+
cellHandler: cellHandler
|
|
64
|
+
})));
|
|
65
|
+
}, headerData));
|
|
77
66
|
}, data);
|
|
78
67
|
};
|
|
79
68
|
|
|
80
|
-
SectionRows.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
81
|
-
cells: PropTypes.object.isRequired,
|
|
82
|
-
cellHandler: PropTypes.func,
|
|
83
|
-
cellValueAccessor: PropTypes.func,
|
|
84
|
-
data: PropTypes.array.isRequired,
|
|
85
|
-
headerData: PropTypes.array.isRequired,
|
|
86
|
-
sectionData: PropTypes.object.isRequired,
|
|
87
|
-
yColumnCount: PropTypes.number.isRequired,
|
|
88
|
-
activeCellIds: PropTypes.object,
|
|
89
|
-
activeCellHandler: PropTypes.func
|
|
90
|
-
} : {};
|
|
91
|
-
|
|
92
69
|
SectionRows.defaultProps = {
|
|
93
70
|
cells: {},
|
|
94
71
|
cellValueAccessor: R.identity,
|
|
@@ -97,5 +74,4 @@ SectionRows.defaultProps = {
|
|
|
97
74
|
sectionData: [],
|
|
98
75
|
yColumnCount: 1
|
|
99
76
|
};
|
|
100
|
-
|
|
101
77
|
export default React.memo(SectionRows);
|
package/es/Table/styles.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import glamorous from 'glamorous';
|
|
3
3
|
import * as R from 'ramda';
|
|
4
|
-
|
|
5
4
|
export var cell = {
|
|
6
|
-
outline:
|
|
5
|
+
outline: "1px solid #A4A1A1",
|
|
7
6
|
fontSize: 12,
|
|
8
7
|
fontWeight: 400,
|
|
9
8
|
lineHeight: 1.43,
|
|
10
9
|
padding: '0px 8px',
|
|
11
10
|
zIndex: 1
|
|
12
11
|
};
|
|
13
|
-
|
|
14
12
|
export var Cell = glamorous.div(cell, function (_ref) {
|
|
15
13
|
var spanCount = _ref.spanCount,
|
|
16
14
|
yOffset = _ref.yOffset;
|
|
17
15
|
return {
|
|
18
16
|
'@supports (display: grid)': {
|
|
19
|
-
gridColumn:
|
|
17
|
+
gridColumn: "span " + R.defaultTo(1, spanCount)
|
|
20
18
|
},
|
|
21
19
|
'@supports (position: sticky)': {
|
|
22
20
|
position: R.isNil(yOffset) ? null : 'sticky',
|
|
@@ -24,14 +22,12 @@ export var Cell = glamorous.div(cell, function (_ref) {
|
|
|
24
22
|
}
|
|
25
23
|
};
|
|
26
24
|
});
|
|
27
|
-
|
|
28
25
|
Cell.propTypes = {
|
|
29
26
|
className: PropTypes.string,
|
|
30
27
|
spanCount: PropTypes.number,
|
|
31
28
|
yOffset: PropTypes.number,
|
|
32
29
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
|
33
30
|
};
|
|
34
|
-
|
|
35
31
|
export var Table = glamorous.div({
|
|
36
32
|
display: '-ms-grid',
|
|
37
33
|
'@supports (display: grid)': {
|
|
@@ -42,9 +38,7 @@ export var Table = glamorous.div({
|
|
|
42
38
|
}, function (_ref2) {
|
|
43
39
|
var columnCount = _ref2.columnCount,
|
|
44
40
|
xColumnCount = _ref2.xColumnCount;
|
|
45
|
-
|
|
46
41
|
var gridTemplateColumns = R.pipe(R.times(R.always('auto')), R.update(R.dec(xColumnCount), '30px'), R.join(' '))(columnCount);
|
|
47
|
-
|
|
48
42
|
return {
|
|
49
43
|
gridTemplateColumns: gridTemplateColumns,
|
|
50
44
|
msGridColumns: gridTemplateColumns
|
package/es/Table/tableCell.js
CHANGED
|
@@ -1,29 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import _extends from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends";
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
3
|
import cx from 'classnames';
|
|
6
4
|
import ValueCell from './valueCell';
|
|
7
5
|
import useStyles from './useStyles';
|
|
8
6
|
|
|
9
7
|
var TableCell = function TableCell(_ref) {
|
|
10
8
|
var _ref$cell = _ref.cell,
|
|
11
|
-
cell = _ref$cell ===
|
|
9
|
+
cell = _ref$cell === void 0 ? {} : _ref$cell,
|
|
12
10
|
cellHandler = _ref.cellHandler;
|
|
13
|
-
|
|
14
11
|
var classes = useStyles();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: cx(classes.cell, classes.xCell, classes.xCellValue)
|
|
14
|
+
}, /*#__PURE__*/React.createElement(ValueCell, _extends({}, cell, {
|
|
15
|
+
cellHandler: cellHandler
|
|
16
|
+
})));
|
|
21
17
|
};
|
|
22
18
|
|
|
23
|
-
TableCell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
24
|
-
cell: PropTypes.object,
|
|
25
|
-
cellHandler: PropTypes.func,
|
|
26
|
-
isRtl: PropTypes.bool
|
|
27
|
-
} : {};
|
|
28
|
-
|
|
29
19
|
export default TableCell;
|