gramene-search 1.2.21 → 1.2.22
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/.parcel-cache/2b1c1cd7b577d2ca.txt +2 -2
- package/.parcel-cache/data.mdb +0 -0
- package/.parcel-cache/lock.mdb +0 -0
- package/dist/index.js +62 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/suggestions.js +59 -25
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
12943691
|
|
2
|
+
1648570246527237000
|
package/.parcel-cache/data.mdb
CHANGED
|
Binary file
|
package/.parcel-cache/lock.mdb
CHANGED
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -1717,28 +1717,71 @@ function $8979ce19c4476d02$var$showMatches(text, x) {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
var $8979ce19c4476d02$var$Suggestions = function Suggestions(props) {
|
|
1719
1719
|
var suggestions = props.grameneSuggestions;
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1720
|
+
if (suggestions && suggestions.grouped) {
|
|
1721
|
+
if (suggestions.grouped.category.matches === 0) {
|
|
1722
|
+
var sugg1 = {
|
|
1723
|
+
fq_field: 'text',
|
|
1724
|
+
fq_value: props.suggestionsQuery,
|
|
1725
|
+
name: "Genes containing \"".concat(props.suggestionsQuery, "\""),
|
|
1726
|
+
category: 'Gene'
|
|
1727
|
+
};
|
|
1728
|
+
var sugg2 = {
|
|
1729
|
+
fq_field: 'text',
|
|
1730
|
+
fq_value: "".concat(props.suggestionsQuery, "*"),
|
|
1731
|
+
name: "Genes matching \"".concat(props.suggestionsQuery, "*\""),
|
|
1732
|
+
category: 'Gene'
|
|
1733
|
+
};
|
|
1734
|
+
return(/*#__PURE__*/ $8979ce19c4476d02$var$_react["default"].createElement("div", {
|
|
1735
|
+
style: {
|
|
1736
|
+
margin: '10px',
|
|
1737
|
+
maxWidth: '820px'
|
|
1738
|
+
}
|
|
1739
|
+
}, /*#__PURE__*/ $8979ce19c4476d02$var$_react["default"].createElement($ByO3L$reactbootstrap.Alert, {
|
|
1740
|
+
variant: 'info'
|
|
1741
|
+
}, /*#__PURE__*/ $8979ce19c4476d02$var$_react["default"].createElement("em", null, "No suggestions found."), " You may still attempt a full text search, though it is unlikely to find any genes for you."), /*#__PURE__*/ $8979ce19c4476d02$var$_react["default"].createElement($ByO3L$reactbootstrap.Button, {
|
|
1742
|
+
id: 'word',
|
|
1743
|
+
size: 'sm',
|
|
1744
|
+
variant: 'outline-secondary',
|
|
1745
|
+
onClick: function onClick() {
|
|
1746
|
+
props.doAcceptSuggestion(sugg1);
|
|
1747
|
+
props.doAcceptGrameneSuggestion(sugg1);
|
|
1748
|
+
}
|
|
1749
|
+
}, "All genes that contain the word \"".concat(props.suggestionsQuery, "\"")), /*#__PURE__*/ $8979ce19c4476d02$var$_react["default"].createElement($ByO3L$reactbootstrap.Button, {
|
|
1750
|
+
id: 'word',
|
|
1751
|
+
size: 'sm',
|
|
1752
|
+
variant: 'outline-secondary',
|
|
1733
1753
|
onClick: function onClick() {
|
|
1734
|
-
props.doAcceptSuggestion(
|
|
1735
|
-
props.doAcceptGrameneSuggestion(
|
|
1754
|
+
props.doAcceptSuggestion(sugg2);
|
|
1755
|
+
props.doAcceptGrameneSuggestion(sugg2);
|
|
1736
1756
|
}
|
|
1737
|
-
},
|
|
1738
|
-
|
|
1739
|
-
|
|
1757
|
+
}, "All genes that contain a word that starts with \"".concat(props.suggestionsQuery, "\""))));
|
|
1758
|
+
} else return(/*#__PURE__*/ $8979ce19c4476d02$var$_react["default"].createElement("div", {
|
|
1759
|
+
style: {
|
|
1760
|
+
margin: '10px'
|
|
1761
|
+
}
|
|
1762
|
+
}, suggestions.grouped.category.groups.map(function(g, idx) {
|
|
1763
|
+
return(/*#__PURE__*/ $8979ce19c4476d02$var$_react["default"].createElement("div", {
|
|
1764
|
+
key: idx,
|
|
1765
|
+
id: "gramene-suggestion"
|
|
1766
|
+
}, /*#__PURE__*/ $8979ce19c4476d02$var$_react["default"].createElement("h4", {
|
|
1767
|
+
className: "mt10"
|
|
1768
|
+
}, g.groupValue), g.doclist.docs.map(function(sugg, jdx) {
|
|
1769
|
+
return(/*#__PURE__*/ $8979ce19c4476d02$var$_react["default"].createElement($ByO3L$reactbootstrap.Button, {
|
|
1770
|
+
id: "".concat(idx, "-").concat(jdx),
|
|
1771
|
+
key: jdx,
|
|
1772
|
+
disabled: sugg.num_genes === 0,
|
|
1773
|
+
size: "sm",
|
|
1774
|
+
variant: "outline-secondary",
|
|
1775
|
+
onClick: function onClick() {
|
|
1776
|
+
props.doAcceptSuggestion(sugg);
|
|
1777
|
+
props.doAcceptGrameneSuggestion(sugg);
|
|
1778
|
+
}
|
|
1779
|
+
}, $8979ce19c4476d02$var$showMatches(sugg.display_name, props.suggestionsQuery), ' ', /*#__PURE__*/ $8979ce19c4476d02$var$_react["default"].createElement($ByO3L$reactbootstrap.Badge, {
|
|
1780
|
+
variant: "secondary"
|
|
1781
|
+
}, sugg.num_genes)));
|
|
1782
|
+
})));
|
|
1740
1783
|
})));
|
|
1741
|
-
}))
|
|
1784
|
+
} else return(/*#__PURE__*/ $8979ce19c4476d02$var$_react["default"].createElement("div", null));
|
|
1742
1785
|
};
|
|
1743
1786
|
var $8979ce19c4476d02$var$_default = $ByO3L$reduxbundlerreact.connect('selectGrameneSuggestions', 'selectSuggestionsQuery', 'doAcceptSuggestion', 'doAcceptGrameneSuggestion', $8979ce19c4476d02$var$Suggestions);
|
|
1744
1787
|
module.exports["default"] = $8979ce19c4476d02$var$_default;
|