@sis-cc/dotstatsuite-visions 6.6.0 → 6.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +46 -30
- package/es/Share/Share.js +64 -41
- package/es/Share/index.js +1 -0
- 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 +67 -48
- package/es/TableHtml5/index.js +1 -0
- package/es/TableHtml5/section.js +121 -83
- package/es/TableHtml5/sectionHeader.js +72 -45
- package/es/TableHtml5/subHeader.js +63 -44
- 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 +78 -49
- 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 +97 -66
- package/lib/TableHtml5/index.js +17 -8
- package/lib/TableHtml5/section.js +163 -108
- package/lib/TableHtml5/sectionHeader.js +102 -64
- package/lib/TableHtml5/subHeader.js +93 -64
- 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
|
@@ -1,13 +1,16 @@
|
|
|
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';
|
|
3
4
|
import * as R from 'ramda';
|
|
4
5
|
import cx from 'classnames';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
5
7
|
import TextField from '@material-ui/core/TextField';
|
|
6
8
|
import { makeStyles } from '@material-ui/core/styles';
|
|
7
9
|
import Typography from '@material-ui/core/Typography';
|
|
8
10
|
import Help from '@material-ui/icons/Help';
|
|
9
11
|
import Tooltip from '../Tooltip/Tooltip';
|
|
10
12
|
import { withBlank } from '../utils';
|
|
13
|
+
|
|
11
14
|
var useStyles = makeStyles(function (theme) {
|
|
12
15
|
return {
|
|
13
16
|
root: {
|
|
@@ -43,45 +46,62 @@ var InputNumber = function InputNumber(_ref) {
|
|
|
43
46
|
afterLabel = _ref.afterLabel,
|
|
44
47
|
popperLabel = _ref.popperLabel,
|
|
45
48
|
_ref$placeholder = _ref.placeholder,
|
|
46
|
-
placeholder = _ref$placeholder ===
|
|
49
|
+
placeholder = _ref$placeholder === undefined ? '--' : _ref$placeholder,
|
|
47
50
|
textFieldProps = _ref.textFieldProps;
|
|
51
|
+
|
|
48
52
|
var classes = useStyles();
|
|
49
53
|
|
|
50
54
|
var _value = R.anyPass([R.isEmpty, R.isNil, function (nb) {
|
|
51
55
|
return R.lte(Number(nb), 0);
|
|
52
56
|
}])(value) ? '' : value;
|
|
53
57
|
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
className: classes.root
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
return React.createElement(
|
|
59
|
+
'div',
|
|
60
|
+
{ 'data-testid': 'input-number-test-id', className: classes.root },
|
|
61
|
+
beforeLabel && React.createElement(
|
|
62
|
+
Typography,
|
|
63
|
+
{ variant: 'body2' },
|
|
64
|
+
beforeLabel
|
|
65
|
+
),
|
|
66
|
+
React.createElement(TextField, _extends({
|
|
67
|
+
className: classes.textField,
|
|
68
|
+
inputProps: {
|
|
69
|
+
min: 0,
|
|
70
|
+
step: 1,
|
|
71
|
+
className: classes.input
|
|
72
|
+
},
|
|
73
|
+
placeholder: placeholder,
|
|
74
|
+
onChange: function onChange(e) {
|
|
75
|
+
return _onChange(e.target.value);
|
|
76
|
+
},
|
|
77
|
+
type: 'number',
|
|
78
|
+
value: _value,
|
|
79
|
+
variant: 'outlined'
|
|
80
|
+
}, textFieldProps)),
|
|
81
|
+
R.not(R.isNil(afterLabel)) && React.createElement(
|
|
82
|
+
Typography,
|
|
83
|
+
{ variant: 'body2' },
|
|
84
|
+
afterLabel
|
|
85
|
+
),
|
|
86
|
+
R.not(R.isNil(popperLabel)) && React.createElement(
|
|
87
|
+
Tooltip,
|
|
88
|
+
{ className: cx(classes.icon), title: popperLabel, variant: 'light' },
|
|
89
|
+
React.createElement(Help, null)
|
|
90
|
+
)
|
|
91
|
+
);
|
|
80
92
|
};
|
|
81
93
|
|
|
94
|
+
InputNumber.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
95
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
96
|
+
onChange: PropTypes.func,
|
|
97
|
+
beforeLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
98
|
+
afterLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
99
|
+
popperLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
100
|
+
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
101
|
+
textFieldProps: PropTypes.object
|
|
102
|
+
} : {};
|
|
103
|
+
|
|
82
104
|
export default withBlank(function (_ref2) {
|
|
83
105
|
var isBlank = _ref2.isBlank;
|
|
84
|
-
return {
|
|
85
|
-
isBlank: isBlank
|
|
86
|
-
};
|
|
106
|
+
return { isBlank: isBlank };
|
|
87
107
|
})(InputNumber);
|
package/es/InputNumber/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
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';
|
|
3
4
|
import * as R from 'ramda';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
4
6
|
import cx from 'classnames';
|
|
5
7
|
import { makeStyles } from '@material-ui/core/styles';
|
|
6
8
|
import Typography from '@material-ui/core/Typography';
|
|
9
|
+
|
|
7
10
|
var useStyles = makeStyles(function (theme) {
|
|
8
11
|
return {
|
|
9
12
|
hr: _extends({
|
|
@@ -24,18 +27,26 @@ var useStyles = makeStyles(function (theme) {
|
|
|
24
27
|
}
|
|
25
28
|
};
|
|
26
29
|
});
|
|
30
|
+
|
|
27
31
|
export var LabelDivider = function LabelDivider(_ref) {
|
|
28
32
|
var _cx;
|
|
29
33
|
|
|
30
34
|
var label = _ref.label,
|
|
31
35
|
color = _ref.color,
|
|
32
36
|
withMargin = _ref.withMargin;
|
|
37
|
+
|
|
33
38
|
var classes = useStyles();
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
style: {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, label);
|
|
39
|
+
return React.createElement(
|
|
40
|
+
Typography,
|
|
41
|
+
{ className: cx(classes.hr, (_cx = {}, _cx[classes.margin] = withMargin, _cx)), style: { color: color } },
|
|
42
|
+
label
|
|
43
|
+
);
|
|
40
44
|
};
|
|
45
|
+
|
|
46
|
+
LabelDivider.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
47
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
48
|
+
color: PropTypes.string,
|
|
49
|
+
withMargin: PropTypes.bool
|
|
50
|
+
} : {};
|
|
51
|
+
|
|
41
52
|
export default LabelDivider;
|
package/es/LabelDivider/index.js
CHANGED
package/es/Loading/Loading.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
3
4
|
import Typography from '@material-ui/core/Typography';
|
|
4
5
|
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
6
|
+
|
|
5
7
|
var useStyles = makeStyles(function (theme) {
|
|
6
8
|
return {
|
|
7
9
|
root: {
|
|
@@ -20,16 +22,23 @@ var useStyles = makeStyles(function (theme) {
|
|
|
20
22
|
|
|
21
23
|
var Loading = function Loading(_ref) {
|
|
22
24
|
var message = _ref.message;
|
|
25
|
+
|
|
23
26
|
var classes = useStyles();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
className: classes.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
|
|
28
|
+
return React.createElement(
|
|
29
|
+
'div',
|
|
30
|
+
{ className: classes.root },
|
|
31
|
+
React.createElement(CircularProgress, { className: classes.progress }),
|
|
32
|
+
React.createElement(
|
|
33
|
+
Typography,
|
|
34
|
+
{ variant: 'subtitle1', noWrap: true, align: 'center' },
|
|
35
|
+
message
|
|
36
|
+
)
|
|
37
|
+
);
|
|
33
38
|
};
|
|
34
39
|
|
|
40
|
+
Loading.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
41
|
+
message: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
|
|
42
|
+
} : {};
|
|
43
|
+
|
|
35
44
|
export default Loading;
|
package/es/Loading/index.js
CHANGED
package/es/Logo/Logo.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
|
+
|
|
3
5
|
var useStyles = makeStyles(function () {
|
|
4
6
|
return {
|
|
5
7
|
container: {
|
|
@@ -19,18 +21,22 @@ var useStyles = makeStyles(function () {
|
|
|
19
21
|
var Logo = function Logo(_ref2) {
|
|
20
22
|
var logo = _ref2.logo,
|
|
21
23
|
_ref2$maxHeight = _ref2.maxHeight,
|
|
22
|
-
maxHeight = _ref2$maxHeight ===
|
|
24
|
+
maxHeight = _ref2$maxHeight === undefined ? 150 : _ref2$maxHeight,
|
|
23
25
|
children = _ref2.children;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
className: classes.container
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
alt: "logo"
|
|
33
|
-
}), children);
|
|
26
|
+
|
|
27
|
+
var classes = useStyles({ maxHeight: maxHeight });
|
|
28
|
+
return React.createElement(
|
|
29
|
+
'div',
|
|
30
|
+
{ className: classes.container },
|
|
31
|
+
React.createElement('img', { className: classes.logo, src: logo, alt: 'logo' }),
|
|
32
|
+
children
|
|
33
|
+
);
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
Logo.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
37
|
+
logo: PropTypes.string,
|
|
38
|
+
maxHeight: PropTypes.number,
|
|
39
|
+
children: PropTypes.object
|
|
40
|
+
} : {};
|
|
41
|
+
|
|
36
42
|
export default Logo;
|
package/es/Logo/index.js
CHANGED
package/es/NoData/NoData.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
3
4
|
import Typography from '@material-ui/core/Typography';
|
|
4
5
|
import Error from '@material-ui/icons/Error';
|
|
6
|
+
|
|
5
7
|
var useStyles = makeStyles(function () {
|
|
6
8
|
return {
|
|
7
9
|
root: {
|
|
@@ -14,31 +16,37 @@ var useStyles = makeStyles(function () {
|
|
|
14
16
|
}
|
|
15
17
|
};
|
|
16
18
|
});
|
|
19
|
+
|
|
17
20
|
var NO_RESULT_MESSAGE_ID = 'noResultMessage';
|
|
18
21
|
|
|
19
22
|
var NoData = function NoData(_ref) {
|
|
20
23
|
var icon = _ref.icon,
|
|
21
24
|
message = _ref.message;
|
|
25
|
+
|
|
22
26
|
var classes = useStyles();
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
return React.createElement(
|
|
28
|
+
'div',
|
|
29
|
+
{ className: classes.root },
|
|
30
|
+
React.createElement(
|
|
31
|
+
Typography,
|
|
32
|
+
{ variant: 'subtitle1', noWrap: true, align: 'center' },
|
|
33
|
+
icon
|
|
34
|
+
),
|
|
35
|
+
React.createElement(
|
|
36
|
+
Typography,
|
|
37
|
+
{ variant: 'subtitle1', noWrap: true, align: 'center', tabIndex: '0', id: NO_RESULT_MESSAGE_ID },
|
|
38
|
+
message
|
|
39
|
+
)
|
|
40
|
+
);
|
|
36
41
|
};
|
|
37
42
|
|
|
43
|
+
NoData.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
44
|
+
icon: PropTypes.element,
|
|
45
|
+
message: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
|
|
46
|
+
} : {};
|
|
47
|
+
|
|
38
48
|
NoData.defaultProps = {
|
|
39
|
-
icon:
|
|
40
|
-
color: "primary",
|
|
41
|
-
fontSize: "large"
|
|
42
|
-
})
|
|
49
|
+
icon: React.createElement(Error, { color: 'primary', fontSize: 'large' })
|
|
43
50
|
};
|
|
51
|
+
|
|
44
52
|
export default NoData;
|
package/es/NoData/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import * as R from 'ramda';
|
|
3
4
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
5
|
import KeyboardArrowLeft from '@material-ui/icons/KeyboardArrowLeft';
|
|
@@ -10,6 +11,7 @@ import TextField from '@material-ui/core/TextField';
|
|
|
10
11
|
import Typography from '@material-ui/core/Typography';
|
|
11
12
|
import { useTheme } from '@material-ui/core/styles';
|
|
12
13
|
import { withBlank } from '../utils';
|
|
14
|
+
|
|
13
15
|
var useStyles = makeStyles(function (theme) {
|
|
14
16
|
return {
|
|
15
17
|
container: {
|
|
@@ -45,6 +47,7 @@ var PageForm = function PageForm(_ref) {
|
|
|
45
47
|
page = _ref.page,
|
|
46
48
|
pages = _ref.pages,
|
|
47
49
|
onSubmit = _ref.onSubmit;
|
|
50
|
+
|
|
48
51
|
var classes = useStyles();
|
|
49
52
|
|
|
50
53
|
var _useState = useState(page),
|
|
@@ -63,7 +66,6 @@ var PageForm = function PageForm(_ref) {
|
|
|
63
66
|
var onEnterLabel = function onEnterLabel(event) {
|
|
64
67
|
if (event.key === 'Enter') {
|
|
65
68
|
event.preventDefault();
|
|
66
|
-
|
|
67
69
|
if (R.is(Function, onSubmit)) {
|
|
68
70
|
var intValue = parseInt(event.target.value);
|
|
69
71
|
if (isNaN(intValue)) return;
|
|
@@ -73,90 +75,132 @@ var PageForm = function PageForm(_ref) {
|
|
|
73
75
|
}
|
|
74
76
|
};
|
|
75
77
|
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
78
|
+
return React.createElement(
|
|
79
|
+
'div',
|
|
80
|
+
{ className: classes.container },
|
|
81
|
+
React.createElement(
|
|
82
|
+
Typography,
|
|
83
|
+
{ variant: 'body2', tabIndex: 0 },
|
|
84
|
+
R.prop('page', labels)
|
|
85
|
+
),
|
|
86
|
+
React.createElement(TextField, {
|
|
87
|
+
inputProps: {
|
|
88
|
+
'aria-label': R.prop('page', labels),
|
|
89
|
+
className: classes.innerInput
|
|
90
|
+
},
|
|
91
|
+
className: classes.input,
|
|
92
|
+
value: value,
|
|
93
|
+
disabled: pages === 1,
|
|
94
|
+
onChange: function onChange(e) {
|
|
95
|
+
return changePageFor(e.target.value);
|
|
96
|
+
},
|
|
97
|
+
onKeyPress: onEnterLabel,
|
|
98
|
+
type: 'text',
|
|
99
|
+
variant: 'outlined'
|
|
100
|
+
}),
|
|
101
|
+
React.createElement(
|
|
102
|
+
Typography,
|
|
103
|
+
{ variant: 'body2', tabIndex: 0 },
|
|
104
|
+
R.prop('of', labels) + ' ' + pages
|
|
105
|
+
)
|
|
106
|
+
);
|
|
99
107
|
};
|
|
100
108
|
|
|
109
|
+
PageForm.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
110
|
+
page: PropTypes.number,
|
|
111
|
+
pages: PropTypes.number,
|
|
112
|
+
onChange: PropTypes.func,
|
|
113
|
+
onSubmit: PropTypes.func,
|
|
114
|
+
labels: PropTypes.object
|
|
115
|
+
} : {};
|
|
116
|
+
|
|
101
117
|
var Pagination = function Pagination(_ref2) {
|
|
102
118
|
var labels = _ref2.labels,
|
|
103
119
|
page = _ref2.page,
|
|
104
120
|
pages = _ref2.pages,
|
|
105
121
|
onChange = _ref2.onChange,
|
|
106
122
|
onSubmit = _ref2.onSubmit;
|
|
123
|
+
|
|
107
124
|
var classes = useStyles();
|
|
108
125
|
var theme = useTheme();
|
|
109
|
-
return
|
|
110
|
-
|
|
111
|
-
className: classes.container
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
126
|
+
return React.createElement(
|
|
127
|
+
'div',
|
|
128
|
+
{ 'data-testid': 'pagination-test-id', className: classes.container },
|
|
129
|
+
React.createElement(
|
|
130
|
+
IconButton,
|
|
131
|
+
{
|
|
132
|
+
className: classes.iconButton,
|
|
133
|
+
disabled: page === 1,
|
|
134
|
+
color: 'primary',
|
|
135
|
+
onClick: function onClick() {
|
|
136
|
+
return onChange(1);
|
|
137
|
+
},
|
|
138
|
+
'aria-label': R.prop('startPage', labels),
|
|
139
|
+
size: 'small'
|
|
140
|
+
},
|
|
141
|
+
theme.direction === 'rtl' ? React.createElement(LastPageIcon, null) : React.createElement(FirstPageIcon, null)
|
|
142
|
+
),
|
|
143
|
+
React.createElement(
|
|
144
|
+
IconButton,
|
|
145
|
+
{
|
|
146
|
+
className: classes.iconButton,
|
|
147
|
+
disabled: page === 1,
|
|
148
|
+
color: 'primary',
|
|
149
|
+
onClick: function onClick() {
|
|
150
|
+
return onChange(page - 1);
|
|
151
|
+
},
|
|
152
|
+
'aria-label': R.prop('previousPage', labels),
|
|
153
|
+
size: 'small'
|
|
154
|
+
},
|
|
155
|
+
theme.direction === 'rtl' ? React.createElement(KeyboardArrowRight, null) : React.createElement(KeyboardArrowLeft, null)
|
|
156
|
+
),
|
|
157
|
+
React.createElement(PageForm, { labels: labels, page: page, pages: pages, onSubmit: onSubmit }),
|
|
158
|
+
React.createElement(
|
|
159
|
+
IconButton,
|
|
160
|
+
{
|
|
161
|
+
className: classes.iconButton,
|
|
162
|
+
disabled: page === pages,
|
|
163
|
+
color: 'primary',
|
|
164
|
+
onClick: function onClick() {
|
|
165
|
+
return onChange(page + 1);
|
|
166
|
+
},
|
|
167
|
+
'aria-label': R.prop('nextPage', labels),
|
|
168
|
+
size: 'small'
|
|
169
|
+
},
|
|
170
|
+
theme.direction === 'rtl' ? React.createElement(KeyboardArrowLeft, null) : React.createElement(KeyboardArrowRight, null)
|
|
171
|
+
),
|
|
172
|
+
React.createElement(
|
|
173
|
+
IconButton,
|
|
174
|
+
{
|
|
175
|
+
className: classes.iconButton,
|
|
176
|
+
disabled: page === pages,
|
|
177
|
+
color: 'primary',
|
|
178
|
+
onClick: function onClick() {
|
|
179
|
+
return onChange(pages);
|
|
180
|
+
},
|
|
181
|
+
'aria-label': R.prop('endPage', labels),
|
|
182
|
+
size: 'small'
|
|
183
|
+
},
|
|
184
|
+
theme.direction === 'rtl' ? React.createElement(FirstPageIcon, null) : React.createElement(LastPageIcon, null)
|
|
185
|
+
)
|
|
186
|
+
);
|
|
154
187
|
};
|
|
155
188
|
|
|
189
|
+
Pagination.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
190
|
+
page: PropTypes.number,
|
|
191
|
+
pages: PropTypes.number,
|
|
192
|
+
onChange: PropTypes.func,
|
|
193
|
+
onSubmit: PropTypes.func,
|
|
194
|
+
labels: PropTypes.shape({
|
|
195
|
+
page: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
196
|
+
of: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
|
|
197
|
+
})
|
|
198
|
+
} : {};
|
|
199
|
+
|
|
156
200
|
export default withBlank(function (_ref3) {
|
|
157
201
|
var isBlank = _ref3.isBlank,
|
|
158
202
|
_ref3$pages = _ref3.pages,
|
|
159
|
-
pages = _ref3$pages ===
|
|
203
|
+
pages = _ref3$pages === undefined ? 1 : _ref3$pages;
|
|
160
204
|
return {
|
|
161
205
|
isBlank: R.or(isBlank, R.equals(1, pages))
|
|
162
206
|
};
|