@sis-cc/dotstatsuite-visions 6.6.0 → 6.6.4
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 +135 -66
- package/es/Alert/index.js +1 -0
- package/es/ApiQueries/ApiQueries.js +79 -45
- package/es/ApiQueries/Query.js +105 -65
- package/es/ApiQueries/index.js +1 -0
- package/es/AuthDialog/index.js +103 -62
- package/es/Breadcrumbs/Breadcrumbs.js +38 -21
- package/es/Breadcrumbs/index.js +1 -0
- package/es/Button/Button.js +28 -11
- package/es/Button/index.js +1 -0
- package/es/ChartsConfig/Axis.js +76 -72
- package/es/ChartsConfig/ButtonGroup.js +51 -29
- package/es/ChartsConfig/ChartsConfig.js +187 -87
- package/es/ChartsConfig/ContainerTitle.js +36 -15
- package/es/ChartsConfig/Focus.js +48 -37
- package/es/ChartsConfig/Frequency.js +36 -24
- package/es/ChartsConfig/Series.js +43 -28
- package/es/ChartsConfig/Size.js +50 -36
- package/es/ChartsConfig/index.js +1 -0
- package/es/ChartsConfig/styles.js +4 -4
- package/es/ChartsConfig/utils.js +5 -1
- package/es/Chips/Chips.js +154 -99
- package/es/Chips/index.js +1 -0
- package/es/CollapseButtons/CollapseButtons.js +101 -61
- package/es/CollapseButtons/Item.js +70 -45
- package/es/CollapseButtons/Paper.js +21 -7
- package/es/CollapseButtons/index.js +1 -0
- package/es/DataEdit/DataEdit.js +124 -67
- package/es/DataEdit/Input.js +58 -27
- package/es/DataEdit/index.js +1 -0
- package/es/DataFooter/DataFooter.js +115 -68
- package/es/DataFooter/index.js +1 -0
- package/es/DataHeader/DataHeader.js +113 -75
- package/es/DataHeader/Flags.js +21 -8
- package/es/DataHeader/Title.js +15 -2
- package/es/DataHeader/TooltipHeader.js +63 -33
- package/es/DataHeader/index.js +1 -0
- package/es/DataHeader/utils.js +8 -8
- package/es/Dataflow/Dataflow.js +226 -132
- package/es/Dataflow/index.js +1 -0
- package/es/ExpansionPanel/ExpansionPanel.js +79 -42
- package/es/ExpansionPanel/index.js +1 -0
- package/es/ExpansionPanel/styles.js +5 -3
- package/es/Icons/AccessibilityFilled.js +8 -6
- package/es/Icons/AccessibilityOutlined.js +8 -6
- package/es/Icons/AccountFilled.js +8 -6
- package/es/Icons/AccountOutlined.js +8 -6
- package/es/Icons/Api.js +8 -6
- package/es/Icons/Asterisk.js +8 -6
- package/es/Icons/Bar.js +8 -6
- package/es/Icons/CopyContent.js +8 -6
- package/es/Icons/Cross.js +8 -6
- package/es/Icons/HSymbol.js +8 -6
- package/es/Icons/Row.js +8 -6
- package/es/Icons/Scatter.js +8 -6
- package/es/Icons/StackedBar.js +8 -6
- package/es/Icons/StackedRow.js +8 -6
- package/es/Icons/Timeline.js +8 -6
- package/es/Icons/VSymbol.js +8 -6
- package/es/Icons/Warning.js +14 -11
- package/es/Icons/index.js +1 -0
- package/es/Input/Input.js +56 -26
- package/es/Input/index.js +1 -0
- package/es/Input/with-input.js +25 -30
- package/es/InputNumber/InputNumber.js +51 -31
- package/es/InputNumber/index.js +1 -0
- package/es/LabelDivider/LabelDivider.js +18 -7
- package/es/LabelDivider/index.js +1 -0
- package/es/Loading/Loading.js +18 -9
- package/es/Loading/index.js +1 -0
- package/es/Logo/Logo.js +17 -11
- package/es/Logo/index.js +1 -0
- package/es/NoData/NoData.js +25 -17
- package/es/NoData/index.js +1 -0
- package/es/Pagination/Pagination.js +114 -70
- package/es/Pagination/index.js +1 -0
- package/es/PeriodPicker/PeriodPicker.js +124 -101
- package/es/PeriodPicker/constants.js +13 -78
- package/es/PeriodPicker/index.js +1 -0
- package/es/PeriodPicker/lib.js +23 -37
- package/es/PeriodPicker/styles.js +1 -0
- package/es/ScopeList/Header.js +60 -41
- package/es/ScopeList/Item.js +144 -98
- package/es/ScopeList/ScopeList.js +184 -132
- package/es/ScopeList/Selection.js +93 -51
- package/es/ScopeList/index.js +1 -0
- package/es/ScopeList/styles.js +3 -2
- package/es/ScopeList/with-scope-list.js +88 -151
- package/es/Select/Select.js +60 -44
- package/es/Select/index.js +1 -0
- package/es/Share/Form.js +88 -58
- package/es/Share/Mode.js +98 -36
- package/es/Share/Share.js +64 -41
- package/es/Share/index.js +10 -1
- package/es/SisccFooter/SisccFooter.js +36 -29
- package/es/SisccFooter/index.js +1 -0
- package/es/Spotlight/Fields.js +71 -37
- package/es/Spotlight/Spotlight.js +92 -51
- package/es/Spotlight/index.js +1 -0
- package/es/Spotlight/useSpotlight.js +13 -33
- package/es/Spotlight/useStyles.js +4 -2
- package/es/Table/Table.js +71 -50
- package/es/Table/header.js +50 -36
- package/es/Table/index.js +1 -0
- package/es/Table/itemCell.js +25 -13
- package/es/Table/row-header.js +50 -31
- package/es/Table/section-header.js +55 -30
- package/es/Table/section-rows.js +62 -38
- package/es/Table/styles.js +8 -2
- package/es/Table/tableCell.js +17 -7
- package/es/Table/tooltip.js +41 -21
- package/es/Table/useStyles.js +3 -2
- package/es/Table/valueCell.js +41 -26
- package/es/TableFooter/TableFooter.js +70 -42
- package/es/TableFooter/index.js +1 -0
- package/es/TableHeader/TableHeader.js +36 -18
- package/es/TableHeader/index.js +1 -0
- package/es/TableHtml5/TableHtml5.js +72 -60
- package/es/TableHtml5/cell.js +55 -35
- package/es/TableHtml5/flags.js +58 -29
- package/es/TableHtml5/header.js +85 -53
- package/es/TableHtml5/index.js +1 -0
- package/es/TableHtml5/section.js +131 -86
- package/es/TableHtml5/sectionHeader.js +72 -45
- package/es/TableHtml5/subHeader.js +70 -47
- package/es/TableLayout/Box.js +66 -33
- package/es/TableLayout/DnDItem.js +68 -37
- package/es/TableLayout/TableLayout.js +177 -105
- package/es/TableLayout/constants.js +2 -0
- package/es/TableLayout/index.js +1 -0
- package/es/TableLayout/lib.js +3 -1
- package/es/TablePreview/TablePreview.js +176 -99
- package/es/TablePreview/index.js +1 -0
- package/es/TablePreview/lib.js +4 -5
- package/es/TablePreview/styles.js +1 -0
- package/es/Tag/Tag.js +21 -5
- package/es/Tag/index.js +1 -0
- package/es/ToggleButton/ToggleButton.js +29 -17
- package/es/ToggleButton/index.js +1 -0
- package/es/Tooltip/Tooltip.js +32 -20
- package/es/Tooltip/index.js +1 -0
- package/es/VerticalButton/VerticalButton.js +22 -17
- package/es/VerticalButton/index.js +1 -0
- package/es/index.js +4 -2
- package/es/theme.js +14 -22
- package/es/utils.js +14 -16
- package/lib/Alert/Alert.js +168 -87
- package/lib/Alert/index.js +12 -7
- package/lib/ApiQueries/ApiQueries.js +105 -61
- package/lib/ApiQueries/Query.js +132 -85
- package/lib/ApiQueries/index.js +12 -7
- package/lib/AuthDialog/index.js +137 -82
- package/lib/Breadcrumbs/Breadcrumbs.js +68 -39
- package/lib/Breadcrumbs/index.js +12 -7
- package/lib/Button/Button.js +47 -28
- package/lib/Button/index.js +12 -7
- package/lib/ChartsConfig/Axis.js +100 -88
- package/lib/ChartsConfig/ButtonGroup.js +74 -43
- package/lib/ChartsConfig/ChartsConfig.js +236 -113
- package/lib/ChartsConfig/ContainerTitle.js +59 -30
- package/lib/ChartsConfig/Focus.js +71 -53
- package/lib/ChartsConfig/Frequency.js +59 -39
- package/lib/ChartsConfig/Series.js +70 -45
- package/lib/ChartsConfig/Size.js +77 -53
- package/lib/ChartsConfig/index.js +12 -7
- package/lib/ChartsConfig/styles.js +11 -16
- package/lib/ChartsConfig/utils.js +13 -14
- package/lib/Chips/Chips.js +192 -122
- package/lib/Chips/index.js +12 -7
- package/lib/CollapseButtons/CollapseButtons.js +134 -84
- package/lib/CollapseButtons/Item.js +98 -64
- package/lib/CollapseButtons/Paper.js +41 -19
- package/lib/CollapseButtons/index.js +12 -7
- package/lib/DataEdit/DataEdit.js +156 -88
- package/lib/DataEdit/Input.js +82 -42
- package/lib/DataEdit/index.js +12 -7
- package/lib/DataFooter/DataFooter.js +144 -88
- package/lib/DataFooter/index.js +12 -7
- package/lib/DataHeader/DataHeader.js +158 -106
- package/lib/DataHeader/Flags.js +34 -18
- package/lib/DataHeader/Title.js +27 -11
- package/lib/DataHeader/TooltipHeader.js +79 -48
- package/lib/DataHeader/index.js +12 -7
- package/lib/DataHeader/utils.js +10 -16
- package/lib/Dataflow/Dataflow.js +277 -159
- package/lib/Dataflow/index.js +12 -7
- package/lib/ExpansionPanel/ExpansionPanel.js +116 -63
- package/lib/ExpansionPanel/index.js +12 -7
- package/lib/ExpansionPanel/styles.js +12 -15
- package/lib/Icons/AccessibilityFilled.js +17 -15
- package/lib/Icons/AccessibilityOutlined.js +17 -15
- package/lib/Icons/AccountFilled.js +17 -15
- package/lib/Icons/AccountOutlined.js +17 -15
- package/lib/Icons/Api.js +17 -15
- package/lib/Icons/Asterisk.js +17 -15
- package/lib/Icons/Bar.js +17 -15
- package/lib/Icons/CopyContent.js +17 -15
- package/lib/Icons/Cross.js +17 -15
- package/lib/Icons/HSymbol.js +17 -15
- package/lib/Icons/Row.js +17 -15
- package/lib/Icons/Scatter.js +17 -15
- package/lib/Icons/StackedBar.js +17 -15
- package/lib/Icons/StackedRow.js +17 -15
- package/lib/Icons/Timeline.js +17 -15
- package/lib/Icons/VSymbol.js +17 -15
- package/lib/Icons/Warning.js +31 -27
- package/lib/Icons/index.js +152 -68
- package/lib/Input/Input.js +85 -47
- package/lib/Input/index.js +12 -7
- package/lib/Input/with-input.js +35 -38
- package/lib/InputNumber/InputNumber.js +80 -50
- package/lib/InputNumber/index.js +12 -7
- package/lib/LabelDivider/LabelDivider.js +37 -23
- package/lib/LabelDivider/index.js +12 -7
- package/lib/Loading/Loading.js +35 -20
- package/lib/Loading/index.js +12 -7
- package/lib/Logo/Logo.js +28 -20
- package/lib/Logo/index.js +12 -7
- package/lib/NoData/NoData.js +42 -28
- package/lib/NoData/index.js +12 -7
- package/lib/Pagination/Pagination.js +150 -91
- package/lib/Pagination/index.js +12 -7
- package/lib/PeriodPicker/PeriodPicker.js +150 -121
- package/lib/PeriodPicker/constants.js +37 -126
- package/lib/PeriodPicker/index.js +12 -7
- package/lib/PeriodPicker/lib.js +61 -99
- package/lib/PeriodPicker/styles.js +4 -7
- package/lib/ScopeList/Header.js +88 -58
- package/lib/ScopeList/Item.js +177 -116
- package/lib/ScopeList/ScopeList.js +234 -160
- package/lib/ScopeList/Selection.js +131 -70
- package/lib/ScopeList/index.js +12 -7
- package/lib/ScopeList/styles.js +9 -10
- package/lib/ScopeList/with-scope-list.js +108 -199
- package/lib/Select/Select.js +80 -59
- package/lib/Select/index.js +12 -7
- package/lib/Share/Form.js +119 -77
- package/lib/Share/Mode.js +130 -54
- package/lib/Share/Share.js +91 -59
- package/lib/Share/index.js +12 -7
- package/lib/SisccFooter/SisccFooter.js +63 -44
- package/lib/SisccFooter/index.js +12 -7
- package/lib/Spotlight/Fields.js +100 -54
- package/lib/Spotlight/Spotlight.js +136 -75
- package/lib/Spotlight/index.js +12 -7
- package/lib/Spotlight/useSpotlight.js +20 -44
- package/lib/Spotlight/useStyles.js +12 -15
- package/lib/Table/Table.js +102 -69
- package/lib/Table/header.js +70 -51
- package/lib/Table/index.js +12 -7
- package/lib/Table/itemCell.js +41 -25
- package/lib/Table/row-header.js +75 -49
- package/lib/Table/section-header.js +82 -50
- package/lib/Table/section-rows.js +94 -60
- package/lib/Table/styles.js +25 -23
- package/lib/Table/tableCell.js +37 -19
- package/lib/Table/tooltip.js +54 -36
- package/lib/Table/useStyles.js +8 -11
- package/lib/Table/valueCell.js +59 -39
- package/lib/TableFooter/TableFooter.js +93 -57
- package/lib/TableFooter/index.js +12 -7
- package/lib/TableHeader/TableHeader.js +56 -32
- package/lib/TableHeader/index.js +12 -7
- package/lib/TableHtml5/TableHtml5.js +100 -78
- package/lib/TableHtml5/cell.js +84 -52
- package/lib/TableHtml5/flags.js +82 -48
- package/lib/TableHtml5/header.js +115 -70
- package/lib/TableHtml5/index.js +17 -8
- package/lib/TableHtml5/section.js +171 -109
- package/lib/TableHtml5/sectionHeader.js +102 -64
- package/lib/TableHtml5/subHeader.js +98 -65
- package/lib/TableLayout/Box.js +97 -54
- package/lib/TableLayout/DnDItem.js +98 -58
- package/lib/TableLayout/TableLayout.js +232 -140
- package/lib/TableLayout/constants.js +6 -8
- package/lib/TableLayout/index.js +12 -7
- package/lib/TableLayout/lib.js +9 -14
- package/lib/TablePreview/TablePreview.js +205 -118
- package/lib/TablePreview/index.js +12 -7
- package/lib/TablePreview/lib.js +19 -30
- package/lib/TablePreview/styles.js +6 -7
- package/lib/Tag/Tag.js +38 -19
- package/lib/Tag/index.js +12 -7
- package/lib/ToggleButton/ToggleButton.js +55 -33
- package/lib/ToggleButton/index.js +12 -7
- package/lib/Tooltip/Tooltip.js +50 -34
- package/lib/Tooltip/index.js +12 -7
- package/lib/VerticalButton/VerticalButton.js +46 -40
- package/lib/VerticalButton/index.js +12 -7
- package/lib/index.js +304 -137
- package/lib/theme.js +17 -31
- package/lib/utils.js +31 -46
- package/package.json +10 -2
package/es/Table/section-rows.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
2
|
+
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
3
5
|
import cx from 'classnames';
|
|
4
6
|
import * as R from 'ramda';
|
|
5
7
|
import { Cell } from './styles';
|
|
@@ -18,54 +20,75 @@ var SectionRows = function SectionRows(_ref) {
|
|
|
18
20
|
activeCellIds = _ref.activeCellIds,
|
|
19
21
|
activeCellHandler = _ref.activeCellHandler,
|
|
20
22
|
cellValueAccessor = _ref.cellValueAccessor;
|
|
23
|
+
|
|
21
24
|
var classes = useStyles();
|
|
25
|
+
|
|
22
26
|
if (R.lte(yColumnCount, 0)) return null;
|
|
23
27
|
return R.addIndex(R.map)(function (row, i) {
|
|
24
28
|
var _cx2;
|
|
25
29
|
|
|
26
|
-
var key = i +
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, R.addIndex(R.map)(function (entry, columnIndex) {
|
|
33
|
-
var _cx;
|
|
30
|
+
var key = i + '-' + sectionData.key + '-' + row.key;
|
|
31
|
+
return React.createElement(
|
|
32
|
+
'span',
|
|
33
|
+
{ style: { display: 'contents' }, key: key },
|
|
34
|
+
R.addIndex(R.map)(function (entry, columnIndex) {
|
|
35
|
+
var _cx;
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
return React.createElement(
|
|
38
|
+
Cell,
|
|
39
|
+
{
|
|
40
|
+
key: columnIndex,
|
|
41
|
+
parents: R.pathOr([], ['value', 'parents'], entry),
|
|
42
|
+
className: cx(classes.xCell, classes.xCellDimension, (_cx = {}, _cx[classes.highlight] = R.prop(key)(activeCellIds), _cx))
|
|
43
|
+
},
|
|
44
|
+
React.createElement(ItemCell, _extends({ justifyContent: 'flex-start' }, R.propOr({}, 'value', entry)))
|
|
45
|
+
);
|
|
46
|
+
}, R.propOr([], 'data', row)),
|
|
47
|
+
React.createElement(
|
|
48
|
+
Cell,
|
|
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;
|
|
48
56
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
var keyCol = 'col-' + columnIndex;
|
|
58
|
+
var intersectionCellId = key + '/' + keyCol;
|
|
59
|
+
var isActive = R.pipe(R.propOr({}, 'intersectionCellId'), R.equals(intersectionCellId))(activeCellIds);
|
|
60
|
+
return React.createElement(
|
|
61
|
+
Cell,
|
|
62
|
+
{
|
|
63
|
+
key: keyCol,
|
|
64
|
+
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)),
|
|
65
|
+
onClick: R.is(Function, activeCellHandler) ? function () {
|
|
66
|
+
var _activeCellHandler;
|
|
57
67
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
return activeCellHandler((_activeCellHandler = {}, _activeCellHandler[key] = R.not(isActive), _activeCellHandler[keyCol] = R.not(isActive), _activeCellHandler.intersectionCellId = isActive ? null : intersectionCellId, _activeCellHandler));
|
|
69
|
+
} : null
|
|
70
|
+
},
|
|
71
|
+
React.createElement(ValueCell, _extends({}, R.pipe(R.pathOr({ value: '..' }, [column.key, sectionData.key, row.key, 0]), cellValueAccessor)(cells), {
|
|
72
|
+
cellHandler: cellHandler
|
|
73
|
+
}))
|
|
74
|
+
);
|
|
75
|
+
}, headerData)
|
|
76
|
+
);
|
|
66
77
|
}, data);
|
|
67
78
|
};
|
|
68
79
|
|
|
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
|
+
|
|
69
92
|
SectionRows.defaultProps = {
|
|
70
93
|
cells: {},
|
|
71
94
|
cellValueAccessor: R.identity,
|
|
@@ -74,4 +97,5 @@ SectionRows.defaultProps = {
|
|
|
74
97
|
sectionData: [],
|
|
75
98
|
yColumnCount: 1
|
|
76
99
|
};
|
|
100
|
+
|
|
77
101
|
export default React.memo(SectionRows);
|
package/es/Table/styles.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import glamorous from 'glamorous';
|
|
3
3
|
import * as R from 'ramda';
|
|
4
|
+
|
|
4
5
|
export var cell = {
|
|
5
|
-
outline:
|
|
6
|
+
outline: '1px solid #A4A1A1',
|
|
6
7
|
fontSize: 12,
|
|
7
8
|
fontWeight: 400,
|
|
8
9
|
lineHeight: 1.43,
|
|
9
10
|
padding: '0px 8px',
|
|
10
11
|
zIndex: 1
|
|
11
12
|
};
|
|
13
|
+
|
|
12
14
|
export var Cell = glamorous.div(cell, function (_ref) {
|
|
13
15
|
var spanCount = _ref.spanCount,
|
|
14
16
|
yOffset = _ref.yOffset;
|
|
15
17
|
return {
|
|
16
18
|
'@supports (display: grid)': {
|
|
17
|
-
gridColumn:
|
|
19
|
+
gridColumn: 'span ' + R.defaultTo(1, spanCount)
|
|
18
20
|
},
|
|
19
21
|
'@supports (position: sticky)': {
|
|
20
22
|
position: R.isNil(yOffset) ? null : 'sticky',
|
|
@@ -22,12 +24,14 @@ export var Cell = glamorous.div(cell, function (_ref) {
|
|
|
22
24
|
}
|
|
23
25
|
};
|
|
24
26
|
});
|
|
27
|
+
|
|
25
28
|
Cell.propTypes = {
|
|
26
29
|
className: PropTypes.string,
|
|
27
30
|
spanCount: PropTypes.number,
|
|
28
31
|
yOffset: PropTypes.number,
|
|
29
32
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
|
30
33
|
};
|
|
34
|
+
|
|
31
35
|
export var Table = glamorous.div({
|
|
32
36
|
display: '-ms-grid',
|
|
33
37
|
'@supports (display: grid)': {
|
|
@@ -38,7 +42,9 @@ export var Table = glamorous.div({
|
|
|
38
42
|
}, function (_ref2) {
|
|
39
43
|
var columnCount = _ref2.columnCount,
|
|
40
44
|
xColumnCount = _ref2.xColumnCount;
|
|
45
|
+
|
|
41
46
|
var gridTemplateColumns = R.pipe(R.times(R.always('auto')), R.update(R.dec(xColumnCount), '30px'), R.join(' '))(columnCount);
|
|
47
|
+
|
|
42
48
|
return {
|
|
43
49
|
gridTemplateColumns: gridTemplateColumns,
|
|
44
50
|
msGridColumns: gridTemplateColumns
|
package/es/Table/tableCell.js
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
2
|
+
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
3
5
|
import cx from 'classnames';
|
|
4
6
|
import ValueCell from './valueCell';
|
|
5
7
|
import useStyles from './useStyles';
|
|
6
8
|
|
|
7
9
|
var TableCell = function TableCell(_ref) {
|
|
8
10
|
var _ref$cell = _ref.cell,
|
|
9
|
-
cell = _ref$cell ===
|
|
11
|
+
cell = _ref$cell === undefined ? {} : _ref$cell,
|
|
10
12
|
cellHandler = _ref.cellHandler;
|
|
13
|
+
|
|
11
14
|
var classes = useStyles();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
return React.createElement(
|
|
17
|
+
'div',
|
|
18
|
+
{ className: cx(classes.cell, classes.xCell, classes.xCellValue) },
|
|
19
|
+
React.createElement(ValueCell, _extends({}, cell, { cellHandler: cellHandler }))
|
|
20
|
+
);
|
|
17
21
|
};
|
|
18
22
|
|
|
23
|
+
TableCell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
24
|
+
cell: PropTypes.object,
|
|
25
|
+
cellHandler: PropTypes.func,
|
|
26
|
+
isRtl: PropTypes.bool
|
|
27
|
+
} : {};
|
|
28
|
+
|
|
19
29
|
export default TableCell;
|
package/es/Table/tooltip.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
2
|
+
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
3
5
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
6
|
import * as R from 'ramda';
|
|
5
7
|
import { Tooltip, Asterisk } from '../';
|
|
8
|
+
|
|
6
9
|
var useStyles = makeStyles(function (theme) {
|
|
7
10
|
return {
|
|
8
11
|
content: {
|
|
@@ -34,32 +37,49 @@ var useStyles = makeStyles(function (theme) {
|
|
|
34
37
|
|
|
35
38
|
var ItemTooltip = function ItemTooltip(_ref) {
|
|
36
39
|
var flags = _ref.flags;
|
|
40
|
+
|
|
37
41
|
var classes = useStyles();
|
|
38
42
|
if (R.anyPass([R.isNil, R.isEmpty])(flags)) return null;
|
|
39
43
|
var hasUncoded = R.any(R.complement(R.has('code')), flags);
|
|
40
44
|
var codedIcons = R.pipe(R.reduce(function (acc, flag) {
|
|
41
45
|
return R.when(R.always(R.has('code', flag)), R.append(flag.code))(acc);
|
|
42
46
|
}, []), R.join(','))(flags);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
47
|
+
|
|
48
|
+
var content = React.createElement(
|
|
49
|
+
'ul',
|
|
50
|
+
{ className: classes.content },
|
|
51
|
+
R.addIndex(R.map)(function (_ref2, index) {
|
|
52
|
+
var label = _ref2.label;
|
|
53
|
+
return React.createElement(
|
|
54
|
+
'li',
|
|
55
|
+
{ key: index },
|
|
56
|
+
label
|
|
57
|
+
);
|
|
58
|
+
}, flags)
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
return React.createElement(
|
|
62
|
+
Tooltip,
|
|
63
|
+
{ title: content, placement: 'top', enterNextDelay: 100 },
|
|
64
|
+
React.createElement(
|
|
65
|
+
'span',
|
|
66
|
+
{ className: classes.flags },
|
|
67
|
+
R.not(R.isEmpty(codedIcons)) && codedIcons,
|
|
68
|
+
R.and(R.not(R.isEmpty(codedIcons)), hasUncoded) && React.createElement(
|
|
69
|
+
React.Fragment,
|
|
70
|
+
null,
|
|
71
|
+
','
|
|
72
|
+
),
|
|
73
|
+
hasUncoded && React.createElement(Asterisk, { className: classes.svg, style: { fontSize: 11 } })
|
|
74
|
+
)
|
|
75
|
+
);
|
|
63
76
|
};
|
|
64
77
|
|
|
78
|
+
ItemTooltip.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
79
|
+
flags: PropTypes.arrayOf(PropTypes.shape({
|
|
80
|
+
code: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
81
|
+
label: PropTypes.string
|
|
82
|
+
}))
|
|
83
|
+
} : {};
|
|
84
|
+
|
|
65
85
|
export default React.memo(ItemTooltip);
|
package/es/Table/useStyles.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { makeStyles } from '@material-ui/core/styles';
|
|
2
2
|
import { getLight } from '../utils';
|
|
3
3
|
import { cell } from './styles';
|
|
4
|
+
|
|
4
5
|
export default makeStyles(function (theme) {
|
|
5
6
|
return {
|
|
6
7
|
cell: cell,
|
|
@@ -15,11 +16,11 @@ export default makeStyles(function (theme) {
|
|
|
15
16
|
},
|
|
16
17
|
xCellValue: {
|
|
17
18
|
'&:hover': {
|
|
18
|
-
boxShadow:
|
|
19
|
+
boxShadow: 'inset 0 0 0 3px ' + theme.palette.primary.main
|
|
19
20
|
}
|
|
20
21
|
},
|
|
21
22
|
xCellActive: {
|
|
22
|
-
boxShadow:
|
|
23
|
+
boxShadow: 'inset 0 0 0 3px ' + theme.palette.primary.main
|
|
23
24
|
},
|
|
24
25
|
sCell: {
|
|
25
26
|
backgroundColor: theme.palette.grey[200],
|
package/es/Table/valueCell.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
2
|
+
|
|
2
3
|
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
3
5
|
import Link from '@material-ui/core/Link';
|
|
4
6
|
import * as R from 'ramda';
|
|
5
7
|
import ItemTooltip from './tooltip';
|
|
@@ -8,8 +10,9 @@ var ValueCell = function ValueCell(_ref) {
|
|
|
8
10
|
var value = _ref.value,
|
|
9
11
|
flags = _ref.flags,
|
|
10
12
|
_ref$indexedDimValIds = _ref.indexedDimValIds,
|
|
11
|
-
indexedDimValIds = _ref$indexedDimValIds ===
|
|
13
|
+
indexedDimValIds = _ref$indexedDimValIds === undefined ? {} : _ref$indexedDimValIds,
|
|
12
14
|
cellHandler = _ref.cellHandler;
|
|
15
|
+
|
|
13
16
|
var style = {
|
|
14
17
|
textAlign: 'right',
|
|
15
18
|
whiteSpace: R.isEmpty(flags) ? undefined : 'nowrap',
|
|
@@ -17,32 +20,44 @@ var ValueCell = function ValueCell(_ref) {
|
|
|
17
20
|
paddingBottom: 4
|
|
18
21
|
};
|
|
19
22
|
|
|
20
|
-
var _value = R.pipe(R.split('\n'), R.intersperse(
|
|
23
|
+
var _value = R.pipe(R.split('\n'), R.intersperse(React.createElement('br', null)))(value);
|
|
21
24
|
|
|
22
|
-
var uiValue = R.is(Function, cellHandler) && !R.isEmpty(indexedDimValIds) ?
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
var uiValue = R.is(Function, cellHandler) && !R.isEmpty(indexedDimValIds) ? React.createElement(
|
|
26
|
+
Link,
|
|
27
|
+
{
|
|
28
|
+
component: 'button',
|
|
29
|
+
variant: 'body2',
|
|
30
|
+
color: 'inherit',
|
|
31
|
+
underline: 'always',
|
|
32
|
+
style: { fontSize: 12 },
|
|
33
|
+
onClick: function onClick() {
|
|
34
|
+
return cellHandler({ indexedDimValIds: indexedDimValIds });
|
|
35
|
+
}
|
|
29
36
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
_value
|
|
38
|
+
) : _value;
|
|
39
|
+
|
|
40
|
+
if (R.anyPass([R.isNil, R.isEmpty])(flags)) return React.createElement(
|
|
41
|
+
'div',
|
|
42
|
+
{ style: style },
|
|
43
|
+
' ',
|
|
44
|
+
uiValue
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
return React.createElement(
|
|
48
|
+
'div',
|
|
49
|
+
{ style: _extends({}, style, { paddingTop: 0 }) },
|
|
50
|
+
React.createElement(ItemTooltip, { flags: flags }),
|
|
51
|
+
uiValue
|
|
52
|
+
);
|
|
46
53
|
};
|
|
47
54
|
|
|
55
|
+
ValueCell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
56
|
+
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
57
|
+
flags: PropTypes.array,
|
|
58
|
+
indexedDimValIds: PropTypes.object,
|
|
59
|
+
cellHandler: PropTypes.func,
|
|
60
|
+
isRtl: PropTypes.bool
|
|
61
|
+
} : {};
|
|
62
|
+
|
|
48
63
|
export default React.memo(ValueCell);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import * as R from 'ramda';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
3
4
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
5
|
import Typography from '@material-ui/core/Typography';
|
|
5
6
|
import Grid from '@material-ui/core/Grid';
|
|
6
7
|
import Tooltip from '../Tooltip/Tooltip';
|
|
8
|
+
|
|
7
9
|
var useStyles = makeStyles(function (theme) {
|
|
8
10
|
return {
|
|
9
11
|
font: {
|
|
@@ -25,49 +27,75 @@ var TableFooter = function TableFooter(_ref) {
|
|
|
25
27
|
link = _ref.link,
|
|
26
28
|
linkLabel = _ref.linkLabel,
|
|
27
29
|
_ref$height = _ref.height,
|
|
28
|
-
height = _ref$height ===
|
|
30
|
+
height = _ref$height === undefined ? 25 : _ref$height;
|
|
31
|
+
|
|
29
32
|
var classes = useStyles();
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
direction:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
33
|
+
return React.createElement(
|
|
34
|
+
Grid,
|
|
35
|
+
{ container: true, direction: 'row', alignItems: 'center', spacing: 2 },
|
|
36
|
+
React.createElement(
|
|
37
|
+
Grid,
|
|
38
|
+
{ item: true, xs: 1, className: classes.gridContainer },
|
|
39
|
+
React.createElement(
|
|
40
|
+
Tooltip,
|
|
41
|
+
{
|
|
42
|
+
placement: 'top',
|
|
43
|
+
interactive: true,
|
|
44
|
+
title: React.createElement(
|
|
45
|
+
Typography,
|
|
46
|
+
{ variant: 'body2' },
|
|
47
|
+
React.createElement(
|
|
48
|
+
Typography,
|
|
49
|
+
{ variant: 'inherit' },
|
|
50
|
+
R.prop('label')(tooltip)
|
|
51
|
+
),
|
|
52
|
+
React.createElement(
|
|
53
|
+
'a',
|
|
54
|
+
{ className: classes.spaceContainer, href: R.prop('link')(tooltip) },
|
|
55
|
+
R.prop('linkLabel')(tooltip)
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
},
|
|
59
|
+
React.createElement(
|
|
60
|
+
Typography,
|
|
61
|
+
{ variant: 'body2', className: classes.font },
|
|
62
|
+
R.ifElse(R.isNil, R.always('©'), R.identity)(label)
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
),
|
|
66
|
+
React.createElement(
|
|
67
|
+
Grid,
|
|
68
|
+
{ item: true, xs: 11, className: classes.gridContainer },
|
|
69
|
+
React.createElement(
|
|
70
|
+
Grid,
|
|
71
|
+
{ container: true, justifyContent: 'flex-end' },
|
|
72
|
+
React.createElement(
|
|
73
|
+
Typography,
|
|
74
|
+
{ variant: 'body2', className: classes.font },
|
|
75
|
+
React.createElement(
|
|
76
|
+
'a',
|
|
77
|
+
{ href: link },
|
|
78
|
+
linkLabel
|
|
79
|
+
)
|
|
80
|
+
),
|
|
81
|
+
React.createElement('img', { className: classes.spaceContainer, height: height, src: logo, alt: 'logo' })
|
|
82
|
+
)
|
|
83
|
+
)
|
|
84
|
+
);
|
|
71
85
|
};
|
|
72
86
|
|
|
87
|
+
TableFooter.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
88
|
+
tooltip: PropTypes.shape({
|
|
89
|
+
link: PropTypes.string,
|
|
90
|
+
linkLabel: PropTypes.string,
|
|
91
|
+
label: PropTypes.string
|
|
92
|
+
}),
|
|
93
|
+
label: PropTypes.string,
|
|
94
|
+
logo: PropTypes.string,
|
|
95
|
+
link: PropTypes.string,
|
|
96
|
+
linkLabel: PropTypes.string,
|
|
97
|
+
height: PropTypes.number,
|
|
98
|
+
classes: PropTypes.object
|
|
99
|
+
} : {};
|
|
100
|
+
|
|
73
101
|
export default TableFooter;
|
package/es/TableFooter/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
2
|
import * as R from 'ramda';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
3
4
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
5
|
import Typography from '@material-ui/core/Typography';
|
|
5
6
|
import Lens from '@material-ui/icons/Lens';
|
|
7
|
+
|
|
6
8
|
var useStyles = makeStyles(function (theme) {
|
|
7
9
|
return {
|
|
8
10
|
title: {
|
|
@@ -21,25 +23,41 @@ var useStyles = makeStyles(function (theme) {
|
|
|
21
23
|
|
|
22
24
|
var TableHeader = function TableHeader(_ref) {
|
|
23
25
|
var header = _ref.header;
|
|
26
|
+
|
|
24
27
|
var classes = useStyles();
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
return React.createElement(
|
|
29
|
+
'div',
|
|
30
|
+
{ className: classes.container },
|
|
31
|
+
React.createElement(
|
|
32
|
+
Typography,
|
|
33
|
+
{ variant: 'h5', className: classes.title },
|
|
34
|
+
R.prop('title')(header)
|
|
35
|
+
),
|
|
36
|
+
React.createElement(
|
|
37
|
+
Typography,
|
|
38
|
+
{ variant: 'subtitle1', className: classes.subtitle },
|
|
39
|
+
R.pipe(R.propOr([], 'subtitle'), R.intersperse(React.createElement(Lens, { className: classes.icon })), R.addIndex(R.map)(function (v, index) {
|
|
40
|
+
return React.createElement(
|
|
41
|
+
Fragment,
|
|
42
|
+
{ key: R.toString([R.prop('title')(header), index]) },
|
|
43
|
+
v
|
|
44
|
+
);
|
|
45
|
+
}))(header)
|
|
46
|
+
),
|
|
47
|
+
React.createElement(
|
|
48
|
+
Typography,
|
|
49
|
+
{ variant: 'subtitle1', className: classes.subtitle },
|
|
50
|
+
R.prop('uprs')(header)
|
|
51
|
+
)
|
|
52
|
+
);
|
|
43
53
|
};
|
|
44
54
|
|
|
55
|
+
TableHeader.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
56
|
+
header: PropTypes.shape({
|
|
57
|
+
title: PropTypes.string,
|
|
58
|
+
subtitle: PropTypes.array,
|
|
59
|
+
uprs: PropTypes.string
|
|
60
|
+
})
|
|
61
|
+
} : {};
|
|
62
|
+
|
|
45
63
|
export default TableHeader;
|