@bento-core/query-bar 1.0.1-icdc.10 → 1.0.1-icdc.12

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.
@@ -58,17 +58,13 @@ const QueryUrl = _ref2 => {
58
58
  let {
59
59
  classes,
60
60
  filterItems,
61
- localFind,
61
+ localFind = {},
62
62
  rootPath
63
63
  } = _ref2;
64
64
  const [display, setDisplay] = (0, _react.useState)(false);
65
65
  const toggleDisplay = () => setDisplay(!display);
66
66
  const [expand, setExpand] = (0, _react.useState)(false);
67
67
  const [open, toggleOpen] = (0, _react.useState)(false);
68
- const {
69
- autocomplete = [],
70
- upload
71
- } = localFind;
72
68
  const pathFilterParams = filterItems.reduce((acc, item) => {
73
69
  const {
74
70
  datafield,
@@ -77,10 +73,7 @@ const QueryUrl = _ref2 => {
77
73
  acc[datafield] = items;
78
74
  return acc;
79
75
  }, {});
80
- const query = JSON.stringify(_objectSpread(_objectSpread({}, pathFilterParams), {}, {
81
- autocomplete,
82
- upload
83
- }));
76
+ const query = JSON.stringify(_objectSpread(_objectSpread({}, pathFilterParams), localFind));
84
77
  const url = encodeURI(rootPath.concat(query));
85
78
  const copyUrl = async () => {
86
79
  toggleOpen(!open);
@@ -125,9 +118,9 @@ const QueryUrl = _ref2 => {
125
118
  };
126
119
  const styles = () => ({
127
120
  urlContainer: {
121
+ display: 'flex',
128
122
  marginTop: '10px',
129
- minHeight: '10px',
130
- marginBottom: '10px'
123
+ minHeight: '10px'
131
124
  },
132
125
  link: {
133
126
  lineBreak: 'anywhere',
@@ -166,7 +159,6 @@ const styles = () => ({
166
159
  },
167
160
  viewLinkToggleBtn: {
168
161
  height: '20px',
169
- marginRight: '10px',
170
162
  fontFamily: 'Nunito',
171
163
  fontSize: '12px',
172
164
  fontWeight: '500',
@@ -177,6 +169,7 @@ const styles = () => ({
177
169
  textTransform: 'none',
178
170
  color: '#fff',
179
171
  float: 'left',
172
+ margin: '0px 10px 0px 0px',
180
173
  '&:hover': {
181
174
  backgroundColor: '#1D79A8',
182
175
  color: '#fff'
@@ -201,6 +194,7 @@ const styles = () => ({
201
194
  },
202
195
  copyIconBtn: {
203
196
  padding: '0px',
197
+ height: '20px',
204
198
  marginLeft: '10px',
205
199
  float: 'left'
206
200
  }
@@ -27,12 +27,12 @@ var _default = {
27
27
  * root path of bento app
28
28
  * @var {boolean}
29
29
  */
30
- rootPath: 'localhost',
30
+ rootPath: null,
31
31
  /**
32
32
  * display query URL
33
33
  * @var {boolean}
34
34
  */
35
- viewQueryURL: true
35
+ viewQueryURL: false
36
36
  },
37
37
  /* Component Helper Functions */
38
38
  functions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/query-bar",
3
- "version": "1.0.1-icdc.10",
3
+ "version": "1.0.1-icdc.12",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -62,7 +62,7 @@ const ViewFullLinkComponent = ({
62
62
  const QueryUrl = ({
63
63
  classes,
64
64
  filterItems,
65
- localFind,
65
+ localFind = {},
66
66
  rootPath,
67
67
  }) => {
68
68
  const [display, setDisplay] = useState(false);
@@ -72,8 +72,6 @@ const QueryUrl = ({
72
72
 
73
73
  const [open, toggleOpen] = useState(false);
74
74
 
75
- const { autocomplete = [], upload } = localFind;
76
-
77
75
  const pathFilterParams = filterItems.reduce((acc, item) => {
78
76
  const { datafield, items = [] } = item;
79
77
  acc[datafield] = items;
@@ -82,8 +80,7 @@ const QueryUrl = ({
82
80
 
83
81
  const query = JSON.stringify({
84
82
  ...pathFilterParams,
85
- autocomplete,
86
- upload,
83
+ ...localFind,
87
84
  });
88
85
  const url = encodeURI(rootPath.concat(query));
89
86
 
@@ -156,9 +153,9 @@ const QueryUrl = ({
156
153
 
157
154
  const styles = () => ({
158
155
  urlContainer: {
156
+ display: 'flex',
159
157
  marginTop: '10px',
160
158
  minHeight: '10px',
161
- marginBottom: '10px',
162
159
  },
163
160
  link: {
164
161
  lineBreak: 'anywhere',
@@ -197,7 +194,6 @@ const styles = () => ({
197
194
  },
198
195
  viewLinkToggleBtn: {
199
196
  height: '20px',
200
- marginRight: '10px',
201
197
  fontFamily: 'Nunito',
202
198
  fontSize: '12px',
203
199
  fontWeight: '500',
@@ -208,6 +204,7 @@ const styles = () => ({
208
204
  textTransform: 'none',
209
205
  color: '#fff',
210
206
  float: 'left',
207
+ margin: '0px 10px 0px 0px',
211
208
  '&:hover': {
212
209
  backgroundColor: '#1D79A8',
213
210
  color: '#fff',
@@ -232,6 +229,7 @@ const styles = () => ({
232
229
  },
233
230
  copyIconBtn: {
234
231
  padding: '0px',
232
+ height: '20px',
235
233
  marginLeft: '10px',
236
234
  float: 'left',
237
235
  },
@@ -21,12 +21,12 @@ export default {
21
21
  * root path of bento app
22
22
  * @var {boolean}
23
23
  */
24
- rootPath: 'localhost',
24
+ rootPath: null,
25
25
  /**
26
26
  * display query URL
27
27
  * @var {boolean}
28
28
  */
29
- viewQueryURL: true,
29
+ viewQueryURL: false,
30
30
  },
31
31
 
32
32
  /* Component Helper Functions */