var expressionAtlasDifferentialExpression = (window["webpackJsonp_name_"] = window["webpackJsonp_name_"] || []).push([["expressionAtlasDifferentialExpression"],{ /***/ "./bundles/differential-expression/index.js": /*!**************************************************!*\ !*** ./bundles/differential-expression/index.js ***! \**************************************************/ /*! exports provided: render */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _src_DifferentialRouterLoader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./src/DifferentialRouterLoader */ "./bundles/differential-expression/src/DifferentialRouterLoader.js"); var render = function render(props, target) { react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_src_DifferentialRouterLoader__WEBPACK_IMPORTED_MODULE_2__["default"], props), document.getElementById(target)); }; /***/ }), /***/ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/atlas-react-fetch-loader/lib/CalloutAlert.js": /*!******************************************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/@ebi-gene-expression-group/atlas-react-fetch-loader/lib/CalloutAlert.js ***! \******************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var CalloutAlert = function CalloutAlert(_ref) { var error = _ref.error; return /*#__PURE__*/_react["default"].createElement("div", { className: "row column" }, /*#__PURE__*/_react["default"].createElement("div", { className: "callout alert small" }, /*#__PURE__*/_react["default"].createElement("h5", null, "Oops!"), /*#__PURE__*/_react["default"].createElement("p", null, error.description, /*#__PURE__*/_react["default"].createElement("br", null), "If the error persists, in order to help us debug the issue, please copy the URL and this message and send it to us via ", /*#__PURE__*/_react["default"].createElement("a", { href: "https://www.ebi.ac.uk/support/gxasc" }, "the EBI Support & Feedback system"), ":"), /*#__PURE__*/_react["default"].createElement("code", null, "".concat(error.name, ": ").concat(error.message)))); }; CalloutAlert.propTypes = { error: _propTypes["default"].shape({ description: _propTypes["default"].string.isRequired, name: _propTypes["default"].string.isRequired, message: _propTypes["default"].string.isRequired }) }; var _default = CalloutAlert; exports["default"] = _default; /***/ }), /***/ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/atlas-react-fetch-loader/lib/FetchLoader.js": /*!*****************************************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/@ebi-gene-expression-group/atlas-react-fetch-loader/lib/FetchLoader.js ***! \*****************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.AnimatedLoadingMessage = void 0; var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _styledComponents = _interopRequireWildcard(__webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js")); var _urijs = _interopRequireDefault(__webpack_require__(/*! urijs */ "./node_modules/urijs/src/URI.js")); var _CalloutAlert = _interopRequireDefault(__webpack_require__(/*! ./CalloutAlert */ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/atlas-react-fetch-loader/lib/CalloutAlert.js")); var _excluded = ["errorPayloadProvider", "loadingPayloadProvider", "fulfilledPayloadProvider"]; var _templateObject, _templateObject2; function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var loadingMessage = (0, _styledComponents.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% { content: \"Loading, please wait\"; }\n 33% { content: \"Loading, please wait.\"; }\n 66% { content: \"Loading, please wait..\"; }\n 100% { content: \"Loading, please wait...\"; }\n"]))); var AnimatedLoadingMessage = _styledComponents["default"].p(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ::before {\n content: \"Loading, please wait\";\n animation: ", " 1s linear infinite alternate;\n }\n"])), loadingMessage); exports.AnimatedLoadingMessage = AnimatedLoadingMessage; var withFetchLoader = function withFetchLoader(WrappedComponent) { var FetchLoader = /*#__PURE__*/function (_React$Component) { _inherits(FetchLoader, _React$Component); var _super = _createSuper(FetchLoader); function FetchLoader(props) { var _this; _classCallCheck(this, FetchLoader); _this = _super.call(this, props); _this.state = { data: null, isLoading: true, error: null }; return _this; } _createClass(FetchLoader, [{ key: "componentDidUpdate", value: function () { var _componentDidUpdate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: if (!(this.state.data === null && this.state.error === null)) { _context.next = 3; break; } _context.next = 3; return this._loadAsyncData((0, _urijs["default"])(this.props.resource, this.props.host).query(this.props.query).toString()); case 3: case "end": return _context.stop(); } } }, _callee, this); })); function componentDidUpdate() { return _componentDidUpdate.apply(this, arguments); } return componentDidUpdate; }() }, { key: "componentDidMount", value: function () { var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { return _regeneratorRuntime().wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: _context2.next = 2; return this._loadAsyncData((0, _urijs["default"])(this.props.resource, this.props.host).query(this.props.query).toString()); case 2: case "end": return _context2.stop(); } } }, _callee2, this); })); function componentDidMount() { return _componentDidMount.apply(this, arguments); } return componentDidMount; }() }, { key: "_loadAsyncData", value: function () { var _loadAsyncData2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url) { var _this2 = this; var response, data; return _regeneratorRuntime().wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: _context3.prev = 0; _context3.next = 3; return fetch(url); case 3: response = _context3.sent; if (response.ok) { _context3.next = 6; break; } throw new Error("".concat(url, " => ").concat(response.status)); case 6: if (!this.props.raw) { _context3.next = 12; break; } _context3.next = 9; return response.text(); case 9: _context3.t0 = _context3.sent; _context3.next = 15; break; case 12: _context3.next = 14; return response.json(); case 14: _context3.t0 = _context3.sent; case 15: data = _context3.t0; if (!this.props.raw) { Object.keys(this.props.renameDataKeys).forEach(function (key) { // Defend against accidental same-value fields: { foo: "foo" } if (data[key]) { var dataKey = data[key]; delete data[key]; Object.assign(data, _defineProperty({}, _this2.props.renameDataKeys[key], dataKey)); } }); } this.setState({ data: data, isLoading: false, error: null }); _context3.next = 23; break; case 20: _context3.prev = 20; _context3.t1 = _context3["catch"](0); this.setState({ data: null, isLoading: false, error: { description: "There was a problem communicating with the server. Please try again later.", name: _context3.t1.name, message: _context3.t1.message } }); case 23: case "end": return _context3.stop(); } } }, _callee3, this, [[0, 20]]); })); function _loadAsyncData(_x) { return _loadAsyncData2.apply(this, arguments); } return _loadAsyncData; }() }, { key: "componentDidCatch", value: function componentDidCatch(error, info) { this.setState({ error: { description: "There was a problem rendering this component.", name: error.name, message: "".concat(error.message, " \u2013 ").concat(info) } }); } }, { key: "render", value: function render() { var _this$props = this.props, errorPayloadProvider = _this$props.errorPayloadProvider, loadingPayloadProvider = _this$props.loadingPayloadProvider, fulfilledPayloadProvider = _this$props.fulfilledPayloadProvider, passThroughProps = _objectWithoutProperties(_this$props, _excluded); var _this$state = this.state, data = _this$state.data, isLoading = _this$state.isLoading, error = _this$state.error; return error ? errorPayloadProvider ? /*#__PURE__*/_react["default"].createElement(WrappedComponent, _objectSpread(_objectSpread({}, passThroughProps), errorPayloadProvider(error))) : /*#__PURE__*/_react["default"].createElement(_CalloutAlert["default"], { error: error }) : isLoading ? loadingPayloadProvider ? /*#__PURE__*/_react["default"].createElement(WrappedComponent, _objectSpread(_objectSpread({}, passThroughProps), loadingPayloadProvider())) : /*#__PURE__*/_react["default"].createElement(AnimatedLoadingMessage, null) : /*#__PURE__*/ // Promise fulfilled, merge passed props and merge-overwrite with retrieved data _react["default"].createElement(WrappedComponent, _objectSpread(_objectSpread(_objectSpread({}, passThroughProps), data), fulfilledPayloadProvider(data))); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(props, state) { var url = (0, _urijs["default"])(props.resource, props.host).query(props.query).toString(); // Store URL in state so we can compare when props change. // Clear out previously-loaded data (so we don't render stale stuff). if (url !== state.url) { return { data: null, isLoading: true, error: null, url: url }; } // No state update necessary return null; } }]); return FetchLoader; }(_react["default"].Component); FetchLoader.propTypes = { host: _propTypes["default"].string.isRequired, resource: _propTypes["default"].string.isRequired, query: _propTypes["default"].object, loadingPayloadProvider: _propTypes["default"].func, errorPayloadProvider: _propTypes["default"].func, fulfilledPayloadProvider: _propTypes["default"].func, renameDataKeys: _propTypes["default"].objectOf(_propTypes["default"].string), raw: _propTypes["default"].bool }; FetchLoader.defaultProps = { query: {}, loadingPayloadProvider: null, errorPayloadProvider: null, fulfilledPayloadProvider: function fulfilledPayloadProvider() {}, renameDataKeys: {}, raw: false }; return FetchLoader; }; exports["default"] = withFetchLoader; /***/ }), /***/ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/atlas-react-fetch-loader/lib/index.js": /*!***********************************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/@ebi-gene-expression-group/atlas-react-fetch-loader/lib/index.js ***! \***********************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "withFetchLoader", { enumerable: true, get: function get() { return _FetchLoader["default"]; } }); var _FetchLoader = _interopRequireDefault(__webpack_require__(/*! ./FetchLoader */ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/atlas-react-fetch-loader/lib/FetchLoader.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /***/ }), /***/ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/expression-atlas-number-format/lib/ScientificNotationNumber.js": /*!************************************************************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/@ebi-gene-expression-group/expression-atlas-number-format/lib/ScientificNotationNumber.js ***! \************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var removeTrailingZeroes = function removeTrailingZeroes(str) { return str.replace(/(\d)0+$/, "$1"); }; var removeLeadingPlus = function removeLeadingPlus(str) { return str.replace(/^\+/, ""); }; var ScientificNotationNumber = function ScientificNotationNumber(_ref) { var value = _ref.value, accuracy = _ref.accuracy, style = _ref.style; if (value >= 0.1 && value < 100000 || value === 0) { return _react["default"].createElement("span", null, value); } var scientificNotationString = value.toExponential(accuracy); var mantissaExponent = scientificNotationString.split("e"); var mantissa = removeTrailingZeroes(mantissaExponent[0]); var exponent = removeLeadingPlus(mantissaExponent[1]); return _react["default"].createElement("span", { style: style }, +mantissa !== 1 ? "".concat(mantissa, " \xD7 ") : "", "10", _react["default"].createElement("span", { style: { verticalAlign: "super" } }, exponent)); }; ScientificNotationNumber.propTypes = { value: _propTypes["default"].number.isRequired, accuracy: _propTypes["default"].number, style: _propTypes["default"].object }; ScientificNotationNumber.defaultProps = { accuracy: 4, style: {} }; var _default = ScientificNotationNumber; exports["default"] = _default; /***/ }), /***/ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/expression-atlas-number-format/lib/index.js": /*!*****************************************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/@ebi-gene-expression-group/expression-atlas-number-format/lib/index.js ***! \*****************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ScientificNotationNumber = _interopRequireDefault(__webpack_require__(/*! ./ScientificNotationNumber.js */ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/expression-atlas-number-format/lib/ScientificNotationNumber.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _ScientificNotationNumber["default"]; exports["default"] = _default; /***/ }), /***/ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/EbiSpeciesIcon.js": /*!*************************************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/EbiSpeciesIcon.js ***! \*************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _mapping = __webpack_require__(/*! ./mapping */ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/mapping.js"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var capitalizeFirstLetter = function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); }; var EbiSpeciesIcon = function EbiSpeciesIcon(_ref) { var species = _ref.species, groupColors = _ref.groupColors, color = _ref.color; var _lookUpIcon = (0, _mapping.lookUpIcon)(species), _lookUpIcon2 = _slicedToArray(_lookUpIcon, 2), group = _lookUpIcon2[0], icon = _lookUpIcon2[1]; return /*#__PURE__*/_react["default"].createElement("span", { className: "icon icon-species", style: { color: color || groupColors[group] || "black" }, "data-icon": icon || "\u2754", title: capitalizeFirstLetter(species) }); }; EbiSpeciesIcon.propTypes = { species: _propTypes["default"].string, groupColors: _propTypes["default"].shape({ warmBlooded: _propTypes["default"].string, plants: _propTypes["default"].string, other: _propTypes["default"].string }), color: _propTypes["default"].string }; EbiSpeciesIcon.defaultProps = { species: "oryctolagus cuniculus", //rabbit is objectively the best species groupColors: { warmBlooded: "indianred", plants: "mediumseagreen", other: "deepskyblue" } }; var _default = EbiSpeciesIcon; exports["default"] = _default; /***/ }), /***/ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/EbiSpeciesIconBare.js": /*!*****************************************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/EbiSpeciesIconBare.js ***! \*****************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _styledComponents = _interopRequireDefault(__webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js")); var _mapping = __webpack_require__(/*! ./mapping */ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/mapping.js"); var _templateObject, _templateObject2; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var capitalizeFirstLetter = function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); }; var StyledEbiIcon = _styledComponents["default"].span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-decoration: none;\n font-style: normal;\n text-rendering: optimizeLegibility !important;\n background-size: contain;\n font-weight: 400;\n"]))); // We don’t use props to set the colour here to avoid creating multiple classes var StyledEbiIconSpecies = (0, _styledComponents["default"])(StyledEbiIcon)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n @font-face {\n font-family: 'EBI-Species';\n src:url('https://ebi.emblstatic.net/web_guidelines/EBI-Icon-fonts/v1.2/EBI-Species/fonts/EBI-Species.eot');\n src:url('https://ebi.emblstatic.net/web_guidelines/EBI-Icon-fonts/v1.2/EBI-Species/fonts/EBI-Species.eot?#iefix') format('embedded-opentype'),\n url('https://ebi.emblstatic.net/web_guidelines/EBI-Icon-fonts/v1.2/EBI-Species/fonts/EBI-Species.woff2') format('woff2'),\n url('https://ebi.emblstatic.net/web_guidelines/EBI-Icon-fonts/v1.2/EBI-Species/fonts/EBI-Species.woff') format('woff'),\n url('https://ebi.emblstatic.net/web_guidelines/EBI-Icon-fonts/v1.2/EBI-Species/fonts/EBI-Species.svg#EBI-Species') format('svg'),\n url('https://ebi.emblstatic.net/web_guidelines/EBI-Icon-fonts/v1.2/EBI-Species/fonts/EBI-Species.ttf') format('truetype');\n font-weight: normal;\n font-style: normal;\n }\n\n ::before {\n font-family: 'EBI-Species';\n content: attr(data-icon);\n text-transform: none;\n }\n"]))); var EbiSpeciesIconBare = function EbiSpeciesIconBare(_ref) { var species = _ref.species, groupColors = _ref.groupColors, color = _ref.color; var _lookUpIcon = (0, _mapping.lookUpIcon)(species), _lookUpIcon2 = _slicedToArray(_lookUpIcon, 2), group = _lookUpIcon2[0], icon = _lookUpIcon2[1]; return /*#__PURE__*/_react["default"].createElement(StyledEbiIconSpecies, { style: { color: color || groupColors[group] || "black" }, "data-icon": icon || "\u2754", title: capitalizeFirstLetter(species) }); }; EbiSpeciesIconBare.propTypes = { species: _propTypes["default"].string, groupColors: _propTypes["default"].shape({ warmBlooded: _propTypes["default"].string, plants: _propTypes["default"].string, other: _propTypes["default"].string }), color: _propTypes["default"].string }; EbiSpeciesIconBare.defaultProps = { species: "oryctolagus cuniculus", //rabbit is objectively the best species groupColors: { warmBlooded: "indianred", plants: "mediumseagreen", other: "deepskyblue" } }; var _default = EbiSpeciesIconBare; exports["default"] = _default; /***/ }), /***/ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/index.js": /*!****************************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/index.js ***! \****************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "EbiSpeciesIconBare", { enumerable: true, get: function get() { return _EbiSpeciesIconBare["default"]; } }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _EbiSpeciesIcon["default"]; } }); exports.renderBare = exports.render = void 0; var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js")); var _EbiSpeciesIcon = _interopRequireDefault(__webpack_require__(/*! ./EbiSpeciesIcon */ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/EbiSpeciesIcon.js")); var _EbiSpeciesIconBare = _interopRequireDefault(__webpack_require__(/*! ./EbiSpeciesIconBare */ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/EbiSpeciesIconBare.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var render = function render(options, target) { _reactDom["default"].render( /*#__PURE__*/_react["default"].createElement(_EbiSpeciesIcon["default"], options), document.getElementById(target)); }; exports.render = render; var renderBare = function renderBare(options, target) { _reactDom["default"].render( /*#__PURE__*/_react["default"].createElement(_EbiSpeciesIconBare["default"], options), document.getElementById(target)); }; exports.renderBare = renderBare; /***/ }), /***/ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/mapping.js": /*!******************************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/mapping.js ***! \******************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.lookUpIcon = exports.allSpecies = void 0; function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } var mapping = { warmBlooded: { "a": ["alpaca", "vicugna pacos"], "l": ["armadillo"], "(": ["bat"], "A": ["cat", "felis catus"], "k": ["chicken", "gallus gallus"], "i": ["chimpanzee", "pan paniscus", "pan troglodytes"], "C": ["cow", "bos taurus"], "d": ["dog", "canis lupus", "canis lupus familiaris"], "D": ["dolphin"], "e": ["elephant", "loxodonta africana", "loxodonta cyclotis", "elephas maximus"], "!": ["ferret", "mustela putorius furo"], "n": ["finch", "pyrrhula pyrrhula"], "m": ["goat"], "G": ["gorilla", "gorilla gorilla"], "g": ["guinea pig", "cavia porcellus"], "o": ["hedgehog", "erinaceus europaeus"], "h": ["horse", "equus caballus"], "H": ["human", "homo sapiens"], "3": ["kangaroo rat"], "r": ["monkey", "macaca mulatta"], "9": ["monodelphis", "monodelphis domestica"], "q": ["marmoset", "callithrix jacchus"], "M": ["mouse", "mus musculus"], "N": ["mouse lemur"], "*": ["orangutan", "pongo abelii", "pongo pygmaeus"], "8": ["papio anubis"], "p": ["pig", "sus scrofa"], "U": ["platypus", "ornithorhynchus anatinus"], "t": ["rabbit", "oryctolagus cuniculus"], "R": ["rat", "rattus norvegicus"], "x": ["sheep", "ovis aries"], "Q": ["shrew"], "I": ["squirrel"], "w": ["wallaby"] }, plants: { "5": ["barley", "hordeum vulgare", "hordeum vulgare subsp. vulgare"], "B": ["brassica", "brassica oleracea", "brassica rapa", "arabidopsis", "arabidopsis thaliana", "arabidopsis lyrata"], "%": ["brachypodium", "brachypodium distachyon"], "c": ["corn", "zea mays"], "^": ["glycinemax", "glycine max"], "O": ["grapes", "vitis vinifera"], "P": ["plant", "physcomitrella patens", "sorghum bicolor", "triticum aestivum"], "6": ["rice", "oryza sativa", "oryza sativa japonica group"], ")": ["tomatoes", "solanum lycopersicum", "solanum tuberosum"] }, other: { "0": ["amoeba"], "7": ["anolis", "anolis carolinensis"], "£": ["aspergillus", "aspergillus fumigatus"], "$": ["bee"], "b": ["bug"], "W": ["c elegans", "caenorhabditis elegans", "schistosoma mansoni"], "2": ["diatom"], "L": ["ecoli", "escherichia coli"], "F": ["fly", "drosophila melanogaster"], "f": ["frog", "xenopus (silurana) tropicalis", "xenopus tropicalis"], "u": ["fungus"], "4": ["louse"], "1": ["mosquito", "anopheles gambiae"], "@": ["plasmodium", "plasmodium berghei", "plasmodium falciparum"], "E": ["pufferfish", "tetraodon nigroviridis"], "+": ["ray"], "s": ["scorpion"], "'": ["snail"], "S": ["spider"], "&": ["tick"], "v": ["virus"], "Y": ["yeast", "saccharomyces cerevisiae", "schizosaccharomyces pombe"], "Z": ["zebrafish", "danio rerio"] } }; var lookUpInGroup = function lookUpInGroup(group, species) { return Object.keys(mapping[group]).find(function (iconChar) { return mapping[group][iconChar].includes(species.toLowerCase()); }); }; var lookUpIcon = function lookUpIcon(species) { for (var group in mapping) { var iconChar = lookUpInGroup(group, species); if (iconChar) { return [group, iconChar]; } } return ["", ""]; }; exports.lookUpIcon = lookUpIcon; var allSpecies = []; exports.allSpecies = allSpecies; for (var group in mapping) { for (var iconChar in mapping[group]) { allSpecies.push.apply(allSpecies, _toConsumableArray(mapping[group][iconChar])); } } /***/ }), /***/ "./bundles/differential-expression/node_modules/classnames/index.js": /*!**************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/classnames/index.js ***! \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames () { var classes = ''; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (arg) { classes = appendClass(classes, parseValue(arg)); } } return classes; } function parseValue (arg) { if (typeof arg === 'string' || typeof arg === 'number') { return arg; } if (typeof arg !== 'object') { return ''; } if (Array.isArray(arg)) { return classNames.apply(null, arg); } if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { return arg.toString(); } var classes = ''; for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes = appendClass(classes, key); } } return classes; } function appendClass (value, newClass) { if (!newClass) { return value; } if (value) { return value + ' ' + newClass; } return value + newClass; } if ( true && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }()); /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/constant.js": /*!*************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/constant.js ***! \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { GLOBAL: { HIDE: '__react_tooltip_hide_event', REBUILD: '__react_tooltip_rebuild_event', SHOW: '__react_tooltip_show_event' } }; /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/customEvent.js": /*!***************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/customEvent.js ***! \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (target) { target.prototype.isCustomEvent = function (ele) { var event = this.state.event; return event || !!ele.getAttribute('data-event'); }; /* Bind listener for custom event */ target.prototype.customBindListener = function (ele) { var _this = this; var _state = this.state, event = _state.event, eventOff = _state.eventOff; var dataEvent = ele.getAttribute('data-event') || event; var dataEventOff = ele.getAttribute('data-event-off') || eventOff; dataEvent.split(' ').forEach(function (event) { ele.removeEventListener(event, customListeners.get(ele, event)); var customListener = checkStatus.bind(_this, dataEventOff); customListeners.set(ele, event, customListener); ele.addEventListener(event, customListener, false); }); if (dataEventOff) { dataEventOff.split(' ').forEach(function (event) { ele.removeEventListener(event, _this.hideTooltip); ele.addEventListener(event, _this.hideTooltip, false); }); } }; /* Unbind listener for custom event */ target.prototype.customUnbindListener = function (ele) { var _state2 = this.state, event = _state2.event, eventOff = _state2.eventOff; var dataEvent = event || ele.getAttribute('data-event'); var dataEventOff = eventOff || ele.getAttribute('data-event-off'); ele.removeEventListener(dataEvent, customListeners.get(ele, event)); if (dataEventOff) ele.removeEventListener(dataEventOff, this.hideTooltip); }; }; function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * Custom events to control showing and hiding of tooltip * * @attributes * - `event` {String} * - `eventOff` {String} */ var checkStatus = function checkStatus(dataEventOff, e) { var show = this.state.show; var id = this.props.id; var dataIsCapture = e.currentTarget.getAttribute('data-iscapture'); var isCapture = dataIsCapture && dataIsCapture === 'true' || this.props.isCapture; var currentItem = e.currentTarget.getAttribute('currentItem'); if (!isCapture) e.stopPropagation(); if (show && currentItem === 'true') { if (!dataEventOff) this.hideTooltip(e); } else { e.currentTarget.setAttribute('currentItem', 'true'); setUntargetItems(e.currentTarget, this.getTargetArray(id)); this.showTooltip(e); } }; var setUntargetItems = function setUntargetItems(currentTarget, targetArray) { for (var i = 0; i < targetArray.length; i++) { if (currentTarget !== targetArray[i]) { targetArray[i].setAttribute('currentItem', 'false'); } else { targetArray[i].setAttribute('currentItem', 'true'); } } }; var customListeners = { id: '9b69f92e-d3fe-498b-b1b4-c5e63a51b0cf', set: function set(target, event, listener) { if (this.id in target) { var map = target[this.id]; map[event] = listener; } else { // this is workaround for WeakMap, which is not supported in older browsers, such as IE Object.defineProperty(target, this.id, { configurable: true, value: _defineProperty({}, event, listener) }); } }, get: function get(target, event) { var map = target[this.id]; if (map !== undefined) { return map[event]; } } }; /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/getEffect.js": /*!*************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/getEffect.js ***! \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (target) { target.prototype.getEffect = function (currentTarget) { var dataEffect = currentTarget.getAttribute('data-effect'); return dataEffect || this.props.effect || 'float'; }; }; /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/isCapture.js": /*!*************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/isCapture.js ***! \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (target) { target.prototype.isCapture = function (currentTarget) { return currentTarget && currentTarget.getAttribute('data-iscapture') === 'true' || this.props.isCapture || false; }; }; /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/staticMethods.js": /*!*****************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/staticMethods.js ***! \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (target) { /** * Hide all tooltip * @trigger ReactTooltip.hide() */ target.hide = function (target) { dispatchGlobalEvent(_constant2.default.GLOBAL.HIDE, { target: target }); }; /** * Rebuild all tooltip * @trigger ReactTooltip.rebuild() */ target.rebuild = function () { dispatchGlobalEvent(_constant2.default.GLOBAL.REBUILD); }; /** * Show specific tooltip * @trigger ReactTooltip.show() */ target.show = function (target) { dispatchGlobalEvent(_constant2.default.GLOBAL.SHOW, { target: target }); }; target.prototype.globalRebuild = function () { if (this.mount) { this.unbindListener(); this.bindListener(); } }; target.prototype.globalShow = function (event) { if (this.mount) { // Create a fake event, specific show will limit the type to `solid` // only `float` type cares e.clientX e.clientY var e = { currentTarget: event.detail.target }; this.showTooltip(e, true); } }; target.prototype.globalHide = function (event) { if (this.mount) { var hasTarget = event && event.detail && event.detail.target && true || false; this.hideTooltip({ currentTarget: hasTarget && event.detail.target }, hasTarget); } }; }; var _constant = __webpack_require__(/*! ../constant */ "./bundles/differential-expression/node_modules/react-tooltip/dist/constant.js"); var _constant2 = _interopRequireDefault(_constant); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var dispatchGlobalEvent = function dispatchGlobalEvent(eventName, opts) { // Compatible with IE // @see http://stackoverflow.com/questions/26596123/internet-explorer-9-10-11-event-constructor-doesnt-work var event = void 0; if (typeof window.CustomEvent === 'function') { event = new window.CustomEvent(eventName, { detail: opts }); } else { event = document.createEvent('Event'); event.initEvent(eventName, false, true); event.detail = opts; } window.dispatchEvent(event); }; /** * Static methods for react-tooltip */ /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/trackRemoval.js": /*!****************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/trackRemoval.js ***! \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (target) { target.prototype.bindRemovalTracker = function () { var _this = this; var MutationObserver = getMutationObserverClass(); if (MutationObserver == null) return; var observer = new MutationObserver(function (mutations) { for (var m1 = 0; m1 < mutations.length; m1++) { var mutation = mutations[m1]; for (var m2 = 0; m2 < mutation.removedNodes.length; m2++) { var element = mutation.removedNodes[m2]; if (element === _this.state.currentTarget) { _this.hideTooltip(); return; } } } }); observer.observe(window.document, { childList: true, subtree: true }); this.removalTracker = observer; }; target.prototype.unbindRemovalTracker = function () { if (this.removalTracker) { this.removalTracker.disconnect(); this.removalTracker = null; } }; }; /** * Tracking target removing from DOM. * It's necessary to hide tooltip when it's target disappears. * Otherwise, the tooltip would be shown forever until another target * is triggered. * * If MutationObserver is not available, this feature just doesn't work. */ // https://hacks.mozilla.org/2012/05/dom-mutationobserver-reacting-to-dom-changes-without-killing-browser-performance/ var getMutationObserverClass = function getMutationObserverClass() { return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; }; /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/windowListener.js": /*!******************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/windowListener.js ***! \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (target) { target.prototype.bindWindowEvents = function (resizeHide) { // ReactTooltip.hide window.removeEventListener(_constant2.default.GLOBAL.HIDE, this.globalHide); window.addEventListener(_constant2.default.GLOBAL.HIDE, this.globalHide, false); // ReactTooltip.rebuild window.removeEventListener(_constant2.default.GLOBAL.REBUILD, this.globalRebuild); window.addEventListener(_constant2.default.GLOBAL.REBUILD, this.globalRebuild, false); // ReactTooltip.show window.removeEventListener(_constant2.default.GLOBAL.SHOW, this.globalShow); window.addEventListener(_constant2.default.GLOBAL.SHOW, this.globalShow, false); // Resize if (resizeHide) { window.removeEventListener('resize', this.onWindowResize); window.addEventListener('resize', this.onWindowResize, false); } }; target.prototype.unbindWindowEvents = function () { window.removeEventListener(_constant2.default.GLOBAL.HIDE, this.globalHide); window.removeEventListener(_constant2.default.GLOBAL.REBUILD, this.globalRebuild); window.removeEventListener(_constant2.default.GLOBAL.SHOW, this.globalShow); window.removeEventListener('resize', this.onWindowResize); }; /** * invoked by resize event of window */ target.prototype.onWindowResize = function () { if (!this.mount) return; this.hideTooltip(); }; }; var _constant = __webpack_require__(/*! ../constant */ "./bundles/differential-expression/node_modules/react-tooltip/dist/constant.js"); var _constant2 = _interopRequireDefault(_constant); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/index.js": /*!**********************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/index.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _class, _class2, _temp; /* Decorators */ /* Utils */ /* CSS */ var _react = __webpack_require__(/*! react */ "./node_modules/react/index.js"); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(/*! classnames */ "./bundles/differential-expression/node_modules/classnames/index.js"); var _classnames2 = _interopRequireDefault(_classnames); var _staticMethods = __webpack_require__(/*! ./decorators/staticMethods */ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/staticMethods.js"); var _staticMethods2 = _interopRequireDefault(_staticMethods); var _windowListener = __webpack_require__(/*! ./decorators/windowListener */ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/windowListener.js"); var _windowListener2 = _interopRequireDefault(_windowListener); var _customEvent = __webpack_require__(/*! ./decorators/customEvent */ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/customEvent.js"); var _customEvent2 = _interopRequireDefault(_customEvent); var _isCapture = __webpack_require__(/*! ./decorators/isCapture */ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/isCapture.js"); var _isCapture2 = _interopRequireDefault(_isCapture); var _getEffect = __webpack_require__(/*! ./decorators/getEffect */ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/getEffect.js"); var _getEffect2 = _interopRequireDefault(_getEffect); var _trackRemoval = __webpack_require__(/*! ./decorators/trackRemoval */ "./bundles/differential-expression/node_modules/react-tooltip/dist/decorators/trackRemoval.js"); var _trackRemoval2 = _interopRequireDefault(_trackRemoval); var _getPosition = __webpack_require__(/*! ./utils/getPosition */ "./bundles/differential-expression/node_modules/react-tooltip/dist/utils/getPosition.js"); var _getPosition2 = _interopRequireDefault(_getPosition); var _getTipContent = __webpack_require__(/*! ./utils/getTipContent */ "./bundles/differential-expression/node_modules/react-tooltip/dist/utils/getTipContent.js"); var _getTipContent2 = _interopRequireDefault(_getTipContent); var _aria = __webpack_require__(/*! ./utils/aria */ "./bundles/differential-expression/node_modules/react-tooltip/dist/utils/aria.js"); var _nodeListToArray = __webpack_require__(/*! ./utils/nodeListToArray */ "./bundles/differential-expression/node_modules/react-tooltip/dist/utils/nodeListToArray.js"); var _nodeListToArray2 = _interopRequireDefault(_nodeListToArray); var _style = __webpack_require__(/*! ./style */ "./bundles/differential-expression/node_modules/react-tooltip/dist/style.js"); var _style2 = _interopRequireDefault(_style); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.default)(_class = (0, _customEvent2.default)(_class = (0, _isCapture2.default)(_class = (0, _getEffect2.default)(_class = (0, _trackRemoval2.default)(_class = (_temp = _class2 = function (_React$Component) { _inherits(ReactTooltip, _React$Component); function ReactTooltip(props) { _classCallCheck(this, ReactTooltip); var _this = _possibleConstructorReturn(this, (ReactTooltip.__proto__ || Object.getPrototypeOf(ReactTooltip)).call(this, props)); _this.state = { place: props.place || 'top', // Direction of tooltip desiredPlace: props.place || 'top', type: 'dark', // Color theme of tooltip effect: 'float', // float or fixed show: false, border: false, offset: {}, extraClass: '', html: false, delayHide: 0, delayShow: 0, event: props.event || null, eventOff: props.eventOff || null, currentEvent: null, // Current mouse event currentTarget: null, // Current target of mouse event ariaProps: (0, _aria.parseAria)(props), // aria- and role attributes isEmptyTip: false, disable: false, originTooltip: null, isMultiline: false }; _this.bind(['showTooltip', 'updateTooltip', 'hideTooltip', 'getTooltipContent', 'globalRebuild', 'globalShow', 'globalHide', 'onWindowResize', 'mouseOnToolTip']); _this.mount = true; _this.delayShowLoop = null; _this.delayHideLoop = null; _this.delayReshow = null; _this.intervalUpdateContent = null; return _this; } /** * For unify the bind and unbind listener */ _createClass(ReactTooltip, [{ key: 'bind', value: function bind(methodArray) { var _this2 = this; methodArray.forEach(function (method) { _this2[method] = _this2[method].bind(_this2); }); } }, { key: 'componentDidMount', value: function componentDidMount() { var _props = this.props, insecure = _props.insecure, resizeHide = _props.resizeHide; if (insecure) { this.setStyleHeader(); // Set the style to the <link> } this.bindListener(); // Bind listener for tooltip this.bindWindowEvents(resizeHide); // Bind global event for static method } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.mount = false; this.clearTimer(); this.unbindListener(); this.removeScrollListener(); this.unbindWindowEvents(); } /** * Return if the mouse is on the tooltip. * @returns {boolean} true - mouse is on the tooltip */ }, { key: 'mouseOnToolTip', value: function mouseOnToolTip() { var show = this.state.show; if (show && this.tooltipRef) { /* old IE or Firefox work around */ if (!this.tooltipRef.matches) { /* old IE work around */ if (this.tooltipRef.msMatchesSelector) { this.tooltipRef.matches = this.tooltipRef.msMatchesSelector; } else { /* old Firefox work around */ this.tooltipRef.matches = this.tooltipRef.mozMatchesSelector; } } return this.tooltipRef.matches(':hover'); } return false; } /** * Pick out corresponded target elements */ }, { key: 'getTargetArray', value: function getTargetArray(id) { var targetArray = void 0; if (!id) { targetArray = document.querySelectorAll('[data-tip]:not([data-for])'); } else { var escaped = id.replace(/\\/g, '\\\\').replace(/"/g, '\\"'); targetArray = document.querySelectorAll('[data-tip][data-for="' + escaped + '"]'); } // targetArray is a NodeList, convert it to a real array return (0, _nodeListToArray2.default)(targetArray); } /** * Bind listener to the target elements * These listeners used to trigger showing or hiding the tooltip */ }, { key: 'bindListener', value: function bindListener() { var _this3 = this; var _props2 = this.props, id = _props2.id, globalEventOff = _props2.globalEventOff, isCapture = _props2.isCapture; var targetArray = this.getTargetArray(id); targetArray.forEach(function (target) { var isCaptureMode = _this3.isCapture(target); var effect = _this3.getEffect(target); if (target.getAttribute('currentItem') === null) { target.setAttribute('currentItem', 'false'); } _this3.unbindBasicListener(target); if (_this3.isCustomEvent(target)) { _this3.customBindListener(target); return; } target.addEventListener('mouseenter', _this3.showTooltip, isCaptureMode); if (effect === 'float') { target.addEventListener('mousemove', _this3.updateTooltip, isCaptureMode); } target.addEventListener('mouseleave', _this3.hideTooltip, isCaptureMode); }); // Global event to hide tooltip if (globalEventOff) { window.removeEventListener(globalEventOff, this.hideTooltip); window.addEventListener(globalEventOff, this.hideTooltip, isCapture); } // Track removal of targetArray elements from DOM this.bindRemovalTracker(); } /** * Unbind listeners on target elements */ }, { key: 'unbindListener', value: function unbindListener() { var _this4 = this; var _props3 = this.props, id = _props3.id, globalEventOff = _props3.globalEventOff; var targetArray = this.getTargetArray(id); targetArray.forEach(function (target) { _this4.unbindBasicListener(target); if (_this4.isCustomEvent(target)) _this4.customUnbindListener(target); }); if (globalEventOff) window.removeEventListener(globalEventOff, this.hideTooltip); this.unbindRemovalTracker(); } /** * Invoke this before bind listener and unmount the component * it is necessary to invoke this even when binding custom event * so that the tooltip can switch between custom and default listener */ }, { key: 'unbindBasicListener', value: function unbindBasicListener(target) { var isCaptureMode = this.isCapture(target); target.removeEventListener('mouseenter', this.showTooltip, isCaptureMode); target.removeEventListener('mousemove', this.updateTooltip, isCaptureMode); target.removeEventListener('mouseleave', this.hideTooltip, isCaptureMode); } }, { key: 'getTooltipContent', value: function getTooltipContent() { var _props4 = this.props, getContent = _props4.getContent, children = _props4.children; // Generate tooltip content var content = void 0; if (getContent) { if (Array.isArray(getContent)) { content = getContent[0] && getContent[0](this.state.originTooltip); } else { content = getContent(this.state.originTooltip); } } return (0, _getTipContent2.default)(this.state.originTooltip, children, content, this.state.isMultiline); } }, { key: 'isEmptyTip', value: function isEmptyTip(placeholder) { return typeof placeholder === 'string' && placeholder === '' || placeholder === null; } /** * When mouse enter, show the tooltip */ }, { key: 'showTooltip', value: function showTooltip(e, isGlobalCall) { if (isGlobalCall) { // Don't trigger other elements belongs to other ReactTooltip var targetArray = this.getTargetArray(this.props.id); var isMyElement = targetArray.some(function (ele) { return ele === e.currentTarget; }); if (!isMyElement) return; } // Get the tooltip content // calculate in this phrase so that tip width height can be detected var _props5 = this.props, multiline = _props5.multiline, getContent = _props5.getContent; var originTooltip = e.currentTarget.getAttribute('data-tip'); var isMultiline = e.currentTarget.getAttribute('data-multiline') || multiline || false; // If it is focus event or called by ReactTooltip.show, switch to `solid` effect var switchToSolid = e instanceof window.FocusEvent || isGlobalCall; // if it needs to skip adding hide listener to scroll var scrollHide = true; if (e.currentTarget.getAttribute('data-scroll-hide')) { scrollHide = e.currentTarget.getAttribute('data-scroll-hide') === 'true'; } else if (this.props.scrollHide != null) { scrollHide = this.props.scrollHide; } // Make sure the correct place is set var desiredPlace = e.currentTarget.getAttribute('data-place') || this.props.place || 'top'; var effect = switchToSolid && 'solid' || this.getEffect(e.currentTarget); var offset = e.currentTarget.getAttribute('data-offset') || this.props.offset || {}; var result = (0, _getPosition2.default)(e, e.currentTarget, this.tooltipRef, desiredPlace, desiredPlace, effect, offset); var place = result.isNewState ? result.newState.place : desiredPlace; // To prevent previously created timers from triggering this.clearTimer(); var target = e.currentTarget; var reshowDelay = this.state.show ? target.getAttribute('data-delay-update') || this.props.delayUpdate : 0; var self = this; var updateState = function updateState() { self.setState({ originTooltip: originTooltip, isMultiline: isMultiline, desiredPlace: desiredPlace, place: place, type: target.getAttribute('data-type') || self.props.type || 'dark', effect: effect, offset: offset, html: target.getAttribute('data-html') ? target.getAttribute('data-html') === 'true' : self.props.html || false, delayShow: target.getAttribute('data-delay-show') || self.props.delayShow || 0, delayHide: target.getAttribute('data-delay-hide') || self.props.delayHide || 0, delayUpdate: target.getAttribute('data-delay-update') || self.props.delayUpdate || 0, border: target.getAttribute('data-border') ? target.getAttribute('data-border') === 'true' : self.props.border || false, extraClass: target.getAttribute('data-class') || self.props.class || self.props.className || '', disable: target.getAttribute('data-tip-disable') ? target.getAttribute('data-tip-disable') === 'true' : self.props.disable || false, currentTarget: target }, function () { if (scrollHide) self.addScrollListener(self.state.currentTarget); self.updateTooltip(e); if (getContent && Array.isArray(getContent)) { self.intervalUpdateContent = setInterval(function () { if (self.mount) { var _getContent = self.props.getContent; var placeholder = (0, _getTipContent2.default)(originTooltip, '', _getContent[0](), isMultiline); var isEmptyTip = self.isEmptyTip(placeholder); self.setState({ isEmptyTip: isEmptyTip }); self.updatePosition(); } }, getContent[1]); } }); }; // If there is no delay call immediately, don't allow events to get in first. if (reshowDelay) { this.delayReshow = setTimeout(updateState, reshowDelay); } else { updateState(); } } /** * When mouse hover, update tool tip */ }, { key: 'updateTooltip', value: function updateTooltip(e) { var _this5 = this; var _state = this.state, delayShow = _state.delayShow, disable = _state.disable; var afterShow = this.props.afterShow; var placeholder = this.getTooltipContent(); var delayTime = parseInt(delayShow, 10); var eventTarget = e.currentTarget || e.target; // Check if the mouse is actually over the tooltip, if so don't hide the tooltip if (this.mouseOnToolTip()) { return; } if (this.isEmptyTip(placeholder) || disable) return; // if the tooltip is empty, disable the tooltip var updateState = function updateState() { if (Array.isArray(placeholder) && placeholder.length > 0 || placeholder) { var isInvisible = !_this5.state.show; _this5.setState({ currentEvent: e, currentTarget: eventTarget, show: true }, function () { _this5.updatePosition(); if (isInvisible && afterShow) afterShow(e); }); } }; clearTimeout(this.delayShowLoop); if (delayShow) { this.delayShowLoop = setTimeout(updateState, delayTime); } else { updateState(); } } /* * If we're mousing over the tooltip remove it when we leave. */ }, { key: 'listenForTooltipExit', value: function listenForTooltipExit() { var show = this.state.show; if (show && this.tooltipRef) { this.tooltipRef.addEventListener('mouseleave', this.hideTooltip); } } }, { key: 'removeListenerForTooltipExit', value: function removeListenerForTooltipExit() { var show = this.state.show; if (show && this.tooltipRef) { this.tooltipRef.removeEventListener('mouseleave', this.hideTooltip); } } /** * When mouse leave, hide tooltip */ }, { key: 'hideTooltip', value: function hideTooltip(e, hasTarget) { var _this6 = this; var _state2 = this.state, delayHide = _state2.delayHide, disable = _state2.disable; var afterHide = this.props.afterHide; var placeholder = this.getTooltipContent(); if (!this.mount) return; if (this.isEmptyTip(placeholder) || disable) return; // if the tooltip is empty, disable the tooltip if (hasTarget) { // Don't trigger other elements belongs to other ReactTooltip var targetArray = this.getTargetArray(this.props.id); var isMyElement = targetArray.some(function (ele) { return ele === e.currentTarget; }); if (!isMyElement || !this.state.show) return; } var resetState = function resetState() { var isVisible = _this6.state.show; // Check if the mouse is actually over the tooltip, if so don't hide the tooltip if (_this6.mouseOnToolTip()) { _this6.listenForTooltipExit(); return; } _this6.removeListenerForTooltipExit(); _this6.setState({ show: false }, function () { _this6.removeScrollListener(); if (isVisible && afterHide) afterHide(e); }); }; this.clearTimer(); if (delayHide) { this.delayHideLoop = setTimeout(resetState, parseInt(delayHide, 10)); } else { resetState(); } } /** * Add scroll event listener when tooltip show * automatically hide the tooltip when scrolling */ }, { key: 'addScrollListener', value: function addScrollListener(currentTarget) { var isCaptureMode = this.isCapture(currentTarget); window.addEventListener('scroll', this.hideTooltip, isCaptureMode); } }, { key: 'removeScrollListener', value: function removeScrollListener() { window.removeEventListener('scroll', this.hideTooltip); } // Calculation the position }, { key: 'updatePosition', value: function updatePosition() { var _this7 = this; var _state3 = this.state, currentEvent = _state3.currentEvent, currentTarget = _state3.currentTarget, place = _state3.place, desiredPlace = _state3.desiredPlace, effect = _state3.effect, offset = _state3.offset; var node = this.tooltipRef; var result = (0, _getPosition2.default)(currentEvent, currentTarget, node, place, desiredPlace, effect, offset); if (result.isNewState) { // Switch to reverse placement return this.setState(result.newState, function () { _this7.updatePosition(); }); } // Set tooltip position node.style.left = result.position.left + 'px'; node.style.top = result.position.top + 'px'; } /** * Set style tag in header * in this way we can insert default css */ }, { key: 'setStyleHeader', value: function setStyleHeader() { var head = document.getElementsByTagName('head')[0]; if (!head.querySelector('style[id="react-tooltip"]')) { var tag = document.createElement('style'); tag.id = 'react-tooltip'; tag.innerHTML = _style2.default; /* eslint-disable */ if ( true && __webpack_require__.nc) { tag.setAttribute('nonce', __webpack_require__.nc); } /* eslint-enable */ head.insertBefore(tag, head.firstChild); } } /** * CLear all kinds of timeout of interval */ }, { key: 'clearTimer', value: function clearTimer() { clearTimeout(this.delayShowLoop); clearTimeout(this.delayHideLoop); clearTimeout(this.delayReshow); clearInterval(this.intervalUpdateContent); } }, { key: 'render', value: function render() { var _this8 = this; var _state4 = this.state, extraClass = _state4.extraClass, html = _state4.html, ariaProps = _state4.ariaProps, disable = _state4.disable; var placeholder = this.getTooltipContent(); var isEmptyTip = this.isEmptyTip(placeholder); var tooltipClass = (0, _classnames2.default)('__react_component_tooltip', { 'show': this.state.show && !disable && !isEmptyTip }, { 'border': this.state.border }, { 'place-top': this.state.place === 'top' }, { 'place-bottom': this.state.place === 'bottom' }, { 'place-left': this.state.place === 'left' }, { 'place-right': this.state.place === 'right' }, { 'type-dark': this.state.type === 'dark' }, { 'type-success': this.state.type === 'success' }, { 'type-warning': this.state.type === 'warning' }, { 'type-error': this.state.type === 'error' }, { 'type-info': this.state.type === 'info' }, { 'type-light': this.state.type === 'light' }, { 'allow_hover': this.props.delayUpdate }, { 'allow_click': this.props.clickable }); var Wrapper = this.props.wrapper; if (ReactTooltip.supportedWrappers.indexOf(Wrapper) < 0) { Wrapper = ReactTooltip.defaultProps.wrapper; } if (html) { return _react2.default.createElement(Wrapper, _extends({ className: tooltipClass + ' ' + extraClass, id: this.props.id, ref: function ref(_ref) { return _this8.tooltipRef = _ref; } }, ariaProps, { 'data-id': 'tooltip', dangerouslySetInnerHTML: { __html: placeholder } })); } else { return _react2.default.createElement( Wrapper, _extends({ className: tooltipClass + ' ' + extraClass, id: this.props.id }, ariaProps, { ref: function ref(_ref2) { return _this8.tooltipRef = _ref2; }, 'data-id': 'tooltip' }), placeholder ); } } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(nextProps, prevState) { var ariaProps = prevState.ariaProps; var newAriaProps = (0, _aria.parseAria)(nextProps); var isChanged = Object.keys(newAriaProps).some(function (props) { return newAriaProps[props] !== ariaProps[props]; }); if (!isChanged) { return null; } return _extends({}, prevState, { ariaProps: newAriaProps }); } }]); return ReactTooltip; }(_react2.default.Component), _class2.propTypes = { children: _propTypes2.default.any, place: _propTypes2.default.string, type: _propTypes2.default.string, effect: _propTypes2.default.string, offset: _propTypes2.default.object, multiline: _propTypes2.default.bool, border: _propTypes2.default.bool, insecure: _propTypes2.default.bool, class: _propTypes2.default.string, className: _propTypes2.default.string, id: _propTypes2.default.string, html: _propTypes2.default.bool, delayHide: _propTypes2.default.number, delayUpdate: _propTypes2.default.number, delayShow: _propTypes2.default.number, event: _propTypes2.default.string, eventOff: _propTypes2.default.string, watchWindow: _propTypes2.default.bool, isCapture: _propTypes2.default.bool, globalEventOff: _propTypes2.default.string, getContent: _propTypes2.default.any, afterShow: _propTypes2.default.func, afterHide: _propTypes2.default.func, disable: _propTypes2.default.bool, scrollHide: _propTypes2.default.bool, resizeHide: _propTypes2.default.bool, wrapper: _propTypes2.default.string, clickable: _propTypes2.default.bool }, _class2.defaultProps = { insecure: true, resizeHide: true, wrapper: 'div', clickable: false }, _class2.supportedWrappers = ['div', 'span'], _class2.displayName = 'ReactTooltip', _temp)) || _class) || _class) || _class) || _class) || _class) || _class; /* export default not fit for standalone, it will exports {default:...} */ module.exports = ReactTooltip; /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/style.js": /*!**********************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/style.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = '.__react_component_tooltip{border-radius:3px;display:inline-block;font-size:13px;left:-999em;opacity:0;padding:8px 21px;position:fixed;pointer-events:none;transition:opacity 0.3s ease-out;top:-999em;visibility:hidden;z-index:999}.__react_component_tooltip.allow_hover,.__react_component_tooltip.allow_click{pointer-events:auto}.__react_component_tooltip:before,.__react_component_tooltip:after{content:"";width:0;height:0;position:absolute}.__react_component_tooltip.show{opacity:0.9;margin-top:0px;margin-left:0px;visibility:visible}.__react_component_tooltip.type-dark{color:#fff;background-color:#222}.__react_component_tooltip.type-dark.place-top:after{border-top-color:#222;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-dark.place-bottom:after{border-bottom-color:#222;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-dark.place-left:after{border-left-color:#222;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-dark.place-right:after{border-right-color:#222;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-dark.border{border:1px solid #fff}.__react_component_tooltip.type-dark.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-dark.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-dark.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-dark.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-success{color:#fff;background-color:#8DC572}.__react_component_tooltip.type-success.place-top:after{border-top-color:#8DC572;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-success.place-bottom:after{border-bottom-color:#8DC572;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-success.place-left:after{border-left-color:#8DC572;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-success.place-right:after{border-right-color:#8DC572;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-success.border{border:1px solid #fff}.__react_component_tooltip.type-success.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-success.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-success.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-success.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-warning{color:#fff;background-color:#F0AD4E}.__react_component_tooltip.type-warning.place-top:after{border-top-color:#F0AD4E;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-warning.place-bottom:after{border-bottom-color:#F0AD4E;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-warning.place-left:after{border-left-color:#F0AD4E;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-warning.place-right:after{border-right-color:#F0AD4E;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-warning.border{border:1px solid #fff}.__react_component_tooltip.type-warning.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-warning.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-warning.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-warning.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-error{color:#fff;background-color:#BE6464}.__react_component_tooltip.type-error.place-top:after{border-top-color:#BE6464;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-error.place-bottom:after{border-bottom-color:#BE6464;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-error.place-left:after{border-left-color:#BE6464;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-error.place-right:after{border-right-color:#BE6464;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-error.border{border:1px solid #fff}.__react_component_tooltip.type-error.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-error.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-error.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-error.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-info{color:#fff;background-color:#337AB7}.__react_component_tooltip.type-info.place-top:after{border-top-color:#337AB7;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-info.place-bottom:after{border-bottom-color:#337AB7;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-info.place-left:after{border-left-color:#337AB7;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-info.place-right:after{border-right-color:#337AB7;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-info.border{border:1px solid #fff}.__react_component_tooltip.type-info.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-info.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-info.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-info.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-light{color:#222;background-color:#fff}.__react_component_tooltip.type-light.place-top:after{border-top-color:#fff;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-light.place-bottom:after{border-bottom-color:#fff;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-light.place-left:after{border-left-color:#fff;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-light.place-right:after{border-right-color:#fff;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-light.border{border:1px solid #222}.__react_component_tooltip.type-light.border.place-top:before{border-top:8px solid #222}.__react_component_tooltip.type-light.border.place-bottom:before{border-bottom:8px solid #222}.__react_component_tooltip.type-light.border.place-left:before{border-left:8px solid #222}.__react_component_tooltip.type-light.border.place-right:before{border-right:8px solid #222}.__react_component_tooltip.place-top{margin-top:-10px}.__react_component_tooltip.place-top:before{border-left:10px solid transparent;border-right:10px solid transparent;bottom:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-top:after{border-left:8px solid transparent;border-right:8px solid transparent;bottom:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-bottom{margin-top:10px}.__react_component_tooltip.place-bottom:before{border-left:10px solid transparent;border-right:10px solid transparent;top:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-bottom:after{border-left:8px solid transparent;border-right:8px solid transparent;top:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-left{margin-left:-10px}.__react_component_tooltip.place-left:before{border-top:6px solid transparent;border-bottom:6px solid transparent;right:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-left:after{border-top:5px solid transparent;border-bottom:5px solid transparent;right:-6px;top:50%;margin-top:-4px}.__react_component_tooltip.place-right{margin-left:10px}.__react_component_tooltip.place-right:before{border-top:6px solid transparent;border-bottom:6px solid transparent;left:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-right:after{border-top:5px solid transparent;border-bottom:5px solid transparent;left:-6px;top:50%;margin-top:-4px}.__react_component_tooltip .multi-line{display:block;padding:2px 0px;text-align:center}'; /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/utils/aria.js": /*!***************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/utils/aria.js ***! \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseAria = parseAria; /** * Support aria- and role in ReactTooltip * * @params props {Object} * @return {Object} */ function parseAria(props) { var ariaObj = {}; Object.keys(props).filter(function (prop) { // aria-xxx and role is acceptable return (/(^aria-\w+$|^role$)/.test(prop) ); }).forEach(function (prop) { ariaObj[prop] = props[prop]; }); return ariaObj; } /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/utils/getPosition.js": /*!**********************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/utils/getPosition.js ***! \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (e, target, node, place, desiredPlace, effect, offset) { var _getDimensions = getDimensions(node), tipWidth = _getDimensions.width, tipHeight = _getDimensions.height; var _getDimensions2 = getDimensions(target), targetWidth = _getDimensions2.width, targetHeight = _getDimensions2.height; var _getCurrentOffset = getCurrentOffset(e, target, effect), mouseX = _getCurrentOffset.mouseX, mouseY = _getCurrentOffset.mouseY; var defaultOffset = getDefaultPosition(effect, targetWidth, targetHeight, tipWidth, tipHeight); var _calculateOffset = calculateOffset(offset), extraOffset_X = _calculateOffset.extraOffset_X, extraOffset_Y = _calculateOffset.extraOffset_Y; var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; var _getParent = getParent(node), parentTop = _getParent.parentTop, parentLeft = _getParent.parentLeft; // Get the edge offset of the tooltip var getTipOffsetLeft = function getTipOffsetLeft(place) { var offset_X = defaultOffset[place].l; return mouseX + offset_X + extraOffset_X; }; var getTipOffsetRight = function getTipOffsetRight(place) { var offset_X = defaultOffset[place].r; return mouseX + offset_X + extraOffset_X; }; var getTipOffsetTop = function getTipOffsetTop(place) { var offset_Y = defaultOffset[place].t; return mouseY + offset_Y + extraOffset_Y; }; var getTipOffsetBottom = function getTipOffsetBottom(place) { var offset_Y = defaultOffset[place].b; return mouseY + offset_Y + extraOffset_Y; }; // // Functions to test whether the tooltip's sides are inside // the client window for a given orientation p // // _____________ // | | <-- Right side // | p = 'left' |\ // | |/ |\ // |_____________| |_\ <-- Mouse // / \ | // | // | // Bottom side // var outsideLeft = function outsideLeft(p) { return getTipOffsetLeft(p) < 0; }; var outsideRight = function outsideRight(p) { return getTipOffsetRight(p) > windowWidth; }; var outsideTop = function outsideTop(p) { return getTipOffsetTop(p) < 0; }; var outsideBottom = function outsideBottom(p) { return getTipOffsetBottom(p) > windowHeight; }; // Check whether the tooltip with orientation p is completely inside the client window var outside = function outside(p) { return outsideLeft(p) || outsideRight(p) || outsideTop(p) || outsideBottom(p); }; var inside = function inside(p) { return !outside(p); }; var placesList = ['top', 'bottom', 'left', 'right']; var insideList = []; for (var i = 0; i < 4; i++) { var p = placesList[i]; if (inside(p)) { insideList.push(p); } } var isNewState = false; var newPlace = void 0; if (inside(desiredPlace) && desiredPlace !== place) { isNewState = true; newPlace = desiredPlace; } else if (insideList.length > 0 && outside(desiredPlace) && outside(place)) { isNewState = true; newPlace = insideList[0]; } if (isNewState) { return { isNewState: true, newState: { place: newPlace } }; } return { isNewState: false, position: { left: parseInt(getTipOffsetLeft(place) - parentLeft, 10), top: parseInt(getTipOffsetTop(place) - parentTop, 10) } }; }; var getDimensions = function getDimensions(node) { var _node$getBoundingClie = node.getBoundingClientRect(), height = _node$getBoundingClie.height, width = _node$getBoundingClie.width; return { height: parseInt(height, 10), width: parseInt(width, 10) }; }; // Get current mouse offset /** * Calculate the position of tooltip * * @params * - `e` {Event} the event of current mouse * - `target` {Element} the currentTarget of the event * - `node` {DOM} the react-tooltip object * - `place` {String} top / right / bottom / left * - `effect` {String} float / solid * - `offset` {Object} the offset to default position * * @return {Object} * - `isNewState` {Bool} required * - `newState` {Object} * - `position` {Object} {left: {Number}, top: {Number}} */ var getCurrentOffset = function getCurrentOffset(e, currentTarget, effect) { var boundingClientRect = currentTarget.getBoundingClientRect(); var targetTop = boundingClientRect.top; var targetLeft = boundingClientRect.left; var _getDimensions3 = getDimensions(currentTarget), targetWidth = _getDimensions3.width, targetHeight = _getDimensions3.height; if (effect === 'float') { return { mouseX: e.clientX, mouseY: e.clientY }; } return { mouseX: targetLeft + targetWidth / 2, mouseY: targetTop + targetHeight / 2 }; }; // List all possibility of tooltip final offset // This is useful in judging if it is necessary for tooltip to switch position when out of window var getDefaultPosition = function getDefaultPosition(effect, targetWidth, targetHeight, tipWidth, tipHeight) { var top = void 0; var right = void 0; var bottom = void 0; var left = void 0; var disToMouse = 3; var triangleHeight = 2; var cursorHeight = 12; // Optimize for float bottom only, cause the cursor will hide the tooltip if (effect === 'float') { top = { l: -(tipWidth / 2), r: tipWidth / 2, t: -(tipHeight + disToMouse + triangleHeight), b: -disToMouse }; bottom = { l: -(tipWidth / 2), r: tipWidth / 2, t: disToMouse + cursorHeight, b: tipHeight + disToMouse + triangleHeight + cursorHeight }; left = { l: -(tipWidth + disToMouse + triangleHeight), r: -disToMouse, t: -(tipHeight / 2), b: tipHeight / 2 }; right = { l: disToMouse, r: tipWidth + disToMouse + triangleHeight, t: -(tipHeight / 2), b: tipHeight / 2 }; } else if (effect === 'solid') { top = { l: -(tipWidth / 2), r: tipWidth / 2, t: -(targetHeight / 2 + tipHeight + triangleHeight), b: -(targetHeight / 2) }; bottom = { l: -(tipWidth / 2), r: tipWidth / 2, t: targetHeight / 2, b: targetHeight / 2 + tipHeight + triangleHeight }; left = { l: -(tipWidth + targetWidth / 2 + triangleHeight), r: -(targetWidth / 2), t: -(tipHeight / 2), b: tipHeight / 2 }; right = { l: targetWidth / 2, r: tipWidth + targetWidth / 2 + triangleHeight, t: -(tipHeight / 2), b: tipHeight / 2 }; } return { top: top, bottom: bottom, left: left, right: right }; }; // Consider additional offset into position calculation var calculateOffset = function calculateOffset(offset) { var extraOffset_X = 0; var extraOffset_Y = 0; if (Object.prototype.toString.apply(offset) === '[object String]') { offset = JSON.parse(offset.toString().replace(/\'/g, '\"')); } for (var key in offset) { if (key === 'top') { extraOffset_Y -= parseInt(offset[key], 10); } else if (key === 'bottom') { extraOffset_Y += parseInt(offset[key], 10); } else if (key === 'left') { extraOffset_X -= parseInt(offset[key], 10); } else if (key === 'right') { extraOffset_X += parseInt(offset[key], 10); } } return { extraOffset_X: extraOffset_X, extraOffset_Y: extraOffset_Y }; }; // Get the offset of the parent elements var getParent = function getParent(currentTarget) { var currentParent = currentTarget; while (currentParent) { if (window.getComputedStyle(currentParent).getPropertyValue('transform') !== 'none') break; currentParent = currentParent.parentElement; } var parentTop = currentParent && currentParent.getBoundingClientRect().top || 0; var parentLeft = currentParent && currentParent.getBoundingClientRect().left || 0; return { parentTop: parentTop, parentLeft: parentLeft }; }; /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/utils/getTipContent.js": /*!************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/utils/getTipContent.js ***! \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (tip, children, getContent, multiline) { if (children) return children; if (getContent !== undefined && getContent !== null) return getContent; // getContent can be 0, '', etc. if (getContent === null) return null; // Tip not exist and children is null or undefined var regexp = /<br\s*\/?>/; if (!multiline || multiline === 'false' || !regexp.test(tip)) { // No trim(), so that user can keep their input return tip; } // Multiline tooltip content return tip.split(regexp).map(function (d, i) { return _react2.default.createElement( 'span', { key: i, className: 'multi-line' }, d ); }); }; var _react = __webpack_require__(/*! react */ "./node_modules/react/index.js"); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), /***/ "./bundles/differential-expression/node_modules/react-tooltip/dist/utils/nodeListToArray.js": /*!**************************************************************************************************!*\ !*** ./bundles/differential-expression/node_modules/react-tooltip/dist/utils/nodeListToArray.js ***! \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (nodeList) { var length = nodeList.length; if (nodeList.hasOwnProperty) { return Array.prototype.slice.call(nodeList); } return new Array(length).fill().map(function (index) { return nodeList[index]; }); }; /***/ }), /***/ "./bundles/differential-expression/src/DifferentialDownloadButton.js": /*!***************************************************************************!*\ !*** ./bundles/differential-expression/src/DifferentialDownloadButton.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var jsonToTsv = function jsonToTsv(results) { var arrayResults = _typeof(results) !== "object" ? JSON.parse(results) : results; return [["Gene", "Species", "Experiment accession", "Comparison", "log_2 fold change", "Adjusted p-value"].concat(arrayResults.some(function (diffResults) { return diffResults.tStatistics !== null; }) ? ["t-statistic"] : []).join("\t")].concat(arrayResults.map(function (diffResults) { return [diffResults.bioentityIdentifier, diffResults.species, diffResults.experimentAccession, diffResults.comparison, diffResults.foldChange, diffResults.pValue, diffResults.tStatistics].filter(function (el) { return el !== null; }) // tStatistics might be missing .join("\t"); })).join("\n"); }; var DownloadDifferentialButton = function DownloadDifferentialButton(_ref) { var results = _ref.results; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { className: "button", download: "differentialResults.tsv", href: "data:text/tsv;charset=utf-8,".concat(encodeURI(jsonToTsv(results))), target: "_blank" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: "icon icon-functional", "data-icon": "=" }, " Download results")); }; DownloadDifferentialButton.propTypes = { results: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape({ species: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, kingdom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, experimentType: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, numReplicates: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired, // faceting only works with strings https://issues.apache.org/jira/browse/SOLR-7496 regulation: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, factors: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string).isRequired, bioentityIdentifier: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, experimentAccession: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, experimentName: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, contrastId: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, comparison: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, foldChange: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired, pValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired, tStatistics: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, colour: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired })).isRequired }; /* harmony default export */ __webpack_exports__["default"] = (DownloadDifferentialButton); /***/ }), /***/ "./bundles/differential-expression/src/DifferentialFoldChangeCell.js": /*!***************************************************************************!*\ !*** ./bundles/differential-expression/src/DifferentialFoldChangeCell.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var react_tooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-tooltip */ "./bundles/differential-expression/node_modules/react-tooltip/dist/index.js"); /* harmony import */ var react_tooltip__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_tooltip__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _tooltip_DifferentialFoldChangeCellInfo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tooltip/DifferentialFoldChangeCellInfo */ "./bundles/differential-expression/src/tooltip/DifferentialFoldChangeCellInfo.js"); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var _templateObject; function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); } var DifferentialCellTd = styled_components__WEBPACK_IMPORTED_MODULE_2__["default"].td(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: white;\n white-space: nowrap;\n font-size: x-large;\n border: ", " ", ";\n background: ", "\n"])), function (props) { return props.displayLevels ? "3px solid" : "none"; }, function (props) { return props.colour; }, function (props) { return props.displayLevels ? "none" : props.colour; }); var DifferentialCell = function DifferentialCell(_ref) { var colour = _ref.colour, foldChange = _ref.foldChange, pValue = _ref.pValue, tStat = _ref.tStat, displayLevels = _ref.displayLevels, id = _ref.id; var tooltipId = "".concat(id, "_foldchange"); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DifferentialCellTd, { colour: colour, displayLevels: displayLevels, "data-tip": true, "data-for": tooltipId }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: displayLevels ? "" : "hidden", style: { textAlign: "center" } }, foldChange), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_tooltip__WEBPACK_IMPORTED_MODULE_3___default.a, { id: tooltipId, type: "light", className: "foobar" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_tooltip_DifferentialFoldChangeCellInfo__WEBPACK_IMPORTED_MODULE_4__["default"], { pValue: pValue, tStatistic: tStat, foldChange: foldChange }))); }; DifferentialCell.propTypes = _objectSpread(_objectSpread({}, _tooltip_DifferentialFoldChangeCellInfo__WEBPACK_IMPORTED_MODULE_4__["default"].propTypes), {}, { colour: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, displayLevels: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool.isRequired, id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired }); /* harmony default export */ __webpack_exports__["default"] = (DifferentialCell); /***/ }), /***/ "./bundles/differential-expression/src/DifferentialResults.js": /*!********************************************************************!*\ !*** ./bundles/differential-expression/src/DifferentialResults.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var urijs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! urijs */ "./node_modules/urijs/src/URI.js"); /* harmony import */ var urijs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(urijs__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _ebi_gene_expression_group_react_ebi_species__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ebi-gene-expression-group/react-ebi-species */ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/react-ebi-species/lib/index.js"); /* harmony import */ var _ebi_gene_expression_group_react_ebi_species__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_ebi_gene_expression_group_react_ebi_species__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _DisplayLevelsButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DisplayLevelsButton */ "./bundles/differential-expression/src/DisplayLevelsButton.js"); /* harmony import */ var _DifferentialDownloadButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./DifferentialDownloadButton */ "./bundles/differential-expression/src/DifferentialDownloadButton.js"); /* harmony import */ var _DifferentialFoldChangeCell__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./DifferentialFoldChangeCell */ "./bundles/differential-expression/src/DifferentialFoldChangeCell.js"); /* harmony import */ var _legend_LegendDifferential__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./legend/LegendDifferential */ "./bundles/differential-expression/src/legend/LegendDifferential.js"); /* harmony import */ var _tooltip_ContrastTooltipLoader__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./tooltip/ContrastTooltipLoader */ "./bundles/differential-expression/src/tooltip/ContrastTooltipLoader.js"); /* harmony import */ var _ebi_gene_expression_group_atlas_react_fetch_loader__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ebi-gene-expression-group/atlas-react-fetch-loader */ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/atlas-react-fetch-loader/lib/index.js"); /* harmony import */ var _ebi_gene_expression_group_atlas_react_fetch_loader__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_ebi_gene_expression_group_atlas_react_fetch_loader__WEBPACK_IMPORTED_MODULE_10__); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var _templateObject, _templateObject2; function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); } var FetchLoaderContrastTooltip = Object(_ebi_gene_expression_group_atlas_react_fetch_loader__WEBPACK_IMPORTED_MODULE_10__["withFetchLoader"])(_tooltip_ContrastTooltipLoader__WEBPACK_IMPORTED_MODULE_9__["default"]); var Header = styled_components__WEBPACK_IMPORTED_MODULE_2__["default"].th(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-align: center;\n"]))); var Data = styled_components__WEBPACK_IMPORTED_MODULE_2__["default"].td(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n text-align: center;\n"]))); var differentialResultRowDataPropTypes = { species: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, kingdom: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, experimentType: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, numReplicates: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, regulation: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, factors: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string).isRequired, bioentityIdentifier: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, bioentityName: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, experimentAccession: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, experimentName: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, contrastId: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, comparison: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, foldChange: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired, colour: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, uri: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired }; var DifferentialResultsRow = function DifferentialResultsRow(props) { var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(false), _useState2 = _slicedToArray(_useState, 2), inHover = _useState2[0], setHover = _useState2[1]; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DifferentialFoldChangeCell__WEBPACK_IMPORTED_MODULE_7__["default"], { foldChange: props.foldChange, pValue: props.pValue, tStat: props.tStatistics, displayLevels: props.displayLevels, colour: props.colour, id: props.id }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Data, { style: { fontSize: "3rem" } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ebi_gene_expression_group_react_ebi_species__WEBPACK_IMPORTED_MODULE_4___default.a, { species: props.species })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Data, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { href: urijs__WEBPACK_IMPORTED_MODULE_3___default()("genes/".concat(props.bioentityIdentifier), props.atlasUrl).toString() }, props.bioentityName || props.bioentityIdentifier)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Data, { "data-tip": true, "data-for": "".concat(props.id, "_contrast") }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { href: urijs__WEBPACK_IMPORTED_MODULE_3___default()(props.uri, props.atlasUrl), onMouseEnter: function onMouseEnter() { return setHover(true); } }, props.comparison), inHover && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(FetchLoaderContrastTooltip, { id: "".concat(props.id, "_contrast"), host: props.atlasUrl, resource: urijs__WEBPACK_IMPORTED_MODULE_3___default()("rest/contrast-summary"), query: { experimentAccession: props.experimentAccession, contrastId: props.contrastId, accessKey: props.accessKey }, fulfilledPayloadProvider: function fulfilledPayloadProvider(data) { return { result: data }; } })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Data, null, props.factors ? props.factors.toString().replace(/,/g, ", ") : ""), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Data, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { href: urijs__WEBPACK_IMPORTED_MODULE_3___default()("experiments/".concat(props.experimentAccession), props.atlasUrl).toString() }, props.experimentName))); }; DifferentialResultsRow.propTypes = _objectSpread(_objectSpread({}, differentialResultRowDataPropTypes), {}, { atlasUrl: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired }); var DifferentialResults = /*#__PURE__*/function (_React$Component) { function DifferentialResults(props) { var _this; _classCallCheck(this, DifferentialResults); _this = _callSuper(this, DifferentialResults, [props]); _this.state = { displayLevels: false }; _this._toggleDisplayLevels = _this._toggleDisplayLevels.bind(_this); return _this; } _inherits(DifferentialResults, _React$Component); return _createClass(DifferentialResults, [{ key: "_toggleDisplayLevels", value: function _toggleDisplayLevels() { var newDisplayLevels = !this.state.displayLevels; this.setState({ displayLevels: newDisplayLevels }); } }, { key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "row column expanded" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "row column expanded" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "small-2 columns padding-left-none padding-right-none center" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_legend_LegendDifferential__WEBPACK_IMPORTED_MODULE_8__["default"], { minDownLevel: this.props.minDownLevel, maxDownLevel: this.props.maxDownLevel, minUpLevel: this.props.minUpLevel, maxUpLevel: this.props.maxUpLevel })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "small-2 columns padding-left-none padding-right-none margin-left-large text-center" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DisplayLevelsButton__WEBPACK_IMPORTED_MODULE_5__["default"], { onClick: this._toggleDisplayLevels, displayLevels: this.state.displayLevels })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "small-2 columns padding-left-none padding-right-none margin-left-large text-right" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DifferentialDownloadButton__WEBPACK_IMPORTED_MODULE_6__["default"], { results: this.props.results }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "row column expanded" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("table", { className: "gxaDifferentialResultsTable" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("thead", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, { style: { width: "10%" } }, "Log", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("sub", null, "2"), "-fold change"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, { style: { width: "5%" } }, "Species"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, { style: { width: "5%" } }, "Gene name"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, { style: { width: "30%" } }, "Comparison"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, { style: { width: "15%" } }, "Experimental variables"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, { style: { width: "35%" } }, "Experiment name"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tbody", null, this.props.results.map(function (diffResult) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DifferentialResultsRow, _extends({ key: diffResult.id, displayLevels: _this2.state.displayLevels, atlasUrl: _this2.props.atlasUrl }, diffResult)); }))))); } }]); }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component); DifferentialResults.propTypes = { results: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape(differentialResultRowDataPropTypes)).isRequired, maxDownLevel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, minDownLevel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, minUpLevel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, maxUpLevel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, atlasUrl: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired }; DifferentialResults.defaultProps = { maxDownLevel: Number.NEGATIVE_INFINITY, minDownLevel: 0, minUpLevel: 0, maxUpLevel: Number.POSITIVE_INFINITY }; /* harmony default export */ __webpack_exports__["default"] = (DifferentialResults); /***/ }), /***/ "./bundles/differential-expression/src/DifferentialRouter.js": /*!*******************************************************************!*\ !*** ./bundles/differential-expression/src/DifferentialRouter.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _tooltip_ReactTooltipStyleClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tooltip/ReactTooltipStyleClass */ "./bundles/differential-expression/src/tooltip/ReactTooltipStyleClass.js"); /* harmony import */ var _DifferentialResults__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DifferentialResults */ "./bundles/differential-expression/src/DifferentialResults.js"); /* harmony import */ var _facets_tree_DifferentialFacetsTree__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./facets-tree/DifferentialFacetsTree */ "./bundles/differential-expression/src/facets-tree/DifferentialFacetsTree.js"); /* harmony import */ var _urlManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./urlManager */ "./bundles/differential-expression/src/urlManager.js"); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } /* TODO if Solr queries get fast enough that we can: - split the two requests, so that the facets load first, initial results load second - a request to the server is done for every interaction with the facets tree - add counts to each facet and disable check boxes if count is 0 */ var equalsToOrIncludes = function equalsToOrIncludes(obj, value) { if (!!obj) { if (obj.constructor === Array) { return obj.includes(value); } else { return obj === value; } } else { return false; } }; var addElementToObjectOfArrays = function addElementToObjectOfArrays(obj, arrayName, element) { if (!obj[arrayName]) { obj[arrayName] = []; } obj[arrayName].push(element); }; var removeElementFromObjectOfArrays = function removeElementFromObjectOfArrays(obj, arrayName, element) { delete obj[arrayName].splice(obj[arrayName].indexOf(element), 1); if (obj[arrayName].length === 0) { delete obj[arrayName]; } }; var resultMatchesQuery = function resultMatchesQuery(result, query) { if (Object.keys(query).length === 0) { return false; } else { return Object.keys(query).every(function (facetName) { return query[facetName].some(function (facetItem) { return equalsToOrIncludes(result[facetName], facetItem); }); }); } }; var DifferentialRouter = /*#__PURE__*/function (_React$Component) { function DifferentialRouter(props) { var _this; _classCallCheck(this, DifferentialRouter); _this = _callSuper(this, DifferentialRouter, [props]); var querySelect = _urlManager__WEBPACK_IMPORTED_MODULE_5__["default"].parseDifferentialUrlParameter(); if (!querySelect.kingdom) { querySelect.kingdom = props.facetsTreeData.find(function (facet) { return facet.facetName === "kingdom"; }).facetItems.map(function (facetItem) { return facetItem.name; }); } _urlManager__WEBPACK_IMPORTED_MODULE_5__["default"].differentialPush(querySelect, true); _this.state = { querySelect: querySelect }; _this._setChecked = _this._setChecked.bind(_this); return _this; } _inherits(DifferentialRouter, _React$Component); return _createClass(DifferentialRouter, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; window.addEventListener('popstate', function () { _this2.setState({ querySelect: _urlManager__WEBPACK_IMPORTED_MODULE_5__["default"].parseDifferentialUrlParameter() }); }, false); } }, { key: "_setChecked", value: function _setChecked(facetName, facetItemName, checked) { // Update URL var newQuerySelect = JSON.parse(JSON.stringify(this.state.querySelect)); if (checked) { addElementToObjectOfArrays(newQuerySelect, facetName, facetItemName); } else { removeElementFromObjectOfArrays(newQuerySelect, facetName, facetItemName); } // TODO Consider using https://github.com/reactjs/react-router _urlManager__WEBPACK_IMPORTED_MODULE_5__["default"].differentialPush(newQuerySelect, false); this.setState({ querySelect: newQuerySelect }); } }, { key: "_filteredResults", value: function _filteredResults() { var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.state.querySelect; return this.props.results.filter(function (result) { return resultMatchesQuery(result, query); }); } // Syncs tree data with URL (querySelect) and does some other smart things such as check/uncheck or disable facets based on // the user results (e.g. check & disable a facet if it’s shared by all results as a side effect of other choice) }, { key: "_prepareFacetTreeData", value: function _prepareFacetTreeData(filteredResults) { var _this3 = this; return this.props.facetsTreeData.map(function (facet) { return { facetName: facet.facetName, facetItems: facet.facetItems.map(function (facetItem) { var querySelectAfterSwitchingThisFacetItem = JSON.parse(JSON.stringify(_this3.state.querySelect)); if (equalsToOrIncludes(querySelectAfterSwitchingThisFacetItem[facet.facetName], facetItem.name)) { removeElementFromObjectOfArrays(querySelectAfterSwitchingThisFacetItem, facet.facetName, facetItem.name); } else { addElementToObjectOfArrays(querySelectAfterSwitchingThisFacetItem, facet.facetName, facetItem.name); } var resultIdsAfterSwitchingThisFacetItem = _this3._filteredResults(querySelectAfterSwitchingThisFacetItem).map(function (result) { return result.id; }).sort(); var currentResultIds = filteredResults.map(function (result) { return result.id; }).sort(); var sameResultsAfterSwitchingThisItem = JSON.stringify(resultIdsAfterSwitchingThisFacetItem) === JSON.stringify(currentResultIds); var noResultsAfterSwitchingThisItem = resultIdsAfterSwitchingThisFacetItem.length === 0; return { name: facetItem.name, value: facetItem.value, checked: equalsToOrIncludes(_this3.state.querySelect[facet.facetName], facetItem.name) || sameResultsAfterSwitchingThisItem, disabled: noResultsAfterSwitchingThisItem || sameResultsAfterSwitchingThisItem }; }) }; }); } }, { key: "render", value: function render() { var filteredResults = this._filteredResults(); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "row column expanded" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "show-for-large large-3 columns" }, Object.keys(this.props.facetsTreeData).length && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_facets_tree_DifferentialFacetsTree__WEBPACK_IMPORTED_MODULE_4__["default"], { facets: this._prepareFacetTreeData(filteredResults), setChecked: this._setChecked })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "small-12 large-9 columns" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_tooltip_ReactTooltipStyleClass__WEBPACK_IMPORTED_MODULE_2__["default"], null), this.props.results && this.props.results.length && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DifferentialResults__WEBPACK_IMPORTED_MODULE_3__["default"], _extends({ results: filteredResults, atlasUrl: this.props.atlasUrl }, this.props.legend)))); } }]); }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component); DifferentialRouter.propTypes = { facetsTreeData: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array, results: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.array, legend: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, atlasUrl: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired }; /* harmony default export */ __webpack_exports__["default"] = (DifferentialRouter); /***/ }), /***/ "./bundles/differential-expression/src/DifferentialRouterLoader.js": /*!*************************************************************************!*\ !*** ./bundles/differential-expression/src/DifferentialRouterLoader.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react_refetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-refetch */ "./node_modules/react-refetch/lib/index.js"); /* harmony import */ var react_refetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_refetch__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var urijs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! urijs */ "./node_modules/urijs/src/URI.js"); /* harmony import */ var urijs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(urijs__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _DifferentialRouter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DifferentialRouter */ "./bundles/differential-expression/src/DifferentialRouter.js"); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } var transformFacetsResponseToArray = function transformFacetsResponseToArray(facetsResponse) { return Object.keys(facetsResponse).map(function (facetName) { return { facetName: facetName, facetItems: facetsResponse[facetName].map(function (facetItem) { return { name: facetItem.name, value: facetItem.value, disabled: false, checked: false }; }) }; }); }; var pruneFacetsTreeBasedOnResultsThatCameIn = function pruneFacetsTreeBasedOnResultsThatCameIn(facetsTreeData, results) { return facetsTreeData.map(function (facet) { return { facetName: facet.facetName, facetItems: facet.facetItems.filter(function (facetItem) { return results.some(function (result) { if (Array.isArray(result[facet.facetName])) { return result[facet.facetName].includes(facetItem.name); } else { return result[facet.facetName] === facetItem.name; } }); }) }; }).filter(function (facet) { return facet.facetItems.length > 0; }); }; var DifferentialRouterLoader = /*#__PURE__*/function (_React$Component) { function DifferentialRouterLoader(props) { _classCallCheck(this, DifferentialRouterLoader); return _callSuper(this, DifferentialRouterLoader, [props]); } _inherits(DifferentialRouterLoader, _React$Component); return _createClass(DifferentialRouterLoader, [{ key: "render", value: function render() { var _this$props = this.props, facetsFetch = _this$props.facetsFetch, resultsFetch = _this$props.resultsFetch; var allFetches = react_refetch__WEBPACK_IMPORTED_MODULE_2__["PromiseState"].all([facetsFetch, resultsFetch]); if (allFetches.pending) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "row column" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("img", { src: urijs__WEBPACK_IMPORTED_MODULE_3___default()("resources/images/loading.gif", this.props.atlasUrl).toString() })); } else if (allFetches.fulfilled) { var resultsResponse = resultsFetch.value; var facetsResponse = facetsFetch.value; var facetsTreeData = transformFacetsResponseToArray(facetsResponse); var prunedFacetsTreeData = pruneFacetsTreeBasedOnResultsThatCameIn(facetsTreeData, resultsResponse.results); var results = resultsResponse.results; var legend = { minDownLevel: resultsResponse.minDownLevel, minUpLevel: resultsResponse.minUpLevel, maxDownLevel: resultsResponse.maxDownLevel, maxUpLevel: resultsResponse.maxUpLevel }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DifferentialRouter__WEBPACK_IMPORTED_MODULE_4__["default"], { facetsTreeData: prunedFacetsTreeData, results: results, legend: legend, atlasUrl: this.props.atlasUrl }); } } }]); }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component); DifferentialRouterLoader.propTypes = { atlasUrl: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, geneQuery: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, conditionQuery: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, species: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired }; /* harmony default export */ __webpack_exports__["default"] = (Object(react_refetch__WEBPACK_IMPORTED_MODULE_2__["connect"])(function (props) { var requestParams = { geneQuery: props.geneQuery, conditionQuery: props.conditionQuery, species: props.species }; return { facetsFetch: urijs__WEBPACK_IMPORTED_MODULE_3___default()("json/search/differential_facets", props.atlasUrl).search(requestParams).toString(), resultsFetch: urijs__WEBPACK_IMPORTED_MODULE_3___default()("json/search/differential_results", props.atlasUrl).search(requestParams).toString() }; })(DifferentialRouterLoader)); /***/ }), /***/ "./bundles/differential-expression/src/DisplayLevelsButton.js": /*!********************************************************************!*\ !*** ./bundles/differential-expression/src/DisplayLevelsButton.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); var DisplayLevelsButton = function DisplayLevelsButton(_ref) { var displayLevels = _ref.displayLevels, onClick = _ref.onClick; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { className: "button", onClick: onClick }, displayLevels ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, "Hide log", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("sub", null, "2"), "-fold change") : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, "Display log", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("sub", null, "2"), "-fold change")); }; DisplayLevelsButton.propTypes = { displayLevels: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool.isRequired, onClick: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired }; /* harmony default export */ __webpack_exports__["default"] = (DisplayLevelsButton); /***/ }), /***/ "./bundles/differential-expression/src/facets-tree/DifferentialFacetsTree.js": /*!***********************************************************************************!*\ !*** ./bundles/differential-expression/src/facets-tree/DifferentialFacetsTree.js ***! \***********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _propTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./propTypes */ "./bundles/differential-expression/src/facets-tree/propTypes.js"); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } var DifferentialFacetsTree = function DifferentialFacetsTree(_ref) { var facets = _ref.facets, setChecked = _ref.setChecked; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "column row" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h4", null, "Filter your results"), facets.map(function (facet) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Facet, { key: facet.facetName, facetName: facet.facetName, facetItems: facet.facetItems, setChecked: setChecked }); })); }; DifferentialFacetsTree.propTypes = { facets: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape(_propTypes__WEBPACK_IMPORTED_MODULE_2__["facetDataPropTypes"])).isRequired, setChecked: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired }; var prettyFacetNames = { kingdom: "Kingdom", species: "Species", experimentType: "Experiment type", factors: "Experimental variables", numReplicates: "Number of replicates", regulation: "Regulation" }; var Facet = function Facet(_ref2) { var facetName = _ref2.facetName, facetItems = _ref2.facetItems, _setChecked = _ref2.setChecked; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "column row margin-top-large" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h5", null, prettyFacetNames[facetName] || facetName), facetItems.map(function (facetItem) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(FacetItem, { key: facetItem.name, name: facetItem.name, value: facetItem.value, checked: facetItem.checked, disabled: facetItem.disabled, setChecked: function setChecked(facetItemName, checked) { _setChecked(facetName, facetItemName, checked); } }); })); }; Facet.propTypes = _objectSpread(_objectSpread({}, _propTypes__WEBPACK_IMPORTED_MODULE_2__["facetDataPropTypes"]), {}, { setChecked: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired }); var FacetItem = function FacetItem(_ref3) { var name = _ref3.name, value = _ref3.value, checked = _ref3.checked, disabled = _ref3.disabled, setChecked = _ref3.setChecked; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "column row" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "checkbox", checked: checked, onChange: function onChange() { setChecked(name, !checked); }, disabled: disabled }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { style: { display: "inline" } }, value)); }; FacetItem.propTypes = _objectSpread(_objectSpread({}, _propTypes__WEBPACK_IMPORTED_MODULE_2__["facetItemDataPropTypes"]), {}, { setChecked: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired }); /* harmony default export */ __webpack_exports__["default"] = (DifferentialFacetsTree); /***/ }), /***/ "./bundles/differential-expression/src/facets-tree/propTypes.js": /*!**********************************************************************!*\ !*** ./bundles/differential-expression/src/facets-tree/propTypes.js ***! \**********************************************************************/ /*! exports provided: facetDataPropTypes, facetItemDataPropTypes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "facetDataPropTypes", function() { return facetDataPropTypes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "facetItemDataPropTypes", function() { return facetItemDataPropTypes; }); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); var facetItemDataPropTypes = { name: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string.isRequired, value: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string.isRequired, checked: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool.isRequired, disabled: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool.isRequired }; var facetDataPropTypes = { facetName: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string.isRequired, facetItems: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape(facetItemDataPropTypes)).isRequired }; /***/ }), /***/ "./bundles/differential-expression/src/legend/LegendDifferential.js": /*!**************************************************************************!*\ !*** ./bundles/differential-expression/src/legend/LegendDifferential.js ***! \**************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _LegendRow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LegendRow */ "./bundles/differential-expression/src/legend/LegendRow.js"); var LegendDifferential = function LegendDifferential(_ref) { var minDownLevel = _ref.minDownLevel, maxDownLevel = _ref.maxDownLevel, minUpLevel = _ref.minUpLevel, maxUpLevel = _ref.maxUpLevel; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "row column expanded" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: { display: "table", width: "100%", borderSpacing: "4px" } }, isNaN(minDownLevel) && isNaN(maxDownLevel) ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_LegendRow__WEBPACK_IMPORTED_MODULE_2__["default"], { lowExpressionLevel: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, minDownLevel), highExpressionLevel: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, maxDownLevel), lowValueColour: "#C0C0C0", highValueColour: "#0000FF" }), isNaN(minUpLevel) && isNaN(maxUpLevel) ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_LegendRow__WEBPACK_IMPORTED_MODULE_2__["default"], { lowExpressionLevel: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, minUpLevel), highExpressionLevel: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, maxUpLevel), lowValueColour: "#FFAFAF", highValueColour: "#FF0000" }))); }; LegendDifferential.propTypes = { minDownLevel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired, maxDownLevel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired, minUpLevel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired, maxUpLevel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired }; /* harmony default export */ __webpack_exports__["default"] = (LegendDifferential); /***/ }), /***/ "./bundles/differential-expression/src/legend/LegendRow.js": /*!*****************************************************************!*\ !*** ./bundles/differential-expression/src/legend/LegendRow.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); var _templateObject, _templateObject2, _templateObject3; function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); } var DifferentialLegendLevel = styled_components__WEBPACK_IMPORTED_MODULE_2__["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: table-cell;\n width: 10%;\n white-space: nowrap;\n font-size: x-small;\n vertical-align: middle;\n text-align: right;\n"]))); var DifferentialGradientContainer = styled_components__WEBPACK_IMPORTED_MODULE_2__["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: table-cell;\n width: 80%;\n"]))); var DifferentialGradientSpan = styled_components__WEBPACK_IMPORTED_MODULE_2__["default"].span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n vertical-align: middle;\n height: 15px;\n width: 100%;\n display: block;\n background-image: linear-gradient(to right, ", ", ", ");\n"])), function (props) { return props.lowValueColour; }, function (props) { return props.highValueColour; }); var LegendRow = function LegendRow(_ref) { var lowValueColour = _ref.lowValueColour, highValueColour = _ref.highValueColour, lowExpressionLevel = _ref.lowExpressionLevel, highExpressionLevel = _ref.highExpressionLevel; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: { display: "table-row" } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DifferentialLegendLevel, null, lowExpressionLevel), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DifferentialGradientContainer, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DifferentialGradientSpan, { lowValueColour: lowValueColour, highValueColour: highValueColour })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DifferentialLegendLevel, null, highExpressionLevel)); }; LegendRow.propTypes = { lowValueColour: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, highValueColour: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, lowExpressionLevel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.element.isRequired, highExpressionLevel: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.element.isRequired }; /* harmony default export */ __webpack_exports__["default"] = (LegendRow); /***/ }), /***/ "./bundles/differential-expression/src/tooltip/ContrastInfo.js": /*!*********************************************************************!*\ !*** ./bundles/differential-expression/src/tooltip/ContrastInfo.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } var ContrastInfoPropertyRow = function ContrastInfoPropertyRow(_ref) { var testValue = _ref.testValue, referenceValue = _ref.referenceValue, contrastPropertyType = _ref.contrastPropertyType, propertyName = _ref.propertyName; if (!testValue && !referenceValue) { return null; } var style = { whiteSpace: "normal", fontWeight: contrastPropertyType === "FACTOR" ? "bold" : "", color: contrastPropertyType === "FACTOR" ? "" : "grey" }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", { key: "".concat(contrastPropertyType, "_").concat(propertyName) }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", { style: style }, propertyName), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", { style: style }, testValue), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", { style: style }, referenceValue)); }; ContrastInfoPropertyRow.propTypes = { contrastPropertyType: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, propertyName: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, referenceValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, testValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired }; var ContrastInfo = function ContrastInfo(_ref2) { var experimentDescription = _ref2.experimentDescription, contrastDescription = _ref2.contrastDescription, testReplicates = _ref2.testReplicates, referenceReplicates = _ref2.referenceReplicates, properties = _ref2.properties; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: { fontWeight: "bold", color: "blue", textAlign: "center" } }, experimentDescription), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: { textAlign: "center" } }, contrastDescription), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("table", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("thead", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Property"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Test value (N=", testReplicates, ")"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Reference value (N=", referenceReplicates, ")"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tbody", null, properties.map(function (property) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ContrastInfoPropertyRow, _extends({ key: property.propertyName }, property)); })))); }; ContrastInfo.proptypes = { experimentDescription: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, contrastDescription: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, testReplicates: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, referenceReplicates: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, properties: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.shape(ContrastInfoPropertyRow.propTypes)) }; /* harmony default export */ __webpack_exports__["default"] = (ContrastInfo); /***/ }), /***/ "./bundles/differential-expression/src/tooltip/ContrastTooltipLoader.js": /*!******************************************************************************!*\ !*** ./bundles/differential-expression/src/tooltip/ContrastTooltipLoader.js ***! \******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react_tooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-tooltip */ "./bundles/differential-expression/node_modules/react-tooltip/dist/index.js"); /* harmony import */ var react_tooltip__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_tooltip__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _ContrastInfo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ContrastInfo */ "./bundles/differential-expression/src/tooltip/ContrastInfo.js"); var TooltipLoader = function TooltipLoader(_ref) { var id = _ref.id, result = _ref.result; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_tooltip__WEBPACK_IMPORTED_MODULE_2___default.a, { id: id, type: "light", className: "foobar" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ContrastInfo__WEBPACK_IMPORTED_MODULE_3__["default"], result)); }; TooltipLoader.propTypes = { host: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, resource: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired, result: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, id: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string.isRequired }; /* harmony default export */ __webpack_exports__["default"] = (TooltipLoader); /***/ }), /***/ "./bundles/differential-expression/src/tooltip/DifferentialFoldChangeCellInfo.js": /*!***************************************************************************************!*\ !*** ./bundles/differential-expression/src/tooltip/DifferentialFoldChangeCellInfo.js ***! \***************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); /* harmony import */ var _ebi_gene_expression_group_expression_atlas_number_format__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ebi-gene-expression-group/expression-atlas-number-format */ "./bundles/differential-expression/node_modules/@ebi-gene-expression-group/expression-atlas-number-format/lib/index.js"); /* harmony import */ var _ebi_gene_expression_group_expression_atlas_number_format__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_ebi_gene_expression_group_expression_atlas_number_format__WEBPACK_IMPORTED_MODULE_3__); var _templateObject, _templateObject2, _templateObject3; function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); } var BorderLessTable = styled_components__WEBPACK_IMPORTED_MODULE_2__["default"].table(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-collapse: collapse;\n margin: 0;\n"]))); var Header = styled_components__WEBPACK_IMPORTED_MODULE_2__["default"].th(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-bottom: 1px solid lightgrey !important;\n background-color: floralwhite;\n"]))); var Data = styled_components__WEBPACK_IMPORTED_MODULE_2__["default"].td(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border: 1px solid lightgrey;\n"]))); var DifferentialFoldChangeCellInfo = function DifferentialFoldChangeCellInfo(_ref) { var pValue = _ref.pValue, tStat = _ref.tStat, foldChange = _ref.foldChange; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BorderLessTable, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("thead", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, pValue && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, null, "Adjusted ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("em", null, "p"), "-value"), tStat && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("em", null, "t"), "-statistic"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, null, "Log", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("sub", null, "2"), "-fold change"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tbody", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, pValue && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Data, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ebi_gene_expression_group_expression_atlas_number_format__WEBPACK_IMPORTED_MODULE_3___default.a, { value: pValue })), tStat && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Data, null, Math.floor(tStat * 1e4) / 1e4), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Data, null, foldChange)))); }; DifferentialFoldChangeCellInfo.propTypes = { foldChange: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired, pValue: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number, tStat: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number }; /* harmony default export */ __webpack_exports__["default"] = (DifferentialFoldChangeCellInfo); /***/ }), /***/ "./bundles/differential-expression/src/tooltip/ReactTooltipStyleClass.js": /*!*******************************************************************************!*\ !*** ./bundles/differential-expression/src/tooltip/ReactTooltipStyleClass.js ***! \*******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js"); var _templateObject; function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); } var ReactTooltipStyleClass = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["createGlobalStyle"])(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.foobar {\n padding: 2px !important;\n box-shadow: 0 0 1em darkgrey;\n max-width: 500px;\n font-size: x-small;\n opacity: 0.98 !important;\n }\n"]))); /* harmony default export */ __webpack_exports__["default"] = (ReactTooltipStyleClass); /***/ }), /***/ "./bundles/differential-expression/src/urlManager.js": /*!***********************************************************!*\ !*** ./bundles/differential-expression/src/urlManager.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! url */ "./node_modules/url/url.js"); /* harmony import */ var url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! querystring */ "./node_modules/querystring-es3/index.js"); /* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(querystring__WEBPACK_IMPORTED_MODULE_1__); /** * Stringify the `query` object, assign it to the `ds` search field in the URL and store it in the History * @param {object} querySelect * @param {boolean} replace - use `replaceState` instead of `pushState` */ var differentialPush = function pushQueryIntoBrowserHistory(querySelect, replace) { var currentUrlObject = url__WEBPACK_IMPORTED_MODULE_0___default.a.parse(window.location.toString()); var newUrlQueryParams = querystring__WEBPACK_IMPORTED_MODULE_1___default.a.parse(currentUrlObject.query); newUrlQueryParams.ds = JSON.stringify(querySelect); var newUrlObject = { protocol: currentUrlObject.protocol, host: currentUrlObject.host, hash: currentUrlObject.hash, pathname: currentUrlObject.pathname, query: newUrlQueryParams }; if (replace) { history.replaceState(null, '', url__WEBPACK_IMPORTED_MODULE_0___default.a.format(newUrlObject)); } else { history.pushState(null, '', url__WEBPACK_IMPORTED_MODULE_0___default.a.format(newUrlObject)); } }; var parseDifferentialUrlParameter = function getQuerySelectFromLocation() { var location = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location; var currentURL = url__WEBPACK_IMPORTED_MODULE_0___default.a.parse(location.toString()); var differentialSelectParam = querystring__WEBPACK_IMPORTED_MODULE_1___default.a.parse(currentURL.query).ds; return differentialSelectParam ? JSON.parse(differentialSelectParam) : {}; }; var UrlManager = { differentialPush: differentialPush, parseDifferentialUrlParameter: parseDifferentialUrlParameter }; /* harmony default export */ __webpack_exports__["default"] = (UrlManager); /***/ }), /***/ 0: /*!********************************!*\ !*** ./util.inspect (ignored) ***! \********************************/ /*! no static exports found */ /***/ (function(module, exports) { /* (ignored) */ /***/ }) },[["./bundles/differential-expression/index.js","vendorCommons"]]]); //# sourceMappingURL=expressionAtlasDifferentialExpression.bundle.js.map