synapse-react-client
Version:
[](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [](https://badge.fury.io/js/synaps
21 lines • 1.44 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = (0, tslib_1.__importStar)(require("react"));
var QueryPerFacetPlotsCard_1 = (0, tslib_1.__importDefault)(require("./QueryPerFacetPlotsCard"));
var SingleQueryFacetPlotsCards_1 = (0, tslib_1.__importDefault)(require("./SingleQueryFacetPlotsCards"));
var FeaturedDataPlots = function (props) {
var configs = props.configs, rgbIndex = props.rgbIndex, sql = props.sql;
// What mode are we in? Either every card has a different selected facet (requiring a different query),
// or we're showing the facet counts for a single query. This controls the layout, and how the cards are populated.
var isQueryPerCard = configs[0].selectFacetColumnName;
return (React.createElement("div", { className: "FeaturedDataPlots" + (isQueryPerCard ? '__queryPerCard' : '__singleQuery') }, configs.map(function (config) {
return React.createElement(React.Fragment, null,
isQueryPerCard &&
React.createElement(QueryPerFacetPlotsCard_1.default, (0, tslib_1.__assign)({}, config, { rgbIndex: rgbIndex, sql: sql })),
!isQueryPerCard &&
React.createElement(SingleQueryFacetPlotsCards_1.default, (0, tslib_1.__assign)({}, config, { rgbIndex: rgbIndex, sql: sql })));
})));
};
exports.default = FeaturedDataPlots;
//# sourceMappingURL=FeaturedDataPlots.js.map