@sis-cc/dotstatsuite-visions 6.4.0 → 6.5.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/AuthDialog/index.js +194 -0
- package/es/Icons/CopyContent.js +12 -0
- package/es/Icons/index.js +2 -1
- package/es/TableHtml5/section.js +8 -1
- package/es/TableLayout/lib.js +1 -11
- package/es/index.js +1 -0
- package/es/theme.js +10 -0
- package/lib/AuthDialog/index.js +238 -0
- package/lib/Icons/CopyContent.js +25 -0
- package/lib/Icons/index.js +9 -0
- package/lib/TableHtml5/section.js +8 -1
- package/lib/TableLayout/lib.js +2 -12
- package/lib/index.js +10 -1
- package/lib/theme.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AuthDialog is an UI component that displays an login popup.
|
|
3
|
+
*
|
|
4
|
+
* @memberOf VISIONS
|
|
5
|
+
* @name AuthDialog
|
|
6
|
+
* @tag component
|
|
7
|
+
* @api public
|
|
8
|
+
* @props
|
|
9
|
+
* AuthDialog.propTypes = {
|
|
10
|
+
* isOpen: PropTypes.bool,
|
|
11
|
+
* labels: PropTypes.shape({
|
|
12
|
+
* anonymous: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
13
|
+
* error: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14
|
+
* header: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
15
|
+
* password: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
16
|
+
* user: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
17
|
+
* submit: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
18
|
+
* }),
|
|
19
|
+
* onClose: PropTypes.func.isRequired,
|
|
20
|
+
* onSubmit: PropTypes.func.isRequired
|
|
21
|
+
* };
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import React, { useState } from 'react';
|
|
25
|
+
import PropTypes from 'prop-types';
|
|
26
|
+
import { isEmpty } from 'ramda';
|
|
27
|
+
import Button from '../Button';
|
|
28
|
+
import Checkbox from '@material-ui/core/Checkbox';
|
|
29
|
+
import CloseIcon from '@material-ui/icons/Close';
|
|
30
|
+
import Dialog from '@material-ui/core/Dialog';
|
|
31
|
+
import MuiDialogTitle from '@material-ui/core/DialogTitle';
|
|
32
|
+
import IconButton from '@material-ui/core/IconButton';
|
|
33
|
+
import Input from '@material-ui/core/Input';
|
|
34
|
+
import PersonIcon from '@material-ui/icons/Person';
|
|
35
|
+
import TextField from '@material-ui/core/TextField';
|
|
36
|
+
import Typography from '@material-ui/core/Typography';
|
|
37
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
38
|
+
|
|
39
|
+
var useStyles = makeStyles(function (theme) {
|
|
40
|
+
return {
|
|
41
|
+
header: {
|
|
42
|
+
color: 'grey',
|
|
43
|
+
display: 'flex',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
justifyContent: 'space-between'
|
|
46
|
+
},
|
|
47
|
+
headerLabel: {
|
|
48
|
+
display: 'flex',
|
|
49
|
+
alignItems: 'center'
|
|
50
|
+
},
|
|
51
|
+
closeButton: {
|
|
52
|
+
color: 'grey !important',
|
|
53
|
+
padding: 0
|
|
54
|
+
},
|
|
55
|
+
content: {
|
|
56
|
+
alignItems: 'stretch',
|
|
57
|
+
display: 'flex',
|
|
58
|
+
flexDirection: 'column',
|
|
59
|
+
padding: 10,
|
|
60
|
+
backgroundColor: 'rgb(240, 240, 240)'
|
|
61
|
+
},
|
|
62
|
+
error: {
|
|
63
|
+
color: 'red'
|
|
64
|
+
},
|
|
65
|
+
input: {
|
|
66
|
+
backgroundColor: 'white',
|
|
67
|
+
'&[type=number]::-webkit-inner-spin-button, &[type=number]::-webkit-outer-spin-button': {
|
|
68
|
+
'-webkit-appearance': 'none',
|
|
69
|
+
margin: 0
|
|
70
|
+
},
|
|
71
|
+
'&[type=number]': {
|
|
72
|
+
'-moz-appearance': 'textfield'
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
var AuthDialog = function AuthDialog(_ref) {
|
|
79
|
+
var isOpen = _ref.isOpen,
|
|
80
|
+
labels = _ref.labels,
|
|
81
|
+
onClose = _ref.onClose,
|
|
82
|
+
onSubmit = _ref.onSubmit;
|
|
83
|
+
|
|
84
|
+
var classes = useStyles();
|
|
85
|
+
|
|
86
|
+
var _useState = useState(''),
|
|
87
|
+
user = _useState[0],
|
|
88
|
+
setUser = _useState[1];
|
|
89
|
+
|
|
90
|
+
var _useState2 = useState(''),
|
|
91
|
+
password = _useState2[0],
|
|
92
|
+
setPassword = _useState2[1];
|
|
93
|
+
|
|
94
|
+
var _useState3 = useState(false),
|
|
95
|
+
isAnonymous = _useState3[0],
|
|
96
|
+
setIsAnonymous = _useState3[1];
|
|
97
|
+
|
|
98
|
+
var onChangeAnonymous = function onChangeAnonymous() {
|
|
99
|
+
setIsAnonymous(!isAnonymous);
|
|
100
|
+
if (!isAnonymous) {
|
|
101
|
+
setUser('');
|
|
102
|
+
setPassword('');
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var canSubmit = isAnonymous || !isEmpty(user) && !isEmpty(password);
|
|
107
|
+
|
|
108
|
+
var onClickSubmit = function onClickSubmit() {
|
|
109
|
+
return onSubmit({ user: user, password: password, isAnonymous: isAnonymous });
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
return React.createElement(
|
|
113
|
+
Dialog,
|
|
114
|
+
{ open: isOpen, onClose: onClose },
|
|
115
|
+
React.createElement(
|
|
116
|
+
'div',
|
|
117
|
+
{ className: classes.header },
|
|
118
|
+
React.createElement(
|
|
119
|
+
'div',
|
|
120
|
+
{ className: classes.headerLabel },
|
|
121
|
+
React.createElement(PersonIcon, null),
|
|
122
|
+
React.createElement(
|
|
123
|
+
Typography,
|
|
124
|
+
null,
|
|
125
|
+
labels.header
|
|
126
|
+
)
|
|
127
|
+
),
|
|
128
|
+
React.createElement(
|
|
129
|
+
IconButton,
|
|
130
|
+
{ className: classes.closeButton, onClick: onClose },
|
|
131
|
+
React.createElement(CloseIcon, null)
|
|
132
|
+
)
|
|
133
|
+
),
|
|
134
|
+
React.createElement(
|
|
135
|
+
'div',
|
|
136
|
+
{ className: classes.content },
|
|
137
|
+
labels.user,
|
|
138
|
+
React.createElement(TextField, {
|
|
139
|
+
inputProps: { className: classes.input },
|
|
140
|
+
value: user,
|
|
141
|
+
onChange: function onChange(e) {
|
|
142
|
+
return setUser(e.target.value);
|
|
143
|
+
},
|
|
144
|
+
disabled: isAnonymous
|
|
145
|
+
}),
|
|
146
|
+
labels.password,
|
|
147
|
+
React.createElement(TextField, {
|
|
148
|
+
inputProps: { className: classes.input },
|
|
149
|
+
value: password,
|
|
150
|
+
onChange: function onChange(e) {
|
|
151
|
+
return setPassword(e.target.value);
|
|
152
|
+
},
|
|
153
|
+
disabled: isAnonymous,
|
|
154
|
+
type: 'password'
|
|
155
|
+
}),
|
|
156
|
+
React.createElement(
|
|
157
|
+
'div',
|
|
158
|
+
null,
|
|
159
|
+
React.createElement(Checkbox, { checked: isAnonymous, onChange: onChangeAnonymous }),
|
|
160
|
+
labels.anonymous
|
|
161
|
+
),
|
|
162
|
+
labels.error && React.createElement(
|
|
163
|
+
'div',
|
|
164
|
+
{ className: classes.error },
|
|
165
|
+
labels.error
|
|
166
|
+
),
|
|
167
|
+
React.createElement(
|
|
168
|
+
Button,
|
|
169
|
+
{ color: 'primary', disabled: !canSubmit, onClick: onClickSubmit, variant: 'contained' },
|
|
170
|
+
React.createElement(
|
|
171
|
+
'div',
|
|
172
|
+
{ style: { width: '100%' } },
|
|
173
|
+
labels.submit
|
|
174
|
+
)
|
|
175
|
+
)
|
|
176
|
+
)
|
|
177
|
+
);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
AuthDialog.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
181
|
+
isOpen: PropTypes.bool,
|
|
182
|
+
labels: PropTypes.shape({
|
|
183
|
+
anonymous: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
184
|
+
error: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
185
|
+
header: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
186
|
+
password: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
187
|
+
user: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
188
|
+
submit: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
|
189
|
+
}),
|
|
190
|
+
onClose: PropTypes.func.isRequired,
|
|
191
|
+
onSubmit: PropTypes.func.isRequired
|
|
192
|
+
} : {};
|
|
193
|
+
|
|
194
|
+
export default AuthDialog;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import SvgIcon from '@material-ui/core/SvgIcon';
|
|
5
|
+
|
|
6
|
+
export default (function (props) {
|
|
7
|
+
return React.createElement(
|
|
8
|
+
SvgIcon,
|
|
9
|
+
_extends({ viewBox: '0 0 24 24' }, props),
|
|
10
|
+
React.createElement('path', { d: 'M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z' })
|
|
11
|
+
);
|
|
12
|
+
});
|
package/es/Icons/index.js
CHANGED
|
@@ -24,4 +24,5 @@ export { default as AccessibilityFilled } from './AccessibilityFilled';
|
|
|
24
24
|
export { default as AccessibilityOutlined } from './AccessibilityOutlined';
|
|
25
25
|
export { default as AccountFilled } from './AccountFilled';
|
|
26
26
|
export { default as AccountOutlined } from './AccountOutlined';
|
|
27
|
-
export { default as Warning } from './Warning';
|
|
27
|
+
export { default as Warning } from './Warning';
|
|
28
|
+
export { default as CopyContent } from './CopyContent';
|
package/es/TableHtml5/section.js
CHANGED
|
@@ -46,6 +46,9 @@ var useStyles = makeStyles(function (theme) {
|
|
|
46
46
|
topCell: {
|
|
47
47
|
paddingTop: 0
|
|
48
48
|
},
|
|
49
|
+
hierarchySpace: {
|
|
50
|
+
marginBottom: 'auto'
|
|
51
|
+
},
|
|
49
52
|
highlight: theme.mixins.table.cellHighlight
|
|
50
53
|
};
|
|
51
54
|
});
|
|
@@ -113,10 +116,14 @@ var Section = function Section(_ref) {
|
|
|
113
116
|
React.createElement(
|
|
114
117
|
'div',
|
|
115
118
|
{ className: classes.cellContent },
|
|
119
|
+
!R.isEmpty(hierarchySpace) && React.createElement(
|
|
120
|
+
'div',
|
|
121
|
+
{ className: classes.hierarchySpace },
|
|
122
|
+
hierarchySpace
|
|
123
|
+
),
|
|
116
124
|
React.createElement(
|
|
117
125
|
Typography,
|
|
118
126
|
{ variant: 'body1', tabIndex: 0 },
|
|
119
|
-
hierarchySpace,
|
|
120
127
|
R.path(['value', 'label'], cell),
|
|
121
128
|
React.createElement(Flags, { flags: flags })
|
|
122
129
|
)
|
package/es/TableLayout/lib.js
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import * as R from 'ramda';
|
|
2
2
|
|
|
3
|
-
export var swap = R.curry(function (index1, index2, list) {
|
|
4
|
-
if (index1 < 0 || index2 < 0 || index1 > list.length - 1 || index2 > list.length - 1) {
|
|
5
|
-
return list; // index out of bound
|
|
6
|
-
}
|
|
7
|
-
var value1 = list[index1];
|
|
8
|
-
var value2 = list[index2];
|
|
9
|
-
return R.pipe(R.set(R.lensIndex(index1), value2), R.set(R.lensIndex(index2), value1))(list);
|
|
10
|
-
});
|
|
11
|
-
|
|
12
3
|
export var changeLayout = function changeLayout(_ref) {
|
|
13
4
|
var dragIndex = _ref.dragIndex,
|
|
14
5
|
hoverIndex = _ref.hoverIndex,
|
|
@@ -17,8 +8,7 @@ export var changeLayout = function changeLayout(_ref) {
|
|
|
17
8
|
currentLayout = _ref.currentLayout;
|
|
18
9
|
|
|
19
10
|
if (R.equals(dragZone, dropZone)) {
|
|
20
|
-
|
|
21
|
-
return R.over(R.lensProp(dropZone), swap(dragIndex, hoverIndex), currentLayout);
|
|
11
|
+
return R.over(R.lensProp(dropZone), R.move(dragIndex, hoverIndex), currentLayout);
|
|
22
12
|
}
|
|
23
13
|
var item = R.pipe(R.prop(dragZone), R.nth(dragIndex))(currentLayout);
|
|
24
14
|
return R.pipe(R.over(R.lensProp(dragZone), R.without([item])), R.over(R.lensProp(dropZone), R.insert(hoverIndex, item)))(currentLayout);
|
package/es/index.js
CHANGED
|
@@ -40,4 +40,5 @@ export { default as Tag } from './Tag';
|
|
|
40
40
|
export { default as ToggleButton } from './ToggleButton';
|
|
41
41
|
export { default as Tooltip } from './Tooltip';
|
|
42
42
|
export { default as VerticalButton } from './VerticalButton';
|
|
43
|
+
export { default as AuthDialog } from './AuthDialog';
|
|
43
44
|
export { sisccTheme, innerPalette, T4_BREAKPOINTS } from './theme';
|
package/es/theme.js
CHANGED
|
@@ -47,6 +47,16 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
overrides: {
|
|
50
|
+
MuiCheckbox: {
|
|
51
|
+
root: {
|
|
52
|
+
color: outerPalette.primaryMain || innerPalette.primaryMain
|
|
53
|
+
},
|
|
54
|
+
colorSecondary: {
|
|
55
|
+
'&$checked': {
|
|
56
|
+
color: outerPalette.primaryMain || innerPalette.primaryMain
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
50
60
|
MuiTableCell: {
|
|
51
61
|
head: {
|
|
52
62
|
lineHeight: 1.43
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _react = require('react');
|
|
6
|
+
|
|
7
|
+
var _react2 = _interopRequireDefault(_react);
|
|
8
|
+
|
|
9
|
+
var _propTypes = require('prop-types');
|
|
10
|
+
|
|
11
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
12
|
+
|
|
13
|
+
var _ramda = require('ramda');
|
|
14
|
+
|
|
15
|
+
var _Button = require('../Button');
|
|
16
|
+
|
|
17
|
+
var _Button2 = _interopRequireDefault(_Button);
|
|
18
|
+
|
|
19
|
+
var _Checkbox = require('@material-ui/core/Checkbox');
|
|
20
|
+
|
|
21
|
+
var _Checkbox2 = _interopRequireDefault(_Checkbox);
|
|
22
|
+
|
|
23
|
+
var _Close = require('@material-ui/icons/Close');
|
|
24
|
+
|
|
25
|
+
var _Close2 = _interopRequireDefault(_Close);
|
|
26
|
+
|
|
27
|
+
var _Dialog = require('@material-ui/core/Dialog');
|
|
28
|
+
|
|
29
|
+
var _Dialog2 = _interopRequireDefault(_Dialog);
|
|
30
|
+
|
|
31
|
+
var _DialogTitle = require('@material-ui/core/DialogTitle');
|
|
32
|
+
|
|
33
|
+
var _DialogTitle2 = _interopRequireDefault(_DialogTitle);
|
|
34
|
+
|
|
35
|
+
var _IconButton = require('@material-ui/core/IconButton');
|
|
36
|
+
|
|
37
|
+
var _IconButton2 = _interopRequireDefault(_IconButton);
|
|
38
|
+
|
|
39
|
+
var _Input = require('@material-ui/core/Input');
|
|
40
|
+
|
|
41
|
+
var _Input2 = _interopRequireDefault(_Input);
|
|
42
|
+
|
|
43
|
+
var _Person = require('@material-ui/icons/Person');
|
|
44
|
+
|
|
45
|
+
var _Person2 = _interopRequireDefault(_Person);
|
|
46
|
+
|
|
47
|
+
var _TextField = require('@material-ui/core/TextField');
|
|
48
|
+
|
|
49
|
+
var _TextField2 = _interopRequireDefault(_TextField);
|
|
50
|
+
|
|
51
|
+
var _Typography = require('@material-ui/core/Typography');
|
|
52
|
+
|
|
53
|
+
var _Typography2 = _interopRequireDefault(_Typography);
|
|
54
|
+
|
|
55
|
+
var _styles = require('@material-ui/core/styles');
|
|
56
|
+
|
|
57
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* AuthDialog is an UI component that displays an login popup.
|
|
61
|
+
*
|
|
62
|
+
* @memberOf VISIONS
|
|
63
|
+
* @name AuthDialog
|
|
64
|
+
* @tag component
|
|
65
|
+
* @api public
|
|
66
|
+
* @props
|
|
67
|
+
* AuthDialog.propTypes = {
|
|
68
|
+
* isOpen: PropTypes.bool,
|
|
69
|
+
* labels: PropTypes.shape({
|
|
70
|
+
* anonymous: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
71
|
+
* error: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
72
|
+
* header: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
73
|
+
* password: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
74
|
+
* user: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
75
|
+
* submit: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
76
|
+
* }),
|
|
77
|
+
* onClose: PropTypes.func.isRequired,
|
|
78
|
+
* onSubmit: PropTypes.func.isRequired
|
|
79
|
+
* };
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
83
|
+
return {
|
|
84
|
+
header: {
|
|
85
|
+
color: 'grey',
|
|
86
|
+
display: 'flex',
|
|
87
|
+
alignItems: 'center',
|
|
88
|
+
justifyContent: 'space-between'
|
|
89
|
+
},
|
|
90
|
+
headerLabel: {
|
|
91
|
+
display: 'flex',
|
|
92
|
+
alignItems: 'center'
|
|
93
|
+
},
|
|
94
|
+
closeButton: {
|
|
95
|
+
color: 'grey !important',
|
|
96
|
+
padding: 0
|
|
97
|
+
},
|
|
98
|
+
content: {
|
|
99
|
+
alignItems: 'stretch',
|
|
100
|
+
display: 'flex',
|
|
101
|
+
flexDirection: 'column',
|
|
102
|
+
padding: 10,
|
|
103
|
+
backgroundColor: 'rgb(240, 240, 240)'
|
|
104
|
+
},
|
|
105
|
+
error: {
|
|
106
|
+
color: 'red'
|
|
107
|
+
},
|
|
108
|
+
input: {
|
|
109
|
+
backgroundColor: 'white',
|
|
110
|
+
'&[type=number]::-webkit-inner-spin-button, &[type=number]::-webkit-outer-spin-button': {
|
|
111
|
+
'-webkit-appearance': 'none',
|
|
112
|
+
margin: 0
|
|
113
|
+
},
|
|
114
|
+
'&[type=number]': {
|
|
115
|
+
'-moz-appearance': 'textfield'
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
var AuthDialog = function AuthDialog(_ref) {
|
|
122
|
+
var isOpen = _ref.isOpen,
|
|
123
|
+
labels = _ref.labels,
|
|
124
|
+
onClose = _ref.onClose,
|
|
125
|
+
onSubmit = _ref.onSubmit;
|
|
126
|
+
|
|
127
|
+
var classes = useStyles();
|
|
128
|
+
|
|
129
|
+
var _useState = (0, _react.useState)(''),
|
|
130
|
+
user = _useState[0],
|
|
131
|
+
setUser = _useState[1];
|
|
132
|
+
|
|
133
|
+
var _useState2 = (0, _react.useState)(''),
|
|
134
|
+
password = _useState2[0],
|
|
135
|
+
setPassword = _useState2[1];
|
|
136
|
+
|
|
137
|
+
var _useState3 = (0, _react.useState)(false),
|
|
138
|
+
isAnonymous = _useState3[0],
|
|
139
|
+
setIsAnonymous = _useState3[1];
|
|
140
|
+
|
|
141
|
+
var onChangeAnonymous = function onChangeAnonymous() {
|
|
142
|
+
setIsAnonymous(!isAnonymous);
|
|
143
|
+
if (!isAnonymous) {
|
|
144
|
+
setUser('');
|
|
145
|
+
setPassword('');
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
var canSubmit = isAnonymous || !(0, _ramda.isEmpty)(user) && !(0, _ramda.isEmpty)(password);
|
|
150
|
+
|
|
151
|
+
var onClickSubmit = function onClickSubmit() {
|
|
152
|
+
return onSubmit({ user: user, password: password, isAnonymous: isAnonymous });
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
return _react2.default.createElement(
|
|
156
|
+
_Dialog2.default,
|
|
157
|
+
{ open: isOpen, onClose: onClose },
|
|
158
|
+
_react2.default.createElement(
|
|
159
|
+
'div',
|
|
160
|
+
{ className: classes.header },
|
|
161
|
+
_react2.default.createElement(
|
|
162
|
+
'div',
|
|
163
|
+
{ className: classes.headerLabel },
|
|
164
|
+
_react2.default.createElement(_Person2.default, null),
|
|
165
|
+
_react2.default.createElement(
|
|
166
|
+
_Typography2.default,
|
|
167
|
+
null,
|
|
168
|
+
labels.header
|
|
169
|
+
)
|
|
170
|
+
),
|
|
171
|
+
_react2.default.createElement(
|
|
172
|
+
_IconButton2.default,
|
|
173
|
+
{ className: classes.closeButton, onClick: onClose },
|
|
174
|
+
_react2.default.createElement(_Close2.default, null)
|
|
175
|
+
)
|
|
176
|
+
),
|
|
177
|
+
_react2.default.createElement(
|
|
178
|
+
'div',
|
|
179
|
+
{ className: classes.content },
|
|
180
|
+
labels.user,
|
|
181
|
+
_react2.default.createElement(_TextField2.default, {
|
|
182
|
+
inputProps: { className: classes.input },
|
|
183
|
+
value: user,
|
|
184
|
+
onChange: function onChange(e) {
|
|
185
|
+
return setUser(e.target.value);
|
|
186
|
+
},
|
|
187
|
+
disabled: isAnonymous
|
|
188
|
+
}),
|
|
189
|
+
labels.password,
|
|
190
|
+
_react2.default.createElement(_TextField2.default, {
|
|
191
|
+
inputProps: { className: classes.input },
|
|
192
|
+
value: password,
|
|
193
|
+
onChange: function onChange(e) {
|
|
194
|
+
return setPassword(e.target.value);
|
|
195
|
+
},
|
|
196
|
+
disabled: isAnonymous,
|
|
197
|
+
type: 'password'
|
|
198
|
+
}),
|
|
199
|
+
_react2.default.createElement(
|
|
200
|
+
'div',
|
|
201
|
+
null,
|
|
202
|
+
_react2.default.createElement(_Checkbox2.default, { checked: isAnonymous, onChange: onChangeAnonymous }),
|
|
203
|
+
labels.anonymous
|
|
204
|
+
),
|
|
205
|
+
labels.error && _react2.default.createElement(
|
|
206
|
+
'div',
|
|
207
|
+
{ className: classes.error },
|
|
208
|
+
labels.error
|
|
209
|
+
),
|
|
210
|
+
_react2.default.createElement(
|
|
211
|
+
_Button2.default,
|
|
212
|
+
{ color: 'primary', disabled: !canSubmit, onClick: onClickSubmit, variant: 'contained' },
|
|
213
|
+
_react2.default.createElement(
|
|
214
|
+
'div',
|
|
215
|
+
{ style: { width: '100%' } },
|
|
216
|
+
labels.submit
|
|
217
|
+
)
|
|
218
|
+
)
|
|
219
|
+
)
|
|
220
|
+
);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
AuthDialog.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
224
|
+
isOpen: _propTypes2.default.bool,
|
|
225
|
+
labels: _propTypes2.default.shape({
|
|
226
|
+
anonymous: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.node]),
|
|
227
|
+
error: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.node]),
|
|
228
|
+
header: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.node]),
|
|
229
|
+
password: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.node]),
|
|
230
|
+
user: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.node]),
|
|
231
|
+
submit: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.node])
|
|
232
|
+
}),
|
|
233
|
+
onClose: _propTypes2.default.func.isRequired,
|
|
234
|
+
onSubmit: _propTypes2.default.func.isRequired
|
|
235
|
+
} : {};
|
|
236
|
+
|
|
237
|
+
exports.default = AuthDialog;
|
|
238
|
+
module.exports = exports['default'];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
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 _SvgIcon = require('@material-ui/core/SvgIcon');
|
|
12
|
+
|
|
13
|
+
var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
|
|
17
|
+
exports.default = function (props) {
|
|
18
|
+
return _react2.default.createElement(
|
|
19
|
+
_SvgIcon2.default,
|
|
20
|
+
_extends({ viewBox: '0 0 24 24' }, props),
|
|
21
|
+
_react2.default.createElement('path', { d: 'M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z' })
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
module.exports = exports['default'];
|
package/lib/Icons/index.js
CHANGED
|
@@ -143,4 +143,13 @@ Object.defineProperty(exports, 'Warning', {
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
+
var _CopyContent = require('./CopyContent');
|
|
147
|
+
|
|
148
|
+
Object.defineProperty(exports, 'CopyContent', {
|
|
149
|
+
enumerable: true,
|
|
150
|
+
get: function get() {
|
|
151
|
+
return _interopRequireDefault(_CopyContent).default;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
146
155
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -88,6 +88,9 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
88
88
|
topCell: {
|
|
89
89
|
paddingTop: 0
|
|
90
90
|
},
|
|
91
|
+
hierarchySpace: {
|
|
92
|
+
marginBottom: 'auto'
|
|
93
|
+
},
|
|
91
94
|
highlight: theme.mixins.table.cellHighlight
|
|
92
95
|
};
|
|
93
96
|
});
|
|
@@ -155,10 +158,14 @@ var Section = function Section(_ref) {
|
|
|
155
158
|
_react2.default.createElement(
|
|
156
159
|
'div',
|
|
157
160
|
{ className: classes.cellContent },
|
|
161
|
+
!R.isEmpty(hierarchySpace) && _react2.default.createElement(
|
|
162
|
+
'div',
|
|
163
|
+
{ className: classes.hierarchySpace },
|
|
164
|
+
hierarchySpace
|
|
165
|
+
),
|
|
158
166
|
_react2.default.createElement(
|
|
159
167
|
_Typography2.default,
|
|
160
168
|
{ variant: 'body1', tabIndex: 0 },
|
|
161
|
-
hierarchySpace,
|
|
162
169
|
R.path(['value', 'label'], cell),
|
|
163
170
|
_react2.default.createElement(_flags2.default, { flags: flags })
|
|
164
171
|
)
|
package/lib/TableLayout/lib.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.addHiddenElement = exports.rejectHiddenElement = exports.changeLayout =
|
|
4
|
+
exports.addHiddenElement = exports.rejectHiddenElement = exports.changeLayout = undefined;
|
|
5
5
|
|
|
6
6
|
var _ramda = require('ramda');
|
|
7
7
|
|
|
@@ -9,15 +9,6 @@ var R = _interopRequireWildcard(_ramda);
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
11
11
|
|
|
12
|
-
var swap = exports.swap = R.curry(function (index1, index2, list) {
|
|
13
|
-
if (index1 < 0 || index2 < 0 || index1 > list.length - 1 || index2 > list.length - 1) {
|
|
14
|
-
return list; // index out of bound
|
|
15
|
-
}
|
|
16
|
-
var value1 = list[index1];
|
|
17
|
-
var value2 = list[index2];
|
|
18
|
-
return R.pipe(R.set(R.lensIndex(index1), value2), R.set(R.lensIndex(index2), value1))(list);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
12
|
var changeLayout = exports.changeLayout = function changeLayout(_ref) {
|
|
22
13
|
var dragIndex = _ref.dragIndex,
|
|
23
14
|
hoverIndex = _ref.hoverIndex,
|
|
@@ -26,8 +17,7 @@ var changeLayout = exports.changeLayout = function changeLayout(_ref) {
|
|
|
26
17
|
currentLayout = _ref.currentLayout;
|
|
27
18
|
|
|
28
19
|
if (R.equals(dragZone, dropZone)) {
|
|
29
|
-
|
|
30
|
-
return R.over(R.lensProp(dropZone), swap(dragIndex, hoverIndex), currentLayout);
|
|
20
|
+
return R.over(R.lensProp(dropZone), R.move(dragIndex, hoverIndex), currentLayout);
|
|
31
21
|
}
|
|
32
22
|
var item = R.pipe(R.prop(dragZone), R.nth(dragIndex))(currentLayout);
|
|
33
23
|
return R.pipe(R.over(R.lensProp(dragZone), R.without([item])), R.over(R.lensProp(dropZone), R.insert(hoverIndex, item)))(currentLayout);
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.T4_BREAKPOINTS = exports.innerPalette = exports.sisccTheme = exports.VerticalButton = exports.Tooltip = exports.ToggleButton = exports.Tag = exports.TablePreview = exports.TableLayout = exports.Cell = exports.TableHtml5 = exports.TableHeader = exports.TableFooter = exports.Table = exports.Spotlight = exports.SisccFooter = exports.Share = exports.Select = exports.ScopeList = exports.reduceChildren = exports.spotlightScopeListEngine = exports.PeriodPicker = exports.Pagination = exports.NoData = exports.Logo = exports.Loading = exports.LabelDivider = exports.InputNumber = exports.Input = exports.ExpansionPanel = exports.DataFooter = exports.DataHeader = exports.Dataflow = exports.DataEdit = exports.CollapseButtons = exports.Chips = exports.ChartsConfig = exports.Button = exports.Breadcrumbs = exports.ApiQueries = exports.Alert = undefined;
|
|
4
|
+
exports.T4_BREAKPOINTS = exports.innerPalette = exports.sisccTheme = exports.AuthDialog = exports.VerticalButton = exports.Tooltip = exports.ToggleButton = exports.Tag = exports.TablePreview = exports.TableLayout = exports.Cell = exports.TableHtml5 = exports.TableHeader = exports.TableFooter = exports.Table = exports.Spotlight = exports.SisccFooter = exports.Share = exports.Select = exports.ScopeList = exports.reduceChildren = exports.spotlightScopeListEngine = exports.PeriodPicker = exports.Pagination = exports.NoData = exports.Logo = exports.Loading = exports.LabelDivider = exports.InputNumber = exports.Input = exports.ExpansionPanel = exports.DataFooter = exports.DataHeader = exports.Dataflow = exports.DataEdit = exports.CollapseButtons = exports.Chips = exports.ChartsConfig = exports.Button = exports.Breadcrumbs = exports.ApiQueries = exports.Alert = undefined;
|
|
5
5
|
|
|
6
6
|
var _Alert = require('./Alert');
|
|
7
7
|
|
|
@@ -351,6 +351,15 @@ Object.defineProperty(exports, 'VerticalButton', {
|
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
|
|
354
|
+
var _AuthDialog = require('./AuthDialog');
|
|
355
|
+
|
|
356
|
+
Object.defineProperty(exports, 'AuthDialog', {
|
|
357
|
+
enumerable: true,
|
|
358
|
+
get: function get() {
|
|
359
|
+
return _interopRequireDefault(_AuthDialog).default;
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
|
|
354
363
|
var _theme = require('./theme');
|
|
355
364
|
|
|
356
365
|
Object.defineProperty(exports, 'sisccTheme', {
|
package/lib/theme.js
CHANGED
|
@@ -50,6 +50,16 @@ var sisccTheme = exports.sisccTheme = function sisccTheme(_ref) {
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
overrides: {
|
|
53
|
+
MuiCheckbox: {
|
|
54
|
+
root: {
|
|
55
|
+
color: outerPalette.primaryMain || innerPalette.primaryMain
|
|
56
|
+
},
|
|
57
|
+
colorSecondary: {
|
|
58
|
+
'&$checked': {
|
|
59
|
+
color: outerPalette.primaryMain || innerPalette.primaryMain
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
53
63
|
MuiTableCell: {
|
|
54
64
|
head: {
|
|
55
65
|
lineHeight: 1.43
|