@sis-cc/dotstatsuite-visions 6.6.0 → 6.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Alert/Alert.js +135 -66
- package/es/Alert/index.js +1 -0
- package/es/ApiQueries/ApiQueries.js +79 -45
- package/es/ApiQueries/Query.js +105 -65
- package/es/ApiQueries/index.js +1 -0
- package/es/AuthDialog/index.js +103 -62
- package/es/Breadcrumbs/Breadcrumbs.js +38 -21
- package/es/Breadcrumbs/index.js +1 -0
- package/es/Button/Button.js +28 -11
- package/es/Button/index.js +1 -0
- package/es/ChartsConfig/Axis.js +76 -72
- package/es/ChartsConfig/ButtonGroup.js +51 -29
- package/es/ChartsConfig/ChartsConfig.js +187 -87
- package/es/ChartsConfig/ContainerTitle.js +36 -15
- package/es/ChartsConfig/Focus.js +48 -37
- package/es/ChartsConfig/Frequency.js +36 -24
- package/es/ChartsConfig/Series.js +43 -28
- package/es/ChartsConfig/Size.js +50 -36
- package/es/ChartsConfig/index.js +1 -0
- package/es/ChartsConfig/styles.js +4 -4
- package/es/ChartsConfig/utils.js +5 -1
- package/es/Chips/Chips.js +154 -99
- package/es/Chips/index.js +1 -0
- package/es/CollapseButtons/CollapseButtons.js +101 -61
- package/es/CollapseButtons/Item.js +70 -45
- package/es/CollapseButtons/Paper.js +21 -7
- package/es/CollapseButtons/index.js +1 -0
- package/es/DataEdit/DataEdit.js +124 -67
- package/es/DataEdit/Input.js +58 -27
- package/es/DataEdit/index.js +1 -0
- package/es/DataFooter/DataFooter.js +115 -68
- package/es/DataFooter/index.js +1 -0
- package/es/DataHeader/DataHeader.js +113 -75
- package/es/DataHeader/Flags.js +21 -8
- package/es/DataHeader/Title.js +15 -2
- package/es/DataHeader/TooltipHeader.js +63 -33
- package/es/DataHeader/index.js +1 -0
- package/es/DataHeader/utils.js +8 -8
- package/es/Dataflow/Dataflow.js +226 -132
- package/es/Dataflow/index.js +1 -0
- package/es/ExpansionPanel/ExpansionPanel.js +79 -42
- package/es/ExpansionPanel/index.js +1 -0
- package/es/ExpansionPanel/styles.js +5 -3
- package/es/Icons/AccessibilityFilled.js +8 -6
- package/es/Icons/AccessibilityOutlined.js +8 -6
- package/es/Icons/AccountFilled.js +8 -6
- package/es/Icons/AccountOutlined.js +8 -6
- package/es/Icons/Api.js +8 -6
- package/es/Icons/Asterisk.js +8 -6
- package/es/Icons/Bar.js +8 -6
- package/es/Icons/CopyContent.js +8 -6
- package/es/Icons/Cross.js +8 -6
- package/es/Icons/HSymbol.js +8 -6
- package/es/Icons/Row.js +8 -6
- package/es/Icons/Scatter.js +8 -6
- package/es/Icons/StackedBar.js +8 -6
- package/es/Icons/StackedRow.js +8 -6
- package/es/Icons/Timeline.js +8 -6
- package/es/Icons/VSymbol.js +8 -6
- package/es/Icons/Warning.js +14 -11
- package/es/Icons/index.js +1 -0
- package/es/Input/Input.js +56 -26
- package/es/Input/index.js +1 -0
- package/es/Input/with-input.js +25 -30
- package/es/InputNumber/InputNumber.js +51 -31
- package/es/InputNumber/index.js +1 -0
- package/es/LabelDivider/LabelDivider.js +18 -7
- package/es/LabelDivider/index.js +1 -0
- package/es/Loading/Loading.js +18 -9
- package/es/Loading/index.js +1 -0
- package/es/Logo/Logo.js +17 -11
- package/es/Logo/index.js +1 -0
- package/es/NoData/NoData.js +25 -17
- package/es/NoData/index.js +1 -0
- package/es/Pagination/Pagination.js +114 -70
- package/es/Pagination/index.js +1 -0
- package/es/PeriodPicker/PeriodPicker.js +124 -101
- package/es/PeriodPicker/constants.js +13 -78
- package/es/PeriodPicker/index.js +1 -0
- package/es/PeriodPicker/lib.js +23 -37
- package/es/PeriodPicker/styles.js +1 -0
- package/es/ScopeList/Header.js +60 -41
- package/es/ScopeList/Item.js +144 -98
- package/es/ScopeList/ScopeList.js +184 -132
- package/es/ScopeList/Selection.js +93 -51
- package/es/ScopeList/index.js +1 -0
- package/es/ScopeList/styles.js +3 -2
- package/es/ScopeList/with-scope-list.js +88 -151
- package/es/Select/Select.js +60 -44
- package/es/Select/index.js +1 -0
- package/es/Share/Form.js +88 -58
- package/es/Share/Mode.js +98 -36
- package/es/Share/Share.js +64 -41
- package/es/Share/index.js +10 -1
- package/es/SisccFooter/SisccFooter.js +36 -29
- package/es/SisccFooter/index.js +1 -0
- package/es/Spotlight/Fields.js +71 -37
- package/es/Spotlight/Spotlight.js +92 -51
- package/es/Spotlight/index.js +1 -0
- package/es/Spotlight/useSpotlight.js +13 -33
- package/es/Spotlight/useStyles.js +4 -2
- package/es/Table/Table.js +71 -50
- package/es/Table/header.js +50 -36
- package/es/Table/index.js +1 -0
- package/es/Table/itemCell.js +25 -13
- package/es/Table/row-header.js +50 -31
- package/es/Table/section-header.js +55 -30
- package/es/Table/section-rows.js +62 -38
- package/es/Table/styles.js +8 -2
- package/es/Table/tableCell.js +17 -7
- package/es/Table/tooltip.js +41 -21
- package/es/Table/useStyles.js +3 -2
- package/es/Table/valueCell.js +41 -26
- package/es/TableFooter/TableFooter.js +70 -42
- package/es/TableFooter/index.js +1 -0
- package/es/TableHeader/TableHeader.js +36 -18
- package/es/TableHeader/index.js +1 -0
- package/es/TableHtml5/TableHtml5.js +72 -60
- package/es/TableHtml5/cell.js +55 -35
- package/es/TableHtml5/flags.js +58 -29
- package/es/TableHtml5/header.js +85 -53
- package/es/TableHtml5/index.js +1 -0
- package/es/TableHtml5/section.js +131 -86
- package/es/TableHtml5/sectionHeader.js +72 -45
- package/es/TableHtml5/subHeader.js +70 -47
- package/es/TableLayout/Box.js +66 -33
- package/es/TableLayout/DnDItem.js +68 -37
- package/es/TableLayout/TableLayout.js +177 -105
- package/es/TableLayout/constants.js +2 -0
- package/es/TableLayout/index.js +1 -0
- package/es/TableLayout/lib.js +3 -1
- package/es/TablePreview/TablePreview.js +176 -99
- package/es/TablePreview/index.js +1 -0
- package/es/TablePreview/lib.js +4 -5
- package/es/TablePreview/styles.js +1 -0
- package/es/Tag/Tag.js +21 -5
- package/es/Tag/index.js +1 -0
- package/es/ToggleButton/ToggleButton.js +29 -17
- package/es/ToggleButton/index.js +1 -0
- package/es/Tooltip/Tooltip.js +32 -20
- package/es/Tooltip/index.js +1 -0
- package/es/VerticalButton/VerticalButton.js +22 -17
- package/es/VerticalButton/index.js +1 -0
- package/es/index.js +4 -2
- package/es/theme.js +14 -22
- package/es/utils.js +14 -16
- package/lib/Alert/Alert.js +168 -87
- package/lib/Alert/index.js +12 -7
- package/lib/ApiQueries/ApiQueries.js +105 -61
- package/lib/ApiQueries/Query.js +132 -85
- package/lib/ApiQueries/index.js +12 -7
- package/lib/AuthDialog/index.js +137 -82
- package/lib/Breadcrumbs/Breadcrumbs.js +68 -39
- package/lib/Breadcrumbs/index.js +12 -7
- package/lib/Button/Button.js +47 -28
- package/lib/Button/index.js +12 -7
- package/lib/ChartsConfig/Axis.js +100 -88
- package/lib/ChartsConfig/ButtonGroup.js +74 -43
- package/lib/ChartsConfig/ChartsConfig.js +236 -113
- package/lib/ChartsConfig/ContainerTitle.js +59 -30
- package/lib/ChartsConfig/Focus.js +71 -53
- package/lib/ChartsConfig/Frequency.js +59 -39
- package/lib/ChartsConfig/Series.js +70 -45
- package/lib/ChartsConfig/Size.js +77 -53
- package/lib/ChartsConfig/index.js +12 -7
- package/lib/ChartsConfig/styles.js +11 -16
- package/lib/ChartsConfig/utils.js +13 -14
- package/lib/Chips/Chips.js +192 -122
- package/lib/Chips/index.js +12 -7
- package/lib/CollapseButtons/CollapseButtons.js +134 -84
- package/lib/CollapseButtons/Item.js +98 -64
- package/lib/CollapseButtons/Paper.js +41 -19
- package/lib/CollapseButtons/index.js +12 -7
- package/lib/DataEdit/DataEdit.js +156 -88
- package/lib/DataEdit/Input.js +82 -42
- package/lib/DataEdit/index.js +12 -7
- package/lib/DataFooter/DataFooter.js +144 -88
- package/lib/DataFooter/index.js +12 -7
- package/lib/DataHeader/DataHeader.js +158 -106
- package/lib/DataHeader/Flags.js +34 -18
- package/lib/DataHeader/Title.js +27 -11
- package/lib/DataHeader/TooltipHeader.js +79 -48
- package/lib/DataHeader/index.js +12 -7
- package/lib/DataHeader/utils.js +10 -16
- package/lib/Dataflow/Dataflow.js +277 -159
- package/lib/Dataflow/index.js +12 -7
- package/lib/ExpansionPanel/ExpansionPanel.js +116 -63
- package/lib/ExpansionPanel/index.js +12 -7
- package/lib/ExpansionPanel/styles.js +12 -15
- package/lib/Icons/AccessibilityFilled.js +17 -15
- package/lib/Icons/AccessibilityOutlined.js +17 -15
- package/lib/Icons/AccountFilled.js +17 -15
- package/lib/Icons/AccountOutlined.js +17 -15
- package/lib/Icons/Api.js +17 -15
- package/lib/Icons/Asterisk.js +17 -15
- package/lib/Icons/Bar.js +17 -15
- package/lib/Icons/CopyContent.js +17 -15
- package/lib/Icons/Cross.js +17 -15
- package/lib/Icons/HSymbol.js +17 -15
- package/lib/Icons/Row.js +17 -15
- package/lib/Icons/Scatter.js +17 -15
- package/lib/Icons/StackedBar.js +17 -15
- package/lib/Icons/StackedRow.js +17 -15
- package/lib/Icons/Timeline.js +17 -15
- package/lib/Icons/VSymbol.js +17 -15
- package/lib/Icons/Warning.js +31 -27
- package/lib/Icons/index.js +152 -68
- package/lib/Input/Input.js +85 -47
- package/lib/Input/index.js +12 -7
- package/lib/Input/with-input.js +35 -38
- package/lib/InputNumber/InputNumber.js +80 -50
- package/lib/InputNumber/index.js +12 -7
- package/lib/LabelDivider/LabelDivider.js +37 -23
- package/lib/LabelDivider/index.js +12 -7
- package/lib/Loading/Loading.js +35 -20
- package/lib/Loading/index.js +12 -7
- package/lib/Logo/Logo.js +28 -20
- package/lib/Logo/index.js +12 -7
- package/lib/NoData/NoData.js +42 -28
- package/lib/NoData/index.js +12 -7
- package/lib/Pagination/Pagination.js +150 -91
- package/lib/Pagination/index.js +12 -7
- package/lib/PeriodPicker/PeriodPicker.js +150 -121
- package/lib/PeriodPicker/constants.js +37 -126
- package/lib/PeriodPicker/index.js +12 -7
- package/lib/PeriodPicker/lib.js +61 -99
- package/lib/PeriodPicker/styles.js +4 -7
- package/lib/ScopeList/Header.js +88 -58
- package/lib/ScopeList/Item.js +177 -116
- package/lib/ScopeList/ScopeList.js +234 -160
- package/lib/ScopeList/Selection.js +131 -70
- package/lib/ScopeList/index.js +12 -7
- package/lib/ScopeList/styles.js +9 -10
- package/lib/ScopeList/with-scope-list.js +108 -199
- package/lib/Select/Select.js +80 -59
- package/lib/Select/index.js +12 -7
- package/lib/Share/Form.js +119 -77
- package/lib/Share/Mode.js +130 -54
- package/lib/Share/Share.js +91 -59
- package/lib/Share/index.js +12 -7
- package/lib/SisccFooter/SisccFooter.js +63 -44
- package/lib/SisccFooter/index.js +12 -7
- package/lib/Spotlight/Fields.js +100 -54
- package/lib/Spotlight/Spotlight.js +136 -75
- package/lib/Spotlight/index.js +12 -7
- package/lib/Spotlight/useSpotlight.js +20 -44
- package/lib/Spotlight/useStyles.js +12 -15
- package/lib/Table/Table.js +102 -69
- package/lib/Table/header.js +70 -51
- package/lib/Table/index.js +12 -7
- package/lib/Table/itemCell.js +41 -25
- package/lib/Table/row-header.js +75 -49
- package/lib/Table/section-header.js +82 -50
- package/lib/Table/section-rows.js +94 -60
- package/lib/Table/styles.js +25 -23
- package/lib/Table/tableCell.js +37 -19
- package/lib/Table/tooltip.js +54 -36
- package/lib/Table/useStyles.js +8 -11
- package/lib/Table/valueCell.js +59 -39
- package/lib/TableFooter/TableFooter.js +93 -57
- package/lib/TableFooter/index.js +12 -7
- package/lib/TableHeader/TableHeader.js +56 -32
- package/lib/TableHeader/index.js +12 -7
- package/lib/TableHtml5/TableHtml5.js +100 -78
- package/lib/TableHtml5/cell.js +84 -52
- package/lib/TableHtml5/flags.js +82 -48
- package/lib/TableHtml5/header.js +115 -70
- package/lib/TableHtml5/index.js +17 -8
- package/lib/TableHtml5/section.js +171 -109
- package/lib/TableHtml5/sectionHeader.js +102 -64
- package/lib/TableHtml5/subHeader.js +98 -65
- package/lib/TableLayout/Box.js +97 -54
- package/lib/TableLayout/DnDItem.js +98 -58
- package/lib/TableLayout/TableLayout.js +232 -140
- package/lib/TableLayout/constants.js +6 -8
- package/lib/TableLayout/index.js +12 -7
- package/lib/TableLayout/lib.js +9 -14
- package/lib/TablePreview/TablePreview.js +205 -118
- package/lib/TablePreview/index.js +12 -7
- package/lib/TablePreview/lib.js +19 -30
- package/lib/TablePreview/styles.js +6 -7
- package/lib/Tag/Tag.js +38 -19
- package/lib/Tag/index.js +12 -7
- package/lib/ToggleButton/ToggleButton.js +55 -33
- package/lib/ToggleButton/index.js +12 -7
- package/lib/Tooltip/Tooltip.js +50 -34
- package/lib/Tooltip/index.js +12 -7
- package/lib/VerticalButton/VerticalButton.js +46 -40
- package/lib/VerticalButton/index.js +12 -7
- package/lib/index.js +304 -137
- package/lib/theme.js +17 -31
- package/lib/utils.js +31 -46
- package/package.json +10 -2
package/es/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import meta from '../package.json';
|
|
1
|
+
import meta from '../package.json';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line no-console
|
|
4
|
+
if (process.env.NODE_ENV !== 'test') console.info(meta.name + '@' + meta.version);
|
|
2
5
|
|
|
3
|
-
if (process.env.NODE_ENV !== 'test') console.info(meta.name + "@" + meta.version);
|
|
4
6
|
export { default as Alert } from './Alert';
|
|
5
7
|
export { default as ApiQueries } from './ApiQueries';
|
|
6
8
|
export { default as Breadcrumbs } from './Breadcrumbs';
|
package/es/theme.js
CHANGED
|
@@ -10,14 +10,17 @@ export var innerPalette = {
|
|
|
10
10
|
textLight: '#444444',
|
|
11
11
|
textDark: '#182026'
|
|
12
12
|
};
|
|
13
|
+
|
|
13
14
|
export var sisccTheme = function sisccTheme(_ref) {
|
|
14
15
|
var rtl = _ref.rtl,
|
|
15
16
|
isA11y = _ref.isA11y,
|
|
16
17
|
_ref$outerPalette = _ref.outerPalette,
|
|
17
|
-
outerPalette = _ref$outerPalette ===
|
|
18
|
+
outerPalette = _ref$outerPalette === undefined ? {} : _ref$outerPalette;
|
|
19
|
+
|
|
18
20
|
var focus = {
|
|
19
21
|
outlineColor: outerPalette.highlight1 || innerPalette.highlight1
|
|
20
22
|
};
|
|
23
|
+
|
|
21
24
|
var buttonBaseFocus = {
|
|
22
25
|
borderColor: outerPalette.highlight1 || innerPalette.highlight1,
|
|
23
26
|
'&:focus': {
|
|
@@ -26,11 +29,13 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
26
29
|
outlineStyle: 'auto'
|
|
27
30
|
}
|
|
28
31
|
};
|
|
32
|
+
|
|
29
33
|
var spotlightFocus = {
|
|
30
34
|
outlineColor: outerPalette.highlight1 || innerPalette.highlight1,
|
|
31
35
|
outlineStyle: 'auto',
|
|
32
36
|
outlineWidth: 1
|
|
33
37
|
};
|
|
38
|
+
|
|
34
39
|
return {
|
|
35
40
|
direction: rtl,
|
|
36
41
|
props: {
|
|
@@ -78,7 +83,7 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
78
83
|
},
|
|
79
84
|
textPrimary: {
|
|
80
85
|
'&:hover': {
|
|
81
|
-
backgroundColor:
|
|
86
|
+
backgroundColor: '' + (outerPalette.hover || innerPalette.hover)
|
|
82
87
|
}
|
|
83
88
|
}
|
|
84
89
|
},
|
|
@@ -194,28 +199,14 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
194
199
|
fontFamily: "'Segoe UI'",
|
|
195
200
|
fontSize: 12
|
|
196
201
|
},
|
|
197
|
-
annotation: {
|
|
198
|
-
|
|
199
|
-
},
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
},
|
|
203
|
-
axisLegend: {
|
|
204
|
-
color: '#7A7A7A'
|
|
205
|
-
},
|
|
206
|
-
legend: {
|
|
207
|
-
fontSize: 14
|
|
208
|
-
},
|
|
209
|
-
mapLegend: {
|
|
210
|
-
color: '#575757',
|
|
211
|
-
fontSize: 10
|
|
212
|
-
},
|
|
202
|
+
annotation: { fontSize: 11 },
|
|
203
|
+
axis: { color: '#575757' },
|
|
204
|
+
axisLegend: { color: '#7A7A7A' },
|
|
205
|
+
legend: { fontSize: 14 },
|
|
206
|
+
mapLegend: { color: '#575757', fontSize: 10 },
|
|
213
207
|
tooltip: {
|
|
214
208
|
primary: {},
|
|
215
|
-
secondary: {
|
|
216
|
-
fontSize: 16,
|
|
217
|
-
fontWeight: 'bold'
|
|
218
|
-
}
|
|
209
|
+
secondary: { fontSize: 16, fontWeight: 'bold' }
|
|
219
210
|
}
|
|
220
211
|
},
|
|
221
212
|
chartsConfig: {
|
|
@@ -325,6 +316,7 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
325
316
|
}
|
|
326
317
|
};
|
|
327
318
|
};
|
|
319
|
+
|
|
328
320
|
export var T4_BREAKPOINTS = {
|
|
329
321
|
xs: 120,
|
|
330
322
|
xs2: 250,
|
package/es/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
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 dateFns from 'date-fns';
|
|
@@ -15,54 +16,51 @@ var spotlightHandler = function spotlightHandler(_ref) {
|
|
|
15
16
|
};
|
|
16
17
|
};
|
|
17
18
|
|
|
18
|
-
export var reduceChildren = function reduceChildren(node, itemsIndexById
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (acc === void 0) {
|
|
24
|
-
acc = [];
|
|
25
|
-
}
|
|
19
|
+
export var reduceChildren = function reduceChildren(node, itemsIndexById) {
|
|
20
|
+
var func = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : R.flip(R.prepend);
|
|
21
|
+
var acc = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
26
22
|
|
|
27
23
|
if (R.isNil(node.parentId)) return acc;
|
|
28
24
|
var nextNode = R.prop(node.parentId)(itemsIndexById);
|
|
29
25
|
if (R.isNil(nextNode)) return acc;
|
|
30
26
|
return reduceChildren(nextNode, itemsIndexById, func, func(acc, nextNode));
|
|
31
27
|
};
|
|
28
|
+
|
|
32
29
|
export var spotlightScopeListEngine = function spotlightScopeListEngine(_ref2) {
|
|
33
30
|
var _ref2$term = _ref2.term,
|
|
34
|
-
term = _ref2$term ===
|
|
31
|
+
term = _ref2$term === undefined ? '' : _ref2$term,
|
|
35
32
|
fields = _ref2.fields,
|
|
36
33
|
items = _ref2.items,
|
|
37
34
|
itemsById = _ref2.itemsById,
|
|
38
35
|
noPath = _ref2.noPath,
|
|
39
36
|
hasPath = _ref2.hasPath;
|
|
37
|
+
|
|
40
38
|
var isSelected = R.pipe(R.prop('isSelected'), R.equals(true));
|
|
41
39
|
var getFields = R.pipe(R.defaultTo([]), R.filter(isSelected), R.values);
|
|
40
|
+
|
|
42
41
|
return R.reduce(function (acc, item) {
|
|
43
|
-
if (spotlightHandler({
|
|
44
|
-
term: term,
|
|
45
|
-
fields: getFields(fields)
|
|
46
|
-
})(item)) {
|
|
42
|
+
if (spotlightHandler({ term: term, fields: getFields(fields) })(item)) {
|
|
47
43
|
if (noPath) return [].concat(acc, [item]);
|
|
48
44
|
return [].concat(acc, [_extends({}, item, {
|
|
49
45
|
nodePath: hasPath ? R.propOr([], 'path')(item) : reduceChildren(item, itemsById)
|
|
50
46
|
})]);
|
|
51
47
|
}
|
|
52
|
-
|
|
53
48
|
return acc;
|
|
54
49
|
}, [])(items);
|
|
55
50
|
};
|
|
51
|
+
|
|
56
52
|
export var withBlank = function withBlank(func) {
|
|
57
53
|
return function (Component) {
|
|
58
54
|
return function (props) {
|
|
59
55
|
if (R.pipe(func, R.prop('isBlank'))(props)) return null;
|
|
60
|
-
return
|
|
56
|
+
return React.createElement(Component, props);
|
|
61
57
|
};
|
|
62
58
|
};
|
|
63
59
|
};
|
|
60
|
+
|
|
64
61
|
export var getLight = R.path(['palette', 'tertiary', 'light']);
|
|
65
62
|
export var getDark = R.path(['palette', 'tertiary', 'dark']);
|
|
63
|
+
|
|
66
64
|
export var getIsRtl = function getIsRtl(theme) {
|
|
67
65
|
return R.equals('rtl', R.prop('direction', theme));
|
|
68
66
|
};
|
package/lib/Alert/Alert.js
CHANGED
|
@@ -1,50 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
|
1
|
+
'use strict';
|
|
4
2
|
|
|
5
3
|
exports.__esModule = true;
|
|
6
|
-
exports.styles =
|
|
4
|
+
exports.styles = undefined;
|
|
5
|
+
|
|
6
|
+
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; };
|
|
7
|
+
|
|
8
|
+
var _react = require('react');
|
|
9
|
+
|
|
10
|
+
var _react2 = _interopRequireDefault(_react);
|
|
11
|
+
|
|
12
|
+
var _propTypes = require('prop-types');
|
|
13
|
+
|
|
14
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
15
|
+
|
|
16
|
+
var _clsx = require('clsx');
|
|
17
|
+
|
|
18
|
+
var _clsx2 = _interopRequireDefault(_clsx);
|
|
19
|
+
|
|
20
|
+
var _styles = require('@material-ui/core/styles');
|
|
7
21
|
|
|
8
|
-
var
|
|
22
|
+
var _Paper = require('@material-ui/core/Paper');
|
|
9
23
|
|
|
10
|
-
var
|
|
24
|
+
var _Paper2 = _interopRequireDefault(_Paper);
|
|
11
25
|
|
|
12
|
-
var
|
|
26
|
+
var _CheckCircleOutlineOutlined = require('@material-ui/icons/CheckCircleOutlineOutlined');
|
|
13
27
|
|
|
14
|
-
var
|
|
28
|
+
var _CheckCircleOutlineOutlined2 = _interopRequireDefault(_CheckCircleOutlineOutlined);
|
|
15
29
|
|
|
16
|
-
var
|
|
30
|
+
var _ReportProblemOutlined = require('@material-ui/icons/ReportProblemOutlined');
|
|
17
31
|
|
|
18
|
-
var
|
|
32
|
+
var _ReportProblemOutlined2 = _interopRequireDefault(_ReportProblemOutlined);
|
|
19
33
|
|
|
20
|
-
var
|
|
34
|
+
var _ErrorOutline = require('@material-ui/icons/ErrorOutline');
|
|
21
35
|
|
|
22
|
-
var
|
|
36
|
+
var _ErrorOutline2 = _interopRequireDefault(_ErrorOutline);
|
|
23
37
|
|
|
24
|
-
var
|
|
38
|
+
var _InfoOutlined = require('@material-ui/icons/InfoOutlined');
|
|
25
39
|
|
|
26
|
-
var
|
|
40
|
+
var _InfoOutlined2 = _interopRequireDefault(_InfoOutlined);
|
|
27
41
|
|
|
28
|
-
var _Close =
|
|
42
|
+
var _Close = require('@material-ui/icons/Close');
|
|
29
43
|
|
|
30
|
-
var
|
|
44
|
+
var _Close2 = _interopRequireDefault(_Close);
|
|
31
45
|
|
|
32
|
-
var
|
|
46
|
+
var _IconButton = require('@material-ui/core/IconButton');
|
|
33
47
|
|
|
34
|
-
var
|
|
48
|
+
var _IconButton2 = _interopRequireDefault(_IconButton);
|
|
35
49
|
|
|
36
|
-
var
|
|
50
|
+
var _utils = require('@material-ui/core/utils');
|
|
51
|
+
|
|
52
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
53
|
+
|
|
54
|
+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
55
|
+
|
|
56
|
+
var styles = exports.styles = function styles(theme) {
|
|
37
57
|
var getColor = theme.palette.type === 'light' ? _styles.darken : _styles.lighten;
|
|
38
58
|
var getBackgroundColor = theme.palette.type === 'light' ? _styles.lighten : _styles.darken;
|
|
59
|
+
|
|
39
60
|
return {
|
|
40
61
|
/* Styles applied to the root element. */
|
|
41
|
-
root: (
|
|
62
|
+
root: _extends({}, theme.typography.body2, {
|
|
42
63
|
borderRadius: theme.shape.borderRadius,
|
|
43
64
|
backgroundColor: 'transparent',
|
|
44
65
|
display: 'flex',
|
|
45
66
|
padding: '6px 16px'
|
|
46
67
|
}),
|
|
47
|
-
|
|
48
68
|
/* Styles applied to the root element if `variant="standard"` and `color="success"`. */
|
|
49
69
|
standardSuccess: {
|
|
50
70
|
color: getColor(theme.palette.success.main, 0.6),
|
|
@@ -53,7 +73,6 @@ var styles = function styles(theme) {
|
|
|
53
73
|
color: theme.palette.success.main
|
|
54
74
|
}
|
|
55
75
|
},
|
|
56
|
-
|
|
57
76
|
/* Styles applied to the root element if `variant="standard"` and `color="info"`. */
|
|
58
77
|
standardInfo: {
|
|
59
78
|
color: getColor(theme.palette.info.main, 0.6),
|
|
@@ -62,7 +81,6 @@ var styles = function styles(theme) {
|
|
|
62
81
|
color: theme.palette.info.main
|
|
63
82
|
}
|
|
64
83
|
},
|
|
65
|
-
|
|
66
84
|
/* Styles applied to the root element if `variant="standard"` and `color="warning"`. */
|
|
67
85
|
standardWarning: {
|
|
68
86
|
color: getColor(theme.palette.warning.main, 0.6),
|
|
@@ -71,7 +89,6 @@ var styles = function styles(theme) {
|
|
|
71
89
|
color: theme.palette.warning.main
|
|
72
90
|
}
|
|
73
91
|
},
|
|
74
|
-
|
|
75
92
|
/* Styles applied to the root element if `variant="standard"` and `color="error"`. */
|
|
76
93
|
standardError: {
|
|
77
94
|
color: getColor(theme.palette.error.main, 0.6),
|
|
@@ -80,71 +97,62 @@ var styles = function styles(theme) {
|
|
|
80
97
|
color: theme.palette.error.main
|
|
81
98
|
}
|
|
82
99
|
},
|
|
83
|
-
|
|
84
100
|
/* Styles applied to the root element if `variant="outlined"` and `color="success"`. */
|
|
85
101
|
outlinedSuccess: {
|
|
86
102
|
color: getColor(theme.palette.success.main, 0.6),
|
|
87
|
-
border:
|
|
103
|
+
border: '1px solid ' + theme.palette.success.main,
|
|
88
104
|
'& $icon': {
|
|
89
105
|
color: theme.palette.success.main
|
|
90
106
|
}
|
|
91
107
|
},
|
|
92
|
-
|
|
93
108
|
/* Styles applied to the root element if `variant="outlined"` and `color="info"`. */
|
|
94
109
|
outlinedInfo: {
|
|
95
110
|
color: getColor(theme.palette.info.main, 0.6),
|
|
96
|
-
border:
|
|
111
|
+
border: '1px solid ' + theme.palette.info.main,
|
|
97
112
|
'& $icon': {
|
|
98
113
|
color: theme.palette.info.main
|
|
99
114
|
}
|
|
100
115
|
},
|
|
101
|
-
|
|
102
116
|
/* Styles applied to the root element if `variant="outlined"` and `color="warning"`. */
|
|
103
117
|
outlinedWarning: {
|
|
104
118
|
color: getColor(theme.palette.warning.main, 0.6),
|
|
105
|
-
border:
|
|
119
|
+
border: '1px solid ' + theme.palette.warning.main,
|
|
106
120
|
'& $icon': {
|
|
107
121
|
color: theme.palette.warning.main
|
|
108
122
|
}
|
|
109
123
|
},
|
|
110
|
-
|
|
111
124
|
/* Styles applied to the root element if `variant="outlined"` and `color="error"`. */
|
|
112
125
|
outlinedError: {
|
|
113
126
|
color: getColor(theme.palette.error.main, 0.6),
|
|
114
|
-
border:
|
|
127
|
+
border: '1px solid ' + theme.palette.error.main,
|
|
115
128
|
'& $icon': {
|
|
116
129
|
color: theme.palette.error.main
|
|
117
130
|
}
|
|
118
131
|
},
|
|
119
|
-
|
|
120
132
|
/* Styles applied to the root element if `variant="filled"` and `color="success"`. */
|
|
121
133
|
filledSuccess: {
|
|
122
134
|
color: '#fff',
|
|
123
135
|
fontWeight: theme.typography.fontWeightMedium,
|
|
124
136
|
backgroundColor: theme.palette.success.main
|
|
125
137
|
},
|
|
126
|
-
|
|
127
138
|
/* Styles applied to the root element if `variant="filled"` and `color="info"`. */
|
|
128
139
|
filledInfo: {
|
|
129
140
|
color: '#fff',
|
|
130
141
|
fontWeight: theme.typography.fontWeightMedium,
|
|
131
142
|
backgroundColor: theme.palette.info.main
|
|
132
143
|
},
|
|
133
|
-
|
|
134
144
|
/* Styles applied to the root element if `variant="filled"` and `color="warning"`. */
|
|
135
145
|
filledWarning: {
|
|
136
146
|
color: '#fff',
|
|
137
147
|
fontWeight: theme.typography.fontWeightMedium,
|
|
138
148
|
backgroundColor: theme.palette.warning.main
|
|
139
149
|
},
|
|
140
|
-
|
|
141
150
|
/* Styles applied to the root element if `variant="filled"` and `color="error"`. */
|
|
142
151
|
filledError: {
|
|
143
152
|
color: '#fff',
|
|
144
153
|
fontWeight: theme.typography.fontWeightMedium,
|
|
145
154
|
backgroundColor: theme.palette.error.main
|
|
146
155
|
},
|
|
147
|
-
|
|
148
156
|
/* Styles applied to the icon wrapper element. */
|
|
149
157
|
icon: {
|
|
150
158
|
marginRight: 12,
|
|
@@ -153,7 +161,6 @@ var styles = function styles(theme) {
|
|
|
153
161
|
fontSize: 22,
|
|
154
162
|
opacity: 0.9
|
|
155
163
|
},
|
|
156
|
-
|
|
157
164
|
/* Styles applied to the message wrapper element. */
|
|
158
165
|
message: {
|
|
159
166
|
padding: '8px 0',
|
|
@@ -161,7 +168,6 @@ var styles = function styles(theme) {
|
|
|
161
168
|
flexDirection: 'column',
|
|
162
169
|
justifyContent: 'center'
|
|
163
170
|
},
|
|
164
|
-
|
|
165
171
|
/* Styles applied to the action wrapper element if `action` is provided. */
|
|
166
172
|
action: {
|
|
167
173
|
display: 'flex',
|
|
@@ -173,68 +179,143 @@ var styles = function styles(theme) {
|
|
|
173
179
|
};
|
|
174
180
|
};
|
|
175
181
|
|
|
176
|
-
exports.styles = styles;
|
|
177
182
|
var defaultIconMapping = {
|
|
178
|
-
success:
|
|
179
|
-
|
|
180
|
-
}),
|
|
181
|
-
|
|
182
|
-
fontSize: "inherit"
|
|
183
|
-
}),
|
|
184
|
-
error: /*#__PURE__*/_react.default.createElement(_ErrorOutline.default, {
|
|
185
|
-
fontSize: "inherit"
|
|
186
|
-
}),
|
|
187
|
-
info: /*#__PURE__*/_react.default.createElement(_InfoOutlined.default, {
|
|
188
|
-
fontSize: "inherit"
|
|
189
|
-
})
|
|
183
|
+
success: _react2.default.createElement(_CheckCircleOutlineOutlined2.default, { fontSize: 'inherit' }),
|
|
184
|
+
warning: _react2.default.createElement(_ReportProblemOutlined2.default, { fontSize: 'inherit' }),
|
|
185
|
+
error: _react2.default.createElement(_ErrorOutline2.default, { fontSize: 'inherit' }),
|
|
186
|
+
info: _react2.default.createElement(_InfoOutlined2.default, { fontSize: 'inherit' })
|
|
190
187
|
};
|
|
191
188
|
|
|
192
|
-
var Alert =
|
|
189
|
+
var Alert = _react2.default.forwardRef(function Alert(props, ref) {
|
|
193
190
|
var action = props.action,
|
|
194
191
|
children = props.children,
|
|
195
192
|
classes = props.classes,
|
|
196
193
|
className = props.className,
|
|
197
194
|
_props$closeText = props.closeText,
|
|
198
|
-
closeText = _props$closeText ===
|
|
195
|
+
closeText = _props$closeText === undefined ? 'Close' : _props$closeText,
|
|
199
196
|
color = props.color,
|
|
200
197
|
icon = props.icon,
|
|
201
198
|
_props$iconMapping = props.iconMapping,
|
|
202
|
-
iconMapping = _props$iconMapping ===
|
|
199
|
+
iconMapping = _props$iconMapping === undefined ? defaultIconMapping : _props$iconMapping,
|
|
203
200
|
onClose = props.onClose,
|
|
204
201
|
_props$role = props.role,
|
|
205
|
-
role = _props$role ===
|
|
202
|
+
role = _props$role === undefined ? 'alert' : _props$role,
|
|
206
203
|
_props$severity = props.severity,
|
|
207
|
-
severity = _props$severity ===
|
|
204
|
+
severity = _props$severity === undefined ? 'success' : _props$severity,
|
|
208
205
|
_props$variant = props.variant,
|
|
209
|
-
variant = _props$variant ===
|
|
210
|
-
other = (
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
206
|
+
variant = _props$variant === undefined ? 'standard' : _props$variant,
|
|
207
|
+
other = _objectWithoutProperties(props, ['action', 'children', 'classes', 'className', 'closeText', 'color', 'icon', 'iconMapping', 'onClose', 'role', 'severity', 'variant']);
|
|
208
|
+
|
|
209
|
+
return _react2.default.createElement(
|
|
210
|
+
_Paper2.default,
|
|
211
|
+
_extends({
|
|
212
|
+
role: role,
|
|
213
|
+
square: true,
|
|
214
|
+
elevation: 0,
|
|
215
|
+
className: (0, _clsx2.default)(classes.root, classes['' + variant + (0, _utils.capitalize)(color || severity)], className),
|
|
216
|
+
ref: ref
|
|
217
|
+
}, other),
|
|
218
|
+
icon !== false ? _react2.default.createElement(
|
|
219
|
+
'div',
|
|
220
|
+
{ className: classes.icon },
|
|
221
|
+
icon || iconMapping[severity] || defaultIconMapping[severity]
|
|
222
|
+
) : null,
|
|
223
|
+
_react2.default.createElement(
|
|
224
|
+
'div',
|
|
225
|
+
{ className: classes.message },
|
|
226
|
+
children
|
|
227
|
+
),
|
|
228
|
+
action != null ? _react2.default.createElement(
|
|
229
|
+
'div',
|
|
230
|
+
{ className: classes.action },
|
|
231
|
+
action
|
|
232
|
+
) : null,
|
|
233
|
+
action == null && onClose ? _react2.default.createElement(
|
|
234
|
+
'div',
|
|
235
|
+
{ className: classes.action },
|
|
236
|
+
_react2.default.createElement(
|
|
237
|
+
_IconButton2.default,
|
|
238
|
+
{
|
|
239
|
+
size: 'small',
|
|
240
|
+
'aria-label': closeText,
|
|
241
|
+
title: closeText,
|
|
242
|
+
color: 'inherit',
|
|
243
|
+
onClick: onClose
|
|
244
|
+
},
|
|
245
|
+
_react2.default.createElement(_Close2.default, { fontSize: 'small' })
|
|
246
|
+
)
|
|
247
|
+
) : null
|
|
248
|
+
);
|
|
234
249
|
});
|
|
235
250
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
251
|
+
Alert.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
252
|
+
// ----------------------------- Warning --------------------------------
|
|
253
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
254
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
255
|
+
// ----------------------------------------------------------------------
|
|
256
|
+
/**
|
|
257
|
+
* The action to display. It renders after the message, at the end of the alert.
|
|
258
|
+
*/
|
|
259
|
+
action: _propTypes2.default.node,
|
|
260
|
+
/**
|
|
261
|
+
* The content of the component.
|
|
262
|
+
*/
|
|
263
|
+
children: _propTypes2.default.node,
|
|
264
|
+
/**
|
|
265
|
+
* Override or extend the styles applied to the component.
|
|
266
|
+
* See [CSS API](#css) below for more details.
|
|
267
|
+
*/
|
|
268
|
+
classes: _propTypes2.default.object,
|
|
269
|
+
/**
|
|
270
|
+
* @ignore
|
|
271
|
+
*/
|
|
272
|
+
className: _propTypes2.default.string,
|
|
273
|
+
/**
|
|
274
|
+
* Override the default label for the *close popup* icon button.
|
|
275
|
+
*
|
|
276
|
+
* For localization purposes, you can use the provided [translations](/guides/localization/).
|
|
277
|
+
*/
|
|
278
|
+
closeText: _propTypes2.default.string,
|
|
279
|
+
/**
|
|
280
|
+
* The main color for the alert. Unless provided, the value is taken from the `severity` prop.
|
|
281
|
+
*/
|
|
282
|
+
color: _propTypes2.default.oneOf(['error', 'info', 'success', 'warning']),
|
|
283
|
+
/**
|
|
284
|
+
* Override the icon displayed before the children.
|
|
285
|
+
* Unless provided, the icon is mapped to the value of the `severity` prop.
|
|
286
|
+
*/
|
|
287
|
+
icon: _propTypes2.default.node,
|
|
288
|
+
/**
|
|
289
|
+
* The component maps the `severity` prop to a range of different icons,
|
|
290
|
+
* for instance success to `<SuccessOutlined>`.
|
|
291
|
+
* If you wish to change this mapping, you can provide your own.
|
|
292
|
+
* Alternatively, you can use the `icon` prop to override the icon displayed.
|
|
293
|
+
*/
|
|
294
|
+
iconMapping: _propTypes2.default.shape({
|
|
295
|
+
error: _propTypes2.default.node,
|
|
296
|
+
info: _propTypes2.default.node,
|
|
297
|
+
success: _propTypes2.default.node,
|
|
298
|
+
warning: _propTypes2.default.node
|
|
299
|
+
}),
|
|
300
|
+
/**
|
|
301
|
+
* Callback fired when the component requests to be closed.
|
|
302
|
+
* When provided and no `action` prop is set, a close icon button is displayed that triggers the callback when clicked.
|
|
303
|
+
*
|
|
304
|
+
* @param {object} event The event source of the callback.
|
|
305
|
+
*/
|
|
306
|
+
onClose: _propTypes2.default.func,
|
|
307
|
+
/**
|
|
308
|
+
* The ARIA role attribute of the element.
|
|
309
|
+
*/
|
|
310
|
+
role: _propTypes2.default.string,
|
|
311
|
+
/**
|
|
312
|
+
* The severity of the alert. This defines the color and icon used.
|
|
313
|
+
*/
|
|
314
|
+
severity: _propTypes2.default.oneOf(['error', 'info', 'success', 'warning']),
|
|
315
|
+
/**
|
|
316
|
+
* The variant to use.
|
|
317
|
+
*/
|
|
318
|
+
variant: _propTypes2.default.oneOf(['filled', 'outlined', 'standard'])
|
|
319
|
+
} : {};
|
|
320
|
+
|
|
321
|
+
exports.default = (0, _styles.withStyles)(styles, { name: 'MuiAlert' })(Alert);
|
package/lib/Alert/index.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("/builds/sis-cc/.stat-suite/dotstatsuite-visions/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
|
1
|
+
'use strict';
|
|
4
2
|
|
|
5
3
|
exports.__esModule = true;
|
|
6
|
-
exports.default = void 0;
|
|
7
4
|
|
|
8
|
-
var _Alert =
|
|
5
|
+
var _Alert = require('./Alert');
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, 'default', {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _interopRequireDefault(_Alert).default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
15
|
|
|
10
|
-
exports
|
|
11
|
-
module.exports = exports.default;
|
|
16
|
+
module.exports = exports['default'];
|