@bento-core/query-bar 1.0.1-icdc.11 → 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);
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
86
|
-
upload,
|
|
83
|
+
...localFind,
|
|
87
84
|
});
|
|
88
85
|
const url = encodeURI(rootPath.concat(query));
|
|
89
86
|
|