@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/Spotlight/Fields.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
2
|
import * as R from 'ramda';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import cx from 'classnames';
|
|
5
4
|
import Popover from '@material-ui/core/Popover';
|
|
6
5
|
import Button from '@material-ui/core/Button';
|
|
7
6
|
import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
|
|
8
7
|
import Check from '@material-ui/icons/Check';
|
|
9
|
-
|
|
10
8
|
export var Field = function Field(_ref) {
|
|
11
9
|
var spotlight = _ref.spotlight,
|
|
12
10
|
onChangeField = _ref.onChangeField,
|
|
@@ -27,77 +25,45 @@ export var Field = function Field(_ref) {
|
|
|
27
25
|
|
|
28
26
|
var open = Boolean(anchorEl);
|
|
29
27
|
var id = open ? 'visions-spotlight-popover' : undefined;
|
|
28
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
29
|
+
"aria-describedby": id,
|
|
30
|
+
onClick: handleClick
|
|
31
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: classes.buttonContainer
|
|
33
|
+
}, R.prop('searchLabel', spotlight), /*#__PURE__*/React.createElement(ArrowDropDownIcon, {
|
|
34
|
+
fontSize: "small"
|
|
35
|
+
}))), /*#__PURE__*/React.createElement(Popover, {
|
|
36
|
+
id: id,
|
|
37
|
+
open: open,
|
|
38
|
+
anchorEl: anchorEl,
|
|
39
|
+
onClose: handleClose,
|
|
40
|
+
anchorOrigin: {
|
|
41
|
+
vertical: 'bottom',
|
|
42
|
+
horizontal: 'center'
|
|
43
|
+
},
|
|
44
|
+
transformOrigin: {
|
|
45
|
+
vertical: 'top',
|
|
46
|
+
horizontal: 'center'
|
|
47
|
+
}
|
|
48
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
dir: isRtl ? 'rtl' : 'ltr',
|
|
50
|
+
className: classes.popoverButton
|
|
51
|
+
}, R.pipe(R.values, R.map(function (field) {
|
|
52
|
+
var _cx;
|
|
30
53
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
),
|
|
44
|
-
React.createElement(
|
|
45
|
-
Popover,
|
|
46
|
-
{
|
|
47
|
-
id: id,
|
|
48
|
-
open: open,
|
|
49
|
-
anchorEl: anchorEl,
|
|
50
|
-
onClose: handleClose,
|
|
51
|
-
anchorOrigin: {
|
|
52
|
-
vertical: 'bottom',
|
|
53
|
-
horizontal: 'center'
|
|
54
|
-
},
|
|
55
|
-
transformOrigin: {
|
|
56
|
-
vertical: 'top',
|
|
57
|
-
horizontal: 'center'
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
React.createElement(
|
|
61
|
-
'div',
|
|
62
|
-
{ dir: isRtl ? 'rtl' : 'ltr', className: classes.popoverButton },
|
|
63
|
-
R.pipe(R.values, R.map(function (field) {
|
|
64
|
-
var _cx;
|
|
65
|
-
|
|
66
|
-
return React.createElement(
|
|
67
|
-
Button,
|
|
68
|
-
{
|
|
69
|
-
key: field.id,
|
|
70
|
-
className: classes.buttonContainer,
|
|
71
|
-
onClick: onChangeField(field),
|
|
72
|
-
disabled: field.disabled
|
|
73
|
-
},
|
|
74
|
-
React.createElement(Check, {
|
|
75
|
-
fontSize: 'small',
|
|
76
|
-
className: cx((_cx = {}, _cx[classes.selected] = !R.prop('isSelected')(field), _cx))
|
|
77
|
-
}),
|
|
78
|
-
React.createElement(spotlight.FieldLabelRenderer, { id: field.id })
|
|
79
|
-
);
|
|
80
|
-
}))(R.prop('fields', spotlight))
|
|
81
|
-
)
|
|
82
|
-
)
|
|
83
|
-
);
|
|
54
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
55
|
+
key: field.id,
|
|
56
|
+
className: classes.buttonContainer,
|
|
57
|
+
onClick: onChangeField(field),
|
|
58
|
+
disabled: field.disabled
|
|
59
|
+
}, /*#__PURE__*/React.createElement(Check, {
|
|
60
|
+
fontSize: "small",
|
|
61
|
+
className: cx((_cx = {}, _cx[classes.selected] = !R.prop('isSelected')(field), _cx))
|
|
62
|
+
}), /*#__PURE__*/React.createElement(spotlight.FieldLabelRenderer, {
|
|
63
|
+
id: field.id
|
|
64
|
+
}));
|
|
65
|
+
}))(R.prop('fields', spotlight)))));
|
|
84
66
|
};
|
|
85
|
-
|
|
86
|
-
Field.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
87
|
-
classes: PropTypes.object,
|
|
88
|
-
spotlight: PropTypes.shape({
|
|
89
|
-
fields: PropTypes.shape({
|
|
90
|
-
id: PropTypes.string,
|
|
91
|
-
isSelected: PropTypes.bool,
|
|
92
|
-
disabled: PropTypes.bool
|
|
93
|
-
}),
|
|
94
|
-
searchLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
95
|
-
FieldLabelRenderer: PropTypes.func
|
|
96
|
-
}),
|
|
97
|
-
onChangeField: PropTypes.func.isRequired,
|
|
98
|
-
isRtl: PropTypes.bool
|
|
99
|
-
} : {};
|
|
100
|
-
|
|
101
67
|
Field.defaultProps = {
|
|
102
68
|
spotlight: {}
|
|
103
69
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import cx from 'classnames';
|
|
4
3
|
import * as R from 'ramda';
|
|
5
4
|
import ArrowForward from '@material-ui/icons/ArrowForward';
|
|
@@ -14,7 +13,6 @@ import { Field } from './Fields';
|
|
|
14
13
|
import { useStyles } from './useStyles';
|
|
15
14
|
import { useSpotlight } from './useSpotlight';
|
|
16
15
|
import Cross from '../Icons/Cross';
|
|
17
|
-
|
|
18
16
|
var size = R.pipe(R.values, R.length);
|
|
19
17
|
|
|
20
18
|
var Spotlight = function Spotlight(_ref) {
|
|
@@ -30,7 +28,7 @@ var Spotlight = function Spotlight(_ref) {
|
|
|
30
28
|
fullWidth = _ref.fullWidth,
|
|
31
29
|
className = _ref.className,
|
|
32
30
|
_ref$testId = _ref.testId,
|
|
33
|
-
testId = _ref$testId ===
|
|
31
|
+
testId = _ref$testId === void 0 ? 'spotlight' : _ref$testId;
|
|
34
32
|
|
|
35
33
|
var _useSpotlight = useSpotlight(hasCommit, term, defaultSpotlight, action),
|
|
36
34
|
value = _useSpotlight.value,
|
|
@@ -46,96 +44,57 @@ var Spotlight = function Spotlight(_ref) {
|
|
|
46
44
|
var classes = useStyles();
|
|
47
45
|
var theme = useTheme();
|
|
48
46
|
var isRtl = R.equals('rtl', R.prop('direction', theme));
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
'
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
"data-testid": testId,
|
|
49
|
+
className: cx(R.prop('container', className), (_cx = {}, _cx[classes.container] = withBorder, _cx[classes.containerFocus] = isFocus, _cx[classes.fullWidth] = fullWidth, _cx[classes.defaultWidth] = !fullWidth, _cx))
|
|
50
|
+
}, /*#__PURE__*/React.createElement(Paper, {
|
|
51
|
+
className: classes.root,
|
|
52
|
+
elevation: 0
|
|
53
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
54
|
+
className: classes.leftIcon,
|
|
55
|
+
disabled: true,
|
|
56
|
+
"aria-label": "search"
|
|
57
|
+
}, /*#__PURE__*/React.createElement(Search, null)), /*#__PURE__*/React.createElement(InputBase, {
|
|
58
|
+
inputProps: {
|
|
59
|
+
'aria-label': placeholder,
|
|
60
|
+
'data-testid': testId + "_input"
|
|
61
|
+
},
|
|
62
|
+
className: classes.input,
|
|
63
|
+
classes: {
|
|
64
|
+
root: classes.inputBase,
|
|
65
|
+
input: classes.inputBaseMargin
|
|
55
66
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
className: cx(classes.rightIcon, classes.clear)
|
|
88
|
-
},
|
|
89
|
-
React.createElement(Cross, null)
|
|
90
|
-
) : null,
|
|
91
|
-
R.gt(size(R.prop('fields', spotlight)), 1) ? React.createElement(
|
|
92
|
-
Fragment,
|
|
93
|
-
null,
|
|
94
|
-
React.createElement(Divider, { className: classes.divider }),
|
|
95
|
-
React.createElement(Field, {
|
|
96
|
-
spotlight: spotlight,
|
|
97
|
-
onChangeField: onChangeField,
|
|
98
|
-
isRtl: isRtl,
|
|
99
|
-
term: value,
|
|
100
|
-
classes: classes
|
|
101
|
-
})
|
|
102
|
-
) : null,
|
|
103
|
-
hasCommit ? React.createElement(
|
|
104
|
-
Fragment,
|
|
105
|
-
null,
|
|
106
|
-
React.createElement(Divider, { className: classes.divider }),
|
|
107
|
-
React.createElement(
|
|
108
|
-
IconButton,
|
|
109
|
-
{
|
|
110
|
-
disabled: R.isEmpty(value),
|
|
111
|
-
color: 'primary',
|
|
112
|
-
className: classes.rightIcon,
|
|
113
|
-
'aria-label': 'commit',
|
|
114
|
-
onClick: onCommitTerm
|
|
115
|
-
},
|
|
116
|
-
isRtl ? React.createElement(ArrowBack, null) : React.createElement(ArrowForward, null)
|
|
117
|
-
)
|
|
118
|
-
) : null
|
|
119
|
-
)
|
|
120
|
-
);
|
|
67
|
+
placeholder: placeholder,
|
|
68
|
+
onKeyPress: onKeyPress,
|
|
69
|
+
value: value,
|
|
70
|
+
onChange: onChangeTerm,
|
|
71
|
+
onFocus: function onFocus() {
|
|
72
|
+
return setFocus(true);
|
|
73
|
+
},
|
|
74
|
+
onBlur: function onBlur() {
|
|
75
|
+
return setFocus(false);
|
|
76
|
+
}
|
|
77
|
+
}), hasClearAll && !R.isEmpty(value) ? /*#__PURE__*/React.createElement(IconButton, {
|
|
78
|
+
"aria-label": "Clear",
|
|
79
|
+
onClick: onClearTerm,
|
|
80
|
+
className: cx(classes.rightIcon, classes.clear)
|
|
81
|
+
}, /*#__PURE__*/React.createElement(Cross, null)) : null, R.gt(size(R.prop('fields', spotlight)), 1) ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Divider, {
|
|
82
|
+
className: classes.divider
|
|
83
|
+
}), /*#__PURE__*/React.createElement(Field, {
|
|
84
|
+
spotlight: spotlight,
|
|
85
|
+
onChangeField: onChangeField,
|
|
86
|
+
isRtl: isRtl,
|
|
87
|
+
term: value,
|
|
88
|
+
classes: classes
|
|
89
|
+
})) : null, hasCommit ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Divider, {
|
|
90
|
+
className: classes.divider
|
|
91
|
+
}), /*#__PURE__*/React.createElement(IconButton, {
|
|
92
|
+
disabled: R.isEmpty(value),
|
|
93
|
+
color: "primary",
|
|
94
|
+
className: classes.rightIcon,
|
|
95
|
+
"aria-label": "commit",
|
|
96
|
+
onClick: onCommitTerm
|
|
97
|
+
}, isRtl ? /*#__PURE__*/React.createElement(ArrowBack, null) : /*#__PURE__*/React.createElement(ArrowForward, null))) : null));
|
|
121
98
|
};
|
|
122
99
|
|
|
123
|
-
Spotlight.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
124
|
-
term: PropTypes.string,
|
|
125
|
-
testId: PropTypes.string,
|
|
126
|
-
placeholder: PropTypes.string,
|
|
127
|
-
defaultSpotlight: PropTypes.shape({
|
|
128
|
-
fields: PropTypes.object,
|
|
129
|
-
searchLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
130
|
-
FieldLabelRenderer: PropTypes.func
|
|
131
|
-
}),
|
|
132
|
-
action: PropTypes.func,
|
|
133
|
-
hasClearAll: PropTypes.bool,
|
|
134
|
-
hasCommit: PropTypes.bool,
|
|
135
|
-
withBorder: PropTypes.bool,
|
|
136
|
-
fullWidth: PropTypes.bool,
|
|
137
|
-
classes: PropTypes.object,
|
|
138
|
-
className: PropTypes.object
|
|
139
|
-
} : {};
|
|
140
|
-
|
|
141
100
|
export default Spotlight;
|
package/es/Spotlight/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
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 { useState, useEffect } from 'react';
|
|
4
3
|
import * as R from 'ramda';
|
|
4
|
+
export var useSpotlight = function useSpotlight(hasCommit, defaultTerm, defaultSpotlight, action) {
|
|
5
|
+
if (defaultTerm === void 0) {
|
|
6
|
+
defaultTerm = '';
|
|
7
|
+
}
|
|
5
8
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var action = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {};
|
|
9
|
+
if (action === void 0) {
|
|
10
|
+
action = function action() {};
|
|
11
|
+
}
|
|
10
12
|
|
|
11
13
|
var _useState = useState(defaultTerm),
|
|
12
14
|
term = _useState[0],
|
|
@@ -14,7 +16,7 @@ export var useSpotlight = function useSpotlight(hasCommit) {
|
|
|
14
16
|
|
|
15
17
|
var _useState2 = useState(defaultSpotlight),
|
|
16
18
|
_useState2$ = _useState2[0],
|
|
17
|
-
spotlight = _useState2$ ===
|
|
19
|
+
spotlight = _useState2$ === void 0 ? {} : _useState2$,
|
|
18
20
|
setSpotlight = _useState2[1];
|
|
19
21
|
|
|
20
22
|
var _useState3 = useState(false),
|
|
@@ -27,25 +29,36 @@ export var useSpotlight = function useSpotlight(hasCommit) {
|
|
|
27
29
|
}, [defaultTerm, defaultSpotlight]);
|
|
28
30
|
|
|
29
31
|
var onKeyPress = function onKeyPress(event) {
|
|
30
|
-
if (event.key === 'Enter') return action({
|
|
32
|
+
if (event.key === 'Enter') return action({
|
|
33
|
+
term: term,
|
|
34
|
+
spotlight: spotlight
|
|
35
|
+
});
|
|
31
36
|
};
|
|
32
37
|
|
|
33
38
|
var onClearTerm = function onClearTerm(event) {
|
|
34
39
|
event.preventDefault();
|
|
35
40
|
setTerm('');
|
|
36
|
-
return action({
|
|
41
|
+
return action({
|
|
42
|
+
term: ''
|
|
43
|
+
});
|
|
37
44
|
};
|
|
38
45
|
|
|
39
46
|
var onChangeTerm = function onChangeTerm(event) {
|
|
40
47
|
event.preventDefault();
|
|
41
48
|
var newTerm = R.propOr('', 'value')(event.target);
|
|
42
49
|
setTerm(newTerm);
|
|
43
|
-
return hasCommit ? null : action({
|
|
50
|
+
return hasCommit ? null : action({
|
|
51
|
+
term: newTerm,
|
|
52
|
+
spotlight: spotlight
|
|
53
|
+
});
|
|
44
54
|
};
|
|
45
55
|
|
|
46
56
|
var onCommitTerm = function onCommitTerm(event) {
|
|
47
57
|
event.preventDefault();
|
|
48
|
-
return action({
|
|
58
|
+
return action({
|
|
59
|
+
term: term,
|
|
60
|
+
spotlight: spotlight
|
|
61
|
+
});
|
|
49
62
|
};
|
|
50
63
|
|
|
51
64
|
var onChangeField = function onChangeField(field) {
|
|
@@ -53,11 +66,18 @@ export var useSpotlight = function useSpotlight(hasCommit) {
|
|
|
53
66
|
var _extends2;
|
|
54
67
|
|
|
55
68
|
event.preventDefault();
|
|
69
|
+
|
|
56
70
|
var newSpotlight = _extends({}, spotlight, {
|
|
57
|
-
fields: _extends({}, spotlight.fields, (_extends2 = {}, _extends2[field.id] = _extends({}, field, {
|
|
71
|
+
fields: _extends({}, spotlight.fields, (_extends2 = {}, _extends2[field.id] = _extends({}, field, {
|
|
72
|
+
isSelected: !field.isSelected
|
|
73
|
+
}), _extends2))
|
|
58
74
|
});
|
|
75
|
+
|
|
59
76
|
setSpotlight(newSpotlight);
|
|
60
|
-
return action({
|
|
77
|
+
return action({
|
|
78
|
+
term: term,
|
|
79
|
+
spotlight: newSpotlight
|
|
80
|
+
});
|
|
61
81
|
};
|
|
62
82
|
};
|
|
63
83
|
|
|
@@ -1,8 +1,6 @@
|
|
|
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 * as R from 'ramda';
|
|
4
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
5
|
-
|
|
6
4
|
export var useStyles = makeStyles(function (theme) {
|
|
7
5
|
return {
|
|
8
6
|
container: {
|
|
@@ -24,7 +22,7 @@ export var useStyles = makeStyles(function (theme) {
|
|
|
24
22
|
root: {
|
|
25
23
|
display: 'flex',
|
|
26
24
|
alignItems: 'center',
|
|
27
|
-
border:
|
|
25
|
+
border: "solid 1px " + theme.palette.grey[400],
|
|
28
26
|
paddingRight: theme.spacing(1)
|
|
29
27
|
},
|
|
30
28
|
input: {
|
package/es/Table/Table.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 Header from './header';
|
|
5
4
|
import RowHeader from './row-header';
|
|
@@ -7,7 +6,6 @@ import SectionHeader from './section-header';
|
|
|
7
6
|
import SectionRows from './section-rows';
|
|
8
7
|
import TableCell from './tableCell';
|
|
9
8
|
import { Table as StyledTable } from './styles';
|
|
10
|
-
|
|
11
9
|
var HEADER = 'HEADER';
|
|
12
10
|
var ROW_HEADER = 'ROW_HEADER';
|
|
13
11
|
|
|
@@ -21,11 +19,11 @@ var Table = function Table(_ref) {
|
|
|
21
19
|
var _React$useState2;
|
|
22
20
|
|
|
23
21
|
var _ref$sectionsData = _ref.sectionsData,
|
|
24
|
-
sectionsData = _ref$sectionsData ===
|
|
22
|
+
sectionsData = _ref$sectionsData === void 0 ? [] : _ref$sectionsData,
|
|
25
23
|
_ref$headerData = _ref.headerData,
|
|
26
|
-
headerData = _ref$headerData ===
|
|
24
|
+
headerData = _ref$headerData === void 0 ? [] : _ref$headerData,
|
|
27
25
|
_ref$cells = _ref.cells,
|
|
28
|
-
cells = _ref$cells ===
|
|
26
|
+
cells = _ref$cells === void 0 ? {} : _ref$cells,
|
|
29
27
|
isRtl = _ref.isRtl,
|
|
30
28
|
cellHandler = _ref.cellHandler,
|
|
31
29
|
cellValueAccessor = _ref.cellValueAccessor,
|
|
@@ -43,6 +41,7 @@ var Table = function Table(_ref) {
|
|
|
43
41
|
var columnCount = R.add(xColumnCount, yColumnCount);
|
|
44
42
|
var yOffsetRowHeader = 0;
|
|
45
43
|
var yOffsetSectionHeader = R.inc(yOffsetRowHeader);
|
|
44
|
+
|
|
46
45
|
var msGridRowOffsetFactory = function msGridRowOffsetFactory(sectionIndex) {
|
|
47
46
|
return R.sum([R.inc(yOffsetSectionHeader), sectionIndex, R.pipe(R.take(sectionIndex), R.reduce(R.useWith(R.add, [R.identity, R.pipe(R.last, R.length)]), 0))(sectionsData)]);
|
|
48
47
|
};
|
|
@@ -52,7 +51,7 @@ var Table = function Table(_ref) {
|
|
|
52
51
|
var previousCell = R.last(acc);
|
|
53
52
|
var previousCellKey = R.prop('key', previousCell);
|
|
54
53
|
var valueId = R.path(['value', 'id'], cell);
|
|
55
|
-
var cellKey = R.isNil(previousCellKey) ? valueId : previousCellKey +
|
|
54
|
+
var cellKey = R.isNil(previousCellKey) ? valueId : previousCellKey + "-" + valueId;
|
|
56
55
|
return R.append(R.assoc('key', cellKey, cell), acc);
|
|
57
56
|
}, [])), R.transpose)(headerData),
|
|
58
57
|
xLayoutData: xLayoutData,
|
|
@@ -71,15 +70,15 @@ var Table = function Table(_ref) {
|
|
|
71
70
|
yColumnCount = _React$useMemo.yColumnCount,
|
|
72
71
|
yOffsetRowHeader = _React$useMemo.yOffsetRowHeader,
|
|
73
72
|
yOffsetSectionHeader = _React$useMemo.yOffsetSectionHeader,
|
|
74
|
-
msGridRowOffsetFactory = _React$useMemo.msGridRowOffsetFactory;
|
|
75
|
-
|
|
76
|
-
// Hooks before
|
|
73
|
+
msGridRowOffsetFactory = _React$useMemo.msGridRowOffsetFactory; // Hooks before
|
|
77
74
|
|
|
78
75
|
|
|
79
76
|
var isSingleObs = R.hasPath(['', '', '', 0], cells);
|
|
80
|
-
if (isSingleObs) return React.createElement(TableCell, {
|
|
77
|
+
if (isSingleObs) return /*#__PURE__*/React.createElement(TableCell, {
|
|
78
|
+
cell: R.pathOr({}, ['', '', '', 0], cells),
|
|
79
|
+
cellHandler: cellHandler
|
|
80
|
+
}); // Utility funcs
|
|
81
81
|
|
|
82
|
-
// Utility funcs
|
|
83
82
|
var getYOffset = function getYOffset(index) {
|
|
84
83
|
return R.pipe(R.prop(HEADER), R.slice(0, index), R.sum)(yOffsets);
|
|
85
84
|
};
|
|
@@ -97,74 +96,54 @@ var Table = function Table(_ref) {
|
|
|
97
96
|
var _R$mergeRight;
|
|
98
97
|
|
|
99
98
|
var height = _ref2.height;
|
|
100
|
-
|
|
101
99
|
var newYOffsets = R.equals(label, HEADER) ? updatedHeights(R.prop(HEADER)(yOffsets))(headerData) : R.prop(label)(yOffsets);
|
|
102
100
|
setYOffsets(R.mergeRight(yOffsets, (_R$mergeRight = {}, _R$mergeRight[label] = R.update(index, height)(newYOffsets), _R$mergeRight)));
|
|
103
101
|
};
|
|
104
102
|
};
|
|
105
103
|
};
|
|
106
104
|
|
|
107
|
-
return React.createElement(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
105
|
+
return /*#__PURE__*/React.createElement(StyledTable, {
|
|
106
|
+
columnCount: columnCount,
|
|
107
|
+
xColumnCount: xColumnCount
|
|
108
|
+
}, /*#__PURE__*/React.createElement(Header, {
|
|
109
|
+
data: transposedHeaderData,
|
|
110
|
+
xColumnCount: xColumnCount,
|
|
111
|
+
onYVectorSize: onYVectorSize(HEADER, transposedHeaderData),
|
|
112
|
+
getYOffset: getYOffset
|
|
113
|
+
}), /*#__PURE__*/React.createElement(RowHeader, {
|
|
114
|
+
data: xLayoutData,
|
|
115
|
+
headerData: headerData,
|
|
116
|
+
onYVectorSize: onYVectorSize(ROW_HEADER),
|
|
117
|
+
getYOffset: getSubHeaderOffset(transposedHeaderData),
|
|
118
|
+
yOffset: yOffsetRowHeader,
|
|
119
|
+
activeCellIds: activeCellIds
|
|
120
|
+
}), R.addIndex(R.map)(function (_ref3, sectionIndex) {
|
|
121
|
+
var sectionHeaderData = _ref3[0],
|
|
122
|
+
sectionRowsData = _ref3[1];
|
|
123
|
+
var msGridRowOffset = msGridRowOffsetFactory(sectionIndex);
|
|
124
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
125
|
+
key: "section-" + sectionIndex
|
|
126
|
+
}, /*#__PURE__*/React.createElement(SectionHeader, {
|
|
127
|
+
columnCount: columnCount,
|
|
128
|
+
section: sectionHeaderData,
|
|
129
|
+
yOffset: getSubHeaderOffset(transposedHeaderData)(yOffsetSectionHeader),
|
|
130
|
+
msGridRow: msGridRowOffset,
|
|
131
|
+
isRtl: isRtl
|
|
132
|
+
}), /*#__PURE__*/React.createElement(SectionRows, {
|
|
133
|
+
data: sectionRowsData,
|
|
118
134
|
headerData: headerData,
|
|
119
|
-
|
|
120
|
-
|
|
135
|
+
cells: cells,
|
|
136
|
+
cellHandler: cellHandler,
|
|
137
|
+
cellValueAccessor: cellValueAccessor,
|
|
138
|
+
activeCellIds: activeCellIds,
|
|
139
|
+
activeCellHandler: activeCellHandler,
|
|
140
|
+
sectionData: sectionHeaderData,
|
|
141
|
+
yColumnCount: yColumnCount,
|
|
142
|
+
xColumnCount: xColumnCount,
|
|
121
143
|
yOffset: yOffsetRowHeader,
|
|
122
|
-
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
var sectionHeaderData = _ref3[0],
|
|
126
|
-
sectionRowsData = _ref3[1];
|
|
127
|
-
|
|
128
|
-
var msGridRowOffset = msGridRowOffsetFactory(sectionIndex);
|
|
129
|
-
|
|
130
|
-
return React.createElement(
|
|
131
|
-
React.Fragment,
|
|
132
|
-
{ key: 'section-' + sectionIndex },
|
|
133
|
-
React.createElement(SectionHeader, {
|
|
134
|
-
columnCount: columnCount,
|
|
135
|
-
section: sectionHeaderData,
|
|
136
|
-
yOffset: getSubHeaderOffset(transposedHeaderData)(yOffsetSectionHeader),
|
|
137
|
-
msGridRow: msGridRowOffset,
|
|
138
|
-
isRtl: isRtl
|
|
139
|
-
}),
|
|
140
|
-
React.createElement(SectionRows, {
|
|
141
|
-
data: sectionRowsData,
|
|
142
|
-
headerData: headerData,
|
|
143
|
-
cells: cells,
|
|
144
|
-
cellHandler: cellHandler,
|
|
145
|
-
cellValueAccessor: cellValueAccessor,
|
|
146
|
-
activeCellIds: activeCellIds,
|
|
147
|
-
activeCellHandler: activeCellHandler,
|
|
148
|
-
sectionData: sectionHeaderData,
|
|
149
|
-
yColumnCount: yColumnCount,
|
|
150
|
-
xColumnCount: xColumnCount,
|
|
151
|
-
yOffset: yOffsetRowHeader,
|
|
152
|
-
msGridRowOffset: msGridRowOffset
|
|
153
|
-
})
|
|
154
|
-
);
|
|
155
|
-
}, sectionsData)
|
|
156
|
-
);
|
|
144
|
+
msGridRowOffset: msGridRowOffset
|
|
145
|
+
}));
|
|
146
|
+
}, sectionsData));
|
|
157
147
|
};
|
|
158
148
|
|
|
159
|
-
Table.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
160
|
-
headerData: PropTypes.array.isRequired,
|
|
161
|
-
sectionsData: PropTypes.array.isRequired,
|
|
162
|
-
cells: PropTypes.object.isRequired,
|
|
163
|
-
cellHandler: PropTypes.func,
|
|
164
|
-
cellValueAccessor: PropTypes.func,
|
|
165
|
-
activeCellHandler: PropTypes.func,
|
|
166
|
-
activeCellIds: PropTypes.object,
|
|
167
|
-
isRtl: PropTypes.bool
|
|
168
|
-
} : {};
|
|
169
|
-
|
|
170
149
|
export default Table;
|