diff --git a/app/components/ProductList/index.js b/app/components/ProductList/index.js
index cb44f79..574e4ea 100644
--- a/app/components/ProductList/index.js
+++ b/app/components/ProductList/index.js
@@ -253,6 +253,7 @@ class PipelineConfigurator extends React.Component {
const email = this.props.email
const description = this.props.description
const submitEndpoint = '/sessions'
+ let observation
fetch('/product/' + this.props.lid, {
headers: {
'content-type': 'application/json'
@@ -262,20 +263,31 @@ class PipelineConfigurator extends React.Component {
else
throw 'Server returned ' + response.statusText})
.then(srmuris => {
- const body = {pipeline, email, description, config: this.state.config, observation: srmuris.products.map((d) => d.URI).join('|')};
- return fetch(submitEndpoint, {
- body: JSON.stringify(body),
- method: 'POST', // *GET, POST, PUT, DELETE, etc.
- mode: 'cors', // no-cors, cors, *same-origin
- headers: {
- 'content-type': 'application/json'
- },
- })
+ observation = srmuris.products.map((d) => d.URI).join('|');
})
+ fetch('/product/' + this.props.lid2, {
+ headers: {
+ 'content-type': 'application/json'
+ }
+ }).then(response => {if (response.ok)
+ return response.json()
+ else
+ throw 'Server returned ' + response.statusText})
+ .then(srmuris => {
+ const body = {pipeline, email, description, config: this.state.config, observation, observation2: srmuris.products.map((d) => d.URI).join('|')};
+ return fetch(submitEndpoint, {
+ body: JSON.stringify(body),
+ method: 'POST', // *GET, POST, PUT, DELETE, etc.
+ mode: 'cors', // no-cors, cors, *same-origin
+ headers: {
+ 'content-type': 'application/json'
+ },
+ })
+ })
.then(response => {if (response.ok)
- return response.json()
- else
- throw 'Server returned ' + response.statusText})
+ return response.json()
+ else
+ throw 'Server returned ' + response.statusText})
.then(this.processResponse) // parses response to JSON
.catch(this.handleError)
}
@@ -515,11 +527,48 @@ class RangeFilter extends React.Component {
}
};
*/
+
+class ProductChooser extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ let selectRow = {
+ mode: 'radio',
+ clickToSelect: true,
+ hideSelectAll: true,
+ onSelect: this.props.onSelect,
+ selected: []
+ };
+ if (this.props.selected !== undefined) {
+ selectRow.selected.push(this.props.selected);
+ }
+
+ const pagination = paginationFactory({
+ page: 1,
+ sizePerPage: 5
+ });
+
+ return (
+
|
+ |||||||||||||||||||||
+
|
+ |||||||||||||||||||||
\" + hljs.highlight(lang, str).value + \"\";\n }\n catch (error) {\n printInConsole(error);\n }\n }\n else {\n try {\n return \"\" + hljs.highlightAuto(str).value + \"\";\n }\n catch (error) {\n printInConsole(error);\n }\n }\n }\n return \"\" + md.utils.escapeHtml(str) + \"\";\n }\n });\n md.renderer.rules.image = function (tokens, index, options, env, self) {\n var token = tokens[index];\n var aIndex = token.attrIndex('src');\n if (forceHttps) {\n token.attrs[aIndex][1] = replaceProtocal(token.attrs[aIndex][1]);\n }\n token.attrPush(['style', imagePreviewStyleString]);\n return md.renderer.rules.image(tokens, index, options, env, self);\n };\n var defaultLinkRender;\n if (md.renderer.rules.link_open) {\n defaultLinkRender = md.renderer.rules.link_open;\n }\n else {\n defaultLinkRender = function (tokens, index, options, env, self) {\n return self.renderToken(tokens, index, options);\n };\n }\n md.renderer.rules.link_open = function (tokens, index, options, env, self) {\n tokens[index].attrPush(['target', '_blank']);\n tokens[index].attrPush(['rel', 'nofollow']);\n return defaultLinkRender(tokens, index, options, env, self);\n };\n return md;\n}\n/**\n * @public\n */\n// tslint:disable-next-line:cognitive-complexity\nexport function findTitle(value, properties) {\n if (value) {\n for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {\n var _a = properties_1[_i], property = _a.property, schema = _a.schema;\n var title = value[property];\n if (schema.type === 'number'\n || schema.type === 'integer'\n || schema.type === 'string') {\n if (schema.enum && schema.enumTitles) {\n var index = schema.enum.indexOf(title);\n if (index !== -1 && index < schema.enumTitles.length) {\n var enumTitle = schema.enumTitles[index];\n if (typeof enumTitle === 'string' && enumTitle.length > 0) {\n if (enumTitle.length > 23) {\n return enumTitle.substring(0, 20) + '...';\n }\n return enumTitle;\n }\n }\n }\n }\n if (typeof title === 'string' && title.length > 0) {\n if (title.length > 23) {\n return title.substring(0, 20) + '...';\n }\n return title;\n }\n }\n }\n return undefined;\n}\n// tslint:disable-next-line:cognitive-complexity\nfunction findTitleFromSchema(value, schema) {\n if (value) {\n for (var property in schema.properties) {\n if (schema.properties.hasOwnProperty(property)) {\n var title = value[property];\n if (typeof title === 'string' && title.length > 0) {\n if (title.length > 23) {\n return title.substring(0, 20) + '...';\n }\n return title;\n }\n }\n }\n }\n return undefined;\n}\n/**\n * @public\n */\nexport function getTitle() {\n var titles = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n titles[_i] = arguments[_i];\n }\n for (var _a = 0, titles_1 = titles; _a < titles_1.length; _a++) {\n var title = titles_1[_a];\n if (title === undefined || title === null) {\n continue;\n }\n return String(title);\n }\n return '';\n}\n/**\n * @public\n */\nexport function compare(a, b) {\n if (typeof a.schema.propertyOrder === 'number') {\n if (typeof b.schema.propertyOrder === 'number') {\n return a.schema.propertyOrder - b.schema.propertyOrder;\n }\n return -1;\n }\n if (typeof b.schema.propertyOrder === 'number') {\n return 1;\n }\n return 0;\n}\n/**\n * @public\n */\nexport function filterObject(_a, filterValue) {\n var property = _a.property, schema = _a.schema;\n return filterValue === ''\n || property.indexOf(filterValue) !== -1\n || (!!schema.title && schema.title.indexOf(filterValue) !== -1)\n || (!!schema.description && schema.description.indexOf(filterValue) !== -1);\n}\n/**\n * @public\n */\nexport function filterArray(value, index, schema, filterValue) {\n var result = filterValue === ''\n || String(index).indexOf(filterValue) !== -1\n || (schema.type === 'string' && value.indexOf(filterValue) !== -1)\n || ((schema.type === 'number' || schema.type === 'integer') && String(value).indexOf(filterValue) !== -1);\n if (result) {\n return true;\n }\n if (schema.type === 'object') {\n var title = getTitle(findTitleFromSchema(value, schema), schema.title);\n return title.indexOf(filterValue) !== -1;\n }\n return false;\n}\n/**\n * @public\n */\nexport var minItemCountIfNeedFilter = 6;\n/**\n * @public\n */\n// tslint:disable-next-line:cognitive-complexity\nexport function isRequired(required, value, schema, property) {\n /**\n * return true: required\n * return undefined: optional\n * return false: hidden\n */\n if (required && required.some(function (r) { return r === property; })) {\n return true;\n }\n if (value && schema.properties[property]) {\n var requiredWhen = schema.properties[property].requiredWhen;\n if (requiredWhen) {\n var left = requiredWhen[0], operator = requiredWhen[1], right = requiredWhen[2];\n if (schema.properties[left]) {\n if (operator === '===') {\n return value[left] === right;\n }\n if (operator === 'in') {\n return Array.isArray(right) && right.indexOf(value[left]) !== -1;\n }\n }\n }\n var optionalWhen = schema.properties[property].optionalWhen;\n if (optionalWhen) {\n var left = optionalWhen[0], operator = optionalWhen[1], right = optionalWhen[2];\n if (schema.properties[left]) {\n if (operator === '===') {\n return value[left] === right ? undefined : false;\n }\n if (operator === 'in') {\n return Array.isArray(right) && right.indexOf(value[left]) !== -1 ? undefined : false;\n }\n }\n }\n }\n return undefined;\n}\n/**\n * @public\n */\nexport function findContainer(childNodes) {\n for (var i = 0; i < childNodes.length; i++) {\n var node = childNodes[i];\n if (node.nodeName === 'DIV') {\n return node;\n }\n }\n return undefined;\n}\n/**\n * @public\n */\nexport function getOptions(schema) {\n var enumTitles = schema.enumTitles || [];\n return schema.enum.map(function (e, i) {\n return ({\n value: e,\n label: typeof enumTitles[i] === 'string' ? enumTitles[i] : e\n });\n });\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar FILTER_TYPE = exports.FILTER_TYPE = {\n TEXT: 'TEXT',\n SELECT: 'SELECT',\n NUMBER: 'NUMBER',\n DATE: 'DATE'\n};\n\nvar FILTER_DELAY = exports.FILTER_DELAY = 500;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar LIKE = exports.LIKE = 'LIKE';\nvar EQ = exports.EQ = '=';\nvar NE = exports.NE = '!=';\nvar GT = exports.GT = '>';\nvar GE = exports.GE = '>=';\nvar LT = exports.LT = '<';\nvar LE = exports.LE = '<=';","'use strict';\n\nexports.__esModule = true;\n\nvar _createUncontrollable = require('./createUncontrollable');\n\nvar _createUncontrollable2 = _interopRequireDefault(_createUncontrollable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mixin = {\n shouldComponentUpdate: function shouldComponentUpdate() {\n //let the forceUpdate trigger the update\n return !this._notifying;\n }\n};\n\nfunction set(component, propName, handler, value, args) {\n if (handler) {\n component._notifying = true;\n handler.call.apply(handler, [component, value].concat(args));\n component._notifying = false;\n }\n\n component._values[propName] = value;\n\n if (!component.unmounted) component.forceUpdate();\n}\n\nexports.default = (0, _createUncontrollable2.default)(mixin, set);\nmodule.exports = exports['default'];","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","import * as tslib_1 from \"tslib\";\nimport * as React from 'react';\nvar Description = /** @class */ (function (_super) {\n tslib_1.__extends(Description, _super);\n function Description() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Description.prototype.render = function () {\n if (this.props.message) {\n return React.createElement(\"p\", { className: this.props.theme.description }, this.props.message);\n }\n return null;\n };\n return Description;\n}(React.Component));\nexport { Description };\n","import * as tslib_1 from \"tslib\";\nimport * as React from 'react';\nvar Optional = /** @class */ (function (_super) {\n tslib_1.__extends(Optional, _super);\n function Optional() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Optional.prototype.render = function () {\n if (!this.props.required && (this.props.value === undefined || !this.props.isReadOnly)) {\n return (React.createElement(\"div\", { className: this.props.theme.checkbox },\n React.createElement(\"label\", null,\n React.createElement(\"input\", { type: 'checkbox', onChange: this.props.toggleOptional, checked: this.props.value === undefined, disabled: this.props.isReadOnly }),\n this.props.locale.info.notExists)));\n }\n return null;\n };\n return Optional;\n}(React.Component));\nexport { Optional };\n","import * as tslib_1 from \"tslib\";\nimport * as React from 'react';\n/**\n * @public\n */\nvar Icon = /** @class */ (function (_super) {\n tslib_1.__extends(Icon, _super);\n function Icon() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Icon.prototype.render = function () {\n if (this.props.valid) {\n if (this.props.icon.isText) {\n return (React.createElement(\"button\", { className: this.props.theme.button, onClick: this.props.onClick }, this.props.text));\n }\n else {\n return (React.createElement(\"button\", { className: this.props.theme.button, onClick: this.props.onClick },\n React.createElement(\"i\", { className: this.props.text })));\n }\n }\n return null;\n };\n return Icon;\n}(React.Component));\nexport { Icon };\n","'use strict';\n\nexports.__esModule = true;\n\nexports.default = function (componentOrElement) {\n return (0, _ownerDocument2.default)(_reactDom2.default.findDOMNode(componentOrElement));\n};\n\nvar _reactDom = require('react-dom');\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _ownerDocument = require('dom-helpers/ownerDocument');\n\nvar _ownerDocument2 = _interopRequireDefault(_ownerDocument);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _inDOM = require('../util/inDOM');\n\nvar _inDOM2 = _interopRequireDefault(_inDOM);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n // HTML DOM and SVG DOM may have different support levels,\n // so we need to check on context instead of a document root element.\n return _inDOM2.default ? function (context, node) {\n if (context.contains) {\n return context.contains(node);\n } else if (context.compareDocumentPosition) {\n return context === node || !!(context.compareDocumentPosition(node) & 16);\n } else {\n return fallback(context, node);\n }\n } : fallback;\n}();\n\nfunction fallback(context, node) {\n if (node) do {\n if (node === context) return true;\n } while (node = node.parentNode);\n\n return false;\n}\nmodule.exports = exports['default'];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = ownerDocument;\nfunction ownerDocument(node) {\n return node && node.ownerDocument || document;\n}\nmodule.exports = exports[\"default\"];","module.exports = { \"default\": require(\"core-js/library/fn/object/values\"), __esModule: true };","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = style;\n\nvar _camelizeStyle = require('../util/camelizeStyle');\n\nvar _camelizeStyle2 = _interopRequireDefault(_camelizeStyle);\n\nvar _hyphenateStyle = require('../util/hyphenateStyle');\n\nvar _hyphenateStyle2 = _interopRequireDefault(_hyphenateStyle);\n\nvar _getComputedStyle2 = require('./getComputedStyle');\n\nvar _getComputedStyle3 = _interopRequireDefault(_getComputedStyle2);\n\nvar _removeStyle = require('./removeStyle');\n\nvar _removeStyle2 = _interopRequireDefault(_removeStyle);\n\nvar _properties = require('../transition/properties');\n\nvar _isTransform = require('../transition/isTransform');\n\nvar _isTransform2 = _interopRequireDefault(_isTransform);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction style(node, property, value) {\n var css = '';\n var transforms = '';\n var props = property;\n\n if (typeof property === 'string') {\n if (value === undefined) {\n return node.style[(0, _camelizeStyle2.default)(property)] || (0, _getComputedStyle3.default)(node).getPropertyValue((0, _hyphenateStyle2.default)(property));\n } else {\n (props = {})[property] = value;\n }\n }\n\n Object.keys(props).forEach(function (key) {\n var value = props[key];\n if (!value && value !== 0) {\n (0, _removeStyle2.default)(node, (0, _hyphenateStyle2.default)(key));\n } else if ((0, _isTransform2.default)(key)) {\n transforms += key + '(' + value + ') ';\n } else {\n css += (0, _hyphenateStyle2.default)(key) + ': ' + value + ';';\n }\n });\n\n if (transforms) {\n css += _properties.transform + ': ' + transforms + ';';\n }\n\n node.style.cssText += ';' + css;\n}\nmodule.exports = exports['default'];","import _Object$values from 'babel-runtime/core-js/object/values';\nimport _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport elementType from 'prop-types-extra/lib/elementType';\n\nimport { bsClass, bsSizes, bsStyles, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nimport { Size, State, Style } from './utils/StyleConfig';\n\nimport SafeAnchor from './SafeAnchor';\n\nvar propTypes = {\n active: PropTypes.bool,\n disabled: PropTypes.bool,\n block: PropTypes.bool,\n onClick: PropTypes.func,\n componentClass: elementType,\n href: PropTypes.string,\n /**\n * Defines HTML button type attribute\n * @defaultValue 'button'\n */\n type: PropTypes.oneOf(['button', 'reset', 'submit'])\n};\n\nvar defaultProps = {\n active: false,\n block: false,\n disabled: false\n};\n\nvar Button = function (_React$Component) {\n _inherits(Button, _React$Component);\n\n function Button() {\n _classCallCheck(this, Button);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Button.prototype.renderAnchor = function renderAnchor(elementProps, className) {\n return React.createElement(SafeAnchor, _extends({}, elementProps, {\n className: classNames(className, elementProps.disabled && 'disabled')\n }));\n };\n\n Button.prototype.renderButton = function renderButton(_ref, className) {\n var componentClass = _ref.componentClass,\n elementProps = _objectWithoutProperties(_ref, ['componentClass']);\n\n var Component = componentClass || 'button';\n\n return React.createElement(Component, _extends({}, elementProps, {\n type: elementProps.type || 'button',\n className: className\n }));\n };\n\n Button.prototype.render = function render() {\n var _extends2;\n\n var _props = this.props,\n active = _props.active,\n block = _props.block,\n className = _props.className,\n props = _objectWithoutProperties(_props, ['active', 'block', 'className']);\n\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = _extends({}, getClassSet(bsProps), (_extends2 = {\n active: active\n }, _extends2[prefix(bsProps, 'block')] = block, _extends2));\n var fullClassName = classNames(className, classes);\n\n if (elementProps.href) {\n return this.renderAnchor(elementProps, fullClassName);\n }\n\n return this.renderButton(elementProps, fullClassName);\n };\n\n return Button;\n}(React.Component);\n\nButton.propTypes = propTypes;\nButton.defaultProps = defaultProps;\n\nexport default bsClass('btn', bsSizes([Size.LARGE, Size.SMALL, Size.XSMALL], bsStyles([].concat(_Object$values(State), [Style.DEFAULT, Style.PRIMARY, Style.LINK]), Style.DEFAULT, Button)));","module.exports = {};\n","exports.f = {}.propertyIsEnumerable;\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","import * as tslib_1 from \"tslib\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport * as common from 'select2-component';\nexport * from 'select2-component';\n/**\n * @public\n */\nvar Select2 = /** @class */ (function (_super) {\n tslib_1.__extends(Select2, _super);\n function Select2() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.hoveringValue = null;\n _this.option = null;\n _this.isOpen = false;\n _this.innerSearchText = '';\n _this.lastScrollTopIndex = 0;\n _this.onChange = function (e) {\n _this.searchText = e.currentTarget.value;\n _this.setState({ searchText: _this.searchText });\n };\n return _this;\n }\n Object.defineProperty(Select2.prototype, \"searchText\", {\n get: function () {\n return this.innerSearchText;\n },\n set: function (text) {\n if (this.props.customSearchEnabled && this.props.search) {\n this.props.search(text);\n }\n this.innerSearchText = text;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Select2.prototype, \"dropdownStyle\", {\n get: function () {\n return common.getDropdownStyle(this.isOpen);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Select2.prototype, \"containerStyle\", {\n get: function () {\n return common.getContainerStyle(this.props.disabled, this.isOpen);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Select2.prototype, \"selectionStyle\", {\n get: function () {\n return common.getSelectionStyle(this.props.multiple);\n },\n enumerable: true,\n configurable: true\n });\n Select2.prototype.componentWillMount = function () {\n var option = common.getOptionsByValue(this.props.data, this.props.value, this.props.multiple);\n if (option !== null) {\n this.option = option;\n this.setState({ option: this.option });\n }\n if (!Array.isArray(option)) {\n this.hoveringValue = this.props.value;\n }\n this.setState({ hoveringValue: this.hoveringValue });\n this.isSearchboxHidden = this.props.customSearchEnabled\n ? false\n : common.isSearchboxHiddex(this.props.data, this.props.minCountForSearch);\n this.searchStyle = common.getSearchStyle(this.isSearchboxHidden);\n };\n Select2.prototype.componentDidMount = function () {\n this.searchInputElement = ReactDOM.findDOMNode(this).childNodes[1].childNodes[0].childNodes[0].childNodes[0];\n this.resultsElement = ReactDOM.findDOMNode(this).childNodes[1].childNodes[0].childNodes[1].childNodes[0];\n };\n Select2.prototype.render = function () {\n var _this = this;\n var results = this.getFilteredData(false).map(function (groupOrOption, i) {\n var options = groupOrOption.options;\n if (options) {\n var optionsElements = options.map(function (option, j) {\n var optionElement = option.component\n ? React.createElement(option.component, { option: option })\n : option.label;\n return (React.createElement(\"li\", { className: _this.getOptionStyle(option.value), key: j, role: 'treeitem', \"aria-selected\": _this.isSelected(option), \"aria-disabled\": _this.isDisabled(option), onMouseEnter: function () { return _this.mouseenter(option); }, onClick: function () { return _this.click(option); } }, optionElement));\n });\n return (React.createElement(\"li\", { className: 'select2-results__option', role: 'group', key: i },\n React.createElement(\"strong\", { className: 'select2-results__group' }, groupOrOption.label),\n React.createElement(\"ul\", { className: 'select2-results__options select2-results__options--nested' }, optionsElements)));\n }\n else {\n var option_1 = groupOrOption;\n var optionElement = option_1.component\n ? React.createElement(option_1.component, { option: option_1 })\n : option_1.label;\n return (React.createElement(\"li\", { className: _this.getOptionStyle(option_1.value), key: i, role: 'treeitem', \"aria-selected\": _this.isSelected(option_1), \"aria-disabled\": _this.isDisabled(option_1), onMouseEnter: function () { return _this.mouseenter(option_1); }, onClick: function () { return _this.click(option_1); } }, optionElement));\n }\n });\n var selection;\n if (this.props.multiple) {\n var items = this.option.map(function (op, i) { return (React.createElement(\"li\", { className: 'select2-selection__choice', title: op.label, key: i },\n React.createElement(\"span\", { onClick: function (e) { return _this.removeSelection(e, op); }, className: 'select2-selection__choice__remove', role: 'presentation' }, \"\\u00D7\"),\n op.label)); });\n selection = (React.createElement(\"ul\", { className: 'select2-selection__rendered' }, items));\n }\n else {\n var option = this.option;\n var label = option\n ? (option.component ? React.createElement(option.component, { option: option }) : option.label)\n : React.createElement(\"span\", { className: 'select2-selection__placeholder' }, this.props.placeholder);\n selection = [\n React.createElement(\"span\", { key: 'label', className: 'select2-selection__rendered', title: option ? option.label : '' }, label),\n React.createElement(\"span\", { key: 'arrow', className: 'select2-selection__arrow', role: 'presentation' },\n React.createElement(\"b\", { role: 'presentation' }))\n ];\n }\n return (React.createElement(\"div\", { className: this.containerStyle },\n React.createElement(\"div\", { className: 'selection', onClick: function () { return _this.toggleOpenAndClose(); } },\n React.createElement(\"div\", { className: this.selectionStyle, role: 'combobox' }, selection)),\n React.createElement(\"div\", { className: this.dropdownStyle },\n React.createElement(\"div\", { className: 'select2-dropdown select2-dropdown--below' },\n React.createElement(\"div\", { className: this.searchStyle },\n React.createElement(\"input\", { value: this.searchText, onChange: this.onChange, onKeyDown: function (e) { return _this.keyDown(e); }, onBlur: function () { return _this.focusout(); }, className: 'select2-search__field', type: 'search', role: 'textbox', autoComplete: 'off', autoCorrect: 'off', autoCapitalize: 'off', spellCheck: false })),\n React.createElement(\"div\", { className: 'select2-results' },\n React.createElement(\"ul\", { className: 'select2-results__options', role: 'tree', tabIndex: -1, onKeyDown: function (e) { return _this.keyDown(e); }, onBlur: function () { return _this.focusout(); } }, results))))));\n };\n Select2.prototype.getFilteredData = function (canSetState) {\n var result = this.props.customSearchEnabled\n ? this.props.data\n : common.getFilteredData(this.props.data, this.searchText);\n if (common.valueIsNotInFilteredData(result, this.hoveringValue)) {\n this.hoveringValue = common.getFirstAvailableOption(result);\n if (canSetState) {\n this.setState({ hoveringValue: this.hoveringValue });\n }\n if (this.resultsElement) {\n var lastScrollTopIndex = common.getLastScrollTopIndex(this.hoveringValue, this.resultsElement, result, this.lastScrollTopIndex);\n if (lastScrollTopIndex !== null) {\n this.lastScrollTopIndex = lastScrollTopIndex;\n if (canSetState) {\n this.setState({ lastScrollTopIndex: this.lastScrollTopIndex });\n }\n }\n }\n }\n return result;\n };\n Select2.prototype.getOptionStyle = function (value) {\n return common.getOptionStyle(value, this.hoveringValue);\n };\n Select2.prototype.mouseenter = function (option) {\n if (!option.disabled) {\n this.hoveringValue = option.value;\n this.setState({ hoveringValue: this.hoveringValue });\n }\n };\n Select2.prototype.click = function (option) {\n if (!option.disabled) {\n this.select(option);\n }\n if (this.focusoutTimer) {\n clearTimeout(this.focusoutTimer);\n }\n };\n Select2.prototype.toggleOpenAndClose = function () {\n var _this = this;\n if (this.props.disabled) {\n return;\n }\n this.isOpen = !this.isOpen;\n this.setState({ isOpen: this.isOpen });\n if (this.isOpen) {\n this.innerSearchText = '';\n this.setState({ searchText: this.searchText }, function () {\n if (!_this.isSearchboxHidden) {\n if (_this.searchInputElement) {\n _this.searchInputElement.focus();\n }\n }\n else {\n if (_this.resultsElement) {\n _this.resultsElement.focus();\n }\n }\n if (_this.resultsElement) {\n var lastScrollTopIndex = common.getLastScrollTopIndex(_this.hoveringValue, _this.resultsElement, _this.props.data, _this.lastScrollTopIndex);\n if (lastScrollTopIndex !== null) {\n _this.lastScrollTopIndex = lastScrollTopIndex;\n }\n }\n });\n if (this.props.open) {\n this.props.open();\n }\n }\n if (this.focusoutTimer) {\n clearTimeout(this.focusoutTimer);\n }\n };\n Select2.prototype.focusout = function () {\n var _this = this;\n this.focusoutTimer = setTimeout(function () {\n _this.isOpen = false;\n _this.setState({ isOpen: _this.isOpen });\n _this.focusoutTimer = undefined;\n }, common.timeout);\n };\n Select2.prototype.moveUp = function () {\n this.hoveringValue = common.getPreviousOption(this.getFilteredData(true), this.hoveringValue);\n this.setState({ hoveringValue: this.hoveringValue });\n if (this.resultsElement) {\n var lastScrollTopIndex = common.getLastScrollTopIndex(this.hoveringValue, this.resultsElement, this.getFilteredData(true), this.lastScrollTopIndex);\n if (lastScrollTopIndex !== null) {\n this.lastScrollTopIndex = lastScrollTopIndex;\n this.setState({ lastScrollTopIndex: this.lastScrollTopIndex });\n }\n }\n };\n Select2.prototype.moveDown = function () {\n this.hoveringValue = common.getNextOption(this.getFilteredData(true), this.hoveringValue);\n this.setState({ hoveringValue: this.hoveringValue });\n if (this.resultsElement) {\n var lastScrollTopIndex = common.getLastScrollTopIndex(this.hoveringValue, this.resultsElement, this.getFilteredData(true), this.lastScrollTopIndex);\n if (lastScrollTopIndex !== null) {\n this.lastScrollTopIndex = lastScrollTopIndex;\n this.setState({ lastScrollTopIndex: this.lastScrollTopIndex });\n }\n }\n };\n Select2.prototype.selectByEnter = function () {\n if (this.hoveringValue) {\n var option = common.getOptionByValue(this.props.data, this.hoveringValue);\n this.select(option);\n }\n };\n Select2.prototype.select = function (option) {\n if (option !== null) {\n if (this.props.multiple) {\n var options = this.option;\n var index = -1;\n for (var i = 0; i < options.length; i++) {\n if (options[i].value === option.value) {\n index = i;\n break;\n }\n }\n if (index === -1) {\n options.push(option);\n }\n else {\n options.splice(index, 1);\n }\n this.setState({\n option: this.option\n });\n }\n else {\n this.option = option;\n this.isOpen = false;\n this.setState({\n option: this.option,\n isOpen: this.isOpen\n });\n }\n }\n if (this.props.update) {\n this.props.update(this.props.multiple ? this.option.map(function (op) { return op.value; }) : this.option.value);\n }\n };\n Select2.prototype.keyDown = function (e) {\n if (e.keyCode === 40) {\n this.moveDown();\n e.preventDefault();\n }\n else if (e.keyCode === 38) {\n this.moveUp();\n e.preventDefault();\n }\n else if (e.keyCode === 13) {\n this.selectByEnter();\n e.preventDefault();\n }\n };\n Select2.prototype.isSelected = function (option) {\n return common.isSelected(this.option, option, this.props.multiple);\n };\n Select2.prototype.isDisabled = function (option) {\n return option.disabled ? 'true' : 'false';\n };\n Select2.prototype.removeSelection = function (e, option) {\n var _this = this;\n common.removeSelection(this.option, option);\n if (this.props.update) {\n this.props.update(this.option.map(function (op) { return op.value; }));\n }\n e.preventDefault();\n e.stopPropagation();\n if (this.isOpen) {\n this.setState({ option: this.option }, function () {\n if (!_this.isSearchboxHidden) {\n if (_this.searchInputElement) {\n _this.searchInputElement.focus();\n }\n }\n else {\n if (_this.resultsElement) {\n _this.resultsElement.focus();\n }\n }\n });\n }\n if (this.focusoutTimer) {\n clearTimeout(this.focusoutTimer);\n }\n };\n return Select2;\n}(React.PureComponent));\nexport { Select2 };\n","'use strict';\n\nexports.__esModule = true;\nexports.default = getContainer;\n\nvar _reactDom = require('react-dom');\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction getContainer(container, defaultContainer) {\n container = typeof container === 'function' ? container() : container;\n return _reactDom2.default.findDOMNode(container) || defaultContainer;\n}\nmodule.exports = exports['default'];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getWindow;\nfunction getWindow(node) {\n return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false;\n}\nmodule.exports = exports[\"default\"];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _createChainableTypeChecker = require('./utils/createChainableTypeChecker');\n\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);\n\n if (_react2.default.isValidElement(propValue)) {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.');\n }\n\n if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.');\n }\n\n return null;\n}\n\nexports.default = (0, _createChainableTypeChecker2.default)(validate);\nmodule.exports = exports['default'];","import _extends from 'babel-runtime/helpers/extends';\nimport _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport classNames from 'classnames';\nimport React from 'react';\nimport elementType from 'prop-types-extra/lib/elementType';\n\nimport MediaBody from './MediaBody';\nimport MediaHeading from './MediaHeading';\nimport MediaLeft from './MediaLeft';\nimport MediaList from './MediaList';\nimport MediaListItem from './MediaListItem';\nimport MediaRight from './MediaRight';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\n\nvar propTypes = {\n componentClass: elementType\n};\n\nvar defaultProps = {\n componentClass: 'div'\n};\n\nvar Media = function (_React$Component) {\n _inherits(Media, _React$Component);\n\n function Media() {\n _classCallCheck(this, Media);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Media.prototype.render = function render() {\n var _props = this.props,\n Component = _props.componentClass,\n className = _props.className,\n props = _objectWithoutProperties(_props, ['componentClass', 'className']);\n\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = getClassSet(bsProps);\n\n return React.createElement(Component, _extends({}, elementProps, { className: classNames(className, classes) }));\n };\n\n return Media;\n}(React.Component);\n\nMedia.propTypes = propTypes;\nMedia.defaultProps = defaultProps;\n\nMedia.Heading = MediaHeading;\nMedia.Body = MediaBody;\nMedia.Left = MediaLeft;\nMedia.Right = MediaRight;\nMedia.List = MediaList;\nMedia.ListItem = MediaListItem;\n\nexport default bsClass('media', Media);","import _extends from 'babel-runtime/helpers/extends';\nimport _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\n\nvar _fadeStyles;\n\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Transition, { ENTERED, ENTERING } from 'react-transition-group/Transition';\n\nvar propTypes = {\n /**\n * Show the component; triggers the fade in or fade out animation\n */\n in: PropTypes.bool,\n\n /**\n * Wait until the first \"enter\" transition to mount the component (add it to the DOM)\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * Unmount the component (remove it from the DOM) when it is faded out\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * Run the fade in animation when the component mounts, if it is initially\n * shown\n */\n appear: PropTypes.bool,\n\n /**\n * Duration of the fade animation in milliseconds, to ensure that finishing\n * callbacks are fired even if the original browser transition end events are\n * canceled\n */\n timeout: PropTypes.number,\n\n /**\n * Callback fired before the component fades in\n */\n onEnter: PropTypes.func,\n /**\n * Callback fired after the component starts to fade in\n */\n onEntering: PropTypes.func,\n /**\n * Callback fired after the has component faded in\n */\n onEntered: PropTypes.func,\n /**\n * Callback fired before the component fades out\n */\n onExit: PropTypes.func,\n /**\n * Callback fired after the component starts to fade out\n */\n onExiting: PropTypes.func,\n /**\n * Callback fired after the component has faded out\n */\n onExited: PropTypes.func\n};\n\nvar defaultProps = {\n in: false,\n timeout: 300,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false\n};\n\nvar fadeStyles = (_fadeStyles = {}, _fadeStyles[ENTERING] = 'in', _fadeStyles[ENTERED] = 'in', _fadeStyles);\n\nvar Fade = function (_React$Component) {\n _inherits(Fade, _React$Component);\n\n function Fade() {\n _classCallCheck(this, Fade);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Fade.prototype.render = function render() {\n var _props = this.props,\n className = _props.className,\n children = _props.children,\n props = _objectWithoutProperties(_props, ['className', 'children']);\n\n return React.createElement(\n Transition,\n props,\n function (status, innerProps) {\n return React.cloneElement(children, _extends({}, innerProps, {\n className: classNames('fade', className, children.props.className, fadeStyles[status])\n }));\n }\n );\n };\n\n return Fade;\n}(React.Component);\n\nFade.propTypes = propTypes;\nFade.defaultProps = defaultProps;\n\nexport default Fade;","import _Object$entries from \"babel-runtime/core-js/object/entries\";\nexport default function splitComponentProps(props, Component) {\n var componentPropTypes = Component.propTypes;\n\n var parentProps = {};\n var childProps = {};\n\n _Object$entries(props).forEach(function (_ref) {\n var propName = _ref[0],\n propValue = _ref[1];\n\n if (componentPropTypes[propName]) {\n parentProps[propName] = propValue;\n } else {\n childProps[propName] = propValue;\n }\n });\n\n return [parentProps, childProps];\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isRequiredForA11y;\nfunction isRequiredForA11y(validator) {\n return function validate(props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<