@bento-core/query-bar 1.0.1-icdc.7 → 1.0.1-icdc.9
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/README.md +15 -0
- package/dist/components/QueryUrl.js +70 -11
- package/dist/generators/QueryBarGenerator.js +1 -1
- package/dist/generators/config.js +2 -2
- package/dist/generators/styles.js +86 -5
- package/package.json +2 -3
- package/src/components/QueryUrl.js +116 -33
- package/src/generators/QueryBarGenerator.js +1 -1
- package/src/generators/config.js +2 -2
- package/src/generators/styles.js +84 -3
package/README.md
CHANGED
|
@@ -68,6 +68,20 @@ const CONFIG = {
|
|
|
68
68
|
* @var {boolean}
|
|
69
69
|
*/
|
|
70
70
|
group: 'group',
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* root path of bento app {window.location.href} or react PUBLIC_URL
|
|
74
|
+
* PR (https://github.com/CBIIT/bento-icdc-frontend/pull/953)
|
|
75
|
+
* @var {string}
|
|
76
|
+
*/
|
|
77
|
+
rootPath: null,
|
|
78
|
+
/**
|
|
79
|
+
* display query URL
|
|
80
|
+
* @var {boolean}
|
|
81
|
+
* PR (https://github.com/CBIIT/bento-icdc-frontend/pull/953)
|
|
82
|
+
*/
|
|
83
|
+
viewQueryURL: false,
|
|
84
|
+
|
|
71
85
|
},
|
|
72
86
|
|
|
73
87
|
/* Component Helper Functions */
|
|
@@ -125,6 +139,7 @@ const CONFIG = {
|
|
|
125
139
|
* @returns {void}
|
|
126
140
|
*/
|
|
127
141
|
resetFacetSlider: (section) => {},
|
|
142
|
+
|
|
128
143
|
},
|
|
129
144
|
};
|
|
130
145
|
```
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
9
|
var _core = require("@material-ui/core");
|
|
9
10
|
var _CopyIcon = _interopRequireDefault(require("../assets/CopyIcon.svg"));
|
|
10
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -15,15 +16,55 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
15
16
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
17
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
17
18
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
18
|
-
const
|
|
19
|
+
const ViewFullLinkComponent = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
classes,
|
|
22
|
+
url,
|
|
23
|
+
maxWidth = 1200
|
|
24
|
+
} = _ref;
|
|
25
|
+
const linkRef = (0, _react.useRef)(null);
|
|
26
|
+
const [expandLink, setExpand] = (0, _react.useState)(false);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Compute url link width based on the windowsize
|
|
30
|
+
*/
|
|
31
|
+
(0, _react.useEffect)(() => {
|
|
32
|
+
var _linkRef$current;
|
|
33
|
+
const urlWidth = linkRef === null || linkRef === void 0 ? void 0 : (_linkRef$current = linkRef.current) === null || _linkRef$current === void 0 ? void 0 : _linkRef$current.offsetWidth;
|
|
34
|
+
if (urlWidth > maxWidth / 2) {
|
|
35
|
+
setExpand(true);
|
|
36
|
+
}
|
|
37
|
+
}, []);
|
|
38
|
+
const expandUrl = () => {
|
|
39
|
+
setExpand(!expandLink);
|
|
40
|
+
};
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
42
|
+
ref: linkRef,
|
|
43
|
+
className: classes.link
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
45
|
+
className: (0, _clsx.default)(classes.viewLink, {
|
|
46
|
+
[classes.collapseLink]: expandLink
|
|
47
|
+
})
|
|
48
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
49
|
+
className: classes.urlView
|
|
50
|
+
}, url), expandLink && /*#__PURE__*/_react.default.createElement("span", {
|
|
51
|
+
className: classes.expandLinkBtn,
|
|
52
|
+
type: "button",
|
|
53
|
+
onClick: expandUrl
|
|
54
|
+
}, "..."))));
|
|
55
|
+
};
|
|
56
|
+
const QueryUrl = _ref2 => {
|
|
57
|
+
var _queryRef$current;
|
|
19
58
|
let {
|
|
20
59
|
classes,
|
|
21
60
|
filterItems,
|
|
22
61
|
localFind,
|
|
23
62
|
rootPath
|
|
24
|
-
} =
|
|
63
|
+
} = _ref2;
|
|
64
|
+
const [display, setDisplay] = (0, _react.useState)(false);
|
|
65
|
+
const toggleDisplay = () => setDisplay(!display);
|
|
25
66
|
const [expand, setExpand] = (0, _react.useState)(false);
|
|
26
|
-
const
|
|
67
|
+
const [open, toggleOpen] = (0, _react.useState)(false);
|
|
27
68
|
const {
|
|
28
69
|
autocomplete = [],
|
|
29
70
|
upload
|
|
@@ -42,18 +83,25 @@ const QueryUrl = _ref => {
|
|
|
42
83
|
}));
|
|
43
84
|
const url = encodeURI(rootPath.concat(query));
|
|
44
85
|
const copyUrl = async () => {
|
|
86
|
+
toggleOpen(!open);
|
|
45
87
|
await navigator.clipboard.writeText(url);
|
|
46
88
|
};
|
|
47
|
-
|
|
89
|
+
const queryRef = (0, _react.useRef)(null);
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
91
|
+
ref: queryRef,
|
|
48
92
|
className: classes.urlContainer
|
|
49
93
|
}, /*#__PURE__*/_react.default.createElement(_core.Button, {
|
|
50
|
-
onClick:
|
|
94
|
+
onClick: toggleDisplay,
|
|
51
95
|
className: classes.viewLinkToggleBtn
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
className: classes.link
|
|
56
|
-
},
|
|
96
|
+
}, display ? 'Hide Query URL' : 'Show Query URL'), display && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, expand ? /*#__PURE__*/_react.default.createElement("span", {
|
|
97
|
+
type: "button",
|
|
98
|
+
onClick: () => setExpand(!expand),
|
|
99
|
+
className: (0, _clsx.default)(classes.link, classes.viewLink, classes.expandLink)
|
|
100
|
+
}, url) : /*#__PURE__*/_react.default.createElement(ViewFullLinkComponent, {
|
|
101
|
+
url: url,
|
|
102
|
+
classes: classes,
|
|
103
|
+
maxWidth: queryRef === null || queryRef === void 0 ? void 0 : (_queryRef$current = queryRef.current) === null || _queryRef$current === void 0 ? void 0 : _queryRef$current.offsetWidth
|
|
104
|
+
}), /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
57
105
|
arrow: true,
|
|
58
106
|
title: "Copy to Clipboard"
|
|
59
107
|
}, /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
@@ -62,7 +110,18 @@ const QueryUrl = _ref => {
|
|
|
62
110
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
63
111
|
src: _CopyIcon.default,
|
|
64
112
|
alt: "copy icon"
|
|
65
|
-
})))))
|
|
113
|
+
}))))), /*#__PURE__*/_react.default.createElement(_core.Dialog, {
|
|
114
|
+
open: open,
|
|
115
|
+
"aria-labelledby": "alert-dialog-title",
|
|
116
|
+
"aria-describedby": "alert-dialog-description",
|
|
117
|
+
className: classes.dialogBox
|
|
118
|
+
}, /*#__PURE__*/_react.default.createElement(_core.DialogContent, {
|
|
119
|
+
className: classes.okText
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement(_core.DialogContentText, {
|
|
121
|
+
id: "alert-dialog-description"
|
|
122
|
+
}, "Your query URL has been copied!")), /*#__PURE__*/_react.default.createElement(_core.DialogActions, null, /*#__PURE__*/_react.default.createElement(_core.Button, {
|
|
123
|
+
onClick: () => toggleOpen(!open)
|
|
124
|
+
}, "OK"))));
|
|
66
125
|
};
|
|
67
126
|
var _default = QueryUrl;
|
|
68
127
|
exports.default = _default;
|
|
@@ -125,7 +125,7 @@ const QueryBarGenerator = function QueryBarGenerator() {
|
|
|
125
125
|
}, "INPUT CASE SET") : null, autocomplete.length ? /*#__PURE__*/_react.default.createElement("span", null, ' ', /*#__PURE__*/_react.default.createElement("span", {
|
|
126
126
|
className: (0, _clsx.default)(classes.filterName, classes.localFindBackground),
|
|
127
127
|
onClick: clearAutocomplete
|
|
128
|
-
}, "Case
|
|
128
|
+
}, "Case ID"), ' ', ' ', /*#__PURE__*/_react.default.createElement("span", {
|
|
129
129
|
className: classes.operators
|
|
130
130
|
}, autocomplete.length === 1 && !upload.length ? 'IS ' : 'IN ')) : null, /*#__PURE__*/_react.default.createElement("span", null, (upload.length > 0 ? 1 : 0) + autocomplete.length > 1 ? /*#__PURE__*/_react.default.createElement("span", {
|
|
131
131
|
className: classes.bracketsOpen
|
|
@@ -27,12 +27,12 @@ var _default = {
|
|
|
27
27
|
* root path of bento app
|
|
28
28
|
* @var {boolean}
|
|
29
29
|
*/
|
|
30
|
-
rootPath:
|
|
30
|
+
rootPath: 'http://localhost:3010/',
|
|
31
31
|
/**
|
|
32
32
|
* display query URL
|
|
33
33
|
* @var {boolean}
|
|
34
34
|
*/
|
|
35
|
-
viewQueryURL:
|
|
35
|
+
viewQueryURL: true
|
|
36
36
|
},
|
|
37
37
|
/* Component Helper Functions */
|
|
38
38
|
functions: {
|
|
@@ -121,23 +121,48 @@ var _default = () => ({
|
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
urlContainer: {
|
|
124
|
-
marginTop: '10px'
|
|
124
|
+
marginTop: '10px',
|
|
125
|
+
minHeight: '10px',
|
|
126
|
+
marginBottom: '10px'
|
|
125
127
|
},
|
|
126
128
|
link: {
|
|
127
129
|
lineBreak: 'anywhere',
|
|
130
|
+
overflow: 'hidden',
|
|
128
131
|
fontFamily: 'Nunito',
|
|
129
132
|
fontSize: '12px',
|
|
130
133
|
fontWeight: '500',
|
|
131
134
|
lineHeight: '16px',
|
|
132
135
|
letterSpacing: '0em',
|
|
133
|
-
color: '#1D79A8',
|
|
134
|
-
backgroundColor: '#fff',
|
|
135
136
|
padding: '5px',
|
|
136
137
|
borderRadius: '5px',
|
|
137
|
-
|
|
138
|
+
float: 'left',
|
|
139
|
+
color: '#1D79A8',
|
|
140
|
+
backgroundColor: '#fff',
|
|
141
|
+
maxWidth: '80%'
|
|
142
|
+
},
|
|
143
|
+
viewLink: {
|
|
144
|
+
margin: '0'
|
|
145
|
+
},
|
|
146
|
+
collapseLink: {
|
|
147
|
+
maxHeight: '1em',
|
|
148
|
+
display: 'block',
|
|
149
|
+
// display: '-webkit-box',
|
|
150
|
+
'-webkit-box-orient': 'vertical',
|
|
151
|
+
'-webkit-line-clamp': '1',
|
|
152
|
+
overflow: 'hidden'
|
|
153
|
+
},
|
|
154
|
+
expandLink: {
|
|
155
|
+
cursor: 'pointer'
|
|
156
|
+
},
|
|
157
|
+
expandLinkBtn: {
|
|
158
|
+
float: 'left',
|
|
159
|
+
'&:hover': {
|
|
160
|
+
cursor: 'pointer'
|
|
161
|
+
}
|
|
138
162
|
},
|
|
139
163
|
viewLinkToggleBtn: {
|
|
140
164
|
height: '20px',
|
|
165
|
+
marginRight: '10px',
|
|
141
166
|
fontFamily: 'Nunito',
|
|
142
167
|
fontSize: '12px',
|
|
143
168
|
fontWeight: '500',
|
|
@@ -147,14 +172,70 @@ var _default = () => ({
|
|
|
147
172
|
backgroundColor: '#1D79A8',
|
|
148
173
|
textTransform: 'none',
|
|
149
174
|
color: '#fff',
|
|
175
|
+
float: 'left',
|
|
150
176
|
'&:hover': {
|
|
151
177
|
backgroundColor: '#1D79A8',
|
|
152
178
|
color: '#fff'
|
|
153
179
|
}
|
|
154
180
|
},
|
|
181
|
+
urlView: {
|
|
182
|
+
float: 'left',
|
|
183
|
+
width: 'calc(100% - 13px)',
|
|
184
|
+
minWidth: '840px',
|
|
185
|
+
'@media (max-width: 2560px)': {
|
|
186
|
+
maxWidth: '1800px'
|
|
187
|
+
},
|
|
188
|
+
'@media (max-width: 2000px)': {
|
|
189
|
+
maxWidth: '1400px'
|
|
190
|
+
},
|
|
191
|
+
'@media (max-width: 1600px)': {
|
|
192
|
+
maxWidth: '1200px'
|
|
193
|
+
},
|
|
194
|
+
'@media (max-width: 1300px)': {
|
|
195
|
+
maxWidth: '1050px'
|
|
196
|
+
}
|
|
197
|
+
},
|
|
155
198
|
copyIconBtn: {
|
|
156
199
|
padding: '0px',
|
|
157
|
-
marginLeft: '10px'
|
|
200
|
+
marginLeft: '10px',
|
|
201
|
+
float: 'left'
|
|
202
|
+
},
|
|
203
|
+
dialogBox: {
|
|
204
|
+
'& div.MuiBackdrop-root': {
|
|
205
|
+
backgroundColor: 'rgba(0, 0, 0, 0.2)'
|
|
206
|
+
},
|
|
207
|
+
'& div.MuiPaper-root': {
|
|
208
|
+
borderRadius: '20px',
|
|
209
|
+
border: '2px solid #1D79A8',
|
|
210
|
+
width: '430px',
|
|
211
|
+
backgroundColor: '#E8EFEF',
|
|
212
|
+
padding: '20px 0px 30px 0px',
|
|
213
|
+
'& .MuiDialogContent-root': {
|
|
214
|
+
fontFamily: 'Nunito',
|
|
215
|
+
fontSize: '14px',
|
|
216
|
+
fontWeight: '600',
|
|
217
|
+
lineHeight: '20px',
|
|
218
|
+
textAlign: 'center',
|
|
219
|
+
'& .MuiTypography-colorTextSecondary': {
|
|
220
|
+
color: '#000000'
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
'& .MuiDialogActions-root': {
|
|
224
|
+
'& button': {
|
|
225
|
+
width: '125px',
|
|
226
|
+
height: '38px',
|
|
227
|
+
borderRadius: '8px',
|
|
228
|
+
border: '1px solid #1A8CCB',
|
|
229
|
+
backgroundColor: '#1A8CCB',
|
|
230
|
+
color: '#fff',
|
|
231
|
+
fontFamily: 'Lato',
|
|
232
|
+
fontSize: '16px',
|
|
233
|
+
fontWeight: '400',
|
|
234
|
+
lineHeight: '16px',
|
|
235
|
+
margin: 'auto'
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
158
239
|
}
|
|
159
240
|
});
|
|
160
241
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bento-core/query-bar",
|
|
3
|
-
"version": "1.0.1-icdc.
|
|
3
|
+
"version": "1.0.1-icdc.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"clsx": "^1.2.1",
|
|
18
18
|
"react": "^17.0.2",
|
|
19
19
|
"react-dom": "^17.0.0",
|
|
20
|
-
"react-redux": "^7.2.1"
|
|
21
|
-
"@material-ui/icons": "^4.11.3"
|
|
20
|
+
"react-redux": "^7.2.1"
|
|
22
21
|
},
|
|
23
22
|
"dependencies": {
|
|
24
23
|
"@bento-core/facet-filter": "^1.0.0",
|
|
@@ -1,20 +1,75 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
2
3
|
import {
|
|
3
4
|
Button,
|
|
4
5
|
IconButton,
|
|
5
|
-
Link,
|
|
6
6
|
Tooltip,
|
|
7
|
+
Dialog,
|
|
8
|
+
DialogActions,
|
|
9
|
+
DialogContent,
|
|
10
|
+
DialogContentText,
|
|
7
11
|
} from '@material-ui/core';
|
|
8
12
|
import CopyIcon from '../assets/CopyIcon.svg';
|
|
9
13
|
|
|
14
|
+
const ViewFullLinkComponent = ({
|
|
15
|
+
classes,
|
|
16
|
+
url,
|
|
17
|
+
maxWidth = 1200,
|
|
18
|
+
}) => {
|
|
19
|
+
const linkRef = useRef(null);
|
|
20
|
+
const [expandLink, setExpand] = useState(false);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Compute url link width based on the windowsize
|
|
24
|
+
*/
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const urlWidth = linkRef?.current?.offsetWidth;
|
|
27
|
+
if (urlWidth > maxWidth / 2) {
|
|
28
|
+
setExpand(true);
|
|
29
|
+
}
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
32
|
+
const expandUrl = () => {
|
|
33
|
+
setExpand(!expandLink);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
<span ref={linkRef} className={classes.link}>
|
|
39
|
+
<span
|
|
40
|
+
className={clsx(classes.viewLink,
|
|
41
|
+
{ [classes.collapseLink]: expandLink })}
|
|
42
|
+
>
|
|
43
|
+
<span className={classes.urlView}>
|
|
44
|
+
{url}
|
|
45
|
+
</span>
|
|
46
|
+
{(expandLink) && (
|
|
47
|
+
<span
|
|
48
|
+
className={classes.expandLinkBtn}
|
|
49
|
+
type="button"
|
|
50
|
+
onClick={expandUrl}
|
|
51
|
+
>
|
|
52
|
+
...
|
|
53
|
+
</span>
|
|
54
|
+
)}
|
|
55
|
+
</span>
|
|
56
|
+
</span>
|
|
57
|
+
</>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
10
61
|
const QueryUrl = ({
|
|
11
62
|
classes,
|
|
12
63
|
filterItems,
|
|
13
64
|
localFind,
|
|
14
65
|
rootPath,
|
|
15
66
|
}) => {
|
|
67
|
+
const [display, setDisplay] = useState(false);
|
|
68
|
+
const toggleDisplay = () => setDisplay(!display);
|
|
69
|
+
|
|
16
70
|
const [expand, setExpand] = useState(false);
|
|
17
|
-
|
|
71
|
+
|
|
72
|
+
const [open, toggleOpen] = useState(false);
|
|
18
73
|
|
|
19
74
|
const { autocomplete = [], upload } = localFind;
|
|
20
75
|
|
|
@@ -32,41 +87,69 @@ const QueryUrl = ({
|
|
|
32
87
|
const url = encodeURI(rootPath.concat(query));
|
|
33
88
|
|
|
34
89
|
const copyUrl = async () => {
|
|
90
|
+
toggleOpen(!open);
|
|
35
91
|
await navigator.clipboard.writeText(url);
|
|
36
92
|
};
|
|
37
93
|
|
|
94
|
+
const queryRef = useRef(null);
|
|
95
|
+
|
|
38
96
|
return (
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
97
|
+
<>
|
|
98
|
+
<div ref={queryRef} className={classes.urlContainer}>
|
|
99
|
+
<Button
|
|
100
|
+
onClick={toggleDisplay}
|
|
101
|
+
className={classes.viewLinkToggleBtn}
|
|
102
|
+
>
|
|
103
|
+
{ (display) ? 'Hide Query URL' : 'Show Query URL'}
|
|
104
|
+
</Button>
|
|
105
|
+
{
|
|
106
|
+
(display) && (
|
|
107
|
+
<>
|
|
108
|
+
{(expand) ? (
|
|
109
|
+
<span
|
|
110
|
+
type="button"
|
|
111
|
+
onClick={() => setExpand(!expand)}
|
|
112
|
+
className={clsx(classes.link, classes.viewLink, classes.expandLink)}
|
|
113
|
+
>
|
|
114
|
+
{url}
|
|
115
|
+
</span>
|
|
116
|
+
) : (
|
|
117
|
+
<ViewFullLinkComponent
|
|
118
|
+
url={url}
|
|
119
|
+
classes={classes}
|
|
120
|
+
maxWidth={queryRef?.current?.offsetWidth}
|
|
121
|
+
/>
|
|
122
|
+
)}
|
|
123
|
+
<Tooltip
|
|
124
|
+
arrow
|
|
125
|
+
title="Copy to Clipboard"
|
|
126
|
+
>
|
|
127
|
+
<IconButton onClick={copyUrl} className={classes.copyIconBtn}>
|
|
128
|
+
<img src={CopyIcon} alt="copy icon" />
|
|
129
|
+
</IconButton>
|
|
130
|
+
</Tooltip>
|
|
131
|
+
</>
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
</div>
|
|
135
|
+
<Dialog
|
|
136
|
+
open={open}
|
|
137
|
+
aria-labelledby="alert-dialog-title"
|
|
138
|
+
aria-describedby="alert-dialog-description"
|
|
139
|
+
className={classes.dialogBox}
|
|
43
140
|
>
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</span>
|
|
57
|
-
</Link>
|
|
58
|
-
<Tooltip
|
|
59
|
-
arrow
|
|
60
|
-
title="Copy to Clipboard"
|
|
61
|
-
>
|
|
62
|
-
<IconButton onClick={copyUrl} className={classes.copyIconBtn}>
|
|
63
|
-
<img src={CopyIcon} alt="copy icon" />
|
|
64
|
-
</IconButton>
|
|
65
|
-
</Tooltip>
|
|
66
|
-
</>
|
|
67
|
-
)
|
|
68
|
-
}
|
|
69
|
-
</div>
|
|
141
|
+
<DialogContent className={classes.okText}>
|
|
142
|
+
<DialogContentText id="alert-dialog-description">
|
|
143
|
+
Your query URL has been copied!
|
|
144
|
+
</DialogContentText>
|
|
145
|
+
</DialogContent>
|
|
146
|
+
<DialogActions>
|
|
147
|
+
<Button onClick={() => toggleOpen(!open)}>
|
|
148
|
+
OK
|
|
149
|
+
</Button>
|
|
150
|
+
</DialogActions>
|
|
151
|
+
</Dialog>
|
|
152
|
+
</>
|
|
70
153
|
);
|
|
71
154
|
};
|
|
72
155
|
|
package/src/generators/config.js
CHANGED
|
@@ -21,12 +21,12 @@ export default {
|
|
|
21
21
|
* root path of bento app
|
|
22
22
|
* @var {boolean}
|
|
23
23
|
*/
|
|
24
|
-
rootPath:
|
|
24
|
+
rootPath: 'http://localhost:3010/',
|
|
25
25
|
/**
|
|
26
26
|
* display query URL
|
|
27
27
|
* @var {boolean}
|
|
28
28
|
*/
|
|
29
|
-
viewQueryURL:
|
|
29
|
+
viewQueryURL: true,
|
|
30
30
|
},
|
|
31
31
|
|
|
32
32
|
/* Component Helper Functions */
|
package/src/generators/styles.js
CHANGED
|
@@ -116,22 +116,47 @@ export default () => ({
|
|
|
116
116
|
},
|
|
117
117
|
urlContainer: {
|
|
118
118
|
marginTop: '10px',
|
|
119
|
+
minHeight: '10px',
|
|
120
|
+
marginBottom: '10px',
|
|
119
121
|
},
|
|
120
122
|
link: {
|
|
121
123
|
lineBreak: 'anywhere',
|
|
124
|
+
overflow: 'hidden',
|
|
122
125
|
fontFamily: 'Nunito',
|
|
123
126
|
fontSize: '12px',
|
|
124
127
|
fontWeight: '500',
|
|
125
128
|
lineHeight: '16px',
|
|
126
129
|
letterSpacing: '0em',
|
|
127
|
-
color: '#1D79A8',
|
|
128
|
-
backgroundColor: '#fff',
|
|
129
130
|
padding: '5px',
|
|
130
131
|
borderRadius: '5px',
|
|
131
|
-
|
|
132
|
+
float: 'left',
|
|
133
|
+
color: '#1D79A8',
|
|
134
|
+
backgroundColor: '#fff',
|
|
135
|
+
maxWidth: '80%',
|
|
136
|
+
},
|
|
137
|
+
viewLink: {
|
|
138
|
+
margin: '0',
|
|
139
|
+
},
|
|
140
|
+
collapseLink: {
|
|
141
|
+
maxHeight: '1em',
|
|
142
|
+
display: 'block',
|
|
143
|
+
// display: '-webkit-box',
|
|
144
|
+
'-webkit-box-orient': 'vertical',
|
|
145
|
+
'-webkit-line-clamp': '1',
|
|
146
|
+
overflow: 'hidden',
|
|
147
|
+
},
|
|
148
|
+
expandLink: {
|
|
149
|
+
cursor: 'pointer',
|
|
150
|
+
},
|
|
151
|
+
expandLinkBtn: {
|
|
152
|
+
float: 'left',
|
|
153
|
+
'&:hover': {
|
|
154
|
+
cursor: 'pointer',
|
|
155
|
+
},
|
|
132
156
|
},
|
|
133
157
|
viewLinkToggleBtn: {
|
|
134
158
|
height: '20px',
|
|
159
|
+
marginRight: '10px',
|
|
135
160
|
fontFamily: 'Nunito',
|
|
136
161
|
fontSize: '12px',
|
|
137
162
|
fontWeight: '500',
|
|
@@ -141,13 +166,69 @@ export default () => ({
|
|
|
141
166
|
backgroundColor: '#1D79A8',
|
|
142
167
|
textTransform: 'none',
|
|
143
168
|
color: '#fff',
|
|
169
|
+
float: 'left',
|
|
144
170
|
'&:hover': {
|
|
145
171
|
backgroundColor: '#1D79A8',
|
|
146
172
|
color: '#fff',
|
|
147
173
|
},
|
|
148
174
|
},
|
|
175
|
+
urlView: {
|
|
176
|
+
float: 'left',
|
|
177
|
+
width: 'calc(100% - 13px)',
|
|
178
|
+
minWidth: '840px',
|
|
179
|
+
'@media (max-width: 2560px)': {
|
|
180
|
+
maxWidth: '1800px',
|
|
181
|
+
},
|
|
182
|
+
'@media (max-width: 2000px)': {
|
|
183
|
+
maxWidth: '1400px',
|
|
184
|
+
},
|
|
185
|
+
'@media (max-width: 1600px)': {
|
|
186
|
+
maxWidth: '1200px',
|
|
187
|
+
},
|
|
188
|
+
'@media (max-width: 1300px)': {
|
|
189
|
+
maxWidth: '1050px',
|
|
190
|
+
},
|
|
191
|
+
},
|
|
149
192
|
copyIconBtn: {
|
|
150
193
|
padding: '0px',
|
|
151
194
|
marginLeft: '10px',
|
|
195
|
+
float: 'left',
|
|
196
|
+
},
|
|
197
|
+
dialogBox: {
|
|
198
|
+
'& div.MuiBackdrop-root': {
|
|
199
|
+
backgroundColor: 'rgba(0, 0, 0, 0.2)',
|
|
200
|
+
},
|
|
201
|
+
'& div.MuiPaper-root': {
|
|
202
|
+
borderRadius: '20px',
|
|
203
|
+
border: '2px solid #1D79A8',
|
|
204
|
+
width: '430px',
|
|
205
|
+
backgroundColor: '#E8EFEF',
|
|
206
|
+
padding: '20px 0px 30px 0px',
|
|
207
|
+
'& .MuiDialogContent-root': {
|
|
208
|
+
fontFamily: 'Nunito',
|
|
209
|
+
fontSize: '14px',
|
|
210
|
+
fontWeight: '600',
|
|
211
|
+
lineHeight: '20px',
|
|
212
|
+
textAlign: 'center',
|
|
213
|
+
'& .MuiTypography-colorTextSecondary': {
|
|
214
|
+
color: '#000000',
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
'& .MuiDialogActions-root': {
|
|
218
|
+
'& button': {
|
|
219
|
+
width: '125px',
|
|
220
|
+
height: '38px',
|
|
221
|
+
borderRadius: '8px',
|
|
222
|
+
border: '1px solid #1A8CCB',
|
|
223
|
+
backgroundColor: '#1A8CCB',
|
|
224
|
+
color: '#fff',
|
|
225
|
+
fontFamily: 'Lato',
|
|
226
|
+
fontSize: '16px',
|
|
227
|
+
fontWeight: '400',
|
|
228
|
+
lineHeight: '16px',
|
|
229
|
+
margin: 'auto',
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
},
|
|
152
233
|
},
|
|
153
234
|
});
|