UNPKG

synapse-react-client

Version:

[![Build Status](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client.svg?branch=main)](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synaps

21 lines 1.44 kB
"use strict"; 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