@sis-cc/dotstatsuite-visions 6.5.2 → 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 +62 -103
- 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 +61 -101
- package/es/CollapseButtons/Item.js +45 -70
- package/es/CollapseButtons/Paper.js +7 -21
- package/es/CollapseButtons/index.js +0 -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 +17 -29
- package/es/ToggleButton/index.js +0 -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 +2 -4
- package/es/theme.js +22 -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 +82 -137
- 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 +84 -134
- 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 +33 -55
- 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 +137 -304
- package/lib/theme.js +31 -17
- package/lib/utils.js +46 -31
- package/package.json +2 -10
package/es/Alert/Alert.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import _objectWithoutPropertiesLoose from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends";
|
|
3
|
+
var _excluded = ["action", "children", "classes", "className", "closeText", "color", "icon", "iconMapping", "onClose", "role", "severity", "variant"];
|
|
5
4
|
import React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
5
|
import clsx from 'clsx';
|
|
8
6
|
import { withStyles, lighten, darken } from '@material-ui/core/styles';
|
|
9
7
|
import Paper from '@material-ui/core/Paper';
|
|
@@ -14,11 +12,9 @@ import InfoOutlinedIcon from '@material-ui/icons/InfoOutlined';
|
|
|
14
12
|
import CloseIcon from '@material-ui/icons/Close';
|
|
15
13
|
import IconButton from '@material-ui/core/IconButton';
|
|
16
14
|
import { capitalize } from '@material-ui/core/utils';
|
|
17
|
-
|
|
18
15
|
export var styles = function styles(theme) {
|
|
19
16
|
var getColor = theme.palette.type === 'light' ? darken : lighten;
|
|
20
17
|
var getBackgroundColor = theme.palette.type === 'light' ? lighten : darken;
|
|
21
|
-
|
|
22
18
|
return {
|
|
23
19
|
/* Styles applied to the root element. */
|
|
24
20
|
root: _extends({}, theme.typography.body2, {
|
|
@@ -27,6 +23,7 @@ export var styles = function styles(theme) {
|
|
|
27
23
|
display: 'flex',
|
|
28
24
|
padding: '6px 16px'
|
|
29
25
|
}),
|
|
26
|
+
|
|
30
27
|
/* Styles applied to the root element if `variant="standard"` and `color="success"`. */
|
|
31
28
|
standardSuccess: {
|
|
32
29
|
color: getColor(theme.palette.success.main, 0.6),
|
|
@@ -35,6 +32,7 @@ export var styles = function styles(theme) {
|
|
|
35
32
|
color: theme.palette.success.main
|
|
36
33
|
}
|
|
37
34
|
},
|
|
35
|
+
|
|
38
36
|
/* Styles applied to the root element if `variant="standard"` and `color="info"`. */
|
|
39
37
|
standardInfo: {
|
|
40
38
|
color: getColor(theme.palette.info.main, 0.6),
|
|
@@ -43,6 +41,7 @@ export var styles = function styles(theme) {
|
|
|
43
41
|
color: theme.palette.info.main
|
|
44
42
|
}
|
|
45
43
|
},
|
|
44
|
+
|
|
46
45
|
/* Styles applied to the root element if `variant="standard"` and `color="warning"`. */
|
|
47
46
|
standardWarning: {
|
|
48
47
|
color: getColor(theme.palette.warning.main, 0.6),
|
|
@@ -51,6 +50,7 @@ export var styles = function styles(theme) {
|
|
|
51
50
|
color: theme.palette.warning.main
|
|
52
51
|
}
|
|
53
52
|
},
|
|
53
|
+
|
|
54
54
|
/* Styles applied to the root element if `variant="standard"` and `color="error"`. */
|
|
55
55
|
standardError: {
|
|
56
56
|
color: getColor(theme.palette.error.main, 0.6),
|
|
@@ -59,62 +59,71 @@ export var styles = function styles(theme) {
|
|
|
59
59
|
color: theme.palette.error.main
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
+
|
|
62
63
|
/* Styles applied to the root element if `variant="outlined"` and `color="success"`. */
|
|
63
64
|
outlinedSuccess: {
|
|
64
65
|
color: getColor(theme.palette.success.main, 0.6),
|
|
65
|
-
border:
|
|
66
|
+
border: "1px solid " + theme.palette.success.main,
|
|
66
67
|
'& $icon': {
|
|
67
68
|
color: theme.palette.success.main
|
|
68
69
|
}
|
|
69
70
|
},
|
|
71
|
+
|
|
70
72
|
/* Styles applied to the root element if `variant="outlined"` and `color="info"`. */
|
|
71
73
|
outlinedInfo: {
|
|
72
74
|
color: getColor(theme.palette.info.main, 0.6),
|
|
73
|
-
border:
|
|
75
|
+
border: "1px solid " + theme.palette.info.main,
|
|
74
76
|
'& $icon': {
|
|
75
77
|
color: theme.palette.info.main
|
|
76
78
|
}
|
|
77
79
|
},
|
|
80
|
+
|
|
78
81
|
/* Styles applied to the root element if `variant="outlined"` and `color="warning"`. */
|
|
79
82
|
outlinedWarning: {
|
|
80
83
|
color: getColor(theme.palette.warning.main, 0.6),
|
|
81
|
-
border:
|
|
84
|
+
border: "1px solid " + theme.palette.warning.main,
|
|
82
85
|
'& $icon': {
|
|
83
86
|
color: theme.palette.warning.main
|
|
84
87
|
}
|
|
85
88
|
},
|
|
89
|
+
|
|
86
90
|
/* Styles applied to the root element if `variant="outlined"` and `color="error"`. */
|
|
87
91
|
outlinedError: {
|
|
88
92
|
color: getColor(theme.palette.error.main, 0.6),
|
|
89
|
-
border:
|
|
93
|
+
border: "1px solid " + theme.palette.error.main,
|
|
90
94
|
'& $icon': {
|
|
91
95
|
color: theme.palette.error.main
|
|
92
96
|
}
|
|
93
97
|
},
|
|
98
|
+
|
|
94
99
|
/* Styles applied to the root element if `variant="filled"` and `color="success"`. */
|
|
95
100
|
filledSuccess: {
|
|
96
101
|
color: '#fff',
|
|
97
102
|
fontWeight: theme.typography.fontWeightMedium,
|
|
98
103
|
backgroundColor: theme.palette.success.main
|
|
99
104
|
},
|
|
105
|
+
|
|
100
106
|
/* Styles applied to the root element if `variant="filled"` and `color="info"`. */
|
|
101
107
|
filledInfo: {
|
|
102
108
|
color: '#fff',
|
|
103
109
|
fontWeight: theme.typography.fontWeightMedium,
|
|
104
110
|
backgroundColor: theme.palette.info.main
|
|
105
111
|
},
|
|
112
|
+
|
|
106
113
|
/* Styles applied to the root element if `variant="filled"` and `color="warning"`. */
|
|
107
114
|
filledWarning: {
|
|
108
115
|
color: '#fff',
|
|
109
116
|
fontWeight: theme.typography.fontWeightMedium,
|
|
110
117
|
backgroundColor: theme.palette.warning.main
|
|
111
118
|
},
|
|
119
|
+
|
|
112
120
|
/* Styles applied to the root element if `variant="filled"` and `color="error"`. */
|
|
113
121
|
filledError: {
|
|
114
122
|
color: '#fff',
|
|
115
123
|
fontWeight: theme.typography.fontWeightMedium,
|
|
116
124
|
backgroundColor: theme.palette.error.main
|
|
117
125
|
},
|
|
126
|
+
|
|
118
127
|
/* Styles applied to the icon wrapper element. */
|
|
119
128
|
icon: {
|
|
120
129
|
marginRight: 12,
|
|
@@ -123,6 +132,7 @@ export var styles = function styles(theme) {
|
|
|
123
132
|
fontSize: 22,
|
|
124
133
|
opacity: 0.9
|
|
125
134
|
},
|
|
135
|
+
|
|
126
136
|
/* Styles applied to the message wrapper element. */
|
|
127
137
|
message: {
|
|
128
138
|
padding: '8px 0',
|
|
@@ -130,6 +140,7 @@ export var styles = function styles(theme) {
|
|
|
130
140
|
flexDirection: 'column',
|
|
131
141
|
justifyContent: 'center'
|
|
132
142
|
},
|
|
143
|
+
|
|
133
144
|
/* Styles applied to the action wrapper element if `action` is provided. */
|
|
134
145
|
action: {
|
|
135
146
|
display: 'flex',
|
|
@@ -140,144 +151,64 @@ export var styles = function styles(theme) {
|
|
|
140
151
|
}
|
|
141
152
|
};
|
|
142
153
|
};
|
|
143
|
-
|
|
144
154
|
var defaultIconMapping = {
|
|
145
|
-
success: React.createElement(SuccessOutlinedIcon, {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
155
|
+
success: /*#__PURE__*/React.createElement(SuccessOutlinedIcon, {
|
|
156
|
+
fontSize: "inherit"
|
|
157
|
+
}),
|
|
158
|
+
warning: /*#__PURE__*/React.createElement(ReportProblemOutlinedIcon, {
|
|
159
|
+
fontSize: "inherit"
|
|
160
|
+
}),
|
|
161
|
+
error: /*#__PURE__*/React.createElement(ErrorOutlineIcon, {
|
|
162
|
+
fontSize: "inherit"
|
|
163
|
+
}),
|
|
164
|
+
info: /*#__PURE__*/React.createElement(InfoOutlinedIcon, {
|
|
165
|
+
fontSize: "inherit"
|
|
166
|
+
})
|
|
149
167
|
};
|
|
150
|
-
|
|
151
168
|
var Alert = React.forwardRef(function Alert(props, ref) {
|
|
152
169
|
var action = props.action,
|
|
153
170
|
children = props.children,
|
|
154
171
|
classes = props.classes,
|
|
155
172
|
className = props.className,
|
|
156
173
|
_props$closeText = props.closeText,
|
|
157
|
-
closeText = _props$closeText ===
|
|
174
|
+
closeText = _props$closeText === void 0 ? 'Close' : _props$closeText,
|
|
158
175
|
color = props.color,
|
|
159
176
|
icon = props.icon,
|
|
160
177
|
_props$iconMapping = props.iconMapping,
|
|
161
|
-
iconMapping = _props$iconMapping ===
|
|
178
|
+
iconMapping = _props$iconMapping === void 0 ? defaultIconMapping : _props$iconMapping,
|
|
162
179
|
onClose = props.onClose,
|
|
163
180
|
_props$role = props.role,
|
|
164
|
-
role = _props$role ===
|
|
181
|
+
role = _props$role === void 0 ? 'alert' : _props$role,
|
|
165
182
|
_props$severity = props.severity,
|
|
166
|
-
severity = _props$severity ===
|
|
183
|
+
severity = _props$severity === void 0 ? 'success' : _props$severity,
|
|
167
184
|
_props$variant = props.variant,
|
|
168
|
-
variant = _props$variant ===
|
|
169
|
-
other =
|
|
185
|
+
variant = _props$variant === void 0 ? 'standard' : _props$variant,
|
|
186
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
170
187
|
|
|
171
|
-
return React.createElement(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
) : null,
|
|
195
|
-
action == null && onClose ? React.createElement(
|
|
196
|
-
'div',
|
|
197
|
-
{ className: classes.action },
|
|
198
|
-
React.createElement(
|
|
199
|
-
IconButton,
|
|
200
|
-
{
|
|
201
|
-
size: 'small',
|
|
202
|
-
'aria-label': closeText,
|
|
203
|
-
title: closeText,
|
|
204
|
-
color: 'inherit',
|
|
205
|
-
onClick: onClose
|
|
206
|
-
},
|
|
207
|
-
React.createElement(CloseIcon, { fontSize: 'small' })
|
|
208
|
-
)
|
|
209
|
-
) : null
|
|
210
|
-
);
|
|
188
|
+
return /*#__PURE__*/React.createElement(Paper, _extends({
|
|
189
|
+
role: role,
|
|
190
|
+
square: true,
|
|
191
|
+
elevation: 0,
|
|
192
|
+
className: clsx(classes.root, classes["" + variant + capitalize(color || severity)], className),
|
|
193
|
+
ref: ref
|
|
194
|
+
}, other), icon !== false ? /*#__PURE__*/React.createElement("div", {
|
|
195
|
+
className: classes.icon
|
|
196
|
+
}, icon || iconMapping[severity] || defaultIconMapping[severity]) : null, /*#__PURE__*/React.createElement("div", {
|
|
197
|
+
className: classes.message
|
|
198
|
+
}, children), action != null ? /*#__PURE__*/React.createElement("div", {
|
|
199
|
+
className: classes.action
|
|
200
|
+
}, action) : null, action == null && onClose ? /*#__PURE__*/React.createElement("div", {
|
|
201
|
+
className: classes.action
|
|
202
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
203
|
+
size: "small",
|
|
204
|
+
"aria-label": closeText,
|
|
205
|
+
title: closeText,
|
|
206
|
+
color: "inherit",
|
|
207
|
+
onClick: onClose
|
|
208
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, {
|
|
209
|
+
fontSize: "small"
|
|
210
|
+
}))) : null);
|
|
211
211
|
});
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
216
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
217
|
-
// ----------------------------------------------------------------------
|
|
218
|
-
/**
|
|
219
|
-
* The action to display. It renders after the message, at the end of the alert.
|
|
220
|
-
*/
|
|
221
|
-
action: PropTypes.node,
|
|
222
|
-
/**
|
|
223
|
-
* The content of the component.
|
|
224
|
-
*/
|
|
225
|
-
children: PropTypes.node,
|
|
226
|
-
/**
|
|
227
|
-
* Override or extend the styles applied to the component.
|
|
228
|
-
* See [CSS API](#css) below for more details.
|
|
229
|
-
*/
|
|
230
|
-
classes: PropTypes.object,
|
|
231
|
-
/**
|
|
232
|
-
* @ignore
|
|
233
|
-
*/
|
|
234
|
-
className: PropTypes.string,
|
|
235
|
-
/**
|
|
236
|
-
* Override the default label for the *close popup* icon button.
|
|
237
|
-
*
|
|
238
|
-
* For localization purposes, you can use the provided [translations](/guides/localization/).
|
|
239
|
-
*/
|
|
240
|
-
closeText: PropTypes.string,
|
|
241
|
-
/**
|
|
242
|
-
* The main color for the alert. Unless provided, the value is taken from the `severity` prop.
|
|
243
|
-
*/
|
|
244
|
-
color: PropTypes.oneOf(['error', 'info', 'success', 'warning']),
|
|
245
|
-
/**
|
|
246
|
-
* Override the icon displayed before the children.
|
|
247
|
-
* Unless provided, the icon is mapped to the value of the `severity` prop.
|
|
248
|
-
*/
|
|
249
|
-
icon: PropTypes.node,
|
|
250
|
-
/**
|
|
251
|
-
* The component maps the `severity` prop to a range of different icons,
|
|
252
|
-
* for instance success to `<SuccessOutlined>`.
|
|
253
|
-
* If you wish to change this mapping, you can provide your own.
|
|
254
|
-
* Alternatively, you can use the `icon` prop to override the icon displayed.
|
|
255
|
-
*/
|
|
256
|
-
iconMapping: PropTypes.shape({
|
|
257
|
-
error: PropTypes.node,
|
|
258
|
-
info: PropTypes.node,
|
|
259
|
-
success: PropTypes.node,
|
|
260
|
-
warning: PropTypes.node
|
|
261
|
-
}),
|
|
262
|
-
/**
|
|
263
|
-
* Callback fired when the component requests to be closed.
|
|
264
|
-
* When provided and no `action` prop is set, a close icon button is displayed that triggers the callback when clicked.
|
|
265
|
-
*
|
|
266
|
-
* @param {object} event The event source of the callback.
|
|
267
|
-
*/
|
|
268
|
-
onClose: PropTypes.func,
|
|
269
|
-
/**
|
|
270
|
-
* The ARIA role attribute of the element.
|
|
271
|
-
*/
|
|
272
|
-
role: PropTypes.string,
|
|
273
|
-
/**
|
|
274
|
-
* The severity of the alert. This defines the color and icon used.
|
|
275
|
-
*/
|
|
276
|
-
severity: PropTypes.oneOf(['error', 'info', 'success', 'warning']),
|
|
277
|
-
/**
|
|
278
|
-
* The variant to use.
|
|
279
|
-
*/
|
|
280
|
-
variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
|
|
281
|
-
} : {};
|
|
282
|
-
|
|
283
|
-
export default withStyles(styles, { name: 'MuiAlert' })(Alert);
|
|
212
|
+
export default withStyles(styles, {
|
|
213
|
+
name: 'MuiAlert'
|
|
214
|
+
})(Alert);
|
package/es/Alert/index.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import * as R from 'ramda';
|
|
4
3
|
import Typography from '@material-ui/core/Typography';
|
|
5
4
|
import Divider from '@material-ui/core/Divider';
|
|
6
5
|
import Grid from '@material-ui/core/Grid';
|
|
7
6
|
import { makeStyles } from '@material-ui/core/styles';
|
|
8
7
|
import Query from './Query';
|
|
9
|
-
|
|
10
8
|
var useStyles = makeStyles(function (theme) {
|
|
11
9
|
return {
|
|
12
10
|
divider: {
|
|
@@ -18,87 +16,55 @@ var useStyles = makeStyles(function (theme) {
|
|
|
18
16
|
|
|
19
17
|
var ApiQueries = function ApiQueries(_ref) {
|
|
20
18
|
var _ref$queries = _ref.queries,
|
|
21
|
-
queries = _ref$queries ===
|
|
19
|
+
queries = _ref$queries === void 0 ? [] : _ref$queries,
|
|
22
20
|
labels = _ref.labels,
|
|
23
21
|
_ref$delay = _ref.delay,
|
|
24
|
-
delay = _ref$delay ===
|
|
25
|
-
|
|
22
|
+
delay = _ref$delay === void 0 ? 1000 : _ref$delay;
|
|
26
23
|
var classes = useStyles();
|
|
27
24
|
var hasQueries = R.not(R.isEmpty(queries));
|
|
28
|
-
return React.createElement(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Grid,
|
|
72
|
-
{ item: true, xs: 12, className: classes.divider },
|
|
73
|
-
React.createElement(Divider, null)
|
|
74
|
-
),
|
|
75
|
-
React.createElement(
|
|
76
|
-
Typography,
|
|
77
|
-
{ variant: 'body2' },
|
|
78
|
-
R.prop('notice')(labels)
|
|
79
|
-
)
|
|
80
|
-
);
|
|
25
|
+
return /*#__PURE__*/React.createElement(Grid, {
|
|
26
|
+
container: true,
|
|
27
|
+
"data-testid": "apiqueries-test-id"
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Grid, {
|
|
29
|
+
item: true,
|
|
30
|
+
xs: 12
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
32
|
+
className: classes.title,
|
|
33
|
+
variant: "h6"
|
|
34
|
+
}, R.prop('title')(labels)), R.map(function (description) {
|
|
35
|
+
return /*#__PURE__*/React.createElement(Typography, {
|
|
36
|
+
key: description,
|
|
37
|
+
display: "block",
|
|
38
|
+
variant: "body2"
|
|
39
|
+
}, description);
|
|
40
|
+
})(R.propOr([], 'descriptions', labels))), hasQueries && /*#__PURE__*/React.createElement(Grid, {
|
|
41
|
+
item: true,
|
|
42
|
+
xs: 12,
|
|
43
|
+
className: classes.divider
|
|
44
|
+
}, /*#__PURE__*/React.createElement(Divider, null)), /*#__PURE__*/React.createElement(Grid, {
|
|
45
|
+
item: true,
|
|
46
|
+
container: true,
|
|
47
|
+
spacing: 2
|
|
48
|
+
}, R.map(function (_ref2) {
|
|
49
|
+
var id = _ref2.id,
|
|
50
|
+
title = _ref2.title,
|
|
51
|
+
_ref2$contents = _ref2.contents,
|
|
52
|
+
contents = _ref2$contents === void 0 ? [] : _ref2$contents;
|
|
53
|
+
return /*#__PURE__*/React.createElement(Query, {
|
|
54
|
+
key: id,
|
|
55
|
+
title: title,
|
|
56
|
+
contents: contents,
|
|
57
|
+
selectedId: R.pipe(R.head, R.prop('id'))(contents),
|
|
58
|
+
labels: labels,
|
|
59
|
+
delay: delay
|
|
60
|
+
});
|
|
61
|
+
})(queries)), hasQueries && /*#__PURE__*/React.createElement(Grid, {
|
|
62
|
+
item: true,
|
|
63
|
+
xs: 12,
|
|
64
|
+
className: classes.divider
|
|
65
|
+
}, /*#__PURE__*/React.createElement(Divider, null)), /*#__PURE__*/React.createElement(Typography, {
|
|
66
|
+
variant: "body2"
|
|
67
|
+
}, R.prop('notice')(labels)));
|
|
81
68
|
};
|
|
82
69
|
|
|
83
|
-
ApiQueries.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
84
|
-
labels: PropTypes.shape({
|
|
85
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
86
|
-
copy: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
87
|
-
copied: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
88
|
-
descriptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.element])),
|
|
89
|
-
notice: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
90
|
-
buttonsLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
|
|
91
|
-
}),
|
|
92
|
-
delay: PropTypes.number,
|
|
93
|
-
queries: PropTypes.arrayOf(PropTypes.shape({
|
|
94
|
-
contents: PropTypes.arrayOf(PropTypes.shape({
|
|
95
|
-
id: PropTypes.string,
|
|
96
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
97
|
-
value: PropTypes.string
|
|
98
|
-
})),
|
|
99
|
-
id: PropTypes.string,
|
|
100
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
|
|
101
|
-
}))
|
|
102
|
-
} : {};
|
|
103
|
-
|
|
104
70
|
export default ApiQueries;
|