@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/lib/DataEdit/DataEdit.js
CHANGED
|
@@ -1,39 +1,56 @@
|
|
|
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
|
|
5
|
+
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; };
|
|
6
|
+
|
|
7
|
+
var _react = require('react');
|
|
8
|
+
|
|
9
|
+
var _react2 = _interopRequireDefault(_react);
|
|
10
|
+
|
|
11
|
+
var _propTypes = require('prop-types');
|
|
12
|
+
|
|
13
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
14
|
+
|
|
15
|
+
var _ramda = require('ramda');
|
|
16
|
+
|
|
17
|
+
var R = _interopRequireWildcard(_ramda);
|
|
18
|
+
|
|
19
|
+
var _Grid = require('@material-ui/core/Grid');
|
|
9
20
|
|
|
10
|
-
var
|
|
21
|
+
var _Grid2 = _interopRequireDefault(_Grid);
|
|
11
22
|
|
|
12
|
-
var
|
|
23
|
+
var _Typography = require('@material-ui/core/Typography');
|
|
13
24
|
|
|
14
|
-
var
|
|
25
|
+
var _Typography2 = _interopRequireDefault(_Typography);
|
|
15
26
|
|
|
16
|
-
var
|
|
27
|
+
var _Container = require('@material-ui/core/Container');
|
|
17
28
|
|
|
18
|
-
var
|
|
29
|
+
var _Container2 = _interopRequireDefault(_Container);
|
|
19
30
|
|
|
20
|
-
var _Checkbox =
|
|
31
|
+
var _Checkbox = require('@material-ui/core/Checkbox');
|
|
21
32
|
|
|
22
|
-
var
|
|
33
|
+
var _Checkbox2 = _interopRequireDefault(_Checkbox);
|
|
23
34
|
|
|
24
|
-
var
|
|
35
|
+
var _styles = require('@material-ui/styles');
|
|
25
36
|
|
|
26
|
-
var
|
|
37
|
+
var _FormControlLabel = require('@material-ui/core/FormControlLabel');
|
|
27
38
|
|
|
28
|
-
var
|
|
39
|
+
var _FormControlLabel2 = _interopRequireDefault(_FormControlLabel);
|
|
29
40
|
|
|
30
|
-
|
|
41
|
+
var _Input = require('./Input');
|
|
31
42
|
|
|
32
|
-
|
|
43
|
+
var _Input2 = _interopRequireDefault(_Input);
|
|
44
|
+
|
|
45
|
+
var _utils = require('../utils');
|
|
46
|
+
|
|
47
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
48
|
+
|
|
49
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
50
|
|
|
34
51
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
35
52
|
return {
|
|
36
|
-
root: (
|
|
53
|
+
root: _extends({
|
|
37
54
|
padding: theme.spacing(0, 2, 1, 2)
|
|
38
55
|
}, R.pathOr({}, ['mixins', 'dataEdit', 'root'], theme)),
|
|
39
56
|
title: {
|
|
@@ -50,90 +67,141 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
50
67
|
var DataEdit = function DataEdit(_ref) {
|
|
51
68
|
var labels = _ref.labels,
|
|
52
69
|
properties = _ref.properties;
|
|
70
|
+
|
|
53
71
|
var classes = useStyles();
|
|
54
72
|
var _properties$title = properties.title,
|
|
55
|
-
title = _properties$title ===
|
|
73
|
+
title = _properties$title === undefined ? {} : _properties$title,
|
|
56
74
|
_properties$subtitle = properties.subtitle,
|
|
57
|
-
subtitle = _properties$subtitle ===
|
|
75
|
+
subtitle = _properties$subtitle === undefined ? {} : _properties$subtitle,
|
|
58
76
|
_properties$source = properties.source,
|
|
59
|
-
source = _properties$source ===
|
|
77
|
+
source = _properties$source === undefined ? {} : _properties$source,
|
|
60
78
|
_properties$logo = properties.logo,
|
|
61
|
-
logo = _properties$logo ===
|
|
79
|
+
logo = _properties$logo === undefined ? {} : _properties$logo,
|
|
62
80
|
_properties$copyright = properties.copyright,
|
|
63
|
-
copyright = _properties$copyright ===
|
|
81
|
+
copyright = _properties$copyright === undefined ? {} : _properties$copyright;
|
|
82
|
+
|
|
64
83
|
var resetLabel = R.prop('reset', labels);
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
container: true,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
84
|
+
|
|
85
|
+
return _react2.default.createElement(
|
|
86
|
+
_Grid2.default,
|
|
87
|
+
{ 'data-testid': 'data-edit-test-id', spacing: 2, container: true, className: classes.root },
|
|
88
|
+
_react2.default.createElement(
|
|
89
|
+
_Grid2.default,
|
|
90
|
+
{ item: true, xs: 12 },
|
|
91
|
+
_react2.default.createElement(
|
|
92
|
+
_Grid2.default,
|
|
93
|
+
{ container: true },
|
|
94
|
+
_react2.default.createElement(
|
|
95
|
+
_Grid2.default,
|
|
96
|
+
{ item: true, xs: 12 },
|
|
97
|
+
_react2.default.createElement(
|
|
98
|
+
_Typography2.default,
|
|
99
|
+
{ variant: 'h6', className: classes.title },
|
|
100
|
+
'Information'
|
|
101
|
+
)
|
|
102
|
+
)
|
|
103
|
+
),
|
|
104
|
+
_react2.default.createElement(
|
|
105
|
+
_Grid2.default,
|
|
106
|
+
{ spacing: 2, container: true },
|
|
107
|
+
R.or(R.prop('isActive')(title), R.prop('isActive')(subtitle)) && _react2.default.createElement(
|
|
108
|
+
_Grid2.default,
|
|
109
|
+
{ item: true, xs: 12, sm: 12, md: 12, lg: 6 },
|
|
110
|
+
R.prop('isActive')(title) && _react2.default.createElement(_Input2.default, _extends({
|
|
111
|
+
fullWidth: true,
|
|
112
|
+
label: R.prop('title', labels),
|
|
113
|
+
resetLabel: resetLabel
|
|
114
|
+
}, R.dissoc('isDefault', title))),
|
|
115
|
+
R.prop('isActive')(subtitle) && _react2.default.createElement(_Input2.default, _extends({
|
|
116
|
+
fullWidth: true,
|
|
117
|
+
label: R.prop('subtitle', labels),
|
|
118
|
+
resetLabel: resetLabel
|
|
119
|
+
}, R.dissoc('isDefault', subtitle)))
|
|
120
|
+
),
|
|
121
|
+
_react2.default.createElement(
|
|
122
|
+
_Grid2.default,
|
|
123
|
+
{ item: true, xs: 12, sm: 12, md: 12, lg: 6 },
|
|
124
|
+
R.prop('isActive')(source) && _react2.default.createElement(_Input2.default, _extends({
|
|
125
|
+
fullWidth: true,
|
|
126
|
+
label: R.prop('source', labels),
|
|
127
|
+
resetLabel: resetLabel
|
|
128
|
+
}, R.dissoc('isDefault', source))),
|
|
129
|
+
_react2.default.createElement(
|
|
130
|
+
_Container2.default,
|
|
131
|
+
{ disableGutters: true, className: classes.checkboxes },
|
|
132
|
+
R.map(function (item) {
|
|
133
|
+
if (R.pipe(R.prop('isActive'), R.not)(item)) return;
|
|
134
|
+
var id = R.prop('id')(item);
|
|
135
|
+
return _react2.default.createElement(_FormControlLabel2.default, {
|
|
136
|
+
key: id,
|
|
137
|
+
control: _react2.default.createElement(_Checkbox2.default, _extends({
|
|
138
|
+
color: 'primary',
|
|
139
|
+
inputProps: { 'aria-label': R.prop(id)(labels) }
|
|
140
|
+
}, R.omit(['isActive'])(item))),
|
|
141
|
+
label: R.prop(id)(labels)
|
|
142
|
+
});
|
|
143
|
+
})([logo, copyright])
|
|
144
|
+
)
|
|
145
|
+
)
|
|
146
|
+
)
|
|
147
|
+
)
|
|
148
|
+
);
|
|
125
149
|
};
|
|
126
150
|
|
|
151
|
+
DataEdit.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
152
|
+
labels: _propTypes2.default.shape({
|
|
153
|
+
title: _propTypes2.default.string,
|
|
154
|
+
subtitle: _propTypes2.default.string,
|
|
155
|
+
source: _propTypes2.default.string,
|
|
156
|
+
logo: _propTypes2.default.string,
|
|
157
|
+
copyright: _propTypes2.default.string,
|
|
158
|
+
reset: _propTypes2.default.string
|
|
159
|
+
}),
|
|
160
|
+
properties: _propTypes2.default.shape({
|
|
161
|
+
title: _propTypes2.default.shape({
|
|
162
|
+
id: _propTypes2.default.string,
|
|
163
|
+
isActive: _propTypes2.default.bool,
|
|
164
|
+
onSubmit: _propTypes2.default.func,
|
|
165
|
+
onReset: _propTypes2.default.func,
|
|
166
|
+
value: _propTypes2.default.string
|
|
167
|
+
}),
|
|
168
|
+
subtitle: _propTypes2.default.shape({
|
|
169
|
+
id: _propTypes2.default.string,
|
|
170
|
+
isActive: _propTypes2.default.bool,
|
|
171
|
+
onSubmit: _propTypes2.default.func,
|
|
172
|
+
onReset: _propTypes2.default.func,
|
|
173
|
+
value: _propTypes2.default.string
|
|
174
|
+
}),
|
|
175
|
+
source: _propTypes2.default.shape({
|
|
176
|
+
id: _propTypes2.default.string,
|
|
177
|
+
isActive: _propTypes2.default.bool,
|
|
178
|
+
onSubmit: _propTypes2.default.func,
|
|
179
|
+
onReset: _propTypes2.default.func,
|
|
180
|
+
value: _propTypes2.default.string
|
|
181
|
+
}),
|
|
182
|
+
logo: _propTypes2.default.shape({
|
|
183
|
+
id: _propTypes2.default.string,
|
|
184
|
+
isActive: _propTypes2.default.bool,
|
|
185
|
+
onChange: _propTypes2.default.func,
|
|
186
|
+
checked: _propTypes2.default.bool
|
|
187
|
+
}),
|
|
188
|
+
copyright: _propTypes2.default.shape({
|
|
189
|
+
id: _propTypes2.default.string,
|
|
190
|
+
isActive: _propTypes2.default.bool,
|
|
191
|
+
onChange: _propTypes2.default.func,
|
|
192
|
+
checked: _propTypes2.default.bool
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
} : {};
|
|
196
|
+
|
|
127
197
|
var isAllInactive = R.pipe(R.pluck('isActive'), R.all(R.identity), R.not);
|
|
128
198
|
|
|
129
|
-
|
|
199
|
+
exports.default = (0, _utils.withBlank)(function (_ref2) {
|
|
130
200
|
var isBlank = _ref2.isBlank,
|
|
131
201
|
_ref2$properties = _ref2.properties,
|
|
132
|
-
properties = _ref2$properties ===
|
|
202
|
+
properties = _ref2$properties === undefined ? {} : _ref2$properties;
|
|
133
203
|
return {
|
|
134
204
|
isBlank: R.any(R.identity)([isBlank, R.isEmpty(properties), isAllInactive(properties)])
|
|
135
205
|
};
|
|
136
206
|
})(DataEdit);
|
|
137
|
-
|
|
138
|
-
exports.default = _default;
|
|
139
|
-
module.exports = exports.default;
|
|
207
|
+
module.exports = exports['default'];
|
package/lib/DataEdit/Input.js
CHANGED
|
@@ -1,35 +1,49 @@
|
|
|
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.
|
|
4
|
+
exports.MyInput = 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 _ramda = require('ramda');
|
|
17
|
+
|
|
18
|
+
var R = _interopRequireWildcard(_ramda);
|
|
19
|
+
|
|
20
|
+
var _styles = require('@material-ui/core/styles');
|
|
7
21
|
|
|
8
|
-
var
|
|
22
|
+
var _TextField = require('@material-ui/core/TextField');
|
|
9
23
|
|
|
10
|
-
var
|
|
24
|
+
var _TextField2 = _interopRequireDefault(_TextField);
|
|
11
25
|
|
|
12
|
-
var
|
|
26
|
+
var _InputAdornment = require('@material-ui/core/InputAdornment');
|
|
13
27
|
|
|
14
|
-
var
|
|
28
|
+
var _InputAdornment2 = _interopRequireDefault(_InputAdornment);
|
|
15
29
|
|
|
16
|
-
var
|
|
30
|
+
var _IconButton = require('@material-ui/core/IconButton');
|
|
17
31
|
|
|
18
|
-
var
|
|
32
|
+
var _IconButton2 = _interopRequireDefault(_IconButton);
|
|
19
33
|
|
|
20
|
-
var
|
|
34
|
+
var _Done = require('@material-ui/icons/Done');
|
|
21
35
|
|
|
22
|
-
var
|
|
36
|
+
var _Done2 = _interopRequireDefault(_Done);
|
|
23
37
|
|
|
24
|
-
var
|
|
38
|
+
var _RotateLeft = require('@material-ui/icons/RotateLeft');
|
|
25
39
|
|
|
26
|
-
var
|
|
40
|
+
var _RotateLeft2 = _interopRequireDefault(_RotateLeft);
|
|
27
41
|
|
|
28
|
-
var
|
|
42
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
29
43
|
|
|
30
|
-
function
|
|
44
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
45
|
|
|
32
|
-
function
|
|
46
|
+
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; }
|
|
33
47
|
|
|
34
48
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
35
49
|
return {
|
|
@@ -50,21 +64,32 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
50
64
|
|
|
51
65
|
var LefttIcon = function LefttIcon(_ref) {
|
|
52
66
|
var Icon = _ref.Icon;
|
|
53
|
-
return
|
|
67
|
+
return _react2.default.createElement(Icon, null);
|
|
54
68
|
};
|
|
55
69
|
|
|
70
|
+
LefttIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
71
|
+
Icon: _propTypes2.default.object
|
|
72
|
+
} : {};
|
|
73
|
+
|
|
56
74
|
var RightIcon = function RightIcon(_ref2) {
|
|
57
75
|
var onSubmit = _ref2.onSubmit,
|
|
58
76
|
_ref2$Icon = _ref2.Icon,
|
|
59
|
-
Icon = _ref2$Icon ===
|
|
60
|
-
return
|
|
61
|
-
|
|
62
|
-
onClick: function onClick() {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
77
|
+
Icon = _ref2$Icon === undefined ? _Done2.default : _ref2$Icon;
|
|
78
|
+
return _react2.default.createElement(
|
|
79
|
+
_IconButton2.default,
|
|
80
|
+
{ color: 'primary', onClick: function onClick() {
|
|
81
|
+
return onSubmit();
|
|
82
|
+
} },
|
|
83
|
+
_react2.default.createElement(Icon, null)
|
|
84
|
+
);
|
|
66
85
|
};
|
|
67
86
|
|
|
87
|
+
RightIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
88
|
+
Icon: _propTypes2.default.object,
|
|
89
|
+
onSubmit: _propTypes2.default.func,
|
|
90
|
+
classes: _propTypes2.default.object
|
|
91
|
+
} : {};
|
|
92
|
+
|
|
68
93
|
var MyInput = function MyInput(_ref3) {
|
|
69
94
|
var id = _ref3.id,
|
|
70
95
|
value = _ref3.value,
|
|
@@ -72,7 +97,8 @@ var MyInput = function MyInput(_ref3) {
|
|
|
72
97
|
onReset = _ref3.onReset,
|
|
73
98
|
resetLabel = _ref3.resetLabel,
|
|
74
99
|
placeholder = _ref3.placeholder,
|
|
75
|
-
props = (
|
|
100
|
+
props = _objectWithoutProperties(_ref3, ['id', 'value', 'onSubmit', 'onReset', 'resetLabel', 'placeholder']);
|
|
101
|
+
|
|
76
102
|
var classes = useStyles();
|
|
77
103
|
|
|
78
104
|
var _useState = (0, _react.useState)(value || ''),
|
|
@@ -82,7 +108,8 @@ var MyInput = function MyInput(_ref3) {
|
|
|
82
108
|
(0, _react.useEffect)(function () {
|
|
83
109
|
setInputValue(value);
|
|
84
110
|
}, [value]);
|
|
85
|
-
|
|
111
|
+
|
|
112
|
+
var resetId = 'reset-' + id;
|
|
86
113
|
|
|
87
114
|
var handleBlur = function handleBlur(event) {
|
|
88
115
|
if (R.is(Function, onSubmit) && inputValue !== value) {
|
|
@@ -110,23 +137,28 @@ var MyInput = function MyInput(_ref3) {
|
|
|
110
137
|
setInputValue(event.target.value);
|
|
111
138
|
};
|
|
112
139
|
|
|
113
|
-
var endAdornment = R.is(Function, onReset) || inputValue !== value ?
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
140
|
+
var endAdornment = R.is(Function, onReset) || inputValue !== value ? _react2.default.createElement(
|
|
141
|
+
_InputAdornment2.default,
|
|
142
|
+
{ position: 'end' },
|
|
143
|
+
_react2.default.createElement(
|
|
144
|
+
_IconButton2.default,
|
|
145
|
+
{
|
|
146
|
+
id: resetId,
|
|
147
|
+
'aria-label': resetLabel,
|
|
148
|
+
onKeyPress: onEnterLabel,
|
|
149
|
+
onClick: handleReset
|
|
150
|
+
},
|
|
151
|
+
_react2.default.createElement(_RotateLeft2.default, { fontSize: 'small' })
|
|
152
|
+
)
|
|
153
|
+
) : null;
|
|
154
|
+
|
|
155
|
+
return _react2.default.createElement(_TextField2.default, _extends({
|
|
124
156
|
inputProps: {
|
|
125
157
|
className: classes.input
|
|
126
158
|
},
|
|
127
159
|
onBlur: handleBlur,
|
|
128
|
-
margin:
|
|
129
|
-
variant:
|
|
160
|
+
margin: 'dense',
|
|
161
|
+
variant: 'outlined',
|
|
130
162
|
onKeyPress: onEnterLabel,
|
|
131
163
|
onChange: handleChange,
|
|
132
164
|
id: id,
|
|
@@ -139,5 +171,13 @@ var MyInput = function MyInput(_ref3) {
|
|
|
139
171
|
};
|
|
140
172
|
|
|
141
173
|
exports.MyInput = MyInput;
|
|
142
|
-
|
|
143
|
-
|
|
174
|
+
MyInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
175
|
+
id: _propTypes2.default.string,
|
|
176
|
+
value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),
|
|
177
|
+
onSubmit: _propTypes2.default.func,
|
|
178
|
+
onReset: _propTypes2.default.func,
|
|
179
|
+
resetLabel: _propTypes2.default.string,
|
|
180
|
+
placeholder: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number])
|
|
181
|
+
} : {};
|
|
182
|
+
|
|
183
|
+
exports.default = MyInput;
|
package/lib/DataEdit/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 _DataEdit =
|
|
5
|
+
var _DataEdit = require('./DataEdit');
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, 'default', {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _interopRequireDefault(_DataEdit).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'];
|