\nconst Button = (props) => {\n\n let {className, disabled, text, ...otherProps} = props;\n className = classNames(\"btn\", className);\n\n // Need to unset props by ourselves if disabled since we're using
element\n if (disabled) {\n otherProps['href'] = \"\";\n otherProps['target'] = null;\n otherProps['onClick'] = (e) => e.preventDefault();\n }\n\n if (!otherProps.href) delete otherProps['href'];\n if (!otherProps.target) delete otherProps['target'];\n\n return (\n \n {text ? {text} : null}\n {props.children}\n \n );\n}\n\n\nButton.propTypes = {\n text: PropTypes.string,\n href: PropTypes.string,\n className: PropTypes.string,\n disabled: PropTypes.bool,\n onClick: PropTypes.func\n};\n\nButton.defaultProps = {\n text: \"\",\n href: \"\",\n className: '',\n disabled: false,\n onClick: () => {\n }\n};\n\n\nButton.Text = ButtonText;\nexport { Button };\n","import React from 'react';\nimport classNames from 'classnames';\nimport { Button } from '../Button';\nimport './styles.scss';\n\n\nconst ButtonDanger = (props) => {\n let { className, ...otherProps } = props;\n className = classNames(\"btn-danger\", className);\n return (\n
\n );\n}\n\n\nButtonDanger.propTypes = Button.propTypes;\nButtonDanger.defaultProps = Button.defaultProps;\nexport { ButtonDanger };\n","import React from 'react';\nimport classNames from 'classnames';\nimport { Button } from '../Button';\nimport './styles.scss';\n\n\nconst ButtonPrimary = (props) => {\n let { className, ...otherProps } = props;\n className = classNames(\"btn-primary\", className);\n return (\n
\n );\n}\n\n\nButtonPrimary.propTypes = Button.propTypes;\nButtonPrimary.defaultProps = Button.defaultProps;\nexport { ButtonPrimary };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport './styles.scss';\n\n\nclass CharCount extends React.Component {\n constructor (props) {\n super(props);\n };\n\n render() {\n const className = classNames(\n \"char-count\",\n this.props.className\n );\n\n let { current, max } = this.props;\n return (\n
\n {max ? `${current}/${max}` : current}\n
\n )\n }\n}\n\n\nexport { CharCount };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Bp } from 'components/Vendors/BlueprintJs';\nimport { Icon } from 'components/Icon';\nimport './styles.scss';\n\n\nconst Checkbox = (props) => {\n const className = classNames(\n \"checkbox\",\n props.className,\n {\"disabled\": props.disabled}\n );\n\n // Disabled style\n if (props.disabled) {\n return (\n
\n
\n
{props.label}\n
{props.desc}
\n
\n );\n }\n\n return (\n
\n
\n {props.children}\n \n
{props.desc}
\n
\n );\n}\n\n\nCheckbox.propTypes = {\n className: PropTypes.string,\n label: PropTypes.string,\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nCheckbox.defaultProps = {\n className: '',\n label: '',\n desc: '',\n checked: false,\n disabled: false,\n onChange: ()=>{}\n};\n\n\nexport { Checkbox };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { observer } from \"mobx-react\";\nimport uniqueId from 'lodash/uniqueId';\nimport './styles.scss';\n\n\nconst CheckboxGroup = observer((props) => {\n const className = props.className ? `checkbox-group ${props.className}` : \"checkbox-group\";\n\n return (\n
\n {props.children}\n
\n );\n})\n\n\nCheckboxGroup.propTypes = {\n className: PropTypes.string,\n};\n\nCheckboxGroup.defaultProps = {\n className: '',\n};\n\nexport { CheckboxGroup };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport './styles.scss';\n\n\nconst Input = (props) => {\n let { className, onChange, maxLength, ...otherProps } = props;\n className = className ? `bp-input ${className}` : \"bp-input\";\n if (maxLength) otherProps['maxLength'] = maxLength;\n\n return (\n
onChange(e.target.value)}\n dir=\"auto\"\n {...otherProps}\n />\n );\n}\n\n\nInput.propTypes = {\n className: PropTypes.string,\n value: PropTypes.string,\n type: PropTypes.string,\n step: PropTypes.string,\n placeholder: PropTypes.string,\n onChange: PropTypes.func,\n disabled: PropTypes.bool,\n readOnly: PropTypes.bool,\n maxLength: PropTypes.number\n};\n\nInput.defaultProps = {\n className: '',\n value: '',\n type: 'text',\n step: '',\n placeholder: '',\n onChange: ()=>{},\n disabled: false,\n readOnly: false,\n style: {},\n maxLength: null\n};\n\n\n\nexport { Input };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport omit from 'lodash/omit';\nimport { Bp } from 'components/Vendors/BlueprintJs';\n\n\n// Workaround limitations of NumericInput\n// See https://github.com/palantir/blueprint/issues/3553\nclass NumericInput extends React.Component {\n constructor (props) {\n super(props);\n }\n\n onValueChange = (valueAsNumber, valueAsString) => {\n const { onChange } = this.props;\n if (!valueAsString) return;\n\n let value = `${valueAsString}`;\n onChange(value);\n };\n\n onBlur = (e) => {\n const { min, max, defaultValue, onChange } = this.props;\n\n let value = `${defaultValue}`;\n if (e.target.value) value = e.target.value;\n\n // ensure within range\n const valueAsNumber = parseInt(value);\n if (min && min > valueAsNumber) value = `${min}`;\n if (max && valueAsNumber > max) value = `${max}`;\n\n // need to update with empty value first to ensure value gets reflected\n // see https://github.com/palantir/blueprint/issues/3650\n onChange(\"\");\n onChange(value);\n };\n\n render() {\n const newProps = omit(this.props, ['onValueChange', 'onBlur', 'onChange', 'defaultValue']);\n return (\n
\n );\n }\n}\n\n\nNumericInput.defaultProps = {\n defaultValue: \"\",\n};\n\nexport { NumericInput };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport uniqueId from 'lodash/uniqueId';\nimport omit from 'lodash/omit';\nimport classNames from 'classnames';\nimport { observer } from 'mobx-react';\nimport { Bp } from 'components/Vendors/BlueprintJs';\nimport './styles.scss';\n\n\n// Need to override to fix height not re-calculated issue\n// See\n// https://github.com/palantir/blueprint/issues/2153\n// https://github.com/palantir/blueprint/blob/d9e1eaa23/packages/core/src/components/editable-text/editableText.tsx\n@observer\nclass EditableText extends React.Component {\n constructor(props) {\n super(props);\n this.ref = React.createRef();\n }\n\n onEdit = (value) => {\n const { onEdit } = this.props;\n if (onEdit) onEdit(value);\n\n // recompute height on select\n this.ref.current.updateInputDimensions();\n };\n\n render() {\n const otherProps = omit(this.props, ['onEdit']);\n\n return (\n
\n \n \n );\n }\n}\n\nexport { EditableText };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Bp } from 'components/Vendors/BlueprintJs';\nimport './styles.scss';\n\n\nconst Radio = (props) => {\n const className = props.className ? `radio ${props.className}` : \"radio\";\n\n return (\n
\n
props.onChange(e.target.value)}\n >\n {props.children}\n \n
{props.desc}
\n
\n );\n}\n\n\nRadio.propTypes = {\n className: PropTypes.string,\n label: PropTypes.string,\n value: PropTypes.string,\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nRadio.defaultProps = {\n className: '',\n label: '',\n value: '',\n desc: '',\n checked: false,\n disabled: false,\n onChange: ()=>{}\n};\n\n\n\n\nexport { Radio };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { observer, PropTypes as MobXPropTypes } from \"mobx-react\";\nimport uniqueId from 'lodash/uniqueId';\nimport { Radio } from '../Radio';\nimport './styles.scss';\n\n\nconst RadioGroup = observer((props) => {\n const className = props.className ? `radio-group ${props.className}` : \"radio-group\";\n\n return (\n
\n {props.options.map((option) =>\n \n )}\n
\n );\n})\n\n\nRadioGroup.propTypes = {\n className: PropTypes.string,\n value: PropTypes.string,\n options: MobXPropTypes.arrayOrObservableArray,\n disabled: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nRadioGroup.defaultProps = {\n className: '',\n value: '',\n options: [],\n disabled: false,\n onChange: ()=>{}\n};\n\nexport { RadioGroup };\n","import React from 'react';\nimport uniqueId from 'lodash/uniqueId';\nimport classNames from 'classnames';\nimport omit from 'lodash/omit';\nimport RcSelect, { Option } from 'rc-select';\nimport './rc-select.scss';\nimport './styles.scss';\n\n\n\n\nclass Select extends React.Component {\n constructor (props) {\n super(props);\n };\n\n onChange = (value, option) => {\n if (!this.props.allowClear && !value) return;\n this.props.onChange(value || \"\");\n };\n\n render() {\n const newProps = omit(this.props, ['options']);\n\n // convert all values to string\n let value = this.props.value;\n value = value ? value + '' : [];\n\n const options = [];\n this.props.options.forEach((option) => {\n option.value += '';\n options.push(option);\n })\n\n return (\n
\n {options.map((option) =>\n \n )}\n \n )\n }\n}\n\nSelect.propTypes = RcSelect.propTypes;\nSelect.defaultProps = RcSelect.defaultProps;\nSelect.defaultProps.allowClear = true;\n\n\n\nclass MultiSelect extends React.Component {\n constructor (props) {\n super(props);\n };\n\n onChange = (values, options) => {\n this.props.onChange(values.map((value) => value.key));\n };\n\n render() {\n const newProps = omit(this.props, ['options']);\n const className = classNames(\"multiple\", this.props.className);\n\n // convert all values to string\n const selectedValues = this.props.value.map((row) => row + '');\n const options = [];\n this.props.options.forEach((option) => {\n option.value += '';\n options.push(option);\n })\n\n // exclude selected values\n const selectableOptions = options.filter((option) => !selectedValues.includes(option.value));\n\n // get selected options\n const values = [];\n const selectedOptions = options.filter((option) => selectedValues.includes(option.value));\n selectedOptions.forEach((option) => {\n values.push({key: option.value, label: option.label});\n })\n\n return (\n
\n {selectableOptions.map((option) =>\n \n )}\n \n )\n }\n}\n\nMultiSelect.propTypes = RcSelect.propTypes;\nMultiSelect.defaultProps = RcSelect.defaultProps;\n\nexport { Select, MultiSelect };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport './styles.scss';\n\n\nconst Switch = (props) => {\n let className = props.className ? `switch ${props.className}` : \"switch\";\n\n // Disabled style\n if (props.disabled) {\n className = `${className} disabled`;\n const text = props.checked ? \"On\" : \"Off\";\n const textClass = props.checked ? \"switch-text text-green\" : \"switch-text text-grey\";\n\n return (\n
\n {text}\n
\n );\n }\n\n return (\n
\n );\n}\n\n\nSwitch.propTypes = {\n className: PropTypes.string,\n checked: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nSwitch.defaultProps = {\n className: '',\n checked: false,\n disabled: false,\n onChange: ()=>{}\n};\n\n\n\nexport { Switch };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport './styles.scss';\n\n\nconst Textarea = (props) => {\n let { className, onChange, ...otherProps } = props;\n className = className ? `bp-input ${className}` : \"bp-input\";\n\n return (\n