@sis-cc/dotstatsuite-visions 7.17.4 → 7.17.6
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
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',
|
|
@@ -1,12 +1,9 @@
|
|
|
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
1
|
import React, { Fragment } from 'react';
|
|
4
2
|
import * as R from 'ramda';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
6
4
|
import cx from 'classnames';
|
|
7
5
|
import Typography from '@material-ui/core/Typography';
|
|
8
6
|
import { makeStyles } from '@material-ui/core/styles';
|
|
9
|
-
import Lens from '@material-ui/icons/Lens';
|
|
10
7
|
import TableCell from '@material-ui/core/TableCell';
|
|
11
8
|
import TableRow from '@material-ui/core/TableRow';
|
|
12
9
|
import Flags from './flags';
|
|
@@ -24,10 +21,6 @@ var useStyles = makeStyles(function (theme) {
|
|
|
24
21
|
verticalAlign: 'middle',
|
|
25
22
|
whiteSpace: 'nowrap'
|
|
26
23
|
},
|
|
27
|
-
lens: _extends({}, theme.mixins.table.dot, {
|
|
28
|
-
marginLeft: theme.spacing(1),
|
|
29
|
-
marginRight: theme.spacing(1)
|
|
30
|
-
}),
|
|
31
24
|
label: {
|
|
32
25
|
fontStyle: 'italic',
|
|
33
26
|
fontWeight: 'bold',
|
|
@@ -97,7 +90,7 @@ var SectionHeader = function SectionHeader(_ref) {
|
|
|
97
90
|
return React.createElement(
|
|
98
91
|
Fragment,
|
|
99
92
|
{ key: index },
|
|
100
|
-
index !== 0 && React.createElement(
|
|
93
|
+
index !== 0 && React.createElement('br', null),
|
|
101
94
|
React.createElement(
|
|
102
95
|
Typography,
|
|
103
96
|
{
|
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',
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
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
5
|
var _react = require('react');
|
|
8
6
|
|
|
9
7
|
var _react2 = _interopRequireDefault(_react);
|
|
@@ -26,10 +24,6 @@ var _Typography2 = _interopRequireDefault(_Typography);
|
|
|
26
24
|
|
|
27
25
|
var _styles = require('@material-ui/core/styles');
|
|
28
26
|
|
|
29
|
-
var _Lens = require('@material-ui/icons/Lens');
|
|
30
|
-
|
|
31
|
-
var _Lens2 = _interopRequireDefault(_Lens);
|
|
32
|
-
|
|
33
27
|
var _TableCell = require('@material-ui/core/TableCell');
|
|
34
28
|
|
|
35
29
|
var _TableCell2 = _interopRequireDefault(_TableCell);
|
|
@@ -60,10 +54,6 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
60
54
|
verticalAlign: 'middle',
|
|
61
55
|
whiteSpace: 'nowrap'
|
|
62
56
|
},
|
|
63
|
-
lens: _extends({}, theme.mixins.table.dot, {
|
|
64
|
-
marginLeft: theme.spacing(1),
|
|
65
|
-
marginRight: theme.spacing(1)
|
|
66
|
-
}),
|
|
67
57
|
label: {
|
|
68
58
|
fontStyle: 'italic',
|
|
69
59
|
fontWeight: 'bold',
|
|
@@ -133,7 +123,7 @@ var SectionHeader = function SectionHeader(_ref) {
|
|
|
133
123
|
return _react2.default.createElement(
|
|
134
124
|
_react.Fragment,
|
|
135
125
|
{ key: index },
|
|
136
|
-
index !== 0 && _react2.default.createElement(
|
|
126
|
+
index !== 0 && _react2.default.createElement('br', null),
|
|
137
127
|
_react2.default.createElement(
|
|
138
128
|
_Typography2.default,
|
|
139
129
|
{
|