@qn-pandora/pandora-visualization
Version:
Pandora 通用可视化库
664 lines (663 loc) • 30.7 kB
JavaScript
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(require("react"));
var classnames_1 = __importDefault(require("classnames"));
var mobx_react_1 = require("mobx-react");
var react_resizable_1 = require("react-resizable");
var react_virtualized_1 = require("react-virtualized");
var icons_1 = require("@ant-design/icons");
var antd_1 = require("antd");
var lodash_1 = require("lodash");
var mobx_1 = require("mobx");
var bind_1 = __importDefault(require("../../../utils/bind"));
var language_1 = require("../../../services/language");
var type_1 = require("../../../constants/language/base/type");
var type_2 = require("../../../constants/language/data/type");
var BasicComponent_1 = __importDefault(require("../BasicComponent"));
var constants_1 = require("../../../constants");
var Header_1 = __importDefault(require("./Header"));
var Pagination_1 = __importDefault(require("./Pagination"));
var TableRow_1 = __importDefault(require("./TableRow"));
var constant_1 = require("./constant");
var columnManager_1 = require("./columnManager");
require("react-resizable/css/styles.css");
var styles = __importStar(require("./style.mless"));
var FlexTable = /** @class */ (function (_super) {
__extends(FlexTable, _super);
function FlexTable() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.data = [];
_this.pagination = _this.getDefaultPagination();
_this.columns = [];
_this.scrollWidth = 0;
_this.rowLevels = 0;
_this.filters = [];
_this.scrollToRowIndex = constant_1.DEFAULT_SCROLL_ROW_INDEX;
_this.scroll = function () {
var maxIndex = _this.currentPageData.length - 1;
var scrollToRowIndex = _this.scrollToRowIndex < maxIndex
? _this.scrollToRowIndex + 1
: constant_1.DEFAULT_SCROLL_ROW_INDEX;
if (_this.vListRef) {
_this.setScrollToRowIndex(scrollToRowIndex);
_this.vListRef.scrollToRow(scrollToRowIndex);
}
};
_this.handleEnter = function () {
clearInterval(_this.timer);
};
_this.handleLeave = function () {
_this.createTimer(_this.props.pageScroll, _this.props.autoplaySpeed);
};
_this.clearTimer = function () {
if (_this.timer) {
clearInterval(_this.timer);
}
_this.setScrollToRowIndex(constant_1.DEFAULT_SCROLL_ROW_INDEX);
};
_this.createTimer = function (pageScroll, autoplaySpeed) {
if (pageScroll && autoplaySpeed) {
_this.clearTimer();
_this.timer = setInterval(_this.scroll, autoplaySpeed * 1000);
}
};
_this.componentWillUnmount = function () {
_this.clearTimer();
};
_this.debounceTableSizeChange = lodash_1.debounce(function (scrollWidth) {
var onResizeChange = _this.props.onResizeChange;
if (onResizeChange) {
onResizeChange(scrollWidth);
}
}, 500);
_this.cache = new react_virtualized_1.CellMeasurerCache({
defaultHeight: 44,
fixedWidth: true
});
return _this;
}
FlexTable.prototype.componentDidMount = function () {
this.setData(this.props.dataSource);
this.setColumns(this.props.columns);
this.setFilters(this.getColumnfilters(this.props.columns));
this.getTableData(this.props.dataSource);
if (this.props.scrollWidth) {
this.setTableScrollWidth(this.props.scrollWidth);
}
if (this.props.pagination) {
var newPagination = __assign(__assign({}, constant_1.defaultPagination), this.props.pagination);
this.initPagination(newPagination);
}
this.createTimer(this.props.pageScroll, this.props.autoplaySpeed);
};
FlexTable.prototype.componentWillReceiveProps = function (nextProps) {
if (!lodash_1.isEqual(this.props.dataSource, nextProps.dataSource)) {
this.setData(nextProps.dataSource);
}
if (!lodash_1.isEqual(this.props.pagination, nextProps.pagination) &&
nextProps.pagination) {
var newPagination = __assign(__assign(__assign({}, constant_1.defaultPagination), this.props.pagination), nextProps.pagination);
this.initPagination(newPagination);
}
if (!lodash_1.isEqual(this.props.columns, nextProps.columns)) {
this.setColumns(nextProps.columns);
this.setFilters(this.getColumnfilters(nextProps.columns));
// 如果数据变更,使用外部传入的数据。否则使用内部数据。
if (!lodash_1.isEqual(this.props.dataSource, nextProps.dataSource)) {
this.getTableData(nextProps.dataSource);
}
else {
this.getTableData(this.data);
}
}
if (this.props.scrollWidth !== nextProps.scrollWidth &&
nextProps.scrollWidth) {
this.setTableScrollWidth(nextProps.scrollWidth);
}
if (nextProps.pageScroll !== this.props.pageScroll ||
nextProps.autoplaySpeed !== this.props.autoplaySpeed) {
this.createTimer(nextProps.pageScroll, nextProps.autoplaySpeed);
}
};
Object.defineProperty(FlexTable.prototype, "currentPageData", {
get: function () {
var data = this.data;
var current;
var pageSize;
// 如果没有分页的话,默认全部展示
if (!this.props.pagination) {
pageSize = Number.MAX_VALUE;
current = 1;
}
else {
pageSize = this.pagination.pageSize;
current = this.getMaxCurrent(this.pagination.total || data.length);
}
if (data.length > pageSize || pageSize === Number.MAX_VALUE) {
data = data.filter(function (_, i) {
return i >= (current - 1) * pageSize && i < current * pageSize;
});
}
return data;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FlexTable.prototype, "showPagination", {
// 获取是否显示分页的配置信息
get: function () {
return lodash_1.isUndefined(this.props.showPagination)
? true
: this.props.showPagination;
},
enumerable: false,
configurable: true
});
FlexTable.prototype.getColumnfilters = function (columns) {
var filters = [];
columns.forEach(function (col) {
if (col.filters && col.filters.length) {
filters.push({ key: col.dataIndex, value: col.filters || [] });
}
});
return filters;
};
FlexTable.prototype.handleCellResize = function (_a, dataIndex) {
var size = _a.size;
if (!dataIndex) {
console.warn('please set dataIndex the column');
return;
}
this.setColumns(this.columns.map(function (col) {
return col.dataIndex === dataIndex ? __assign(__assign({}, col), { width: size.width }) : col;
}));
var onColumnsResizeChange = this.props.onColumnsResizeChange;
if (onColumnsResizeChange) {
onColumnsResizeChange(dataIndex, size.width);
}
};
FlexTable.prototype.onTableWidthChange = function (nextWidth) {
var _a = this.props.width, width = _a === void 0 ? 0 : _a;
// 表的视口宽度
var tableWidth = width - constant_1.SCROLL_BAR_WIDTH;
// 表的滚动宽度, 此处表示表格不能无限缩小
var scrollWidth = nextWidth <= tableWidth ? tableWidth : nextWidth;
this.setTableScrollWidth(scrollWidth);
this.debounceTableSizeChange(scrollWidth);
};
FlexTable.prototype.handleTableResize = function (_, _a) {
var size = _a.size;
this.onTableWidthChange(size.width);
};
FlexTable.prototype.handleEnlargeTableWidth = function () {
this.onTableWidthChange(this.scrollWidth + constant_1.DEFAULT_RESIZE_GAP);
};
FlexTable.prototype.handleShrinkTableWidth = function () {
this.onTableWidthChange(this.scrollWidth - constant_1.DEFAULT_RESIZE_GAP);
};
FlexTable.prototype.getTableData = function (dataSource) {
var data = __spread(dataSource);
var filters = this.filters;
if (!filters.length) {
this.setData(data);
return;
}
var newData = [];
data.forEach(function (item) {
var e_1, _a;
var isAdd = true;
var _loop_1 = function (filter) {
var index = lodash_1.findIndex(filter.value, function (value) { return lodash_1.toString(value) === lodash_1.toString(item[filter.key].current); });
if (index === -1) {
isAdd = false;
return "break";
}
};
try {
for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
var filter = filters_1_1.value;
var state_1 = _loop_1(filter);
if (state_1 === "break")
break;
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (filters_1_1 && !filters_1_1.done && (_a = filters_1.return)) _a.call(filters_1);
}
finally { if (e_1) throw e_1.error; }
}
if (isAdd) {
newData.push(item);
}
});
this.setData(newData);
};
FlexTable.prototype.itemRender = function (current, type, originalElement) {
if (type === 'prev') {
return (React.createElement("a", null,
React.createElement(icons_1.LeftOutlined, { className: styles.prevIcon }),
language_1.formatString(type_2.DataLocale.table_header.pagination.pre)));
}
if (type === 'next') {
return (React.createElement("a", null,
language_1.formatString(type_2.DataLocale.table_header.pagination.next),
React.createElement(icons_1.RightOutlined, { className: styles.nextIcon })));
}
if (type === 'page') {
return (React.createElement("a", null,
language_1.formatString(type_2.DataLocale.table_header.pagination.index),
React.createElement("span", { className: styles.currentPage }, current),
language_1.formatString(type_2.DataLocale.table_header.pagination.page)));
}
return originalElement;
};
FlexTable.prototype._rowRenderer = function (_a, _b) {
var _this = this;
var index = _a.index, key = _a.key, style = _a.style, parent = _a.parent;
var tableOption = _b.tableOption;
var rowData = this.currentPageData[index];
var level = 0;
var height = style.height, res = __rest(style, ["height"]);
return (React.createElement(react_virtualized_1.CellMeasurer, { cache: this.cache, columnIndex: 0, key: key, parent: parent, rowIndex: index }, function (_a) {
var registerChild = _a.registerChild;
return (React.createElement("div", { style: res, ref: registerChild }, _this.renderRowData(rowData, index, level, { tableOption: tableOption })));
}));
};
FlexTable.prototype.renderRowData = function (rowData, rowIndex, level, params) {
if (level === void 0) { level = 0; }
var rowClassName = this.props.rowClassName;
var tableOption = params.tableOption;
var expandChild = null;
if (columnManager_1.hasChildren(rowData)) {
expandChild = this.renderDataBody(rowData.children, level + 1, params);
}
return (React.createElement("div", { key: rowIndex, className: classnames_1.default(styles.trContainer, rowClassName && rowClassName(rowIndex, level)) },
React.createElement(TableRow_1.default, { columns: this.columns, rowData: rowData, rowIndex: rowIndex, rowStyle: this.props.rowStyle, tableOption: tableOption, chartType: this.props.chartType, level: level, bordered: this.props.bordered, handleCellResize: this.handleCellResize, textDisplayMode: this.props.textDisplayMode }),
expandChild && React.createElement("div", null, expandChild)));
};
Object.defineProperty(FlexTable.prototype, "fixedIndexes", {
get: function () {
return columnManager_1.getColumnsFixedIndexes(this.columns);
},
enumerable: false,
configurable: true
});
FlexTable.prototype.renderDataBody = function (data, level, params) {
var _this = this;
if (level === void 0) { level = 0; }
return data.map(function (rowData, rowIndex) {
return _this.renderRowData(rowData, rowIndex, level, params);
});
};
FlexTable.prototype.renderTable = function () {
var _a, _b;
var _this = this;
var _c = this.props, className = _c.className, tableClassName = _c.tableClassName, style = _c.style, size = _c.size, bordered = _c.bordered, sort = _c.sort, onSortChange = _c.onSortChange;
var table = (React.createElement("div", { className: classnames_1.default(styles.tableContainer, className, (_a = {},
_a[styles.bordered] = !!bordered,
_a)), style: style },
React.createElement("div", { className: classnames_1.default(styles.table, (_b = {},
_b[styles.small] = size === 'small',
_b[styles.middle] = size === 'middle',
_b[styles.large] = size === 'large',
_b), tableClassName), style: { width: this.scrollWidth - constant_1.SCROLL_BAR_WIDTH || '100%' } },
React.createElement(Header_1.default, { columns: this.columns, dataSource: this.props.dataSource, data: this.data, setData: this.setData, fixedIndexes: this.fixedIndexes, filters: this.filters, handleChangeFilters: this.setFilters, bordered: this.props.bordered, tableOption: this.props.tableOption, onColumnsFiltersChange: this.props.onColumnsFiltersChange, getTableData: this.getTableData, tableTitleBgColor: this.props.tableTitleBgColor, tableTitleFont: this.props.tableTitleFont, handleCellResize: this.handleCellResize, onSortChange: onSortChange, defaultActiveDataIndex: sort === null || sort === void 0 ? void 0 : sort.field, defaultActiveOrder: sort === null || sort === void 0 ? void 0 : sort.order }),
React.createElement("div", { className: styles.tableBody, onMouseEnter: this.handleEnter, onMouseLeave: this.handleLeave },
!this.showPagination && (React.createElement(react_virtualized_1.AutoSizer, null, function (_a) {
var width = _a.width, height = _a.height;
return (React.createElement("div", { style: { position: 'absolute' } },
React.createElement(react_virtualized_1.List, { className: styles.list, ref: function (ref) { return (_this.vListRef = ref); }, deferredMeasurementCache: _this.cache, overscanRowCount: 2, height: height, width: width, rowCount: _this.currentPageData.length, rowRenderer: function (params) {
return _this._rowRenderer(params, {
tableOption: _this.props.tableOption
});
}, rowHeight: _this.cache.rowHeight })));
})),
this.showPagination &&
this.renderDataBody(this.currentPageData, 0, {
tableOption: this.props.tableOption
})))));
return table;
};
FlexTable.prototype.getMaxCurrent = function (total) {
var _a = this.pagination, current = _a.current, pageSize = _a.pageSize;
if ((current - 1) * pageSize >= total) {
return Math.floor((total - 1) / pageSize) + 1;
}
return current;
};
FlexTable.prototype.getDefaultPagination = function () {
var pagination = this.props.pagination || {};
return this.props.pagination
? __assign(__assign(__assign({}, constant_1.defaultPagination), pagination), { current: pagination.defaultCurrent || pagination.current || 1, pageSize: pagination.defaultPageSize || pagination.pageSize || 10, itemRender: this.itemRender }) : {};
};
FlexTable.prototype.initPagination = function (pagination) {
var newPagination = __assign({}, pagination);
newPagination.current = newPagination.current || 1;
newPagination.pageSize = newPagination.pageSize || 10;
this.setPagination(newPagination);
};
FlexTable.prototype.setRowLevels = function (levels) {
this.rowLevels = levels;
};
FlexTable.prototype.setTableScrollWidth = function (width) {
this.scrollWidth = width;
};
FlexTable.prototype.setData = function (data) {
if (data === void 0) { data = []; }
this.data = data;
// 数据更新的时候,需要重新渲染,否则可能导致数据显示不对
if (this.vListRef) {
this.vListRef.forceUpdateGrid();
}
};
FlexTable.prototype.setColumns = function (columns) {
if (columns === void 0) { columns = []; }
this.columns = columns;
};
FlexTable.prototype.setPagination = function (pagination) {
this.pagination = pagination;
};
FlexTable.prototype.setFilters = function (filters) {
this.filters = filters;
};
FlexTable.prototype.setScrollToRowIndex = function (scrollToRowIndex) {
this.scrollToRowIndex = scrollToRowIndex;
};
FlexTable.prototype.render = function () {
var _a = this.props, scrollWidth = _a.scrollWidth, resizable = _a.resizable;
var table = this.renderTable();
return (React.createElement("div", { className: styles.container, style: { height: this.props.height || '100%' } },
table,
resizable && !lodash_1.isNil(scrollWidth) && (React.createElement(react_resizable_1.Resizable, { width: this.scrollWidth || 0, height: 0, onResize: this.handleTableResize },
React.createElement("div", { className: styles.tableResizer },
React.createElement(antd_1.Tooltip, { title: language_1.formatString(type_1.BaseLocale.small) },
React.createElement(icons_1.CaretLeftOutlined, { className: styles.icon, onClick: this.handleShrinkTableWidth })),
React.createElement(antd_1.Tooltip, { title: language_1.formatString(type_1.BaseLocale.big) },
React.createElement(icons_1.CaretRightOutlined, { className: styles.icon, onClick: this.handleEnlargeTableWidth }))))),
React.createElement(Pagination_1.default, { total: this.data.length, pagination: this.pagination, show: this.showPagination, handleChange: this.setPagination })));
};
FlexTable.defaultProps = {
columns: [],
dataSource: [],
bordered: false,
size: 'middle',
tableOption: {},
theme: constants_1.EThemeTypes.Light
};
FlexTable.getLeafColumns = columnManager_1.getLeafColumns;
FlexTable.hasChildren = columnManager_1.hasChildren;
__decorate([
mobx_1.observable.ref,
__metadata("design:type", Array)
], FlexTable.prototype, "data", void 0);
__decorate([
mobx_1.observable.ref,
__metadata("design:type", Object)
], FlexTable.prototype, "pagination", void 0);
__decorate([
mobx_1.observable.ref,
__metadata("design:type", Array)
], FlexTable.prototype, "columns", void 0);
__decorate([
mobx_1.observable,
__metadata("design:type", Number)
], FlexTable.prototype, "scrollWidth", void 0);
__decorate([
mobx_1.observable,
__metadata("design:type", Number)
], FlexTable.prototype, "rowLevels", void 0);
__decorate([
mobx_1.observable.ref,
__metadata("design:type", Array)
], FlexTable.prototype, "filters", void 0);
__decorate([
mobx_1.observable,
__metadata("design:type", Number)
], FlexTable.prototype, "scrollToRowIndex", void 0);
__decorate([
mobx_1.computed,
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], FlexTable.prototype, "currentPageData", null);
__decorate([
mobx_1.computed,
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], FlexTable.prototype, "showPagination", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, String]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "handleCellResize", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Number]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "onTableWidthChange", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "handleTableResize", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "handleEnlargeTableWidth", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "handleShrinkTableWidth", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Array]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "getTableData", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "_rowRenderer", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Number, Number, Object]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "renderRowData", null);
__decorate([
mobx_1.computed,
__metadata("design:type", Object),
__metadata("design:paramtypes", [])
], FlexTable.prototype, "fixedIndexes", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Array, Number, Object]),
__metadata("design:returntype", Array)
], FlexTable.prototype, "renderDataBody", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "renderTable", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Number]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "getMaxCurrent", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "getDefaultPagination", null);
__decorate([
bind_1.default,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "initPagination", null);
__decorate([
bind_1.default,
mobx_1.action,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Number]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "setRowLevels", null);
__decorate([
bind_1.default,
mobx_1.action,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Number]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "setTableScrollWidth", null);
__decorate([
bind_1.default,
mobx_1.action,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Array]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "setData", null);
__decorate([
bind_1.default,
mobx_1.action,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Array]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "setColumns", null);
__decorate([
bind_1.default,
mobx_1.action,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "setPagination", null);
__decorate([
bind_1.default,
mobx_1.action,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Array]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "setFilters", null);
__decorate([
bind_1.default,
mobx_1.action,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Number]),
__metadata("design:returntype", void 0)
], FlexTable.prototype, "setScrollToRowIndex", null);
FlexTable = __decorate([
mobx_react_1.observer
], FlexTable);
return FlexTable;
}(BasicComponent_1.default));
exports.default = FlexTable;