@sis-cc/dotstatsuite-visions 7.17.5 → 7.17.7
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/ApiQueries/Query.js +14 -2
- package/es/Contact/Contact.js +2 -2
- package/lib/ApiQueries/Query.js +13 -1
- package/lib/Contact/Contact.js +2 -2
- package/package.json +1 -1
package/es/ApiQueries/Query.js
CHANGED
|
@@ -5,10 +5,15 @@ import Typography from '@material-ui/core/Typography';
|
|
|
5
5
|
import TextareaAutosize from '@material-ui/core/TextareaAutosize';
|
|
6
6
|
import Grid from '@material-ui/core/Grid';
|
|
7
7
|
import { makeStyles } from '@material-ui/core/styles';
|
|
8
|
-
import { Button } from '../';
|
|
8
|
+
import { Alert, Button } from '../';
|
|
9
9
|
|
|
10
10
|
var useStyles = makeStyles(function (theme) {
|
|
11
11
|
return {
|
|
12
|
+
error: {
|
|
13
|
+
width: '100%',
|
|
14
|
+
margin: '0px 0px 8px 0px',
|
|
15
|
+
wordBreak: 'break-word'
|
|
16
|
+
},
|
|
12
17
|
header: {
|
|
13
18
|
padding: theme.spacing(1, 0),
|
|
14
19
|
minHeight: 50
|
|
@@ -40,6 +45,7 @@ var Query = function Query(_ref) {
|
|
|
40
45
|
setCopied = _React$useState2[1];
|
|
41
46
|
|
|
42
47
|
var contentValue = R.pipe(R.find(R.propEq('id', value)), R.prop('value'))(contents);
|
|
48
|
+
var isError = R.pipe(R.find(R.propEq('id', value)), R.propOr(false, 'isError'))(contents);
|
|
43
49
|
|
|
44
50
|
var copyToClipboard = function copyToClipboard() {
|
|
45
51
|
if (R.has('current')(ref)) {
|
|
@@ -115,7 +121,7 @@ var Query = function Query(_ref) {
|
|
|
115
121
|
React.createElement(
|
|
116
122
|
Grid,
|
|
117
123
|
{ item: true, container: true, xs: 12, style: { alignSelf: 'flex-end' }, justifyContent: 'flex-end' },
|
|
118
|
-
React.createElement(TextareaAutosize, {
|
|
124
|
+
!isError && React.createElement(TextareaAutosize, {
|
|
119
125
|
ref: ref,
|
|
120
126
|
'aria-label': title,
|
|
121
127
|
className: classes.textarea,
|
|
@@ -124,10 +130,16 @@ var Query = function Query(_ref) {
|
|
|
124
130
|
readOnly: true,
|
|
125
131
|
value: contentValue
|
|
126
132
|
}),
|
|
133
|
+
isError && React.createElement(
|
|
134
|
+
Alert,
|
|
135
|
+
{ className: classes.error, severity: 'error', variant: 'filled' },
|
|
136
|
+
contentValue
|
|
137
|
+
),
|
|
127
138
|
React.createElement(
|
|
128
139
|
Button,
|
|
129
140
|
{
|
|
130
141
|
'aria-label': labelActionCopy,
|
|
142
|
+
disabled: isError,
|
|
131
143
|
size: 'small',
|
|
132
144
|
variant: 'contained',
|
|
133
145
|
alternative: 'siscc',
|
package/es/Contact/Contact.js
CHANGED
|
@@ -90,7 +90,7 @@ var Contact = function Contact(_ref) {
|
|
|
90
90
|
setDetailsError = _useState10[1];
|
|
91
91
|
|
|
92
92
|
var checkEmail = function checkEmail(email) {
|
|
93
|
-
if (getIsValidEmail(email)) {
|
|
93
|
+
if (getIsValidEmail(email) && R.test(/^\S+@\S+\.\S+$/, email)) {
|
|
94
94
|
return setEmailError(false);
|
|
95
95
|
}
|
|
96
96
|
return setEmailError(true);
|
|
@@ -253,7 +253,7 @@ var Contact = function Contact(_ref) {
|
|
|
253
253
|
control: React.createElement(Checkbox, { name: 'checkedB', color: 'primary' }),
|
|
254
254
|
label: React.createElement(
|
|
255
255
|
Typography,
|
|
256
|
-
{ variant: 'h6'
|
|
256
|
+
{ variant: 'h6' },
|
|
257
257
|
R.prop('checkbox')(labels)
|
|
258
258
|
),
|
|
259
259
|
checked: checked,
|
package/lib/ApiQueries/Query.js
CHANGED
|
@@ -36,6 +36,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
36
36
|
|
|
37
37
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
38
38
|
return {
|
|
39
|
+
error: {
|
|
40
|
+
width: '100%',
|
|
41
|
+
margin: '0px 0px 8px 0px',
|
|
42
|
+
wordBreak: 'break-word'
|
|
43
|
+
},
|
|
39
44
|
header: {
|
|
40
45
|
padding: theme.spacing(1, 0),
|
|
41
46
|
minHeight: 50
|
|
@@ -67,6 +72,7 @@ var Query = function Query(_ref) {
|
|
|
67
72
|
setCopied = _React$useState2[1];
|
|
68
73
|
|
|
69
74
|
var contentValue = R.pipe(R.find(R.propEq('id', value)), R.prop('value'))(contents);
|
|
75
|
+
var isError = R.pipe(R.find(R.propEq('id', value)), R.propOr(false, 'isError'))(contents);
|
|
70
76
|
|
|
71
77
|
var copyToClipboard = function copyToClipboard() {
|
|
72
78
|
if (R.has('current')(ref)) {
|
|
@@ -142,7 +148,7 @@ var Query = function Query(_ref) {
|
|
|
142
148
|
_react2.default.createElement(
|
|
143
149
|
_Grid2.default,
|
|
144
150
|
{ item: true, container: true, xs: 12, style: { alignSelf: 'flex-end' }, justifyContent: 'flex-end' },
|
|
145
|
-
_react2.default.createElement(_TextareaAutosize2.default, {
|
|
151
|
+
!isError && _react2.default.createElement(_TextareaAutosize2.default, {
|
|
146
152
|
ref: ref,
|
|
147
153
|
'aria-label': title,
|
|
148
154
|
className: classes.textarea,
|
|
@@ -151,10 +157,16 @@ var Query = function Query(_ref) {
|
|
|
151
157
|
readOnly: true,
|
|
152
158
|
value: contentValue
|
|
153
159
|
}),
|
|
160
|
+
isError && _react2.default.createElement(
|
|
161
|
+
_.Alert,
|
|
162
|
+
{ className: classes.error, severity: 'error', variant: 'filled' },
|
|
163
|
+
contentValue
|
|
164
|
+
),
|
|
154
165
|
_react2.default.createElement(
|
|
155
166
|
_.Button,
|
|
156
167
|
{
|
|
157
168
|
'aria-label': labelActionCopy,
|
|
169
|
+
disabled: isError,
|
|
158
170
|
size: 'small',
|
|
159
171
|
variant: 'contained',
|
|
160
172
|
alternative: 'siscc',
|
package/lib/Contact/Contact.js
CHANGED
|
@@ -119,7 +119,7 @@ var Contact = function Contact(_ref) {
|
|
|
119
119
|
setDetailsError = _useState10[1];
|
|
120
120
|
|
|
121
121
|
var checkEmail = function checkEmail(email) {
|
|
122
|
-
if ((0, _isemail.validate)(email)) {
|
|
122
|
+
if ((0, _isemail.validate)(email) && R.test(/^\S+@\S+\.\S+$/, email)) {
|
|
123
123
|
return setEmailError(false);
|
|
124
124
|
}
|
|
125
125
|
return setEmailError(true);
|
|
@@ -282,7 +282,7 @@ var Contact = function Contact(_ref) {
|
|
|
282
282
|
control: _react2.default.createElement(_core.Checkbox, { name: 'checkedB', color: 'primary' }),
|
|
283
283
|
label: _react2.default.createElement(
|
|
284
284
|
_core.Typography,
|
|
285
|
-
{ variant: 'h6'
|
|
285
|
+
{ variant: 'h6' },
|
|
286
286
|
R.prop('checkbox')(labels)
|
|
287
287
|
),
|
|
288
288
|
checked: checked,
|