From d6bac3ccc59612d521b29d12d84f5142e5f252cb Mon Sep 17 00:00:00 2001 From: Pieter Vanderwerff Date: Wed, 28 Oct 2015 12:30:41 -0700 Subject: [PATCH] Version 0.5.0 --- dist/fixed-data-table-base.css | 2 +- dist/fixed-data-table-base.min.css | 2 +- dist/fixed-data-table-style.css | 2 +- dist/fixed-data-table-style.min.css | 2 +- dist/fixed-data-table.css | 2 +- dist/fixed-data-table.js | 4 ++-- dist/fixed-data-table.min.css | 2 +- dist/fixed-data-table.min.js | 4 ++-- package.json | 2 +- src/FixedDataTableRoot.js | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dist/fixed-data-table-base.css b/dist/fixed-data-table-base.css index dd73854a..bd0ccf55 100644 --- a/dist/fixed-data-table-base.css +++ b/dist/fixed-data-table-base.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.5.0-rc1 + * FixedDataTable v0.5.0 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. diff --git a/dist/fixed-data-table-base.min.css b/dist/fixed-data-table-base.min.css index fba2fa09..b21a84e6 100644 --- a/dist/fixed-data-table-base.min.css +++ b/dist/fixed-data-table-base.min.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.5.0-rc1 + * FixedDataTable v0.5.0 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. diff --git a/dist/fixed-data-table-style.css b/dist/fixed-data-table-style.css index 8727ccfd..46672012 100644 --- a/dist/fixed-data-table-style.css +++ b/dist/fixed-data-table-style.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.5.0-rc1 + * FixedDataTable v0.5.0 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. diff --git a/dist/fixed-data-table-style.min.css b/dist/fixed-data-table-style.min.css index 5c04a646..f85b159a 100644 --- a/dist/fixed-data-table-style.min.css +++ b/dist/fixed-data-table-style.min.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.5.0-rc1 + * FixedDataTable v0.5.0 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. diff --git a/dist/fixed-data-table.css b/dist/fixed-data-table.css index 2f34d284..b6947f3d 100644 --- a/dist/fixed-data-table.css +++ b/dist/fixed-data-table.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.5.0-rc1 + * FixedDataTable v0.5.0 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. diff --git a/dist/fixed-data-table.js b/dist/fixed-data-table.js index 3becbd73..ab0eb40b 100644 --- a/dist/fixed-data-table.js +++ b/dist/fixed-data-table.js @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.5.0-rc1 + * FixedDataTable v0.5.0 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -185,7 +185,7 @@ return /******/ (function(modules) { // webpackBootstrap Table: FixedDataTable }; - FixedDataTableRoot.version = '0.5.0-rc1'; + FixedDataTableRoot.version = '0.5.0'; module.exports = FixedDataTableRoot; diff --git a/dist/fixed-data-table.min.css b/dist/fixed-data-table.min.css index 05aea00a..343d2d15 100644 --- a/dist/fixed-data-table.min.css +++ b/dist/fixed-data-table.min.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.5.0-rc1 + * FixedDataTable v0.5.0 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. diff --git a/dist/fixed-data-table.min.js b/dist/fixed-data-table.min.js index fae24f8b..08c282fb 100644 --- a/dist/fixed-data-table.min.js +++ b/dist/fixed-data-table.min.js @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.5.0-rc1 + * FixedDataTable v0.5.0 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -9,6 +9,6 @@ * 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(i){if(o[i])return o[i].exports;var r=o[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.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 i=o(26),r=o(32),n=o(31),s={Column:r,ColumnGroup:n,Table:i};s.version="0.5.0-rc1",e.exports=s},function(e,t,o){"use strict";var i=Object.assign||function(e){for(var t=1;te&&this.state.scrollX>0||e>=0&&this.state.scrollXe&&this.state.scrollY>0||e>=0&&this.state.scrollYi?i:this.state.height>i&&this.props.ownerHeight?Math.max(i,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 i=e.overflowX,r=e.overflowY;(i!==this.props.overflowX||r!==this.props.overflowY)&&(this._wheelHandler=new a(this._onWheel,"hidden"!==i,"hidden"!==r)),this.setState(this._calculateState(e,this.state))},componentDidUpdate:function(){this._reportContentHeight()},render:function(){var e,t=this.state,o=this.props;t.useGroupHeader&&(e=n.createElement(c,{key:"group_header",className:g(d("fixedDataTableLayout/header"),d("public/fixedDataTable/header")),data:t.groupHeaderData,width:t.width,height:t.groupHeaderHeight,index:0,zIndex:1,offsetTop:0,scrollLeft:t.scrollX,fixedColumns:t.groupHeaderFixedColumns,scrollableColumns:t.groupHeaderScrollableColumns}));var i=this.state.maxScrollY,r=t.maxScrollX>0&&"hidden"!==t.overflowX,s=i>0&&"hidden"!==t.overflowY,a=r?l.SIZE:0,u=t.height-a-2*T-t.footerHeight,f=t.useGroupHeader?t.groupHeaderHeight:0,p=f+t.headerHeight;u-=p;var m=0,v=null!=o.maxHeight?p+t.bodyHeight:p+u,_=v+t.footerHeight;void 0!==o.ownerHeight&&o.ownerHeightt.ownerHeight||t.scrollY or "),o.push(e))});var r=!1;o.length&&o[0].type.__TableColumnGroup__&&(r=!0);var n,s,a=t&&t.firstRowIndex||0,u=t&&t.firstRowOffset||0;n=t&&"hidden"!==e.overflowX?t.scrollX:e.scrollLeft,t&&"hidden"!==e.overflowY?s=t.scrollY:(d=this._scrollHelper.scrollTo(e.scrollTop),a=d.index,u=d.offset,s=d.position),void 0!==this._rowToScrollTo&&(d=this._scrollHelper.scrollRowIntoView(this._rowToScrollTo),a=d.index,u=d.offset,s=d.position,delete this._rowToScrollTo);var h=r?e.groupHeaderHeight:0;if(t&&e.rowsCount!==t.rowsCount){var c=(void 0===e.height?e.maxHeight:e.height)-(e.headerHeight||0)-(e.footerHeight||0)-(e.groupHeaderHeight||0);this._scrollHelper=new f(e.rowsCount,e.rowHeight,c,e.rowHeightGetter);var d=this._scrollHelper.scrollToRow(a,u);a=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:R;var v,g;if(r){var b=p.adjustColumnGroupWidths(o,e.width);v=b.columns,g=b.columnGroups}else v=p.adjustColumnWidths(o,e.width);var y=this._populateColumnsAndColumnData(v,g,t);if(void 0!==this._columnToScrollTo){var C=y.bodyFixedColumns.length;if(this._columnToScrollTo>=C){var H,D,S=0;for(H=0;HH;++H)D=y.bodyScrollableColumns[H],k+=D.props.width;var E=e.width-S,z=y.bodyScrollableColumns[M].props.width,O=k+z-E;O>n&&(n=O),n>k&&(n=k)}delete this._columnToScrollTo}var P=void 0===e.height,N=Math.round(P?e.maxHeight:e.height),I=e.footerHeight+e.headerHeight+h+2*T,F=N-I,L=this._scrollHelper.getContentHeight(),A=L+I,W=p.getTotalWidth(v),G=W>e.width&&"hidden"!==e.overflowX;G&&(F-=l.SIZE,A+=l.SIZE,I+=l.SIZE);var j=Math.max(0,W-e.width),V=Math.max(0,L-F);n=Math.min(n,j),s=Math.min(s,V),V||(P&&(N=A),F=A-I),this._scrollHelper.setViewportHeight(F);var q=i({isColumnResizing:t&&t.isColumnResizing},y,e,{columns:v,columnGroups:g,columnResizingData:m,firstRowIndex:a,firstRowOffset:u,horizontalScrollbarVisible:G,maxScrollX:j,maxScrollY:V,reservedHeight:I,scrollContentHeight:L,scrollX:n,scrollY:s,bodyHeight:F,height:N,groupHeaderHeight:h,useGroupHeader:r});return t&&(t.headData&&q.headData&&w(t.headData,q.headData)&&(q.headData=t.headData),t.groupHeaderData&&q.groupHeaderData&&w(t.groupHeaderData,q.groupHeaderData)&&(q.groupHeaderData=t.groupHeaderData)),q},_createGroupHeaderColumns:function(e){for(var t=[],o=0;oMath.abs(e)&&"hidden"!==this.props.overflowY){var i=this._scrollHelper.scrollBy(Math.round(t)),r=Math.max(0,i.contentHeight-this.state.bodyHeight);this.setState({firstRowIndex:i.index,firstRowOffset:i.offset,scrollY:i.position,scrollContentHeight:i.contentHeight,maxScrollY:r})}else e&&"hidden"!==this.props.overflowX&&(o+=e,o=0>o?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.props.onScrollEnd&&this.props.onScrollEnd(this.state.scrollX,this.state.scrollY))}}),D=n.createClass({displayName:"HorizontalScrollbar",mixins:[s],propTypes:{contentSize:y.number.isRequired,offset:y.number.isRequired,onScroll:y.func.isRequired,position:y.number.isRequired,size:y.number.isRequired},render:function(){var e={height:l.SIZE,width:this.props.size},t={height:l.SIZE,position:"absolute",overflow:"hidden",width:this.props.size};return b(t,0,this.props.offset),n.createElement("div",{className:g(d("fixedDataTableLayout/horizontalScrollbar"),d("public/fixedDataTable/horizontalScrollbar")),style:e},n.createElement("div",{style:t},n.createElement(l,i({},this.props,{isOpaque:!0,orientation:"horizontal",offset:void 0}))))}});e.exports=H},function(e,t,o){"use strict";function i(e){return null===e||void 0===e?"":String(e)}function r(e,t){a.Children.forEach(e,function(e){e.type===l?r(e.props.children,t):e.type===u&&t(e)})}function n(e,t){var o=[];return a.Children.forEach(e,function(e){var i=e;if(e.type===l){var n=!1,s=[];r(e.props.children,function(e){var o=t(e);o!==e&&(n=!0),s.push(o)}),n&&(i=a.cloneElement(e,{children:s}))}else e.type===u&&(i=t(e));o.push(i)}),o}var s=o(28),a=o(29),l=o(31),u=o(32),h=s.isRTL()?-1:1,c=5,f={DIR_SIGN:h,CELL_VISIBILITY_TOLERANCE:c,renderToString:i,forEachColumn:r,mapColumns:n};e.exports=f},function(e,t){"use strict";var o={isRTL:function(){return!1},getDirection:function(){return"LTR"}};e.exports=o},function(e,t,o){"use strict";e.exports=o(30)},function(t,o){t.exports=e},function(e,t,o){"use strict";var i=o(29),r=i.PropTypes,n=i.createClass({displayName:"FixedDataTableColumnGroup",statics:{__TableColumnGroup__:!0},propTypes:{align:r.oneOf(["left","center","right"]),fixed:r.bool,columnGroupData:r.object,label:r.string,groupHeaderRenderer:r.func},getDefaultProps:function(){return{fixed:!1}},render:function(){throw new Error("Component should never render")}});e.exports=n},function(e,t,o){"use strict";var i=o(29),r=i.PropTypes,n=i.createClass({displayName:"FixedDataTableColumn",statics:{__TableColumn__:!0},propTypes:{align:r.oneOf(["left","center","right"]),headerClassName:r.string,footerClassName:r.string,cellClassName:r.string,cellRenderer:r.func,cellDataGetter:r.func,dataKey:r.oneOfType([r.string,r.number]).isRequired,fixed:r.bool,headerRenderer:r.func,footerRenderer:r.func,columnData:r.object,label:r.string,width:r.number.isRequired,minWidth:r.number,maxWidth:r.number,flexGrow:r.number,isResizable:r.bool,allowCellsRecycling:r.bool},getDefaultProps:function(){return{allowCellsRecycling:!1,fixed:!1}},render:function(){throw new Error("Component should never render")}});e.exports=n},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 i={shouldComponentUpdate:function(e,t){return!o(this.props,e)||!o(this.state,t)}};e.exports=i},function(e,t,o){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var o=0;oi?-1:1),r&&!o&&(o=1>r?-1:1),{spinX:t,spinY:o,pixelX:i,pixelY:r}}var r=o(37),n=o(38),s=10,a=40,l=800;i.getEventType=function(){return r.firefox()?"DOMMouseScroll":n("wheel")?"wheel":"mousewheel"},e.exports=i},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),_=/Mobile/i.exec(e),p=!!/Win64/.exec(e),t){i=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,i&&document&&document.documentMode&&(i=document.documentMode);var w=/(?:Trident\/(\d+.\d+))/.exec(e);l=w?parseFloat(w[1])+4:i,r=t[2]?parseFloat(t[2]):NaN,n=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 i=r=n=a=s=NaN;if(o){if(o[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);u=b?parseFloat(b[1].replace("_",".")):!0}else u=!1;h=!!o[2],c=!!o[3]}else u=h=c=!1}}var i,r,n,s,a,l,u,h,c,f,p,d,m,v,_,g=!1,w={ie:function(){return o()||i},ieCompatibilityMode:function(){return o()||l>i},ie64:function(){return w.ie()&&p},firefox:function(){return o()||r},opera:function(){return o()||n},webkit:function(){return o()||s},safari:function(){return w.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||_},nativeApp:function(){return o()||v},android:function(){return o()||f},ipad:function(){return o()||m}};e.exports=w},function(e,t,o){"use strict";function i(e,t){if(!n.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,i=o in document;if(!i){var s=document.createElement("div");s.setAttribute(o,"return;"),i="function"==typeof s[o]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var r,n=o(39);n.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=i},function(e,t){"use strict";var o=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:o,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen,isInWorker:!o};e.exports=i},function(e,t,o){(function(t){"use strict";var i=o(35),r=o(41),n=0,s=r||function(e){var o=Date.now(),i=Math.max(0,16-(o-n));return n=o+i,t.setTimeout(function(){e(Date.now())},i)};s(i),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 i=o(43),r=o(46),n=o(29),s=o(47),a=o(33),l=o(34),u=o(49),h=o(50),c=o(35),f=o(51),p=n.PropTypes,d={position:0,scrollable:!1},m=parseInt(u("scrollbar-face-margin"),10),v=2*m,_=30,g=40,w=null,b=n.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,i=this.state.isHorizontal,r=!i,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":r,"ScrollbarLayout/mainHorizontal":i,"public/Scrollbar/main":!0,"public/Scrollbar/mainOpaque":l,"public/Scrollbar/mainActive":s}),d=h({"ScrollbarLayout/face":!0,"ScrollbarLayout/faceHorizontal":i,"ScrollbarLayout/faceVertical":r,"public/Scrollbar/faceActive":s,"public/Scrollbar/face":!0}),_=this.state.position*this.state.scale+m;return i?(e={width:o},t={width:a-v},f(t,_,0)):(e={top:c,height:o},t={height:a-v},f(t,0,_)),e.zIndex=this.props.zIndex,"gray"===this.props.trackColor&&(e.backgroundColor=u("fbui-desktop-background-light")),n.createElement("div",{onFocus:this._onFocus,onBlur:this._onBlur,onKeyDown:this._onKeyDown,onMouseDown:this._onMouseDown,onWheel:this._wheelHandler.onWheel,className:p,style:e,tabIndex:0},n.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 i(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(),w===this&&(w=null),delete this._mouseMoveTracker},scrollBy:function(e){this._onWheel(e)},_shouldHandleX:function(e){return"horizontal"===this.props.orientation?this._shouldHandleChange(e):!1},_shouldHandleY:function(e){return"horizontal"!==this.props.orientation?this._shouldHandleChange(e):!1},_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,i){if(1>t||t>=o)return d;var r=e+"_"+t+"_"+o+"_"+i;if(this._stateKey===r)return this._stateForKey;var n="horizontal"===i,s=t/o,a=t*s;_>a&&(s=(t-_)/(o-t),a=_);var l=!0,u=o-t;0>e?e=0:e>u&&(e=u);var h=this._mouseMoveTracker?this._mouseMoveTracker.isDragging():!1,c={faceSize:a,isDragging:h,isHorizontal:n,position:e,scale:s,scrollable:l};return this._stateKey=r,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,i=this.state.isHorizontal?o.offsetX||o.layerX:o.offsetY||o.layerY,r=this.props;i/=this.state.scale,t=this._calculateState(i-.5*this.state.faceSize/this.state.scale,r.size,r.contentSize,r.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,i=this.state.isHorizontal?e:t;i/=this.state.scale,this._setNextState(this._calculateState(this.state.position+i,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!==r.TAB){var o=g,i=0;if(this.state.isHorizontal)switch(t){case r.HOME:i=-1,o=this.props.contentSize;break;case r.LEFT:i=-1;break;case r.RIGHT:i=1;break;default:return}if(!this.state.isHorizontal)switch(t){case r.SPACE:i=e.shiftKey?-1:1;break;case r.HOME:i=-1,o=this.props.contentSize;break;case r.UP:i=-1;break;case r.DOWN:i=1;break;case r.PAGE_UP:i=-1,o=this.props.size;break;case r.PAGE_DOWN:i=1,o=this.props.size;break;default:return}e.preventDefault();var n=this.props;this._setNextState(this._calculateState(this.state.position+o*i,n.size,n.contentSize,n.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,i=this.state.position!==e.position;if(void 0===o){var r=i?this._didScroll:void 0;this.setState(e,r)}else{if(o!==e.position)return void(void 0!==e.position&&e.position!==this.state.position&&this.props.onScroll(e.position));this.setState(e)}i&&w!==this&&(w&&w._blur(),w=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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var o=0;oe&&this.state.scrollX>0||e>=0&&this.state.scrollXe&&this.state.scrollY>0||e>=0&&this.state.scrollYi?i:this.state.height>i&&this.props.ownerHeight?Math.max(i,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 i=e.overflowX,r=e.overflowY;(i!==this.props.overflowX||r!==this.props.overflowY)&&(this._wheelHandler=new a(this._onWheel,"hidden"!==i,"hidden"!==r)),this.setState(this._calculateState(e,this.state))},componentDidUpdate:function(){this._reportContentHeight()},render:function(){var e,t=this.state,o=this.props;t.useGroupHeader&&(e=n.createElement(c,{key:"group_header",className:g(d("fixedDataTableLayout/header"),d("public/fixedDataTable/header")),data:t.groupHeaderData,width:t.width,height:t.groupHeaderHeight,index:0,zIndex:1,offsetTop:0,scrollLeft:t.scrollX,fixedColumns:t.groupHeaderFixedColumns,scrollableColumns:t.groupHeaderScrollableColumns}));var i=this.state.maxScrollY,r=t.maxScrollX>0&&"hidden"!==t.overflowX,s=i>0&&"hidden"!==t.overflowY,a=r?l.SIZE:0,u=t.height-a-2*T-t.footerHeight,f=t.useGroupHeader?t.groupHeaderHeight:0,p=f+t.headerHeight;u-=p;var m=0,v=null!=o.maxHeight?p+t.bodyHeight:p+u,_=v+t.footerHeight;void 0!==o.ownerHeight&&o.ownerHeightt.ownerHeight||t.scrollY or "),o.push(e))});var r=!1;o.length&&o[0].type.__TableColumnGroup__&&(r=!0);var n,s,a=t&&t.firstRowIndex||0,u=t&&t.firstRowOffset||0;n=t&&"hidden"!==e.overflowX?t.scrollX:e.scrollLeft,t&&"hidden"!==e.overflowY?s=t.scrollY:(d=this._scrollHelper.scrollTo(e.scrollTop),a=d.index,u=d.offset,s=d.position),void 0!==this._rowToScrollTo&&(d=this._scrollHelper.scrollRowIntoView(this._rowToScrollTo),a=d.index,u=d.offset,s=d.position,delete this._rowToScrollTo);var h=r?e.groupHeaderHeight:0;if(t&&e.rowsCount!==t.rowsCount){var c=(void 0===e.height?e.maxHeight:e.height)-(e.headerHeight||0)-(e.footerHeight||0)-(e.groupHeaderHeight||0);this._scrollHelper=new f(e.rowsCount,e.rowHeight,c,e.rowHeightGetter);var d=this._scrollHelper.scrollToRow(a,u);a=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:R;var v,g;if(r){var b=p.adjustColumnGroupWidths(o,e.width);v=b.columns,g=b.columnGroups}else v=p.adjustColumnWidths(o,e.width);var y=this._populateColumnsAndColumnData(v,g,t);if(void 0!==this._columnToScrollTo){var C=y.bodyFixedColumns.length;if(this._columnToScrollTo>=C){var H,D,S=0;for(H=0;HH;++H)D=y.bodyScrollableColumns[H],k+=D.props.width;var E=e.width-S,z=y.bodyScrollableColumns[M].props.width,O=k+z-E;O>n&&(n=O),n>k&&(n=k)}delete this._columnToScrollTo}var P=void 0===e.height,N=Math.round(P?e.maxHeight:e.height),I=e.footerHeight+e.headerHeight+h+2*T,F=N-I,L=this._scrollHelper.getContentHeight(),A=L+I,W=p.getTotalWidth(v),G=W>e.width&&"hidden"!==e.overflowX;G&&(F-=l.SIZE,A+=l.SIZE,I+=l.SIZE);var j=Math.max(0,W-e.width),V=Math.max(0,L-F);n=Math.min(n,j),s=Math.min(s,V),V||(P&&(N=A),F=A-I),this._scrollHelper.setViewportHeight(F);var q=i({isColumnResizing:t&&t.isColumnResizing},y,e,{columns:v,columnGroups:g,columnResizingData:m,firstRowIndex:a,firstRowOffset:u,horizontalScrollbarVisible:G,maxScrollX:j,maxScrollY:V,reservedHeight:I,scrollContentHeight:L,scrollX:n,scrollY:s,bodyHeight:F,height:N,groupHeaderHeight:h,useGroupHeader:r});return t&&(t.headData&&q.headData&&w(t.headData,q.headData)&&(q.headData=t.headData),t.groupHeaderData&&q.groupHeaderData&&w(t.groupHeaderData,q.groupHeaderData)&&(q.groupHeaderData=t.groupHeaderData)),q},_createGroupHeaderColumns:function(e){for(var t=[],o=0;oMath.abs(e)&&"hidden"!==this.props.overflowY){var i=this._scrollHelper.scrollBy(Math.round(t)),r=Math.max(0,i.contentHeight-this.state.bodyHeight);this.setState({firstRowIndex:i.index,firstRowOffset:i.offset,scrollY:i.position,scrollContentHeight:i.contentHeight,maxScrollY:r})}else e&&"hidden"!==this.props.overflowX&&(o+=e,o=0>o?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.props.onScrollEnd&&this.props.onScrollEnd(this.state.scrollX,this.state.scrollY))}}),D=n.createClass({displayName:"HorizontalScrollbar",mixins:[s],propTypes:{contentSize:y.number.isRequired,offset:y.number.isRequired,onScroll:y.func.isRequired,position:y.number.isRequired,size:y.number.isRequired},render:function(){var e={height:l.SIZE,width:this.props.size},t={height:l.SIZE,position:"absolute",overflow:"hidden",width:this.props.size};return b(t,0,this.props.offset),n.createElement("div",{className:g(d("fixedDataTableLayout/horizontalScrollbar"),d("public/fixedDataTable/horizontalScrollbar")),style:e},n.createElement("div",{style:t},n.createElement(l,i({},this.props,{isOpaque:!0,orientation:"horizontal",offset:void 0}))))}});e.exports=H},function(e,t,o){"use strict";function i(e){return null===e||void 0===e?"":String(e)}function r(e,t){a.Children.forEach(e,function(e){e.type===l?r(e.props.children,t):e.type===u&&t(e)})}function n(e,t){var o=[];return a.Children.forEach(e,function(e){var i=e;if(e.type===l){var n=!1,s=[];r(e.props.children,function(e){var o=t(e);o!==e&&(n=!0),s.push(o)}),n&&(i=a.cloneElement(e,{children:s}))}else e.type===u&&(i=t(e));o.push(i)}),o}var s=o(28),a=o(29),l=o(31),u=o(32),h=s.isRTL()?-1:1,c=5,f={DIR_SIGN:h,CELL_VISIBILITY_TOLERANCE:c,renderToString:i,forEachColumn:r,mapColumns:n};e.exports=f},function(e,t){"use strict";var o={isRTL:function(){return!1},getDirection:function(){return"LTR"}};e.exports=o},function(e,t,o){"use strict";e.exports=o(30)},function(t,o){t.exports=e},function(e,t,o){"use strict";var i=o(29),r=i.PropTypes,n=i.createClass({displayName:"FixedDataTableColumnGroup",statics:{__TableColumnGroup__:!0},propTypes:{align:r.oneOf(["left","center","right"]),fixed:r.bool,columnGroupData:r.object,label:r.string,groupHeaderRenderer:r.func},getDefaultProps:function(){return{fixed:!1}},render:function(){throw new Error("Component should never render")}});e.exports=n},function(e,t,o){"use strict";var i=o(29),r=i.PropTypes,n=i.createClass({displayName:"FixedDataTableColumn",statics:{__TableColumn__:!0},propTypes:{align:r.oneOf(["left","center","right"]),headerClassName:r.string,footerClassName:r.string,cellClassName:r.string,cellRenderer:r.func,cellDataGetter:r.func,dataKey:r.oneOfType([r.string,r.number]).isRequired,fixed:r.bool,headerRenderer:r.func,footerRenderer:r.func,columnData:r.object,label:r.string,width:r.number.isRequired,minWidth:r.number,maxWidth:r.number,flexGrow:r.number,isResizable:r.bool,allowCellsRecycling:r.bool},getDefaultProps:function(){return{allowCellsRecycling:!1,fixed:!1}},render:function(){throw new Error("Component should never render")}});e.exports=n},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 i={shouldComponentUpdate:function(e,t){return!o(this.props,e)||!o(this.state,t)}};e.exports=i},function(e,t,o){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var o=0;oi?-1:1),r&&!o&&(o=1>r?-1:1),{spinX:t,spinY:o,pixelX:i,pixelY:r}}var r=o(37),n=o(38),s=10,a=40,l=800;i.getEventType=function(){return r.firefox()?"DOMMouseScroll":n("wheel")?"wheel":"mousewheel"},e.exports=i},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),_=/Mobile/i.exec(e),p=!!/Win64/.exec(e),t){i=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,i&&document&&document.documentMode&&(i=document.documentMode);var w=/(?:Trident\/(\d+.\d+))/.exec(e);l=w?parseFloat(w[1])+4:i,r=t[2]?parseFloat(t[2]):NaN,n=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 i=r=n=a=s=NaN;if(o){if(o[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);u=b?parseFloat(b[1].replace("_",".")):!0}else u=!1;h=!!o[2],c=!!o[3]}else u=h=c=!1}}var i,r,n,s,a,l,u,h,c,f,p,d,m,v,_,g=!1,w={ie:function(){return o()||i},ieCompatibilityMode:function(){return o()||l>i},ie64:function(){return w.ie()&&p},firefox:function(){return o()||r},opera:function(){return o()||n},webkit:function(){return o()||s},safari:function(){return w.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||_},nativeApp:function(){return o()||v},android:function(){return o()||f},ipad:function(){return o()||m}};e.exports=w},function(e,t,o){"use strict";function i(e,t){if(!n.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,i=o in document;if(!i){var s=document.createElement("div");s.setAttribute(o,"return;"),i="function"==typeof s[o]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var r,n=o(39);n.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=i},function(e,t){"use strict";var o=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:o,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen,isInWorker:!o};e.exports=i},function(e,t,o){(function(t){"use strict";var i=o(35),r=o(41),n=0,s=r||function(e){var o=Date.now(),i=Math.max(0,16-(o-n));return n=o+i,t.setTimeout(function(){e(Date.now())},i)};s(i),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 i=o(43),r=o(46),n=o(29),s=o(47),a=o(33),l=o(34),u=o(49),h=o(50),c=o(35),f=o(51),p=n.PropTypes,d={position:0,scrollable:!1},m=parseInt(u("scrollbar-face-margin"),10),v=2*m,_=30,g=40,w=null,b=n.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,i=this.state.isHorizontal,r=!i,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":r,"ScrollbarLayout/mainHorizontal":i,"public/Scrollbar/main":!0,"public/Scrollbar/mainOpaque":l,"public/Scrollbar/mainActive":s}),d=h({"ScrollbarLayout/face":!0,"ScrollbarLayout/faceHorizontal":i,"ScrollbarLayout/faceVertical":r,"public/Scrollbar/faceActive":s,"public/Scrollbar/face":!0}),_=this.state.position*this.state.scale+m;return i?(e={width:o},t={width:a-v},f(t,_,0)):(e={top:c,height:o},t={height:a-v},f(t,0,_)),e.zIndex=this.props.zIndex,"gray"===this.props.trackColor&&(e.backgroundColor=u("fbui-desktop-background-light")),n.createElement("div",{onFocus:this._onFocus,onBlur:this._onBlur,onKeyDown:this._onKeyDown,onMouseDown:this._onMouseDown,onWheel:this._wheelHandler.onWheel,className:p,style:e,tabIndex:0},n.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 i(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(),w===this&&(w=null),delete this._mouseMoveTracker},scrollBy:function(e){this._onWheel(e)},_shouldHandleX:function(e){return"horizontal"===this.props.orientation?this._shouldHandleChange(e):!1},_shouldHandleY:function(e){return"horizontal"!==this.props.orientation?this._shouldHandleChange(e):!1},_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,i){if(1>t||t>=o)return d;var r=e+"_"+t+"_"+o+"_"+i;if(this._stateKey===r)return this._stateForKey;var n="horizontal"===i,s=t/o,a=t*s;_>a&&(s=(t-_)/(o-t),a=_);var l=!0,u=o-t;0>e?e=0:e>u&&(e=u);var h=this._mouseMoveTracker?this._mouseMoveTracker.isDragging():!1,c={faceSize:a,isDragging:h,isHorizontal:n,position:e,scale:s,scrollable:l};return this._stateKey=r,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,i=this.state.isHorizontal?o.offsetX||o.layerX:o.offsetY||o.layerY,r=this.props;i/=this.state.scale,t=this._calculateState(i-.5*this.state.faceSize/this.state.scale,r.size,r.contentSize,r.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,i=this.state.isHorizontal?e:t;i/=this.state.scale,this._setNextState(this._calculateState(this.state.position+i,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!==r.TAB){var o=g,i=0;if(this.state.isHorizontal)switch(t){case r.HOME:i=-1,o=this.props.contentSize;break;case r.LEFT:i=-1;break;case r.RIGHT:i=1;break;default:return}if(!this.state.isHorizontal)switch(t){case r.SPACE:i=e.shiftKey?-1:1;break;case r.HOME:i=-1,o=this.props.contentSize;break;case r.UP:i=-1;break;case r.DOWN:i=1;break;case r.PAGE_UP:i=-1,o=this.props.size;break;case r.PAGE_DOWN:i=1,o=this.props.size;break;default:return}e.preventDefault();var n=this.props;this._setNextState(this._calculateState(this.state.position+o*i,n.size,n.contentSize,n.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,i=this.state.position!==e.position;if(void 0===o){var r=i?this._didScroll:void 0;this.setState(e,r)}else{if(o!==e.position)return void(void 0!==e.position&&e.position!==this.state.position&&this.props.onScroll(e.position));this.setState(e)}i&&w!==this&&(w&&w._blur(),w=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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var o=0;o0;)this._addRowToBuffer(t,this._viewportRowsBegin,this._viewportRowsEnd-1),t++,e--;return this._rows}},{key:"getRows",value:function(e,t){var o=t,i=o,r=e,n=Math.min(e+this._maxVisibleRowCount,this._rowsCount);for(this._viewportRowsBegin=e;n>r||i=n&&(i=this._bufferSet.replaceFurthestValuePosition(t,o,e)),null===i?(i=this._bufferSet.getNewPositionForValue(e),this._rows[i]=e):this._rows[i]=e}}]),e}();e.exports=h},function(e,t,o){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var o=0;o=e&&t>=r)return null;var n;e-i>r-t?(n=i,this._smallValues.pop()):(n=r,this._largeValues.pop());var a=this._valueToPositionMap[n];return delete this._valueToPositionMap[n],this._valueToPositionMap[o]=a,this._pushToHeaps(a,o),a}},{key:"_pushToHeaps",value:function(e,t){var o={position:e,value:t};this._smallValues.push(o),this._largeValues.push(o)}},{key:"_cleanHeaps",value:function(){this._cleanHeap(this._smallValues),this._cleanHeap(this._largeValues);var e=Math.min(this._smallValues.size(),this._largeValues.size()),t=Math.max(this._smallValues.size(),this._largeValues.size());t>10*e&&this._recreateHeaps()}},{key:"_recreateHeaps",value:function(){for(var e=this._smallValues.size()t.value}}]),e}();e.exports=a},function(e,t){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return t>e}var r=function(){function e(e,t){for(var o=0;o0&&(this._items[0]=t,this._sinkDown(0)),e}}},{key:"push",value:function(e){this._items[this._size++]=e,this._bubbleUp(this._size-1)}},{key:"size",value:function(){return this._size}},{key:"peek",value:function(){return 0!==this._size?this._items[0]:void 0}},{key:"_heapify",value:function(){for(var e=Math.floor((this._size+1)/2);e>=0;e--)this._sinkDown(e)}},{key:"_bubbleUp",value:function(e){for(var t=this._items[e];e>0;){var o=Math.floor((e+1)/2)-1,i=this._items[o];if(this._comparator(i,t))return;this._items[o]=t,this._items[e]=i,e=o}}},{key:"_sinkDown",value:function(e){for(var t=this._items[e];;){var o=2*(e+1)-1,i=2*(e+1),r=-1;if(ot?e:t>o?o:t}e.exports=o},function(e,t,o){"use strict";var i=Object.assign||function(e){for(var t=1;t0){var t=a({"fixedDataTableRowLayout/fixedColumnsDivider":!0,"fixedDataTableRowLayout/columnsShadow":this.props.scrollLeft>0,"public/fixedDataTableRow/fixedColumnsDivider":!0,"public/fixedDataTableRow/columnsShadow":this.props.scrollLeft>0}),o={left:e,height:this.props.height};return r.createElement("div",{className:t,style:o})}},_onClick:function(e){this.props.onClick(e,this.props.index,this.props.data)},_onDoubleClick:function(e){this.props.onDoubleClick(e,this.props.index,this.props.data)},_onMouseDown:function(e){this.props.onMouseDown(e,this.props.index,this.props.data)},_onMouseEnter:function(e){this.props.onMouseEnter(e,this.props.index,this.props.data)},_onMouseLeave:function(e){this.props.onMouseLeave(e,this.props.index,this.props.data)}}),f=r.createClass({displayName:"FixedDataTableRow",mixins:[n],propTypes:{height:h.number.isRequired,zIndex:h.number,offsetTop:h.number.isRequired,width:h.number.isRequired},render:function(){var e={width:this.props.width,height:this.props.height,zIndex:this.props.zIndex?this.props.zIndex:0};return u(e,0,this.props.offsetTop),r.createElement("div",{style:e,className:a("fixedDataTableRowLayout/rowWrapper")},r.createElement(c,i({},this.props,{offsetTop:void 0,zIndex:void 0})))}});e.exports=f},function(e,t,o){"use strict";function i(e,t){var o={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=e[i]);return o}var r=Object.assign||function(e){for(var t=1;tr;r++){var s=t[r].props;if(!s.allowCellsRecycling||i-e.left<=e.width&&i-e.left+s.width>=0){var l="cell_"+r;o[r]=this._renderCell(e.data,e.rowIndex,e.rowHeight,s,i,l)}i+=s.width}var u=this._getColumnsWidth(t),c={height:e.height,position:"absolute",width:u,zIndex:e.zIndex};return f(c,-1*d*e.left,0),a.createElement("div",{className:h("fixedDataTableCellGroupLayout/cellGroup"),style:c},o)},_renderCell:function(e,t,o,i,r,n){var s,l=i.cellRenderer||c,h=i.columnData||m,f=i.dataKey,p=i.isFooterCell,d=i.isHeaderCell;if(d||p)s=null==e||null==e[f]?i.label:e[f];else{var v=i.cellDataGetter;s=v?v(f,e):e[f]}var _,g=i.isResizable&&this.props.onColumnResize,w=g?this.props.onColumnResize:null;return _=d||p?d?i.headerClassName:i.footerClassName:i.cellClassName,a.createElement(u,{align:i.align,cellData:s,cellDataKey:f,cellRenderer:l,className:_,columnData:h,height:o,isFooterCell:p,isHeaderCell:d,key:n,maxWidth:i.maxWidth,minWidth:i.minWidth,onColumnResize:w,rowData:e,rowIndex:t,width:i.width,left:r})},_getColumnsWidth:function(e){for(var t=0,o=0;oi;i++)n(e,t[i])}},{key:"deepFreezeRootNode",value:function(t){if(!a(t)){Object.freeze(t);for(var o in t)t.hasOwnProperty(o)&&e.recurseDeepFreeze(t[o]);Object.seal(t)}}},{key:"recurseDeepFreeze",value:function(t){if(!a(t)&&e.shouldRecurseFreeze(t)){Object.freeze(t);for(var o in t)t.hasOwnProperty(o)&&e.recurseDeepFreeze(t[o]);Object.seal(t)}}},{key:"shouldRecurseFreeze",value:function(t){return"object"==typeof t&&!(t instanceof e)&&null!==t}}]),e}();h._DONT_EVER_TYPE_THIS_SECRET_KEY=Math.random(),e.exports=h},function(e,t){"use strict";function o(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=o},function(e,t){"use strict";var o=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=o},function(e,t,o){"use strict";var i=o(55),r=o(68),n=36,s=function(e){return"object"!=typeof e||e instanceof Date||null===e},a={MAX_MERGE_DEPTH:n,isTerminal:s,normalizeMergeArg:function(e){return void 0===e||null===e?{}:e},checkMergeArrayArgs:function(e,t){i(Array.isArray(e)&&Array.isArray(t),"Tried to merge arrays, instead got %s and %s.",e,t)},checkMergeObjectArgs:function(e,t){a.checkMergeObjectArg(e),a.checkMergeObjectArg(t)},checkMergeObjectArg:function(e){i(!s(e)&&!Array.isArray(e),"Tried to merge an object, instead got %s.",e)},checkMergeIntoObjectArg:function(e){i(!(s(e)&&"function"!=typeof e||Array.isArray(e)),"Tried to merge into an object, instead got %s.",e)},checkMergeLevel:function(e){i(n>e,"Maximum deep merge depth exceeded. You may be attempting to merge circular structures in an unsupported way.")},checkArrayStrategy:function(e){i(void 0===e||e in a.ArrayStrategies,"You must provide an array strategy to deep merge functions to instruct the deep merge how to resolve merging two arrays.")},ArrayStrategies:r({Clobber:!0,IndexByIndex:!0})};e.exports=a},function(e,t,o){"use strict";var i=o(55),r=function(e){var t,o={};i(e instanceof Object&&!Array.isArray(e),"keyMirror(...): Argument must be an object.");for(t in e)e.hasOwnProperty(t)&&(o[t]=t);return o};e.exports=r},function(e,t,o){"use strict";var i=o(27),r=o(63),n=o(29),s=o(33),a=o(50),l=o(70),u=i.DIR_SIGN,h=n.PropTypes,c=new r({align:"left",highlighted:!1,isFooterCell:!1,isHeaderCell:!1}),f=n.createClass({displayName:"FixedDataTableCell",mixins:[s],propTypes:{align:h.oneOf(["left","center","right"]),className:h.string,highlighted:h.bool,isFooterCell:h.bool,isHeaderCell:h.bool,width:h.number.isRequired,minWidth:h.number,maxWidth:h.number,height:h.number.isRequired,cellData:h.any,cellDataKey:h.oneOfType([h.string.isRequired,h.number.isRequired]),cellRenderer:h.func.isRequired,columnData:h.any,rowData:h.oneOfType([h.object.isRequired,h.array.isRequired]),rowIndex:h.number.isRequired,onColumnResize:h.func,left:h.number},getDefaultProps:function(){return c},render:function(){var e=this.props,t={height:e.height,width:e.width};1===u?t.left=e.left:t.right=e.left;var o,i=l(a({"fixedDataTableCellLayout/main":!0,"fixedDataTableCellLayout/lastChild":e.lastChild,"fixedDataTableCellLayout/alignRight":"right"===e.align,"fixedDataTableCellLayout/alignCenter":"center"===e.align,"public/fixedDataTableCell/alignRight":"right"===e.align,"public/fixedDataTableCell/highlighted":e.highlighted,"public/fixedDataTableCell/main":!0}),e.className);o=e.isHeaderCell||e.isFooterCell?e.cellRenderer(e.cellData,e.cellDataKey,e.columnData,e.rowData,e.width):e.cellRenderer(e.cellData,e.cellDataKey,e.rowData,e.rowIndex,e.columnData,e.width);var r=a("public/fixedDataTableCell/cellContent");o=n.isValidElement(o)?n.cloneElement(o,{className:l(o.props.className,r)}):n.createElement("div",{className:r},o);var s;if(e.onColumnResize){var h={height:e.height};s=n.createElement("div",{className:a("fixedDataTableCellLayout/columnResizerContainer"),style:h,onMouseDown:this._onColumnResizerMouseDown},n.createElement("div",{className:l(a("fixedDataTableCellLayout/columnResizerKnob"),a("public/fixedDataTableCell/columnResizerKnob")),style:h}))}var c={height:e.height,width:e.width};return n.createElement("div",{className:i,style:t},s,n.createElement("div",{className:l(a("fixedDataTableCellLayout/wrap1"),a("public/fixedDataTableCell/wrap1")),style:c},n.createElement("div",{className:l(a("fixedDataTableCellLayout/wrap2"),a("public/fixedDataTableCell/wrap2"))},n.createElement("div",{className:l(a("fixedDataTableCellLayout/wrap3"),a("public/fixedDataTableCell/wrap3"))},o))))},_onColumnResizerMouseDown:function(e){this.props.onColumnResize(this.props.left,this.props.width,this.props.minWidth,this.props.maxWidth,this.props.cellDataKey,e)}});e.exports=f},function(e,t){"use strict";function o(e){e||(e="");var t,o=arguments.length;if(o>1)for(var i=1;o>i;i++)t=arguments[i],t&&(e=(e?e+" ":"")+t);return e}e.exports=o},function(e,t,o){"use strict";var i=o(43),r=o(28),n=o(29),s=o(33),a=o(60),l=o(50),u=n.PropTypes,h=n.createClass({displayName:"FixedDataTableColumnResizeHandle",mixins:[s],propTypes:{visible:u.bool.isRequired,height:u.number.isRequired,leftOffset:u.number.isRequired,knobHeight:u.number.isRequired,initialWidth:u.number,minWidth:u.number,maxWidth:u.number,initialEvent:u.object,onColumnResizeEnd:u.func,columnKey:u.oneOfType([u.string,u.number])},getInitialState:function(){return{width:0,cursorDelta:0}},componentWillReceiveProps:function(e){e.initialEvent&&!this._mouseMoveTracker.isDragging()&&(this._mouseMoveTracker.captureMouseMoves(e.initialEvent),this.setState({width:e.initialWidth,cursorDelta:e.initialWidth}))},componentDidMount:function(){this._mouseMoveTracker=new i(this._onMove,this._onColumnResizeEnd,document.body)},componentWillUnmount:function(){this._mouseMoveTracker.releaseMouseMoves(),this._mouseMoveTracker=null},render:function(){var e={width:this.state.width,height:this.props.height};return r.isRTL()?e.right=this.props.leftOffset:e.left=this.props.leftOffset,n.createElement("div",{className:l({"fixedDataTableColumnResizerLineLayout/main":!0,"fixedDataTableColumnResizerLineLayout/hiddenElem":!this.props.visible,"public/fixedDataTableColumnResizerLine/main":!0}),style:e},n.createElement("div",{className:l("fixedDataTableColumnResizerLineLayout/mouseArea"),style:{height:this.props.height}}))},_onMove:function(e){r.isRTL()&&(e=-e);var t=this.state.cursorDelta+e,o=a(this.props.minWidth,t,this.props.maxWidth);this.setState({width:o,cursorDelta:t})},_onColumnResizeEnd:function(){this._mouseMoveTracker.releaseMouseMoves(),this.props.onColumnResizeEnd(this.state.width,this.props.columnKey)}});e.exports=h},function(e,t,o){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var o=0;oa;++a)this._storedHeights[a]=o;this._rowCount=t,this._position=0,this._contentHeight=t*o,this._defaultRowHeight=o,this._rowHeightGetter=s?s:function(){return o},this._viewportHeight=r,this.scrollRowIntoView=this.scrollRowIntoView.bind(this),this.setViewportHeight=this.setViewportHeight.bind(this),this.scrollBy=this.scrollBy.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollToRow=this.scrollToRow.bind(this),this.setRowHeightGetter=this.setRowHeightGetter.bind(this),this.getContentHeight=this.getContentHeight.bind(this),this.getRowPosition=this.getRowPosition.bind(this),this._updateHeightsInViewport(0,0)}return r(e,[{key:"setRowHeightGetter",value:function(e){this._rowHeightGetter=e}},{key:"setViewportHeight",value:function(e){this._viewportHeight=e}},{key:"getContentHeight",value:function(){return this._contentHeight}},{key:"_updateHeightsInViewport",value:function(e,t){for(var o=t,i=e;o<=this._viewportHeight&&i=0&&t>=e-a;){var o=this._updateRowHeight(t);this._position+=o,t--}}},{key:"_updateRowHeight",value:function(e){if(0>e||e>=this._rowCount)return 0;var t=this._rowHeightGetter(e);if(t!==this._storedHeights[e]){var o=t-this._storedHeights[e];return this._rowOffsets.set(e,t),this._storedHeights[e]=t,this._contentHeight+=o,o}return 0}},{key:"getRowPosition",value:function(e){return this._updateRowHeight(e),this._rowOffsets.sumUntil(e)}},{key:"scrollBy",value:function(e){if(0===this._rowCount)return l;var t=this._rowOffsets.greatestLowerBound(this._position);t=s(0,t,Math.max(this._rowCount-1,0));var o=this._rowOffsets.sumUntil(t),i=t,r=this._position,n=this._updateRowHeight(i);0!==o&&(r+=n);var a=this._storedHeights[i]-(r-o);if(e>=0)for(;e>0&&ie?(r+=e,e=0):(e-=a,r+=a,i++),ie){e=-e;for(var u=this._storedHeights[i]-a;e>0&&i>=0;)if(u>e?(r-=e,e=0):(r-=u,e-=u,i--),i>=0){var h=this._updateRowHeight(i);u=this._storedHeights[i],r+=h}}var c=this._contentHeight-this._viewportHeight;r=s(0,r,c),this._position=r;var f=this._rowOffsets.greatestLowerBound(r);f=s(0,f,Math.max(this._rowCount-1,0)),o=this._rowOffsets.sumUntil(f);var p=o-r;return this._updateHeightsInViewport(f,p),this._updateHeightsAboveViewport(f),{index:f,offset:p,position:this._position,contentHeight:this._contentHeight}}},{key:"_getRowAtEndPosition",value:function(e){this._updateRowHeight(e);for(var t=e,o=this._storedHeights[t];o=0;)t--,t>=0&&(this._updateRowHeight(t),o+=this._storedHeights[t]);var i=this._rowOffsets.sumTo(e)-this._viewportHeight;return 0>i&&(i=0),i}},{key:"scrollTo",value:function(e){if(0===this._rowCount)return l;if(0>=e)return this._position=0,this._updateHeightsInViewport(0,0),{index:0,offset:0,position:this._position,contentHeight:this._contentHeight};if(e>=this._contentHeight-this._viewportHeight){var t=this._rowCount-1;e=this._getRowAtEndPosition(t)}this._position=e;var o=this._rowOffsets.greatestLowerBound(e);o=s(0,o,Math.max(this._rowCount-1,0));var i=this._rowOffsets.sumUntil(o),r=i-e;return this._updateHeightsInViewport(o,r),this._updateHeightsAboveViewport(o),{index:o,offset:r,position:this._position,contentHeight:this._contentHeight}}},{key:"scrollToRow",value:function(e,t){e=s(0,e,Math.max(this._rowCount-1,0)),t=s(-this._storedHeights[e],t,0);var o=this._rowOffsets.sumUntil(e);return this.scrollTo(o-t)}},{key:"scrollRowIntoView",value:function(e){e=s(0,e,Math.max(this._rowCount-1,0));var t=this._rowOffsets.sumUntil(e),o=t+this._storedHeights[e];if(tt;)t*=2;return t}var n=function(){function e(e,t){for(var o=0;o=0;--o)t[o]=0;return t},u=function(){function e(t){i(this,e),this._size=t.length,this._half=r(this._size),this._heap=new l(2*this._half);var o;for(o=0;o0;--o)this._heap[o]=this._heap[2*o]+this._heap[2*o+1]}return n(e,[{key:"set",value:function(e,t){s(e>=0&&e=0&&e=0&&e=0&&e=e,"Begin must precede end"),this.sumUntil(t)-this.sumUntil(e)}},{key:"greatestLowerBound",value:function(e){if(0>e)return-1;var t=1;if(this._heap[t]<=e)return this._size;for(;te?t=2*t:(t=2*t+1,e-=o)}return t-this._half}},{key:"greatestStrictLowerBound",value:function(e){if(0>=e)return-1;var t=1;if(this._heap[t]=e?t=2*t:(t=2*t+1,e-=o)}return t-this._half}},{key:"leastUpperBound",value:function(e){return this.greatestStrictLowerBound(e)+1}},{key:"leastStrictUpperBound",value:function(e){return this.greatestLowerBound(e)+1}}],[{key:"uniform",value:function(t,o){for(var i=[],r=t-1;r>=0;--r)i[r]=o;return new e(i)}},{key:"empty",value:function(t){return e.uniform(t,0)}}]),e}();e.exports=u}).call(t,function(){return this}())},function(e,t,o){"use strict";function i(e){for(var t=0,o=0;o=t)return{columns:e,width:i(e)};for(var o=r(e),n=t,s=[],a=0,u=0;uo?n(e,t-o).columns:e}var l=o(29),u={getTotalWidth:i,getTotalFlexGrow:r,distributeFlexWidth:n,adjustColumnWidths:a,adjustColumnGroupWidths:s};e.exports=u},function(e,t){"use strict";function o(e,t,o,i,r){function n(){for(var r=arguments.length,a=Array(r),l=0;r>l;l++)a[l]=arguments[l];n.reset();var u=function(){e.apply(o,a)};u.__SMmeta=e.__SMmeta,s=i(u,t)}i=i||setTimeout,r=r||clearTimeout;var s;return n.reset=function(){r(s)},n}e.exports=o},function(e,t){"use strict";function o(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var r=Object.prototype.hasOwnProperty.bind(t),n=0;n