UNPKG

fixed-data-table-dk

Version:

A React table component designed to allow presenting thousands of rows of data. With one extra change.

13 lines (12 loc) 81.4 kB
/** * FixedDataTable v0.7.1 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.FixedDataTable=t(require("react"),require("react-dom")):e.FixedDataTable=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){o(1),o(5),o(7),o(9),o(11),o(13),o(15),o(17),o(19),o(21),o(23),e.exports=o(25)},function(e,t){},,,,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t){},,function(e,t,o){"use strict";var n=o(26),i=o(75),r=o(73),s=o(72),a={Cell:i,Column:r,ColumnGroup:s,Table:n};a.version="0.6.3",e.exports=a},function(e,t,o){"use strict";function n(e,t){m[e]||(console.warn("`"+e+"` will be DEPRECATED in version "+f+" of FixedDataTable and beyond. \n"+t+"\nRead the docs at: "+p),m[e]=!0)}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r=o(27),s=r.Children,a=o(29),l=o(36),u=o(83),h=o(84),c=o(85),f="0.7.0",p="https://fburl.com/FixedDataTable-v0.6",d={},m={},v=r.createClass({displayName:"TransitionTable",propTypes:{width:a.number.isRequired,height:a.number,maxHeight:a.number,ownerHeight:a.number,overflowX:a.oneOf(["hidden","auto"]),overflowY:a.oneOf(["hidden","auto"]),rowsCount:a.number.isRequired,rowHeight:a.number.isRequired,rowHeightGetter:a.func,rowGetter:a.func,rowClassNameGetter:a.func,groupHeaderHeight:a.number,headerHeight:a.number.isRequired,headerDataGetter:a.func,footerHeight:a.number,footerData:a.oneOfType([a.object,a.array]),footerDataGetter:a.func,scrollLeft:a.number,scrollToColumn:a.number,scrollTop:a.number,scrollToRow:a.number,onScrollStart:a.func,onScrollEnd:a.func,onContentHeightChange:a.func,onRowClick:a.func,onRowDoubleClick:a.func,onRowMouseDown:a.func,onRowMouseEnter:a.func,onRowMouseLeave:a.func,onColumnResizeEndCallback:a.func,isColumnResizing:a.bool},getInitialState:function(){var e={};return e.needsMigration=this._checkDeprecations(),e},_checkDeprecations:function(){var e=!1;return this.props.rowGetter&&(n("rowGetter","Please use the cell API in Column to fetch data for your cells."),e=!0),this.props.headerDataGetter&&n("headerDataGetter","Please use the header API in Column to fetch data for your header cells."),this.props.footerData&&n("footerData","Please use the footer API in Column to fetch data for your footer cells."),this.props.footerDataGetter&&n("footerDataGetter","Please use the footer API in Column to fetch data for your footer cells."),s.forEach(this.props.children,function(e){if(e&&e.props){var t=e.props;t.label&&n("label","Please use `header` instead."),t.dataKey&&n("dataKey","Please use the `cell` API to pass in a dataKey"),t.cellRenderer&&n("cellRenderer","Please use the `cell` API to pass in a React Element instead."),t.headerRenderer&&n("headerRenderer","Please use the `header` API to pass in a React Element instead."),t.columnData&&n("columnData","Please pass data in through props to your header, cell or footer."),t.groupHeaderRenderer&&n("groupHeaderRenderer","Please use the `header` API in ColumnGroup to pass in a React Element instead of a function that creates one."),t.groupHeaderData&&n("groupHeaderData","Please pass in any data through props to your header.")}}),e},_onRowAction:function(e,t){if(t)return function(o,n){t(o,n,e.rowGetter&&e.rowGetter(n)||d)}},_transformColumn:function(e,t,o){var n=e.props;if(e.type.__TableColumn__)return r.createElement(u,i({key:"column_"+o},n,{header:r.createElement(c,{isHeaderCell:!0,label:n.label,width:n.width,dataKey:n.dataKey,className:n.headerClassName,columnData:n.columnData||d,cellRenderer:n.headerRenderer,headerDataGetter:t.headerDataGetter}),columnKey:n.dataKey,cell:r.createElement(c,{dataKey:n.dataKey,className:n.cellClassName,rowGetter:t.rowGetter,width:n.width,columnData:n.columnData||d,cellDataGetter:n.cellDataGetter,cellRenderer:n.cellRenderer}),footer:r.createElement(c,{isFooterCell:!0,className:n.footerClassName,dataKey:n.dataKey,cellRenderer:n.footerRenderer,footerDataGetter:t.footerDataGetter,footerData:t.footerData||d})}))},_transformColumnGroup:function(e,t,o,n){var a=this,l=e.props,u=0,f=s.map(l.children,function(e){return u++,a._transformColumn(e,t,o+"_"+u)});return r.createElement(h,i({},l,{key:"group_"+o,header:r.createElement(c,{isHeaderCell:!0,label:e.props.label,dataKey:o,groupHeaderRenderer:l.groupHeaderRenderer,groupHeaderLabels:n,groupHeaderData:l.columnGroupData||d})}),f)},_convertedColumns:function(e){var t=this;if(!e)return s.map(this.props.children,function(e){return e?e.type.__TableColumn__?r.createElement(u,e.props):e.type.__TableColumnGroup__?r.createElement(h,e.props):void 0:null});var o=this.props,n=0;return s.map(this.props.children,function(e){if(!e)return null;if(e.type.__TableColumn__&&(e=t._transformColumn(e,o,n)),e.type.__TableColumnGroup__){var i=[];s.forEach(t.props.children,function(e){i.push(e.props.label)}),e=t._transformColumnGroup(e,o,n,i)}return n++,e})},render:function(){var e=this.props;return r.createElement(l,i({},e,{onRowMouseDown:this._onRowAction(e,e.onRowMouseDown),onRowClick:this._onRowAction(e,e.onRowClick),onRowDoubleClick:this._onRowAction(e,e.onRowDoubleClick),onRowMouseEnter:this._onRowAction(e,e.onRowMouseEnter),onRowMouseLeave:this._onRowAction(e,e.onRowMouseLeave)}),this._convertedColumns(this.state.needsMigration))}});e.exports=v},function(e,t,o){"use strict";e.exports=o(28)},function(t,o){t.exports=e},function(e,t,o){(function(t){if("production"!==t.env.NODE_ENV){var n="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},r=!0;e.exports=o(31)(i,r)}else e.exports=o(35)()}).call(t,o(30))},function(e,t){function o(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(e){if(h===setTimeout)return setTimeout(e,0);if((h===o||!h)&&setTimeout)return h=setTimeout,setTimeout(e,0);try{return h(e,0)}catch(t){try{return h.call(null,e,0)}catch(t){return h.call(this,e,0)}}}function r(e){if(c===clearTimeout)return clearTimeout(e);if((c===n||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{return c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}function s(){m&&p&&(m=!1,p.length?d=p.concat(d):v=-1,d.length&&a())}function a(){if(!m){var e=i(s);m=!0;for(var t=d.length;t;){for(p=d,d=[];++v<t;)p&&p[v].run();v=-1,t=d.length}p=null,m=!1,r(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var h,c,f=e.exports={};!function(){try{h="function"==typeof setTimeout?setTimeout:o}catch(e){h=o}try{c="function"==typeof clearTimeout?clearTimeout:n}catch(e){c=n}}();var p,d=[],m=!1,v=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)t[o-1]=arguments[o];d.push(new l(e,t)),1!==d.length||m||i(a)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t,o){(function(t){"use strict";function n(){return null}var i=o(32),r=o(33),s=o(34),a=function(){};"production"!==t.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),e.exports=function(e,o){function l(e){var t=e&&(E&&e[E]||e[M]);if("function"==typeof t)return t}function u(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function h(e){this.message=e,this.stack=""}function c(e){function n(n,l,u,c,f,p,d){if(c=c||k,p=p||u,d!==r){if(o){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var v=c+":"+u;!i[v]&&s<3&&(a("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),i[v]=!0,s++)}}return null==l[u]?n?new h(null===l[u]?"The "+f+" `"+p+"` is marked as required "+("in `"+c+"`, but its value is `null`."):"The "+f+" `"+p+"` is marked as required in "+("`"+c+"`, but its value is `undefined`.")):null:e(l,u,c,f,p)}if("production"!==t.env.NODE_ENV)var i={},s=0;var l=n.bind(null,!1);return l.isRequired=n.bind(null,!0),l}function f(e){function t(t,o,n,i,r,s){var a=t[o],l=T(a);if(l!==e){var u=S(a);return new h("Invalid "+i+" `"+r+"` of type "+("`"+u+"` supplied to `"+n+"`, expected ")+("`"+e+"`."))}return null}return c(t)}function p(){return c(n)}function d(e){function t(t,o,n,i,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var a=t[o];if(!Array.isArray(a)){var l=T(a);return new h("Invalid "+i+" `"+s+"` of type "+("`"+l+"` supplied to `"+n+"`, expected an array."))}for(var u=0;u<a.length;u++){var c=e(a,u,n,i,s+"["+u+"]",r);if(c instanceof Error)return c}return null}return c(t)}function m(){function t(t,o,n,i,r){var s=t[o];if(!e(s)){var a=T(s);return new h("Invalid "+i+" `"+r+"` of type "+("`"+a+"` supplied to `"+n+"`, expected a single ReactElement."))}return null}return c(t)}function v(e){function t(t,o,n,i,r){if(!(t[o]instanceof e)){var s=e.name||k,a=H(t[o]);return new h("Invalid "+i+" `"+r+"` of type "+("`"+a+"` supplied to `"+n+"`, expected ")+("instance of `"+s+"`."))}return null}return c(t)}function w(e){function o(t,o,n,i,r){for(var s=t[o],a=0;a<e.length;a++)if(u(s,e[a]))return null;var l=JSON.stringify(e);return new h("Invalid "+i+" `"+r+"` of value `"+s+"` "+("supplied to `"+n+"`, expected one of "+l+"."))}return Array.isArray(e)?c(o):("production"!==t.env.NODE_ENV?a("Invalid argument supplied to oneOf, expected an instance of array."):void 0,n)}function g(e){function t(t,o,n,i,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var a=t[o],l=T(a);if("object"!==l)return new h("Invalid "+i+" `"+s+"` of type "+("`"+l+"` supplied to `"+n+"`, expected an object."));for(var u in a)if(a.hasOwnProperty(u)){var c=e(a,u,n,i,s+"."+u,r);if(c instanceof Error)return c}return null}return c(t)}function _(e){function o(t,o,n,i,s){for(var a=0;a<e.length;a++){var l=e[a];if(null==l(t,o,n,i,s,r))return null}return new h("Invalid "+i+" `"+s+"` supplied to "+("`"+n+"`."))}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV?a("Invalid argument supplied to oneOfType, expected an instance of array."):void 0,n;for(var i=0;i<e.length;i++){var s=e[i];if("function"!=typeof s)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+D(s)+" at index "+i+"."),n}return c(o)}function b(){function e(e,t,o,n,i){return x(e[t])?null:new h("Invalid "+n+" `"+i+"` supplied to "+("`"+o+"`, expected a ReactNode."))}return c(e)}function y(e){function t(t,o,n,i,s){var a=t[o],l=T(a);if("object"!==l)return new h("Invalid "+i+" `"+s+"` of type `"+l+"` "+("supplied to `"+n+"`, expected `object`."));for(var u in e){var c=e[u];if(c){var f=c(a,u,n,i,s+"."+u,r);if(f)return f}}return null}return c(t)}function C(e){function t(t,o,n,s,a){var l=t[o],u=T(l);if("object"!==u)return new h("Invalid "+s+" `"+a+"` of type `"+u+"` "+("supplied to `"+n+"`, expected `object`."));var c=i({},t[o],e);for(var f in c){var p=e[f];if(!p)return new h("Invalid "+s+" `"+a+"` key `"+f+"` supplied to `"+n+"`.\nBad object: "+JSON.stringify(t[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var d=p(l,f,n,s,a+"."+f,r);if(d)return d}return null}return c(t)}function x(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(x);if(null===t||e(t))return!0;var o=l(t);if(!o)return!1;var n,i=o.call(t);if(o!==t.entries){for(;!(n=i.next()).done;)if(!x(n.value))return!1}else for(;!(n=i.next()).done;){var r=n.value;if(r&&!x(r[1]))return!1}return!0;default:return!1}}function R(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function T(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":R(t,e)?"symbol":t}function S(e){if("undefined"==typeof e||null===e)return""+e;var t=T(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function D(e){var t=S(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function H(e){return e.constructor&&e.constructor.name?e.constructor.name:k}var E="function"==typeof Symbol&&Symbol.iterator,M="@@iterator",k="<<anonymous>>",O={array:f("array"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:p(),arrayOf:d,element:m(),instanceOf:v,node:b(),objectOf:g,oneOf:w,oneOfType:_,shape:y,exact:C};return h.prototype=Error.prototype,O.checkPropTypes=s,O.PropTypes=O,O}}).call(t,o(30))},function(e,t){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function n(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==n.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}var i=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=n()?Object.assign:function(e,t){for(var n,a,l=o(e),u=1;u<arguments.length;u++){n=Object(arguments[u]);for(var h in n)r.call(n,h)&&(l[h]=n[h]);if(i){a=i(n);for(var c=0;c<a.length;c++)s.call(n,a[c])&&(l[a[c]]=n[a[c]])}}return l}},function(e,t){"use strict";var o="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=o},function(e,t,o){(function(t){"use strict";function n(e,o,n,a,l){if("production"!==t.env.NODE_ENV)for(var u in e)if(e.hasOwnProperty(u)){var h;try{if("function"!=typeof e[u]){var c=Error((a||"React class")+": "+n+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.");throw c.name="Invariant Violation",c}h=e[u](o,u,a,n,null,r)}catch(e){h=e}if(!h||h instanceof Error||i((a||"React class")+": type specification of "+n+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in s)){s[h.message]=!0;var f=l?l():"";i("Failed "+n+" type: "+h.message+(null!=f?f:""))}}}var i=function(){};if("production"!==t.env.NODE_ENV){var r=o(33),s={};i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}e.exports=n}).call(t,o(30))},function(e,t,o){"use strict";function n(){}var i=o(33);e.exports=function(){function e(e,t,o,n,r,s){if(s!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var o={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return o.checkPropTypes=n,o.PropTypes=o,o}},function(e,t,o){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},i=o(27),r=o(37),s=o(38),a=o(46),l=o(60),u=o(77),h=o(65),c=o(78),f=o(80),p=o(54),d=o(81),m=o(39),v=o(59),w=o(76),g=o(82),_=o(55),b=o(29),y=i.Children,C={},x=1,R="header",T="footer",S="cell",D=i.createClass({displayName:"FixedDataTable",propTypes:{width:b.number.isRequired,height:b.number,maxHeight:b.number,ownerHeight:b.number,overflowX:b.oneOf(["hidden","auto"]),overflowY:b.oneOf(["hidden","auto"]),rowsCount:b.number.isRequired,rowHeight:b.number.isRequired,rowHeightGetter:b.func,rowClassNameGetter:b.func,groupHeaderHeight:b.number,headerHeight:b.number.isRequired,footerHeight:b.number,scrollLeft:b.number,scrollToColumn:b.number,scrollTop:b.number,scrollToRow:b.number,onScrollStart:b.func,onScrollEnd:b.func,onContentHeightChange:b.func,onRowClick:b.func,onRowDoubleClick:b.func,onRowMouseDown:b.func,onRowMouseEnter:b.func,onRowMouseLeave:b.func,onColumnResizeEndCallback:b.func,isColumnResizing:b.bool,getRowWrapper:b.func},getDefaultProps:function(){return{footerHeight:0,groupHeaderHeight:0,headerHeight:0,scrollLeft:0,scrollTop:0}},getInitialState:function(){var e=this.props,t=(void 0===e.height?e.maxHeight:e.height)-(e.headerHeight||0)-(e.footerHeight||0)-(e.groupHeaderHeight||0);return this._scrollHelper=new c(e.rowsCount,e.rowHeight,t,e.rowHeightGetter),e.scrollTop&&this._scrollHelper.scrollTo(e.scrollTop),this._didScrollStop=d(this._didScrollStop,200,this),this._calculateState(this.props)},componentWillMount:function(){var e=this.props.scrollToRow;void 0!==e&&null!==e&&(this._rowToScrollTo=e);var t=this.props.scrollToColumn;void 0!==t&&null!==t&&(this._columnToScrollTo=t),this._wheelHandler=new s(this._onWheel,this._shouldHandleWheelX,this._shouldHandleWheelY)},_shouldHandleWheelX:function(e){return"hidden"!==this.props.overflowX&&(e=Math.round(e),0!==e&&(e<0&&this.state.scrollX>0||e>=0&&this.state.scrollX<this.state.maxScrollX))},_shouldHandleWheelY:function(e){return"hidden"!==this.props.overflowY&&0!==e&&(e=Math.round(e),0!==e&&(e<0&&this.state.scrollY>0||e>=0&&this.state.scrollY<this.state.maxScrollY))},_reportContentHeight:function(){var e,t=this.state.scrollContentHeight,o=this.state.reservedHeight,n=t+o,i=void 0===this.props.height;e=i&&this.props.maxHeight>n?n:this.state.height>n&&this.props.ownerHeight?Math.max(n,this.props.ownerHeight):this.state.height+this.state.maxScrollY,e!==this._contentHeight&&this.props.onContentHeightChange&&this.props.onContentHeightChange(e),this._contentHeight=e},componentDidMount:function(){this._reportContentHeight()},componentWillReceiveProps:function(e){var t=e.scrollToRow;void 0!==t&&null!==t&&(this._rowToScrollTo=t);var o=e.scrollToColumn;void 0!==o&&null!==o&&(this._columnToScrollTo=o);var n=e.overflowX,i=e.overflowY;n===this.props.overflowX&&i===this.props.overflowY||(this._wheelHandler=new s(this._onWheel,"hidden"!==n,"hidden"!==i)),this.props.ownerHeight===e.ownerHeight&&this.props.scrollTop===e.scrollTop||this._didScrollStart(),this._didScrollStop(),this.setState(this._calculateState(e,this.state))},componentDidUpdate:function(){this._reportContentHeight()},render:function(){var e,t=this.state,o=this.props;t.useGroupHeader&&(e=i.createElement(h,{key:"group_header",isScrolling:this._isScrolling,className:w(p("fixedDataTableLayout/header"),p("public/fixedDataTable/header")),width:t.width,height:t.groupHeaderHeight,index:0,zIndex:1,offsetTop:0,scrollLeft:t.scrollX,fixedColumns:t.groupHeaderFixedColumns,scrollableColumns:t.groupHeaderScrollableColumns,onColumnResize:this._onColumnResize}));var n=this.state.maxScrollY,r=t.maxScrollX>0&&"hidden"!==t.overflowX,s=n>0&&"hidden"!==t.overflowY,l=r?a.SIZE:0,c=t.height-l-2*x-t.footerHeight,f=t.useGroupHeader?t.groupHeaderHeight:0,d=f+t.headerHeight;c-=d;var m=0,v=null!=o.maxHeight?d+t.bodyHeight:d+c,g=v+t.footerHeight;void 0!==o.ownerHeight&&o.ownerHeight<t.height&&(m=o.ownerHeight-t.height,v=Math.min(v,o.ownerHeight-t.footerHeight-l),c=Math.max(0,v-d));var _;s&&(_=i.createElement(a,{size:c,contentSize:c+n,onScroll:this._onVerticalScroll,verticalTop:d,position:t.scrollY}));var b;if(r){var y=t.width;b=i.createElement(H,{contentSize:y+t.maxScrollX,offset:m,onScroll:this._onHorizontalScroll,position:t.scrollX,size:y})}var C=i.createElement(u,{height:t.height,initialWidth:t.columnResizingData.width||0,minWidth:t.columnResizingData.minWidth||0,maxWidth:t.columnResizingData.maxWidth||Number.MAX_VALUE,visible:!!t.isColumnResizing,leftOffset:t.columnResizingData.left||0,knobHeight:t.headerHeight,initialEvent:t.columnResizingData.initialEvent,onColumnResizeEnd:o.onColumnResizeEndCallback,columnKey:t.columnResizingData.key}),R=null;t.footerHeight&&(R=i.createElement(h,{key:"footer",isScrolling:this._isScrolling,className:w(p("fixedDataTableLayout/footer"),p("public/fixedDataTable/footer")),width:t.width,height:t.footerHeight,index:-1,zIndex:1,offsetTop:v,fixedColumns:t.footFixedColumns,scrollableColumns:t.footScrollableColumns,scrollLeft:t.scrollX}));var T,S,D=this._renderRows(d),E=i.createElement(h,{key:"header",isScrolling:this._isScrolling,className:w(p("fixedDataTableLayout/header"),p("public/fixedDataTable/header")),width:t.width,height:t.headerHeight,index:-1,zIndex:1,offsetTop:f,scrollLeft:t.scrollX,fixedColumns:t.headFixedColumns,scrollableColumns:t.headScrollableColumns,onColumnResize:this._onColumnResize});return t.scrollY&&(T=i.createElement("div",{className:w(p("fixedDataTableLayout/topShadow"),p("public/fixedDataTable/topShadow")),style:{top:d}})),(null!=t.ownerHeight&&t.ownerHeight<t.height&&t.scrollContentHeight+t.reservedHeight>t.ownerHeight||t.scrollY<n)&&(S=i.createElement("div",{className:w(p("fixedDataTableLayout/bottomShadow"),p("public/fixedDataTable/bottomShadow")),style:{top:v}})),i.createElement("div",{className:w(p("fixedDataTableLayout/main"),p("public/fixedDataTable/main")),onWheel:this._wheelHandler.onWheel,style:{height:t.height,width:t.width}},i.createElement("div",{className:p("fixedDataTableLayout/rowsContainer"),style:{height:g,width:t.width}},C,e,E,D,R,T,S),_,b)},_renderRows:function(e){var t=this.state,o=this.props;return i.createElement(l,{isScrolling:this._isScrolling,defaultRowHeight:t.rowHeight,firstRowIndex:t.firstRowIndex,firstRowOffset:t.firstRowOffset,fixedColumns:t.bodyFixedColumns,height:t.bodyHeight,offsetTop:e,onRowClick:t.onRowClick,onRowDoubleClick:t.onRowDoubleClick,onRowMouseDown:t.onRowMouseDown,onRowMouseEnter:t.onRowMouseEnter,onRowMouseLeave:t.onRowMouseLeave,rowClassNameGetter:t.rowClassNameGetter,rowsCount:t.rowsCount,rowGetter:t.rowGetter,rowHeightGetter:t.rowHeightGetter,scrollLeft:t.scrollX,scrollableColumns:t.bodyScrollableColumns,showLastRowBorder:!0,width:t.width,rowPositionGetter:this._scrollHelper.getRowPosition,getRowWrapper:o.getRowWrapper})},_onColumnResize:function(e,t,o,n,i,r,s){this.setState({isColumnResizing:!0,columnResizingData:{left:t+e-o,width:o,minWidth:n,maxWidth:i,initialEvent:{clientX:s.clientX,clientY:s.clientY,preventDefault:m},key:r}})},_areColumnSettingsIdentical:function(e,t){if(e.length!==t.length)return!1;for(var o=0;o<e.length;++o)if(!g(e[o].props,t[o].props))return!1;return!0},_populateColumnsAndColumnData:function(e,t,o){var n=!1,i=!1;o&&o.columns&&(n=this._areColumnSettingsIdentical(e,o.columns)),o&&o.columnGroups&&t&&(i=this._areColumnSettingsIdentical(t,o.columnGroups));var r={};if(n)r.bodyFixedColumns=o.bodyFixedColumns,r.bodyScrollableColumns=o.bodyScrollableColumns,r.headFixedColumns=o.headFixedColumns,r.headScrollableColumns=o.headScrollableColumns,r.footFixedColumns=o.footFixedColumns,r.footScrollableColumns=o.footScrollableColumns;else{var s=this._splitColumnTypes(e);r.bodyFixedColumns=s.fixed,r.bodyScrollableColumns=s.scrollable;var a=this._splitColumnTypes(this._selectColumnElement(R,e));r.headFixedColumns=a.fixed,r.headScrollableColumns=a.scrollable;var l=this._splitColumnTypes(this._selectColumnElement(T,e));r.footFixedColumns=l.fixed,r.footScrollableColumns=l.scrollable}if(i)r.groupHeaderFixedColumns=o.groupHeaderFixedColumns,r.groupHeaderScrollableColumns=o.groupHeaderScrollableColumns;else if(t){var u=this._splitColumnTypes(this._selectColumnElement(R,t));r.groupHeaderFixedColumns=u.fixed,r.groupHeaderScrollableColumns=u.scrollable}return r},_calculateState:function(e,t){v(void 0!==e.height||void 0!==e.maxHeight,"You must set either a height or a maxHeight");var o=[];y.forEach(e.children,function(e,t){null!=e&&(v(e.type.__TableColumnGroup__||e.type.__TableColumn__,"child type should be <FixedDataTableColumn /> or <FixedDataTableColumnGroup />"),o.push(e))});var i=!1;o.length&&o[0].type.__TableColumnGroup__&&(i=!0);var r,s,l=t&&t.firstRowIndex||0,u=t&&t.firstRowOffset||0;r=t&&"hidden"!==e.overflowX?t.scrollX:e.scrollLeft,t&&"hidden"!==e.overflowY?s=t.scrollY:(d=this._scrollHelper.scrollTo(e.scrollTop),l=d.index,u=d.offset,s=d.position),void 0!==this._rowToScrollTo&&(d=this._scrollHelper.scrollRowIntoView(this._rowToScrollTo),l=d.index,u=d.offset,s=d.position,delete this._rowToScrollTo);var h=i?e.groupHeaderHeight:0;if(t&&e.rowsCount!==t.rowsCount){var p=(void 0===e.height?e.maxHeight:e.height)-(e.headerHeight||0)-(e.footerHeight||0)-(e.groupHeaderHeight||0);this._scrollHelper=new c(e.rowsCount,e.rowHeight,p,e.rowHeightGetter);var d=this._scrollHelper.scrollToRow(l,u);l=d.index,u=d.offset,s=d.position}else t&&e.rowHeightGetter!==t.rowHeightGetter&&this._scrollHelper.setRowHeightGetter(e.rowHeightGetter);var m;m=e.isColumnResizing?t&&t.columnResizingData:C;var w,g;if(i){var _=f.adjustColumnGroupWidths(o,e.width);w=_.columns,g=_.columnGroups}else w=f.adjustColumnWidths(o,e.width);var b=this._populateColumnsAndColumnData(w,g,t);if(void 0!==this._columnToScrollTo){var R=b.bodyFixedColumns.length;if(this._columnToScrollTo>=R){var T,S,D=0;for(T=0;T<b.bodyFixedColumns.length;++T)S=b.bodyFixedColumns[T],D+=S.props.width;var H=Math.min(this._columnToScrollTo-R,b.bodyScrollableColumns.length-1),E=0;for(T=0;T<H;++T)S=b.bodyScrollableColumns[T],E+=S.props.width;var M=e.width-D,k=b.bodyScrollableColumns[H].props.width,O=E+k-M;r<O&&(r=O),r>E&&(r=E)}delete this._columnToScrollTo}var z=void 0===e.height,N=Math.round(z?e.maxHeight:e.height),I=e.footerHeight+e.headerHeight+h+2*x,P=N-I,L=this._scrollHelper.getContentHeight(),G=L+I,W=f.getTotalWidth(w),F=W>e.width&&"hidden"!==e.overflowX;F&&(P-=a.SIZE,G+=a.SIZE,I+=a.SIZE);var A=Math.max(0,W-e.width),j=Math.max(0,L-P);r=Math.min(r,A),s=Math.min(s,j),j||(z&&(N=G),P=G-I),this._scrollHelper.setViewportHeight(P);var V=n({isColumnResizing:t&&t.isColumnResizing},b,e,{columns:w,columnGroups:g,columnResizingData:m,firstRowIndex:l,firstRowOffset:u,horizontalScrollbarVisible:F,maxScrollX:A,maxScrollY:j,reservedHeight:I,scrollContentHeight:L,scrollX:r,scrollY:s,bodyHeight:P,height:N,groupHeaderHeight:h,useGroupHeader:i});return V},_selectColumnElement:function(e,t){for(var o=[],n=0;n<t.length;++n){var r=t[n];o.push(i.cloneElement(r,{cell:e?r.props[e]:r.props[S]}))}return o},_splitColumnTypes:function(e){for(var t=[],o=[],n=0;n<e.length;++n)e[n].props.fixed?t.push(e[n]):o.push(e[n]);return{fixed:t,scrollable:o}},_onWheel:function(e,t){if(this.isMounted()){this._isScrolling||this._didScrollStart();var o=this.state.scrollX;if(Math.abs(t)>Math.abs(e)&&"hidden"!==this.props.overflowY){var n=this._scrollHelper.scrollBy(Math.round(t)),i=Math.max(0,n.contentHeight-this.state.bodyHeight);this.setState({firstRowIndex:n.index,firstRowOffset:n.offset,scrollY:n.position,scrollContentHeight:n.contentHeight,maxScrollY:i})}else e&&"hidden"!==this.props.overflowX&&(o+=e,o=o<0?0:o,o=o>this.state.maxScrollX?this.state.maxScrollX:o,this.setState({scrollX:o}));this._didScrollStop()}},_onHorizontalScroll:function(e){this.isMounted()&&e!==this.state.scrollX&&(this._isScrolling||this._didScrollStart(),this.setState({scrollX:e}),this._didScrollStop())},_onVerticalScroll:function(e){if(this.isMounted()&&e!==this.state.scrollY){this._isScrolling||this._didScrollStart();var t=this._scrollHelper.scrollTo(Math.round(e));this.setState({firstRowIndex:t.index,firstRowOffset:t.offset,scrollY:t.position,scrollContentHeight:t.contentHeight}),this._didScrollStop()}},_didScrollStart:function(){this.isMounted()&&!this._isScrolling&&(this._isScrolling=!0,this.props.onScrollStart&&this.props.onScrollStart(this.state.scrollX,this.state.scrollY))},_didScrollStop:function(){this.isMounted()&&this._isScrolling&&(this._isScrolling=!1,this.setState({redraw:!0}),this.props.onScrollEnd&&this.props.onScrollEnd(this.state.scrollX,this.state.scrollY))}}),H=i.createClass({displayName:"HorizontalScrollbar",mixins:[r],propTypes:{contentSize:b.number.isRequired,offset:b.number.isRequired,onScroll:b.func.isRequired,position:b.number.isRequired,size:b.number.isRequired},render:function(){var e={height:a.SIZE,width:this.props.size},t={height:a.SIZE,position:"absolute",overflow:"hidden",width:this.props.size};return _(t,0,this.props.offset),i.createElement("div",{className:w(p("fixedDataTableLayout/horizontalScrollbar"),p("public/fixedDataTable/horizontalScrollbar")),style:e},i.createElement("div",{style:t},i.createElement(a,n({},this.props,{isOpaque:!0,orientation:"horizontal",offset:void 0}))))}});e.exports=D},function(e,t){"use strict";function o(e,t){if(e===t)return!0;var o;for(o in e)if(e.hasOwnProperty(o)&&(!t.hasOwnProperty(o)||e[o]!==t[o]))return!1;for(o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return!1;return!0}var n={shouldComponentUpdate:function(e,t){return!o(this.props,e)||!o(this.state,t)}};e.exports=n},function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),r=o(39),s=o(40),a=o(44),l=function(){function e(t,o,i,s){n(this,e),this._animationFrameID=null,this._deltaX=0,this._deltaY=0,this._didWheel=this._didWheel.bind(this),"function"!=typeof o&&(o=o?r.thatReturnsTrue:r.thatReturnsFalse),"function"!=typeof i&&(i=i?r.thatReturnsTrue:r.thatReturnsFalse),"function"!=typeof s&&(s=s?r.thatReturnsTrue:r.thatReturnsFalse),this._handleScrollX=o,this._handleScrollY=i,this._stopPropagation=s,this._onWheelCallback=t,this.onWheel=this.onWheel.bind(this)}return i(e,[{key:"onWheel",value:function(e){var t=s(e),o=this._deltaX+t.pixelX,n=this._deltaY+t.pixelY,i=this._handleScrollX(o,n),r=this._handleScrollY(n,o);if(i||r){this._deltaX+=i?t.pixelX:0,this._deltaY+=r?t.pixelY:0,e.preventDefault();var l;0===this._deltaX&&0===this._deltaY||(this._stopPropagation()&&e.stopPropagation(),l=!0),l===!0&&null===this._animationFrameID&&(this._animationFrameID=a(this._didWheel))}}},{key:"_didWheel",value:function(){this._animationFrameID=null,this._onWheelCallback(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0}}]),e}();e.exports=l},function(e,t){"use strict";function o(e){return function(){return e}}function n(){}n.thatReturns=o,n.thatReturnsFalse=o(!1),n.thatReturnsTrue=o(!0),n.thatReturnsNull=o(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},function(e,t,o){"use strict";function n(e){var t=0,o=0,n=0,i=0;return"detail"in e&&(o=e.detail), "wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),n=t*s,i=o*s,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||i)&&e.deltaMode&&(1==e.deltaMode?(n*=a,i*=a):(n*=l,i*=l)),n&&!t&&(t=n<1?-1:1),i&&!o&&(o=i<1?-1:1),{spinX:t,spinY:o,pixelX:n,pixelY:i}}var i=o(41),r=o(42),s=10,a=40,l=800;n.getEventType=function(){return i.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=n},function(e,t){"use strict";function o(){if(!g){g=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),o=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(d=/\b(iPhone|iP[ao]d)/.exec(e),m=/\b(iP[ao]d)/.exec(e),f=/Android/i.exec(e),v=/FBAN\/\w+;/i.exec(e),w=/Mobile/i.exec(e),p=!!/Win64/.exec(e),t){n=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,n&&document&&document.documentMode&&(n=document.documentMode);var _=/(?:Trident\/(\d+.\d+))/.exec(e);l=_?parseFloat(_[1])+4:n,i=t[2]?parseFloat(t[2]):NaN,r=t[3]?parseFloat(t[3]):NaN,s=t[4]?parseFloat(t[4]):NaN,s?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),a=t&&t[1]?parseFloat(t[1]):NaN):a=NaN}else n=i=r=a=s=NaN;if(o){if(o[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);u=!b||parseFloat(b[1].replace("_","."))}else u=!1;h=!!o[2],c=!!o[3]}else u=h=c=!1}}var n,i,r,s,a,l,u,h,c,f,p,d,m,v,w,g=!1,_={ie:function(){return o()||n},ieCompatibilityMode:function(){return o()||l>n},ie64:function(){return _.ie()&&p},firefox:function(){return o()||i},opera:function(){return o()||r},webkit:function(){return o()||s},safari:function(){return _.webkit()},chrome:function(){return o()||a},windows:function(){return o()||h},osx:function(){return o()||u},linux:function(){return o()||c},iphone:function(){return o()||d},mobile:function(){return o()||d||m||f||w},nativeApp:function(){return o()||v},android:function(){return o()||f},ipad:function(){return o()||m}};e.exports=_},function(e,t,o){"use strict";function n(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,n=o in document;if(!n){var s=document.createElement("div");s.setAttribute(o,"return;"),n="function"==typeof s[o]}return!n&&i&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}var i,r=o(43);r.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=n},function(e,t){"use strict";var o=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:o,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen,isInWorker:!o};e.exports=n},function(e,t,o){(function(t){"use strict";var n=o(39),i=o(45),r=0,s=i||function(e){var o=Date.now(),n=Math.max(0,16-(o-r));return r=o+n,t.setTimeout(function(){e(Date.now())},n)};s(n),e.exports=s}).call(t,function(){return this}())},function(e,t){(function(t){"use strict";var o=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame;e.exports=o}).call(t,function(){return this}())},function(e,t,o){"use strict";var n=o(47),i=o(50),r=o(27),s=o(51),a=o(37),l=o(38),u=o(53),h=o(54),c=o(39),f=o(55),p=o(29),d={position:0,scrollable:!1},m=parseInt(u("scrollbar-face-margin"),10),v=2*m,w=30,g=40,_=null,b=r.createClass({displayName:"Scrollbar",mixins:[a],propTypes:{contentSize:p.number.isRequired,defaultPosition:p.number,isOpaque:p.bool,orientation:p.oneOf(["vertical","horizontal"]),onScroll:p.func,position:p.number,size:p.number.isRequired,trackColor:p.oneOf(["gray"]),zIndex:p.number,verticalTop:p.number},getInitialState:function(){var e=this.props;return this._calculateState(e.position||e.defaultPosition||0,e.size,e.contentSize,e.orientation)},componentWillReceiveProps:function(e){var t=e.position;void 0===t?this._setNextState(this._calculateState(this.state.position,e.size,e.contentSize,e.orientation)):this._setNextState(this._calculateState(t,e.size,e.contentSize,e.orientation),e)},getDefaultProps:function(){return{defaultPosition:0,isOpaque:!1,onScroll:c,orientation:"vertical",zIndex:99}},render:function(){if(!this.state.scrollable)return null;var e,t,o=this.props.size,n=this.state.isHorizontal,i=!n,s=this.state.focused||this.state.isDragging,a=this.state.faceSize,l=this.props.isOpaque,c=this.props.verticalTop||0,p=h({"ScrollbarLayout/main":!0,"ScrollbarLayout/mainVertical":i,"ScrollbarLayout/mainHorizontal":n,"public/Scrollbar/main":!0,"public/Scrollbar/mainOpaque":l,"public/Scrollbar/mainActive":s}),d=h({"ScrollbarLayout/face":!0,"ScrollbarLayout/faceHorizontal":n,"ScrollbarLayout/faceVertical":i,"public/Scrollbar/faceActive":s,"public/Scrollbar/face":!0}),w=this.state.position*this.state.scale+m;return n?(e={width:o},t={width:a-v},f(t,w,0)):(e={top:c,height:o},t={height:a-v},f(t,0,w)),e.zIndex=this.props.zIndex,"gray"===this.props.trackColor&&(e.backgroundColor=u("fbui-desktop-background-light")),r.createElement("div",{onFocus:this._onFocus,onBlur:this._onBlur,onKeyDown:this._onKeyDown,onMouseDown:this._onMouseDown,onWheel:this._wheelHandler.onWheel,className:p,style:e,tabIndex:0},r.createElement("div",{ref:"face",className:d,style:t}))},componentWillMount:function(){var e="horizontal"===this.props.orientation,t=e?this._onWheelX:this._onWheelY;this._wheelHandler=new l(t,this._shouldHandleX,this._shouldHandleY)},componentDidMount:function(){this._mouseMoveTracker=new n(this._onMouseMove,this._onMouseMoveEnd,document.documentElement),void 0!==this.props.position&&this.state.position!==this.props.position&&this._didScroll()},componentWillUnmount:function(){this._nextState=null,this._mouseMoveTracker.releaseMouseMoves(),_===this&&(_=null),delete this._mouseMoveTracker},scrollBy:function(e){this._onWheel(e)},_shouldHandleX:function(e){return"horizontal"===this.props.orientation&&this._shouldHandleChange(e)},_shouldHandleY:function(e){return"horizontal"!==this.props.orientation&&this._shouldHandleChange(e)},_shouldHandleChange:function(e){var t=this._calculateState(this.state.position+e,this.props.size,this.props.contentSize,this.props.orientation);return t.position!==this.state.position},_calculateState:function(e,t,o,n){if(t<1||o<=t)return d;var i=e+"_"+t+"_"+o+"_"+n;if(this._stateKey===i)return this._stateForKey;var r="horizontal"===n,s=t/o,a=t*s;a<w&&(s=(t-w)/(o-t),a=w);var l=!0,u=o-t;e<0?e=0:e>u&&(e=u);var h=!!this._mouseMoveTracker&&this._mouseMoveTracker.isDragging(),c={faceSize:a,isDragging:h,isHorizontal:r,position:e,scale:s,scrollable:l};return this._stateKey=i,this._stateForKey=c,c},_onWheelY:function(e,t){this._onWheel(t)},_onWheelX:function(e,t){this._onWheel(e)},_onWheel:function(e){var t=this.props;this._setNextState(this._calculateState(this.state.position+e,t.size,t.contentSize,t.orientation))},_onMouseDown:function(e){var t;if(e.target!==s.findDOMNode(this.refs.face)){var o=e.nativeEvent,n=this.state.isHorizontal?o.offsetX||o.layerX:o.offsetY||o.layerY,i=this.props;n/=this.state.scale,t=this._calculateState(n-.5*this.state.faceSize/this.state.scale,i.size,i.contentSize,i.orientation)}else t={};t.focused=!0,this._setNextState(t),this._mouseMoveTracker.captureMouseMoves(e),s.findDOMNode(this).focus()},_onMouseMove:function(e,t){var o=this.props,n=this.state.isHorizontal?e:t;n/=this.state.scale,this._setNextState(this._calculateState(this.state.position+n,o.size,o.contentSize,o.orientation))},_onMouseMoveEnd:function(){this._nextState=null,this._mouseMoveTracker.releaseMouseMoves(),this.setState({isDragging:!1})},_onKeyDown:function(e){var t=e.keyCode;if(t!==i.TAB){var o=g,n=0;if(this.state.isHorizontal)switch(t){case i.HOME:n=-1,o=this.props.contentSize;break;case i.LEFT:n=-1;break;case i.RIGHT:n=1;break;default:return}if(!this.state.isHorizontal)switch(t){case i.SPACE:n=e.shiftKey?-1:1;break;case i.HOME:n=-1,o=this.props.contentSize;break;case i.UP:n=-1;break;case i.DOWN:n=1;break;case i.PAGE_UP:n=-1,o=this.props.size;break;case i.PAGE_DOWN:n=1,o=this.props.size;break;default:return}e.preventDefault();var r=this.props;this._setNextState(this._calculateState(this.state.position+o*n,r.size,r.contentSize,r.orientation))}},_onFocus:function(){this.setState({focused:!0})},_onBlur:function(){this.setState({focused:!1})},_blur:function(){if(this.isMounted())try{this._onBlur(),s.findDOMNode(this).blur()}catch(e){}},_setNextState:function(e,t){t=t||this.props;var o=t.position,n=this.state.position!==e.position;if(void 0===o){var i=n?this._didScroll:void 0;this.setState(e,i)}else{if(o!==e.position)return void(void 0!==e.position&&e.position!==this.state.position&&this.props.onScroll(e.position));this.setState(e)}n&&_!==this&&(_&&_._blur(),_=this)},_didScroll:function(){this.props.onScroll(this.state.position)}});b.KEYBOARD_SCROLL_AMOUNT=g,b.SIZE=parseInt(u("scrollbar-size"),10),e.exports=b},function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),r=o(48),s=o(49),a=o(44),l=function(){function e(t,o,i){n(this,e),this._isDragging=!1,this._animationFrameID=null,this._domNode=i,this._onMove=t,this._onMoveEnd=o,this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._didMouseMove=this._didMouseMove.bind(this)}return i(e,[{key:"captureMouseMoves",value:function(e){this._eventMoveToken||this._eventUpToken||(this._eventMoveToken=r.listen(this._domNode,"mousemove",this._onMouseMove),this._eventUpToken=r.listen(this._domNode,"mouseup",this._onMouseUp)),this._isDragging||(this._deltaX=0,this._deltaY=0,this._isDragging=!0,this._x=e.clientX,this._y=e.clientY),e.preventDefault()}},{key:"releaseMouseMoves",value:function(){this._eventMoveToken&&this._eventUpToken&&(this._eventMoveToken.remove(),this._eventMoveToken=null,this._eventUpToken.remove(),this._eventUpToken=null),null!==this._animationFrameID&&(s(this._animationFrameID),this._animationFrameID=null),this._isDragging&&(this._isDragging=!1,this._x=null,this._y=null)}},{key:"isDragging",value:function(){return this._isDragging}},{key:"_onMouseMove",value:function(e){var t=e.clientX,o=e.clientY;this._deltaX+=t-this._x,this._deltaY+=o-this._y,null===this._animationFrameID&&(this._animationFrameID=a(this._didMouseMove)),this._x=t,this._y=o,e.preventDefault()}},{key:"_didMouseMove",value:function(){this._animationFrameID=null,this._onMove(this._deltaX,this._deltaY),this._deltaX=0,this._deltaY=0}},{key:"_onMouseUp",value:function(){this._animationFrameID&&this._didMouseMove(),this._onMoveEnd()}}]),e}();e.exports=l},function(e,t,o){"use strict";var n=o(39),i={listen:function(e,t,o){return e.addEventListener?(e.addEventListener(t,o,!1),{remove:function(){e.removeEventListener(t,o,!1)}}):e.attachEvent?(e.attachEvent("on"+t,o),{remove:function(){e.detachEvent("on"+t,o)}}):void 0},capture:function(e,t,o){return e.addEventListener?(e.addEventListener(t,o,!0),{remove:function(){e.removeEventListener(t,o,!0)}}):(console.error("Attempted to listen to events during the capture phase on a browser that does not support the capture phase. Your application will not receive some events."),{remove:n})},registerDefault:function(){}};e.exports=i},function(e,t){(function(t){"use strict";var o=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||t.msCancelAnimationFrame||t.clearTimeout;e.exports=o}).call(t,function(){return this}())},function(e,t){"use strict";e.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},function(e,t,o){"use strict";e.exports=o(52)},function(e,o){e.exports=t},function(e,t){"use strict";function o(e){if(n.hasOwnProperty(e))return n[e];throw new Error('cssVar("'+e+'"): Unexpected class transformation.')}var n={"scrollbar-face-active-color":"#7d7d7d","scrollbar-face-color":"#c2c2c2","scrollbar-face-margin":"4px","scrollbar-face-radius":"6px","scrollbar-size":"15px","scrollbar-size-large":"17px","scrollbar-track-color":"rgba(255, 255, 255, 0.8)","fbui-white":"#fff","fbui-desktop-background-light":"#f6f7f8"};o.CSS_VARS=n,e.exports=o},function(e,t){"use strict";function o(e){return r[e]?r[e]:(r[e]=e.replace(i,"_"),r[e])}function n(e){var t;return t="object"==typeof e?Object.keys(e).filter(function(t){return e[t]}):Array.prototype.slice.call(arguments),t.map(o).join(" ")}var i=/\//g,r={};e.exports=n},function(e,t,o){(function(t){"use strict";var n=o(56),i=o(57),r=i("transform"),s=i("backfaceVisibility"),a=function(){if(n.hasCSSTransforms()){var e=t.window?t.window.navigator.userAgent:"UNKNOWN",o=/Safari\//.test(e)&&!/Chrome\//.test(e);return!o&&n.hasCSS3DTransforms()?function(e,t,o){e[r]="translate3d("+t+"px,"+o+"px,0)",e[s]="hidden"}:function(e,t,o){e[r]="translate("+t+"px,"+o+"px)"}}return function(e,t,o){e.left=t+"px",e.top=o+"px"}}();e.exports=a}).call(t,function(){return this}())},function(e,t,o){"use strict";var n=o(57),i={hasCSSAnimations:function(){return!!n("animationName")},hasCSSTransforms:function(){return!!n("transform")},hasCSS3DTransforms:function(){return!!n("perspective")},hasCSSTransitions:function(){return!!n("transition")}};e.exports=i},function(e,t,o){"use strict";function n(e){for(var t=0;t<u.length;t++){var o=u[t]+e;if(o in c)return o}return null}function i(e){var t=s(e);if(void 0===l[t]){var o=t.charAt(0).toUpperCase()+t.slice(1);h.test(o)&&a(!1,"getVendorPrefixedName must only be called with unprefixedCSS property names. It was called with %s",e),l[t]=t in c?t:n(o)}return l[t]}var r=o(43),s=o(58),a=o(59),l={},u=["Webkit","ms","Moz","O"],h=new RegExp("^("+u.join("|")+")"),c=r.canUseDOM?document.createElement("div").style:{};e.exports=i},function(e,t){"use strict";function o(e){return e.replace(n,function(e,t){return t.toUpperCase()})}var n=/-(.)/g;e.exports=o},function(e,t,o){"use strict";var n=function(e,t,o,n,i,r,s,a){if(void 0===t)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[o,n,i,r,s,a],h=0;l=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[h++]}))}throw l.framesToPop=1,l}};e.exports=n},function(e,t,o){"use strict";var n=o(27),i=o(61),r=o(65),s=o(54),a=o(39),l=o(76),u=o(55),h=o(29),c=n.createClass({displayName:"FixedDataTableBufferedRows",propTypes:{isScrolling:h.bool,defaultRowHeight:h.number.isRequired,firstRowIndex:h.number.isRequired,firstRowOffset:h.number.isRequired,fixedColumns:h.array.isRequired,height:h.number.isRequired,offsetTop:h.number.isRequired,onRowClick:h.func,onRowDoubleClick:h.func,onRowMouseDown:h.func,onRowMouseEnter:h.func,onRowMouseLeave:h.func,rowClassNameGetter:h.func,rowsCount:h.number.isRequired,rowHeightGetter:h.func,rowPositionGetter:h.func.isRequired,scrollLeft:h.number.isRequired,scrollableColumns:h.array.isRequired,showLastRowBorder:h.bool,width:h.number.isRequired,getRowWrapper:h.func},getInitialState:function(){return this._rowBuffer=new i(this.props.rowsCount,this.props.defaultRowHeight,this.props.height,this._getRowHeight),{rowsToRender:this._rowBuffer.getRows(this.props.firstRowIndex,this.props.firstRowOffset)}},componentWillMount:function(){this._staticRowArray=[]},componentDidMount:function(){setTimeout(this._updateBuffer,1e3)},componentWillReceiveProps:function(e){e.rowsCount===this.props.rowsCount&&e.defaultRowHeight===this.props.defaultRowHeight&&e.height===this.props.height||(this._rowBuffer=new i(e.rowsCount,e.defaultRowHeight,e.height,this._getRowHeight)),this.props.isScrolling&&!e.isScrolling?this._updateBuffer():this.setState({rowsToRender:this._rowBuffer.getRows(e.firstRowIndex,e.firstRowOffset)})},_updateBuffer:function(){this.isMounted()&&this.setState({rowsToRender:this._rowBuffer.getRowsWithUpdatedBuffer()})},shouldComponentUpdate:function(){return!0},componentWillUnmount:function(){this._staticRowArray.length=0},render:function(){var e=this.props,t=e.rowClassNameGetter||a,o=e.rowPositionGetter,i=this.state.rowsToRender;this._staticRowArray.length=i.length;for(var h=0;h<i.length;++h){var c=i[h],f=this._getRowHeight(c),p=o(c),d=c===e.rowsCount-1&&e.showLastRowBorder;this._staticRowArray[h]=n.createElement(r,{key:h,isScrolling:e.isScrolling,index:c,width:e.width,height:f,scrollLeft:Math.round(e.scrollLeft),offsetTop:Math.round(p),fixedColumns:e.fixedColumns,scrollableColumns:e.scrollableColumns,onClick:e.onRowClick,onDoubleClick:e.onRowDoubleClick,onMouseDown:e.onRowMouseDown,onMouseEnter:e.onRowMouseEnter,onMouseLeave:e.onRowMouseLeave,className:l(t(c),s("public/fixedDataTable/bodyRow"),s({"fixedDataTableLayout/hasBottomBorder":d,"public/fixedDataTable/hasBottomBorder":d})),getRowWrapper:e.getRowWrapper})}var m=e.rowPositionGetter(e.firstRowIndex),v={position:"absolute",pointerEvents:e.isScrolling?"none":"auto"};return u(v,0,e.firstRowOffset-m+e.offsetTop),n.createElement("div",{style:v},this._staticRowArray)},_getRowHeight:function(e){return this.props.rowHeightGetter?this.props.rowHeightGetter(e):this.props.defaultRowHeight}});e.exports=