@sis-cc/dotstatsuite-visions 7.17.12 → 7.18.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/ChartsConfig/ChartsConfig.js +368 -116
- package/es/ChartsConfig/Input.js +1 -0
- package/es/ChartsConfig/InputProxy.js +54 -0
- package/es/ChartsConfig/Proxy.js +20 -0
- package/es/ChartsConfig/Title.js +38 -0
- package/es/ChartsConfig/index.js +1 -1
- package/es/ChartsConfig/useAxisOptions.js +9 -0
- package/es/ChartsConfig/useDimensionOptions.js +12 -0
- package/es/ChartsConfig/useFocusOptions.js +22 -0
- package/es/ChartsConfig/utils.js +3 -9
- package/es/DataEdit/DataEdit.js +50 -75
- package/es/ExpansionPanel/ExpansionPanel.js +10 -3
- package/es/ExpansionPanel/index.js +1 -0
- package/es/ExpansionPanel/styles.js +6 -1
- package/es/Select/Select.js +11 -4
- package/lib/ChartsConfig/ChartsConfig.js +380 -128
- package/lib/ChartsConfig/Input.js +1 -0
- package/lib/ChartsConfig/InputProxy.js +75 -0
- package/lib/ChartsConfig/Proxy.js +34 -0
- package/lib/ChartsConfig/Title.js +57 -0
- package/lib/ChartsConfig/useAxisOptions.js +18 -0
- package/lib/ChartsConfig/useDimensionOptions.js +22 -0
- package/lib/ChartsConfig/useFocusOptions.js +32 -0
- package/lib/ChartsConfig/utils.js +4 -10
- package/lib/DataEdit/DataEdit.js +50 -79
- package/lib/ExpansionPanel/ExpansionPanel.js +10 -3
- package/lib/ExpansionPanel/styles.js +6 -1
- package/lib/Select/Select.js +12 -4
- package/package.json +1 -1
- package/es/ChartsConfig/Axis.js +0 -96
- package/es/ChartsConfig/ButtonGroup.js +0 -66
- package/es/ChartsConfig/ContainerTitle.js +0 -55
- package/es/ChartsConfig/Focus.js +0 -69
- package/es/ChartsConfig/Frequency.js +0 -51
- package/es/ChartsConfig/Series.js +0 -66
- package/es/ChartsConfig/Size.js +0 -67
- package/es/ChartsConfig/styles.js +0 -52
- package/lib/ChartsConfig/Axis.js +0 -128
- package/lib/ChartsConfig/ButtonGroup.js +0 -92
- package/lib/ChartsConfig/ContainerTitle.js +0 -82
- package/lib/ChartsConfig/Focus.js +0 -97
- package/lib/ChartsConfig/Frequency.js +0 -78
- package/lib/ChartsConfig/Series.js +0 -97
- package/lib/ChartsConfig/Size.js +0 -98
- package/lib/ChartsConfig/styles.js +0 -62
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _propTypes = require('prop-types');
|
|
6
|
+
|
|
7
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
8
|
+
|
|
9
|
+
var _ramda = require('ramda');
|
|
10
|
+
|
|
11
|
+
var R = _interopRequireWildcard(_ramda);
|
|
12
|
+
|
|
13
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
|
|
17
|
+
var Proxy = function Proxy(_ref) {
|
|
18
|
+
var keys = _ref.keys,
|
|
19
|
+
properties = _ref.properties,
|
|
20
|
+
children = _ref.children;
|
|
21
|
+
|
|
22
|
+
if (!R.any(R.flip(R.has)(properties), keys)) return null;
|
|
23
|
+
|
|
24
|
+
return children;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
Proxy.propTypes = {
|
|
28
|
+
children: _propTypes2.default.node,
|
|
29
|
+
keys: _propTypes2.default.array,
|
|
30
|
+
properties: _propTypes2.default.object
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.default = Proxy;
|
|
34
|
+
module.exports = exports['default'];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.useStyles = undefined;
|
|
5
|
+
|
|
6
|
+
var _react = require('react');
|
|
7
|
+
|
|
8
|
+
var _react2 = _interopRequireDefault(_react);
|
|
9
|
+
|
|
10
|
+
var _propTypes = require('prop-types');
|
|
11
|
+
|
|
12
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
13
|
+
|
|
14
|
+
var _ramda = require('ramda');
|
|
15
|
+
|
|
16
|
+
var R = _interopRequireWildcard(_ramda);
|
|
17
|
+
|
|
18
|
+
var _styles = require('@material-ui/core/styles');
|
|
19
|
+
|
|
20
|
+
var _core = require('@material-ui/core');
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
var useStyles = exports.useStyles = (0, _styles.makeStyles)(function () {
|
|
27
|
+
return {
|
|
28
|
+
title: {
|
|
29
|
+
fontFamily: 'inherit'
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
var Title = function Title(_ref) {
|
|
35
|
+
var icon = _ref.icon,
|
|
36
|
+
label = _ref.label;
|
|
37
|
+
|
|
38
|
+
var classes = useStyles();
|
|
39
|
+
|
|
40
|
+
return _react2.default.createElement(
|
|
41
|
+
_core.Grid,
|
|
42
|
+
{ container: true },
|
|
43
|
+
!R.isNil(icon) && icon,
|
|
44
|
+
_react2.default.createElement(
|
|
45
|
+
_core.Typography,
|
|
46
|
+
{ variant: 'h6', className: classes.title, inline: 'true' },
|
|
47
|
+
label
|
|
48
|
+
)
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
Title.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
53
|
+
label: _propTypes2.default.string,
|
|
54
|
+
icon: _propTypes2.default.node
|
|
55
|
+
} : {};
|
|
56
|
+
|
|
57
|
+
exports.default = Title;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _ramda = require('ramda');
|
|
6
|
+
|
|
7
|
+
var R = _interopRequireWildcard(_ramda);
|
|
8
|
+
|
|
9
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
10
|
+
|
|
11
|
+
var useAxisOptions = function useAxisOptions(properties, suffix) {
|
|
12
|
+
var keys = ['min' + suffix, 'max' + suffix, 'pivot' + suffix, 'step' + suffix];
|
|
13
|
+
|
|
14
|
+
return R.pipe(R.pick(keys), R.keys)(properties);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.default = useAxisOptions;
|
|
18
|
+
module.exports = exports['default'];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _react = require('react');
|
|
6
|
+
|
|
7
|
+
var _ramda = require('ramda');
|
|
8
|
+
|
|
9
|
+
var R = _interopRequireWildcard(_ramda);
|
|
10
|
+
|
|
11
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
12
|
+
|
|
13
|
+
var useDimensionOptions = function useDimensionOptions(properties) {
|
|
14
|
+
var dimensions = (0, _react.useMemo)(function () {
|
|
15
|
+
return R.pipe(R.pick(['scatterDimension', 'scatterX', 'scatterY', 'symbolDimension', 'stackedDimension']), R.toPairs)(properties);
|
|
16
|
+
}, [properties]);
|
|
17
|
+
|
|
18
|
+
return [dimensions];
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.default = useDimensionOptions;
|
|
22
|
+
module.exports = exports['default'];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _react = require('react');
|
|
6
|
+
|
|
7
|
+
var _ramda = require('ramda');
|
|
8
|
+
|
|
9
|
+
var R = _interopRequireWildcard(_ramda);
|
|
10
|
+
|
|
11
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
12
|
+
|
|
13
|
+
var hasUniqUnlabelledOption = R.allPass([R.pipe(R.length, R.equals(1)), R.pipe(R.head, R.prop('label'), R.anyPass([R.isNil, R.isEmpty]))]);
|
|
14
|
+
|
|
15
|
+
var useFocusOptions = function useFocusOptions() {
|
|
16
|
+
var focus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
17
|
+
var labels = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
18
|
+
|
|
19
|
+
var options = (0, _react.useMemo)(function () {
|
|
20
|
+
return R.when(hasUniqUnlabelledOption, R.set(R.lensPath([0, 'label']), R.prop('uniqFocusOption', labels)))(focus.options);
|
|
21
|
+
}, [labels, focus.options]);
|
|
22
|
+
|
|
23
|
+
var indexedOptions = (0, _react.useMemo)(function () {
|
|
24
|
+
if (!options) return {};
|
|
25
|
+
return R.indexBy(R.prop('value'), options);
|
|
26
|
+
}, [options]);
|
|
27
|
+
|
|
28
|
+
return [options, indexedOptions];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.default = useFocusOptions;
|
|
32
|
+
module.exports = exports['default'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
4
|
+
exports.getValue = exports.extractMultipleValue = undefined;
|
|
5
5
|
|
|
6
6
|
var _ramda = require('ramda');
|
|
7
7
|
|
|
@@ -9,13 +9,7 @@ var R = _interopRequireWildcard(_ramda);
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
11
11
|
|
|
12
|
-
var isActive = exports.isActive = R.propOr(false, 'isActive');
|
|
13
|
-
|
|
14
|
-
var seriesProperties = exports.seriesProperties = ['scatterDimension', 'scatterX', 'scatterY', 'symbolDimension', 'stackedDimension', 'stackedMode'];
|
|
15
|
-
|
|
16
|
-
var isActivePanel = exports.isActivePanel = R.curry(function (propIds, properties) {
|
|
17
|
-
return R.pipe(R.props(propIds), R.pluck('isActive'), R.any(R.identity))(properties);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
12
|
// adapters for new Select which has not the same API as react-select
|
|
21
|
-
var extractMultipleValue = exports.extractMultipleValue = R.pipe(R.
|
|
13
|
+
var extractMultipleValue = exports.extractMultipleValue = R.pipe(R.propOr([], 'value'), R.pluck('value'));
|
|
14
|
+
|
|
15
|
+
var getValue = exports.getValue = R.ifElse(R.is(String), R.identity, R.prop('value'));
|
package/lib/DataEdit/DataEdit.js
CHANGED
|
@@ -24,16 +24,10 @@ var _Typography = require('@material-ui/core/Typography');
|
|
|
24
24
|
|
|
25
25
|
var _Typography2 = _interopRequireDefault(_Typography);
|
|
26
26
|
|
|
27
|
-
var _Container = require('@material-ui/core/Container');
|
|
28
|
-
|
|
29
|
-
var _Container2 = _interopRequireDefault(_Container);
|
|
30
|
-
|
|
31
27
|
var _Checkbox = require('@material-ui/core/Checkbox');
|
|
32
28
|
|
|
33
29
|
var _Checkbox2 = _interopRequireDefault(_Checkbox);
|
|
34
30
|
|
|
35
|
-
var _styles = require('@material-ui/styles');
|
|
36
|
-
|
|
37
31
|
var _FormControlLabel = require('@material-ui/core/FormControlLabel');
|
|
38
32
|
|
|
39
33
|
var _FormControlLabel2 = _interopRequireDefault(_FormControlLabel);
|
|
@@ -48,27 +42,9 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
48
42
|
|
|
49
43
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
50
44
|
|
|
51
|
-
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
52
|
-
return {
|
|
53
|
-
root: _extends({
|
|
54
|
-
padding: theme.spacing(0, 2, 1, 2)
|
|
55
|
-
}, R.pathOr({}, ['mixins', 'dataEdit', 'root'], theme)),
|
|
56
|
-
title: {
|
|
57
|
-
fontFamily: 'inherit'
|
|
58
|
-
},
|
|
59
|
-
checkboxes: {
|
|
60
|
-
display: 'flex',
|
|
61
|
-
justifyContent: 'space-around',
|
|
62
|
-
marginTop: theme.spacing(1)
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
});
|
|
66
|
-
|
|
67
45
|
var DataEdit = function DataEdit(_ref) {
|
|
68
46
|
var labels = _ref.labels,
|
|
69
47
|
properties = _ref.properties;
|
|
70
|
-
|
|
71
|
-
var classes = useStyles();
|
|
72
48
|
var _properties$title = properties.title,
|
|
73
49
|
title = _properties$title === undefined ? {} : _properties$title,
|
|
74
50
|
_properties$subtitle = properties.subtitle,
|
|
@@ -84,66 +60,61 @@ var DataEdit = function DataEdit(_ref) {
|
|
|
84
60
|
|
|
85
61
|
return _react2.default.createElement(
|
|
86
62
|
_Grid2.default,
|
|
87
|
-
{ 'data-testid': 'data-edit-test-id',
|
|
63
|
+
{ 'data-testid': 'data-edit-test-id', container: true, spacing: 1 },
|
|
88
64
|
_react2.default.createElement(
|
|
89
65
|
_Grid2.default,
|
|
90
66
|
{ item: true, xs: 12 },
|
|
91
67
|
_react2.default.createElement(
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
_Grid2.default,
|
|
96
|
-
{ item: true, xs: 12 },
|
|
97
|
-
_react2.default.createElement(
|
|
98
|
-
_Typography2.default,
|
|
99
|
-
{ variant: 'h6', className: classes.title },
|
|
100
|
-
'Information'
|
|
101
|
-
)
|
|
102
|
-
)
|
|
103
|
-
),
|
|
104
|
-
_react2.default.createElement(
|
|
105
|
-
_Grid2.default,
|
|
106
|
-
{ spacing: 2, container: true },
|
|
107
|
-
R.or(R.prop('isActive')(title), R.prop('isActive')(subtitle)) && _react2.default.createElement(
|
|
108
|
-
_Grid2.default,
|
|
109
|
-
{ item: true, xs: 12, sm: 12, md: 12, lg: 6 },
|
|
110
|
-
R.prop('isActive')(title) && _react2.default.createElement(_Input2.default, _extends({
|
|
111
|
-
fullWidth: true,
|
|
112
|
-
label: R.prop('title', labels),
|
|
113
|
-
resetLabel: resetLabel
|
|
114
|
-
}, R.dissoc('isDefault', title))),
|
|
115
|
-
R.prop('isActive')(subtitle) && _react2.default.createElement(_Input2.default, _extends({
|
|
116
|
-
fullWidth: true,
|
|
117
|
-
label: R.prop('subtitle', labels),
|
|
118
|
-
resetLabel: resetLabel
|
|
119
|
-
}, R.dissoc('isDefault', subtitle)))
|
|
120
|
-
),
|
|
121
|
-
_react2.default.createElement(
|
|
122
|
-
_Grid2.default,
|
|
123
|
-
{ item: true, xs: 12, sm: 12, md: 12, lg: 6 },
|
|
124
|
-
R.prop('isActive')(source) && _react2.default.createElement(_Input2.default, _extends({
|
|
125
|
-
fullWidth: true,
|
|
126
|
-
label: R.prop('source', labels),
|
|
127
|
-
resetLabel: resetLabel
|
|
128
|
-
}, R.dissoc('isDefault', source))),
|
|
129
|
-
_react2.default.createElement(
|
|
130
|
-
_Container2.default,
|
|
131
|
-
{ disableGutters: true, className: classes.checkboxes },
|
|
132
|
-
R.map(function (item) {
|
|
133
|
-
if (R.pipe(R.prop('isActive'), R.not)(item)) return;
|
|
134
|
-
var id = R.prop('id')(item);
|
|
135
|
-
return _react2.default.createElement(_FormControlLabel2.default, {
|
|
136
|
-
key: id,
|
|
137
|
-
control: _react2.default.createElement(_Checkbox2.default, _extends({
|
|
138
|
-
color: 'primary',
|
|
139
|
-
inputProps: { 'aria-label': R.prop(id)(labels) }
|
|
140
|
-
}, R.omit(['isActive'])(item))),
|
|
141
|
-
label: R.prop(id)(labels)
|
|
142
|
-
});
|
|
143
|
-
})([logo, copyright])
|
|
144
|
-
)
|
|
145
|
-
)
|
|
68
|
+
_Typography2.default,
|
|
69
|
+
{ variant: 'h6' },
|
|
70
|
+
'Information'
|
|
146
71
|
)
|
|
72
|
+
),
|
|
73
|
+
R.prop('isActive', title) && _react2.default.createElement(
|
|
74
|
+
_Grid2.default,
|
|
75
|
+
{ item: true, xs: 12, style: { minWidth: 220 } },
|
|
76
|
+
_react2.default.createElement(_Input2.default, _extends({
|
|
77
|
+
fullWidth: true,
|
|
78
|
+
label: R.prop('title', labels),
|
|
79
|
+
resetLabel: resetLabel
|
|
80
|
+
}, R.dissoc('isDefault', title)))
|
|
81
|
+
),
|
|
82
|
+
R.prop('isActive', subtitle) && _react2.default.createElement(
|
|
83
|
+
_Grid2.default,
|
|
84
|
+
{ item: true, xs: 12, style: { minWidth: 220 } },
|
|
85
|
+
_react2.default.createElement(_Input2.default, _extends({
|
|
86
|
+
fullWidth: true,
|
|
87
|
+
label: R.prop('subtitle', labels),
|
|
88
|
+
resetLabel: resetLabel
|
|
89
|
+
}, R.dissoc('isDefault', subtitle)))
|
|
90
|
+
),
|
|
91
|
+
R.prop('isActive', source) && _react2.default.createElement(
|
|
92
|
+
_Grid2.default,
|
|
93
|
+
{ item: true, xs: 12, style: { minWidth: 220 } },
|
|
94
|
+
_react2.default.createElement(_Input2.default, _extends({
|
|
95
|
+
fullWidth: true,
|
|
96
|
+
label: R.prop('source', labels),
|
|
97
|
+
resetLabel: resetLabel
|
|
98
|
+
}, R.dissoc('isDefault', source)))
|
|
99
|
+
),
|
|
100
|
+
_react2.default.createElement(
|
|
101
|
+
_Grid2.default,
|
|
102
|
+
{ item: true, container: true, xs: 12, justifyContent: 'space-around' },
|
|
103
|
+
R.map(function (item) {
|
|
104
|
+
if (R.pipe(R.prop('isActive'), R.not)(item)) return;
|
|
105
|
+
var id = R.prop('id')(item);
|
|
106
|
+
return _react2.default.createElement(
|
|
107
|
+
_Grid2.default,
|
|
108
|
+
{ item: true, key: id },
|
|
109
|
+
_react2.default.createElement(_FormControlLabel2.default, {
|
|
110
|
+
control: _react2.default.createElement(_Checkbox2.default, _extends({
|
|
111
|
+
color: 'primary',
|
|
112
|
+
inputProps: { 'aria-label': R.prop(id)(labels) }
|
|
113
|
+
}, R.omit(['isActive'])(item))),
|
|
114
|
+
label: R.prop(id)(labels)
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
})([logo, copyright])
|
|
147
118
|
)
|
|
148
119
|
);
|
|
149
120
|
};
|
|
@@ -68,7 +68,8 @@ var CustomExpansionPanel = function CustomExpansionPanel(_ref) {
|
|
|
68
68
|
_ref$testId = _ref.testId,
|
|
69
69
|
testId = _ref$testId === undefined ? 'expansion_panel' : _ref$testId,
|
|
70
70
|
isPinned = _ref.isPinned,
|
|
71
|
-
pinnedLabel = _ref.pinnedLabel
|
|
71
|
+
pinnedLabel = _ref.pinnedLabel,
|
|
72
|
+
moreFilters = _ref.moreFilters;
|
|
72
73
|
|
|
73
74
|
var classes = (0, _styles.useStyles)();
|
|
74
75
|
|
|
@@ -108,7 +109,12 @@ var CustomExpansionPanel = function CustomExpansionPanel(_ref) {
|
|
|
108
109
|
),
|
|
109
110
|
_react2.default.createElement(
|
|
110
111
|
_Typography2.default,
|
|
111
|
-
{
|
|
112
|
+
{
|
|
113
|
+
noWrap: true,
|
|
114
|
+
variant: 'body2',
|
|
115
|
+
title: label,
|
|
116
|
+
className: moreFilters ? classes.title : classes.label
|
|
117
|
+
},
|
|
112
118
|
label
|
|
113
119
|
),
|
|
114
120
|
isPinned && _react2.default.createElement(
|
|
@@ -144,7 +150,8 @@ CustomExpansionPanel.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
144
150
|
maxHeight: _propTypes2.default.bool,
|
|
145
151
|
children: _propTypes2.default.oneOfType([_propTypes2.default.arrayOf(_propTypes2.default.node), _propTypes2.default.node]),
|
|
146
152
|
fullWidth: _propTypes2.default.bool,
|
|
147
|
-
isPinned: _propTypes2.default.bool
|
|
153
|
+
isPinned: _propTypes2.default.bool,
|
|
154
|
+
moreFilters: _propTypes2.default.bool
|
|
148
155
|
} : {};
|
|
149
156
|
|
|
150
157
|
exports.default = (0, _utils.withBlank)(function (_ref2) {
|
|
@@ -75,6 +75,11 @@ var useStyles = exports.useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
75
75
|
},
|
|
76
76
|
label: _extends({
|
|
77
77
|
color: theme.palette.grey[700]
|
|
78
|
-
}, R.pathOr({}, ['mixins', 'expansionPanel', 'title'], theme))
|
|
78
|
+
}, R.pathOr({}, ['mixins', 'expansionPanel', 'title'], theme)),
|
|
79
|
+
title: _extends({
|
|
80
|
+
padding: 0
|
|
81
|
+
}, R.pathOr({}, ['mixins', 'apiQueries', 'title'], theme), {
|
|
82
|
+
fontWeight: 'bold'
|
|
83
|
+
})
|
|
79
84
|
};
|
|
80
85
|
});
|
package/lib/Select/Select.js
CHANGED
|
@@ -26,6 +26,8 @@ var _MenuItem = require('@material-ui/core/MenuItem');
|
|
|
26
26
|
|
|
27
27
|
var _MenuItem2 = _interopRequireDefault(_MenuItem);
|
|
28
28
|
|
|
29
|
+
var _core = require('@material-ui/core');
|
|
30
|
+
|
|
29
31
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
30
32
|
|
|
31
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -35,6 +37,9 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
35
37
|
root: _extends({}, theme.typography.body2),
|
|
36
38
|
paper: {
|
|
37
39
|
maxHeight: 320
|
|
40
|
+
},
|
|
41
|
+
typo: {
|
|
42
|
+
whiteSpace: 'break-spaces'
|
|
38
43
|
}
|
|
39
44
|
};
|
|
40
45
|
});
|
|
@@ -74,9 +79,7 @@ var Select = function Select(_ref) {
|
|
|
74
79
|
};
|
|
75
80
|
|
|
76
81
|
(0, _react.useEffect)(function () {
|
|
77
|
-
if (ref.current && open)
|
|
78
|
-
setWidth(ref.current.clientWidth);
|
|
79
|
-
}
|
|
82
|
+
if (ref.current && open) setWidth(ref.current.clientWidth);
|
|
80
83
|
}, [open]);
|
|
81
84
|
|
|
82
85
|
var getter = function getter(key) {
|
|
@@ -103,6 +106,7 @@ var Select = function Select(_ref) {
|
|
|
103
106
|
title: R.join(', ', labels),
|
|
104
107
|
onChange: handleChange,
|
|
105
108
|
variant: 'outlined',
|
|
109
|
+
margin: 'dense',
|
|
106
110
|
size: 'small',
|
|
107
111
|
fullWidth: true,
|
|
108
112
|
SelectProps: {
|
|
@@ -142,7 +146,11 @@ var Select = function Select(_ref) {
|
|
|
142
146
|
'aria-label': label,
|
|
143
147
|
title: label
|
|
144
148
|
},
|
|
145
|
-
label
|
|
149
|
+
isMultiple ? label : _react2.default.createElement(
|
|
150
|
+
_core.Typography,
|
|
151
|
+
{ variant: 'inherit', className: classes.typo },
|
|
152
|
+
label
|
|
153
|
+
)
|
|
146
154
|
);
|
|
147
155
|
})(items)
|
|
148
156
|
);
|
package/package.json
CHANGED
package/es/ChartsConfig/Axis.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import * as R from 'ramda';
|
|
6
|
-
import Grid from '@material-ui/core/Grid';
|
|
7
|
-
import Input from './Input';
|
|
8
|
-
import { isActive } from './utils';
|
|
9
|
-
import ContainerTitle from './ContainerTitle';
|
|
10
|
-
import { useStyles } from './styles';
|
|
11
|
-
import cx from 'classnames';
|
|
12
|
-
var AxisConfig = function AxisConfig(_ref) {
|
|
13
|
-
var icon = _ref.icon,
|
|
14
|
-
label = _ref.label,
|
|
15
|
-
labels = _ref.labels,
|
|
16
|
-
max = _ref.max,
|
|
17
|
-
min = _ref.min,
|
|
18
|
-
pivot = _ref.pivot,
|
|
19
|
-
step = _ref.step;
|
|
20
|
-
|
|
21
|
-
var classes = useStyles();
|
|
22
|
-
return React.createElement(
|
|
23
|
-
ContainerTitle,
|
|
24
|
-
{ variant: 'grey', icon: icon, label: label, gridItemProps: { xs: 12 } },
|
|
25
|
-
React.createElement(
|
|
26
|
-
Grid,
|
|
27
|
-
{ container: true, spacing: 1, className: classes.inputContainer },
|
|
28
|
-
isActive(min) && React.createElement(
|
|
29
|
-
Grid,
|
|
30
|
-
{ item: true, xs: 12, sm: 12, md: 6, lg: 4, className: cx(classes.axis, classes.wrapper) },
|
|
31
|
-
React.createElement(Input, _extends({}, min, {
|
|
32
|
-
value: R.when(R.isNil, R.always(''))(min.value),
|
|
33
|
-
type: 'number',
|
|
34
|
-
label: R.prop('min', labels),
|
|
35
|
-
fullWidth: true,
|
|
36
|
-
InputProps: {
|
|
37
|
-
endAdornment: null
|
|
38
|
-
}
|
|
39
|
-
}))
|
|
40
|
-
),
|
|
41
|
-
isActive(max) && React.createElement(
|
|
42
|
-
Grid,
|
|
43
|
-
{ item: true, xs: 12, sm: 12, md: 6, lg: 4, className: cx(classes.axis, classes.wrapper) },
|
|
44
|
-
React.createElement(Input, _extends({}, max, {
|
|
45
|
-
value: R.when(R.isNil, R.always(''))(max.value),
|
|
46
|
-
type: 'number',
|
|
47
|
-
label: R.prop('max', labels),
|
|
48
|
-
fullWidth: true,
|
|
49
|
-
InputProps: {
|
|
50
|
-
endAdornment: null
|
|
51
|
-
}
|
|
52
|
-
}))
|
|
53
|
-
),
|
|
54
|
-
isActive(pivot) && React.createElement(
|
|
55
|
-
Grid,
|
|
56
|
-
{ item: true, xs: 12, sm: 12, md: 6, lg: 4, className: cx(classes.axis, classes.wrapper) },
|
|
57
|
-
React.createElement(Input, _extends({}, pivot, {
|
|
58
|
-
value: R.when(R.isNil, R.always(''))(pivot.value),
|
|
59
|
-
type: 'number',
|
|
60
|
-
label: R.prop('pivot', labels),
|
|
61
|
-
fullWidth: true,
|
|
62
|
-
InputProps: {
|
|
63
|
-
endAdornment: null
|
|
64
|
-
}
|
|
65
|
-
}))
|
|
66
|
-
),
|
|
67
|
-
isActive(step) && React.createElement(
|
|
68
|
-
Grid,
|
|
69
|
-
{ item: true, xs: 12, sm: 12, md: 6, lg: 4, className: cx(classes.axis, classes.wrapper) },
|
|
70
|
-
React.createElement(Input, _extends({}, step, {
|
|
71
|
-
value: R.when(R.isNil, R.always(''))(step.value),
|
|
72
|
-
type: 'number',
|
|
73
|
-
label: R.prop('step', labels),
|
|
74
|
-
fullWidth: true,
|
|
75
|
-
InputProps: {
|
|
76
|
-
endAdornment: null
|
|
77
|
-
}
|
|
78
|
-
}))
|
|
79
|
-
)
|
|
80
|
-
)
|
|
81
|
-
);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
AxisConfig.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
85
|
-
icon: PropTypes.node,
|
|
86
|
-
label: PropTypes.string,
|
|
87
|
-
labels: PropTypes.object,
|
|
88
|
-
max: PropTypes.object,
|
|
89
|
-
min: PropTypes.object,
|
|
90
|
-
pivot: PropTypes.object,
|
|
91
|
-
step: PropTypes.object,
|
|
92
|
-
hasOnSubmit: PropTypes.bool,
|
|
93
|
-
onChange: PropTypes.func
|
|
94
|
-
} : {};
|
|
95
|
-
|
|
96
|
-
export default AxisConfig;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import * as R from 'ramda';
|
|
4
|
-
import Grid from '@material-ui/core/Grid';
|
|
5
|
-
import Typography from '@material-ui/core/Typography';
|
|
6
|
-
import Button from '@material-ui/core/Button';
|
|
7
|
-
|
|
8
|
-
var ButtonGroup = function ButtonGroup(_ref) {
|
|
9
|
-
var label = _ref.label,
|
|
10
|
-
labels = _ref.labels,
|
|
11
|
-
onChange = _ref.onChange,
|
|
12
|
-
options = _ref.options,
|
|
13
|
-
value = _ref.value;
|
|
14
|
-
return React.createElement(
|
|
15
|
-
Grid,
|
|
16
|
-
{ container: true, alignItems: 'center' },
|
|
17
|
-
React.createElement(
|
|
18
|
-
Grid,
|
|
19
|
-
{ item: true, xs: 6 },
|
|
20
|
-
React.createElement(
|
|
21
|
-
Typography,
|
|
22
|
-
{ variant: 'body2' },
|
|
23
|
-
label
|
|
24
|
-
)
|
|
25
|
-
),
|
|
26
|
-
React.createElement(
|
|
27
|
-
Grid,
|
|
28
|
-
{ item: true, xs: 6 },
|
|
29
|
-
React.createElement(
|
|
30
|
-
Grid,
|
|
31
|
-
{ container: true, spacing: 1, justifyContent: 'flex-end' },
|
|
32
|
-
R.map(function (option) {
|
|
33
|
-
return React.createElement(
|
|
34
|
-
Grid,
|
|
35
|
-
{ item: true, key: option.value },
|
|
36
|
-
React.createElement(
|
|
37
|
-
Button,
|
|
38
|
-
{
|
|
39
|
-
variant: option.value === value ? 'contained' : 'outlined',
|
|
40
|
-
onClick: function onClick() {
|
|
41
|
-
return onChange(option.value);
|
|
42
|
-
},
|
|
43
|
-
color: 'primary'
|
|
44
|
-
},
|
|
45
|
-
React.createElement(
|
|
46
|
-
Typography,
|
|
47
|
-
{ variant: 'body2' },
|
|
48
|
-
R.prop(option.value, labels)
|
|
49
|
-
)
|
|
50
|
-
)
|
|
51
|
-
);
|
|
52
|
-
})(options)
|
|
53
|
-
)
|
|
54
|
-
)
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
ButtonGroup.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
59
|
-
label: PropTypes.string,
|
|
60
|
-
labels: PropTypes.object,
|
|
61
|
-
onChange: PropTypes.func,
|
|
62
|
-
options: PropTypes.array,
|
|
63
|
-
value: PropTypes.string
|
|
64
|
-
} : {};
|
|
65
|
-
|
|
66
|
-
export default ButtonGroup;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import * as R from 'ramda';
|
|
6
|
-
import cx from 'classnames';
|
|
7
|
-
import Grid from '@material-ui/core/Grid';
|
|
8
|
-
import Typography from '@material-ui/core/Typography';
|
|
9
|
-
import { useStyles } from './styles';
|
|
10
|
-
|
|
11
|
-
var ContainerTitle = function ContainerTitle(_ref) {
|
|
12
|
-
var _cx;
|
|
13
|
-
|
|
14
|
-
var variant = _ref.variant,
|
|
15
|
-
children = _ref.children,
|
|
16
|
-
icon = _ref.icon,
|
|
17
|
-
label = _ref.label,
|
|
18
|
-
gridItemProps = _ref.gridItemProps;
|
|
19
|
-
|
|
20
|
-
var classes = useStyles();
|
|
21
|
-
return React.createElement(
|
|
22
|
-
Grid,
|
|
23
|
-
_extends({
|
|
24
|
-
item: true
|
|
25
|
-
}, gridItemProps, {
|
|
26
|
-
className: cx((_cx = {}, _cx[classes.greyVariant] = R.equals(variant, 'grey'), _cx))
|
|
27
|
-
}),
|
|
28
|
-
React.createElement(
|
|
29
|
-
Grid,
|
|
30
|
-
{ container: true },
|
|
31
|
-
React.createElement(
|
|
32
|
-
Grid,
|
|
33
|
-
{ item: true, xs: 12, className: cx(classes.gridItemSpace, classes.containerTitle) },
|
|
34
|
-
R.not(R.isNil(icon)) && icon,
|
|
35
|
-
React.createElement(
|
|
36
|
-
Typography,
|
|
37
|
-
{ variant: 'h6', className: classes.title },
|
|
38
|
-
label
|
|
39
|
-
)
|
|
40
|
-
)
|
|
41
|
-
),
|
|
42
|
-
children
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
ContainerTitle.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
47
|
-
label: PropTypes.string,
|
|
48
|
-
variant: PropTypes.string,
|
|
49
|
-
icon: PropTypes.node,
|
|
50
|
-
gridItemProps: PropTypes.object,
|
|
51
|
-
onSubmit: PropTypes.func,
|
|
52
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
|
53
|
-
} : {};
|
|
54
|
-
|
|
55
|
-
export default ContainerTitle;
|