From 7db1f2144abc5574e7f6cbd1df7fa5afad43ff05 Mon Sep 17 00:00:00 2001 From: Edwin Zhang Date: Tue, 11 Aug 2015 15:40:30 -0700 Subject: [PATCH] Version 0.4.2 --- dist/fixed-data-table-base.css | 204 +-- dist/fixed-data-table-base.min.css | 4 +- dist/fixed-data-table-style.css | 86 +- dist/fixed-data-table-style.min.css | 4 +- dist/fixed-data-table.css | 246 ++-- dist/fixed-data-table.js | 1907 ++++++--------------------- dist/fixed-data-table.min.css | 4 +- dist/fixed-data-table.min.js | 8 +- package.json | 2 +- src/FixedDataTableRoot.js | 2 +- 10 files changed, 713 insertions(+), 1754 deletions(-) diff --git a/dist/fixed-data-table-base.css b/dist/fixed-data-table-base.css index d49f83b1..3908f4b0 100644 --- a/dist/fixed-data-table-base.css +++ b/dist/fixed-data-table-base.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.4.1 + * FixedDataTable v0.4.2 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -9,6 +9,107 @@ * of patent rights can be found in the PATENTS file in the same directory. */ +/** + * 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. + * + * @providesModule ScrollbarLayout + */ + +.ScrollbarLayout_main { + box-sizing: border-box; + outline: none; + overflow: hidden; + position: absolute; + -webkit-transition-duration: 250ms; + transition-duration: 250ms; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.ScrollbarLayout_mainVertical { + bottom: 0; + right: 0; + top: 0; + -webkit-transition-property: background-color width; + transition-property: background-color width; + width: 15px; +} + +.ScrollbarLayout_mainVertical.public_Scrollbar_mainActive, +.ScrollbarLayout_mainVertical:hover { + width: 17px; +} + +.ScrollbarLayout_mainHorizontal { + bottom: 0; + height: 15px; + left: 0; + -webkit-transition-property: background-color height; + transition-property: background-color height; +} + +/* Touching the scroll-track directly makes the scroll-track bolder */ +.ScrollbarLayout_mainHorizontal.public_Scrollbar_mainActive, +.ScrollbarLayout_mainHorizontal:hover { + height: 17px; +} + +.ScrollbarLayout_face { + left: 0; + overflow: hidden; + position: absolute; + z-index: 1; +} + +/** + * This selector renders the "nub" of the scrollface. The nub must + * be rendered as pseudo-element so that it won't receive any UI events then + * we can get the correct `event.offsetX` and `event.offsetY` from the + * scrollface element while dragging it. + */ +.ScrollbarLayout_face:after { + border-radius: 6px; + content: ''; + display: block; + position: absolute; + -webkit-transition: background-color 250ms ease; + transition: background-color 250ms ease; +} + +.ScrollbarLayout_faceHorizontal { + bottom: 0; + left: 0; + top: 0; +} + +.ScrollbarLayout_faceHorizontal:after { + bottom: 4px; + left: 0; + top: 4px; + width: 100%; +} + +.ScrollbarLayout_faceVertical { + left: 0; + right: 0; + top: 0; +} + +.ScrollbarLayout_faceVertical:after { + height: 100%; + left: 4px; + right: 4px; + top: 0; +} /** * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -240,104 +341,3 @@ body[dir="rtl"] .fixedDataTableColumnResizerLineLayout_main { position: absolute; top: 0; } -/** - * 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. - * - * @providesModule ScrollbarLayout - */ - -.ScrollbarLayout_main { - box-sizing: border-box; - outline: none; - overflow: hidden; - position: absolute; - -webkit-transition-duration: 250ms; - transition-duration: 250ms; - -webkit-transition-timing-function: ease; - transition-timing-function: ease; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.ScrollbarLayout_mainVertical { - bottom: 0; - right: 0; - top: 0; - -webkit-transition-property: background-color width; - transition-property: background-color width; - width: 15px; -} - -.ScrollbarLayout_mainVertical.public_Scrollbar_mainActive, -.ScrollbarLayout_mainVertical:hover { - width: 17px; -} - -.ScrollbarLayout_mainHorizontal { - bottom: 0; - height: 15px; - left: 0; - -webkit-transition-property: background-color height; - transition-property: background-color height; -} - -/* Touching the scroll-track directly makes the scroll-track bolder */ -.ScrollbarLayout_mainHorizontal.public_Scrollbar_mainActive, -.ScrollbarLayout_mainHorizontal:hover { - height: 17px; -} - -.ScrollbarLayout_face { - left: 0; - overflow: hidden; - position: absolute; - z-index: 1; -} - -/** - * This selector renders the "nub" of the scrollface. The nub must - * be rendered as pseudo-element so that it won't receive any UI events then - * we can get the correct `event.offsetX` and `event.offsetY` from the - * scrollface element while dragging it. - */ -.ScrollbarLayout_face:after { - border-radius: 6px; - content: ''; - display: block; - position: absolute; - -webkit-transition: background-color 250ms ease; - transition: background-color 250ms ease; -} - -.ScrollbarLayout_faceHorizontal { - bottom: 0; - left: 0; - top: 0; -} - -.ScrollbarLayout_faceHorizontal:after { - bottom: 4px; - left: 0; - top: 4px; - width: 100%; -} - -.ScrollbarLayout_faceVertical { - left: 0; - right: 0; - top: 0; -} - -.ScrollbarLayout_faceVertical:after { - height: 100%; - left: 4px; - right: 4px; - top: 0; -} diff --git a/dist/fixed-data-table-base.min.css b/dist/fixed-data-table-base.min.css index 73418afe..d816c3cc 100644 --- a/dist/fixed-data-table-base.min.css +++ b/dist/fixed-data-table-base.min.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.4.1 + * FixedDataTable v0.4.2 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -9,4 +9,4 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -.fixedDataTableCellGroupLayout_cellGroup{-webkit-backface-visibility:hidden;backface-visibility:hidden;left:0;overflow:hidden;position:absolute;top:0;white-space:nowrap}.fixedDataTableCellGroupLayout_cellGroup>.public_fixedDataTableCell_main{display:inline-block;vertical-align:top;white-space:normal}.fixedDataTableCellGroupLayout_cellGroupWrapper{position:absolute;top:0}.fixedDataTableCellLayout_main{border-right-style:solid;border-width:0 1px 0 0;box-sizing:border-box;display:block;overflow:hidden;position:absolute;white-space:normal}.fixedDataTableCellLayout_lastChild{border-width:0 1px 1px 0}.fixedDataTableCellLayout_alignRight{text-align:right}.fixedDataTableCellLayout_alignCenter{text-align:center}.fixedDataTableCellLayout_wrap1{display:table}.fixedDataTableCellLayout_wrap2{display:table-row}.fixedDataTableCellLayout_wrap3{display:table-cell;vertical-align:middle}.fixedDataTableCellLayout_columnResizerContainer{position:absolute;right:0;width:6px;z-index:1}.fixedDataTableCellLayout_columnResizerContainer:hover{cursor:ew-resize}.fixedDataTableCellLayout_columnResizerContainer:hover .fixedDataTableCellLayout_columnResizerKnob{visibility:visible}.fixedDataTableCellLayout_columnResizerKnob{position:absolute;right:0;visibility:hidden;width:4px}.fixedDataTableColumnResizerLineLayout_mouseArea{cursor:ew-resize;position:absolute;right:-5px;width:12px}.fixedDataTableColumnResizerLineLayout_main{border-right-style:solid;border-right-width:1px;box-sizing:border-box;position:absolute;z-index:10}body[dir="rtl"] .fixedDataTableColumnResizerLineLayout_main,.fixedDataTableColumnResizerLineLayout_hiddenElem{display:none!important}.fixedDataTableLayout_main{border-style:solid;border-width:1px;box-sizing:border-box;overflow:hidden;position:relative}.fixedDataTableLayout_header,.fixedDataTableLayout_hasBottomBorder{border-bottom-style:solid;border-bottom-width:1px}.fixedDataTableLayout_footer .public_fixedDataTableCell_main{border-top-style:solid;border-top-width:1px}.fixedDataTableLayout_topShadow,.fixedDataTableLayout_bottomShadow{height:4px;left:0;position:absolute;right:0;z-index:1}.fixedDataTableLayout_bottomShadow{margin-top:-4px}.fixedDataTableLayout_rowsContainer{overflow:hidden;position:relative}.fixedDataTableLayout_horizontalScrollbar{bottom:0;position:absolute}.fixedDataTableRowLayout_main{box-sizing:border-box;overflow:hidden;position:absolute;top:0}.fixedDataTableRowLayout_body{left:0;position:absolute;top:0}.fixedDataTableRowLayout_fixedColumnsDivider{-webkit-backface-visibility:hidden;backface-visibility:hidden;border-left-style:solid;border-left-width:1px;left:0;position:absolute;top:0;width:0}.fixedDataTableRowLayout_columnsShadow{width:4px}.fixedDataTableRowLayout_rowWrapper{position:absolute;top:0}.ScrollbarLayout_main{box-sizing:border-box;outline:none;overflow:hidden;position:absolute;-webkit-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ScrollbarLayout_mainVertical{bottom:0;right:0;top:0;-webkit-transition-property:background-color width;transition-property:background-color width;width:15px}.ScrollbarLayout_mainVertical.public_Scrollbar_mainActive,.ScrollbarLayout_mainVertical:hover{width:17px}.ScrollbarLayout_mainHorizontal{bottom:0;height:15px;left:0;-webkit-transition-property:background-color height;transition-property:background-color height}.ScrollbarLayout_mainHorizontal.public_Scrollbar_mainActive,.ScrollbarLayout_mainHorizontal:hover{height:17px}.ScrollbarLayout_face{left:0;overflow:hidden;position:absolute;z-index:1}.ScrollbarLayout_face:after{border-radius:6px;content:'';display:block;position:absolute;-webkit-transition:background-color 250ms ease;transition:background-color 250ms ease}.ScrollbarLayout_faceHorizontal{bottom:0;left:0;top:0}.ScrollbarLayout_faceHorizontal:after{bottom:4px;left:0;top:4px;width:100%}.ScrollbarLayout_faceVertical{left:0;right:0;top:0}.ScrollbarLayout_faceVertical:after{height:100%;left:4px;right:4px;top:0} \ No newline at end of file +.ScrollbarLayout_main{box-sizing:border-box;outline:none;overflow:hidden;position:absolute;-webkit-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ScrollbarLayout_mainVertical{bottom:0;right:0;top:0;-webkit-transition-property:background-color width;transition-property:background-color width;width:15px}.ScrollbarLayout_mainVertical.public_Scrollbar_mainActive,.ScrollbarLayout_mainVertical:hover{width:17px}.ScrollbarLayout_mainHorizontal{bottom:0;height:15px;left:0;-webkit-transition-property:background-color height;transition-property:background-color height}.ScrollbarLayout_mainHorizontal.public_Scrollbar_mainActive,.ScrollbarLayout_mainHorizontal:hover{height:17px}.ScrollbarLayout_face{left:0;overflow:hidden;position:absolute;z-index:1}.ScrollbarLayout_face:after{border-radius:6px;content:'';display:block;position:absolute;-webkit-transition:background-color 250ms ease;transition:background-color 250ms ease}.ScrollbarLayout_faceHorizontal{bottom:0;left:0;top:0}.ScrollbarLayout_faceHorizontal:after{bottom:4px;left:0;top:4px;width:100%}.ScrollbarLayout_faceVertical{left:0;right:0;top:0}.ScrollbarLayout_faceVertical:after{height:100%;left:4px;right:4px;top:0}.fixedDataTableCellGroupLayout_cellGroup{-webkit-backface-visibility:hidden;backface-visibility:hidden;left:0;overflow:hidden;position:absolute;top:0;white-space:nowrap}.fixedDataTableCellGroupLayout_cellGroup>.public_fixedDataTableCell_main{display:inline-block;vertical-align:top;white-space:normal}.fixedDataTableCellGroupLayout_cellGroupWrapper{position:absolute;top:0}.fixedDataTableCellLayout_main{border-right-style:solid;border-width:0 1px 0 0;box-sizing:border-box;display:block;overflow:hidden;position:absolute;white-space:normal}.fixedDataTableCellLayout_lastChild{border-width:0 1px 1px 0}.fixedDataTableCellLayout_alignRight{text-align:right}.fixedDataTableCellLayout_alignCenter{text-align:center}.fixedDataTableCellLayout_wrap1{display:table}.fixedDataTableCellLayout_wrap2{display:table-row}.fixedDataTableCellLayout_wrap3{display:table-cell;vertical-align:middle}.fixedDataTableCellLayout_columnResizerContainer{position:absolute;right:0;width:6px;z-index:1}.fixedDataTableCellLayout_columnResizerContainer:hover{cursor:ew-resize}.fixedDataTableCellLayout_columnResizerContainer:hover .fixedDataTableCellLayout_columnResizerKnob{visibility:visible}.fixedDataTableCellLayout_columnResizerKnob{position:absolute;right:0;visibility:hidden;width:4px}.fixedDataTableColumnResizerLineLayout_mouseArea{cursor:ew-resize;position:absolute;right:-5px;width:12px}.fixedDataTableColumnResizerLineLayout_main{border-right-style:solid;border-right-width:1px;box-sizing:border-box;position:absolute;z-index:10}body[dir="rtl"] .fixedDataTableColumnResizerLineLayout_main,.fixedDataTableColumnResizerLineLayout_hiddenElem{display:none!important}.fixedDataTableLayout_main{border-style:solid;border-width:1px;box-sizing:border-box;overflow:hidden;position:relative}.fixedDataTableLayout_header,.fixedDataTableLayout_hasBottomBorder{border-bottom-style:solid;border-bottom-width:1px}.fixedDataTableLayout_footer .public_fixedDataTableCell_main{border-top-style:solid;border-top-width:1px}.fixedDataTableLayout_topShadow,.fixedDataTableLayout_bottomShadow{height:4px;left:0;position:absolute;right:0;z-index:1}.fixedDataTableLayout_bottomShadow{margin-top:-4px}.fixedDataTableLayout_rowsContainer{overflow:hidden;position:relative}.fixedDataTableLayout_horizontalScrollbar{bottom:0;position:absolute}.fixedDataTableRowLayout_main{box-sizing:border-box;overflow:hidden;position:absolute;top:0}.fixedDataTableRowLayout_body{left:0;position:absolute;top:0}.fixedDataTableRowLayout_fixedColumnsDivider{-webkit-backface-visibility:hidden;backface-visibility:hidden;border-left-style:solid;border-left-width:1px;left:0;position:absolute;top:0;width:0}.fixedDataTableRowLayout_columnsShadow{width:4px}.fixedDataTableRowLayout_rowWrapper{position:absolute;top:0} \ No newline at end of file diff --git a/dist/fixed-data-table-style.css b/dist/fixed-data-table-style.css index 37db16f3..03589deb 100644 --- a/dist/fixed-data-table-style.css +++ b/dist/fixed-data-table-style.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.4.1 + * FixedDataTable v0.4.2 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -9,6 +9,48 @@ * of patent rights can be found in the PATENTS file in the same directory. */ +/** + * 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. + * + * @providesModule Scrollbar + * + */ + +/** + * Scrollbars. + */ + +/* Touching the scroll-track directly makes the scroll-track bolder */ +.public_Scrollbar_main.public_Scrollbar_mainActive, +.public_Scrollbar_main:hover { + background-color: rgba(255, 255, 255, 0.8); +} + +.public_Scrollbar_main.public_Scrollbar_mainActive, +.public_Scrollbar_main:hover { + background-color: rgba(255, 255, 255, 0.8); +} + +.public_Scrollbar_mainOpaque, +.public_Scrollbar_mainOpaque.public_Scrollbar_mainActive, +.public_Scrollbar_mainOpaque:hover { + background-color: #fff; +} + +.public_Scrollbar_face:after { + background-color: #c2c2c2; +} + +.public_Scrollbar_main:hover .public_Scrollbar_face:after, +.public_Scrollbar_mainActive .public_Scrollbar_face:after, +.public_Scrollbar_faceActive:after { + background-color: #7d7d7d; +} /** * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -138,45 +180,3 @@ .public_fixedDataTableRow_columnsShadow { background: 0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAYAAAD5PA/NAAAAFklEQVQIHWPSkNeSBmJhTQVtbiDNCgASagIIuJX8OgAAAABJRU5ErkJggg==) repeat-y; } -/** - * 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. - * - * @providesModule Scrollbar - * - */ - -/** - * Scrollbars. - */ - -/* Touching the scroll-track directly makes the scroll-track bolder */ -.public_Scrollbar_main.public_Scrollbar_mainActive, -.public_Scrollbar_main:hover { - background-color: rgba(255, 255, 255, 0.8); -} - -.public_Scrollbar_main.public_Scrollbar_mainActive, -.public_Scrollbar_main:hover { - background-color: rgba(255, 255, 255, 0.8); -} - -.public_Scrollbar_mainOpaque, -.public_Scrollbar_mainOpaque.public_Scrollbar_mainActive, -.public_Scrollbar_mainOpaque:hover { - background-color: #fff; -} - -.public_Scrollbar_face:after { - background-color: #c2c2c2; -} - -.public_Scrollbar_main:hover .public_Scrollbar_face:after, -.public_Scrollbar_mainActive .public_Scrollbar_face:after, -.public_Scrollbar_faceActive:after { - background-color: #7d7d7d; -} diff --git a/dist/fixed-data-table-style.min.css b/dist/fixed-data-table-style.min.css index f208aae9..29a29c04 100644 --- a/dist/fixed-data-table-style.min.css +++ b/dist/fixed-data-table-style.min.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.4.1 + * FixedDataTable v0.4.2 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -9,4 +9,4 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -.public_fixedDataTable_main,.public_fixedDataTable_header,.public_fixedDataTable_hasBottomBorder{border-color:#d3d3d3}.public_fixedDataTable_header .public_fixedDataTableCell_main{font-weight:700}.public_fixedDataTable_header,.public_fixedDataTable_header .public_fixedDataTableCell_main{background-color:#f6f7f8;background-image:-webkit-linear-gradient(#fff,#efefef);background-image:linear-gradient(#fff,#efefef)}.public_fixedDataTable_footer .public_fixedDataTableCell_main{background-color:#f6f7f8;border-color:#d3d3d3}.public_fixedDataTable_topShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAECAYAAABP2FU6AAAAF0lEQVR4AWPUkNeSBhHCjJoK2twgFisAFagCCp3pJlAAAAAASUVORK5CYII=) repeat-x}.public_fixedDataTable_bottomShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAECAYAAABP2FU6AAAAHElEQVQI12MwNjZmZdAT1+Nm0JDWEGZQk1GTBgAWkwIeAEp52AAAAABJRU5ErkJggg==) repeat-x}.public_fixedDataTable_horizontalScrollbar .public_Scrollbar_mainHorizontal{background-color:#fff}.public_fixedDataTableCell_main{background-color:#fff;border-color:#d3d3d3}.public_fixedDataTableCell_highlighted{background-color:#f4f4f4}.public_fixedDataTableCell_cellContent{padding:8px}.public_fixedDataTableCell_columnResizerKnob{background-color:#0284ff}.public_fixedDataTableColumnResizerLine_main{border-color:#0284ff}.public_fixedDataTableRow_main{background-color:#fff}.public_fixedDataTableRow_highlighted,.public_fixedDataTableRow_highlighted .public_fixedDataTableCell_main{background-color:#f6f7f8}.public_fixedDataTableRow_fixedColumnsDivider{border-color:#d3d3d3}.public_fixedDataTableRow_columnsShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAYAAAD5PA/NAAAAFklEQVQIHWPSkNeSBmJhTQVtbiDNCgASagIIuJX8OgAAAABJRU5ErkJggg==) repeat-y}.public_Scrollbar_main.public_Scrollbar_mainActive,.public_Scrollbar_main:hover{background-color:rgba(255,255,255,.8)}.public_Scrollbar_mainOpaque,.public_Scrollbar_mainOpaque.public_Scrollbar_mainActive,.public_Scrollbar_mainOpaque:hover{background-color:#fff}.public_Scrollbar_face:after{background-color:#c2c2c2}.public_Scrollbar_main:hover .public_Scrollbar_face:after,.public_Scrollbar_mainActive .public_Scrollbar_face:after,.public_Scrollbar_faceActive:after{background-color:#7d7d7d} \ No newline at end of file +.public_Scrollbar_main.public_Scrollbar_mainActive,.public_Scrollbar_main:hover{background-color:rgba(255,255,255,.8)}.public_Scrollbar_mainOpaque,.public_Scrollbar_mainOpaque.public_Scrollbar_mainActive,.public_Scrollbar_mainOpaque:hover{background-color:#fff}.public_Scrollbar_face:after{background-color:#c2c2c2}.public_Scrollbar_main:hover .public_Scrollbar_face:after,.public_Scrollbar_mainActive .public_Scrollbar_face:after,.public_Scrollbar_faceActive:after{background-color:#7d7d7d}.public_fixedDataTable_main,.public_fixedDataTable_header,.public_fixedDataTable_hasBottomBorder{border-color:#d3d3d3}.public_fixedDataTable_header .public_fixedDataTableCell_main{font-weight:700}.public_fixedDataTable_header,.public_fixedDataTable_header .public_fixedDataTableCell_main{background-color:#f6f7f8;background-image:-webkit-linear-gradient(#fff,#efefef);background-image:linear-gradient(#fff,#efefef)}.public_fixedDataTable_footer .public_fixedDataTableCell_main{background-color:#f6f7f8;border-color:#d3d3d3}.public_fixedDataTable_topShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAECAYAAABP2FU6AAAAF0lEQVR4AWPUkNeSBhHCjJoK2twgFisAFagCCp3pJlAAAAAASUVORK5CYII=) repeat-x}.public_fixedDataTable_bottomShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAECAYAAABP2FU6AAAAHElEQVQI12MwNjZmZdAT1+Nm0JDWEGZQk1GTBgAWkwIeAEp52AAAAABJRU5ErkJggg==) repeat-x}.public_fixedDataTable_horizontalScrollbar .public_Scrollbar_mainHorizontal{background-color:#fff}.public_fixedDataTableCell_main{background-color:#fff;border-color:#d3d3d3}.public_fixedDataTableCell_highlighted{background-color:#f4f4f4}.public_fixedDataTableCell_cellContent{padding:8px}.public_fixedDataTableCell_columnResizerKnob{background-color:#0284ff}.public_fixedDataTableColumnResizerLine_main{border-color:#0284ff}.public_fixedDataTableRow_main{background-color:#fff}.public_fixedDataTableRow_highlighted,.public_fixedDataTableRow_highlighted .public_fixedDataTableCell_main{background-color:#f6f7f8}.public_fixedDataTableRow_fixedColumnsDivider{border-color:#d3d3d3}.public_fixedDataTableRow_columnsShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAYAAAD5PA/NAAAAFklEQVQIHWPSkNeSBmJhTQVtbiDNCgASagIIuJX8OgAAAABJRU5ErkJggg==) repeat-y} \ No newline at end of file diff --git a/dist/fixed-data-table.css b/dist/fixed-data-table.css index 90dd5e40..a51de185 100644 --- a/dist/fixed-data-table.css +++ b/dist/fixed-data-table.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.4.1 + * FixedDataTable v0.4.2 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -9,6 +9,48 @@ * of patent rights can be found in the PATENTS file in the same directory. */ +/** + * 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. + * + * @providesModule Scrollbar + * + */ + +/** + * Scrollbars. + */ + +/* Touching the scroll-track directly makes the scroll-track bolder */ +.public_Scrollbar_main.public_Scrollbar_mainActive, +.public_Scrollbar_main:hover { + background-color: rgba(255, 255, 255, 0.8); +} + +.public_Scrollbar_main.public_Scrollbar_mainActive, +.public_Scrollbar_main:hover { + background-color: rgba(255, 255, 255, 0.8); +} + +.public_Scrollbar_mainOpaque, +.public_Scrollbar_mainOpaque.public_Scrollbar_mainActive, +.public_Scrollbar_mainOpaque:hover { + background-color: #fff; +} + +.public_Scrollbar_face:after { + background-color: #c2c2c2; +} + +.public_Scrollbar_main:hover .public_Scrollbar_face:after, +.public_Scrollbar_mainActive .public_Scrollbar_face:after, +.public_Scrollbar_faceActive:after { + background-color: #7d7d7d; +} /** * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -146,39 +188,98 @@ * 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. * - * @providesModule Scrollbar - * + * @providesModule ScrollbarLayout */ -/** - * Scrollbars. - */ +.ScrollbarLayout_main { + box-sizing: border-box; + outline: none; + overflow: hidden; + position: absolute; + -webkit-transition-duration: 250ms; + transition-duration: 250ms; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.ScrollbarLayout_mainVertical { + bottom: 0; + right: 0; + top: 0; + -webkit-transition-property: background-color width; + transition-property: background-color width; + width: 15px; +} + +.ScrollbarLayout_mainVertical.public_Scrollbar_mainActive, +.ScrollbarLayout_mainVertical:hover { + width: 17px; +} + +.ScrollbarLayout_mainHorizontal { + bottom: 0; + height: 15px; + left: 0; + -webkit-transition-property: background-color height; + transition-property: background-color height; +} /* Touching the scroll-track directly makes the scroll-track bolder */ -.public_Scrollbar_main.public_Scrollbar_mainActive, -.public_Scrollbar_main:hover { - background-color: rgba(255, 255, 255, 0.8); +.ScrollbarLayout_mainHorizontal.public_Scrollbar_mainActive, +.ScrollbarLayout_mainHorizontal:hover { + height: 17px; } -.public_Scrollbar_main.public_Scrollbar_mainActive, -.public_Scrollbar_main:hover { - background-color: rgba(255, 255, 255, 0.8); +.ScrollbarLayout_face { + left: 0; + overflow: hidden; + position: absolute; + z-index: 1; } -.public_Scrollbar_mainOpaque, -.public_Scrollbar_mainOpaque.public_Scrollbar_mainActive, -.public_Scrollbar_mainOpaque:hover { - background-color: #fff; +/** + * This selector renders the "nub" of the scrollface. The nub must + * be rendered as pseudo-element so that it won't receive any UI events then + * we can get the correct `event.offsetX` and `event.offsetY` from the + * scrollface element while dragging it. + */ +.ScrollbarLayout_face:after { + border-radius: 6px; + content: ''; + display: block; + position: absolute; + -webkit-transition: background-color 250ms ease; + transition: background-color 250ms ease; } -.public_Scrollbar_face:after { - background-color: #c2c2c2; +.ScrollbarLayout_faceHorizontal { + bottom: 0; + left: 0; + top: 0; } -.public_Scrollbar_main:hover .public_Scrollbar_face:after, -.public_Scrollbar_mainActive .public_Scrollbar_face:after, -.public_Scrollbar_faceActive:after { - background-color: #7d7d7d; +.ScrollbarLayout_faceHorizontal:after { + bottom: 4px; + left: 0; + top: 4px; + width: 100%; +} + +.ScrollbarLayout_faceVertical { + left: 0; + right: 0; + top: 0; +} + +.ScrollbarLayout_faceVertical:after { + height: 100%; + left: 4px; + right: 4px; + top: 0; } /** * Copyright (c) 2015, Facebook, Inc. @@ -411,104 +512,3 @@ body[dir="rtl"] .fixedDataTableColumnResizerLineLayout_main { position: absolute; top: 0; } -/** - * 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. - * - * @providesModule ScrollbarLayout - */ - -.ScrollbarLayout_main { - box-sizing: border-box; - outline: none; - overflow: hidden; - position: absolute; - -webkit-transition-duration: 250ms; - transition-duration: 250ms; - -webkit-transition-timing-function: ease; - transition-timing-function: ease; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.ScrollbarLayout_mainVertical { - bottom: 0; - right: 0; - top: 0; - -webkit-transition-property: background-color width; - transition-property: background-color width; - width: 15px; -} - -.ScrollbarLayout_mainVertical.public_Scrollbar_mainActive, -.ScrollbarLayout_mainVertical:hover { - width: 17px; -} - -.ScrollbarLayout_mainHorizontal { - bottom: 0; - height: 15px; - left: 0; - -webkit-transition-property: background-color height; - transition-property: background-color height; -} - -/* Touching the scroll-track directly makes the scroll-track bolder */ -.ScrollbarLayout_mainHorizontal.public_Scrollbar_mainActive, -.ScrollbarLayout_mainHorizontal:hover { - height: 17px; -} - -.ScrollbarLayout_face { - left: 0; - overflow: hidden; - position: absolute; - z-index: 1; -} - -/** - * This selector renders the "nub" of the scrollface. The nub must - * be rendered as pseudo-element so that it won't receive any UI events then - * we can get the correct `event.offsetX` and `event.offsetY` from the - * scrollface element while dragging it. - */ -.ScrollbarLayout_face:after { - border-radius: 6px; - content: ''; - display: block; - position: absolute; - -webkit-transition: background-color 250ms ease; - transition: background-color 250ms ease; -} - -.ScrollbarLayout_faceHorizontal { - bottom: 0; - left: 0; - top: 0; -} - -.ScrollbarLayout_faceHorizontal:after { - bottom: 4px; - left: 0; - top: 4px; - width: 100%; -} - -.ScrollbarLayout_faceVertical { - left: 0; - right: 0; - top: 0; -} - -.ScrollbarLayout_faceVertical:after { - height: 100%; - left: 4px; - right: 4px; - top: 0; -} diff --git a/dist/fixed-data-table.js b/dist/fixed-data-table.js index ab0e0648..c3b082e4 100644 --- a/dist/fixed-data-table.js +++ b/dist/fixed-data-table.js @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.4.1 + * FixedDataTable v0.4.2 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -18,7 +18,7 @@ exports["FixedDataTable"] = factory(require("react")); else root["FixedDataTable"] = factory(root["React"]); -})(this, function(__WEBPACK_EXTERNAL_MODULE_29__) { +})(this, function(__WEBPACK_EXTERNAL_MODULE_30__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -176,8 +176,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var FixedDataTable = __webpack_require__(26); - var FixedDataTableColumn = __webpack_require__(46); - var FixedDataTableColumnGroup = __webpack_require__(45); + var FixedDataTableColumn = __webpack_require__(32); + var FixedDataTableColumnGroup = __webpack_require__(31); var FixedDataTableRoot = { Column: FixedDataTableColumn, @@ -185,7 +185,7 @@ return /******/ (function(modules) { // webpackBootstrap Table: FixedDataTable }; - FixedDataTableRoot.version = '0.4.1'; + FixedDataTableRoot.version = '0.4.2'; module.exports = FixedDataTableRoot; @@ -211,25 +211,24 @@ return /******/ (function(modules) { // webpackBootstrap var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - var FixedDataTableHelper = __webpack_require__(43); - var React = __webpack_require__(28); - var ReactComponentWithPureRenderMixin = __webpack_require__(47); - var ReactWheelHandler = __webpack_require__(50); - var Scrollbar = __webpack_require__(58); - var FixedDataTableBufferedRows = __webpack_require__(70); - var FixedDataTableColumnResizeHandle = __webpack_require__(85); - var FixedDataTableRow = __webpack_require__(75); - var FixedDataTableScrollHelper = __webpack_require__(86); - var FixedDataTableWidthHelper = __webpack_require__(27); - - var cloneWithProps = __webpack_require__(30); - var cx = __webpack_require__(64); - var debounceCore = __webpack_require__(88); - var emptyFunction = __webpack_require__(51); - var invariant = __webpack_require__(69); - var joinClasses = __webpack_require__(84); - var shallowEqual = __webpack_require__(89); - var translateDOMPositionXY = __webpack_require__(65); + var FixedDataTableHelper = __webpack_require__(27); + var React = __webpack_require__(29); + var ReactComponentWithPureRenderMixin = __webpack_require__(33); + var ReactWheelHandler = __webpack_require__(34); + var Scrollbar = __webpack_require__(42); + var FixedDataTableBufferedRows = __webpack_require__(54); + var FixedDataTableColumnResizeHandle = __webpack_require__(69); + var FixedDataTableRow = __webpack_require__(59); + var FixedDataTableScrollHelper = __webpack_require__(70); + var FixedDataTableWidthHelper = __webpack_require__(72); + + var cx = __webpack_require__(48); + var debounceCore = __webpack_require__(73); + var emptyFunction = __webpack_require__(35); + var invariant = __webpack_require__(53); + var joinClasses = __webpack_require__(68); + var shallowEqual = __webpack_require__(74); + var translateDOMPositionXY = __webpack_require__(49); var PropTypes = React.PropTypes; @@ -949,7 +948,8 @@ return /******/ (function(modules) { // webpackBootstrap totalFixedColumnsWidth += column.props.width; } - var scrollableColumnIndex = this._columnToScrollTo - fixedColumnsCount; + var scrollableColumnIndex = Math.min(this._columnToScrollTo - fixedColumnsCount, columnInfo.bodyScrollableColumns.length - 1); + var previousColumnsWidth = 0; for (i = 0; i < scrollableColumnIndex; ++i) { column = columnInfo.bodyScrollableColumns[i]; @@ -957,7 +957,7 @@ return /******/ (function(modules) { // webpackBootstrap } var availableScrollWidth = props.width - totalFixedColumnsWidth; - var selectedColumnWidth = columnInfo.bodyScrollableColumns[this._columnToScrollTo - fixedColumnsCount].props.width; + var selectedColumnWidth = columnInfo.bodyScrollableColumns[scrollableColumnIndex].props.width; var minAcceptableScrollPosition = previousColumnsWidth + selectedColumnWidth - availableScrollWidth; if (scrollX < minAcceptableScrollPosition) { @@ -1050,7 +1050,7 @@ return /******/ (function(modules) { // webpackBootstrap _createGroupHeaderColumns: function _createGroupHeaderColumns( /*array*/columnGroups) /*array*/{ var newColumnGroups = []; for (var i = 0; i < columnGroups.length; ++i) { - newColumnGroups[i] = cloneWithProps(columnGroups[i], { + newColumnGroups[i] = React.cloneElement(columnGroups[i], { dataKey: i, children: undefined, columnData: columnGroups[i].props.columnGroupData, @@ -1065,7 +1065,7 @@ return /******/ (function(modules) { // webpackBootstrap var headColumns = []; for (var i = 0; i < columns.length; ++i) { var columnProps = columns[i].props; - headColumns.push(cloneWithProps(columns[i], { + headColumns.push(React.cloneElement(columns[i], { cellRenderer: columnProps.headerRenderer || renderToString, columnData: columnProps.columnData, dataKey: columnProps.dataKey, @@ -1080,7 +1080,7 @@ return /******/ (function(modules) { // webpackBootstrap var footColumns = []; for (var i = 0; i < columns.length; ++i) { var columnProps = columns[i].props; - footColumns.push(cloneWithProps(columns[i], { + footColumns.push(React.cloneElement(columns[i], { cellRenderer: columnProps.footerRenderer || renderToString, columnData: columnProps.columnData, dataKey: columnProps.dataKey, @@ -1182,1231 +1182,76 @@ return /******/ (function(modules) { // webpackBootstrap }); this._didScrollStop(); } - }, - - _didScrollStart: function _didScrollStart() { - if (this.isMounted() && !this._isScrolling) { - this._isScrolling = true; - if (this.props.onScrollStart) { - this.props.onScrollStart(this.state.scrollX, this.state.scrollY); - } - } - }, - - _didScrollStop: function _didScrollStop() { - if (this.isMounted() && this._isScrolling) { - this._isScrolling = false; - if (this.props.onScrollEnd) { - this.props.onScrollEnd(this.state.scrollX, this.state.scrollY); - } - } - } - }); - - var HorizontalScrollbar = React.createClass({ - displayName: 'HorizontalScrollbar', - - mixins: [ReactComponentWithPureRenderMixin], - propTypes: { - contentSize: PropTypes.number.isRequired, - offset: PropTypes.number.isRequired, - onScroll: PropTypes.func.isRequired, - position: PropTypes.number.isRequired, - size: PropTypes.number.isRequired - }, - - render: function render() /*object*/{ - var outerContainerStyle = { - height: Scrollbar.SIZE, - width: this.props.size - }; - var innerContainerStyle = { - height: Scrollbar.SIZE, - position: 'absolute', - overflow: 'hidden', - width: this.props.size - }; - translateDOMPositionXY(innerContainerStyle, 0, this.props.offset); - - return React.createElement( - 'div', - { - className: joinClasses(cx('fixedDataTableLayout/horizontalScrollbar'), cx('public/fixedDataTable/horizontalScrollbar')), - style: outerContainerStyle }, - React.createElement( - 'div', - { style: innerContainerStyle }, - React.createElement(Scrollbar, _extends({}, this.props, { - isOpaque: true, - orientation: 'horizontal', - offset: undefined - })) - ) - ); - } - }); - - module.exports = FixedDataTable; - // isColumnResizing should be overwritten by value from props if - // avaialble - -/***/ }, -/* 27 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * 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. - * - * @providesModule FixedDataTableWidthHelper - * @typechecks - */ - - 'use strict'; - - var React = __webpack_require__(28); - - var cloneWithProps = __webpack_require__(30); - - function getTotalWidth( /*array*/columns) /*number*/{ - var totalWidth = 0; - for (var i = 0; i < columns.length; ++i) { - totalWidth += columns[i].props.width; - } - return totalWidth; - } - - function getTotalFlexGrow( /*array*/columns) /*number*/{ - var totalFlexGrow = 0; - for (var i = 0; i < columns.length; ++i) { - totalFlexGrow += columns[i].props.flexGrow || 0; - } - return totalFlexGrow; - } - - function distributeFlexWidth( - /*array*/columns, - /*number*/flexWidth) /*object*/{ - if (flexWidth <= 0) { - return { - columns: columns, - width: getTotalWidth(columns) - }; - } - var remainingFlexGrow = getTotalFlexGrow(columns); - var remainingFlexWidth = flexWidth; - var newColumns = []; - var totalWidth = 0; - for (var i = 0; i < columns.length; ++i) { - var column = columns[i]; - if (!column.props.flexGrow) { - totalWidth += column.props.width; - newColumns.push(column); - continue; - } - var columnFlexWidth = Math.floor(column.props.flexGrow / remainingFlexGrow * remainingFlexWidth); - var newColumnWidth = Math.floor(column.props.width + columnFlexWidth); - totalWidth += newColumnWidth; - - remainingFlexGrow -= column.props.flexGrow; - remainingFlexWidth -= columnFlexWidth; - - newColumns.push(cloneWithProps(column, { width: newColumnWidth })); - } - - return { - columns: newColumns, - width: totalWidth - }; - } - - function adjustColumnGroupWidths( - /*array*/columnGroups, - /*number*/expectedWidth) /*object*/{ - var allColumns = []; - var i; - for (i = 0; i < columnGroups.length; ++i) { - React.Children.forEach(columnGroups[i].props.children, function (column) { - allColumns.push(column); - }); - } - var columnsWidth = getTotalWidth(allColumns); - var remainingFlexGrow = getTotalFlexGrow(allColumns); - var remainingFlexWidth = Math.max(expectedWidth - columnsWidth, 0); - - var newAllColumns = []; - var newColumnGroups = []; - - for (i = 0; i < columnGroups.length; ++i) { - var columnGroup = columnGroups[i]; - var currentColumns = []; - - React.Children.forEach(columnGroup.props.children, function (column) { - currentColumns.push(column); - }); - - var columnGroupFlexGrow = getTotalFlexGrow(currentColumns); - var columnGroupFlexWidth = Math.floor(columnGroupFlexGrow / remainingFlexGrow * remainingFlexWidth); - - var newColumnSettings = distributeFlexWidth(currentColumns, columnGroupFlexWidth); - - remainingFlexGrow -= columnGroupFlexGrow; - remainingFlexWidth -= columnGroupFlexWidth; - - for (var j = 0; j < newColumnSettings.columns.length; ++j) { - newAllColumns.push(newColumnSettings.columns[j]); - } - - newColumnGroups.push(cloneWithProps(columnGroup, { width: newColumnSettings.width })); - } - - return { - columns: newAllColumns, - columnGroups: newColumnGroups - }; - } - - function adjustColumnWidths( - /*array*/columns, - /*number*/expectedWidth) /*array*/{ - var columnsWidth = getTotalWidth(columns); - if (columnsWidth < expectedWidth) { - return distributeFlexWidth(columns, expectedWidth - columnsWidth).columns; - } - return columns; - } - - var FixedDataTableWidthHelper = { - getTotalWidth: getTotalWidth, - getTotalFlexGrow: getTotalFlexGrow, - distributeFlexWidth: distributeFlexWidth, - adjustColumnWidths: adjustColumnWidths, - adjustColumnGroupWidths: adjustColumnGroupWidths - }; - - module.exports = FixedDataTableWidthHelper; - -/***/ }, -/* 28 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * 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. - * - * @providesModule React - */ - - 'use strict'; - - module.exports = __webpack_require__(29); - -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = __WEBPACK_EXTERNAL_MODULE_29__; - -/***/ }, -/* 30 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * 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. - * - * @providesModule cloneWithProps - */ - - 'use strict'; - - module.exports = __webpack_require__(31); - -/***/ }, -/* 31 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-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. - * - * @typechecks static-only - * @providesModule cloneWithProps - */ - - 'use strict'; - - var ReactElement = __webpack_require__(33); - var ReactPropTransferer = __webpack_require__(40); - - var keyOf = __webpack_require__(42); - var warning = __webpack_require__(37); - - var CHILDREN_PROP = keyOf({children: null}); - - /** - * Sometimes you want to change the props of a child passed to you. Usually - * this is to add a CSS class. - * - * @param {ReactElement} child child element you'd like to clone - * @param {object} props props you'd like to modify. className and style will be - * merged automatically. - * @return {ReactElement} a clone of child with props merged in. - */ - function cloneWithProps(child, props) { - if ("production" !== process.env.NODE_ENV) { - ("production" !== process.env.NODE_ENV ? warning( - !child.ref, - 'You are calling cloneWithProps() on a child with a ref. This is ' + - 'dangerous because you\'re creating a new child which will not be ' + - 'added as a ref to its parent.' - ) : null); - } - - var newProps = ReactPropTransferer.mergeProps(props, child.props); - - // Use `child.props.children` if it is provided. - if (!newProps.hasOwnProperty(CHILDREN_PROP) && - child.props.hasOwnProperty(CHILDREN_PROP)) { - newProps.children = child.props.children; - } - - // The current API doesn't retain _owner and _context, which is why this - // doesn't use ReactElement.cloneAndReplaceProps. - return ReactElement.createElement(child.type, newProps); - } - - module.exports = cloneWithProps; - - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(32))) - -/***/ }, -/* 32 */ -/***/ function(module, exports, __webpack_require__) { - - // shim for using process in browser - - var process = module.exports = {}; - var queue = []; - var draining = false; - var currentQueue; - var queueIndex = -1; - - function cleanUpNextTick() { - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } - } - - function drainQueue() { - if (draining) { - return; - } - var timeout = setTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - currentQueue[queueIndex].run(); - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - clearTimeout(timeout); - } - - process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - setTimeout(drainQueue, 0); - } - }; - - // v8 likes predictible objects - function Item(fun, array) { - this.fun = fun; - this.array = array; - } - Item.prototype.run = function () { - this.fun.apply(null, this.array); - }; - process.title = 'browser'; - process.browser = true; - process.env = {}; - process.argv = []; - process.version = ''; // empty string to avoid regexp issues - process.versions = {}; - - function noop() {} - - process.on = noop; - process.addListener = noop; - process.once = noop; - process.off = noop; - process.removeListener = noop; - process.removeAllListeners = noop; - process.emit = noop; - - process.binding = function (name) { - throw new Error('process.binding is not supported'); - }; - - // TODO(shtylman) - process.cwd = function () { return '/' }; - process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); - }; - process.umask = function() { return 0; }; - - -/***/ }, -/* 33 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2014-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. - * - * @providesModule ReactElement - */ - - 'use strict'; - - var ReactContext = __webpack_require__(34); - var ReactCurrentOwner = __webpack_require__(39); - - var assign = __webpack_require__(35); - var warning = __webpack_require__(37); - - var RESERVED_PROPS = { - key: true, - ref: true - }; - - /** - * Warn for mutations. - * - * @internal - * @param {object} object - * @param {string} key - */ - function defineWarningProperty(object, key) { - Object.defineProperty(object, key, { - - configurable: false, - enumerable: true, - - get: function() { - if (!this._store) { - return null; - } - return this._store[key]; - }, - - set: function(value) { - ("production" !== process.env.NODE_ENV ? warning( - false, - 'Don\'t set the %s property of the React element. Instead, ' + - 'specify the correct value when initially creating the element.', - key - ) : null); - this._store[key] = value; - } - - }); - } - - /** - * This is updated to true if the membrane is successfully created. - */ - var useMutationMembrane = false; - - /** - * Warn for mutations. - * - * @internal - * @param {object} element - */ - function defineMutationMembrane(prototype) { - try { - var pseudoFrozenProperties = { - props: true - }; - for (var key in pseudoFrozenProperties) { - defineWarningProperty(prototype, key); - } - useMutationMembrane = true; - } catch (x) { - // IE will fail on defineProperty - } - } - - /** - * Base constructor for all React elements. This is only used to make this - * work with a dynamic instanceof check. Nothing should live on this prototype. - * - * @param {*} type - * @param {string|object} ref - * @param {*} key - * @param {*} props - * @internal - */ - var ReactElement = function(type, key, ref, owner, context, props) { - // Built-in properties that belong on the element - this.type = type; - this.key = key; - this.ref = ref; - - // Record the component responsible for creating this element. - this._owner = owner; - - // TODO: Deprecate withContext, and then the context becomes accessible - // through the owner. - this._context = context; - - if ("production" !== process.env.NODE_ENV) { - // The validation flag and props are currently mutative. We put them on - // an external backing store so that we can freeze the whole object. - // This can be replaced with a WeakMap once they are implemented in - // commonly used development environments. - this._store = {props: props, originalProps: assign({}, props)}; - - // To make comparing ReactElements easier for testing purposes, we make - // the validation flag non-enumerable (where possible, which should - // include every environment we run tests in), so the test framework - // ignores it. - try { - Object.defineProperty(this._store, 'validated', { - configurable: false, - enumerable: false, - writable: true - }); - } catch (x) { - } - this._store.validated = false; - - // We're not allowed to set props directly on the object so we early - // return and rely on the prototype membrane to forward to the backing - // store. - if (useMutationMembrane) { - Object.freeze(this); - return; - } - } - - this.props = props; - }; - - // We intentionally don't expose the function on the constructor property. - // ReactElement should be indistinguishable from a plain object. - ReactElement.prototype = { - _isReactElement: true - }; - - if ("production" !== process.env.NODE_ENV) { - defineMutationMembrane(ReactElement.prototype); - } - - ReactElement.createElement = function(type, config, children) { - var propName; - - // Reserved names are extracted - var props = {}; - - var key = null; - var ref = null; - - if (config != null) { - ref = config.ref === undefined ? null : config.ref; - key = config.key === undefined ? null : '' + config.key; - // Remaining properties are added to a new props object - for (propName in config) { - if (config.hasOwnProperty(propName) && - !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } - } - - // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - var childrenLength = arguments.length - 2; - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - props.children = childArray; - } - - // Resolve default props - if (type && type.defaultProps) { - var defaultProps = type.defaultProps; - for (propName in defaultProps) { - if (typeof props[propName] === 'undefined') { - props[propName] = defaultProps[propName]; - } - } - } - - return new ReactElement( - type, - key, - ref, - ReactCurrentOwner.current, - ReactContext.current, - props - ); - }; - - ReactElement.createFactory = function(type) { - var factory = ReactElement.createElement.bind(null, type); - // Expose the type on the factory and the prototype so that it can be - // easily accessed on elements. E.g. .type === Foo.type. - // This should not be named `constructor` since this may not be the function - // that created the element, and it may not even be a constructor. - // Legacy hook TODO: Warn if this is accessed - factory.type = type; - return factory; - }; - - ReactElement.cloneAndReplaceProps = function(oldElement, newProps) { - var newElement = new ReactElement( - oldElement.type, - oldElement.key, - oldElement.ref, - oldElement._owner, - oldElement._context, - newProps - ); - - if ("production" !== process.env.NODE_ENV) { - // If the key on the original is valid, then the clone is valid - newElement._store.validated = oldElement._store.validated; - } - return newElement; - }; - - ReactElement.cloneElement = function(element, config, children) { - var propName; - - // Original props are copied - var props = assign({}, element.props); - - // Reserved names are extracted - var key = element.key; - var ref = element.ref; - - // Owner will be preserved, unless ref is overridden - var owner = element._owner; - - if (config != null) { - if (config.ref !== undefined) { - // Silently steal the ref from the parent. - ref = config.ref; - owner = ReactCurrentOwner.current; - } - if (config.key !== undefined) { - key = '' + config.key; - } - // Remaining properties override existing props - for (propName in config) { - if (config.hasOwnProperty(propName) && - !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } - } - - // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - var childrenLength = arguments.length - 2; - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - props.children = childArray; - } - - return new ReactElement( - element.type, - key, - ref, - owner, - element._context, - props - ); - }; - - /** - * @param {?object} object - * @return {boolean} True if `object` is a valid component. - * @final - */ - ReactElement.isValidElement = function(object) { - // ReactTestUtils is often used outside of beforeEach where as React is - // within it. This leads to two different instances of React on the same - // page. To identify a element from a different React instance we use - // a flag instead of an instanceof check. - var isElement = !!(object && object._isReactElement); - // if (isElement && !(object instanceof ReactElement)) { - // This is an indicator that you're using multiple versions of React at the - // same time. This will screw with ownership and stuff. Fix it, please. - // TODO: We could possibly warn here. - // } - return isElement; - }; - - module.exports = ReactElement; - - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(32))) - -/***/ }, -/* 34 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-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. - * - * @providesModule ReactContext - */ - - 'use strict'; - - var assign = __webpack_require__(35); - var emptyObject = __webpack_require__(36); - var warning = __webpack_require__(37); - - var didWarn = false; - - /** - * Keeps track of the current context. - * - * The context is automatically passed down the component ownership hierarchy - * and is accessible via `this.context` on ReactCompositeComponents. - */ - var ReactContext = { - - /** - * @internal - * @type {object} - */ - current: emptyObject, - - /** - * Temporarily extends the current context while executing scopedCallback. - * - * A typical use case might look like - * - * render: function() { - * var children = ReactContext.withContext({foo: 'foo'}, () => ( - * - * )); - * return
{children}
; - * } - * - * @param {object} newContext New context to merge into the existing context - * @param {function} scopedCallback Callback to run with the new context - * @return {ReactComponent|array} - */ - withContext: function(newContext, scopedCallback) { - if ("production" !== process.env.NODE_ENV) { - ("production" !== process.env.NODE_ENV ? warning( - didWarn, - 'withContext is deprecated and will be removed in a future version. ' + - 'Use a wrapper component with getChildContext instead.' - ) : null); - - didWarn = true; - } - - var result; - var previousContext = ReactContext.current; - ReactContext.current = assign({}, previousContext, newContext); - try { - result = scopedCallback(); - } finally { - ReactContext.current = previousContext; - } - return result; - } - - }; - - module.exports = ReactContext; - - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(32))) - -/***/ }, -/* 35 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2014-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. - * - * @providesModule Object.assign - */ - - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign - - 'use strict'; - - function assign(target, sources) { - if (target == null) { - throw new TypeError('Object.assign target cannot be null or undefined'); - } - - var to = Object(target); - var hasOwnProperty = Object.prototype.hasOwnProperty; - - for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) { - var nextSource = arguments[nextIndex]; - if (nextSource == null) { - continue; - } - - var from = Object(nextSource); - - // We don't currently support accessors nor proxies. Therefore this - // copy cannot throw. If we ever supported this then we must handle - // exceptions and side-effects. We don't support symbols so they won't - // be transferred. - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - } - - return to; - } - - module.exports = assign; - - -/***/ }, -/* 36 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-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. - * - * @providesModule emptyObject - */ - - "use strict"; - - var emptyObject = {}; - - if ("production" !== process.env.NODE_ENV) { - Object.freeze(emptyObject); - } - - module.exports = emptyObject; - - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(32))) - -/***/ }, -/* 37 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2014-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. - * - * @providesModule warning - */ - - "use strict"; - - var emptyFunction = __webpack_require__(38); - - /** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - - var warning = emptyFunction; - - if ("production" !== process.env.NODE_ENV) { - warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); - if (format === undefined) { - throw new Error( - '`warning(condition, format, ...args)` requires a warning ' + - 'message argument' - ); - } - - if (format.length < 10 || /^[s\W]*$/.test(format)) { - throw new Error( - 'The warning format should be able to uniquely identify this ' + - 'warning. Please, use a more descriptive format than: ' + format - ); - } - - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } - - if (!condition) { - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];}); - console.warn(message); - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch(x) {} - } - }; - } - - module.exports = warning; - - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(32))) - -/***/ }, -/* 38 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-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. - * - * @providesModule emptyFunction - */ - - function makeEmptyFunction(arg) { - return function() { - return arg; - }; - } - - /** - * This function accepts and discards inputs; it has no side effects. This is - * primarily useful idiomatically for overridable function endpoints which - * always need to be callable, since JS lacks a null-call idiom ala Cocoa. - */ - function emptyFunction() {} - - emptyFunction.thatReturns = makeEmptyFunction; - emptyFunction.thatReturnsFalse = makeEmptyFunction(false); - emptyFunction.thatReturnsTrue = makeEmptyFunction(true); - emptyFunction.thatReturnsNull = makeEmptyFunction(null); - emptyFunction.thatReturnsThis = function() { return this; }; - emptyFunction.thatReturnsArgument = function(arg) { return arg; }; - - module.exports = emptyFunction; - - -/***/ }, -/* 39 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-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. - * - * @providesModule ReactCurrentOwner - */ - - 'use strict'; - - /** - * Keeps track of the current owner. - * - * The current owner is the component who should own any components that are - * currently being constructed. - * - * The depth indicate how many composite components are above this render level. - */ - var ReactCurrentOwner = { - - /** - * @internal - * @type {ReactComponent} - */ - current: null - - }; - - module.exports = ReactCurrentOwner; - - -/***/ }, -/* 40 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-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. - * - * @providesModule ReactPropTransferer - */ - - 'use strict'; - - var assign = __webpack_require__(35); - var emptyFunction = __webpack_require__(38); - var joinClasses = __webpack_require__(41); - - /** - * Creates a transfer strategy that will merge prop values using the supplied - * `mergeStrategy`. If a prop was previously unset, this just sets it. - * - * @param {function} mergeStrategy - * @return {function} - */ - function createTransferStrategy(mergeStrategy) { - return function(props, key, value) { - if (!props.hasOwnProperty(key)) { - props[key] = value; - } else { - props[key] = mergeStrategy(props[key], value); - } - }; - } - - var transferStrategyMerge = createTransferStrategy(function(a, b) { - // `merge` overrides the first object's (`props[key]` above) keys using the - // second object's (`value`) keys. An object's style's existing `propA` would - // get overridden. Flip the order here. - return assign({}, b, a); - }); - - /** - * Transfer strategies dictate how props are transferred by `transferPropsTo`. - * NOTE: if you add any more exceptions to this list you should be sure to - * update `cloneWithProps()` accordingly. - */ - var TransferStrategies = { - /** - * Never transfer `children`. - */ - children: emptyFunction, - /** - * Transfer the `className` prop by merging them. - */ - className: createTransferStrategy(joinClasses), - /** - * Transfer the `style` prop (which is an object) by merging them. - */ - style: transferStrategyMerge - }; - - /** - * Mutates the first argument by transferring the properties from the second - * argument. - * - * @param {object} props - * @param {object} newProps - * @return {object} - */ - function transferInto(props, newProps) { - for (var thisKey in newProps) { - if (!newProps.hasOwnProperty(thisKey)) { - continue; - } - - var transferStrategy = TransferStrategies[thisKey]; + }, - if (transferStrategy && TransferStrategies.hasOwnProperty(thisKey)) { - transferStrategy(props, thisKey, newProps[thisKey]); - } else if (!props.hasOwnProperty(thisKey)) { - props[thisKey] = newProps[thisKey]; + _didScrollStart: function _didScrollStart() { + if (this.isMounted() && !this._isScrolling) { + this._isScrolling = true; + if (this.props.onScrollStart) { + this.props.onScrollStart(this.state.scrollX, this.state.scrollY); + } } - } - return props; - } - - /** - * ReactPropTransferer are capable of transferring props to another component - * using a `transferPropsTo` method. - * - * @class ReactPropTransferer - */ - var ReactPropTransferer = { - - /** - * Merge two props objects using TransferStrategies. - * - * @param {object} oldProps original props (they take precedence) - * @param {object} newProps new props to merge in - * @return {object} a new object containing both sets of props merged. - */ - mergeProps: function(oldProps, newProps) { - return transferInto(assign({}, oldProps), newProps); - } - - }; - - module.exports = ReactPropTransferer; - - -/***/ }, -/* 41 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-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. - * - * @providesModule joinClasses - * @typechecks static-only - */ - - 'use strict'; + }, - /** - * Combines multiple className strings into one. - * http://jsperf.com/joinclasses-args-vs-array - * - * @param {...?string} classes - * @return {string} - */ - function joinClasses(className/*, ... */) { - if (!className) { - className = ''; - } - var nextClass; - var argLength = arguments.length; - if (argLength > 1) { - for (var ii = 1; ii < argLength; ii++) { - nextClass = arguments[ii]; - if (nextClass) { - className = (className ? className + ' ' : '') + nextClass; + _didScrollStop: function _didScrollStop() { + if (this.isMounted() && this._isScrolling) { + this._isScrolling = false; + if (this.props.onScrollEnd) { + this.props.onScrollEnd(this.state.scrollX, this.state.scrollY); } } } - return className; - } - - module.exports = joinClasses; + }); + var HorizontalScrollbar = React.createClass({ + displayName: 'HorizontalScrollbar', -/***/ }, -/* 42 */ -/***/ function(module, exports, __webpack_require__) { + mixins: [ReactComponentWithPureRenderMixin], + propTypes: { + contentSize: PropTypes.number.isRequired, + offset: PropTypes.number.isRequired, + onScroll: PropTypes.func.isRequired, + position: PropTypes.number.isRequired, + size: PropTypes.number.isRequired + }, - /** - * Copyright 2013-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. - * - * @providesModule keyOf - */ + render: function render() /*object*/{ + var outerContainerStyle = { + height: Scrollbar.SIZE, + width: this.props.size + }; + var innerContainerStyle = { + height: Scrollbar.SIZE, + position: 'absolute', + overflow: 'hidden', + width: this.props.size + }; + translateDOMPositionXY(innerContainerStyle, 0, this.props.offset); - /** - * Allows extraction of a minified key. Let's the build system minify keys - * without loosing the ability to dynamically use key strings as values - * themselves. Pass in an object with a single key/val pair and it will return - * you the string key of that single record. Suppose you want to grab the - * value for a key 'className' inside of an object. Key/val minification may - * have aliased that key to be 'xa12'. keyOf({className: null}) will return - * 'xa12' in that case. Resolve keys you want to use once at startup time, then - * reuse those resolutions. - */ - var keyOf = function(oneKeyObj) { - var key; - for (key in oneKeyObj) { - if (!oneKeyObj.hasOwnProperty(key)) { - continue; - } - return key; + return React.createElement( + 'div', + { + className: joinClasses(cx('fixedDataTableLayout/horizontalScrollbar'), cx('public/fixedDataTable/horizontalScrollbar')), + style: outerContainerStyle }, + React.createElement( + 'div', + { style: innerContainerStyle }, + React.createElement(Scrollbar, _extends({}, this.props, { + isOpaque: true, + orientation: 'horizontal', + offset: undefined + })) + ) + ); } - return null; - }; - - - module.exports = keyOf; + }); + module.exports = FixedDataTable; + // isColumnResizing should be overwritten by value from props if + // avaialble /***/ }, -/* 43 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { /** @@ -2423,12 +1268,10 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Locale = __webpack_require__(44); - var React = __webpack_require__(28); - var FixedDataTableColumnGroup = __webpack_require__(45); - var FixedDataTableColumn = __webpack_require__(46); - - var cloneWithProps = __webpack_require__(30); + var Locale = __webpack_require__(28); + var React = __webpack_require__(29); + var FixedDataTableColumnGroup = __webpack_require__(31); + var FixedDataTableColumn = __webpack_require__(32); var DIR_SIGN = Locale.isRTL() ? -1 : +1; // A cell up to 5px outside of the visible area will still be considered visible @@ -2492,8 +1335,7 @@ return /******/ (function(modules) { // webpackBootstrap // If the column groups columns have changed clone the group and supply // new children if (haveColumnsChanged) { - newChild = cloneWithProps(originalChild, { - key: originalChild.key, + newChild = React.cloneElement(originalChild, { children: newColumns }); } @@ -2518,7 +1360,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = FixedDataTableHelper; /***/ }, -/* 44 */ +/* 28 */ /***/ function(module, exports, __webpack_require__) { /** @@ -2547,7 +1389,32 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Locale; /***/ }, -/* 45 */ +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * 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. + * + * @providesModule React + */ + + 'use strict'; + + module.exports = __webpack_require__(30); + +/***/ }, +/* 30 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __WEBPACK_EXTERNAL_MODULE_30__; + +/***/ }, +/* 31 */ /***/ function(module, exports, __webpack_require__) { /** @@ -2564,7 +1431,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var React = __webpack_require__(28); + var React = __webpack_require__(29); var PropTypes = React.PropTypes; @@ -2633,7 +1500,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = FixedDataTableColumnGroup; /***/ }, -/* 46 */ +/* 32 */ /***/ function(module, exports, __webpack_require__) { /** @@ -2650,7 +1517,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var React = __webpack_require__(28); + var React = __webpack_require__(29); var PropTypes = React.PropTypes; @@ -2802,115 +1669,43 @@ return /******/ (function(modules) { // webpackBootstrap * Setting this property to true allows the table to not render cells in * particular column that are outside of viewport for visible rows. This * allows to create table with many columns and not have vertical scrolling - * performance drop. - * Setting the property to false will keep previous behaviour and keep - * cell rendered if the row it belongs to is visible. - */ - allowCellsRecycling: PropTypes.bool - }, - - getDefaultProps: function getDefaultProps() /*object*/{ - return { - allowCellsRecycling: false, - fixed: false - }; - }, - - render: function render() { - if (true) { - throw new Error('Component should never render'); - } - return null; - } - }); - - module.exports = FixedDataTableColumn; - -/***/ }, -/* 47 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * 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. - * - * @providesModule ReactComponentWithPureRenderMixin - */ - - 'use strict'; - - module.exports = __webpack_require__(48); - -/***/ }, -/* 48 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-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. - * - * @providesModule ReactComponentWithPureRenderMixin - */ - - 'use strict'; - - var shallowEqual = __webpack_require__(49); - - /** - * If your React component's render function is "pure", e.g. it will render the - * same result given the same props and state, provide this Mixin for a - * considerable performance boost. - * - * Most React components have pure render functions. - * - * Example: - * - * var ReactComponentWithPureRenderMixin = - * require('ReactComponentWithPureRenderMixin'); - * React.createClass({ - * mixins: [ReactComponentWithPureRenderMixin], - * - * render: function() { - * return
foo
; - * } - * }); - * - * Note: This only checks shallow equality for props and state. If these contain - * complex data structures this mixin may have false-negatives for deeper - * differences. Only mixin to components which have simple props and state, or - * use `forceUpdate()` when you know deep data structures have changed. - */ - var ReactComponentWithPureRenderMixin = { - shouldComponentUpdate: function(nextProps, nextState) { - return !shallowEqual(this.props, nextProps) || - !shallowEqual(this.state, nextState); - } - }; + * performance drop. + * Setting the property to false will keep previous behaviour and keep + * cell rendered if the row it belongs to is visible. + */ + allowCellsRecycling: PropTypes.bool + }, - module.exports = ReactComponentWithPureRenderMixin; + getDefaultProps: function getDefaultProps() /*object*/{ + return { + allowCellsRecycling: false, + fixed: false + }; + }, + + render: function render() { + if (true) { + throw new Error('Component should never render'); + } + return null; + } + }); + module.exports = FixedDataTableColumn; /***/ }, -/* 49 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { /** - * Copyright 2013-2015, Facebook, Inc. + * 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. * - * @providesModule shallowEqual + * @providesModule ReactComponentWithPureRenderMixin */ 'use strict'; @@ -2929,8 +1724,7 @@ return /******/ (function(modules) { // webpackBootstrap var key; // Test for A's keys different from B. for (key in objA) { - if (objA.hasOwnProperty(key) && - (!objB.hasOwnProperty(key) || objA[key] !== objB[key])) { + if (objA.hasOwnProperty(key) && (!objB.hasOwnProperty(key) || objA[key] !== objB[key])) { return false; } } @@ -2943,11 +1737,40 @@ return /******/ (function(modules) { // webpackBootstrap return true; } - module.exports = shallowEqual; + /** + * If your React component's render function is "pure", e.g. it will render the + * same result given the same props and state, provide this Mixin for a + * considerable performance boost. + * + * Most React components have pure render functions. + * + * Example: + * + * var ReactComponentWithPureRenderMixin = + * require('ReactComponentWithPureRenderMixin'); + * React.createClass({ + * mixins: [ReactComponentWithPureRenderMixin], + * + * render: function() { + * return
foo
; + * } + * }); + * + * Note: This only checks shallow equality for props and state. If these contain + * complex data structures this mixin may have false-negatives for deeper + * differences. Only mixin to components which have simple props and state, or + * use `forceUpdate()` when you know deep data structures have changed. + */ + var ReactComponentWithPureRenderMixin = { + shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) { + return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState); + } + }; + module.exports = ReactComponentWithPureRenderMixin; /***/ }, -/* 50 */ +/* 34 */ /***/ function(module, exports, __webpack_require__) { /** @@ -2971,9 +1794,9 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var emptyFunction = __webpack_require__(51); - var normalizeWheel = __webpack_require__(52); - var requestAnimationFramePolyfill = __webpack_require__(56); + var emptyFunction = __webpack_require__(35); + var normalizeWheel = __webpack_require__(36); + var requestAnimationFramePolyfill = __webpack_require__(40); var ReactWheelHandler = (function () { /** @@ -3057,7 +1880,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = ReactWheelHandler; /***/ }, -/* 51 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { /** @@ -3100,7 +1923,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = emptyFunction; /***/ }, -/* 52 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { /** @@ -3117,9 +1940,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var UserAgent_DEPRECATED = __webpack_require__(53); + var UserAgent_DEPRECATED = __webpack_require__(37); - var isEventSupported = __webpack_require__(54); + var isEventSupported = __webpack_require__(38); // Reasonable defaults var PIXEL_STEP = 10; @@ -3301,7 +2124,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = normalizeWheel; /***/ }, -/* 53 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { /** @@ -3584,7 +2407,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = UserAgent_DEPRECATED; /***/ }, -/* 54 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { /** @@ -3600,7 +2423,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ExecutionEnvironment = __webpack_require__(55); + var ExecutionEnvironment = __webpack_require__(39); var useHasFeature; if (ExecutionEnvironment.canUseDOM) { @@ -3649,7 +2472,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = isEventSupported; /***/ }, -/* 55 */ +/* 39 */ /***/ function(module, exports, __webpack_require__) { /** @@ -3692,7 +2515,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = ExecutionEnvironment; /***/ }, -/* 56 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -3708,8 +2531,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var emptyFunction = __webpack_require__(51); - var nativeRequestAnimationFrame = __webpack_require__(57); + var emptyFunction = __webpack_require__(35); + var nativeRequestAnimationFrame = __webpack_require__(41); var lastTime = 0; @@ -3733,7 +2556,7 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 57 */ +/* 41 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -3755,7 +2578,7 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 58 */ +/* 42 */ /***/ function(module, exports, __webpack_require__) { /** @@ -3772,16 +2595,16 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var DOMMouseMoveTracker = __webpack_require__(59); - var Keys = __webpack_require__(62); - var React = __webpack_require__(28); - var ReactComponentWithPureRenderMixin = __webpack_require__(47); - var ReactWheelHandler = __webpack_require__(50); + var DOMMouseMoveTracker = __webpack_require__(43); + var Keys = __webpack_require__(46); + var React = __webpack_require__(29); + var ReactComponentWithPureRenderMixin = __webpack_require__(33); + var ReactWheelHandler = __webpack_require__(34); - var cssVar = __webpack_require__(63); - var cx = __webpack_require__(64); - var emptyFunction = __webpack_require__(51); - var translateDOMPositionXY = __webpack_require__(65); + var cssVar = __webpack_require__(47); + var cx = __webpack_require__(48); + var emptyFunction = __webpack_require__(35); + var translateDOMPositionXY = __webpack_require__(49); var PropTypes = React.PropTypes; @@ -3985,7 +2808,7 @@ return /******/ (function(modules) { // webpackBootstrap var faceSize = size * scale; if (faceSize < FACE_SIZE_MIN) { - scale = (size - FACE_SIZE_MIN) / (contentSize - FACE_SIZE_MIN); + scale = (size - FACE_SIZE_MIN) / (contentSize - size); faceSize = FACE_SIZE_MIN; } @@ -4206,7 +3029,7 @@ return /******/ (function(modules) { // webpackBootstrap // pass /***/ }, -/* 59 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4234,10 +3057,10 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var EventListener = __webpack_require__(60); + var EventListener = __webpack_require__(44); - var cancelAnimationFramePolyfill = __webpack_require__(61); - var requestAnimationFramePolyfill = __webpack_require__(56); + var cancelAnimationFramePolyfill = __webpack_require__(45); + var requestAnimationFramePolyfill = __webpack_require__(40); var DOMMouseMoveTracker = (function () { /** @@ -4370,7 +3193,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = DOMMouseMoveTracker; /***/ }, -/* 60 */ +/* 44 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4387,7 +3210,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var emptyFunction = __webpack_require__(51); + var emptyFunction = __webpack_require__(35); /** * Upstream version of event listener. Does not take into account specific @@ -4452,7 +3275,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = EventListener; /***/ }, -/* 61 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -4478,7 +3301,7 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 62 */ +/* 46 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4520,7 +3343,7 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 63 */ +/* 47 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4565,7 +3388,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = cssVar; /***/ }, -/* 64 */ +/* 48 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4624,7 +3447,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = cx; /***/ }, -/* 65 */ +/* 49 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -4641,9 +3464,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var BrowserSupportCore = __webpack_require__(66); + var BrowserSupportCore = __webpack_require__(50); - var getVendorPrefixedName = __webpack_require__(67); + var getVendorPrefixedName = __webpack_require__(51); var TRANSFORM = getVendorPrefixedName('transform'); var BACKFACE_VISIBILITY = getVendorPrefixedName('backfaceVisibility'); @@ -4678,7 +3501,7 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 66 */ +/* 50 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4694,7 +3517,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var getVendorPrefixedName = __webpack_require__(67); + var getVendorPrefixedName = __webpack_require__(51); var BrowserSupportCore = { /** @@ -4729,7 +3552,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = BrowserSupportCore; /***/ }, -/* 67 */ +/* 51 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4746,10 +3569,10 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ExecutionEnvironment = __webpack_require__(55); + var ExecutionEnvironment = __webpack_require__(39); - var camelize = __webpack_require__(68); - var invariant = __webpack_require__(69); + var camelize = __webpack_require__(52); + var invariant = __webpack_require__(53); var memoized = {}; var prefixes = ['Webkit', 'ms', 'Moz', 'O']; @@ -4786,7 +3609,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = getVendorPrefixedName; /***/ }, -/* 68 */ +/* 52 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4823,7 +3646,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = camelize; /***/ }, -/* 69 */ +/* 53 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4877,7 +3700,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = invariant; /***/ }, -/* 70 */ +/* 54 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4894,14 +3717,14 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var React = __webpack_require__(28); - var FixedDataTableRowBuffer = __webpack_require__(71); - var FixedDataTableRow = __webpack_require__(75); + var React = __webpack_require__(29); + var FixedDataTableRowBuffer = __webpack_require__(55); + var FixedDataTableRow = __webpack_require__(59); - var cx = __webpack_require__(64); - var emptyFunction = __webpack_require__(51); - var joinClasses = __webpack_require__(84); - var translateDOMPositionXY = __webpack_require__(65); + var cx = __webpack_require__(48); + var emptyFunction = __webpack_require__(35); + var joinClasses = __webpack_require__(68); + var translateDOMPositionXY = __webpack_require__(49); var PropTypes = React.PropTypes; @@ -5038,7 +3861,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = FixedDataTableBufferedRows; /***/ }, -/* 71 */ +/* 55 */ /***/ function(module, exports, __webpack_require__) { /** @@ -5059,10 +3882,10 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var IntegerBufferSet = __webpack_require__(72); + var IntegerBufferSet = __webpack_require__(56); - var clamp = __webpack_require__(74); - var invariant = __webpack_require__(69); + var clamp = __webpack_require__(58); + var invariant = __webpack_require__(53); var MIN_BUFFER_ROWS = 3; var MAX_BUFFER_ROWS = 6; @@ -5166,7 +3989,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = FixedDataTableRowBuffer; /***/ }, -/* 72 */ +/* 56 */ /***/ function(module, exports, __webpack_require__) { /** @@ -5187,9 +4010,9 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var Heap = __webpack_require__(73); + var Heap = __webpack_require__(57); - var invariant = __webpack_require__(69); + var invariant = __webpack_require__(53); // Data structure that allows to store values and assign positions to them // in a way to minimize changing positions of stored values when new ones are @@ -5351,7 +4174,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = IntegerBufferSet; /***/ }, -/* 73 */ +/* 57 */ /***/ function(module, exports, __webpack_require__) { /** @@ -5534,7 +4357,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Heap; /***/ }, -/* 74 */ +/* 58 */ /***/ function(module, exports, __webpack_require__) { /** @@ -5570,7 +4393,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = clamp; /***/ }, -/* 75 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { /** @@ -5589,13 +4412,13 @@ return /******/ (function(modules) { // webpackBootstrap var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - var React = __webpack_require__(28); - var ReactComponentWithPureRenderMixin = __webpack_require__(47); - var FixedDataTableCellGroup = __webpack_require__(76); + var React = __webpack_require__(29); + var ReactComponentWithPureRenderMixin = __webpack_require__(33); + var FixedDataTableCellGroup = __webpack_require__(60); - var cx = __webpack_require__(64); - var joinClasses = __webpack_require__(84); - var translateDOMPositionXY = __webpack_require__(65); + var cx = __webpack_require__(48); + var joinClasses = __webpack_require__(68); + var translateDOMPositionXY = __webpack_require__(49); var PropTypes = React.PropTypes; @@ -5837,7 +4660,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = FixedDataTableRow; /***/ }, -/* 76 */ +/* 60 */ /***/ function(module, exports, __webpack_require__) { /** @@ -5858,15 +4681,15 @@ return /******/ (function(modules) { // webpackBootstrap function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - var FixedDataTableHelper = __webpack_require__(43); - var ImmutableObject = __webpack_require__(77); - var React = __webpack_require__(28); - var ReactComponentWithPureRenderMixin = __webpack_require__(47); - var FixedDataTableCell = __webpack_require__(83); + var FixedDataTableHelper = __webpack_require__(27); + var ImmutableObject = __webpack_require__(61); + var React = __webpack_require__(29); + var ReactComponentWithPureRenderMixin = __webpack_require__(33); + var FixedDataTableCell = __webpack_require__(67); - var cx = __webpack_require__(64); + var cx = __webpack_require__(48); var renderToString = FixedDataTableHelper.renderToString; - var translateDOMPositionXY = __webpack_require__(65); + var translateDOMPositionXY = __webpack_require__(49); var PropTypes = React.PropTypes; @@ -6072,7 +4895,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = FixedDataTableCellGroup; /***/ }, -/* 77 */ +/* 61 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6097,11 +4920,11 @@ return /******/ (function(modules) { // webpackBootstrap function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - var ImmutableValue = __webpack_require__(78); + var ImmutableValue = __webpack_require__(62); - var invariant = __webpack_require__(69); - var keyOf = __webpack_require__(80); - var mergeHelpers = __webpack_require__(81); + var invariant = __webpack_require__(53); + var keyOf = __webpack_require__(64); + var mergeHelpers = __webpack_require__(65); var checkMergeObjectArgs = mergeHelpers.checkMergeObjectArgs; var isTerminal = mergeHelpers.isTerminal; @@ -6278,7 +5101,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = ImmutableObject; /***/ }, -/* 78 */ +/* 62 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -6303,9 +5126,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var invariant = __webpack_require__(69); - var isNode = __webpack_require__(79); - var keyOf = __webpack_require__(80); + var invariant = __webpack_require__(53); + var isNode = __webpack_require__(63); + var keyOf = __webpack_require__(64); var SECRET_KEY = keyOf({ _DONT_EVER_TYPE_THIS_SECRET_KEY: null }); @@ -6425,7 +5248,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = ImmutableValue; /***/ }, -/* 79 */ +/* 63 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6453,7 +5276,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = isNode; /***/ }, -/* 80 */ +/* 64 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6493,7 +5316,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = keyOf; /***/ }, -/* 81 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6511,8 +5334,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var invariant = __webpack_require__(69); - var keyMirror = __webpack_require__(82); + var invariant = __webpack_require__(53); + var keyMirror = __webpack_require__(66); /** * Maximum number of levels to traverse. Will catch circular structures. @@ -6617,7 +5440,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = mergeHelpers; /***/ }, -/* 82 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6634,7 +5457,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var invariant = __webpack_require__(69); + var invariant = __webpack_require__(53); /** * Constructs an enumeration with keys equal to their value. @@ -6670,7 +5493,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = keyMirror; /***/ }, -/* 83 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6687,13 +5510,12 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var FixedDataTableHelper = __webpack_require__(43); - var ImmutableObject = __webpack_require__(77); - var React = __webpack_require__(28); - var ReactComponentWithPureRenderMixin = __webpack_require__(47); - var cloneWithProps = __webpack_require__(30); - var cx = __webpack_require__(64); - var joinClasses = __webpack_require__(84); + var FixedDataTableHelper = __webpack_require__(27); + var ImmutableObject = __webpack_require__(61); + var React = __webpack_require__(29); + var ReactComponentWithPureRenderMixin = __webpack_require__(33); + var cx = __webpack_require__(48); + var joinClasses = __webpack_require__(68); var DIR_SIGN = FixedDataTableHelper.DIR_SIGN; @@ -6808,9 +5630,8 @@ return /******/ (function(modules) { // webpackBootstrap var contentClass = cx('public/fixedDataTableCell/cellContent'); if (React.isValidElement(content)) { - content = cloneWithProps(content, { - key: content.key, - className: contentClass + content = React.cloneElement(content, { + className: joinClasses(content.props.className, contentClass) }); } else { content = React.createElement( @@ -6875,7 +5696,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = FixedDataTableCell; /***/ }, -/* 84 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6919,7 +5740,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = joinClasses; /***/ }, -/* 85 */ +/* 69 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6940,13 +5761,13 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var DOMMouseMoveTracker = __webpack_require__(59); - var Locale = __webpack_require__(44); - var React = __webpack_require__(28); - var ReactComponentWithPureRenderMixin = __webpack_require__(47); + var DOMMouseMoveTracker = __webpack_require__(43); + var Locale = __webpack_require__(28); + var React = __webpack_require__(29); + var ReactComponentWithPureRenderMixin = __webpack_require__(33); - var clamp = __webpack_require__(74); - var cx = __webpack_require__(64); + var clamp = __webpack_require__(58); + var cx = __webpack_require__(48); var PropTypes = React.PropTypes; @@ -7084,7 +5905,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = FixedDataTableColumnResizeHandle; /***/ }, -/* 86 */ +/* 70 */ /***/ function(module, exports, __webpack_require__) { /** @@ -7105,8 +5926,8 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var PrefixIntervalTree = __webpack_require__(87); - var clamp = __webpack_require__(74); + var PrefixIntervalTree = __webpack_require__(71); + var clamp = __webpack_require__(58); var BUFFER_ROWS = 5; var NO_ROWS_SCROLL_RESULT = { @@ -7389,7 +6210,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = FixedDataTableScrollHelper; /***/ }, -/* 87 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -7411,7 +6232,7 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - var invariant = __webpack_require__(69); + var invariant = __webpack_require__(53); var parent = function parent(node) { return Math.floor(node / 2); @@ -7653,7 +6474,145 @@ return /******/ (function(modules) { // webpackBootstrap /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 88 */ +/* 72 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * 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. + * + * @providesModule FixedDataTableWidthHelper + * @typechecks + */ + + 'use strict'; + + var React = __webpack_require__(29); + + function getTotalWidth( /*array*/columns) /*number*/{ + var totalWidth = 0; + for (var i = 0; i < columns.length; ++i) { + totalWidth += columns[i].props.width; + } + return totalWidth; + } + + function getTotalFlexGrow( /*array*/columns) /*number*/{ + var totalFlexGrow = 0; + for (var i = 0; i < columns.length; ++i) { + totalFlexGrow += columns[i].props.flexGrow || 0; + } + return totalFlexGrow; + } + + function distributeFlexWidth( + /*array*/columns, + /*number*/flexWidth) /*object*/{ + if (flexWidth <= 0) { + return { + columns: columns, + width: getTotalWidth(columns) + }; + } + var remainingFlexGrow = getTotalFlexGrow(columns); + var remainingFlexWidth = flexWidth; + var newColumns = []; + var totalWidth = 0; + for (var i = 0; i < columns.length; ++i) { + var column = columns[i]; + if (!column.props.flexGrow) { + totalWidth += column.props.width; + newColumns.push(column); + continue; + } + var columnFlexWidth = Math.floor(column.props.flexGrow / remainingFlexGrow * remainingFlexWidth); + var newColumnWidth = Math.floor(column.props.width + columnFlexWidth); + totalWidth += newColumnWidth; + + remainingFlexGrow -= column.props.flexGrow; + remainingFlexWidth -= columnFlexWidth; + + newColumns.push(React.cloneElement(column, { width: newColumnWidth })); + } + + return { + columns: newColumns, + width: totalWidth + }; + } + + function adjustColumnGroupWidths( + /*array*/columnGroups, + /*number*/expectedWidth) /*object*/{ + var allColumns = []; + var i; + for (i = 0; i < columnGroups.length; ++i) { + React.Children.forEach(columnGroups[i].props.children, function (column) { + allColumns.push(column); + }); + } + var columnsWidth = getTotalWidth(allColumns); + var remainingFlexGrow = getTotalFlexGrow(allColumns); + var remainingFlexWidth = Math.max(expectedWidth - columnsWidth, 0); + + var newAllColumns = []; + var newColumnGroups = []; + + for (i = 0; i < columnGroups.length; ++i) { + var columnGroup = columnGroups[i]; + var currentColumns = []; + + React.Children.forEach(columnGroup.props.children, function (column) { + currentColumns.push(column); + }); + + var columnGroupFlexGrow = getTotalFlexGrow(currentColumns); + var columnGroupFlexWidth = Math.floor(columnGroupFlexGrow / remainingFlexGrow * remainingFlexWidth); + + var newColumnSettings = distributeFlexWidth(currentColumns, columnGroupFlexWidth); + + remainingFlexGrow -= columnGroupFlexGrow; + remainingFlexWidth -= columnGroupFlexWidth; + + for (var j = 0; j < newColumnSettings.columns.length; ++j) { + newAllColumns.push(newColumnSettings.columns[j]); + } + + newColumnGroups.push(React.cloneElement(columnGroup, { width: newColumnSettings.width })); + } + + return { + columns: newAllColumns, + columnGroups: newColumnGroups + }; + } + + function adjustColumnWidths( + /*array*/columns, + /*number*/expectedWidth) /*array*/{ + var columnsWidth = getTotalWidth(columns); + if (columnsWidth < expectedWidth) { + return distributeFlexWidth(columns, expectedWidth - columnsWidth).columns; + } + return columns; + } + + var FixedDataTableWidthHelper = { + getTotalWidth: getTotalWidth, + getTotalFlexGrow: getTotalFlexGrow, + distributeFlexWidth: distributeFlexWidth, + adjustColumnWidths: adjustColumnWidths, + adjustColumnGroupWidths: adjustColumnGroupWidths + }; + + module.exports = FixedDataTableWidthHelper; + +/***/ }, +/* 73 */ /***/ function(module, exports, __webpack_require__) { /** @@ -7725,7 +6684,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = debounce; /***/ }, -/* 89 */ +/* 74 */ /***/ function(module, exports, __webpack_require__) { /** diff --git a/dist/fixed-data-table.min.css b/dist/fixed-data-table.min.css index 1c6d7da7..fda5fb0d 100644 --- a/dist/fixed-data-table.min.css +++ b/dist/fixed-data-table.min.css @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.4.1 + * FixedDataTable v0.4.2 * * Copyright (c) 2015, Facebook, Inc. * All rights reserved. @@ -9,4 +9,4 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -.public_fixedDataTable_main,.public_fixedDataTable_header,.public_fixedDataTable_hasBottomBorder{border-color:#d3d3d3}.public_fixedDataTable_header .public_fixedDataTableCell_main{font-weight:700}.public_fixedDataTable_header,.public_fixedDataTable_header .public_fixedDataTableCell_main{background-color:#f6f7f8;background-image:-webkit-linear-gradient(#fff,#efefef);background-image:linear-gradient(#fff,#efefef)}.public_fixedDataTable_footer .public_fixedDataTableCell_main{background-color:#f6f7f8;border-color:#d3d3d3}.public_fixedDataTable_topShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAECAYAAABP2FU6AAAAF0lEQVR4AWPUkNeSBhHCjJoK2twgFisAFagCCp3pJlAAAAAASUVORK5CYII=) repeat-x}.public_fixedDataTable_bottomShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAECAYAAABP2FU6AAAAHElEQVQI12MwNjZmZdAT1+Nm0JDWEGZQk1GTBgAWkwIeAEp52AAAAABJRU5ErkJggg==) repeat-x}.public_fixedDataTable_horizontalScrollbar .public_Scrollbar_mainHorizontal{background-color:#fff}.public_fixedDataTableCell_main{background-color:#fff;border-color:#d3d3d3}.public_fixedDataTableCell_highlighted{background-color:#f4f4f4}.public_fixedDataTableCell_cellContent{padding:8px}.public_fixedDataTableCell_columnResizerKnob{background-color:#0284ff}.public_fixedDataTableColumnResizerLine_main{border-color:#0284ff}.public_fixedDataTableRow_main{background-color:#fff}.public_fixedDataTableRow_highlighted,.public_fixedDataTableRow_highlighted .public_fixedDataTableCell_main{background-color:#f6f7f8}.public_fixedDataTableRow_fixedColumnsDivider{border-color:#d3d3d3}.public_fixedDataTableRow_columnsShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAYAAAD5PA/NAAAAFklEQVQIHWPSkNeSBmJhTQVtbiDNCgASagIIuJX8OgAAAABJRU5ErkJggg==) repeat-y}.public_Scrollbar_main.public_Scrollbar_mainActive,.public_Scrollbar_main:hover{background-color:rgba(255,255,255,.8)}.public_Scrollbar_mainOpaque,.public_Scrollbar_mainOpaque.public_Scrollbar_mainActive,.public_Scrollbar_mainOpaque:hover{background-color:#fff}.public_Scrollbar_face:after{background-color:#c2c2c2}.public_Scrollbar_main:hover .public_Scrollbar_face:after,.public_Scrollbar_mainActive .public_Scrollbar_face:after,.public_Scrollbar_faceActive:after{background-color:#7d7d7d}.fixedDataTableCellGroupLayout_cellGroup{-webkit-backface-visibility:hidden;backface-visibility:hidden;left:0;overflow:hidden;position:absolute;top:0;white-space:nowrap}.fixedDataTableCellGroupLayout_cellGroup>.public_fixedDataTableCell_main{display:inline-block;vertical-align:top;white-space:normal}.fixedDataTableCellGroupLayout_cellGroupWrapper{position:absolute;top:0}.fixedDataTableCellLayout_main{border-right-style:solid;border-width:0 1px 0 0;box-sizing:border-box;display:block;overflow:hidden;position:absolute;white-space:normal}.fixedDataTableCellLayout_lastChild{border-width:0 1px 1px 0}.fixedDataTableCellLayout_alignRight{text-align:right}.fixedDataTableCellLayout_alignCenter{text-align:center}.fixedDataTableCellLayout_wrap1{display:table}.fixedDataTableCellLayout_wrap2{display:table-row}.fixedDataTableCellLayout_wrap3{display:table-cell;vertical-align:middle}.fixedDataTableCellLayout_columnResizerContainer{position:absolute;right:0;width:6px;z-index:1}.fixedDataTableCellLayout_columnResizerContainer:hover{cursor:ew-resize}.fixedDataTableCellLayout_columnResizerContainer:hover .fixedDataTableCellLayout_columnResizerKnob{visibility:visible}.fixedDataTableCellLayout_columnResizerKnob{position:absolute;right:0;visibility:hidden;width:4px}.fixedDataTableColumnResizerLineLayout_mouseArea{cursor:ew-resize;position:absolute;right:-5px;width:12px}.fixedDataTableColumnResizerLineLayout_main{border-right-style:solid;border-right-width:1px;box-sizing:border-box;position:absolute;z-index:10}body[dir="rtl"] .fixedDataTableColumnResizerLineLayout_main,.fixedDataTableColumnResizerLineLayout_hiddenElem{display:none!important}.fixedDataTableLayout_main{border-style:solid;border-width:1px;box-sizing:border-box;overflow:hidden;position:relative}.fixedDataTableLayout_header,.fixedDataTableLayout_hasBottomBorder{border-bottom-style:solid;border-bottom-width:1px}.fixedDataTableLayout_footer .public_fixedDataTableCell_main{border-top-style:solid;border-top-width:1px}.fixedDataTableLayout_topShadow,.fixedDataTableLayout_bottomShadow{height:4px;left:0;position:absolute;right:0;z-index:1}.fixedDataTableLayout_bottomShadow{margin-top:-4px}.fixedDataTableLayout_rowsContainer{overflow:hidden;position:relative}.fixedDataTableLayout_horizontalScrollbar{bottom:0;position:absolute}.fixedDataTableRowLayout_main{box-sizing:border-box;overflow:hidden;position:absolute;top:0}.fixedDataTableRowLayout_body{left:0;position:absolute;top:0}.fixedDataTableRowLayout_fixedColumnsDivider{-webkit-backface-visibility:hidden;backface-visibility:hidden;border-left-style:solid;border-left-width:1px;left:0;position:absolute;top:0;width:0}.fixedDataTableRowLayout_columnsShadow{width:4px}.fixedDataTableRowLayout_rowWrapper{position:absolute;top:0}.ScrollbarLayout_main{box-sizing:border-box;outline:none;overflow:hidden;position:absolute;-webkit-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ScrollbarLayout_mainVertical{bottom:0;right:0;top:0;-webkit-transition-property:background-color width;transition-property:background-color width;width:15px}.ScrollbarLayout_mainVertical.public_Scrollbar_mainActive,.ScrollbarLayout_mainVertical:hover{width:17px}.ScrollbarLayout_mainHorizontal{bottom:0;height:15px;left:0;-webkit-transition-property:background-color height;transition-property:background-color height}.ScrollbarLayout_mainHorizontal.public_Scrollbar_mainActive,.ScrollbarLayout_mainHorizontal:hover{height:17px}.ScrollbarLayout_face{left:0;overflow:hidden;position:absolute;z-index:1}.ScrollbarLayout_face:after{border-radius:6px;content:'';display:block;position:absolute;-webkit-transition:background-color 250ms ease;transition:background-color 250ms ease}.ScrollbarLayout_faceHorizontal{bottom:0;left:0;top:0}.ScrollbarLayout_faceHorizontal:after{bottom:4px;left:0;top:4px;width:100%}.ScrollbarLayout_faceVertical{left:0;right:0;top:0}.ScrollbarLayout_faceVertical:after{height:100%;left:4px;right:4px;top:0} \ No newline at end of file +.public_Scrollbar_main.public_Scrollbar_mainActive,.public_Scrollbar_main:hover{background-color:rgba(255,255,255,.8)}.public_Scrollbar_mainOpaque,.public_Scrollbar_mainOpaque.public_Scrollbar_mainActive,.public_Scrollbar_mainOpaque:hover{background-color:#fff}.public_Scrollbar_face:after{background-color:#c2c2c2}.public_Scrollbar_main:hover .public_Scrollbar_face:after,.public_Scrollbar_mainActive .public_Scrollbar_face:after,.public_Scrollbar_faceActive:after{background-color:#7d7d7d}.public_fixedDataTable_main,.public_fixedDataTable_header,.public_fixedDataTable_hasBottomBorder{border-color:#d3d3d3}.public_fixedDataTable_header .public_fixedDataTableCell_main{font-weight:700}.public_fixedDataTable_header,.public_fixedDataTable_header .public_fixedDataTableCell_main{background-color:#f6f7f8;background-image:-webkit-linear-gradient(#fff,#efefef);background-image:linear-gradient(#fff,#efefef)}.public_fixedDataTable_footer .public_fixedDataTableCell_main{background-color:#f6f7f8;border-color:#d3d3d3}.public_fixedDataTable_topShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAECAYAAABP2FU6AAAAF0lEQVR4AWPUkNeSBhHCjJoK2twgFisAFagCCp3pJlAAAAAASUVORK5CYII=) repeat-x}.public_fixedDataTable_bottomShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAECAYAAABP2FU6AAAAHElEQVQI12MwNjZmZdAT1+Nm0JDWEGZQk1GTBgAWkwIeAEp52AAAAABJRU5ErkJggg==) repeat-x}.public_fixedDataTable_horizontalScrollbar .public_Scrollbar_mainHorizontal{background-color:#fff}.public_fixedDataTableCell_main{background-color:#fff;border-color:#d3d3d3}.public_fixedDataTableCell_highlighted{background-color:#f4f4f4}.public_fixedDataTableCell_cellContent{padding:8px}.public_fixedDataTableCell_columnResizerKnob{background-color:#0284ff}.public_fixedDataTableColumnResizerLine_main{border-color:#0284ff}.public_fixedDataTableRow_main{background-color:#fff}.public_fixedDataTableRow_highlighted,.public_fixedDataTableRow_highlighted .public_fixedDataTableCell_main{background-color:#f6f7f8}.public_fixedDataTableRow_fixedColumnsDivider{border-color:#d3d3d3}.public_fixedDataTableRow_columnsShadow{background:0 0 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAYAAAD5PA/NAAAAFklEQVQIHWPSkNeSBmJhTQVtbiDNCgASagIIuJX8OgAAAABJRU5ErkJggg==) repeat-y}.ScrollbarLayout_main{box-sizing:border-box;outline:none;overflow:hidden;position:absolute;-webkit-transition-duration:250ms;transition-duration:250ms;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ScrollbarLayout_mainVertical{bottom:0;right:0;top:0;-webkit-transition-property:background-color width;transition-property:background-color width;width:15px}.ScrollbarLayout_mainVertical.public_Scrollbar_mainActive,.ScrollbarLayout_mainVertical:hover{width:17px}.ScrollbarLayout_mainHorizontal{bottom:0;height:15px;left:0;-webkit-transition-property:background-color height;transition-property:background-color height}.ScrollbarLayout_mainHorizontal.public_Scrollbar_mainActive,.ScrollbarLayout_mainHorizontal:hover{height:17px}.ScrollbarLayout_face{left:0;overflow:hidden;position:absolute;z-index:1}.ScrollbarLayout_face:after{border-radius:6px;content:'';display:block;position:absolute;-webkit-transition:background-color 250ms ease;transition:background-color 250ms ease}.ScrollbarLayout_faceHorizontal{bottom:0;left:0;top:0}.ScrollbarLayout_faceHorizontal:after{bottom:4px;left:0;top:4px;width:100%}.ScrollbarLayout_faceVertical{left:0;right:0;top:0}.ScrollbarLayout_faceVertical:after{height:100%;left:4px;right:4px;top:0}.fixedDataTableCellGroupLayout_cellGroup{-webkit-backface-visibility:hidden;backface-visibility:hidden;left:0;overflow:hidden;position:absolute;top:0;white-space:nowrap}.fixedDataTableCellGroupLayout_cellGroup>.public_fixedDataTableCell_main{display:inline-block;vertical-align:top;white-space:normal}.fixedDataTableCellGroupLayout_cellGroupWrapper{position:absolute;top:0}.fixedDataTableCellLayout_main{border-right-style:solid;border-width:0 1px 0 0;box-sizing:border-box;display:block;overflow:hidden;position:absolute;white-space:normal}.fixedDataTableCellLayout_lastChild{border-width:0 1px 1px 0}.fixedDataTableCellLayout_alignRight{text-align:right}.fixedDataTableCellLayout_alignCenter{text-align:center}.fixedDataTableCellLayout_wrap1{display:table}.fixedDataTableCellLayout_wrap2{display:table-row}.fixedDataTableCellLayout_wrap3{display:table-cell;vertical-align:middle}.fixedDataTableCellLayout_columnResizerContainer{position:absolute;right:0;width:6px;z-index:1}.fixedDataTableCellLayout_columnResizerContainer:hover{cursor:ew-resize}.fixedDataTableCellLayout_columnResizerContainer:hover .fixedDataTableCellLayout_columnResizerKnob{visibility:visible}.fixedDataTableCellLayout_columnResizerKnob{position:absolute;right:0;visibility:hidden;width:4px}.fixedDataTableColumnResizerLineLayout_mouseArea{cursor:ew-resize;position:absolute;right:-5px;width:12px}.fixedDataTableColumnResizerLineLayout_main{border-right-style:solid;border-right-width:1px;box-sizing:border-box;position:absolute;z-index:10}body[dir="rtl"] .fixedDataTableColumnResizerLineLayout_main,.fixedDataTableColumnResizerLineLayout_hiddenElem{display:none!important}.fixedDataTableLayout_main{border-style:solid;border-width:1px;box-sizing:border-box;overflow:hidden;position:relative}.fixedDataTableLayout_header,.fixedDataTableLayout_hasBottomBorder{border-bottom-style:solid;border-bottom-width:1px}.fixedDataTableLayout_footer .public_fixedDataTableCell_main{border-top-style:solid;border-top-width:1px}.fixedDataTableLayout_topShadow,.fixedDataTableLayout_bottomShadow{height:4px;left:0;position:absolute;right:0;z-index:1}.fixedDataTableLayout_bottomShadow{margin-top:-4px}.fixedDataTableLayout_rowsContainer{overflow:hidden;position:relative}.fixedDataTableLayout_horizontalScrollbar{bottom:0;position:absolute}.fixedDataTableRowLayout_main{box-sizing:border-box;overflow:hidden;position:absolute;top:0}.fixedDataTableRowLayout_body{left:0;position:absolute;top:0}.fixedDataTableRowLayout_fixedColumnsDivider{-webkit-backface-visibility:hidden;backface-visibility:hidden;border-left-style:solid;border-left-width:1px;left:0;position:absolute;top:0;width:0}.fixedDataTableRowLayout_columnsShadow{width:4px}.fixedDataTableRowLayout_rowWrapper{position:absolute;top:0} \ No newline at end of file diff --git a/dist/fixed-data-table.min.js b/dist/fixed-data-table.min.js index ba1909c9..b10a5d17 100644 --- a/dist/fixed-data-table.min.js +++ b/dist/fixed-data-table.min.js @@ -1,5 +1,5 @@ /** - * FixedDataTable v0.4.1 + * FixedDataTable v0.4.2 * * 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")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.FixedDataTable=t(require("react")):e.FixedDataTable=t(e.React)}(this,function(e){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(13),o(15),o(17),o(19),o(21),o(23),o(1),o(5),o(7),o(9),o(11),e.exports=o(25)},function(e,t,o){},,,,function(e,t,o){},,function(e,t,o){},,function(e,t,o){},,function(e,t,o){},,function(e,t,o){},,function(e,t,o){},,function(e,t,o){},,function(e,t,o){},,function(e,t,o){},,function(e,t,o){},,function(e,t,o){"use strict";var i=o(26),r=o(46),n=o(45),s={Column:r,ColumnGroup:n,Table:i};s.version="0.4.1",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:w(m("fixedDataTableLayout/header"),m("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*H-t.footerHeight,f=t.useGroupHeader?t.groupHeaderHeight:0,p=f+t.headerHeight;u-=p;var d=0,v=null!=o.maxHeight?p+t.bodyHeight:p+u,g=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:T;var v,g;if(r){var w=p.adjustColumnGroupWidths(o,e.width);v=w.columns,g=w.columnGroups}else v=p.adjustColumnWidths(o,e.width);var y=this._populateColumnsAndColumnData(v,g,t);if(void 0!==this._columnToScrollTo){var x=y.bodyFixedColumns.length;if(this._columnToScrollTo>=x){var R,D,S=0;for(R=0;RR;++R)D=y.bodyScrollableColumns[R],E+=D.props.width;var k=e.width-S,z=y.bodyScrollableColumns[this._columnToScrollTo-x].props.width,O=E+z-k;O>n&&(n=O),n>E&&(n=E)}delete this._columnToScrollTo}var N=void 0===e.height,P=Math.round(N?e.maxHeight:e.height),I=e.footerHeight+e.headerHeight+h+2*H,F=P-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 V=Math.max(0,W-e.width),j=Math.max(0,L-F);n=Math.min(n,V),s=Math.min(s,j),j||(N&&(P=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:V,maxScrollY:j,reservedHeight:I,scrollContentHeight:L,scrollX:n,scrollY:s,bodyHeight:F,height:P,groupHeaderHeight:h,useGroupHeader:r});return t&&(t.headData&&q.headData&&b(t.headData,q.headData)&&(q.headData=t.headData),t.groupHeaderData&&q.groupHeaderData&&b(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))}}),S=n.createClass({displayName:"HorizontalScrollbar",mixins:[s],propTypes:{contentSize:x.number.isRequired,offset:x.number.isRequired,onScroll:x.func.isRequired,position:x.number.isRequired,size:x.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 y(t,0,this.props.offset),n.createElement("div",{className:w(m("fixedDataTableLayout/horizontalScrollbar"),m("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=D},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,l=0;lo?n(e,t-o).columns:e}var l=o(28),u=o(30),h={getTotalWidth:i,getTotalFlexGrow:r,distributeFlexWidth:n,adjustColumnWidths:a,adjustColumnGroupWidths:s};e.exports=h},function(e,t,o){"use strict";e.exports=o(29)},function(t,o,i){t.exports=e},function(e,t,o){"use strict";e.exports=o(31)},function(e,t,o){(function(t){"use strict";function i(e,o){"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?a(!e.ref,"You are calling cloneWithProps() on a child with a ref. This is dangerous because you're creating a new child which will not be added as a ref to its parent."):null);var i=n.mergeProps(o,e.props);return!i.hasOwnProperty(l)&&e.props.hasOwnProperty(l)&&(i.children=e.props.children),r.createElement(e.type,i)}var r=o(33),n=o(40),s=o(42),a=o(37),l=s({children:null});e.exports=i}).call(t,o(32))},function(e,t,o){function i(){h=!1,a.length?u=a.concat(u):c=-1,u.length&&r()}function r(){if(!h){var e=setTimeout(i);h=!0;for(var t=u.length;t;){for(a=u,u=[];++c1)for(var o=1;o1){for(var f=Array(h),p=0;h>p;p++)f[p]=arguments[p+2];r.children=f}if(e&&e.defaultProps){var d=e.defaultProps;for(i in d)"undefined"==typeof r[i]&&(r[i]=d[i])}return new c(e,a,l,s.current,n.current,r)},c.createFactory=function(e){var t=c.createElement.bind(null,e);return t.type=e,t},c.cloneAndReplaceProps=function(e,o){var i=new c(e.type,e.key,e.ref,e._owner,e._context,o);return"production"!==t.env.NODE_ENV&&(i._store.validated=e._store.validated),i},c.cloneElement=function(e,t,o){var i,r=a({},e.props),n=e.key,l=e.ref,h=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,h=s.current),void 0!==t.key&&(n=""+t.key);for(i in t)t.hasOwnProperty(i)&&!u.hasOwnProperty(i)&&(r[i]=t[i])}var f=arguments.length-2;if(1===f)r.children=o;else if(f>1){for(var p=Array(f),d=0;f>d;d++)p[d]=arguments[d+2];r.children=p}return new c(e.type,n,l,h,e._context,r)},c.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},e.exports=c}).call(t,o(32))},function(e,t,o){(function(t){"use strict";var i=o(35),r=o(36),n=o(37),s=!1,a={current:r,withContext:function(e,o){"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?n(s,"withContext is deprecated and will be removed in a future version. Use a wrapper component with getChildContext instead."):null,s=!0);var r,l=a.current;a.current=i({},l,e);try{r=o()}finally{a.current=l}return r}};e.exports=a}).call(t,o(32))},function(e,t,o){"use strict";function i(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var o=Object(e),i=Object.prototype.hasOwnProperty,r=1;ri;i++)o.push(arguments[i]);if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(0!==t.indexOf("Failed Composite propType: ")&&!e){var n=0,s="Warning: "+t.replace(/%s/g,function(){return o[n++]});console.warn(s);try{throw new Error(s)}catch(a){}}}),e.exports=r}).call(t,o(32))},function(e,t,o){function i(e){return function(){return e}}function r(){}r.thatReturns=i,r.thatReturnsFalse=i(!1),r.thatReturnsTrue=i(!0),r.thatReturnsNull=i(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,o){"use strict";var i={current:null};e.exports=i},function(e,t,o){"use strict";function i(e){return function(t,o,i){t.hasOwnProperty(o)?t[o]=e(t[o],i):t[o]=i}}function r(e,t){for(var o in t)if(t.hasOwnProperty(o)){var i=u[o];i&&u.hasOwnProperty(o)?i(e,o,t[o]):e.hasOwnProperty(o)||(e[o]=t[o])}return e}var n=o(35),s=o(38),a=o(41),l=i(function(e,t){return n({},t,e)}),u={children:s,className:i(a),style:l},h={mergeProps:function(e,t){return r(n({},e),t)}};e.exports=h},function(e,t,o){"use strict";function i(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=i},function(e,t,o){var i=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=i},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=h(e,{key:e.key,children:s}))}else e.type===u&&(i=t(e));o.push(i)}),o}var s=o(44),a=o(28),l=o(45),u=o(46),h=o(30),c=s.isRTL()?-1:1,f=5,p={DIR_SIGN:c,CELL_VISIBILITY_TOLERANCE:f,renderToString:i,forEachColumn:r,mapColumns:n};e.exports=p},function(e,t,o){"use strict";var i={isRTL:function(){return!1},getDirection:function(){return"LTR"}};e.exports=i},function(e,t,o){"use strict";var i=o(28),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(28),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,o){"use strict";e.exports=o(48)},function(e,t,o){"use strict";var i=o(49),r={shouldComponentUpdate:function(e,t){return!i(this.props,e)||!i(this.state,t)}};e.exports=r},function(e,t,o){"use strict";function i(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}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(53),n=o(54),s=10,a=40,l=800;i.getEventType=function(){return r.firefox()?"DOMMouseScroll":n("wheel")?"wheel":"mousewheel"},e.exports=i},function(e,t,o){"use strict";function i(){if(!w){w=!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(m=/\b(iPhone|iP[ao]d)/.exec(e),v=/\b(iP[ao]d)/.exec(e),p=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),_=/Mobile/i.exec(e),d=!!/Win64/.exec(e),t){r=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,r&&document&&document.documentMode&&(r=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(e);u=i?parseFloat(i[1])+4:r,n=t[2]?parseFloat(t[2]):NaN,s=t[3]?parseFloat(t[3]):NaN,a=t[4]?parseFloat(t[4]):NaN,a?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),l=t&&t[1]?parseFloat(t[1]):NaN):l=NaN}else r=n=s=l=a=NaN;if(o){if(o[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);h=b?parseFloat(b[1].replace("_",".")):!0}else h=!1;c=!!o[2],f=!!o[3]}else h=c=f=!1}}var r,n,s,a,l,u,h,c,f,p,d,m,v,g,_,w=!1,b={ie:function(){return i()||r},ieCompatibilityMode:function(){return i()||u>r},ie64:function(){return b.ie()&&d},firefox:function(){return i()||n},opera:function(){return i()||s},webkit:function(){return i()||a},safari:function(){return b.webkit()},chrome:function(){return i()||l},windows:function(){return i()||c},osx:function(){return i()||h},linux:function(){return i()||f},iphone:function(){return i()||m},mobile:function(){return i()||m||v||p||_},nativeApp:function(){return i()||g},android:function(){return i()||p},ipad:function(){return i()||v}};e.exports=b},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(55);n.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=i},function(e,t,o){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen,isInWorker:!i};e.exports=r},function(e,t,o){(function(t){"use strict";var i=o(51),r=o(57),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,o){(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(59),r=o(62),n=o(28),s=o(47),a=o(50),l=o(63),u=o(64),h=o(51),c=o(65),f=n.PropTypes,p={position:0,scrollable:!1},d=parseInt(l("scrollbar-face-margin"),10),m=2*d,v=30,g=40,_=null,w=n.createClass({displayName:"Scrollbar",mixins:[s],propTypes:{contentSize:f.number.isRequired,defaultPosition:f.number,isOpaque:f.bool,orientation:f.oneOf(["vertical","horizontal"]),onScroll:f.func,position:f.number,size:f.number.isRequired,trackColor:f.oneOf(["gray"]),zIndex:f.number,verticalTop:f.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:h,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,h=this.props.isOpaque,f=this.props.verticalTop||0,p=u({"ScrollbarLayout/main":!0,"ScrollbarLayout/mainVertical":r,"ScrollbarLayout/mainHorizontal":i,"public/Scrollbar/main":!0,"public/Scrollbar/mainOpaque":h,"public/Scrollbar/mainActive":s}),v=u({"ScrollbarLayout/face":!0,"ScrollbarLayout/faceHorizontal":i,"ScrollbarLayout/faceVertical":r,"public/Scrollbar/faceActive":s,"public/Scrollbar/face":!0}),g=this.state.position*this.state.scale+d;return i?(e={width:o},t={width:a-m},c(t,g,0)):(e={top:f,height:o},t={height:a-m},c(t,0,g)),e.zIndex=this.props.zIndex,"gray"===this.props.trackColor&&(e.backgroundColor=l("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:v, -style:t}))},componentWillMount:function(){var e="horizontal"===this.props.orientation,t=e?this._onWheelX:this._onWheelY;this._wheelHandler=new a(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(),_===this&&(_=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 p;var r=""+e+"_"+t+"_"+o+"_"+i;if(this._stateKey===r)return this._stateForKey;var n="horizontal"===i,s=t/o,a=t*s;v>a&&(s=(t-v)/(o-v),a=v);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!==n.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),n.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(),n.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&&_!==this&&(_&&_._blur(),_=this)},_didScroll:function(){this.props.onScroll(this.state.position)}});w.KEYBOARD_SCROLL_AMOUNT=g,w.SIZE=parseInt(l("scrollbar-size"),10),e.exports=w},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,o){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){return t>e}var n=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=i},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=_?this.props.onColumnResize:null;return g=d||p?d?i.headerClassName:i.footerClassName:i.cellClassName,a.createElement(u,{align:i.align,cellData:s,cellDataKey:f,cellRenderer:l,className:g,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,o){"use strict";function i(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=i},function(e,t,o){"use strict";var i=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=i},function(e,t,o){"use strict";var i=o(69),r=o(82),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(69),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(43),r=o(77),n=o(28),s=o(47),a=o(30),l=o(64),u=o(84),h=i.DIR_SIGN,c=n.PropTypes,f=new r({align:"left",highlighted:!1,isFooterCell:!1,isHeaderCell:!1}),p=n.createClass({displayName:"FixedDataTableCell",mixins:[s],propTypes:{align:c.oneOf(["left","center","right"]),className:c.string,highlighted:c.bool,isFooterCell:c.bool,isHeaderCell:c.bool,width:c.number.isRequired,minWidth:c.number,maxWidth:c.number,height:c.number.isRequired,cellData:c.any,cellDataKey:c.oneOfType([c.string.isRequired,c.number.isRequired]),cellRenderer:c.func.isRequired,columnData:c.any,rowData:c.oneOfType([c.object.isRequired,c.array.isRequired]),rowIndex:c.number.isRequired,onColumnResize:c.func,left:c.number},getDefaultProps:function(){return f},render:function(){var e=this.props,t={height:e.height,width:e.width};1===h?t.left=e.left:t.right=e.left;var o,i=u(l({"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=l("public/fixedDataTableCell/cellContent");o=n.isValidElement(o)?a(o,{key:o.key,className:r}):n.createElement("div",{className:r},o);var s;if(e.onColumnResize){var c={height:e.height};s=n.createElement("div",{className:l("fixedDataTableCellLayout/columnResizerContainer"),style:c,onMouseDown:this._onColumnResizerMouseDown},n.createElement("div",{className:u(l("fixedDataTableCellLayout/columnResizerKnob"),l("public/fixedDataTableCell/columnResizerKnob")),style:c}))}var f={height:e.height,width:e.width};return n.createElement("div",{ -className:i,style:t},s,n.createElement("div",{className:u(l("fixedDataTableCellLayout/wrap1"),l("public/fixedDataTableCell/wrap1")),style:f},n.createElement("div",{className:u(l("fixedDataTableCellLayout/wrap2"),l("public/fixedDataTableCell/wrap2"))},n.createElement("div",{className:u(l("fixedDataTableCellLayout/wrap3"),l("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=p},function(e,t,o){"use strict";function i(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=i},function(e,t,o){"use strict";var i=o(59),r=o(44),n=o(28),s=o(47),a=o(74),l=o(64),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,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=i},function(e,t,o){"use strict";function i(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;ne&&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,n=e.overflowY;(i!==this.props.overflowX||n!==this.props.overflowY)&&(this._wheelHandler=new a(this._onWheel,"hidden"!==i,"hidden"!==n)),this.setState(this._calculateState(e,this.state))},componentDidUpdate:function(){this._reportContentHeight()},render:function(){var e,t=this.state,o=this.props;t.useGroupHeader&&(e=r.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,n=t.maxScrollX>0&&"hidden"!==t.overflowX,s=i>0&&"hidden"!==t.overflowY,a=n?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 n=!1;o.length&&o[0].type.__TableColumnGroup__&&(n=!0);var r,s,a=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),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=n?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(n){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>r&&(r=O),r>k&&(r=k)}delete this._columnToScrollTo}var N=void 0===e.height,P=Math.round(N?e.maxHeight:e.height),I=e.footerHeight+e.headerHeight+h+2*T,F=P-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);r=Math.min(r,j),s=Math.min(s,V),V||(N&&(P=A),F=A-I),this._scrollHelper.setViewportHeight(F);var Y=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:r,scrollY:s,bodyHeight:F,height:P,groupHeaderHeight:h,useGroupHeader:n});return t&&(t.headData&&Y.headData&&w(t.headData,Y.headData)&&(Y.headData=t.headData),t.groupHeaderData&&Y.groupHeaderData&&w(t.groupHeaderData,Y.groupHeaderData)&&(Y.groupHeaderData=t.groupHeaderData)),Y},_createGroupHeaderColumns:function(e){for(var t=[],o=0;oMath.abs(e)&&"hidden"!==this.props.overflowY){var i=this._scrollHelper.scrollBy(Math.round(t)),n=Math.max(0,i.contentHeight-this.state.bodyHeight);this.setState({firstRowIndex:i.index,firstRowOffset:i.offset,scrollY:i.position,scrollContentHeight:i.contentHeight,maxScrollY:n})}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=r.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),r.createElement("div",{className:g(d("fixedDataTableLayout/horizontalScrollbar"),d("public/fixedDataTable/horizontalScrollbar")),style:e},r.createElement("div",{style:t},r.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 n(e,t){a.Children.forEach(e,function(e){e.type===l?n(e.props.children,t):e.type===u&&t(e)})}function r(e,t){var o=[];return a.Children.forEach(e,function(e){var i=e;if(e.type===l){var r=!1,s=[];n(e.props.children,function(e){var o=t(e);o!==e&&(r=!0),s.push(o)}),r&&(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:n,mapColumns:r};e.exports=f},function(e,t,o){"use strict";var i={isRTL:function(){return!1},getDirection:function(){return"LTR"}};e.exports=i},function(e,t,o){"use strict";e.exports=o(30)},function(t,o,i){t.exports=e},function(e,t,o){"use strict";var i=o(29),n=i.PropTypes,r=i.createClass({displayName:"FixedDataTableColumnGroup",statics:{__TableColumnGroup__:!0},propTypes:{align:n.oneOf(["left","center","right"]),fixed:n.bool,columnGroupData:n.object,label:n.string,groupHeaderRenderer:n.func},getDefaultProps:function(){return{fixed:!1}},render:function(){throw new Error("Component should never render")}});e.exports=r},function(e,t,o){"use strict";var i=o(29),n=i.PropTypes,r=i.createClass({displayName:"FixedDataTableColumn",statics:{__TableColumn__:!0},propTypes:{align:n.oneOf(["left","center","right"]),headerClassName:n.string,footerClassName:n.string,cellClassName:n.string,cellRenderer:n.func,cellDataGetter:n.func,dataKey:n.oneOfType([n.string,n.number]).isRequired,fixed:n.bool,headerRenderer:n.func,footerRenderer:n.func,columnData:n.object,label:n.string,width:n.number.isRequired,minWidth:n.number,maxWidth:n.number,flexGrow:n.number,isResizable:n.bool,allowCellsRecycling:n.bool},getDefaultProps:function(){return{allowCellsRecycling:!1,fixed:!1}},render:function(){throw new Error("Component should never render")}});e.exports=r},function(e,t,o){"use strict";function i(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!i(this.props,e)||!i(this.state,t)}};e.exports=n},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 n=function(){function e(e,t){for(var o=0;oi?-1:1),n&&!o&&(o=1>n?-1:1),{spinX:t,spinY:o,pixelX:i,pixelY:n}}var n=o(37),r=o(38),s=10,a=40,l=800;i.getEventType=function(){return n.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=i},function(e,t,o){"use strict";function i(){if(!w){w=!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(m=/\b(iPhone|iP[ao]d)/.exec(e),v=/\b(iP[ao]d)/.exec(e),p=/Android/i.exec(e),_=/FBAN\/\w+;/i.exec(e),g=/Mobile/i.exec(e),d=!!/Win64/.exec(e),t){n=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,n&&document&&document.documentMode&&(n=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(e);u=i?parseFloat(i[1])+4:n,r=t[2]?parseFloat(t[2]):NaN,s=t[3]?parseFloat(t[3]):NaN,a=t[4]?parseFloat(t[4]):NaN,a?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),l=t&&t[1]?parseFloat(t[1]):NaN):l=NaN}else n=r=s=l=a=NaN;if(o){if(o[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);h=b?parseFloat(b[1].replace("_",".")):!0}else h=!1;c=!!o[2],f=!!o[3]}else h=c=f=!1}}var n,r,s,a,l,u,h,c,f,p,d,m,v,_,g,w=!1,b={ie:function(){return i()||n},ieCompatibilityMode:function(){return i()||u>n},ie64:function(){return b.ie()&&d},firefox:function(){return i()||r},opera:function(){return i()||s},webkit:function(){return i()||a},safari:function(){return b.webkit()},chrome:function(){return i()||l},windows:function(){return i()||c},osx:function(){return i()||h},linux:function(){return i()||f},iphone:function(){return i()||m},mobile:function(){return i()||m||v||p||g},nativeApp:function(){return i()||_},android:function(){return i()||p},ipad:function(){return i()||v}};e.exports=b},function(e,t,o){"use strict";function i(e,t){if(!r.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&&n&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var n,r=o(39);r.canUseDOM&&(n=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=i},function(e,t,o){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen,isInWorker:!i};e.exports=n},function(e,t,o){(function(t){"use strict";var i=o(35),n=o(41),r=0,s=n||function(e){var o=Date.now(),i=Math.max(0,16-(o-r));return r=o+i,t.setTimeout(function(){e(Date.now())},i)};s(i),e.exports=s}).call(t,function(){return this}())},function(e,t,o){(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),n=o(46),r=o(29),s=o(33),a=o(34),l=o(47),u=o(48),h=o(35),c=o(49),f=r.PropTypes,p={position:0,scrollable:!1},d=parseInt(l("scrollbar-face-margin"),10),m=2*d,v=30,_=40,g=null,w=r.createClass({displayName:"Scrollbar",mixins:[s],propTypes:{contentSize:f.number.isRequired,defaultPosition:f.number,isOpaque:f.bool,orientation:f.oneOf(["vertical","horizontal"]),onScroll:f.func,position:f.number,size:f.number.isRequired,trackColor:f.oneOf(["gray"]),zIndex:f.number,verticalTop:f.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:h,orientation:"vertical",zIndex:99}},render:function(){if(!this.state.scrollable)return null;var e,t,o=this.props.size,i=this.state.isHorizontal,n=!i,s=this.state.focused||this.state.isDragging,a=this.state.faceSize,h=this.props.isOpaque,f=this.props.verticalTop||0,p=u({"ScrollbarLayout/main":!0,"ScrollbarLayout/mainVertical":n,"ScrollbarLayout/mainHorizontal":i,"public/Scrollbar/main":!0,"public/Scrollbar/mainOpaque":h,"public/Scrollbar/mainActive":s}),v=u({"ScrollbarLayout/face":!0,"ScrollbarLayout/faceHorizontal":i,"ScrollbarLayout/faceVertical":n,"public/Scrollbar/faceActive":s,"public/Scrollbar/face":!0}),_=this.state.position*this.state.scale+d;return i?(e={width:o},t={width:a-m},c(t,_,0)):(e={top:f,height:o},t={height:a-m},c(t,0,_)),e.zIndex=this.props.zIndex,"gray"===this.props.trackColor&&(e.backgroundColor=l("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:v,style:t}))},componentWillMount:function(){var e="horizontal"===this.props.orientation,t=e?this._onWheelX:this._onWheelY;this._wheelHandler=new a(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(),g===this&&(g=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 p;var n=""+e+"_"+t+"_"+o+"_"+i;if(this._stateKey===n)return this._stateForKey;var r="horizontal"===i,s=t/o,a=t*s;v>a&&(s=(t-v)/(o-t),a=v);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:r,position:e,scale:s,scrollable:l};return this._stateKey=n,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!==r.findDOMNode(this.refs.face)){var o=e.nativeEvent,i=this.state.isHorizontal?o.offsetX||o.layerX:o.offsetY||o.layerY,n=this.props;i/=this.state.scale,t=this._calculateState(i-.5*this.state.faceSize/this.state.scale,n.size,n.contentSize,n.orientation)}else t={};t.focused=!0,this._setNextState(t),this._mouseMoveTracker.captureMouseMoves(e),r.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!==n.TAB){var o=_,i=0;if(this.state.isHorizontal)switch(t){case n.HOME:i=-1,o=this.props.contentSize;break;case n.LEFT:i=-1;break;case n.RIGHT:i=1;break;default:return}if(!this.state.isHorizontal)switch(t){case n.SPACE:i=e.shiftKey?-1:1;break;case n.HOME:i=-1,o=this.props.contentSize;break;case n.UP:i=-1;break;case n.DOWN:i=1;break;case n.PAGE_UP:i=-1,o=this.props.size;break;case n.PAGE_DOWN:i=1,o=this.props.size;break;default:return}e.preventDefault();var r=this.props;this._setNextState(this._calculateState(this.state.position+o*i,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(),r.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 n=i?this._didScroll:void 0;this.setState(e,n)}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&&g!==this&&(g&&g._blur(),g=this)},_didScroll:function(){this.props.onScroll(this.state.position)}});w.KEYBOARD_SCROLL_AMOUNT=_,w.SIZE=parseInt(l("scrollbar-size"),10),e.exports=w},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 n=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,n=e,r=Math.min(e+this._maxVisibleRowCount,this._rowsCount);for(this._viewportRowsBegin=e;r>n||i=r&&(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 n=function(){function e(e,t){for(var o=0;o=e&&t>=n)return null;var r;e-i>n-t?(r=i,this._smallValues.pop()):(r=n,this._largeValues.pop());var a=this._valueToPositionMap[r];return delete this._valueToPositionMap[r],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,o){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(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),n=-1;if(ot?e:t>o?o:t}e.exports=i},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 n.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=n.createClass({displayName:"FixedDataTableRow",mixins:[r],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),n.createElement("div",{style:e,className:a("fixedDataTableRowLayout/rowWrapper")},n.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 n=Object.assign||function(e){for(var t=1;tn;n++){var s=t[n].props;if(!s.allowCellsRecycling||i-e.left<=e.width&&i-e.left+s.width>=0){var l="cell_"+n;o[n]=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,n,r){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:r,maxWidth:i.maxWidth,minWidth:i.minWidth,onColumnResize:w,rowData:e,rowIndex:t,width:i.width,left:n})},_getColumnsWidth:function(e){for(var t=0,o=0;oi;i++)r(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,o){"use strict";function i(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=i},function(e,t,o){"use strict";var i=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=i},function(e,t,o){"use strict";var i=o(53),n=o(66),r=36,s=function(e){return"object"!=typeof e||e instanceof Date||null===e},a={MAX_MERGE_DEPTH:r,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(r>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:n({Clobber:!0,IndexByIndex:!0})};e.exports=a},function(e,t,o){"use strict";var i=o(53),n=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=n},function(e,t,o){"use strict";var i=o(27),n=o(61),r=o(29),s=o(33),a=o(48),l=o(68),u=i.DIR_SIGN,h=r.PropTypes,c=new n({align:"left",highlighted:!1,isFooterCell:!1,isHeaderCell:!1}),f=r.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 n=a("public/fixedDataTableCell/cellContent");o=r.isValidElement(o)?r.cloneElement(o,{className:l(o.props.className,n)}):r.createElement("div",{className:n},o);var s;if(e.onColumnResize){var h={height:e.height};s=r.createElement("div",{className:a("fixedDataTableCellLayout/columnResizerContainer"),style:h,onMouseDown:this._onColumnResizerMouseDown},r.createElement("div",{className:l(a("fixedDataTableCellLayout/columnResizerKnob"),a("public/fixedDataTableCell/columnResizerKnob")),style:h}))}var c={height:e.height,width:e.width};return r.createElement("div",{className:i,style:t},s,r.createElement("div",{className:l(a("fixedDataTableCellLayout/wrap1"),a("public/fixedDataTableCell/wrap1")),style:c},r.createElement("div",{className:l(a("fixedDataTableCellLayout/wrap2"),a("public/fixedDataTableCell/wrap2"))},r.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,o){"use strict";function i(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=i},function(e,t,o){"use strict";var i=o(43),n=o(28),r=o(29),s=o(33),a=o(58),l=o(48),u=r.PropTypes,h=r.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 n.isRTL()?e.right=this.props.leftOffset:e.left=this.props.leftOffset,r.createElement("div",{className:l({"fixedDataTableColumnResizerLineLayout/main":!0,"fixedDataTableColumnResizerLineLayout/hiddenElem":!this.props.visible,"public/fixedDataTableColumnResizerLine/main":!0}),style:e},r.createElement("div",{className:l("fixedDataTableColumnResizerLineLayout/mouseArea"),style:{height:this.props.height}}))},_onMove:function(e){n.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 n=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=n,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 n(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,n=this._position,r=this._updateRowHeight(i);0!==o&&(n+=r);var a=this._storedHeights[i]-(n-o);if(e>=0)for(;e>0&&ie?(n+=e,e=0):(e-=a,n+=a,i++),ie){e=-e;for(var u=this._storedHeights[i]-a;e>0&&i>=0;)if(u>e?(n-=e,e=0):(n-=u,e-=u,i--),i>=0){var h=this._updateRowHeight(i);u=this._storedHeights[i],n+=h}}var c=this._contentHeight-this._viewportHeight;n=s(0,n,c),this._position=n;var f=this._rowOffsets.greatestLowerBound(n);f=s(0,f,Math.max(this._rowCount-1,0)),o=this._rowOffsets.sumUntil(f);var p=o-n;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),n=i-e;return this._updateHeightsInViewport(o,n),this._updateHeightsAboveViewport(o),{index:o,offset:n,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 r=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=n(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 r(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=[],n=t-1;n>=0;--n)i[n]=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=n(e),r=t,s=[],a=0,u=0;uo?r(e,t-o).columns:e}var l=o(29),u={getTotalWidth:i,getTotalFlexGrow:n,distributeFlexWidth:r,adjustColumnWidths:a,adjustColumnGroupWidths:s};e.exports=u},function(e,t,o){"use strict";function i(e,t,o,i,n){function r(){for(var n=arguments.length,a=Array(n),l=0;n>l;l++)a[l]=arguments[l];r.reset();var u=function(){e.apply(o,a)};u.__SMmeta=e.__SMmeta,s=i(u,t)}i=i||setTimeout,n=n||clearTimeout;var s;return r.reset=function(){n(s)},r}e.exports=i},function(e,t,o){"use strict";function i(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 n=Object.prototype.hasOwnProperty.bind(t),r=0;r