autoColumnSize.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  1. 'use strict';
  2. exports.__esModule = true;
  3. var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
  4. var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
  5. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  6. var _base = require('./../_base');
  7. var _base2 = _interopRequireDefault(_base);
  8. var _array = require('./../../helpers/array');
  9. var _feature = require('./../../helpers/feature');
  10. var _element = require('./../../helpers/dom/element');
  11. var _ghostTable = require('./../../utils/ghostTable');
  12. var _ghostTable2 = _interopRequireDefault(_ghostTable);
  13. var _object = require('./../../helpers/object');
  14. var _number = require('./../../helpers/number');
  15. var _plugins = require('./../../plugins');
  16. var _samplesGenerator = require('./../../utils/samplesGenerator');
  17. var _samplesGenerator2 = _interopRequireDefault(_samplesGenerator);
  18. var _string = require('./../../helpers/string');
  19. var _src = require('./../../3rdparty/walkontable/src');
  20. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  21. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  22. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  23. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  24. var privatePool = new WeakMap();
  25. /**
  26. * @plugin AutoColumnSize
  27. *
  28. * @description
  29. * This plugin allows to set column widths based on their widest cells.
  30. *
  31. * By default, the plugin is declared as `undefined`, which makes it enabled (same as if it was declared as `true`).
  32. * Enabling this plugin may decrease the overall table performance, as it needs to calculate the widths of all cells to
  33. * resize the columns accordingly.
  34. * If you experience problems with the performance, try turning this feature off and declaring the column widths manually.
  35. *
  36. * Column width calculations are divided into sync and async part. Each of this parts has their own advantages and
  37. * disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous operations don't
  38. * block the browser UI.
  39. *
  40. * To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value to a config object:
  41. * ```js
  42. * ...
  43. * // as a number (300 columns in sync, rest async)
  44. * autoColumnSize: {syncLimit: 300},
  45. * ...
  46. *
  47. * ...
  48. * // as a string (percent)
  49. * autoColumnSize: {syncLimit: '40%'},
  50. * ...
  51. * ```
  52. *
  53. * To configure this plugin see {@link Options#autoColumnSize}.
  54. *
  55. * @example
  56. * ```js
  57. * ...
  58. * var hot = new Handsontable(document.getElementById('example'), {
  59. * date: getData(),
  60. * autoColumnSize: true
  61. * });
  62. * // Access to plugin instance:
  63. * var plugin = hot.getPlugin('autoColumnSize');
  64. *
  65. * plugin.getColumnWidth(4);
  66. *
  67. * if (plugin.isEnabled()) {
  68. * // code...
  69. * }
  70. * ...
  71. * ```
  72. */
  73. var AutoColumnSize = function (_BasePlugin) {
  74. _inherits(AutoColumnSize, _BasePlugin);
  75. _createClass(AutoColumnSize, null, [{
  76. key: 'CALCULATION_STEP',
  77. get: function get() {
  78. return 50;
  79. }
  80. }, {
  81. key: 'SYNC_CALCULATION_LIMIT',
  82. get: function get() {
  83. return 50;
  84. }
  85. }]);
  86. function AutoColumnSize(hotInstance) {
  87. _classCallCheck(this, AutoColumnSize);
  88. var _this = _possibleConstructorReturn(this, (AutoColumnSize.__proto__ || Object.getPrototypeOf(AutoColumnSize)).call(this, hotInstance));
  89. privatePool.set(_this, {
  90. /**
  91. * Cached column header names. It is used to diff current column headers with previous state and detect which
  92. * columns width should be updated.
  93. *
  94. * @private
  95. * @type {Array}
  96. */
  97. cachedColumnHeaders: []
  98. });
  99. /**
  100. * Cached columns widths.
  101. *
  102. * @type {Array}
  103. */
  104. _this.widths = [];
  105. /**
  106. * Instance of {@link GhostTable} for rows and columns size calculations.
  107. *
  108. * @type {GhostTable}
  109. */
  110. _this.ghostTable = new _ghostTable2.default(_this.hot);
  111. /**
  112. * Instance of {@link SamplesGenerator} for generating samples necessary for columns width calculations.
  113. *
  114. * @type {SamplesGenerator}
  115. */
  116. _this.samplesGenerator = new _samplesGenerator2.default(function (row, col) {
  117. return _this.hot.getDataAtCell(row, col);
  118. });
  119. /**
  120. * `true` only if the first calculation was performed
  121. *
  122. * @type {Boolean}
  123. */
  124. _this.firstCalculation = true;
  125. /**
  126. * `true` if the size calculation is in progress.
  127. *
  128. * @type {Boolean}
  129. */
  130. _this.inProgress = false;
  131. // moved to constructor to allow auto-sizing the columns when the plugin is disabled
  132. _this.addHook('beforeColumnResize', function (col, size, isDblClick) {
  133. return _this.onBeforeColumnResize(col, size, isDblClick);
  134. });
  135. return _this;
  136. }
  137. /**
  138. * Check if the plugin is enabled in the handsontable settings.
  139. *
  140. * @returns {Boolean}
  141. */
  142. _createClass(AutoColumnSize, [{
  143. key: 'isEnabled',
  144. value: function isEnabled() {
  145. return this.hot.getSettings().autoColumnSize !== false && !this.hot.getSettings().colWidths;
  146. }
  147. /**
  148. * Enable plugin for this Handsontable instance.
  149. */
  150. }, {
  151. key: 'enablePlugin',
  152. value: function enablePlugin() {
  153. var _this2 = this;
  154. if (this.enabled) {
  155. return;
  156. }
  157. var setting = this.hot.getSettings().autoColumnSize;
  158. if (setting && setting.useHeaders != null) {
  159. this.ghostTable.setSetting('useHeaders', setting.useHeaders);
  160. }
  161. this.addHook('afterLoadData', function () {
  162. return _this2.onAfterLoadData();
  163. });
  164. this.addHook('beforeChange', function (changes) {
  165. return _this2.onBeforeChange(changes);
  166. });
  167. this.addHook('beforeRender', function (force) {
  168. return _this2.onBeforeRender(force);
  169. });
  170. this.addHook('modifyColWidth', function (width, col) {
  171. return _this2.getColumnWidth(col, width);
  172. });
  173. this.addHook('afterInit', function () {
  174. return _this2.onAfterInit();
  175. });
  176. _get(AutoColumnSize.prototype.__proto__ || Object.getPrototypeOf(AutoColumnSize.prototype), 'enablePlugin', this).call(this);
  177. }
  178. /**
  179. * Update plugin state.
  180. */
  181. }, {
  182. key: 'updatePlugin',
  183. value: function updatePlugin() {
  184. var changedColumns = this.findColumnsWhereHeaderWasChanged();
  185. if (changedColumns.length) {
  186. this.clearCache(changedColumns);
  187. }
  188. _get(AutoColumnSize.prototype.__proto__ || Object.getPrototypeOf(AutoColumnSize.prototype), 'updatePlugin', this).call(this);
  189. }
  190. /**
  191. * Disable plugin for this Handsontable instance.
  192. */
  193. }, {
  194. key: 'disablePlugin',
  195. value: function disablePlugin() {
  196. _get(AutoColumnSize.prototype.__proto__ || Object.getPrototypeOf(AutoColumnSize.prototype), 'disablePlugin', this).call(this);
  197. }
  198. /**
  199. * Calculate a columns width.
  200. *
  201. * @param {Number|Object} colRange Column range object.
  202. * @param {Number|Object} rowRange Row range object.
  203. * @param {Boolean} [force=false] If `true` force calculate width even when value was cached earlier.
  204. */
  205. }, {
  206. key: 'calculateColumnsWidth',
  207. value: function calculateColumnsWidth() {
  208. var colRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { from: 0, to: this.hot.countCols() - 1 };
  209. var _this3 = this;
  210. var rowRange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { from: 0, to: this.hot.countRows() - 1 };
  211. var force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  212. if (typeof colRange === 'number') {
  213. colRange = { from: colRange, to: colRange };
  214. }
  215. if (typeof rowRange === 'number') {
  216. rowRange = { from: rowRange, to: rowRange };
  217. }
  218. (0, _number.rangeEach)(colRange.from, colRange.to, function (col) {
  219. if (force || _this3.widths[col] === void 0 && !_this3.hot._getColWidthFromSettings(col)) {
  220. var samples = _this3.samplesGenerator.generateColumnSamples(col, rowRange);
  221. samples.forEach(function (sample, col) {
  222. return _this3.ghostTable.addColumn(col, sample);
  223. });
  224. }
  225. });
  226. if (this.ghostTable.columns.length) {
  227. this.ghostTable.getWidths(function (col, width) {
  228. _this3.widths[col] = width;
  229. });
  230. this.ghostTable.clean();
  231. }
  232. }
  233. /**
  234. * Calculate all columns width.
  235. *
  236. * @param {Object|Number} rowRange Row range object.
  237. */
  238. }, {
  239. key: 'calculateAllColumnsWidth',
  240. value: function calculateAllColumnsWidth() {
  241. var _this4 = this;
  242. var rowRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { from: 0, to: this.hot.countRows() - 1 };
  243. var current = 0;
  244. var length = this.hot.countCols() - 1;
  245. var timer = null;
  246. this.inProgress = true;
  247. var loop = function loop() {
  248. // When hot was destroyed after calculating finished cancel frame
  249. if (!_this4.hot) {
  250. (0, _feature.cancelAnimationFrame)(timer);
  251. _this4.inProgress = false;
  252. return;
  253. }
  254. _this4.calculateColumnsWidth({
  255. from: current,
  256. to: Math.min(current + AutoColumnSize.CALCULATION_STEP, length)
  257. }, rowRange);
  258. current = current + AutoColumnSize.CALCULATION_STEP + 1;
  259. if (current < length) {
  260. timer = (0, _feature.requestAnimationFrame)(loop);
  261. } else {
  262. (0, _feature.cancelAnimationFrame)(timer);
  263. _this4.inProgress = false;
  264. // @TODO Should call once per render cycle, currently fired separately in different plugins
  265. _this4.hot.view.wt.wtOverlays.adjustElementsSize(true);
  266. // tmp
  267. if (_this4.hot.view.wt.wtOverlays.leftOverlay.needFullRender) {
  268. _this4.hot.view.wt.wtOverlays.leftOverlay.clone.draw();
  269. }
  270. }
  271. };
  272. // sync
  273. if (this.firstCalculation && this.getSyncCalculationLimit()) {
  274. this.calculateColumnsWidth({ from: 0, to: this.getSyncCalculationLimit() }, rowRange);
  275. this.firstCalculation = false;
  276. current = this.getSyncCalculationLimit() + 1;
  277. }
  278. // async
  279. if (current < length) {
  280. loop();
  281. } else {
  282. this.inProgress = false;
  283. }
  284. }
  285. /**
  286. * Set the sampling options.
  287. *
  288. * @private
  289. */
  290. }, {
  291. key: 'setSamplingOptions',
  292. value: function setSamplingOptions() {
  293. var setting = this.hot.getSettings().autoColumnSize;
  294. var samplingRatio = setting && (0, _object.hasOwnProperty)(setting, 'samplingRatio') ? this.hot.getSettings().autoColumnSize.samplingRatio : void 0;
  295. var allowSampleDuplicates = setting && (0, _object.hasOwnProperty)(setting, 'allowSampleDuplicates') ? this.hot.getSettings().autoColumnSize.allowSampleDuplicates : void 0;
  296. if (samplingRatio && !isNaN(samplingRatio)) {
  297. this.samplesGenerator.setSampleCount(parseInt(samplingRatio, 10));
  298. }
  299. if (allowSampleDuplicates) {
  300. this.samplesGenerator.setAllowDuplicates(allowSampleDuplicates);
  301. }
  302. }
  303. /**
  304. * Recalculate all columns width (overwrite cache values).
  305. */
  306. }, {
  307. key: 'recalculateAllColumnsWidth',
  308. value: function recalculateAllColumnsWidth() {
  309. if (this.hot.view && (0, _element.isVisible)(this.hot.view.wt.wtTable.TABLE)) {
  310. this.clearCache();
  311. this.calculateAllColumnsWidth();
  312. }
  313. }
  314. /**
  315. * Get value which tells how many columns should be calculated synchronously. Rest of the columns will be calculated asynchronously.
  316. *
  317. * @returns {Number}
  318. */
  319. }, {
  320. key: 'getSyncCalculationLimit',
  321. value: function getSyncCalculationLimit() {
  322. /* eslint-disable no-bitwise */
  323. var limit = AutoColumnSize.SYNC_CALCULATION_LIMIT;
  324. var colsLimit = this.hot.countCols() - 1;
  325. if ((0, _object.isObject)(this.hot.getSettings().autoColumnSize)) {
  326. limit = this.hot.getSettings().autoColumnSize.syncLimit;
  327. if ((0, _string.isPercentValue)(limit)) {
  328. limit = (0, _number.valueAccordingPercent)(colsLimit, limit);
  329. } else {
  330. // Force to Number
  331. limit >>= 0;
  332. }
  333. }
  334. return Math.min(limit, colsLimit);
  335. }
  336. /**
  337. * Get the calculated column width.
  338. *
  339. * @param {Number} col Column index.
  340. * @param {Number} [defaultWidth] Default column width. It will be picked up if no calculated width found.
  341. * @param {Boolean} [keepMinimum=true] If `true` then returned value won't be smaller then 50 (default column width).
  342. * @returns {Number}
  343. */
  344. }, {
  345. key: 'getColumnWidth',
  346. value: function getColumnWidth(col) {
  347. var defaultWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : void 0;
  348. var keepMinimum = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  349. var width = defaultWidth;
  350. if (width === void 0) {
  351. width = this.widths[col];
  352. if (keepMinimum && typeof width === 'number') {
  353. width = Math.max(width, _src.ViewportColumnsCalculator.DEFAULT_WIDTH);
  354. }
  355. }
  356. return width;
  357. }
  358. /**
  359. * Get the first visible column.
  360. *
  361. * @returns {Number} Returns column index or -1 if table is not rendered.
  362. */
  363. }, {
  364. key: 'getFirstVisibleColumn',
  365. value: function getFirstVisibleColumn() {
  366. var wot = this.hot.view.wt;
  367. if (wot.wtViewport.columnsVisibleCalculator) {
  368. return wot.wtTable.getFirstVisibleColumn();
  369. }
  370. if (wot.wtViewport.columnsRenderCalculator) {
  371. return wot.wtTable.getFirstRenderedColumn();
  372. }
  373. return -1;
  374. }
  375. /**
  376. * Get the last visible column.
  377. *
  378. * @returns {Number} Returns column index or -1 if table is not rendered.
  379. */
  380. }, {
  381. key: 'getLastVisibleColumn',
  382. value: function getLastVisibleColumn() {
  383. var wot = this.hot.view.wt;
  384. if (wot.wtViewport.columnsVisibleCalculator) {
  385. return wot.wtTable.getLastVisibleColumn();
  386. }
  387. if (wot.wtViewport.columnsRenderCalculator) {
  388. return wot.wtTable.getLastRenderedColumn();
  389. }
  390. return -1;
  391. }
  392. /**
  393. * Collects all columns which titles has been changed in comparison to the previous state.
  394. *
  395. * @returns {Array} It returns an array of physical column indexes.
  396. */
  397. }, {
  398. key: 'findColumnsWhereHeaderWasChanged',
  399. value: function findColumnsWhereHeaderWasChanged() {
  400. var columnHeaders = this.hot.getColHeader();
  401. var _privatePool$get = privatePool.get(this),
  402. cachedColumnHeaders = _privatePool$get.cachedColumnHeaders;
  403. var changedColumns = (0, _array.arrayReduce)(columnHeaders, function (acc, columnTitle, physicalColumn) {
  404. var cachedColumnsLength = cachedColumnHeaders.length;
  405. if (cachedColumnsLength - 1 < physicalColumn || cachedColumnHeaders[physicalColumn] !== columnTitle) {
  406. acc.push(physicalColumn);
  407. }
  408. if (cachedColumnsLength - 1 < physicalColumn) {
  409. cachedColumnHeaders.push(columnTitle);
  410. } else {
  411. cachedColumnHeaders[physicalColumn] = columnTitle;
  412. }
  413. return acc;
  414. }, []);
  415. return changedColumns;
  416. }
  417. /**
  418. * Clear cache of calculated column widths. If you want to clear only selected columns pass an array with their indexes.
  419. * Otherwise whole cache will be cleared.
  420. *
  421. * @param {Array} [columns=[]] List of column indexes (physical indexes) to clear.
  422. */
  423. }, {
  424. key: 'clearCache',
  425. value: function clearCache() {
  426. var _this5 = this;
  427. var columns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  428. if (columns.length) {
  429. (0, _array.arrayEach)(columns, function (physicalIndex) {
  430. _this5.widths[physicalIndex] = void 0;
  431. });
  432. } else {
  433. this.widths.length = 0;
  434. }
  435. }
  436. /**
  437. * Check if all widths were calculated. If not then return `true` (need recalculate).
  438. *
  439. * @returns {Boolean}
  440. */
  441. }, {
  442. key: 'isNeedRecalculate',
  443. value: function isNeedRecalculate() {
  444. return !!(0, _array.arrayFilter)(this.widths, function (item) {
  445. return item === void 0;
  446. }).length;
  447. }
  448. /**
  449. * On before render listener.
  450. *
  451. * @private
  452. */
  453. }, {
  454. key: 'onBeforeRender',
  455. value: function onBeforeRender() {
  456. var force = this.hot.renderCall;
  457. var rowsCount = this.hot.countRows();
  458. // Keep last column widths unchanged for situation when all rows was deleted or trimmed (pro #6)
  459. if (!rowsCount) {
  460. return;
  461. }
  462. this.calculateColumnsWidth({ from: this.getFirstVisibleColumn(), to: this.getLastVisibleColumn() }, void 0, force);
  463. if (this.isNeedRecalculate() && !this.inProgress) {
  464. this.calculateAllColumnsWidth();
  465. }
  466. }
  467. /**
  468. * On after load data listener.
  469. *
  470. * @private
  471. */
  472. }, {
  473. key: 'onAfterLoadData',
  474. value: function onAfterLoadData() {
  475. var _this6 = this;
  476. if (this.hot.view) {
  477. this.recalculateAllColumnsWidth();
  478. } else {
  479. // first load - initialization
  480. setTimeout(function () {
  481. if (_this6.hot) {
  482. _this6.recalculateAllColumnsWidth();
  483. }
  484. }, 0);
  485. }
  486. }
  487. /**
  488. * On before change listener.
  489. *
  490. * @private
  491. * @param {Array} changes
  492. */
  493. }, {
  494. key: 'onBeforeChange',
  495. value: function onBeforeChange(changes) {
  496. var _this7 = this;
  497. var changedColumns = (0, _array.arrayMap)(changes, function (_ref) {
  498. var _ref2 = _slicedToArray(_ref, 2),
  499. row = _ref2[0],
  500. column = _ref2[1];
  501. return _this7.hot.propToCol(column);
  502. });
  503. this.clearCache(changedColumns);
  504. }
  505. /**
  506. * On before column resize listener.
  507. *
  508. * @private
  509. * @param {Number} col
  510. * @param {Number} size
  511. * @param {Boolean} isDblClick
  512. * @returns {Number}
  513. */
  514. }, {
  515. key: 'onBeforeColumnResize',
  516. value: function onBeforeColumnResize(col, size, isDblClick) {
  517. if (isDblClick) {
  518. this.calculateColumnsWidth(col, void 0, true);
  519. size = this.getColumnWidth(col, void 0, false);
  520. }
  521. return size;
  522. }
  523. /**
  524. * On after Handsontable init fill plugin with all necessary values.
  525. *
  526. * @private
  527. */
  528. }, {
  529. key: 'onAfterInit',
  530. value: function onAfterInit() {
  531. privatePool.get(this).cachedColumnHeaders = this.hot.getColHeader();
  532. }
  533. /**
  534. * Destroy plugin instance.
  535. */
  536. }, {
  537. key: 'destroy',
  538. value: function destroy() {
  539. this.ghostTable.clean();
  540. _get(AutoColumnSize.prototype.__proto__ || Object.getPrototypeOf(AutoColumnSize.prototype), 'destroy', this).call(this);
  541. }
  542. }]);
  543. return AutoColumnSize;
  544. }(_base2.default);
  545. (0, _plugins.registerPlugin)('autoColumnSize', AutoColumnSize);
  546. exports.default = AutoColumnSize;