Skip to content

Instantly share code, notes, and snippets.

Created May 31, 2016 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/817593a61460f7e1f2793bce4162e188 to your computer and use it in GitHub Desktop.
Save anonymous/817593a61460f7e1f2793bce4162e188 to your computer and use it in GitHub Desktop.
main.js bundled for systemjs
...
System.registerDynamic("vendor/react-dom/index.js", ["react/lib/ReactDOM"], !0, function(a, b, c) {
"use strict";
return c.exports = a("react/lib/ReactDOM"),
c.exports
}),
function() {
var a = System.amdDefine;
!function(b, c) {
"object" == typeof exports && "object" == typeof module ? module.exports = c(require("react"), require("react-dom")) : "function" == typeof a && a.amd ? a("vendor/react-data-grid/dist/react-data-grid.min.js", ["react", "react-dom"], c) : "object" == typeof exports ? exports.ReactDataGrid = c(require("react"), require("react-dom")) : b.ReactDataGrid = c(b.React, b.ReactDOM)
}(this, function(a, b) {
return function(a) {
function b(d) {
if (c[d])
return c[d].exports;
var e = c[d] = {
exports: {},
id: d,
loaded: !1
};
return a[d].call(e.exports, e, e.exports, b),
e.loaded = !0,
e.exports
}
var c = {};
return b.m = a,
b.c = c,
b.p = "",
b(0)
}([function(a, b, c) {
"use strict";
var d = c(1)
, e = c(87)
, f = c(88);
a.exports = d,
a.exports.Row = e,
a.exports.Cell = f
}
, function(a, b, c) {
"use strict";
function d(a, b, c) {
return b in a ? Object.defineProperty(a, b, {
value: c,
enumerable: !0,
configurable: !0,
writable: !0
}) : a[b] = c,
a
}
var e = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, f = c(2)
, g = c(3)
, h = c(4)
, i = (c(87),
c(15),
c(90))
, j = c(99)
, k = c(97)
, l = c(100)
, m = c(102)
, n = c(10);
Object.assign || (Object.assign = c(101));
var o = f.createClass({
displayName: "ReactDataGrid",
mixins: [l, k.MetricsComputatorMixin, i],
propTypes: {
rowHeight: f.PropTypes.number.isRequired,
headerRowHeight: f.PropTypes.number,
minHeight: f.PropTypes.number.isRequired,
minWidth: f.PropTypes.number,
enableRowSelect: f.PropTypes.oneOfType([f.PropTypes.bool, f.PropTypes.string]),
onRowUpdated: f.PropTypes.func,
rowGetter: f.PropTypes.func.isRequired,
rowsCount: f.PropTypes.number.isRequired,
toolbar: f.PropTypes.element,
enableCellSelect: f.PropTypes.bool,
columns: f.PropTypes.oneOfType([f.PropTypes.object, f.PropTypes.array]).isRequired,
onFilter: f.PropTypes.func,
onCellCopyPaste: f.PropTypes.func,
onCellsDragged: f.PropTypes.func,
onAddFilter: f.PropTypes.func,
onGridSort: f.PropTypes.func,
onDragHandleDoubleClick: f.PropTypes.func,
onGridRowsUpdated: f.PropTypes.func,
onRowSelect: f.PropTypes.func,
rowKey: f.PropTypes.string,
rowScrollTimeout: f.PropTypes.number,
onClearFilters: f.PropTypes.func,
contextMenu: f.PropTypes.element,
cellNavigationMode: f.PropTypes.oneOf(["none", "loopOverRow", "changeRow"]),
onCellSelected: f.PropTypes.func,
onCellDeSelected: f.PropTypes.func
},
getDefaultProps: function() {
return {
enableCellSelect: !1,
tabIndex: -1,
rowHeight: 35,
enableRowSelect: !1,
minHeight: 350,
rowKey: "id",
rowScrollTimeout: 0,
cellNavigationMode: "none"
}
},
getInitialState: function() {
var a = this.createColumnMetrics()
, b = {
columnMetrics: a,
selectedRows: [],
copied: null ,
expandedRows: [],
canFilter: !1,
columnFilters: {},
sortDirection: null ,
sortColumn: null ,
dragged: null ,
scrollOffset: 0
};
return this.props.enableCellSelect ? b.selected = {
rowIdx: 0,
idx: 0
} : b.selected = {
rowIdx: -1,
idx: -1
},
b
},
hasSelectedCellChanged: function(a) {
var b = Object.assign({}, this.state.selected);
return b.rowIdx !== a.rowIdx || b.idx !== a.idx || b.active === !1
},
onContextMenuHide: function() {
document.removeEventListener("click", this.onContextMenuHide);
var a = Object.assign({}, this.state.selected, {
contextMenuDisplayed: !1
});
this.setState({
selected: a
})
},
onColumnEvent: function(a, b) {
var c = b.idx
, d = b.name;
if (d && "undefined" != typeof c) {
var e = this.getColumn(c);
if (e && e.events && e.events[d] && "function" == typeof e.events[d]) {
var f = {
rowIdx: b.rowIdx,
idx: c,
column: e
};
e.events[d](a, f)
}
}
},
onSelect: function(a) {
var b = this;
if (this.state.selected.rowIdx !== a.rowIdx || this.state.selected.idx !== a.idx || this.state.selected.active === !1) {
var c = a.idx
, d = a.rowIdx;
c >= 0 && d >= 0 && c < n.getSize(this.state.columnMetrics.columns) && d < this.props.rowsCount && !function() {
var c = b.state.selected;
b.setState({
selected: a
}, function() {
"function" == typeof b.props.onCellDeSelected && b.props.onCellDeSelected(c),
"function" == typeof b.props.onCellSelected && b.props.onCellSelected(a)
})
}()
}
},
onCellClick: function(a) {
this.onSelect({
rowIdx: a.rowIdx,
idx: a.idx
})
},
onCellContextMenu: function(a) {
this.onSelect({
rowIdx: a.rowIdx,
idx: a.idx,
contextMenuDisplayed: this.props.contextMenu
}),
this.props.contextMenu && document.addEventListener("click", this.onContextMenuHide)
},
onCellDoubleClick: function(a) {
this.onSelect({
rowIdx: a.rowIdx,
idx: a.idx
}),
this.setActive("Enter")
},
onViewportDoubleClick: function() {
this.setActive()
},
onPressArrowUp: function(a) {
this.moveSelectedCell(a, -1, 0)
},
onPressArrowDown: function(a) {
this.moveSelectedCell(a, 1, 0)
},
onPressArrowLeft: function(a) {
this.moveSelectedCell(a, 0, -1)
},
onPressArrowRight: function(a) {
this.moveSelectedCell(a, 0, 1)
},
onPressTab: function(a) {
this.moveSelectedCell(a, 0, a.shiftKey ? -1 : 1)
},
onPressEnter: function(a) {
this.setActive(a.key)
},
onPressDelete: function(a) {
this.setActive(a.key)
},
onPressEscape: function(a) {
this.setInactive(a.key)
},
onPressBackspace: function(a) {
this.setActive(a.key)
},
onPressChar: function(a) {
this.isKeyPrintable(a.keyCode) && this.setActive(a.keyCode)
},
onPressKeyWithCtrl: function(a) {
var b = {
KeyCode_c: 99,
KeyCode_C: 67,
KeyCode_V: 86,
KeyCode_v: 118
}
, c = this.state.selected.rowIdx
, d = this.props.rowGetter(c)
, e = this.state.selected.idx
, f = this.getColumn(e);
if (n.canEdit(f, d, this.props.enableCellSelect))
if (a.keyCode === b.KeyCode_c || a.keyCode === b.KeyCode_C) {
var g = this.getSelectedValue();
this.handleCopy({
value: g
})
} else
a.keyCode !== b.KeyCode_v && a.keyCode !== b.KeyCode_V || this.handlePaste()
},
onCellCommit: function(a) {
var b = Object.assign({}, this.state.selected);
b.active = !1,
"Tab" === a.key && (b.idx += 1);
var c = this.state.expandedRows;
this.setState({
selected: b,
expandedRows: c
}),
this.props.onRowUpdated && this.props.onRowUpdated(a);
var d = a.rowIdx;
this.props.onGridRowsUpdated && this.props.onGridRowsUpdated({
cellKey: a.cellKey,
fromRow: d,
toRow: d,
updated: a.updated,
action: "cellUpdate"
})
},
onDragStart: function(a) {
var b = this.getSelectedValue();
this.handleDragStart({
idx: this.state.selected.idx,
rowIdx: this.state.selected.rowIdx,
value: b
}),
a && a.dataTransfer && a.dataTransfer.setData && (a.dataTransfer.dropEffect = "move",
a.dataTransfer.effectAllowed = "move",
a.dataTransfer.setData("text/plain", "dummy"))
},
onToggleFilter: function() {
var a = this;
this.setState({
canFilter: !this.state.canFilter
}, function() {
a.state.canFilter === !1 && a.props.onClearFilters && a.props.onClearFilters()
})
},
onDragHandleDoubleClick: function(a) {
if (this.props.onDragHandleDoubleClick && this.props.onDragHandleDoubleClick(a),
this.props.onGridRowsUpdated) {
var b = this.getColumn(a.idx).key
, c = d({}, b, a.rowData[b]);
this.props.onGridRowsUpdated({
cellKey: b,
fromRow: a.rowIdx,
toRow: this.props.rowsCount - 1,
updated: c,
action: "columnFill"
})
}
},
handleDragStart: function(a) {
if (this.dragEnabled()) {
var b = a.idx
, c = a.rowIdx;
b >= 0 && c >= 0 && b < this.getSize() && c < this.props.rowsCount && this.setState({
dragged: a
})
}
},
handleDragEnd: function() {
if (this.dragEnabled()) {
var a = void 0
, b = void 0
, c = this.state.selected
, e = this.state.dragged
, f = this.getColumn(this.state.selected.idx).key;
if (a = c.rowIdx < e.overRowIdx ? c.rowIdx : e.overRowIdx,
b = c.rowIdx > e.overRowIdx ? c.rowIdx : e.overRowIdx,
this.props.onCellsDragged && this.props.onCellsDragged({
cellKey: f,
fromRow: a,
toRow: b,
value: e.value
}),
this.props.onGridRowsUpdated) {
var g = d({}, f, e.value);
this.props.onGridRowsUpdated({
cellKey: f,
fromRow: a,
toRow: b,
updated: g,
action: "cellDrag"
})
}
this.setState({
dragged: {
complete: !0
}
})
}
},
handleDragEnter: function(a) {
if (this.dragEnabled()) {
var b = this.state.dragged;
b.overRowIdx = a,
this.setState({
dragged: b
})
}
},
handleTerminateDrag: function() {
this.dragEnabled() && this.setState({
dragged: null
})
},
handlePaste: function() {
if (this.copyPasteEnabled()) {
var a = this.state.selected
, b = this.getColumn(this.state.selected.idx).key
, c = this.state.textToCopy
, e = a.rowIdx;
if (this.props.onCellCopyPaste && this.props.onCellCopyPaste({
cellKey: b,
rowIdx: e,
value: c,
fromRow: this.state.copied.rowIdx,
toRow: e
}),
this.props.onGridRowsUpdated) {
var f = d({}, b, c);
this.props.onGridRowsUpdated({
cellKey: b,
fromRow: e,
toRow: e,
updated: f,
action: "copyPaste"
})
}
this.setState({
copied: null
})
}
},
handleCopy: function(a) {
if (this.copyPasteEnabled()) {
var b = a.value
, c = this.state.selected
, d = {
idx: c.idx,
rowIdx: c.rowIdx
};
this.setState({
textToCopy: b,
copied: d
})
}
},
handleSort: function(a, b) {
this.setState({
sortDirection: b,
sortColumn: a
}, function() {
this.props.onGridSort(a, b)
})
},
getSelectedRow: function(a, b) {
var c = this
, d = a.filter(function(a) {
return a[c.props.rowKey] === b
});
return d.length > 0 ? d[0] : void 0
},
handleRowSelect: function(a, b, c, d) {
d.stopPropagation();
var e = "single" === this.props.enableRowSelect ? [] : this.state.selectedRows.slice(0)
, f = this.getSelectedRow(e, c[this.props.rowKey]);
f ? f.isSelected = !f.isSelected : (c.isSelected = !0,
e.push(c)),
this.setState({
selectedRows: e,
selected: {
rowIdx: a,
idx: 0
}
}),
this.props.onRowSelect && this.props.onRowSelect(e.filter(function(a) {
return a.isSelected === !0
}))
},
handleCheckboxChange: function(a) {
var b = void 0;
b = a.currentTarget instanceof HTMLInputElement && a.currentTarget.checked === !0;
for (var c = [], d = 0; d < this.props.rowsCount; d++) {
var e = Object.assign({}, this.props.rowGetter(d), {
isSelected: b
});
c.push(e)
}
this.setState({
selectedRows: c
}),
"function" == typeof this.props.onRowSelect && this.props.onRowSelect(c.filter(function(a) {
return a.isSelected === !0
}))
},
getScrollOffSet: function() {
var a = 0
, b = g.findDOMNode(this).querySelector(".react-grid-Canvas");
b && (a = b.offsetWidth - b.clientWidth),
this.setState({
scrollOffset: a
})
},
getRowOffsetHeight: function() {
var a = 0;
return this.getHeaderRows().forEach(function(b) {
return a += parseFloat(b.height, 10)
}),
a
},
getHeaderRows: function() {
var a = [{
ref: "row",
height: this.props.headerRowHeight || this.props.rowHeight,
rowType: "header"
}];
return this.state.canFilter === !0 && a.push({
ref: "filterRow",
filterable: !0,
onFilterChange: this.props.onAddFilter,
height: 45,
rowType: "filter"
}),
a
},
getInitialSelectedRows: function() {
for (var a = [], b = 0; b < this.props.rowsCount; b++)
a.push(!1);
return a
},
getSelectedValue: function() {
var a = this.state.selected.rowIdx
, b = this.state.selected.idx
, c = this.getColumn(b).key
, d = this.props.rowGetter(a);
return m.get(d, c)
},
moveSelectedCell: function(a, b, c) {
a.preventDefault();
var d = void 0
, e = void 0
, f = this.props.cellNavigationMode;
if ("none" !== f) {
var g = this.calculateNextSelectionPosition(f, c, b);
e = g.idx,
d = g.rowIdx
} else
d = this.state.selected.rowIdx + b,
e = this.state.selected.idx + c;
this.onSelect({
idx: e,
rowIdx: d
})
},
calculateNextSelectionPosition: function(a, b, c) {
var d = c
, e = this.state.selected.idx + b;
b > 0 ? this.isAtLastCellInRow() && ("changeRow" === a ? (d = this.isAtLastRow() ? c : c + 1,
e = this.isAtLastRow() ? e : 0) : e = 0) : 0 > b && this.isAtFirstCellInRow() && ("changeRow" === a ? (d = this.isAtFirstRow() ? c : c - 1,
e = this.isAtFirstRow() ? 0 : this.props.columns.length - 1) : e = this.props.columns.length - 1);
var f = this.state.selected.rowIdx + d;
return {
idx: e,
rowIdx: f
}
},
isAtLastCellInRow: function() {
return this.state.selected.idx === this.props.columns.length - 1
},
isAtLastRow: function() {
return this.state.selected.rowIdx === this.props.rowsCount - 1
},
isAtFirstCellInRow: function() {
return 0 === this.state.selected.idx
},
isAtFirstRow: function() {
return 0 === this.state.selected.rowIdx
},
openCellEditor: function(a, b) {
var c = this
, d = this.props.rowGetter(a)
, e = this.getColumn(b);
if (n.canEdit(e, d, this.props.enableCellSelect)) {
var f = {
rowIdx: a,
idx: b
};
this.hasSelectedCellChanged(f) ? this.setState({
selected: f
}, function() {
c.setActive("Enter")
}) : this.setActive("Enter")
}
},
setActive: function(a) {
var b = this.state.selected.rowIdx
, c = this.props.rowGetter(b)
, d = this.state.selected.idx
, e = this.getColumn(d);
if (n.canEdit(e, c, this.props.enableCellSelect) && !this.isActive()) {
var f = Object.assign(this.state.selected, {
idx: d,
rowIdx: b,
active: !0,
initialKeyCode: a
});
this.setState({
selected: f
})
}
},
setInactive: function() {
var a = this.state.selected.rowIdx
, b = this.props.rowGetter(a)
, c = this.state.selected.idx
, d = this.getColumn(c);
if (n.canEdit(d, b, this.props.enableCellSelect) && this.isActive()) {
var e = Object.assign(this.state.selected, {
idx: c,
rowIdx: a,
active: !1
});
this.setState({
selected: e
})
}
},
isActive: function() {
return this.state.selected.active === !0
},
setupGridColumns: function() {
var a = arguments.length <= 0 || void 0 === arguments[0] ? this.props : arguments[0]
, b = a.columns.slice(0)
, c = {};
if (a.enableRowSelect) {
var d = "single" === a.enableRowSelect ? null : f.createElement("div", {
className: "react-grid-checkbox-container"
}, f.createElement("input", {
className: "react-grid-checkbox",
type: "checkbox",
name: "select-all-checkbox",
onChange: this.handleCheckboxChange
}), f.createElement("label", {
htmlFor: "select-all-checkbox",
className: "react-grid-checkbox-label"
}))
, e = {
key: "select-row",
name: "",
formatter: f.createElement(j, null ),
onCellChange: this.handleRowSelect,
filterable: !1,
headerRenderer: d,
width: 60,
locked: !0,
getRowMetaData: function(a) {
return a
}
};
c = b.unshift(e),
b = c > 0 ? b : c
}
return b
},
copyPasteEnabled: function() {
return null !== this.props.onCellCopyPaste
},
dragEnabled: function() {
return null !== this.props.onCellsDragged
},
renderToolbar: function() {
var a = this.props.toolbar;
return f.isValidElement(a) ? f.cloneElement(a, {
onToggleFilter: this.onToggleFilter,
numberOfRows: this.props.rowsCount
}) : void 0
},
render: function() {
var a = {
selected: this.state.selected,
dragged: this.state.dragged,
onCellClick: this.onCellClick,
onCellContextMenu: this.onCellContextMenu,
onCellDoubleClick: this.onCellDoubleClick,
onCommit: this.onCellCommit,
onCommitCancel: this.setInactive,
copied: this.state.copied,
handleDragEnterRow: this.handleDragEnter,
handleTerminateDrag: this.handleTerminateDrag,
onDragHandleDoubleClick: this.onDragHandleDoubleClick,
enableCellSelect: this.props.enableCellSelect,
onColumnEvent: this.onColumnEvent,
openCellEditor: this.openCellEditor
}
, b = this.renderToolbar()
, c = this.props.minWidth || this.DOMMetrics.gridWidth()
, d = c - this.state.scrollOffset;
return ("undefined" == typeof c || isNaN(c) || 0 === c) && (c = "100%"),
("undefined" == typeof d || isNaN(d) || 0 === d) && (d = "100%"),
f.createElement("div", {
className: "react-grid-Container",
style: {
width: c
}
}, b, f.createElement("div", {
className: "react-grid-Main"
}, f.createElement(h, e({
ref: "base"
}, this.props, {
rowKey: this.props.rowKey,
headerRows: this.getHeaderRows(),
columnMetrics: this.state.columnMetrics,
rowGetter: this.props.rowGetter,
rowsCount: this.props.rowsCount,
rowHeight: this.props.rowHeight,
cellMetaData: a,
selectedRows: this.state.selectedRows.filter(function(a) {
return a.isSelected === !0
}),
expandedRows: this.state.expandedRows,
rowOffsetHeight: this.getRowOffsetHeight(),
sortColumn: this.state.sortColumn,
sortDirection: this.state.sortDirection,
onSort: this.handleSort,
minHeight: this.props.minHeight,
totalWidth: d,
onViewportKeydown: this.onKeyDown,
onViewportDragStart: this.onDragStart,
onViewportDragEnd: this.handleDragEnd,
onViewportDoubleClick: this.onViewportDoubleClick,
onColumnResize: this.onColumnResize,
rowScrollTimeout: this.props.rowScrollTimeout,
contextMenu: this.props.contextMenu
}))))
}
});
a.exports = o
}
, function(b, c) {
b.exports = a
}
, function(a, c) {
a.exports = b
}
, function(a, b, c) {
"use strict";
var d = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, e = c(2)
, f = e.PropTypes
, g = c(5)
, h = c(21)
, i = c(98)
, j = c(97)
, k = c(94)
, l = e.createClass({
displayName: "Grid",
propTypes: {
rowGetter: f.oneOfType([f.array, f.func]).isRequired,
columns: f.oneOfType([f.array, f.object]),
columnMetrics: f.object,
minHeight: f.number,
totalWidth: f.oneOfType([f.number, f.string]),
headerRows: f.oneOfType([f.array, f.func]),
rowHeight: f.number,
rowRenderer: f.func,
emptyRowsView: f.func,
expandedRows: f.oneOfType([f.array, f.func]),
selectedRows: f.oneOfType([f.array, f.func]),
rowsCount: f.number,
onRows: f.func,
sortColumn: e.PropTypes.string,
sortDirection: e.PropTypes.oneOf(["ASC", "DESC", "NONE"]),
rowOffsetHeight: f.number.isRequired,
onViewportKeydown: f.func.isRequired,
onViewportDragStart: f.func.isRequired,
onViewportDragEnd: f.func.isRequired,
onViewportDoubleClick: f.func.isRequired,
onColumnResize: f.func,
onSort: f.func,
cellMetaData: f.shape(k),
rowKey: f.string.isRequired,
rowScrollTimeout: f.number,
contextMenu: f.element
},
mixins: [i, j.MetricsComputatorMixin],
getDefaultProps: function() {
return {
rowHeight: 35,
minHeight: 350
}
},
getStyle: function() {
return {
overflow: "hidden",
outline: 0,
position: "relative",
minHeight: this.props.minHeight
}
},
render: function() {
var a = this.props.headerRows || [{
ref: "row"
}]
, b = this.props.emptyRowsView;
return e.createElement("div", d({}, this.props, {
style: this.getStyle(),
className: "react-grid-Grid"
}), e.createElement(g, {
ref: "header",
columnMetrics: this.props.columnMetrics,
onColumnResize: this.props.onColumnResize,
height: this.props.rowHeight,
totalWidth: this.props.totalWidth,
headerRows: a,
sortColumn: this.props.sortColumn,
sortDirection: this.props.sortDirection,
onSort: this.props.onSort,
onScroll: this.onHeaderScroll
}), this.props.rowsCount >= 1 || 0 === this.props.rowsCount && !this.props.emptyRowsView ? e.createElement("div", {
ref: "viewPortContainer",
onKeyDown: this.props.onViewportKeydown,
onDoubleClick: this.props.onViewportDoubleClick,
onDragStart: this.props.onViewportDragStart,
onDragEnd: this.props.onViewportDragEnd
}, e.createElement(h, {
ref: "viewport",
rowKey: this.props.rowKey,
width: this.props.columnMetrics.width,
rowHeight: this.props.rowHeight,
rowRenderer: this.props.rowRenderer,
rowGetter: this.props.rowGetter,
rowsCount: this.props.rowsCount,
selectedRows: this.props.selectedRows,
expandedRows: this.props.expandedRows,
columnMetrics: this.props.columnMetrics,
totalWidth: this.props.totalWidth,
onScroll: this.onScroll,
onRows: this.props.onRows,
cellMetaData: this.props.cellMetaData,
rowOffsetHeight: this.props.rowOffsetHeight || this.props.rowHeight * a.length,
minHeight: this.props.minHeight,
rowScrollTimeout: this.props.rowScrollTimeout,
contextMenu: this.props.contextMenu
})) : e.createElement("div", {
ref: "emptyView",
className: "react-grid-Empty"
}, e.createElement(b, null )))
}
});
a.exports = l
}
, function(a, b, c) {
"use strict";
var d = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, e = c(2)
, f = c(3)
, g = c(6)
, h = c(7)
, i = c(8)
, j = c(10)
, k = c(12)
, l = e.PropTypes
, m = e.createClass({
displayName: "Header",
propTypes: {
columnMetrics: l.shape({
width: l.number.isRequired,
columns: l.any
}).isRequired,
totalWidth: l.oneOfType([l.number, l.string]),
height: l.number.isRequired,
headerRows: l.array.isRequired,
sortColumn: l.string,
sortDirection: l.oneOf(["ASC", "DESC", "NONE"]),
onSort: l.func,
onColumnResize: l.func,
onScroll: l.func
},
getInitialState: function() {
return {
resizing: null
}
},
componentWillReceiveProps: function() {
this.setState({
resizing: null
})
},
shouldComponentUpdate: function(a, b) {
var c = !i.sameColumns(this.props.columnMetrics.columns, a.columnMetrics.columns, i.sameColumn) || this.props.totalWidth !== a.totalWidth || this.props.headerRows.length !== a.headerRows.length || this.state.resizing !== b.resizing || this.props.sortColumn !== a.sortColumn || this.props.sortDirection !== a.sortDirection;
return c
},
onColumnResize: function(a, b) {
var c = this.state.resizing || this.props
, d = this.getColumnPosition(a);
if (null != d) {
var e = {
columnMetrics: h(c.columnMetrics)
};
e.columnMetrics = i.resizeColumn(e.columnMetrics, d, b),
e.columnMetrics.totalWidth < c.columnMetrics.totalWidth && (e.columnMetrics.totalWidth = c.columnMetrics.totalWidth),
e.column = j.getColumn(e.columnMetrics.columns, d),
this.setState({
resizing: e
})
}
},
onColumnResizeEnd: function(a, b) {
var c = this.getColumnPosition(a);
null !== c && this.props.onColumnResize && this.props.onColumnResize(c, b || a.width)
},
getHeaderRows: function() {
var a = this
, b = this.getColumnMetrics()
, c = void 0;
this.state.resizing && (c = this.state.resizing.column);
var d = [];
return this.props.headerRows.forEach(function(f, g) {
var h = {
position: "absolute",
top: a.getCombinedHeaderHeights(g),
left: 0,
width: a.props.totalWidth,
overflow: "hidden"
};
d.push(e.createElement(k, {
key: f.ref,
ref: f.ref,
rowType: f.rowType,
style: h,
onColumnResize: a.onColumnResize,
onColumnResizeEnd: a.onColumnResizeEnd,
width: b.width,
height: f.height || a.props.height,
columns: b.columns,
resizing: c,
filterable: f.filterable,
onFilterChange: f.onFilterChange,
sortColumn: a.props.sortColumn,
sortDirection: a.props.sortDirection,
onSort: a.props.onSort,
onScroll: a.props.onScroll
}))
}),
d
},
getColumnMetrics: function() {
var a = void 0;
return a = this.state.resizing ? this.state.resizing.columnMetrics : this.props.columnMetrics
},
getColumnPosition: function(a) {
var b = this.getColumnMetrics()
, c = -1;
return b.columns.forEach(function(b, d) {
b.key === a.key && (c = d)
}),
-1 === c ? null : c
},
getCombinedHeaderHeights: function(a) {
var b = this.props.headerRows.length;
"undefined" != typeof a && (b = a);
for (var c = 0, d = 0; b > d; d++)
c += this.props.headerRows[d].height || this.props.height;
return c
},
getStyle: function() {
return {
position: "relative",
height: this.getCombinedHeaderHeights(),
overflow: "hidden"
}
},
setScrollLeft: function(a) {
var b = f.findDOMNode(this.refs.row);
if (b.scrollLeft = a,
this.refs.row.setScrollLeft(a),
this.refs.filterRow) {
var c = f.findDOMNode(this.refs.filterRow);
c.scrollLeft = a,
this.refs.filterRow.setScrollLeft(a)
}
},
render: function() {
var a = g({
"react-grid-Header": !0,
"react-grid-Header--resizing": !!this.state.resizing
})
, b = this.getHeaderRows();
return e.createElement("div", d({}, this.props, {
style: this.getStyle(),
className: a
}), b)
}
});
a.exports = m
}
, function(a, b, c) {
function d() {
for (var a, b = "", c = 0; c < arguments.length; c++)
if (a = arguments[c])
if ("string" == typeof a || "number" == typeof a)
b += " " + a;
else if ("[object Array]" === Object.prototype.toString.call(a))
b += " " + d.apply(null , a);
else if ("object" == typeof a)
for (var e in a)
a.hasOwnProperty(e) && a[e] && (b += " " + e);
return b.substr(1)
}
var e, f;
"undefined" != typeof a && a.exports && (a.exports = d),
e = [],
f = function() {
return d
}
.apply(b, e),
!(void 0 !== f && (a.exports = f))
}
, function(a, b) {
"use strict";
function c(a) {
var b = {};
for (var c in a)
a.hasOwnProperty(c) && (b[c] = a[c]);
return b
}
a.exports = c
}
, function(a, b, c) {
"use strict";
function d(a, b) {
return a.map(function(a) {
var c = Object.assign({}, a);
return a.width && /^([0-9]+)%$/.exec(a.width.toString()) && (c.width = Math.floor(a.width / 100 * b)),
c
})
}
function e(a, b, c) {
var d = a.filter(function(a) {
return !a.width
});
return a.map(function(a) {
return a.width || (0 >= b ? a.width = c : a.width = Math.floor(b / n.getSize(d))),
a
})
}
function f(a) {
var b = 0;
return a.map(function(a) {
return a.left = b,
b += a.width,
a
})
}
function g(a) {
var b = d(a.columns, a.totalWidth)
, c = b.filter(function(a) {
return a.width
}).reduce(function(a, b) {
return a - b.width
}, a.totalWidth);
c -= o();
var g = b.filter(function(a) {
return a.width
}).reduce(function(a, b) {
return a + b.width
}, 0);
return b = e(b, c, a.minColumnWidth),
b = f(b),
{
columns: b,
width: g,
totalWidth: a.totalWidth,
minColumnWidth: a.minColumnWidth
}
}
function h(a, b, c) {
var d = n.getColumn(a.columns, b)
, e = l(a);
e.columns = a.columns.slice(0);
var f = l(d);
return f.width = Math.max(c, e.minColumnWidth),
e = n.spliceColumn(e, b, f),
g(e)
}
function i(a, b) {
return "undefined" != typeof Immutable && a instanceof Immutable.List && b instanceof Immutable.List
}
function j(a, b, c) {
var d = void 0
, e = void 0
, f = void 0
, g = {}
, h = {};
if (n.getSize(a) !== n.getSize(b))
return !1;
for (d = 0,
e = n.getSize(a); e > d; d++)
f = a[d],
g[f.key] = f;
for (d = 0,
e = n.getSize(b); e > d; d++) {
f = b[d],
h[f.key] = f;
var i = g[f.key];
if (void 0 === i || !c(i, f))
return !1
}
for (d = 0,
e = n.getSize(a); e > d; d++) {
f = a[d];
var j = h[f.key];
if (void 0 === j)
return !1
}
return !0
}
function k(a, b, c) {
return i(a, b) ? a === b : j(a, b, c)
}
var l = c(7)
, m = c(9)
, n = c(10)
, o = c(11);
a.exports = {
recalculate: g,
resizeColumn: h,
sameColumn: m,
sameColumns: k
}
}
, function(a, b, c) {
"use strict";
var d = c(2).isValidElement;
a.exports = function(a, b) {
var c = void 0;
for (c in a)
if (a.hasOwnProperty(c)) {
if ("function" == typeof a[c] && "function" == typeof b[c] || d(a[c]) && d(b[c]))
continue;if (!b.hasOwnProperty(c) || a[c] !== b[c])
return !1
}
for (c in b)
if (b.hasOwnProperty(c) && !a.hasOwnProperty(c))
return !1;
return !0
}
}
, function(a, b) {
"use strict";
a.exports = {
getColumn: function(a, b) {
return Array.isArray(a) ? a[b] : "undefined" != typeof Immutable ? a.get(b) : void 0
},
spliceColumn: function(a, b, c) {
return Array.isArray(a.columns) ? a.columns.splice(b, 1, c) : "undefined" != typeof Immutable && (a.columns = a.columns.splice(b, 1, c)),
a
},
getSize: function(a) {
return Array.isArray(a) ? a.length : "undefined" != typeof Immutable ? a.size : void 0
},
canEdit: function(a, b, c) {
return null != a.editable && "function" == typeof a.editable ? c === !0 && a.editable(b) : !(c !== !0 || !a.editor && !a.editable)
}
}
}
, function(a, b) {
"use strict";
function c() {
if (void 0 === d) {
var a = document.createElement("div");
a.style.width = "50px",
a.style.height = "50px",
a.style.position = "absolute",
a.style.top = "-200px",
a.style.left = "-200px";
var b = document.createElement("div");
b.style.height = "100px",
b.style.width = "100%",
a.appendChild(b),
document.body.appendChild(a);
var c = a.clientWidth;
a.style.overflowY = "scroll";
var e = b.clientWidth;
document.body.removeChild(a),
d = c - e
}
return d
}
var d = void 0;
a.exports = c
}
, function(a, b, c) {
"use strict";
var d = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, e = c(2)
, f = c(13)
, g = c(14)
, h = c(11)
, i = (c(15),
c(10))
, j = c(18)
, k = c(19)
, l = c(20)
, m = e.PropTypes
, n = {
overflow: e.PropTypes.string,
width: m.oneOfType([m.number, m.string]),
height: e.PropTypes.number,
position: e.PropTypes.string
}
, o = ["ASC", "DESC", "NONE"]
, p = e.createClass({
displayName: "HeaderRow",
propTypes: {
width: m.oneOfType([m.number, m.string]),
height: m.number.isRequired,
columns: m.oneOfType([m.array, m.object]),
onColumnResize: m.func,
onSort: m.func.isRequired,
onColumnResizeEnd: m.func,
style: m.shape(n),
sortColumn: m.string,
sortDirection: e.PropTypes.oneOf(o),
cellRenderer: m.func,
headerCellRenderer: m.func,
filterable: m.bool,
onFilterChange: m.func,
resizing: m.object,
onScroll: m.func,
rowType: m.string
},
mixins: [i],
shouldComponentUpdate: function(a) {
return a.width !== this.props.width || a.height !== this.props.height || a.columns !== this.props.columns || !f(a.style, this.props.style) || this.props.sortColumn !== a.sortColumn || this.props.sortDirection !== a.sortDirection
},
getHeaderCellType: function(a) {
return a.filterable && this.props.filterable ? l.FILTERABLE : a.sortable ? l.SORTABLE : l.NONE
},
getFilterableHeaderCell: function() {
return e.createElement(k, {
onChange: this.props.onFilterChange
})
},
getSortableHeaderCell: function(a) {
var b = this.props.sortColumn === a.key ? this.props.sortDirection : o.NONE;
return e.createElement(j, {
columnKey: a.key,
onSort: this.props.onSort,
sortDirection: b
})
},
getHeaderRenderer: function(a) {
var b = void 0;
if (a.headerRenderer)
b = a.headerRenderer;
else {
var c = this.getHeaderCellType(a);
switch (c) {
case l.SORTABLE:
b = this.getSortableHeaderCell(a);
break;
case l.FILTERABLE:
b = this.getFilterableHeaderCell()
}
}
return b
},
getStyle: function() {
return {
overflow: "hidden",
width: "100%",
height: this.props.height,
position: "absolute"
}
},
getCells: function() {
for (var a = [], b = [], c = 0, d = this.getSize(this.props.columns); d > c; c++) {
var f = this.getColumn(this.props.columns, c)
, h = this.getHeaderRenderer(f);
"select-row" === f.key && "filter" === this.props.rowType && (h = e.createElement("div", null ));
var i = e.createElement(g, {
ref: c,
key: c,
height: this.props.height,
column: f,
renderer: h,
resizing: this.props.resizing === f,
onResize: this.props.onColumnResize,
onResizeEnd: this.props.onColumnResizeEnd
});
f.locked ? b.push(i) : a.push(i)
}
return a.concat(b)
},
setScrollLeft: function(a) {
var b = this;
this.props.columns.forEach(function(c, d) {
c.locked && b.refs[d].setScrollLeft(a)
})
},
render: function() {
var a = {
width: this.props.width ? this.props.width + h() : "100%",
height: this.props.height,
whiteSpace: "nowrap",
overflowX: "hidden",
overflowY: "hidden"
}
, b = this.getCells();
return e.createElement("div", d({}, this.props, {
className: "react-grid-HeaderRow",
onScroll: this.props.onScroll
}), e.createElement("div", {
style: a
}, b))
}
});
a.exports = p
}
, function(a, b) {
"use strict";
function c(a, b) {
if (a === b)
return !0;
if ("object" != typeof a || null === a || "object" != typeof b || null === b)
return !1;
var c = Object.keys(a)
, e = Object.keys(b);
if (c.length !== e.length)
return !1;
for (var f = d.bind(b), g = 0; g < c.length; g++)
if (!f(c[g]) || a[c[g]] !== b[c[g]])
return !1;
return !0
}
var d = Object.prototype.hasOwnProperty;
a.exports = c
}
, function(a, b, c) {
"use strict";
function d(a) {
return e.createElement("div", {
className: "widget-HeaderCell__value"
}, a.column.name)
}
var e = c(2)
, f = c(3)
, g = c(6)
, h = c(15)
, i = c(16)
, j = e.PropTypes
, k = e.createClass({
displayName: "HeaderCell",
propTypes: {
renderer: j.oneOfType([j.func, j.element]).isRequired,
column: j.shape(h).isRequired,
onResize: j.func.isRequired,
height: j.number.isRequired,
onResizeEnd: j.func.isRequired,
className: j.string
},
getDefaultProps: function() {
return {
renderer: d
}
},
getInitialState: function() {
return {
resizing: !1
}
},
onDragStart: function(a) {
this.setState({
resizing: !0
}),
a && a.dataTransfer && a.dataTransfer.setData && a.dataTransfer.setData("text/plain", "dummy")
},
onDrag: function(a) {
var b = this.props.onResize || null ;
if (b) {
var c = this.getWidthFromMouseEvent(a);
c > 0 && b(this.props.column, c)
}
},
onDragEnd: function(a) {
var b = this.getWidthFromMouseEvent(a);
this.props.onResizeEnd(this.props.column, b),
this.setState({
resizing: !1
})
},
getWidthFromMouseEvent: function(a) {
var b = a.pageX
, c = f.findDOMNode(this).getBoundingClientRect().left;
return b - c
},
getCell: function() {
return e.isValidElement(this.props.renderer) ? e.cloneElement(this.props.renderer, {
column: this.props.column,
height: this.props.height
}) : this.props.renderer({
column: this.props.column
})
},
getStyle: function() {
return {
width: this.props.column.width,
left: this.props.column.left,
display: "inline-block",
position: "absolute",
overflow: "hidden",
height: this.props.height,
margin: 0,
textOverflow: "ellipsis",
whiteSpace: "nowrap"
}
},
setScrollLeft: function(a) {
var b = f.findDOMNode(this);
b.style.webkitTransform = "translate3d(" + a + "px, 0px, 0px)",
b.style.transform = "translate3d(" + a + "px, 0px, 0px)"
},
render: function() {
var a = void 0;
this.props.column.resizable && (a = e.createElement(i, {
onDrag: this.onDrag,
onDragStart: this.onDragStart,
onDragEnd: this.onDragEnd
}));
var b = g({
"react-grid-HeaderCell": !0,
"react-grid-HeaderCell--resizing": this.state.resizing,
"react-grid-HeaderCell--locked": this.props.column.locked
});
b = g(b, this.props.className, this.props.column.cellClass);
var c = this.getCell();
return e.createElement("div", {
className: b,
style: this.getStyle()
}, c, a)
}
});
a.exports = k
}
, function(a, b, c) {
"use strict";
var d = c(2)
, e = {
name: d.PropTypes.node.isRequired,
key: d.PropTypes.string.isRequired,
width: d.PropTypes.number.isRequired,
filterable: d.PropTypes.bool
};
a.exports = e
}
, function(a, b, c) {
"use strict";
var d = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, e = c(2)
, f = c(17)
, g = e.createClass({
displayName: "ResizeHandle",
style: {
position: "absolute",
top: 0,
right: 0,
width: 6,
height: "100%"
},
render: function() {
return e.createElement(f, d({}, this.props, {
className: "react-grid-HeaderCell__resizeHandle",
style: this.style
}))
}
});
a.exports = g
}
, function(a, b, c) {
"use strict";
var d = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, e = c(2)
, f = e.PropTypes
, g = e.createClass({
displayName: "Draggable",
propTypes: {
onDragStart: f.func,
onDragEnd: f.func,
onDrag: f.func,
component: f.oneOfType([f.func, f.constructor])
},
getDefaultProps: function() {
return {
onDragStart: function() {
return !0
},
onDragEnd: function() {},
onDrag: function() {}
}
},
getInitialState: function() {
return {
drag: null
}
},
componentWillUnmount: function() {
this.cleanUp()
},
onMouseDown: function(a) {
var b = this.props.onDragStart(a);
null === b && 0 !== a.button || (window.addEventListener("mouseup", this.onMouseUp),
window.addEventListener("mousemove", this.onMouseMove),
this.setState({
drag: b
}))
},
onMouseMove: function(a) {
null !== this.state.drag && (a.preventDefault && a.preventDefault(),
this.props.onDrag(a))
},
onMouseUp: function(a) {
this.cleanUp(),
this.props.onDragEnd(a, this.state.drag),
this.setState({
drag: null
})
},
cleanUp: function() {
window.removeEventListener("mouseup", this.onMouseUp),
window.removeEventListener("mousemove", this.onMouseMove)
},
render: function() {
return e.createElement("div", d({}, this.props, {
onMouseDown: this.onMouseDown,
className: "react-grid-HeaderCell__draggable"
}))
}
});
a.exports = g
}
, function(a, b, c) {
"use strict";
var d = c(2)
, e = c(6)
, f = {
ASC: "ASC",
DESC: "DESC",
NONE: "NONE"
}
, g = d.createClass({
displayName: "SortableHeaderCell",
propTypes: {
columnKey: d.PropTypes.string.isRequired,
column: d.PropTypes.shape({
name: d.PropTypes.node
}),
onSort: d.PropTypes.func.isRequired,
sortDirection: d.PropTypes.oneOf(["ASC", "DESC", "NONE"])
},
onClick: function() {
var a = void 0;
switch (this.props.sortDirection) {
default:
case null :
case void 0:
case f.NONE:
a = f.ASC;
break;
case f.ASC:
a = f.DESC;
break;
case f.DESC:
a = f.NONE
}
this.props.onSort(this.props.columnKey, a)
},
getSortByText: function() {
var a = {
ASC: "9650",
DESC: "9660",
NONE: ""
};
return String.fromCharCode(a[this.props.sortDirection])
},
render: function() {
var a = e({
"react-grid-HeaderCell-sortable": !0,
"react-grid-HeaderCell-sortable--ascending": "ASC" === this.props.sortDirection,
"react-grid-HeaderCell-sortable--descending": "DESC" === this.props.sortDirection
});
return d.createElement("div", {
className: a,
onClick: this.onClick,
style: {
cursor: "pointer"
}
}, this.props.column.name, d.createElement("span", {
className: "pull-right"
}, this.getSortByText()))
}
});
a.exports = g
}
, function(a, b, c) {
"use strict";
var d = c(2)
, e = c(15)
, f = d.createClass({
displayName: "FilterableHeaderCell",
propTypes: {
onChange: d.PropTypes.func.isRequired,
column: d.PropTypes.shape(e)
},
getInitialState: function() {
return {
filterTerm: ""
}
},
handleChange: function(a) {
var b = a.target.value;
this.setState({
filterTerm: b
}),
this.props.onChange({
filterTerm: b,
columnKey: this.props.column.key
})
},
renderInput: function() {
if (this.props.column.filterable === !1)
return d.createElement("span", null );
var a = "header-filter-" + this.props.column.key;
return d.createElement("input", {
key: a,
type: "text",
className: "form-control input-sm",
placeholder: "Search",
value: this.state.filterTerm,
onChange: this.handleChange
})
},
render: function() {
return d.createElement("div", null , d.createElement("div", {
className: "form-group"
}, this.renderInput()))
}
});
a.exports = f
}
, function(a, b) {
"use strict";
var c = {
SORTABLE: 0,
FILTERABLE: 1,
NONE: 2,
CHECKBOX: 3
};
a.exports = c
}
, function(a, b, c) {
"use strict";
var d = c(2)
, e = c(22)
, f = c(96)
, g = c(94)
, h = d.PropTypes
, i = d.createClass({
displayName: "Viewport",
mixins: [f],
propTypes: {
rowOffsetHeight: h.number.isRequired,
totalWidth: h.oneOfType([h.number, h.string]).isRequired,
columnMetrics: h.object.isRequired,
rowGetter: h.oneOfType([h.array, h.func]).isRequired,
selectedRows: h.array,
expandedRows: h.array,
rowRenderer: h.func,
rowsCount: h.number.isRequired,
rowHeight: h.number.isRequired,
onRows: h.func,
onScroll: h.func,
minHeight: h.number,
cellMetaData: h.shape(g),
rowKey: h.string.isRequired,
rowScrollTimeout: h.number,
contextMenu: h.element
},
onScroll: function(a) {
this.updateScroll(a.scrollTop, a.scrollLeft, this.state.height, this.props.rowHeight, this.props.rowsCount),
this.props.onScroll && this.props.onScroll({
scrollTop: a.scrollTop,
scrollLeft: a.scrollLeft
})
},
getScroll: function() {
return this.refs.canvas.getScroll()
},
setScrollLeft: function(a) {
this.refs.canvas.setScrollLeft(a)
},
render: function() {
var a = {
padding: 0,
bottom: 0,
left: 0,
right: 0,
overflow: "hidden",
position: "absolute",
top: this.props.rowOffsetHeight
};
return d.createElement("div", {
className: "react-grid-Viewport",
style: a
}, d.createElement(e, {
ref: "canvas",
rowKey: this.props.rowKey,
totalWidth: this.props.totalWidth,
width: this.props.columnMetrics.width,
rowGetter: this.props.rowGetter,
rowsCount: this.props.rowsCount,
selectedRows: this.props.selectedRows,
expandedRows: this.props.expandedRows,
columns: this.props.columnMetrics.columns,
rowRenderer: this.props.rowRenderer,
displayStart: this.state.displayStart,
displayEnd: this.state.displayEnd,
cellMetaData: this.props.cellMetaData,
height: this.state.height,
rowHeight: this.props.rowHeight,
onScroll: this.onScroll,
onRows: this.props.onRows,
rowScrollTimeout: this.props.rowScrollTimeout,
contextMenu: this.props.contextMenu
}))
}
});
a.exports = i
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
var e = c(13)
, f = d(e)
, g = c(23)
, h = d(g)
, i = c(2)
, j = c(3)
, k = c(6)
, l = i.PropTypes
, m = c(86)
, n = c(87)
, o = c(94)
, p = i.createClass({
displayName: "Canvas",
mixins: [m],
propTypes: {
rowRenderer: l.oneOfType([l.func, l.element]),
rowHeight: l.number.isRequired,
height: l.number.isRequired,
width: l.number,
totalWidth: l.oneOfType([l.number, l.string]),
style: l.string,
className: l.string,
displayStart: l.number.isRequired,
displayEnd: l.number.isRequired,
rowsCount: l.number.isRequired,
rowGetter: l.oneOfType([l.func.isRequired, l.array.isRequired]),
expandedRows: l.array,
onRows: l.func,
onScroll: l.func,
columns: l.oneOfType([l.object, l.array]).isRequired,
cellMetaData: l.shape(o).isRequired,
selectedRows: l.array,
rowKey: i.PropTypes.string,
rowScrollTimeout: i.PropTypes.number,
contextMenu: l.element
},
getDefaultProps: function() {
return {
rowRenderer: n,
onRows: function() {},
selectedRows: [],
rowScrollTimeout: 0
}
},
getInitialState: function() {
return {
displayStart: this.props.displayStart,
displayEnd: this.props.displayEnd,
scrollingTimeout: null
}
},
componentWillMount: function() {
this._currentRowsLength = 0,
this._currentRowsRange = {
start: 0,
end: 0
},
this._scroll = {
scrollTop: 0,
scrollLeft: 0
}
},
componentDidMount: function() {
this.onRows()
},
componentWillReceiveProps: function(a) {
a.displayStart === this.state.displayStart && a.displayEnd === this.state.displayEnd || this.setState({
displayStart: a.displayStart,
displayEnd: a.displayEnd
})
},
shouldComponentUpdate: function(a, b) {
var c = b.displayStart !== this.state.displayStart || b.displayEnd !== this.state.displayEnd || b.scrollingTimeout !== this.state.scrollingTimeout || a.rowsCount !== this.props.rowsCount || a.rowHeight !== this.props.rowHeight || a.columns !== this.props.columns || a.width !== this.props.width || a.cellMetaData !== this.props.cellMetaData || !(0,
f["default"])(a.style, this.props.style);
return c
},
componentWillUnmount: function() {
this._currentRowsLength = 0,
this._currentRowsRange = {
start: 0,
end: 0
},
this._scroll = {
scrollTop: 0,
scrollLeft: 0
}
},
componentDidUpdate: function() {
0 !== this._scroll.scrollTop && 0 !== this._scroll.scrollLeft && this.setScrollLeft(this._scroll.scrollLeft),
this.onRows()
},
onRows: function() {
this._currentRowsRange !== {
start: 0,
end: 0
} && (this.props.onRows(this._currentRowsRange),
this._currentRowsRange = {
start: 0,
end: 0
})
},
onScroll: function(a) {
var b = this;
if (j.findDOMNode(this) === a.target) {
this.appendScrollShim();
var c = a.target.scrollLeft
, d = a.target.scrollTop
, e = {
scrollTop: d,
scrollLeft: c
}
, f = Math.abs(this._scroll.scrollTop - e.scrollTop) / this.props.rowHeight
, g = f > this.props.displayEnd - this.props.displayStart;
if (this._scroll = e,
this.props.onScroll(e),
g && this.props.rowScrollTimeout > 0) {
var h = this.state.scrollingTimeout;
h && clearTimeout(h),
h = setTimeout(function() {
null !== b.state.scrollingTimeout && b.setState({
scrollingTimeout: null
})
}, this.props.rowScrollTimeout),
this.setState({
scrollingTimeout: h
})
}
}
},
getRows: function(a, b) {
if (this._currentRowsRange = {
start: a,
end: b
},
Array.isArray(this.props.rowGetter))
return this.props.rowGetter.slice(a, b);
for (var c = [], d = a; b > d; d++)
c.push(this.props.rowGetter(d));
return c
},
getScrollbarWidth: function() {
var a = 0
, b = j.findDOMNode(this);
return a = b.offsetWidth - b.clientWidth
},
getScroll: function() {
var a = j.findDOMNode(this)
, b = a.scrollTop
, c = a.scrollLeft;
return {
scrollTop: b,
scrollLeft: c
}
},
isRowSelected: function(a) {
var b = this
, c = this.props.selectedRows.filter(function(c) {
var d = a.get ? a.get(b.props.rowKey) : a[b.props.rowKey];
return c[b.props.rowKey] === d
});
return c.length > 0 && c[0].isSelected
},
_currentRowsLength: 0,
_currentRowsRange: {
start: 0,
end: 0
},
_scroll: {
scrollTop: 0,
scrollLeft: 0
},
setScrollLeft: function(a) {
if (0 !== this._currentRowsLength) {
if (!this.refs)
return;
for (var b = 0, c = this._currentRowsLength; c > b; b++)
this.refs[b] && this.refs[b].setScrollLeft && this.refs[b].setScrollLeft(a)
}
},
renderRow: function(a) {
if (null !== this.state.scrollingTimeout)
return this.renderScrollingPlaceholder(a);
var b = this.props.rowRenderer;
return "function" == typeof b ? i.createElement(b, a) : i.isValidElement(this.props.rowRenderer) ? i.cloneElement(this.props.rowRenderer, a) : void 0
},
renderScrollingPlaceholder: function(a) {
var b = {
row: {
height: a.height,
overflow: "hidden"
},
cell: {
height: a.height,
position: "absolute"
},
placeholder: {
backgroundColor: "rgba(211, 211, 211, 0.45)",
width: "60%",
height: Math.floor(.3 * a.height)
}
};
return i.createElement("div", {
key: a.key,
style: b.row,
className: "react-grid-Row"
}, this.props.columns.map(function(a, c) {
return i.createElement("div", {
style: Object.assign(b.cell, {
width: a.width,
left: a.left
}),
key: c,
className: "react-grid-Cell"
}, i.createElement("div", {
style: Object.assign(b.placeholder, {
width: Math.floor(.6 * a.width)
})
}))
}))
},
renderPlaceholder: function(a, b) {
return i.createElement("div", {
key: a,
style: {
height: b
}
}, this.props.columns.map(function(a, b) {
return i.createElement("div", {
style: {
width: a.width
},
key: b
})
}))
},
render: function() {
var a = this
, b = this.state.displayStart
, c = this.state.displayEnd
, d = this.props.rowHeight
, e = this.props.rowsCount
, f = this.getRows(b, c).map(function(c, e) {
return a.renderRow({
key: b + e,
ref: e,
idx: b + e,
row: c,
height: d,
columns: a.props.columns,
isSelected: a.isRowSelected(c),
expandedRows: a.props.expandedRows,
cellMetaData: a.props.cellMetaData
})
});
this._currentRowsLength = f.length,
b > 0 && f.unshift(this.renderPlaceholder("top", b * d)),
e - c > 0 && f.push(this.renderPlaceholder("bottom", (e - c) * d));
var g = {
position: "absolute",
top: 0,
left: 0,
overflowX: "auto",
overflowY: "scroll",
width: this.props.totalWidth,
height: this.props.height,
transform: "translate3d(0, 0, 0)"
};
return i.createElement("div", {
style: g,
onScroll: this.onScroll,
className: k("react-grid-Canvas", this.props.className, {
opaque: this.props.cellMetaData.selected && this.props.cellMetaData.selected.active
})
}, i.createElement(h["default"], {
width: this.props.width,
rows: f,
contextMenu: this.props.contextMenu,
rowIdx: this.props.cellMetaData.selected.rowIdx,
idx: this.props.cellMetaData.selected.idx
}))
}
});
a.exports = p
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e(a, b) {
if (!(a instanceof b))
throw new TypeError("Cannot call a class as a function")
}
function f(a, b) {
if (!a)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !b || "object" != typeof b && "function" != typeof b ? a : b
}
function g(a, b) {
if ("function" != typeof b && null !== b)
throw new TypeError("Super expression must either be null or a function, not " + typeof b);
a.prototype = Object.create(b && b.prototype, {
constructor: {
value: a,
enumerable: !1,
writable: !0,
configurable: !0
}
}),
b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b)
}
Object.defineProperty(b, "__esModule", {
value: !0
}),
b.ContextMenuRowsContainer = b.SimpleRowsContainer = void 0;
var h = function() {
function a(a, b) {
for (var c = 0; c < b.length; c++) {
var d = b[c];
d.enumerable = d.enumerable || !1,
d.configurable = !0,
"value" in d && (d.writable = !0),
Object.defineProperty(a, d.key, d)
}
}
return function(b, c, d) {
return c && a(b.prototype, c),
d && a(b, d),
b
}
}()
, i = c(2)
, j = d(i)
, k = c(24)
, l = function(a) {
function b() {
return e(this, b),
f(this, Object.getPrototypeOf(b).apply(this, arguments))
}
return g(b, a),
h(b, [{
key: "hasContextMenu",
value: function() {
return this.props.contextMenu && j["default"].isValidElement(this.props.contextMenu)
}
}, {
key: "renderRowsWithContextMenu",
value: function() {
var a = {
rowIdx: this.props.rowIdx,
idx: this.props.idx
}
, b = j["default"].cloneElement(this.props.contextMenu, a);
return j["default"].createElement("div", null , j["default"].createElement(n, this.props), b)
}
}, {
key: "render",
value: function() {
return this.hasContextMenu() ? this.renderRowsWithContextMenu() : j["default"].createElement(m, this.props)
}
}]),
b
}(j["default"].Component);
l.propTypes = {
contextMenu: i.PropTypes.element,
rowIdx: i.PropTypes.number,
idx: i.PropTypes.number
};
var m = function(a) {
function b() {
return e(this, b),
f(this, Object.getPrototypeOf(b).apply(this, arguments))
}
return g(b, a),
h(b, [{
key: "render",
value: function() {
return j["default"].createElement("div", {
style: {
width: this.props.width,
overflow: "hidden"
}
}, this.props.rows)
}
}]),
b
}(j["default"].Component);
m.propTypes = {
width: i.PropTypes.number,
rows: i.PropTypes.array
};
var n = (0,
k.ContextMenuLayer)("reactDataGridContextMenu")(m);
b["default"] = l,
b.SimpleRowsContainer = m,
b.ContextMenuRowsContainer = n
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
Object.defineProperty(b, "__esModule", {
value: !0
});
var e = c(25);
Object.defineProperty(b, "ContextMenu", {
enumerable: !0,
get: function() {
return d(e)["default"]
}
});
var f = c(78);
Object.defineProperty(b, "ContextMenuLayer", {
enumerable: !0,
get: function() {
return d(f)["default"]
}
});
var g = c(81);
Object.defineProperty(b, "MenuItem", {
enumerable: !0,
get: function() {
return d(g)["default"]
}
});
var h = c(44);
Object.defineProperty(b, "monitor", {
enumerable: !0,
get: function() {
return d(h)["default"]
}
});
var i = c(83);
Object.defineProperty(b, "SubMenu", {
enumerable: !0,
get: function() {
return d(i)["default"]
}
});
var j = c(85);
Object.defineProperty(b, "connect", {
enumerable: !0,
get: function() {
return d(j)["default"]
}
})
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
Object.defineProperty(b, "__esModule", {
value: !0
});
var e = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, f = c(2)
, g = d(f)
, h = c(26)
, i = d(h)
, j = c(43)
, k = d(j)
, l = g["default"].PropTypes
, m = g["default"].createClass({
displayName: "ContextMenu",
propTypes: {
identifier: l.string.isRequired
},
getInitialState: function() {
return i["default"].getState()
},
componentDidMount: function() {
this.unsubscribe = i["default"].subscribe(this.handleUpdate)
},
componentWillUnmount: function() {
this.unsubscribe && this.unsubscribe()
},
handleUpdate: function() {
this.setState(this.getInitialState())
},
render: function() {
return g["default"].createElement(k["default"], e({}, this.props, this.state))
}
});
b["default"] = m
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
Object.defineProperty(b, "__esModule", {
value: !0
});
var e = c(27)
, f = c(41)
, g = d(f);
b["default"] = (0,
e.createStore)(g["default"])
}
, function(a, b, c) {
(function(a) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e() {}
b.__esModule = !0,
b.compose = b.applyMiddleware = b.bindActionCreators = b.combineReducers = b.createStore = void 0;
var f = c(29)
, g = d(f)
, h = c(36)
, i = d(h)
, j = c(38)
, k = d(j)
, l = c(39)
, m = d(l)
, n = c(40)
, o = d(n)
, p = c(37)
, q = d(p);
"production" !== a.env.NODE_ENV && "string" == typeof e.name && "isCrushed" !== e.name && (0,
q["default"])("You are currently using minified code outside of NODE_ENV === 'production'. This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) to ensure you have the correct code for your production build."),
b.createStore = g["default"],
b.combineReducers = i["default"],
b.bindActionCreators = k["default"],
b.applyMiddleware = m["default"],
b.compose = o["default"]
}
).call(b, c(28))
}
, function(a, b) {
function c() {
j && g && (j = !1,
g.length ? i = g.concat(i) : k = -1,
i.length && d())
}
function d() {
if (!j) {
var a = setTimeout(c);
j = !0;
for (var b = i.length; b; ) {
for (g = i,
i = []; ++k < b; )
g && g[k].run();
k = -1,
b = i.length
}
g = null ,
j = !1,
clearTimeout(a)
}
}
function e(a, b) {
this.fun = a,
this.array = b
}
function f() {}
var g, h = a.exports = {}, i = [], j = !1, k = -1;
h.nextTick = function(a) {
var b = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var c = 1; c < arguments.length; c++)
b[c - 1] = arguments[c];
i.push(new e(a,b)),
1 !== i.length || j || setTimeout(d, 0)
}
,
e.prototype.run = function() {
this.fun.apply(null , this.array)
}
,
h.title = "browser",
h.browser = !0,
h.env = {},
h.argv = [],
h.version = "",
h.versions = {},
h.on = f,
h.addListener = f,
h.once = f,
h.off = f,
h.removeListener = f,
h.removeAllListeners = f,
h.emit = f,
h.binding = function(a) {
throw new Error("process.binding is not supported")
}
,
h.cwd = function() {
return "/"
}
,
h.chdir = function(a) {
throw new Error("process.chdir is not supported")
}
,
h.umask = function() {
return 0
}
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e(a, b, c) {
function d() {
r === q && (r = q.slice())
}
function f() {
return p
}
function h(a) {
if ("function" != typeof a)
throw new Error("Expected listener to be a function.");
var b = !0;
return d(),
r.push(a),
function() {
if (b) {
b = !1,
d();
var c = r.indexOf(a);
r.splice(c, 1)
}
}
}
function k(a) {
if (!(0,
g["default"])(a))
throw new Error("Actions must be plain objects. Use custom middleware for async actions.");
if ("undefined" == typeof a.type)
throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');
if (s)
throw new Error("Reducers may not dispatch actions.");
try {
s = !0,
p = o(p, a)
} finally {
s = !1
}
for (var b = q = r, c = 0; c < b.length; c++)
b[c]();
return a
}
function l(a) {
if ("function" != typeof a)
throw new Error("Expected the nextReducer to be a function.");
o = a,
k({
type: j.INIT
})
}
function m() {
var a, b = h;
return a = {
subscribe: function(a) {
function c() {
a.next && a.next(f())
}
if ("object" != typeof a)
throw new TypeError("Expected the observer to be an object.");
c();
var d = b(c);
return {
unsubscribe: d
}
}
},
a[i["default"]] = function() {
return this
}
,
a
}
var n;
if ("function" == typeof b && "undefined" == typeof c && (c = b,
b = void 0),
"undefined" != typeof c) {
if ("function" != typeof c)
throw new Error("Expected the enhancer to be a function.");
return c(e)(a, b)
}
if ("function" != typeof a)
throw new Error("Expected the reducer to be a function.");
var o = a
, p = b
, q = []
, r = q
, s = !1;
return k({
type: j.INIT
}),
n = {
dispatch: k,
subscribe: h,
getState: f,
replaceReducer: l
},
n[i["default"]] = m,
n
}
b.__esModule = !0,
b.ActionTypes = void 0,
b["default"] = e;
var f = c(30)
, g = d(f)
, h = c(34)
, i = d(h)
, j = b.ActionTypes = {
INIT: "@@redux/INIT"
}
}
, function(a, b, c) {
function d(a) {
if (!g(a) || m.call(a) != h || f(a))
return !1;
var b = e(a);
if (null === b)
return !0;
var c = k.call(b, "constructor") && b.constructor;
return "function" == typeof c && c instanceof c && j.call(c) == l
}
var e = c(31)
, f = c(32)
, g = c(33)
, h = "[object Object]"
, i = Object.prototype
, j = Function.prototype.toString
, k = i.hasOwnProperty
, l = j.call(Object)
, m = i.toString;
a.exports = d
}
, function(a, b) {
function c(a) {
return d(Object(a))
}
var d = Object.getPrototypeOf;
a.exports = c
}
, function(a, b) {
function c(a) {
var b = !1;
if (null != a && "function" != typeof a.toString)
try {
b = !!(a + "")
} catch (c) {}
return b
}
a.exports = c
}
, function(a, b) {
function c(a) {
return !!a && "object" == typeof a
}
a.exports = c
}
, function(a, b, c) {
(function(b) {
"use strict";
a.exports = c(35)(b || window || this)
}
).call(b, function() {
return this
}())
}
, function(a, b) {
"use strict";
a.exports = function(a) {
var b, c = a.Symbol;
return "function" == typeof c ? c.observable ? b = c.observable : (b = c("observable"),
c.observable = b) : b = "@@observable",
b
}
}
, function(a, b, c) {
(function(a) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e(a, b) {
var c = b && b.type
, d = c && '"' + c.toString() + '"' || "an action";
return "Given action " + d + ', reducer "' + a + '" returned undefined. To ignore an action, you must explicitly return the previous state.'
}
function f(a, b, c) {
var d = Object.keys(b)
, e = c && c.type === i.ActionTypes.INIT ? "initialState argument passed to createStore" : "previous state received by the reducer";
if (0 === d.length)
return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
if (!(0,
k["default"])(a))
return "The " + e + ' has unexpected type of "' + {}.toString.call(a).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + d.join('", "') + '"');
var f = Object.keys(a).filter(function(a) {
return !b.hasOwnProperty(a)
});
return f.length > 0 ? "Unexpected " + (f.length > 1 ? "keys" : "key") + " " + ('"' + f.join('", "') + '" found in ' + e + ". ") + "Expected to find one of the known reducer keys instead: " + ('"' + d.join('", "') + '". Unexpected keys will be ignored.') : void 0
}
function g(a) {
Object.keys(a).forEach(function(b) {
var c = a[b]
, d = c(void 0, {
type: i.ActionTypes.INIT
});
if ("undefined" == typeof d)
throw new Error('Reducer "' + b + '" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');
var e = "@@redux/PROBE_UNKNOWN_ACTION_" + Math.random().toString(36).substring(7).split("").join(".");
if ("undefined" == typeof c(void 0, {
type: e
}))
throw new Error('Reducer "' + b + '" returned undefined when probed with a random type. ' + ("Don't try to handle " + i.ActionTypes.INIT + ' or other actions in "redux/*" ') + "namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")
})
}
function h(b) {
for (var c = Object.keys(b), d = {}, h = 0; h < c.length; h++) {
var i = c[h];
"function" == typeof b[i] && (d[i] = b[i])
}
var j, k = Object.keys(d);
try {
g(d)
} catch (l) {
j = l
}
return function() {
var b = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0]
, c = arguments[1];
if (j)
throw j;
if ("production" !== a.env.NODE_ENV) {
var g = f(b, d, c);
g && (0,
m["default"])(g)
}
for (var h = !1, i = {}, l = 0; l < k.length; l++) {
var n = k[l]
, o = d[n]
, p = b[n]
, q = o(p, c);
if ("undefined" == typeof q) {
var r = e(n, c);
throw new Error(r)
}
i[n] = q,
h = h || q !== p
}
return h ? i : b
}
}
b.__esModule = !0,
b["default"] = h;
var i = c(29)
, j = c(30)
, k = d(j)
, l = c(37)
, m = d(l)
}
).call(b, c(28))
}
, function(a, b) {
"use strict";
function c(a) {
"undefined" != typeof console && "function" == typeof console.error && console.error(a);
try {
throw new Error(a)
} catch (b) {}
}
b.__esModule = !0,
b["default"] = c
}
, function(a, b) {
"use strict";
function c(a, b) {
return function() {
return b(a.apply(void 0, arguments))
}
}
function d(a, b) {
if ("function" == typeof a)
return c(a, b);
if ("object" != typeof a || null === a)
throw new Error("bindActionCreators expected an object or a function, instead received " + (null === a ? "null" : typeof a) + '. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
for (var d = Object.keys(a), e = {}, f = 0; f < d.length; f++) {
var g = d[f]
, h = a[g];
"function" == typeof h && (e[g] = c(h, b))
}
return e
}
b.__esModule = !0,
b["default"] = d
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e() {
for (var a = arguments.length, b = Array(a), c = 0; a > c; c++)
b[c] = arguments[c];
return function(a) {
return function(c, d, e) {
var g = a(c, d, e)
, i = g.dispatch
, j = []
, k = {
getState: g.getState,
dispatch: function(a) {
return i(a)
}
};
return j = b.map(function(a) {
return a(k)
}),
i = h["default"].apply(void 0, j)(g.dispatch),
f({}, g, {
dispatch: i
})
}
}
}
b.__esModule = !0;
var f = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
;
b["default"] = e;
var g = c(40)
, h = d(g)
}
, function(a, b) {
"use strict";
function c() {
for (var a = arguments.length, b = Array(a), c = 0; a > c; c++)
b[c] = arguments[c];
if (0 === b.length)
return function(a) {
return a
}
;
var d = function() {
var a = b[b.length - 1]
, c = b.slice(0, -1);
return {
v: function() {
return c.reduceRight(function(a, b) {
return b(a)
}, a.apply(void 0, arguments))
}
}
}();
return "object" == typeof d ? d.v : void 0
}
b.__esModule = !0,
b["default"] = c
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
Object.defineProperty(b, "__esModule", {
value: !0
}),
b["default"] = function() {
var a = arguments.length <= 0 || void 0 === arguments[0] ? g : arguments[0]
, b = arguments[1];
return "SET_PARAMS" === b.type ? (0,
f["default"])({}, a, b.data) : a
}
;
var e = c(42)
, f = d(e)
, g = {
x: 0,
y: 0,
isVisible: !1,
currentItem: {}
}
}
, function(a, b) {
"use strict";
function c(a) {
if (null === a || void 0 === a)
throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(a)
}
function d() {
try {
if (!Object.assign)
return !1;
var a = new String("abc");
if (a[5] = "de",
"5" === Object.getOwnPropertyNames(a)[0])
return !1;
for (var b = {}, c = 0; 10 > c; c++)
b["_" + String.fromCharCode(c)] = c;
var d = Object.getOwnPropertyNames(b).map(function(a) {
return b[a]
});
if ("0123456789" !== d.join(""))
return !1;
var e = {};
return "abcdefghijklmnopqrst".split("").forEach(function(a) {
e[a] = a
}),
"abcdefghijklmnopqrst" === Object.keys(Object.assign({}, e)).join("")
} catch (f) {
return !1
}
}
var e = Object.prototype.hasOwnProperty
, f = Object.prototype.propertyIsEnumerable;
a.exports = d() ? Object.assign : function(a, b) {
for (var d, g, h = c(a), i = 1; i < arguments.length; i++) {
d = Object(arguments[i]);
for (var j in d)
e.call(d, j) && (h[j] = d[j]);
if (Object.getOwnPropertySymbols) {
g = Object.getOwnPropertySymbols(d);
for (var k = 0; k < g.length; k++)
f.call(d, g[k]) && (h[g[k]] = d[g[k]])
}
}
return h
}
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
Object.defineProperty(b, "__esModule", {
value: !0
});
var e = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, f = c(2)
, g = d(f)
, h = c(44)
, i = d(h)
, j = c(45)
, k = d(j)
, l = {
position: "fixed",
zIndex: 1040,
top: 0,
bottom: 0,
left: 0,
right: 0
}
, m = e({}, l, {
zIndex: "auto",
backgroundColor: "transparent"
})
, n = {
position: "fixed",
zIndex: "auto"
}
, o = g["default"].createClass({
displayName: "ContextMenuWrapper",
getInitialState: function() {
return {
left: 0,
top: 0
}
},
componentWillReceiveProps: function(a) {
var b = this;
if (a.isVisible === a.identifier) {
var c = window.requestAnimationFrame || setTimeout;
c(function() {
return b.setState(b.getMenuPosition(a.x, a.y))
})
}
},
shouldComponentUpdate: function(a) {
return this.props.isVisible !== a.visible
},
getMenuPosition: function(a, b) {
var c = document.documentElement.scrollTop
, d = document.documentElement.scrollLeft
, e = window
, f = e.innerWidth
, g = e.innerHeight
, h = this.menu.getBoundingClientRect()
, i = {
top: b + d,
left: a + c
};
return b + h.height > g && (i.top -= h.height),
a + h.width > f && (i.left -= h.width),
i
},
render: function() {
var a = this
, b = this.props
, c = b.isVisible
, d = b.identifier
, f = b.children
, h = e({}, n, this.state);
return g["default"].createElement(k["default"], {
style: l,
backdropStyle: m,
show: c === d,
onHide: function() {
return i["default"].hideMenu()
}
}, g["default"].createElement("nav", {
ref: function(b) {
return a.menu = b
},
style: h,
className: "react-context-menu"
}, f))
}
});
b["default"] = o
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
Object.defineProperty(b, "__esModule", {
value: !0
});
var e = c(26)
, f = d(e);
b["default"] = {
getItem: function() {
return f["default"].getState().currentItem
},
getPosition: function() {
var a = f["default"].getState()
, b = a.x
, c = a.y;
return {
x: b,
y: c
}
},
hideMenu: function() {
f["default"].dispatch({
type: "SET_PARAMS",
data: {
isVisible: !1,
currentItem: {}
}
})
}
}
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e(a, b) {
var c = {};
for (var d in a)
b.indexOf(d) >= 0 || Object.prototype.hasOwnProperty.call(a, d) && (c[d] = a[d]);
return c
}
b.__esModule = !0;
var f = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, g = c(2)
, h = d(g)
, i = c(46)
, j = d(i)
, k = c(47)
, l = d(k)
, m = c(49)
, n = d(m)
, o = c(50)
, p = d(o)
, q = c(54)
, r = d(q)
, s = c(51)
, t = d(s)
, u = c(72)
, v = d(u)
, w = c(75)
, x = d(w)
, y = c(68)
, z = d(y)
, A = c(76)
, B = d(A)
, C = c(77)
, D = d(C)
, E = c(53)
, F = d(E)
, G = new r["default"]
, H = h["default"].createClass({
displayName: "Modal",
propTypes: f({}, p["default"].propTypes, {
show: h["default"].PropTypes.bool,
container: h["default"].PropTypes.oneOfType([l["default"], h["default"].PropTypes.func]),
onShow: h["default"].PropTypes.func,
onHide: h["default"].PropTypes.func,
backdrop: h["default"].PropTypes.oneOfType([h["default"].PropTypes.bool, h["default"].PropTypes.oneOf(["static"])]),
onEscapeKeyUp: h["default"].PropTypes.func,
onBackdropClick: h["default"].PropTypes.func,
backdropStyle: h["default"].PropTypes.object,
backdropClassName: h["default"].PropTypes.string,
containerClassName: h["default"].PropTypes.string,
keyboard: h["default"].PropTypes.bool,
transition: n["default"],
dialogTransitionTimeout: h["default"].PropTypes.number,
backdropTransitionTimeout: h["default"].PropTypes.number,
autoFocus: h["default"].PropTypes.bool,
enforceFocus: h["default"].PropTypes.bool,
onEnter: h["default"].PropTypes.func,
onEntering: h["default"].PropTypes.func,
onEntered: h["default"].PropTypes.func,
onExit: h["default"].PropTypes.func,
onExiting: h["default"].PropTypes.func,
onExited: h["default"].PropTypes.func
}),
getDefaultProps: function() {
var a = function() {}
;
return {
show: !1,
backdrop: !0,
keyboard: !0,
autoFocus: !0,
enforceFocus: !0,
onHide: a
}
},
getInitialState: function() {
return {
exited: !this.props.show
}
},
render: function() {
var a = this.props
, b = (a.children,
a.transition)
, c = a.backdrop
, d = a.dialogTransitionTimeout
, f = e(a, ["children", "transition", "backdrop", "dialogTransitionTimeout"])
, i = f.onExit
, j = f.onExiting
, k = f.onEnter
, l = f.onEntering
, m = f.onEntered
, n = !!f.show
, o = h["default"].Children.only(this.props.children)
, q = n || b && !this.state.exited;
if (!q)
return null ;
var r = o.props
, s = r.role
, t = r.tabIndex;
return void 0 !== s && void 0 !== t || (o = g.cloneElement(o, {
role: void 0 === s ? "document" : s,
tabIndex: null == t ? "-1" : t
})),
b && (o = h["default"].createElement(b, {
transitionAppear: !0,
unmountOnExit: !0,
"in": n,
timeout: d,
onExit: i,
onExiting: j,
onExited: this.handleHidden,
onEnter: k,
onEntering: l,
onEntered: m
}, o)),
h["default"].createElement(p["default"], {
ref: this.setMountNode,
container: f.container
}, h["default"].createElement("div", {
ref: "modal",
role: f.role || "dialog",
style: f.style,
className: f.className
}, c && this.renderBackdrop(), o))
},
renderBackdrop: function() {
var a = this.props
, b = a.transition
, c = a.backdropTransitionTimeout
, d = h["default"].createElement("div", {
ref: "backdrop",
style: this.props.backdropStyle,
className: this.props.backdropClassName,
onClick: this.handleBackdropClick
});
return b && (d = h["default"].createElement(b, {
transitionAppear: !0,
"in": this.props.show,
timeout: c
}, d)),
d
},
componentWillReceiveProps: function(a) {
a.show ? this.setState({
exited: !1
}) : a.transition || this.setState({
exited: !0
})
},
componentWillUpdate: function(a) {
a.show && this.checkForFocus()
},
componentDidMount: function() {
this.props.show && this.onShow()
},
componentDidUpdate: function(a) {
var b = this.props.transition;
!a.show || this.props.show || b ? !a.show && this.props.show && this.onShow() : this.onHide()
},
componentWillUnmount: function() {
var a = this.props
, b = a.show
, c = a.transition;
(b || c && !this.state.exited) && this.onHide()
},
onShow: function() {
var a = t["default"](this)
, b = F["default"](this.props.container, a.body);
G.add(this, b, this.props.containerClassName),
this._onDocumentKeyupListener = v["default"](a, "keyup", this.handleDocumentKeyUp),
this._onFocusinListener = x["default"](this.enforceFocus),
this.focus(),
this.props.onShow && this.props.onShow()
},
onHide: function() {
G.remove(this),
this._onDocumentKeyupListener.remove(),
this._onFocusinListener.remove(),
this.restoreLastFocus()
},
setMountNode: function(a) {
this.mountNode = a ? a.getMountNode() : a
},
handleHidden: function() {
if (this.setState({
exited: !0
}),
this.onHide(),
this.props.onExited) {
var a;
(a = this.props).onExited.apply(a, arguments)
}
},
handleBackdropClick: function(a) {
a.target === a.currentTarget && (this.props.onBackdropClick && this.props.onBackdropClick(a),
this.props.backdrop === !0 && this.props.onHide())
},
handleDocumentKeyUp: function(a) {
this.props.keyboard && 27 === a.keyCode && this.isTopModal() && (this.props.onEscapeKeyUp && this.props.onEscapeKeyUp(a),
this.props.onHide())
},
checkForFocus: function() {
z["default"] && (this.lastFocus = B["default"]())
},
focus: function() {
var a = this.props.autoFocus
, b = this.getDialogElement()
, c = B["default"](t["default"](this))
, d = c && D["default"](b, c);
b && a && !d && (this.lastFocus = c,
b.hasAttribute("tabIndex") || (b.setAttribute("tabIndex", -1),
j["default"](!1, 'The modal content node does not accept focus. For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".')),
b.focus())
},
restoreLastFocus: function() {
this.lastFocus && this.lastFocus.focus && (this.lastFocus.focus(),
this.lastFocus = null )
},
enforceFocus: function I() {
var I = this.props.enforceFocus;
if (I && this.isMounted() && this.isTopModal()) {
var a = B["default"](t["default"](this))
, b = this.getDialogElement();
b && b !== a && !D["default"](b, a) && b.focus()
}
},
getDialogElement: function() {
var a = this.refs.modal;
return a && a.lastChild
},
isTopModal: function() {
return G.isTopModal(this)
}
});
H.manager = G,
b["default"] = H,
a.exports = b["default"]
}
, function(a, b, c) {
(function(b) {
"use strict";
var c = function() {}
;
"production" !== b.env.NODE_ENV && (c = function(a, b, c) {
var d = arguments.length;
c = new Array(d > 2 ? d - 2 : 0);
for (var e = 2; d > e; e++)
c[e - 2] = arguments[e];
if (void 0 === b)
throw new Error("`warning(condition, format, ...args)` requires a warning message argument");
if (b.length < 10 || /^[s\W]*$/.test(b))
throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: " + b);
if (!a) {
var f = 0
, g = "Warning: " + b.replace(/%s/g, function() {
return c[f++]
});
"undefined" != typeof console && console.error(g);
try {
throw new Error(g)
} catch (h) {}
}
}
),
a.exports = c
}
).call(b, c(28))
}
, function(a, b, c) {
"use strict";
function d(a, b, c) {
return "object" != typeof a[b] || "function" != typeof a[b].render && 1 !== a[b].nodeType ? new Error(e.errMsg(a, b, c, ", expected a DOM element or an object that has a `render` method")) : void 0
}
b.__esModule = !0;
var e = c(48);
b["default"] = e.createChainableTypeChecker(d),
a.exports = b["default"]
}
, function(a, b) {
"use strict";
function c(a, b, c, d) {
return "Invalid prop '" + b + "' of value '" + a[b] + "'" + (" supplied to '" + c + "'" + d)
}
function d(a) {
function b(b, c, d, e) {
return e = e || "<<anonymous>>",
null != c[d] ? a(c, d, e) : b ? new Error("Required prop '" + d + "' was not specified in '" + e + "'.") : void 0
}
var c = b.bind(null , !1);
return c.isRequired = b.bind(null , !0),
c
}
b.__esModule = !0,
b.errMsg = c,
b.createChainableTypeChecker = d
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e(a, b, c) {
var d = h.errMsg(a, b, c, ". Expected an Element `type`");
if ("function" != typeof a[b]) {
if (g["default"].isValidElement(a[b]))
return new Error(d + ", not an actual Element");
if ("string" != typeof a[b])
return new Error(d + " such as a tag name or return value of React.createClass(...)")
}
}
b.__esModule = !0;
var f = c(2)
, g = d(f)
, h = c(48);
b["default"] = h.createChainableTypeChecker(e),
a.exports = b["default"]
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
b.__esModule = !0;
var e = c(2)
, f = d(e)
, g = c(3)
, h = d(g)
, i = c(47)
, j = d(i)
, k = c(51)
, l = d(k)
, m = c(53)
, n = d(m)
, o = f["default"].createClass({
displayName: "Portal",
propTypes: {
container: f["default"].PropTypes.oneOfType([j["default"], f["default"].PropTypes.func])
},
componentDidMount: function() {
this._renderOverlay()
},
componentDidUpdate: function() {
this._renderOverlay()
},
componentWillReceiveProps: function(a) {
this._overlayTarget && a.container !== this.props.container && (this._portalContainerNode.removeChild(this._overlayTarget),
this._portalContainerNode = n["default"](a.container, l["default"](this).body),
this._portalContainerNode.appendChild(this._overlayTarget))
},
componentWillUnmount: function() {
this._unrenderOverlay(),
this._unmountOverlayTarget()
},
_mountOverlayTarget: function() {
this._overlayTarget || (this._overlayTarget = document.createElement("div"),
this._portalContainerNode = n["default"](this.props.container, l["default"](this).body),
this._portalContainerNode.appendChild(this._overlayTarget))
},
_unmountOverlayTarget: function() {
this._overlayTarget && (this._portalContainerNode.removeChild(this._overlayTarget),
this._overlayTarget = null ),
this._portalContainerNode = null
},
_renderOverlay: function() {
var a = this.props.children ? f["default"].Children.only(this.props.children) : null ;
null !== a ? (this._mountOverlayTarget(),
this._overlayInstance = h["default"].unstable_renderSubtreeIntoContainer(this, a, this._overlayTarget)) : (this._unrenderOverlay(),
this._unmountOverlayTarget())
},
_unrenderOverlay: function() {
this._overlayTarget && (h["default"].unmountComponentAtNode(this._overlayTarget),
this._overlayInstance = null )
},
render: function() {
return null
},
getMountNode: function() {
return this._overlayTarget
},
getOverlayDOMNode: function() {
if (!this.isMounted())
throw new Error("getOverlayDOMNode(): A component must be mounted to have a DOM node.");
return this._overlayInstance ? this._overlayInstance.getWrappedDOMNode ? this._overlayInstance.getWrappedDOMNode() : h["default"].findDOMNode(this._overlayInstance) : null
}
});
b["default"] = o,
a.exports = b["default"]
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
b.__esModule = !0;
var e = c(3)
, f = d(e)
, g = c(52)
, h = d(g);
b["default"] = function(a) {
return h["default"](f["default"].findDOMNode(a))
}
,
a.exports = b["default"]
}
, function(a, b) {
"use strict";
function c(a) {
return a && a.ownerDocument || document
}
b.__esModule = !0,
b["default"] = c,
a.exports = b["default"]
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e(a, b) {
return a = "function" == typeof a ? a() : a,
g["default"].findDOMNode(a) || b
}
b.__esModule = !0,
b["default"] = e;
var f = c(3)
, g = d(f);
a.exports = b["default"]
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e(a, b) {
if (!(a instanceof b))
throw new TypeError("Cannot call a class as a function")
}
function f(a, b) {
var c = -1;
return a.some(function(a, d) {
return b(a, d) ? (c = d,
!0) : void 0
}),
c
}
function g(a, b) {
return f(a, function(a) {
return -1 !== a.modals.indexOf(b)
})
}
b.__esModule = !0;
var h = c(55)
, i = d(h)
, j = c(63)
, k = d(j)
, l = c(67)
, m = d(l)
, n = c(69)
, o = d(n)
, p = c(71)
, q = function() {
function a() {
var b = arguments.length <= 0 || void 0 === arguments[0] ? !0 : arguments[0];
e(this, a),
this.hideSiblingNodes = b,
this.modals = [],
this.containers = [],
this.data = []
}
return a.prototype.add = function(a, b, c) {
var d = this.modals.indexOf(a)
, e = this.containers.indexOf(b);
if (-1 !== d)
return d;
if (d = this.modals.length,
this.modals.push(a),
this.hideSiblingNodes && p.hideSiblings(b, a.mountNode),
-1 !== e)
return this.data[e].modals.push(a),
d;
var f = {
modals: [a],
classes: c ? c.split(/\s+/) : [],
style: {
overflow: b.style.overflow,
paddingRight: b.style.paddingRight
}
}
, g = {
overflow: "hidden"
};
return f.overflowing = o["default"](b),
f.overflowing && (g.paddingRight = parseInt(i["default"](b, "paddingRight") || 0, 10) + m["default"]() + "px"),
i["default"](b, g),
f.classes.forEach(k["default"].addClass.bind(null , b)),
this.containers.push(b),
this.data.push(f),
d
}
,
a.prototype.remove = function(a) {
var b = this.modals.indexOf(a);
if (-1 !== b) {
var c = g(this.data, a)
, d = this.data[c]
, e = this.containers[c];
d.modals.splice(d.modals.indexOf(a), 1),
this.modals.splice(b, 1),
0 === d.modals.length ? (Object.keys(d.style).forEach(function(a) {
return e.style[a] = d.style[a]
}),
d.classes.forEach(k["default"].removeClass.bind(null , e)),
this.hideSiblingNodes && p.showSiblings(e, a.mountNode),
this.containers.splice(c, 1),
this.data.splice(c, 1)) : this.hideSiblingNodes && p.ariaHidden(!1, d.modals[d.modals.length - 1].mountNode)
}
}
,
a.prototype.isTopModal = function(a) {
return !!this.modals.length && this.modals[this.modals.length - 1] === a
}
,
a
}();
b["default"] = q,
a.exports = b["default"]
}
, function(a, b, c) {
"use strict";
var d = c(56)
, e = c(58)
, f = c(60)
, g = c(62)
, h = Object.prototype.hasOwnProperty;
a.exports = function(a, b, c) {
var i = ""
, j = b;
if ("string" == typeof b) {
if (void 0 === c)
return a.style[d(b)] || f(a).getPropertyValue(e(b));
(j = {})[b] = c
}
for (var k in j)
h.call(j, k) && (j[k] || 0 === j[k] ? i += e(k) + ":" + j[k] + ";" : g(a, e(k)));
a.style.cssText += ";" + i
}
}
, function(a, b, c) {
"use strict";
var d = c(57)
, e = /^-ms-/;
a.exports = function(a) {
return d(a.replace(e, "ms-"))
}
}
, function(a, b) {
"use strict";
var c = /-(.)/g;
a.exports = function(a) {
return a.replace(c, function(a, b) {
return b.toUpperCase()
})
}
}
, function(a, b, c) {
"use strict";
var d = c(59)
, e = /^ms-/;
a.exports = function(a) {
return d(a).replace(e, "-ms-")
}
}
, function(a, b) {
"use strict";
var c = /([A-Z])/g;
a.exports = function(a) {
return a.replace(c, "-$1").toLowerCase()
}
}
, function(a, b, c) {
"use strict";
var d = c(61)
, e = c(56)
, f = d.interopRequireDefault(e)
, g = /^(top|right|bottom|left)$/
, h = /^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i;
a.exports = function(a) {
if (!a)
throw new TypeError("No Element passed to `getComputedStyle()`");
var b = a.ownerDocument;
return "defaultView" in b ? b.defaultView.opener ? a.ownerDocument.defaultView.getComputedStyle(a, null ) : window.getComputedStyle(a, null ) : {
getPropertyValue: function(b) {
var c = a.style;
b = (0,
f["default"])(b),
"float" == b && (b = "styleFloat");
var d = a.currentStyle[b] || null ;
if (null == d && c && c[b] && (d = c[b]),
h.test(d) && !g.test(b)) {
var e = c.left
, i = a.runtimeStyle
, j = i && i.left;
j && (i.left = a.currentStyle.left),
c.left = "fontSize" === b ? "1em" : d,
d = c.pixelLeft + "px",
c.left = e,
j && (i.left = j)
}
return d
}
}
}
}
, function(a, b, c) {
var d, e, f;
!function(c, g) {
e = [b],
d = g,
f = "function" == typeof d ? d.apply(b, e) : d,
!(void 0 !== f && (a.exports = f))
}(this, function(a) {
var b = a;
b.interopRequireDefault = function(a) {
return a && a.__esModule ? a : {
"default": a
}
}
,
b._extends = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
})
}
, function(a, b) {
"use strict";
a.exports = function(a, b) {
return "removeProperty" in a.style ? a.style.removeProperty(b) : a.style.removeAttribute(b)
}
}
, function(a, b, c) {
"use strict";
a.exports = {
addClass: c(64),
removeClass: c(66),
hasClass: c(65)
}
}
, function(a, b, c) {
"use strict";
var d = c(65);
a.exports = function(a, b) {
a.classList ? a.classList.add(b) : d(a) || (a.className = a.className + " " + b)
}
}
, function(a, b) {
"use strict";
a.exports = function(a, b) {
return a.classList ? !!b && a.classList.contains(b) : -1 !== (" " + a.className + " ").indexOf(" " + b + " ")
}
}
, function(a, b) {
"use strict";
a.exports = function(a, b) {
a.classList ? a.classList.remove(b) : a.className = a.className.replace(new RegExp("(^|\\s)" + b + "(?:\\s|$)","g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "")
}
}
, function(a, b, c) {
"use strict";
var d, e = c(68);
a.exports = function(a) {
if ((!d || a) && e) {
var b = document.createElement("div");
b.style.position = "absolute",
b.style.top = "-9999px",
b.style.width = "50px",
b.style.height = "50px",
b.style.overflow = "scroll",
document.body.appendChild(b),
d = b.offsetWidth - b.clientWidth,
document.body.removeChild(b)
}
return d
}
}
, function(a, b) {
"use strict";
a.exports = !("undefined" == typeof window || !window.document || !window.document.createElement)
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e(a) {
return a && "body" === a.tagName.toLowerCase()
}
function f(a) {
var b = k["default"](a)
, c = i["default"](b)
, d = c.innerWidth;
if (!d) {
var e = b.documentElement.getBoundingClientRect();
d = e.right - Math.abs(e.left)
}
return b.body.clientWidth < d
}
function g(a) {
var b = i["default"](a);
return b || e(a) ? f(a) : a.scrollHeight > a.clientHeight
}
b.__esModule = !0,
b["default"] = g;
var h = c(70)
, i = d(h)
, j = c(52)
, k = d(j);
a.exports = b["default"]
}
, function(a, b) {
"use strict";
a.exports = function(a) {
return a === a.window ? a : 9 === a.nodeType ? a.defaultView || a.parentWindow : !1
}
}
, function(a, b) {
"use strict";
function c(a, b) {
b && (a ? b.setAttribute("aria-hidden", "true") : b.removeAttribute("aria-hidden"))
}
function d(a, b) {
h(a, b, function(a) {
return c(!0, a)
})
}
function e(a, b) {
h(a, b, function(a) {
return c(!1, a)
})
}
b.__esModule = !0,
b.ariaHidden = c,
b.hideSiblings = d,
b.showSiblings = e;
var f = ["template", "script", "style"]
, g = function(a) {
var b = a.nodeType
, c = a.tagName;
return 1 === b && -1 === f.indexOf(c.toLowerCase())
}
, h = function(a, b, c) {
b = [].concat(b),
[].forEach.call(a.children, function(a) {
-1 === b.indexOf(a) && g(a) && c(a)
})
}
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
b.__esModule = !0;
var e = c(73)
, f = d(e)
, g = c(74)
, h = d(g);
b["default"] = function(a, b, c) {
return f["default"](a, b, c),
{
remove: function() {
h["default"](a, b, c)
}
}
}
,
a.exports = b["default"]
}
, function(a, b, c) {
"use strict";
var d = c(68)
, e = function() {}
;
d && (e = function() {
return document.addEventListener ? function(a, b, c, d) {
return a.addEventListener(b, c, d || !1)
}
: document.attachEvent ? function(a, b, c) {
return a.attachEvent("on" + b, c)
}
: void 0
}()),
a.exports = e
}
, function(a, b, c) {
"use strict";
var d = c(68)
, e = function() {}
;
d && (e = function() {
return document.addEventListener ? function(a, b, c, d) {
return a.removeEventListener(b, c, d || !1)
}
: document.attachEvent ? function(a, b, c) {
return a.detachEvent("on" + b, c)
}
: void 0
}()),
a.exports = e
}
, function(a, b) {
"use strict";
function c(a) {
var b = !document.addEventListener
, c = void 0;
return b ? (document.attachEvent("onfocusin", a),
c = function() {
return document.detachEvent("onfocusin", a)
}
) : (document.addEventListener("focus", a, !0),
c = function() {
return document.removeEventListener("focus", a, !0)
}
),
{
remove: c
}
}
b.__esModule = !0,
b["default"] = c,
a.exports = b["default"]
}
, function(a, b, c) {
"use strict";
function d() {
var a = void 0 === arguments[0] ? document : arguments[0];
try {
return a.activeElement
} catch (b) {}
}
var e = c(61);
b.__esModule = !0,
b["default"] = d;
var f = c(52);
e.interopRequireDefault(f),
a.exports = b["default"]
}
, function(a, b, c) {
"use strict";
var d = c(68)
, e = function() {
var a = d && document.documentElement;
return a && a.contains ? function(a, b) {
return a.contains(b)
}
: a && a.compareDocumentPosition ? function(a, b) {
return a === b || !!(16 & a.compareDocumentPosition(b))
}
: function(a, b) {
if (b)
do
if (b === a)
return !0;
while (b = b.parentNode);return !1
}
}();
a.exports = e
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e(a, b) {
var c = {};
for (var d in a)
b.indexOf(d) >= 0 || Object.prototype.hasOwnProperty.call(a, d) && (c[d] = a[d]);
return c
}
Object.defineProperty(b, "__esModule", {
value: !0
});
var f = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(a) {
return typeof a
}
: function(a) {
return a && "function" == typeof Symbol && a.constructor === Symbol ? "symbol" : typeof a
}
;
b["default"] = function(a, b) {
return function(c) {
var d = c.displayName || c.name || "Component";
return (0,
j["default"])(a && ("string" == typeof a || "symbol" === ("undefined" == typeof a ? "undefined" : f(a)) || "function" == typeof a), "Expected identifier to be string, symbol or function. See %s", d),
b && (0,
j["default"])("function" == typeof b, "Expected configure to be a function. See %s", d),
h["default"].createClass({
displayName: d + "ContextMenuLayer",
getDefaultProps: function() {
return {
renderTag: "div",
attributes: {}
}
},
handleContextClick: function(c) {
var e = "function" == typeof b ? b(this.props) : {};
(0,
j["default"])((0,
l["default"])(e), "Expected configure to return an object. See %s", d),
c.preventDefault(),
n["default"].dispatch({
type: "SET_PARAMS",
data: {
x: c.clientX,
y: c.clientY,
currentItem: e,
isVisible: "function" == typeof a ? a(this.props) : a
}
})
},
render: function() {
var a = this.props
, b = a.attributes
, d = b.className
, f = void 0 === d ? "" : d
, g = e(b, ["className"])
, i = a.renderTag
, j = e(a, ["attributes", "renderTag"]);
return g.className = "react-context-menu-wrapper " + f,
g.onContextMenu = this.handleContextClick,
h["default"].createElement(i, g, h["default"].createElement(c, j))
}
})
}
}
;
var g = c(2)
, h = d(g)
, i = c(79)
, j = d(i)
, k = c(80)
, l = d(k)
, m = c(26)
, n = d(m)
}
, function(a, b, c) {
(function(b) {
"use strict";
var c = function(a, c, d, e, f, g, h, i) {
if ("production" !== b.env.NODE_ENV && void 0 === c)
throw new Error("invariant requires an error message argument");
if (!a) {
var j;
if (void 0 === c)
j = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
else {
var k = [d, e, f, g, h, i]
, l = 0;
j = new Error(c.replace(/%s/g, function() {
return k[l++]
})),
j.name = "Invariant Violation"
}
throw j.framesToPop = 1,
j
}
}
;
a.exports = c
}
).call(b, c(28))
}
, function(a, b) {
function c(a) {
var b = typeof a;
return !!a && ("object" == b || "function" == b)
}
a.exports = c
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e(a, b) {
var c = {};
for (var d in a)
b.indexOf(d) >= 0 || Object.prototype.hasOwnProperty.call(a, d) && (c[d] = a[d]);
return c
}
Object.defineProperty(b, "__esModule", {
value: !0
});
var f = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, g = c(2)
, h = d(g)
, i = c(82)
, j = d(i)
, k = c(42)
, l = d(k)
, m = c(44)
, n = d(m)
, o = h["default"].PropTypes
, p = h["default"].createClass({
displayName: "MenuItem",
propTypes: {
onClick: o.func.isRequired,
data: o.object,
disabled: o.bool,
preventClose: o.bool
},
getDefaultProps: function() {
return {
disabled: !1,
data: {},
attributes: {}
}
},
handleClick: function(a) {
var b = this.props
, c = b.disabled
, d = b.onClick
, e = b.data
, f = b.preventClose;
a.preventDefault(),
c || ((0,
l["default"])(e, n["default"].getItem()),
"function" == typeof d && d(a, e),
f || n["default"].hideMenu())
},
render: function() {
var a = this.props
, b = a.disabled
, c = a.children
, d = a.attributes
, g = d.className
, i = void 0 === g ? "" : g
, k = e(d, ["className"])
, l = "react-context-menu-item " + i
, m = (0,
j["default"])({
"react-context-menu-link": !0,
disabled: b
});
return h["default"].createElement("div", f({
className: l
}, k), h["default"].createElement("a", {
href: "#",
className: m,
onClick: this.handleClick
}, c))
}
});
b["default"] = p
}
, function(a, b, c) {
var d, e;
!function() {
"use strict";
function c() {
for (var a = [], b = 0; b < arguments.length; b++) {
var d = arguments[b];
if (d) {
var e = typeof d;
if ("string" === e || "number" === e)
a.push(d);
else if (Array.isArray(d))
a.push(c.apply(null , d));
else if ("object" === e)
for (var g in d)
f.call(d, g) && d[g] && a.push(g)
}
}
return a.join(" ")
}
var f = {}.hasOwnProperty;
"undefined" != typeof a && a.exports ? a.exports = c : (d = [],
e = function() {
return c
}
.apply(b, d),
!(void 0 !== e && (a.exports = e)))
}()
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
Object.defineProperty(b, "__esModule", {
value: !0
});
var e = c(2)
, f = d(e)
, g = c(82)
, h = d(g)
, i = c(84)
, j = d(i)
, k = {
position: "relative",
zIndex: "auto"
}
, l = f["default"].createClass({
displayName: "SubMenu",
propTypes: {
title: f["default"].PropTypes.string.isRequired,
disabled: f["default"].PropTypes.bool,
hoverDelay: f["default"].PropTypes.number
},
getDefaultProps: function() {
return {
hoverDelay: 500
}
},
getInitialState: function() {
return {
visible: !1
}
},
shouldComponentUpdate: function(a, b) {
return this.state.isVisible !== b.visible
},
handleClick: function(a) {
a.preventDefault()
},
handleMouseEnter: function() {
var a = this;
this.closetimer && clearTimeout(this.closetimer),
this.props.disabled || this.state.visible || (this.opentimer = setTimeout(function() {
return a.setState({
visible: !0
})
}, this.props.hoverDelay))
},
handleMouseLeave: function() {
var a = this;
this.opentimer && clearTimeout(this.opentimer),
this.state.visible && (this.closetimer = setTimeout(function() {
return a.setState({
visible: !1
})
}, this.props.hoverDelay))
},
render: function() {
var a = this
, b = this.props
, c = b.disabled
, d = b.children
, e = b.title
, g = this.state.visible
, i = (0,
h["default"])({
"react-context-menu-link": !0,
disabled: c,
active: g
})
, l = "react-context-menu-item submenu";
return f["default"].createElement("div", {
ref: function(b) {
return a.item = b
},
className: l,
style: k,
onMouseEnter: this.handleMouseEnter,
onMouseLeave: this.handleMouseLeave
}, f["default"].createElement("a", {
href: "#",
className: i,
onClick: this.handleClick
}, e), f["default"].createElement(j["default"], {
visible: g
}, d))
}
});
b["default"] = l
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
Object.defineProperty(b, "__esModule", {
value: !0
});
var e = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, f = c(2)
, g = d(f)
, h = g["default"].createClass({
displayName: "SubMenuWrapper",
propTypes: {
visible: g["default"].PropTypes.bool
},
getInitialState: function() {
return {
position: {
top: !0,
right: !0
}
}
},
componentWillReceiveProps: function(a) {
var b = this;
if (a.visible) {
var c = window.requestAnimationFrame || setTimeout;
c(function() {
b.setState(b.getMenuPosition()),
b.forceUpdate()
})
} else
this.setState(this.getInitialState())
},
shouldComponentUpdate: function(a) {
return this.props.visible !== a.visible
},
getMenuPosition: function() {
var a = window
, b = a.innerWidth
, c = a.innerHeight
, d = this.menu.getBoundingClientRect()
, e = {};
return d.bottom > c ? e.bottom = !0 : e.top = !0,
d.right > b ? e.left = !0 : e.right = !0,
{
position: e
}
},
getPositionStyles: function() {
var a = {}
, b = this.state.position;
return b.top && (a.top = 0),
b.bottom && (a.bottom = 0),
b.right && (a.left = "100%"),
b.left && (a.right = "100%"),
a
},
render: function() {
var a = this
, b = this.props
, c = b.children
, d = b.visible
, f = e({
display: d ? "block" : "none",
position: "absolute"
}, this.getPositionStyles());
return g["default"].createElement("nav", {
ref: function(b) {
return a.menu = b
},
style: f,
className: "react-context-menu"
}, c)
}
});
b["default"] = h
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
Object.defineProperty(b, "__esModule", {
value: !0
});
var e = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
;
b["default"] = function(a) {
var b = a.displayName || a.name || "Component";
return g["default"].createClass({
displayName: "ContextMenuConnector(" + b + ")",
getInitialState: function() {
return {
item: i["default"].getState().currentItem
}
},
componentDidMount: function() {
this.unsubscribe = i["default"].subscribe(this.handleUpdate)
},
componentWillUnmount: function() {
this.unsubscribe()
},
handleUpdate: function() {
this.setState(this.getInitialState())
},
render: function() {
return g["default"].createElement(a, e({}, this.props, {
item: this.state.item
}))
}
})
}
;
var f = c(2)
, g = d(f)
, h = c(26)
, i = d(h)
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
var e = c(3)
, f = d(e)
, g = {
appendScrollShim: function() {
if (!this._scrollShim) {
var a = this._scrollShimSize()
, b = document.createElement("div");
b.classList ? b.classList.add("react-grid-ScrollShim") : b.className += " react-grid-ScrollShim",
b.style.position = "absolute",
b.style.top = 0,
b.style.left = 0,
b.style.width = a.width + "px",
b.style.height = a.height + "px",
f["default"].findDOMNode(this).appendChild(b),
this._scrollShim = b
}
this._scheduleRemoveScrollShim()
},
_scrollShimSize: function() {
return {
width: this.props.width,
height: this.props.length * this.props.rowHeight
}
},
_scheduleRemoveScrollShim: function() {
this._scheduleRemoveScrollShimTimer && clearTimeout(this._scheduleRemoveScrollShimTimer),
this._scheduleRemoveScrollShimTimer = setTimeout(this._removeScrollShim, 200)
},
_removeScrollShim: function() {
this._scrollShim && (this._scrollShim.parentNode.removeChild(this._scrollShim),
this._scrollShim = void 0)
}
};
a.exports = g
}
, function(a, b, c) {
"use strict";
var d = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, e = c(2)
, f = c(6)
, g = c(88)
, h = c(8)
, i = c(10)
, j = c(94)
, k = e.PropTypes
, l = e.createClass({
displayName: "Row",
propTypes: {
height: k.number.isRequired,
columns: k.oneOfType([k.object, k.array]).isRequired,
row: k.any.isRequired,
cellRenderer: k.func,
cellMetaData: k.shape(j),
isSelected: k.bool,
idx: k.number.isRequired,
key: k.string,
expandedRows: k.arrayOf(k.object),
extraClasses: k.string
},
mixins: [i],
getDefaultProps: function() {
return {
cellRenderer: g,
isSelected: !1,
height: 35
}
},
shouldComponentUpdate: function(a) {
return !h.sameColumns(this.props.columns, a.columns, h.sameColumn) || this.doesRowContainSelectedCell(this.props) || this.doesRowContainSelectedCell(a) || this.willRowBeDraggedOver(a) || a.row !== this.props.row || this.hasRowBeenCopied() || this.props.isSelected !== a.isSelected || a.height !== this.props.height
},
handleDragEnter: function() {
var a = this.props.cellMetaData.handleDragEnterRow;
a && a(this.props.idx)
},
getSelectedColumn: function() {
if (this.props.cellMetaData) {
var a = this.props.cellMetaData.selected;
if (a && a.idx)
return this.getColumn(this.props.columns, a.idx)
}
},
getCells: function() {
var a = this
, b = []
, c = []
, d = this.getSelectedColumn();
return this.props.columns && this.props.columns.forEach(function(f, g) {
var h = a.props.cellRenderer
, i = e.createElement(h, {
ref: g,
key: f.key + "-" + g,
idx: g,
rowIdx: a.props.idx,
value: a.getCellValue(f.key || g),
column: f,
height: a.getRowHeight(),
formatter: f.formatter,
cellMetaData: a.props.cellMetaData,
rowData: a.props.row,
selectedColumn: d,
isRowSelected: a.props.isSelected
});
f.locked ? c.push(i) : b.push(i)
}),
b.concat(c)
},
getRowHeight: function() {
var a = this.props.expandedRows || null ;
if (a && this.props.key) {
var b = a[this.props.key] || null ;
if (b)
return b.height
}
return this.props.height
},
getCellValue: function(a) {
var b = void 0;
return "select-row" === a ? this.props.isSelected : b = "function" == typeof this.props.row.get ? this.props.row.get(a) : this.props.row[a]
},
setScrollLeft: function(a) {
var b = this;
this.props.columns.forEach(function(c, d) {
if (c.locked) {
if (!b.refs[d])
return;
b.refs[d].setScrollLeft(a)
}
})
},
doesRowContainSelectedCell: function(a) {
var b = a.cellMetaData.selected;
return !(!b || b.rowIdx !== a.idx)
},
isContextMenuDisplayed: function() {
if (this.props.cellMetaData) {
var a = this.props.cellMetaData.selected;
if (a && a.contextMenuDisplayed && a.rowIdx === this.props.idx)
return !0
}
return !1
},
willRowBeDraggedOver: function(a) {
var b = a.cellMetaData.dragged;
return null != b && (b.rowIdx >= 0 || b.complete === !0)
},
hasRowBeenCopied: function() {
var a = this.props.cellMetaData.copied;
return null != a && a.rowIdx === this.props.idx
},
renderCell: function(a) {
return "function" == typeof this.props.cellRenderer && this.props.cellRenderer.call(this, a),
e.isValidElement(this.props.cellRenderer) ? e.cloneElement(this.props.cellRenderer, a) : this.props.cellRenderer(a)
},
render: function() {
var a = f("react-grid-Row", "react-grid-Row--" + (this.props.idx % 2 === 0 ? "even" : "odd"), {
"row-selected": this.props.isSelected,
"row-context-menu": this.isContextMenuDisplayed()
}, this.props.extraClasses)
, b = {
height: this.getRowHeight(this.props),
overflow: "hidden"
}
, c = this.getCells();
return e.createElement("div", d({}, this.props, {
className: a,
style: b,
onDragEnter: this.handleDragEnter
}), e.isValidElement(this.props.row) ? this.props.row : c)
}
});
a.exports = l
}
, function(a, b, c) {
"use strict";
var d = Object.assign || function(a) {
for (var b = 1; b < arguments.length; b++) {
var c = arguments[b];
for (var d in c)
Object.prototype.hasOwnProperty.call(c, d) && (a[d] = c[d])
}
return a
}
, e = c(2)
, f = c(3)
, g = c(6)
, h = c(89)
, i = c(15)
, j = c(93)
, k = c(94)
, l = c(95)
, m = c(10)
, n = e.createClass({
displayName: "Cell",
propTypes: {
rowIdx: e.PropTypes.number.isRequired,
idx: e.PropTypes.number.isRequired,
selected: e.PropTypes.shape({
idx: e.PropTypes.number.isRequired
}),
selectedColumn: e.PropTypes.object,
height: e.PropTypes.number,
tabIndex: e.PropTypes.number,
ref: e.PropTypes.string,
column: e.PropTypes.shape(i).isRequired,
value: e.PropTypes.oneOfType([e.PropTypes.string, e.PropTypes.number, e.PropTypes.object, e.PropTypes.bool]).isRequired,
isExpanded: e.PropTypes.bool,
isRowSelected: e.PropTypes.bool,
cellMetaData: e.PropTypes.shape(k).isRequired,
handleDragStart: e.PropTypes.func,
className: e.PropTypes.string,
cellControls: e.PropTypes.any,
rowData: e.PropTypes.object.isRequired
},
getDefaultProps: function() {
return {
tabIndex: -1,
ref: "cell",
isExpanded: !1
}
},
getInitialState: function() {
return {
isRowChanging: !1,
isCellValueChanging: !1
}
},
componentDidMount: function() {
this.checkFocus()
},
componentWillReceiveProps: function(a) {
this.setState({
isRowChanging: this.props.rowData !== a.rowData,
isCellValueChanging: this.props.value !== a.value
})
},
componentDidUpdate: function() {
this.checkFocus();
var a = this.props.cellMetaData.dragged;
a && a.complete === !0 && this.props.cellMetaData.handleTerminateDrag(),
this.state.isRowChanging && null != this.props.selectedColumn && this.applyUpdateClass()
},
shouldComponentUpdate: function(a) {
return this.props.column.width !== a.column.width || this.props.column.left !== a.column.left || this.props.rowData !== a.rowData || this.props.height !== a.height || this.props.rowIdx !== a.rowIdx || this.isCellSelectionChanging(a) || this.isDraggedCellChanging(a) || this.isCopyCellChanging(a) || this.props.isRowSelected !== a.isRowSelected || this.isSelected() || this.props.value !== a.value
},
onCellClick: function(a) {
var b = this.props.cellMetaData;
null != b && b.onCellClick && "function" == typeof b.onCellClick && b.onCellClick({
rowIdx: this.props.rowIdx,
idx: this.props.idx
}, a)
},
onCellContextMenu: function() {
var a = this.props.cellMetaData;
null != a && a.onCellContextMenu && "function" == typeof a.onCellContextMenu && a.onCellContextMenu({
rowIdx: this.props.rowIdx,
idx: this.props.idx
})
},
onCellDoubleClick: function(a) {
var b = this.props.cellMetaData;
null != b && b.onCellDoubleClick && "function" == typeof b.onCellDoubleClick && b.onCellDoubleClick({
rowIdx: this.props.rowIdx,
idx: this.props.idx
}, a)
},
onDragHandleDoubleClick: function(a) {
a.stopPropagation();
var b = this.props.cellMetaData;
null != b && b.onDragHandleDoubleClick && "function" == typeof b.onDragHandleDoubleClick && b.onDragHandleDoubleClick({
rowIdx: this.props.rowIdx,
idx: this.props.idx,
rowData: this.getRowData(),
e: a
})
},
onDragOver: function(a) {
a.preventDefault()
},
getStyle: function() {
var a = {
position: "absolute",
width: this.props.column.width,
height: this.props.height,
left: this.props.column.left
};
return a
},
getFormatter: function() {
var a = this.props.column;
return this.isActive() ? e.createElement(h, {
rowData: this.getRowData(),
rowIdx: this.props.rowIdx,
idx: this.props.idx,
cellMetaData: this.props.cellMetaData,
column: a,
height: this.props.height
}) : this.props.column.formatter
},
getRowData: function() {
return this.props.rowData.toJSON ? this.props.rowData.toJSON() : this.props.rowData
},
getFormatterDependencies: function() {
return "function" == typeof this.props.column.getRowMetaData ? this.props.column.getRowMetaData(this.getRowData(), this.props.column) : void 0
},
getCellClass: function() {
var a = g(this.props.column.cellClass, "react-grid-Cell", this.props.className, this.props.column.locked ? "react-grid-Cell--locked" : null )
, b = g({
"row-selected": this.props.isRowSelected,
selected: this.isSelected() && !this.isActive() && this.isCellSelectEnabled(),
editing: this.isActive(),
copied: this.isCopied() || this.wasDraggedOver() || this.isDraggedOverUpwards() || this.isDraggedOverDownwards(),
"active-drag-cell": this.isSelected() || this.isDraggedOver(),
"is-dragged-over-up": this.isDraggedOverUpwards(),
"is-dragged-over-down": this.isDraggedOverDownwards(),
"was-dragged-over": this.wasDraggedOver()
});
return g(a, b)
},
getUpdateCellClass: function() {
return this.props.column.getUpdateCellClass ? this.props.column.getUpdateCellClass(this.props.selectedColumn, this.props.column, this.state.isCellValueChanging) : ""
},
isColumnSelected: function() {
var a = this.props.cellMetaData;
return null == a ? !1 : a.selected && a.selected.idx === this.props.idx
},
isSelected: function() {
var a = this.props.cellMetaData;
return null == a ? !1 : a.selected && a.selected.rowIdx === this.props.rowIdx && a.selected.idx === this.props.idx
},
isActive: function() {
var a = this.props.cellMetaData;
return null == a ? !1 : this.isSelected() && a.selected.active === !0
},
isCellSelectionChanging: function(a) {
var b = this.props.cellMetaData;
if (null == b)
return !1;
var c = a.cellMetaData.selected;
return b.selected && c ? this.props.idx === c.idx || this.props.idx === b.selected.idx : !0
},
isCellSelectEnabled: function() {
var a = this.props.cellMetaData;
return null == a ? !1 : a.enableCellSelect
},
applyUpdateClass: function() {
var a = this.getUpdateCellClass();
if (null != a && "" !== a) {
var b = f.findDOMNode(this);
b.classList ? (b.classList.remove(a),
b.classList.add(a)) : -1 === b.className.indexOf(a) && (b.className = b.className + " " + a)
}
},
setScrollLeft: function(a) {
var b = this;
if (b.isMounted()) {
var c = f.findDOMNode(this)
, d = "translate3d(" + a + "px, 0px, 0px)";
c.style.webkitTransform = d,
c.style.transform = d
}
},
isCopied: function() {
var a = this.props.cellMetaData.copied;
return a && a.rowIdx === this.props.rowIdx && a.idx === this.props.idx
},
isDraggedOver: function() {
var a = this.props.cellMetaData.dragged;
return a && a.overRowIdx === this.props.rowIdx && a.idx === this.props.idx
},
wasDraggedOver: function() {
var a = this.props.cellMetaData.dragged;
return a && (a.overRowIdx < this.props.rowIdx && this.props.rowIdx < a.rowIdx || a.overRowIdx > this.props.rowIdx && this.props.rowIdx > a.rowIdx) && a.idx === this.props.idx
},
isDraggedCellChanging: function(a) {
var b = void 0
, c = this.props.cellMetaData.dragged
, d = a.cellMetaData.dragged;
return c ? b = d && this.props.idx === d.idx || c && this.props.idx === c.idx : !1
},
isCopyCellChanging: function(a) {
var b = void 0
, c = this.props.cellMetaData.copied
, d = a.cellMetaData.copied;
return c ? b = d && this.props.idx === d.idx || c && this.props.idx === c.idx : !1
},
isDraggedOverUpwards: function() {
var a = this.props.cellMetaData.dragged;
return !this.isSelected() && this.isDraggedOver() && this.props.rowIdx < a.rowIdx
},
isDraggedOverDownwards: function() {
var a = this.props.cellMetaData.dragged;
return !this.isSelected() && this.isDraggedOver() && this.props.rowIdx > a.rowIdx
},
checkFocus: function() {
if (this.isSelected() && !this.isActive()) {
for (var a = f.findDOMNode(this); null != a && -1 === a.className.indexOf("react-grid-Viewport"); )
a = a.parentElement;
var b = !1;
if (null == document.activeElement || document.activeElement.nodeName && "string" == typeof document.activeElement.nodeName && "body" === document.activeElement.nodeName.toLowerCase())
b = !0;
else if (a)
for (var c = document.activeElement; null != c; ) {
if (c === a) {
b = !0;
break
}
c = c.parentElement
}
b && f.findDOMNode(this).focus()
}
},
createColumEventCallBack: function(a, b) {
return function(c) {
a(c, b)
}
},
createCellEventCallBack: function(a, b) {
return function(c) {
a(c),
b(c)
}
},
createEventDTO: function(a, b, c) {
var d = Object.assign({}, a);
for (var e in b)
if (b.hasOwnProperty(e)) {
var f = b[f]
, g = {
rowIdx: this.props.rowIdx,
idx: this.props.idx,
name: e
}
, h = this.createColumEventCallBack(c, g);
if (d.hasOwnProperty(e)) {
var i = d[e];
d[e] = this.createCellEventCallBack(i, h)
} else
d[e] = h
}
return d
},
getEvents: function() {
var a = this.props.column ? Object.assign({}, this.props.column.events) : void 0
, b = this.props.cellMetaData ? this.props.cellMetaData.onColumnEvent : void 0
, c = {
onClick: this.onCellClick,
onDoubleClick: this.onCellDoubleClick,
onDragOver: this.onDragOver
};
return a && b ? this.createEventDTO(c, a, b) : c
},
renderCellContent: function(a) {
var b = void 0
, c = this.getFormatter();
return e.isValidElement(c) ? (a.dependentValues = this.getFormatterDependencies(),
b = e.cloneElement(c, a)) : b = j(c) ? e.createElement(c, {
value: this.props.value,
dependentValues: this.getFormatterDependencies()
}) : e.createElement(l, {
value: this.props.value
}),
e.createElement("div", {
ref: "cell",
className: "react-grid-Cell__value"
}, b, " ", this.props.cellControls)
},
render: function() {
var a = this.getStyle()
, b = this.getCellClass()
, c = this.renderCellContent({
value: this.props.value,
column: this.props.column,
rowIdx: this.props.rowIdx,
isExpanded: this.props.isExpanded
})
, f = !this.isActive() && m.canEdit(this.props.column, this.props.rowData, this.props.cellMetaData.enableCellSelect) ? e.createElement("div", {
className: "drag-handle",
draggable: "true",
onDoubleClick: this.onDragHandleDoubleClick
}, e.createElement("span", {
style: {
display: "none"
}
})) : null
, g = this.getEvents();
return e.createElement("div", d({}, this.props, {
className: b,
style: a,
onContextMenu: this.onCellContextMenu
}, g), c, f)
}
});
a.exports = n
}
, function(a, b, c) {
"use strict";
var d = c(2)
, e = c(6)
, f = c(90)
, g = c(91)
, h = c(93)
, i = d.createClass({
displayName: "EditorContainer",
mixins: [f],
propTypes: {
rowIdx: d.PropTypes.number,
rowData: d.PropTypes.object.isRequired,
value: d.PropTypes.oneOfType([d.PropTypes.string, d.PropTypes.number, d.PropTypes.object, d.PropTypes.bool]).isRequired,
cellMetaData: d.PropTypes.shape({
selected: d.PropTypes.object.isRequired,
copied: d.PropTypes.object,
dragged: d.PropTypes.object,
onCellClick: d.PropTypes.func,
onCellDoubleClick: d.PropTypes.func,
onCommitCancel: d.PropTypes.func,
onCommit: d.PropTypes.func
}).isRequired,
column: d.PropTypes.object.isRequired,
height: d.PropTypes.number.isRequired
},
changeCommitted: !1,
getInitialState: function() {
return {
isInvalid: !1
}
},
componentDidMount: function() {
var a = this.getInputNode();
void 0 !== a && (this.setTextInputFocus(),
this.getEditor().disableContainerStyles || (a.className += " editor-main",
a.style.height = this.props.height - 1 + "px"))
},
componentWillUnmount: function() {
this.changeCommitted || this.hasEscapeBeenPressed() || this.commit({
key: "Enter"
})
},
createEditor: function() {
var a = this
, b = function(b) {
return a.editor = b
}
, c = {
ref: b,
column: this.props.column,
value: this.getInitialValue(),
onCommit: this.commit,
rowMetaData: this.getRowMetaData(),
height: this.props.height,
onBlur: this.commit,
onOverrideKeyDown: this.onKeyDown
}
, e = this.props.column.editor;
return e && d.isValidElement(e) ? d.cloneElement(e, c) : d.createElement(g, {
ref: b,
column: this.props.column,
value: this.getInitialValue(),
onBlur: this.commit,
rowMetaData: this.getRowMetaData(),
onKeyDown: function() {},
commit: function() {}
})
},
onPressEnter: function() {
this.commit({
key: "Enter"
})
},
onPressTab: function() {
this.commit({
key: "Tab"
})
},
onPressEscape: function(a) {
this.editorIsSelectOpen() ? a.stopPropagation() : this.props.cellMetaData.onCommitCancel()
},
onPressArrowDown: function(a) {
this.editorHasResults() ? a.stopPropagation() : this.commit(a)
},
onPressArrowUp: function(a) {
this.editorHasResults() ? a.stopPropagation() : this.commit(a)
},
onPressArrowLeft: function(a) {
this.isCaretAtBeginningOfInput() ? this.commit(a) : a.stopPropagation()
},
onPressArrowRight: function(a) {
this.isCaretAtEndOfInput() ? this.commit(a) : a.stopPropagation()
},
editorHasResults: function() {
return h(this.getEditor().hasResults) ? this.getEditor().hasResults() : !1
},
editorIsSelectOpen: function() {
return h(this.getEditor().isSelectOpen) ? this.getEditor().isSelectOpen() : !1
},
getRowMetaData: function() {
return "function" == typeof this.props.column.getRowMetaData ? this.props.column.getRowMetaData(this.props.rowData, this.props.column) : void 0
},
getEditor: function() {
return this.editor
},
getInputNode: function() {
return this.getEditor().getInputNode()
},
getInitialValue: function() {
var a = this.props.cellMetaData.selected
, b = a.initialKeyCode;
if ("Delete" === b || "Backspace" === b)
return "";
if ("Enter" === b)
return this.props.value;
var c = b ? String.fromCharCode(b) : this.props.value;
return c
},
getContainerClass: function() {
return e({
"has-error": this.state.isInvalid === !0
})
},
commit: function(a) {
var b = a || {}
, c = this.getEditor().getValue();
if (this.isNewValueValid(c)) {
this.changeCommitted = !0;
var d = this.props.column.key;
this.props.cellMetaData.onCommit({
cellKey: d,
rowIdx: this.props.rowIdx,
updated: c,
key: b.key
})
}
},
isNewValueValid: function(a) {
if (h(this.getEditor().validate)) {
var b = this.getEditor().validate(a);
return this.setState({
isInvalid: !b
}),
b
}
return !0
},
setCaretAtEndOfInput: function() {
var a = this.getInputNode()
, b = a.value.length;
if (a.setSelectionRange)
a.setSelectionRange(b, b);
else if (a.createTextRange) {
var c = a.createTextRange();
c.moveStart("character", b),
c.collapse(),
c.select()
}
},
isCaretAtBeginningOfInput: function() {
var a = this.getInputNode();
return a.selectionStart === a.selectionEnd && 0 === a.selectionStart
},
isCaretAtEndOfInput: function() {
var a = this.getInputNode();
return a.selectionStart === a.value.length
},
setTextInputFocus: function() {
var a = this.props.cellMetaData.selected
, b = a.initialKeyCode
, c = this.getInputNode();
c.focus(),
"INPUT" === c.tagName && (this.isKeyPrintable(b) ? c.select() : (c.focus(),
c.select()))
},
hasEscapeBeenPressed: function() {
var a = !1
, b = 27;
return window.event && (window.event.keyCode === b ? a = !0 : window.event.which === b && (a = !0)),
a
},
renderStatusIcon: function() {
return this.state.isInvalid === !0 ? d.createElement("span", {
className: "glyphicon glyphicon-remove form-control-feedback"
}) : void 0
},
render: function() {
return d.createElement("div", {
className: this.getContainerClass(),
onKeyDown: this.onKeyDown,
commit: this.commit
}, this.createEditor(), this.renderStatusIcon())
}
});
a.exports = i
}
, function(a, b) {
"use strict";
var c = {
onKeyDown: function(a) {
if (this.isCtrlKeyHeldDown(a))
this.checkAndCall("onPressKeyWithCtrl", a);
else if (this.isKeyExplicitlyHandled(a.key)) {
var b = "onPress" + a.key;
this.checkAndCall(b, a)
} else
this.isKeyPrintable(a.keyCode) && this.checkAndCall("onPressChar", a)
},
isKeyPrintable: function(a) {
var b = a > 47 && 58 > a || 32 === a || 13 === a || a > 64 && 91 > a || a > 95 && 112 > a || a > 185 && 193 > a || a > 218 && 223 > a;
return b
},
isKeyExplicitlyHandled: function(a) {
return "function" == typeof this["onPress" + a]
},
isCtrlKeyHeldDown: function(a) {
return a.ctrlKey === !0 && "Control" !== a.key
},
checkAndCall: function(a, b) {
"function" == typeof this[a] && this[a](b)
}
};
a.exports = c
}
, function(a, b, c) {
"use strict";
function d(a, b) {
if (!(a instanceof b))
throw new TypeError("Cannot call a class as a function")
}
function e(a, b) {
if (!a)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !b || "object" != typeof b && "function" != typeof b ? a : b
}
function f(a, b) {
if ("function" != typeof b && null !== b)
throw new TypeError("Super expression must either be null or a function, not " + typeof b);
a.prototype = Object.create(b && b.prototype, {
constructor: {
value: a,
enumerable: !1,
writable: !0,
configurable: !0
}
}),
b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b)
}
var g = function() {
function a(a, b) {
for (var c = 0; c < b.length; c++) {
var d = b[c];
d.enumerable = d.enumerable || !1,
d.configurable = !0,
"value" in d && (d.writable = !0),
Object.defineProperty(a, d.key, d)
}
}
return function(b, c, d) {
return c && a(b.prototype, c),
d && a(b, d),
b
}
}()
, h = c(2)
, i = c(92)
, j = function(a) {
function b() {
return d(this, b),
e(this, Object.getPrototypeOf(b).apply(this, arguments))
}
return f(b, a),
g(b, [{
key: "render",
value: function() {
return h.createElement("input", {
ref: "input",
type: "text",
onBlur: this.props.onBlur,
className: "form-control",
defaultValue: this.props.value
})
}
}]),
b
}(i);
a.exports = j
}
, function(a, b, c) {
"use strict";
function d(a, b) {
if (!(a instanceof b))
throw new TypeError("Cannot call a class as a function")
}
function e(a, b) {
if (!a)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !b || "object" != typeof b && "function" != typeof b ? a : b
}
function f(a, b) {
if ("function" != typeof b && null !== b)
throw new TypeError("Super expression must either be null or a function, not " + typeof b);
a.prototype = Object.create(b && b.prototype, {
constructor: {
value: a,
enumerable: !1,
writable: !0,
configurable: !0
}
}),
b && (Object.setPrototypeOf ? Object.setPrototypeOf(a, b) : a.__proto__ = b)
}
var g = function() {
function a(a, b) {
for (var c = 0; c < b.length; c++) {
var d = b[c];
d.enumerable = d.enumerable || !1,
d.configurable = !0,
"value" in d && (d.writable = !0),
Object.defineProperty(a, d.key, d)
}
}
return function(b, c, d) {
return c && a(b.prototype, c),
d && a(b, d),
b
}
}()
, h = c(2)
, i = c(3)
, j = c(15)
, k = function(a) {
function b() {
return d(this, b),
e(this, Object.getPrototypeOf(b).apply(this, arguments))
}
return f(b, a),
g(b, [{
key: "getStyle",
value: function() {
return {
width: "100%"
}
}
}, {
key: "getValue",
value: function() {
var a = {};
return a[this.props.column.key] = this.getInputNode().value,
a
}
}, {
key: "getInputNode",
value: function() {
var a = i.findDOMNode(this);
return "INPUT" === a.tagName ? a : a.querySelector("input:not([type=hidden])")
}
}, {
key: "inheritContainerStyles",
value: function() {
return !0
}
}]),
b
}(h.Component);
k.propTypes = {
onKeyDown: h.PropTypes.func.isRequired,
value: h.PropTypes.any.isRequired,
onBlur: h.PropTypes.func.isRequired,
column: h.PropTypes.shape(j).isRequired,
commit: h.PropTypes.func.isRequired
},
a.exports = k
}
, function(a, b) {
"use strict";
var c = function(a) {
var b = {};
return a && "[object Function]" === b.toString.call(a)
}
;
a.exports = c
}
, function(a, b, c) {
"use strict";
var d = c(2).PropTypes;
a.exports = {
selected: d.object.isRequired,
copied: d.object,
dragged: d.object,
onCellClick: d.func.isRequired,
onCellDoubleClick: d.func.isRequired,
onCommit: d.func.isRequired,
onCommitCancel: d.func.isRequired,
handleDragEnterRow: d.func.isRequired,
handleTerminateDrag: d.func.isRequired
}
}
, function(a, b, c) {
"use strict";
var d = c(2)
, e = d.createClass({
displayName: "SimpleCellFormatter",
propTypes: {
value: d.PropTypes.oneOfType([d.PropTypes.string, d.PropTypes.number, d.PropTypes.object, d.PropTypes.bool]).isRequired
},
shouldComponentUpdate: function(a) {
return a.value !== this.props.value
},
render: function() {
return d.createElement("div", {
title: this.props.value
}, this.props.value)
}
});
a.exports = e
}
, function(a, b, c) {
"use strict";
var d = c(2)
, e = c(3)
, f = c(97)
, g = Math.min
, h = Math.max
, i = Math.floor
, j = Math.ceil;
a.exports = {
mixins: [f.MetricsMixin],
DOMMetrics: {
viewportHeight: function() {
return e.findDOMNode(this).offsetHeight
}
},
propTypes: {
rowHeight: d.PropTypes.number,
rowsCount: d.PropTypes.number.isRequired
},
getDefaultProps: function() {
return {
rowHeight: 30
}
},
getInitialState: function() {
return this.getGridState(this.props)
},
getGridState: function(a) {
var b = j((a.minHeight - a.rowHeight) / a.rowHeight)
, c = g(2 * b, a.rowsCount);
return {
displayStart: 0,
displayEnd: c,
height: a.minHeight,
scrollTop: 0,
scrollLeft: 0
}
},
updateScroll: function(a, b, c, d, e) {
var f = j(c / d)
, k = i(a / d)
, l = g(k + f, e)
, m = h(0, k - 2 * f)
, n = g(k + 2 * f, e)
, o = {
visibleStart: k,
visibleEnd: l,
displayStart: m,
displayEnd: n,
height: c,
scrollTop: a,
scrollLeft: b
};
this.setState(o)
},
metricsUpdated: function() {
var a = this.DOMMetrics.viewportHeight();
a && this.updateScroll(this.state.scrollTop, this.state.scrollLeft, a, this.props.rowHeight, this.props.rowsCount)
},
componentWillReceiveProps: function(a) {
if (this.props.rowHeight !== a.rowHeight || this.props.minHeight !== a.minHeight)
this.setState(this.getGridState(a));
else if (this.props.rowsCount !== a.rowsCount)
this.updateScroll(this.state.scrollTop, this.state.scrollLeft, this.state.height, a.rowHeight, a.rowsCount);
else if (this.props.rowOffsetHeight !== a.rowOffsetHeight) {
var b = this.props.rowOffsetHeight - a.rowOffsetHeight;
this.updateScroll(this.state.scrollTop, this.state.scrollLeft, this.state.height + b, a.rowHeight, a.rowsCount)
}
}
}
}
, function(a, b, c) {
"use strict";
var d = c(2)
, e = c(7)
, f = {
metricsComputator: d.PropTypes.object
}
, g = {
childContextTypes: f,
getChildContext: function() {
return {
metricsComputator: this
}
},
getMetricImpl: function(a) {
return this._DOMMetrics.metrics[a].value
},
registerMetricsImpl: function(a, b) {
var c = {}
, d = this._DOMMetrics;
for (var e in b) {
if (void 0 !== d.metrics[e])
throw new Error("DOM metric " + e + " is already defined");
d.metrics[e] = {
component: a,
computator: b[e].bind(a)
},
c[e] = this.getMetricImpl.bind(null , e)
}
return -1 === d.components.indexOf(a) && d.components.push(a),
c
},
unregisterMetricsFor: function(a) {
var b = this._DOMMetrics
, c = b.components.indexOf(a);
if (c > -1) {
b.components.splice(c, 1);
var d = void 0
, e = {};
for (d in b.metrics)
b.metrics[d].component === a && (e[d] = !0);
for (d in e)
e.hasOwnProperty(d) && delete b.metrics[d]
}
},
updateMetrics: function() {
var a = this._DOMMetrics
, b = !1;
for (var c in a.metrics)
if (a.metrics.hasOwnProperty(c)) {
var d = a.metrics[c].computator();
d !== a.metrics[c].value && (b = !0),
a.metrics[c].value = d
}
if (b)
for (var e = 0, f = a.components.length; f > e; e++)
a.components[e].metricsUpdated && a.components[e].metricsUpdated()
},
componentWillMount: function() {
this._DOMMetrics = {
metrics: {},
components: []
}
},
componentDidMount: function() {
window.addEventListener ? window.addEventListener("resize", this.updateMetrics) : window.attachEvent("resize", this.updateMetrics),
this.updateMetrics()
},
componentWillUnmount: function() {
window.removeEventListener("resize", this.updateMetrics)
}
}
, h = {
contextTypes: f,
componentWillMount: function() {
if (this.DOMMetrics) {
this._DOMMetricsDefs = e(this.DOMMetrics),
this.DOMMetrics = {};
for (var a in this._DOMMetricsDefs)
this._DOMMetricsDefs.hasOwnProperty(a) && (this.DOMMetrics[a] = function() {}
)
}
},
componentDidMount: function() {
this.DOMMetrics && (this.DOMMetrics = this.registerMetrics(this._DOMMetricsDefs))
},
componentWillUnmount: function() {
return this.registerMetricsImpl ? void (this.hasOwnProperty("DOMMetrics") && delete this.DOMMetrics) : this.context.metricsComputator.unregisterMetricsFor(this)
},
registerMetrics: function(a) {
return this.registerMetricsImpl ? this.registerMetricsImpl(this, a) : this.context.metricsComputator.registerMetricsImpl(this, a)
},
getMetric: function(a) {
return this.getMetricImpl ? this.getMetricImpl(a) : this.context.metricsComputator.getMetricImpl(a)
}
};
a.exports = {
MetricsComputatorMixin: g,
MetricsMixin: h
}
}
, function(a, b) {
"use strict";
a.exports = {
componentDidMount: function() {
this._scrollLeft = this.refs.viewport ? this.refs.viewport.getScroll().scrollLeft : 0,
this._onScroll()
},
componentDidUpdate: function() {
this._onScroll()
},
componentWillMount: function() {
this._scrollLeft = void 0
},
componentWillUnmount: function() {
this._scrollLeft = void 0
},
onScroll: function(a) {
this._scrollLeft !== a.scrollLeft && (this._scrollLeft = a.scrollLeft,
this._onScroll())
},
onHeaderScroll: function(a) {
var b = a.target.scrollLeft;
if (this._scrollLeft !== b) {
this._scrollLeft = b,
this.refs.header.setScrollLeft(b);
var c = ReactDOM.findDOMNode(this.refs.viewport.refs.canvas);
c.scrollLeft = b,
this.refs.viewport.refs.canvas.setScrollLeft(b)
}
},
_onScroll: function() {
void 0 !== this._scrollLeft && (this.refs.header.setScrollLeft(this._scrollLeft),
this.refs.viewport && this.refs.viewport.setScrollLeft(this._scrollLeft))
}
}
}
, function(a, b, c) {
"use strict";
var d = c(2)
, e = d.createClass({
displayName: "CheckboxEditor",
propTypes: {
value: d.PropTypes.bool,
rowIdx: d.PropTypes.number,
column: d.PropTypes.shape({
key: d.PropTypes.string,
onCellChange: d.PropTypes.func
}),
dependentValues: d.PropTypes.object
},
handleChange: function(a) {
this.props.column.onCellChange(this.props.rowIdx, this.props.column.key, this.props.dependentValues, a)
},
render: function() {
var a = null != this.props.value ? this.props.value : !1
, b = "checkbox" + this.props.rowIdx;
return d.createElement("div", {
className: "react-grid-checkbox-container",
onClick: this.handleChange
}, d.createElement("input", {
className: "react-grid-checkbox",
type: "checkbox",
name: b,
checked: a
}), d.createElement("label", {
htmlFor: b,
className: "react-grid-checkbox-label"
}))
}
});
a.exports = e
}
, function(a, b, c) {
"use strict";
function d(a) {
return a && a.__esModule ? a : {
"default": a
}
}
function e(a, b) {
if (!(a instanceof b))
throw new TypeError("Cannot call a class as a function")
}
var f = c(3)
, g = d(f)
, h = c(8)
, i = c(97);
Object.assign = c(101);
var j = c(2).PropTypes
, k = c(10)
, l = function m() {
e(this, m)
}
;
a.exports = {
mixins: [i.MetricsMixin],
propTypes: {
columns: j.arrayOf(l),
minColumnWidth: j.number,
columnEquality: j.func,
onColumnResize: j.func
},
DOMMetrics: {
gridWidth: function() {
return g["default"].findDOMNode(this).parentElement.offsetWidth
}
},
getDefaultProps: function() {
return {
minColumnWidth: 80,
columnEquality: h.sameColumn
}
},
componentWillMount: function() {
this._mounted = !0
},
componentWillReceiveProps: function(a) {
if (a.columns && (!h.sameColumns(this.props.columns, a.columns, this.props.columnEquality) || a.minWidth !== this.props.minWidth)) {
var b = this.createColumnMetrics(a);
this.setState({
columnMetrics: b
})
}
},
getTotalWidth: function() {
var a = 0;
return a = this._mounted ? this.DOMMetrics.gridWidth() : k.getSize(this.props.columns) * this.props.minColumnWidth
},
getColumnMetricsType: function(a) {
var b = a.totalWidth || this.getTotalWidth()
, c = {
columns: a.columns,
totalWidth: b,
minColumnWidth: a.minColumnWidth
}
, d = h.recalculate(c);
return d
},
getColumn: function(a) {
var b = this.state.columnMetrics.columns;
return Array.isArray(b) ? b[a] : "undefined" != typeof Immutable ? b.get(a) : void 0
},
getSize: function() {
var a = this.state.columnMetrics.columns;
return Array.isArray(a) ? a.length : "undefined" != typeof Immutable ? a.size : void 0
},
metricsUpdated: function() {
var a = this.createColumnMetrics();
this.setState({
columnMetrics: a
})
},
createColumnMetrics: function() {
var a = arguments.length <= 0 || void 0 === arguments[0] ? this.props : arguments[0]
, b = this.setupGridColumns(a);
return this.getColumnMetricsType({
columns: b,
minColumnWidth: this.props.minColumnWidth,
totalWidth: a.minWidth
})
},
onColumnResize: function(a, b) {
var c = h.resizeColumn(this.state.columnMetrics, a, b);
this.setState({
columnMetrics: c
}),
this.props.onColumnResize && this.props.onColumnResize(a, b)
}
}
}
, function(a, b) {
"use strict";
function c(a) {
if (null == a)
throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(a)
}
a.exports = Object.assign || function(a, b) {
for (var d, e, f = c(a), g = 1; g < arguments.length; g++) {
d = arguments[g],
e = Object.keys(Object(d));
for (var h = 0; h < e.length; h++)
f[e[h]] = d[e[h]]
}
return f
}
}
, function(a, b) {
"use strict";
var c = {
get: function(a, b) {
return "function" == typeof a.get ? a.get(b) : a[b]
}
};
a.exports = c
}
])
})
}(),
System.registerDynamic("vendor/react-data-grid/index.js", ["./dist/react-data-grid.min"], !0, function(a, b, c) {
return c.exports = a("./dist/react-data-grid.min"),
c.exports
}),
System.registerDynamic("vendor/rxjs/symbol/observable.js", ["../util/root"], !0, function(a, b, c) {
"use strict";
var d = a("../util/root")
, e = d.root.Symbol;
return "function" == typeof e ? e.observable ? b.$$observable = e.observable : ("function" == typeof e["for"] ? b.$$observable = e["for"]("observable") : b.$$observable = e("observable"),
e.observable = b.$$observable) : b.$$observable = "@@observable",
c.exports
}),
System.registerDynamic("vendor/rxjs/util/toSubscriber.js", ["../Subscriber", "../symbol/rxSubscriber"], !0, function(a, b, c) {
"use strict";
function d(a, b, c) {
if (a && "object" == typeof a) {
if (a instanceof e.Subscriber)
return a;
if ("function" == typeof a[f.$$rxSubscriber])
return a[f.$$rxSubscriber]()
}
return new e.Subscriber(a,b,c)
}
var e = a("../Subscriber")
, f = a("../symbol/rxSubscriber");
return b.toSubscriber = d,
c.exports
}),
System.registerDynamic("vendor/rxjs/Observable.js", ["./util/root", "./symbol/observable", "./util/toSubscriber"], !0, function(a, b, c) {
"use strict";
var d = a("./util/root")
, e = a("./symbol/observable")
, f = a("./util/toSubscriber")
, g = function() {
function a(a) {
this._isScalar = !1,
a && (this._subscribe = a)
}
return a.prototype.lift = function(b) {
var c = new a;
return c.source = this,
c.operator = b,
c
}
,
a.prototype.subscribe = function(a, b, c) {
var d = this.operator
, e = f.toSubscriber(a, b, c);
if (e.add(d ? d.call(e, this) : this._subscribe(e)),
e.syncErrorThrowable && (e.syncErrorThrowable = !1,
e.syncErrorThrown))
throw e.syncErrorValue;
return e
}
,
a.prototype.forEach = function(a, b) {
var c = this;
if (b || (d.root.Rx && d.root.Rx.config && d.root.Rx.config.Promise ? b = d.root.Rx.config.Promise : d.root.Promise && (b = d.root.Promise)),
!b)
throw new Error("no Promise impl found");
return new b(function(b, d) {
var e = c.subscribe(function(b) {
if (e)
try {
a(b)
} catch (c) {
d(c),
e.unsubscribe()
}
else
a(b)
}, d, b)
}
)
}
,
a.prototype._subscribe = function(a) {
return this.source.subscribe(a)
}
,
a.prototype[e.$$observable] = function() {
return this
}
,
a.create = function(b) {
return new a(b)
}
,
a
}();
return b.Observable = g,
c.exports
}),
System.registerDynamic("vendor/rxjs/util/isArray.js", [], !0, function(a, b, c) {
"use strict";
return b.isArray = Array.isArray || function(a) {
return a && "number" == typeof a.length
}
,
c.exports
}),
System.registerDynamic("vendor/rxjs/util/isObject.js", [], !0, function(a, b, c) {
"use strict";
function d(a) {
return null != a && "object" == typeof a
}
return b.isObject = d,
c.exports
}),
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment