UNPKG

likelihood-widgets-react

Version:

A collection of React components used by Likelihood UI.

1 lines 81.8 kB
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("lodash"),require("classnames"),require("react-dom"),require("react-transition-group"),require("react-redux"),require("redux"),require("react-contenteditable"),require("react-inlinesvg"),require("react-tooltip"),require("redux-thunk"));else if("function"==typeof define&&define.amd)define(["react","lodash","classnames","react-dom","react-transition-group","react-redux","redux","react-contenteditable","react-inlinesvg","react-tooltip","redux-thunk"],t);else{var n="object"==typeof exports?t(require("react"),require("lodash"),require("classnames"),require("react-dom"),require("react-transition-group"),require("react-redux"),require("redux"),require("react-contenteditable"),require("react-inlinesvg"),require("react-tooltip"),require("redux-thunk")):t(e.react,e.lodash,e.classnames,e["react-dom"],e["react-transition-group"],e["react-redux"],e.redux,e["react-contenteditable"],e["react-inlinesvg"],e["react-tooltip"],e["redux-thunk"]);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(this,function(e,t,n,o,r,i,a,c,s,l,u){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=11)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("lodash")},function(e,t){e.exports=require("classnames")},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(15)),o(n(23)),o(n(24)),o(n(25)),o(n(26)),o(n(28)),o(n(14)),o(n(29)),o(n(40)),o(n(41)),o(n(42)),o(n(27));var r=n(39);t.RefineDatasetSection=r.RefineDatasetSectionWrapper;var i=n(22);t.ExploreDatasetSection=i.ExploreDatasetSectionWrapper},function(e,t){e.exports=require("react-dom")},function(e,t){e.exports=require("react-transition-group")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.emptyData={count:0,items:[]},t.initialState={data:t.emptyData,imageField:null,keyField:null,loading:!1,activeItemIndex:null,showDetail:!1}},function(e,t){e.exports=require("react-redux")},function(e,t){e.exports=require("redux")},function(e,t,n){"use strict";function o(e){return'url("'+(e=e.replace(/ /g,"%20").replace(/^\s+|\s+$/g,""))+'")'}Object.defineProperty(t,"__esModule",{value:!0}),t.cssUrl=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.specialOperators=["is","is not"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(3))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=function(e){return{type:"INIT_STATE",dataset:e}},i=function(e){return{type:"SET_DATA",payload:{data:e}}},a=function(e){return{type:"SET_IMAGE_FIELD",payload:{imageField:e}}},c=function(e){return{type:"SET_KEY_FIELD",payload:{keyField:e}}},s=function(e){return{type:"SET_LOADING",payload:{loading:e}}},l=function(e){return{type:"SET_ACTIVE_ITEM_INDEX",payload:{activeItemIndex:e}}},u=function(e){return{type:"SET_SHOW_DETAIL",payload:{showDetail:e}}},p=function(){return function(e){e(r(o.initialState)),e(s(!0))}},d=function(){return function(e){e(s(!1))}},h=function(e){return function(t){t(l(e)),t(u(!0))}};t.actions={initState:r,setData:i,setImageField:a,setKeyField:c,setShowDetail:u,setActiveItemIndex:l,startLoading:p,finishLoading:d,onItemClick:h}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return{type:"INIT_STATE",filters:e}},r=function(){return{type:"ADD_FILTER"}},i=function(e){return{type:"DELETE_FILTER",payload:{id:e}}},a=function(e){return{type:"ADD_ENTRY",payload:{id:e}}},c=function(e,t){return{type:"DELETE_ENTRY",payload:{id:e,entry:{index:t}}}},s=function(e,t){return{type:"CHANGE_FILTER_TYPE",payload:{id:e,type:t}}},l=function(e,t){return{type:"SET_HAS_FOCUS",payload:{id:e,hasFocus:t}}},u=function(e,t){return{type:"CHANGE_CONJUNCTION",payload:{id:e,conjunction:t}}},p=function(e,t,n){return{type:"CHANGE_ENTRY_OPERATOR",payload:{id:e,entry:{index:t,operator:n}}}},d=function(e,t,n){return{type:"CHANGE_ENTRY_VALUE",payload:{id:e,entry:{index:t,value:n}}}};t.actions={initFilterState:o,addFilter:r,deleteFilter:i,changeFilterType:s,setHasFocus:l,changeConjunction:u,addEntry:a,changeOperator:p,changeEntryValue:d,deleteEntry:c}},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(2),a=n(3),c=n(71),s={};"undefined"!=typeof window&&(s=n(46));var l=function(e){function t(t){var n=e.call(this,t)||this;return n.handleClick=function(){var e=n.props.onChange,t=!n.isChecked();n.controlled||n.setState({checked:t}),e(t)},n.handleMouseEnter=function(){n.setState({hover:!0})},n.handleMouseLeave=function(){n.setState({hover:!1})},n.isChecked=function(){return n.controlled?n.props.checked:n.state.checked},n.controlled=null!==t.checked,n.state={checked:!1,hover:!1},n}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.classNames,n=e.label,o=this.state.hover,l=this.isChecked();return r.createElement("div",{className:i(t.concat(s.Checkbox),(u={},u[s.checked]=l,u[s.hover]=o,u)),onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},r.createElement("span",{className:s.box}),r.createElement(a.Icon,{classNames:[s.checkmark],src:c,height:16,width:16,border:!1,active:!0,activeFill:"white"}),r.createElement("span",{className:s.label},n));var u},t}(r.Component);l.defaultProps={label:"",checked:null,classNames:[],onChange:function(){}},t.Checkbox=l},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(4),a=n(2),c=n(1),s=n(3),l=n(72),u={};"undefined"!=typeof window&&(u=n(47));var p=function(e){function t(t){var n=e.call(this,t)||this;return n.onDropdownMount=function(e){n.dropdown=i.findDOMNode(e)},n.onSearchboxMount=function(e){n.searchbox=i.findDOMNode(e)},n.handleOptionListMount=function(e){n.optionList=i.findDOMNode(e)},n.handleSelectedOptionMount=function(e){n.selectedOption=i.findDOMNode(e)},n.handleOptionClick=function(e,t){var o=n.props,r=o.onChange,i=o.items,a=o.allowDeselect,c=i.indexOf(e),s=n.getSelectedIndex(),l=a&&c===s;n.controlled||n.setState({selectedIndex:l?null:c}),r(l?null:c)},n.handleFocus=function(e){e.stopPropagation()},n.handleBlur=function(e){(0,n.props.onBlur)()},n.handleFilterStringChange=function(e){var t=e.target.value;n.setState({filterString:t,preSelectIndex:null})},n.handleSearchIconClick=function(){n.searchbox.focus()},n.handleSearchBoxFocus=function(){n.setState({searchBoxFocused:!0})},n.handleSearchBoxBlur=function(){n.setState({searchBoxFocused:!1})},n.handleScroll=function(e){var t=e.deltaY,o=n.optionList,r=o.scrollTop,i=o.scrollHeight,a=o.clientHeight,c=r+a===i;(0===r&&t<0||c&&t>0)&&e.preventDefault()},n.handleKeyDown=function(e){var t=e.keyCode,o=n.props,r=(o.items,o.onChange),i=n.state.preSelectIndex,a=n.getFilteredIndices();switch(-1!==[9,13,38,40].indexOf(t)&&e.preventDefault(),t){case 38:var s=a.indexOf(i);s>0&&n.setState({preSelectIndex:a[s-1]});break;case 9:case 40:if(c.isNull(i))a.length>0&&n.setState({preSelectIndex:a[0]});else{var s=a.indexOf(i);s+1<a.length&&n.setState({preSelectIndex:a[s+1]})}break;case 13:c.isNull(i)||(r(i),n.controlled||n.setState({selectedIndex:i}))}},n.getFilteredItems=function(){var e=n.props.items,t=n.state.filterString;return c(e).filter(function(e){return!(!c.isEmpty(t)&&!e.toLowerCase().includes(t.toLowerCase()))})},n.getFilteredIndices=function(){var e=n.props.items,t=n.getFilteredItems();return c(t).map(function(t){return e.indexOf(t)}).value()},n.controlled=null!==t.selectedIndex,n.state={preSelectIndex:t.selectedIndex,selectedIndex:n.controlled?t.selectedIndex:null,filterString:"",searchBoxFocused:!1},n}return o(t,e),t.prototype.componentDidMount=function(){if(this.searchbox?this.searchbox.focus():this.dropdown&&this.dropdown.focus(),this.dropdown){var e=this.dropdown.getBoundingClientRect();e.bottom>window.innerHeight?this.dropdown.scrollIntoView(!1):e.top<0&&this.dropdown.scrollIntoView()}},t.prototype.render=function(){var e=this.props,t=e.showSearchbox,n=e.classNames,o=this.state.searchBoxFocused,i={maxHeight:t?void 0:"280px"};return r.createElement("div",{onBlur:this.handleBlur,tabIndex:0,className:a(n.concat(u.Dropdown)),ref:this.onDropdownMount,onFocus:this.handleFocus,onKeyDown:this.handleKeyDown},t&&r.createElement("div",{className:u.search},r.createElement(s.Icon,{classNames:[u.icon],src:l,height:16,width:16,border:!1,onClick:this.handleSearchIconClick,active:o,fill:"light"}),r.createElement("input",{ref:this.onSearchboxMount,placeholder:"Search",className:u.input,onChange:this.handleFilterStringChange,onFocus:this.handleSearchBoxFocus,onBlur:this.handleSearchBoxBlur,spellCheck:!1})),r.createElement("div",{className:u.optionList,style:i,ref:this.handleOptionListMount,onWheel:this.handleScroll},this.getFilteredOptions()))},t.prototype.getFilteredOptions=function(){var e=this,t=this.props,n=t.items,o=t.uppercase,i=this.state.preSelectIndex,c=this.getSelectedIndex(),s=this.getFilteredItems().map(function(t){return r.createElement("div",{className:a(u.option,(s={},s[u.active]=n.indexOf(t)===c,s[u.preselect]=n.indexOf(t)===i,s)),key:t,onMouseDown:e.handleOptionClick.bind(e,t),ref:n.indexOf(t)===c?e.handleSelectedOptionMount:null},o?t.toUpperCase():t);var s}).value();return 0===s.length?r.createElement("div",{className:u.empty},"No results."):s},t.prototype.getSelectedIndex=function(){return this.controlled?this.props.selectedIndex:this.state.selectedIndex},t}(r.Component);p.defaultProps={items:[],selectedIndex:null,uppercase:!1,showSearchbox:!1,allowDeselect:!1,classNames:[],onChange:function(){},onBlur:function(){}},t.Dropdown=p},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(2),a=n(1),c=n(3),s=n(20),l=n(9),u=n(73),p={};"undefined"!=typeof window&&(p=n(48));var d=function(e){function t(t){var n=e.call(this,t)||this;return n.handleClose=function(){(0,n.props.setShowDetail)(!1)},n}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.classNames,n=e.item,o=e.showDetail,d=e.imageField,h=!a.isEmpty(d)&&!a.isEmpty(n[d]);return r.createElement("div",{className:p.DetailPanelWrapper},r.createElement("div",{className:i(t.concat(p.DetailPanel)),style:{transform:o?"translate3d(0, 0, 0)":void 0}},r.createElement("div",{className:p.header},r.createElement(c.Icon,{classNames:[p.close],src:u,height:20,width:20,onMouseDown:this.handleClose,border:!1})),r.createElement("div",{className:p.content},h&&r.createElement("div",{className:p.image,style:{backgroundImage:l.cssUrl(n[d])}}),r.createElement(s.default,{classNames:[p.stripedGrid],imageField:d,item:n}))))},t}(r.Component);d.defaultProps={item:{},imageField:null,showDetail:!1,setShowDetail:function(e){},classNames:[]},t.default=d},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(2),a=n(1),c={};"undefined"!=typeof window&&(c=n(49));var s=function(e){function t(t){var n=e.call(this,t)||this;return n.onImageLoad=function(){n.setState({imageLoaded:!0})},n.onImageLoadFail=function(e){n.setState({hasImage:!1})},n.state={hasImage:null,imageLoaded:!1},n}return o(t,e),t.prototype.componentDidMount=function(){this.checkIfHasImage(this.props)},t.prototype.componentWillReceiveProps=function(e){this.checkIfHasImage(e)},t.prototype.render=function(){var e=this.props,t=e.classNames,n=e.item,o=e.imageField,a=e.active,s=e.onClick,l=this.state,u=l.hasImage,p=l.imageLoaded;return r.createElement("div",{className:i(t.concat(c.ImageItem),(d={},d[c.active]=a,d)),onClick:s},!0===u&&r.createElement("img",{src:n[o],className:i(c.image,(h={},h[c.imageLoaded]=p,h)),onLoad:this.onImageLoad,onError:this.onImageLoadFail,onAbort:this.onImageLoadFail}));var d,h},t.prototype.checkIfHasImage=function(e){var t=e.item,n=e.imageField;this.setState({hasImage:!a.isEmpty(t)&&!a.isEmpty(t[n])})},t}(r.Component);s.defaultProps={item:{},imageField:null,active:!1,onClick:function(){},classNames:[]},t.default=s},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(4),a=n(2),c=n(1),s=n(6),l=n(17),u={};"undefined"!=typeof window&&(u=n(50));var p=function(e){function t(t){var n=e.call(this,t)||this;return n.handleImageItemClick=function(e){(0,n.props.onItemClick)(e)},n.handleSelectedItemMount=function(e){n.selectedItem=i.findDOMNode(e)},n}return o(t,e),t.prototype.componentDidUpdate=function(){this.selectedItem&&this.selectedItem.scrollIntoView()},t.prototype.render=function(){var e=this,t=this.props,n=t.classNames,o=t.data,i=t.imageField,s=t.keyField,p=t.activeItemIndex;return r.createElement("div",{className:a(n.concat(u.ImageItemGrid))},c.map(o.items,function(t,n){var o=s&&t[s]?t[s]:c.uniqueId("image-item");return r.createElement(l.default,{key:o,classNames:[u.ImageItem],imageField:i,item:t,onClick:e.handleImageItemClick.bind(e,n),active:p===n,ref:p===n?e.handleSelectedItemMount:null})}))},t}(r.Component);p.defaultProps={data:s.emptyData,imageField:null,keyField:null,activeItemIndex:null,onItemClick:function(e){},classNames:[]},t.default=p},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(4),a=n(2),c=n(1),s=n(6),l={};"undefined"!=typeof window&&(l=n(51));var u=function(e){function t(t){var n=e.call(this,t)||this;return n.handleListItemClick=function(e){(0,n.props.onItemClick)(e)},n.handleSelectedItemMount=function(e){n.selectedItem=i.findDOMNode(e)},n}return o(t,e),t.prototype.componentDidUpdate=function(){this.selectedItem&&this.selectedItem.scrollIntoView()},t.prototype.render=function(){var e=this,t=this.props,n=t.classNames,o=t.data,i=t.keyField,s=t.activeItemIndex;return r.createElement("div",{className:a(n.concat(l.ListItemGrid))},c.map(o.items,function(t,n){var o=i&&t[i]?t[i]:c.uniqueId("list-item");return r.createElement("div",{key:o,className:a(l.ListItem,(u={},u[l.active]=s===n,u)),onClick:e.handleListItemClick.bind(e,n),ref:s===n?e.handleSelectedItemMount:null},e.constructLabel(n+1,t));var u}))},t.prototype.constructLabel=function(e,t){var n=this.props.keyField,o=c(t).omitBy(function(e,t){return t===n}).values().filter(function(e){return!e.toString().startsWith("http")}).filter(function(e){return e.length<50}).join(", ");return c.isEmpty(o)?null:("00"+e).slice(-3)+", "+o},t}(r.Component);u.defaultProps={data:s.emptyData,keyField:null,activeItemIndex:null,onItemClick:function(e){},classNames:[]},t.default=u},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(4),a=n(2),c=n(1),s=n(9),l={};"undefined"!=typeof window&&(l=n(52));var u=function(e){function t(t){var n=e.call(this,t)||this;return n.onGridMount=function(e){n.gridComponent=i.findDOMNode(e)},n}return o(t,e),t.prototype.componentWillReceiveProps=function(e){this.gridComponent&&(this.gridComponent.scrollTop=0)},t.prototype.render=function(){var e=this,t=this.props,n=t.classNames,o=t.item,i=t.imageField,u=c(o).toPairs().sortBy(0).fromPairs().value();return r.createElement("div",{ref:this.onGridMount,className:a(n.concat(l.StripedGrid))},c.map(u,function(t,n){return r.createElement("div",{key:n+t,className:l.entry},r.createElement("div",{className:l.key},n),r.createElement("div",{className:l.valueWrapper},n===i&&!c.isEmpty(i)&&!c.isEmpty(o[i])&&r.createElement("div",{className:l.image,style:{backgroundImage:s.cssUrl(o[i])}}),r.createElement("div",{className:l.value,onClick:e.handleCellClick},t)))}))},t.prototype.handleCellClick=function(e){var t=e.target;if(window.getSelection&&document.createRange){var n=window.getSelection(),o=n.toString();if(c.isEmpty(o)){var r=document.createRange();r.selectNodeContents(t),n.removeAllRanges(),n.addRange(r)}}},t}(r.Component);u.defaultProps={item:{},imageField:null,classNames:[]},t.default=u},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(7),a=n(2),c=n(1),s=n(12),l=n(6),u=n(18),p=n(19),d=n(16),h={};"undefined"!=typeof window&&(h=n(53));var _=function(e){function t(t){var n=e.call(this,t)||this;return n.handleKeyDown=function(e){var t=n.props,o=t.setActiveItemIndex,r=t.dataset,i=e.keyCode,a=r.activeItemIndex;if(null!==a&&null!==r.data){var s=1;c.isEmpty(r.imageField)||(s=5);var l=r.data.items.length;switch(-1!==[37,38,39,40].indexOf(i)&&e.preventDefault(),i){case 37:a-1>=0&&o(a-1);break;case 38:a-s>=0&&o(a-s);break;case 9:case 39:a+1<l&&o(a+1);break;case 40:a+s<l&&o(a+s);break;default:return}}},n}return o(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.initialState;(0,e.initState)(t),window.addEventListener("keydown",this.handleKeyDown)},t.prototype.componentWillUnmount=function(){window.removeEventListener("keydown",this.handleKeyDown)},t.prototype.componentWillReceiveProps=function(e){var t=e.setData,n=e.setImageField,o=e.setKeyField,r=e.startLoading,i=e.finishLoading;c.isEqual(this.props.dataset.data,e.initialState.data)||t(e.initialState.data),c.isEqual(this.props.dataset.keyField,e.initialState.keyField)||o(e.initialState.keyField),c.isEqual(this.props.dataset.imageField,e.initialState.imageField)||n(e.initialState.imageField),c.isEqual(this.props.dataset.loading,e.initialState.loading)||(e.initialState.loading?r():i())},t.prototype.render=function(){var e=this.props,t=e.dataset,n=e.classNames,o=e.onItemClick,i=e.setShowDetail;return r.createElement("div",{className:a(n.concat(h.ExploreDatasetSection))},r.createElement("div",{className:h.title},"Explore your dataset"),t.loading&&r.createElement("div",{className:h.loading},"Loading..."),!t.loading&&!c.isEmpty(t.data)&&r.createElement("div",{className:h.message},t.data.count+" items in your dataset."+(t.data.count>100?" First 100 shown.":"")),!t.loading&&this.hasData()&&!c.isEmpty(t.imageField)&&r.createElement(u.default,{data:t.data,imageField:t.imageField,keyField:t.keyField,activeItemIndex:t.activeItemIndex,onItemClick:o}),!t.loading&&this.hasData()&&c.isEmpty(t.imageField)&&r.createElement(p.default,{data:t.data,keyField:t.keyField,activeItemIndex:t.activeItemIndex,onItemClick:o}),this.hasData()&&r.createElement(d.default,{item:t.data.items[t.activeItemIndex],imageField:t.imageField,showDetail:t.showDetail,setShowDetail:i}))},t.prototype.hasData=function(){var e=this.props.dataset;return!c.isEmpty(e.data)&&!c.isEmpty(e.data.items)},t}(r.Component);_.defaultProps={initialState:null,classNames:[],dataset:l.initialState,initState:function(){},setData:function(){},setImageField:function(){},setKeyField:function(){},setShowDetail:function(){},setActiveItemIndex:function(){},startLoading:function(){},finishLoading:function(){},onItemClick:function(){}};var f=function(e,t){return{dataset:e}};t.default=i.connect(f,s.actions)(_)},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(7),a=n(8),c=n(45),s=n(21),l=n(6),u=n(43),p=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.componentWillMount=function(){this.exploreDatasetStore=a.createStore(u.default,l.initialState,c.default())},t.prototype.componentWillUnmount=function(){this.exploreDatasetStore=null},t.prototype.render=function(){var e=this.props,t=e.classNames,n=e.initialState;return r.createElement(i.Provider,{store:this.exploreDatasetStore},r.createElement(s.default,{initialState:n,classNames:t}))},t}(r.Component);p.defaultProps={initialState:l.initialState,classNames:[]},t.ExploreDatasetSectionWrapper=p},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(2),a=n(80),c=n(1),s=n(3),l={};"undefined"!=typeof window&&(l=n(54));var u=function(e){function t(t){var n=e.call(this,t)||this;return n.handleMouseEnter=function(){n.setState({hover:!0})},n.handleMouseLeave=function(){n.setState({hover:!1})},n.tooltipId=c.uniqueId("tooltip"),n.state={hover:!1},n}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.classNames,n=e.width,o=e.height,a=e.onClick,u=e.onMouseDown,p=e.border,d=e.tooltip,h={height:o+"px",width:n+"px",border:p?void 0:"none"},_=!c.isEmpty(d);return r.createElement("div",{tabIndex:0,onClick:a,onMouseDown:u,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,className:i(t.concat(l.icon)),style:h,"data-tip":_,"data-for":this.tooltipId},this.generateIcon(),_&&r.createElement(s.Tooltip,{id:this.tooltipId,text:d}))},t.prototype.generateIcon=function(){var e=this.props,t=e.src,n=e.active,o=e.fill,c=e.activeFill,s=this.state.hover;return r.createElement(a,{key:t,src:t,className:i(l[o],l[c],(u={},u[l.active]=n,u[l.hover]=s,u))});var u},t}(r.Component);u.defaultProps={src:"",width:24,height:24,classNames:[],onClick:function(){},onMouseDown:function(){},border:!0,tooltip:"",active:!1,fill:"default",activeFill:"purple"},t.Icon=u},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(2),a=n(1),c=n(3),s={};"undefined"!=typeof window&&(s=n(55));var l=function(e){function t(t){var n=e.call(this,t)||this;return n.handleIconClick=function(e){(0,n.props.onClick)(e)},n}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.icons,o=t.classNames,l=t.paddingRight,u=t.width,p=t.height,d=t.activeName,h=t.iconBorder,_=t.activeFill,f={paddingRight:l+"px"};return r.createElement("div",{className:i(o.concat(s["icon-group"]))},a.map(n,function(t){return r.createElement("div",{key:t.name,className:s.icon,style:f},r.createElement(c.Icon,{src:t.src,active:t.name===d,width:u,height:p,onClick:e.handleIconClick.bind(e,t.name),tooltip:t.tooltip,border:h,activeFill:_}))}))},t}(r.Component);l.defaultProps={icons:[],paddingRight:2,width:24,height:24,classNames:[],onClick:function(){},activeName:"",iconBorder:!0,activeFill:"purple"},t.IconGroup=l},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),c=n(2),s=n(1),l={};"undefined"!=typeof window&&(l=n(56));var u=function(e){function t(t){var n=e.call(this,t)||this;return n.onInputChange=function(e){var t=n.props,o=(t.onChange,t.buffer,e.target.value);n.setState({value:o}),n.debouncedOnChange(o)},n.state={value:""},n.debouncedOnChange=a.debounce(function(e){t.onChange(e)},t.buffer),n}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.placeholder,n=e.className,o=e.children,a=e.style,u=e.width,p=e.height,d=[l["icon-input"]],h=r({width:u+"px",height:p+"px"},this.props.inputStyle);return s.isEmpty(n)||d.push(n),i.createElement("div",{style:a,className:c(d)},i.createElement("div",{className:l.icon},o),i.createElement("input",{style:h,placeholder:t,onChange:this.onInputChange,className:l.input}))},t}(i.Component);u.defaultProps={placeholder:"",className:"",style:{},inputStyle:{},width:270,height:38,onChange:function(){},buffer:0},t.IconInput=u},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]]);return n};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),c=n(1),s=n(2),l={};"undefined"!=typeof window&&(l=n(57));var u=function(e){function t(t){var n=e.call(this,t)||this;return n.onInputChange=function(e){var t=n.props,o=(t.onChange,t.buffer,e.target.value);n.setState({value:o}),n.debouncedOnChange(o)},n.state={value:""},n.debouncedOnChange=c.debounce(function(e){t.onChange(e)},t.buffer),n}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.placeholder,n=e.classNames,o=e.width,c=e.height,u=(e.onChange,e.buffer,i(e,["placeholder","classNames","width","height","onChange","buffer"])),p={height:c+"px",width:o+"px"};return a.createElement("input",r({placeholder:t,width:o,height:c,onChange:this.onInputChange,className:s(n.concat(l.input)),style:p},u))},t}(a.Component);u.defaultProps={placeholder:"",classNames:[],height:38,width:154,onChange:function(){},buffer:0},t.Input=u},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(2),a=n(3),c=n(74),s={};"undefined"!=typeof window&&(s=n(58));var l=function(e){function t(t){var n=e.call(this,t)||this;return n.handleClose=function(){(0,n.props.onClose)()},n}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.classNames,n=e.show,o=e.title,l=e.children;return r.createElement("div",{className:i(t.concat(s.Modal),(u={},u[s.show]=n,u))},r.createElement("div",{className:s.mask,onClick:this.handleClose}),r.createElement("div",{className:s.dialog},r.createElement("div",{className:s.title},o),r.createElement(a.Icon,{classNames:[s.close],src:c,height:24,width:24,onMouseDown:this.handleClose,border:!1}),r.createElement("div",{className:s.content},r.Children.toArray(l))));var u},t}(r.Component);l.defaultProps={title:"",show:!1,onClose:function(){},classNames:[]},t.Modal=l},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(4),a=n(5),c=n(2),s=n(1),l=n(3),u=n(75),p={};"undefined"!=typeof window&&(p=n(59));var d=function(e){function t(t){var n=e.call(this,t)||this;return n.renderAutoWrapper=function(){var e=n.state.hover;return r.createElement("div",{className:p.autoWrapper,onClick:n.showDropdown},r.createElement("span",{className:c(p.text,(t={},t[p.hover]=e,t))},"Auto"),r.createElement(l.Icon,{classNames:[p.arrow],src:u,active:e,activeFill:"white",border:!1,height:10,width:10}));var t},n.renderInputWrapper=function(){var e=n.props,t=e.value,o=e.type,i=e.types,a=e.placeholder,d=e.showArrow,h=n.state.focus;return r.createElement("div",{className:p.inputWrapper},r.createElement("input",{value:t,className:p.input,spellCheck:!1,placeholder:a,onChange:n.handleInputChange,onFocus:n.handleInputFocus,onBlur:n.handleInputBlur}),h&&r.createElement("div",{className:p.inputMask}),h&&d&&r.createElement("div",{className:p.arrow},r.createElement(l.Icon,{classNames:[p.up],src:u,activeFill:"white",border:!1,height:10,width:10,onMouseDown:n.handleUpArrowMouseDown}),r.createElement(l.Icon,{classNames:[p.down],src:u,activeFill:"white",border:!1,height:10,width:10,onMouseDown:n.handleDownArrowMouseDown})),!s.isEmpty(i)&&s.isNull(n.defaultType)&&r.createElement("div",{className:p.type,onClick:n.showDropdown},o),!s.isEmpty(i)&&!s.isNull(n.defaultType)&&r.createElement("div",{className:c(p.type,p.disabled)},n.defaultType))},n.handleComponentMount=function(e){n.component=i.findDOMNode(e)},n.handleKeyDown=function(e){var t=n.props.type,o=n.state.focus,r=e.keyCode;if("auto"!==t&&o)switch(-1!==[38,40].indexOf(r)&&e.preventDefault(),r){case 38:n.increaseValue();break;case 40:n.decreaseValue()}},n.handleWheel=function(e){e.persist(),e.preventDefault(),n.throttledHandleWheel(e)},n.throttledHandleWheel=function(e){var t=n.props.type,o=n.state,r=o.focus,i=o.showDropdown,a=e.deltaY,c="auto"===t;i||c||!r||(a<0?n.increaseValue():n.decreaseValue())},n.showDropdown=function(){n.setState({showDropdown:!0})},n.hideDropdown=function(){n.setState({showDropdown:!1,hover:!1})},n.handleInputFocus=function(){n.setState({focus:!0})},n.handleInputBlur=function(){n.props.value;n.setState({focus:!1})},n.handleMouseEnter=function(){n.setState({hover:!0})},n.handleMouseLeave=function(){n.setState({hover:!1})},n.handleInputChange=function(e){(0,n.props.onValueChange)(e.target.value)},n.onSelectionChange=function(e){var t=n.props,o=t.types,r=t.onTypeChange;n.hideDropdown(),r(null===e?null:o[e])},n.handleDownArrowMouseDown=function(e){e.preventDefault(),n.decreaseValue()},n.handleUpArrowMouseDown=function(e){e.preventDefault(),n.increaseValue()},n.increaseValue=function(){var e=n.props,t=e.value,o=e.onValueChange,r=e.max,i=Math.min(parseFloat(((parseFloat(t)||0)+1).toFixed(2)),r);i!==parseFloat(t)&&o(i.toString())},n.decreaseValue=function(){var e=n.props,t=e.value,o=e.onValueChange,r=e.min,i=Math.max(parseFloat(((parseFloat(t)||0)-1).toFixed(2)),r);i!==parseFloat(t)&&o(i.toString())},n.state={showDropdown:!1,focus:!1,hover:!1},n.defaultType=1===t.types.length?t.types[0]:null,n.throttledHandleWheel=s.throttle(n.throttledHandleWheel,100),n}return o(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=(e.value,e.type),n=e.types,o=(e.onValueChange,e.onTypeChange);s.isEmpty(n)||-1!==n.indexOf(t)||o(n[0])},t.prototype.render=function(){var e=this.props,t=e.type,n=e.types,o=e.label,i=e.classNames,u=this.state,d=u.focus,h=u.hover,_=u.showDropdown,f="auto"===t,I={marginBottom:s.isEmpty(o)?"0":void 0};return r.createElement("div",{className:c(i.concat(p.NumericInput),(m={},m[p.hover]=h,m[p.focus]=d,m)),style:I,onWheel:this.handleWheel,onKeyDown:this.handleKeyDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,ref:this.handleComponentMount,tabIndex:0},!f&&this.renderInputWrapper(),f&&this.renderAutoWrapper(),_&&r.createElement("div",{className:p.backdrop,onClick:this.hideDropdown}),r.createElement(a.CSSTransitionGroup,{transitionName:"type-dropdown",transitionEnterTimeout:250,transitionLeaveTimeout:250},_&&r.createElement(l.Dropdown,{classNames:[p.dropdown],items:n,uppercase:!0,onChange:this.onSelectionChange,selectedIndex:n.indexOf(t)})),!s.isEmpty(o)&&r.createElement("div",{className:p.label},o));var m},t}(r.Component);d.defaultProps={value:null,type:null,min:0,max:Number.MAX_SAFE_INTEGER,showArrow:!0,types:[],label:null,placeholder:"",classNames:[],onValueChange:function(){},onTypeChange:function(){}},t.NumericInput=d},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),r=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]]);return n};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(2),c=n(1),s={};"undefined"!=typeof window&&(s=n(60));var l=function(e){function t(t){var n=e.call(this,t)||this;return n.onInputChange=function(e){var t=n.props.onChange,o=e.target.value;n.setState({value:o}),t(o)},n.state={value:t.value},n}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.items,o=t.classNames,l=(t.onChange,t.contentAfterSelection),u=(r(t,["items","classNames","onChange","contentAfterSelection"]),this.props.value?this.props.value:this.state.value);return i.createElement("div",{className:a(o.concat(s["radio-group"]))},c.map(n,function(t){var n=u===t.value,o={color:n?"#fff":void 0};return i.createElement("label",{className:s["radio-item"],key:t.value},i.createElement("span",{style:o,className:s["radio-label"]},t.label),i.createElement("input",{type:"radio",value:t.value,checked:n,onChange:e.onInputChange}),i.createElement("div",{className:s["radio-indicator"]}),i.createElement("div",{className:s["content-after"]},n&&l))}))},t}(i.Component);l.defaultProps={items:[],classNames:[],onChange:function(){},value:"",contentAfterSelection:null},t.RadioGroup=l},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(2),a=n(1),c=n(3),s=n(36),l={};"undefined"!=typeof window&&(l=n(61));var u=function(e){function t(t){var n=e.call(this,t)||this;return n.addFilterEntry=function(){var e=n.props,t=e.id;(0,e.addEntry)(t)},n.deleteEntry=function(e){var t=n.props,o=t.id;(0,t.deleteEntry)(o,e)},n.deleteFilter=function(){var e=n.props,t=e.id;(0,e.deleteFilter)(t)},n.handleFilterTypeChange=function(e){var t=n.props,o=t.id;(0,t.changeFilterType)(o,e)},n.handleSetHasFocus=function(e){var t=n.props,o=t.id;(0,t.setHasFocus)(o,e)},n.handleConjunctionChange=function(e){var t=n.props,o=t.id;(0,t.changeConjunction)(o,e)},n.handleOperatorChange=function(e,t){var o=n.props,r=o.id;(0,o.changeOperator)(r,e,t)},n.handleValueChange=function(e,t){var o=n.props,r=o.id;(0,o.changeEntryValue)(r,e,t)},n}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.classNames,n=e.filterOptions,o=e.config,u=a.map(n,function(e){return{label:e,value:e}});return r.createElement("div",{className:i(t.concat(l.FilterItem))},r.createElement(c.Select,{classNames:[l.select],options:u,onChange:this.handleFilterTypeChange,defaultSelectedIndex:n.indexOf(o.type)||0,showSearchbox:!0}),r.createElement(s.FilterValue,{classNames:[l.value],entries:o.entries,conjunction:o.conjunction,setHasFocus:this.handleSetHasFocus,changeConjunction:this.handleConjunctionChange,onOperatorChange:this.handleOperatorChange,onValueChange:this.handleValueChange,addFilterEntry:this.addFilterEntry,deleteEntry:this.deleteEntry,deleteFilter:this.deleteFilter}))},t}(r.Component);u.defaultProps={classNames:[],filterOptions:[],id:null,config:{key:null,type:null,entries:[],conjunction:null,hasFocus:!1},changeFilterType:function(){},setHasFocus:function(){},changeConjunction:function(){},addEntry:function(){},changeOperator:function(){},changeEntryValue:function(){},deleteFilter:function(){},deleteEntry:function(){}},t.FilterItem=u},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(5),a=n(2),c=n(3),s={};"undefined"!=typeof window&&(s=n(62));var l=["empty","null"],u=function(e){function t(t){var n=e.call(this,t)||this;return n.toggleDropdown=function(e){var t=n.state.showDropdown;e.preventDefault(),n.setState({showDropdown:!t})},n.hideDropdown=function(){n.setState({showDropdown:!1})},n.onSelectionChange=function(e){var t=n.props.onChange;n.hideDropdown(),t(null===e?null:l[e])},n.state={showDropdown:!1},n}return o(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.selectedValue,n=e.onChange;-1===l.indexOf(t)&&n("empty")},t.prototype.render=function(){var e=this.props,t=e.classNames,n=e.selectedValue,o=this.state.showDropdown;return r.createElement("div",{className:a(t.concat(s.EmptyNullSelector))},r.createElement("span",{onMouseDown:this.toggleDropdown},n),o&&r.createElement("div",{className:s.backdrop,onClick:this.hideDropdown}),r.createElement(i.CSSTransitionGroup,{transitionName:"dropdown",transitionEnterTimeout:250,transitionLeaveTimeout:250},o&&r.createElement(c.Dropdown,{selectedIndex:l.indexOf(n),classNames:[s.dropdown],items:l,onChange:this.onSelectionChange,onBlur:this.hideDropdown})))},t}(r.Component);u.defaultProps={classNames:[],selectedValue:null,onChange:function(){}},t.default=u},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(4),a=n(5),c=n(2),s=n(1),l=n(3),u=n(10),p=n(33),d=n(31),h=n(35),_=n(34),f=n(77),I=n(76),m={};"undefined"!=typeof window&&(m=n(63));var g=function(e){function t(t){var n=e.call(this,t)||this;return n.onComponentMount=function(e){n.component=e},n.onTrashIconMount=function(e){null!==e&&(n.trashIconComponent=i.findDOMNode(e))},n.handleFilterFocus=function(){var e=n.props.setHasFocus;n.setState({focus:!0,focusedBefore:!0}),e(!0)},n.handleFilterBlur=function(){var e=n.props.setHasFocus;n.setState({focus:!1}),e(!1)},n.handleDeleteFilter=function(e){(0,n.props.deleteFilter)()},n.handleOperatorChange=function(e,t){(0,n.props.onOperatorChange)(e,t)},n.handleValueChange=function(e,t){(0,n.props.onValueChange)(e,t)},n.handleAddEntry=function(e){var t=n.props.addFilterEntry;e.preventDefault(),t()},n.handleChangeConjunction=function(e){(0,n.props.changeConjunction)(e)},n.handleSelectConjunction=function(e,t){var o=n.props,r=o.changeConjunction,i=o.addFilterEntry;t.preventDefault(),r(e),i()},n.handleDeleteEntry=function(e,t){var o=n.props.deleteEntry;t.preventDefault(),o(e)},n.state={focus:!1,focusedBefore:!1,incomplete:!1},n}return o(t,e),t.prototype.componentWillReceiveProps=function(e){var t=e.entries,n=!1;s.each(t,function(e){if(s.isEmpty(e.operator)||s.isEmpty(e.value))return n=!0,!1}),this.setState({incomplete:n})},t.prototype.render=function(){var e=this,t=this.props,n=t.classNames,o=t.entries,i=t.conjunction,g=(t.deleteFilter,this.state),y=g.focus,v=g.focusedBefore,C=g.incomplete;return r.createElement("div",{className:c(n)},r.createElement("div",{className:c(m.FilterValue,(w={},w[m.focus]=y,w[m.incomplete]=!y&&v&&C,w)),tabIndex:0,ref:this.onComponentMount,onFocus:this.handleFilterFocus,onBlur:this.handleFilterBlur},r.createElement(a.CSSTransitionGroup,{transitionName:"entries",transitionEnterTimeout:100,transitionLeaveTimeout:100},s.map(o,function(t,n){return r.createElement("div",{key:t.key,className:m.entry},r.createElement(p.default,{classNames:[m.operator],selectedOperator:t.operator,parentHasFocus:y||!v,onChange:e.handleOperatorChange.bind(e,n)}),r.createElement("div",{className:m.content},!s.isEmpty(t.operator)&&-1===u.specialOperators.indexOf(t.operator)&&r.createElement(h.default,{value:t.value,parentHasFocus:y||!v,onChange:e.handleValueChange.bind(e,n),onDelete:e.handleDeleteEntry.bind(e,n),onFocus:e.handleFilterFocus,onBlur:e.handleFilterBlur}),!s.isEmpty(t.operator)&&-1!==u.specialOperators.indexOf(t.operator)&&r.createElement("span",{className:m["special-value"]},r.createElement(d.default,{onChange:e.handleValueChange.bind(e,n),selectedValue:t.value}),r.createElement(l.Icon,{classNames:[m.delete],src:I,height:14,width:14,onMouseDown:e.handleDeleteEntry.bind(e,n),border:!1,tooltip:"Remove entry"})),n===o.length-1&&!s.isEmpty(t.value)&&y&&e.renderAddConjunction(),n<o.length-1&&!s.isEmpty(t.value)&&r.createElement(_.default,{conjunction:i,onChange:e.handleChangeConjunction,className:m.conjunction})),y&&r.createElement(l.Icon,{classNames:[m.trash],src:f,height:18,width:18,onMouseDown:e.handleDeleteFilter,border:!1,tooltip:"Remove filter",ref:e.onTrashIconMount}))}))),C&&!y&&v&&r.createElement("div",{className:m.IncompleteFilter},"Incomplete filter."));var w},t.prototype.renderAddConjunction=function(){var e=this.props.conjunction;return null!==e?r.createElement("span",{className:c(m.conjunction,m.selectable),onMouseDown:this.handleAddEntry},e+"..."):r.createElement("span",null,r.createElement("span",{className:c(m.conjunction),onMouseDown:this.handleSelectConjunction.bind(this,"and")},"and"),r.createElement("span",{className:m["conjunction-separator"]},"|"),r.createElement("span",{className:c(m.conjunction),onMouseDown:this.handleSelectConjunction.bind(this,"or")},"or"))},t.prototype.renderSelectedConjunction=function(){var e=this.props.conjunction;return r.createElement("span",{className:m.conjunction},e)},t}(r.Component);g.defaultProps={classNames:[],entries:[],conjunction:null,setHasFocus:function(){},changeConjunction:function(){},onOperatorChange:function(){},onValueChange:function(){},addFilterEntry:function(){},deleteEntry:function(){},deleteFilter:function(){}},t.FilterValue=g},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(5),a=n(2),c=n(1),s=n(3),l={};"undefined"!=typeof window&&(l=n(64));var u=["<","=",">","~","≠","≤","≥","is","is not"],p=function(e){function t(t){var n=e.call(this,t)||this;return n.showDropdown=function(e){e.preventDefault(),n.setState({showDropdown:!0})},n.hideDropdown=function(){n.setState({showDropdown:!1})},n.onSelectionChange=function(e){var t=n.props.onChange;n.hideDropdown(),t(null===e?null:u[e])},n.state={showDropdown:!1},n}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.classNames,n=e.parentHasFocus,o=e.selectedOperator,p=this.state.showDropdown;return r.createElement("div",{className:a(t.concat(l.OperatorSelector))},!c.isEmpty(o)&&r.createElement("span",{onMouseDown:this.showDropdown},o),c.isEmpty(o)&&r.createElement("span",{className:a(l["operator-placeholder"],(d={},d[l.incomplete]=!n,d)),onMouseDown:this.showDropdown},"Pick operator"),p&&r.createElement("div",{className:l.backdrop,onClick:this.hideDropdown}),r.createElement(i.CSSTransitionGroup,{transitionName:"operator-dropdown",transitionEnterTimeout:250,transitionLeaveTimeout:250},p&&r.createElement(s.Dropdown,{selectedIndex:u.indexOf(o),classNames:[l.dropdown],items:u,onChange:this.onSelectionChange,onBlur:this.hideDropdown})));var d},t}(r.Component);p.defaultProps={classNames:[],selectedOperator:"",parentHasFocus:!1,onChange:function(){}},t.default=p},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(5),a=n(3),c={};"undefined"!=typeof window&&(c=n(65));var s=["and","or"],l=function(e){function t(t){var n=e.call(this,t)||this;return n.toggleDropdown=function(e){var t=n.state.showDropdown;e.preventDefault(),n.setState({showDropdown:!t})},n.hideDropdown=function(){n.setState({showDropdown:!1})},n.onSelectionChange=function(e){var t=n.props.onChange;n.hideDropdown(),t(null===e?null:s[e])},n.state={showDropdown:!1},n}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.conjunction,o=this.state.showDropdown;return r.createElement("div",{className:c.SelectedConjunction},r.createElement("span",{className:t,onMouseDown:this.toggleDropdown},n),o&&r.createElement("div",{className:c.backdrop,onClick:this.hideDropdown}),r.createElement(i.CSSTransitionGroup,{transitionName:"conjunction-dropdown",transitionEnterTimeout:250,transitionLeaveTimeout:250},o&&r.createElement(a.Dropdown,{selectedIndex:s.indexOf(n),classNames:[c.dropdown],items:s,onChange:this.onSelectionChange,onBlur:this.hideDropdown})))},t}(r.Component);t.default=l},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(4),a=n(2),c=n(79),s=n(1),l={};"undefined"!=typeof window&&(l=n(66));var u=function(e){function t(t){var n=e.call(this,t)||this;return n.onInputSpanMount=function(e){var t=n.props.onBlur;n.inputSpan=i.findDOMNode(e),n.inputSpan?n.inputSpan.focus():t()},n.handleValueChange=function(e){var t=n.props,o=t.onChange;t.value!==e.target.value&&o(e.target.value)},n.handlePaste=function(e){var t=n.props.onChange,o=e.clipboardData.getData("text/plain");e.preventDefault(),s.isEmpty(o)||(t(s.toString(o)),setTimeout(n.moveCaretToEnd,0))},n.handleKeyDown=function(e){var t=n.props,o=t.value,r=t.onDelete,i=e.keyCode;s.isEmpty(o)&&8===i&&r(e),13===i&&e.preventDefault()},n.handlePlaceholderClick=function(){n.inputSpan&&n.inputSpan.focus()},n.moveCaretToEnd=function(){if(document&&document.createR