handsontable 0.0.0-next-3d099da-20231208 → 0.0.0-next-16c18c1-20231212

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (313) hide show
  1. package/3rdparty/walkontable/src/calculator/index.js +11 -6
  2. package/3rdparty/walkontable/src/calculator/index.mjs +5 -3
  3. package/3rdparty/walkontable/src/calculator/renderAllColumns.js +50 -0
  4. package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +46 -0
  5. package/3rdparty/walkontable/src/calculator/renderAllRows.js +50 -0
  6. package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +46 -0
  7. package/3rdparty/walkontable/src/calculator/viewportColumns.js +3 -124
  8. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +4 -126
  9. package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
  10. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +4 -5
  11. package/3rdparty/walkontable/src/cell/coords.js +2 -2
  12. package/3rdparty/walkontable/src/cell/coords.mjs +2 -2
  13. package/3rdparty/walkontable/src/cell/range.js +2 -2
  14. package/3rdparty/walkontable/src/cell/range.mjs +2 -2
  15. package/3rdparty/walkontable/src/core/_base.js +2 -14
  16. package/3rdparty/walkontable/src/core/_base.mjs +2 -14
  17. package/3rdparty/walkontable/src/core/clone.js +2 -2
  18. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  19. package/3rdparty/walkontable/src/core/core.js +0 -2
  20. package/3rdparty/walkontable/src/core/core.mjs +0 -2
  21. package/3rdparty/walkontable/src/facade/core.js +0 -9
  22. package/3rdparty/walkontable/src/facade/core.mjs +0 -9
  23. package/3rdparty/walkontable/src/filter/column.js +2 -2
  24. package/3rdparty/walkontable/src/filter/column.mjs +2 -2
  25. package/3rdparty/walkontable/src/filter/row.js +2 -2
  26. package/3rdparty/walkontable/src/filter/row.mjs +2 -2
  27. package/3rdparty/walkontable/src/index.js +3 -4
  28. package/3rdparty/walkontable/src/index.mjs +1 -2
  29. package/3rdparty/walkontable/src/overlay/_base.js +2 -2
  30. package/3rdparty/walkontable/src/overlay/_base.mjs +2 -2
  31. package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
  32. package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
  33. package/3rdparty/walkontable/src/overlay/top.js +2 -2
  34. package/3rdparty/walkontable/src/overlay/top.mjs +2 -2
  35. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +2 -2
  36. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +2 -2
  37. package/3rdparty/walkontable/src/overlays.js +2 -5
  38. package/3rdparty/walkontable/src/overlays.mjs +2 -6
  39. package/3rdparty/walkontable/src/renderer/_base.js +2 -2
  40. package/3rdparty/walkontable/src/renderer/_base.mjs +2 -2
  41. package/3rdparty/walkontable/src/renderer/cells.js +2 -2
  42. package/3rdparty/walkontable/src/renderer/cells.mjs +2 -2
  43. package/3rdparty/walkontable/src/renderer/colGroup.js +10 -0
  44. package/3rdparty/walkontable/src/renderer/colGroup.mjs +10 -0
  45. package/3rdparty/walkontable/src/renderer/rowHeaders.js +2 -2
  46. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +2 -2
  47. package/3rdparty/walkontable/src/renderer/rows.js +6 -5
  48. package/3rdparty/walkontable/src/renderer/rows.mjs +6 -5
  49. package/3rdparty/walkontable/src/renderer/table.js +2 -2
  50. package/3rdparty/walkontable/src/renderer/table.mjs +2 -2
  51. package/3rdparty/walkontable/src/scroll.js +2 -2
  52. package/3rdparty/walkontable/src/scroll.mjs +2 -2
  53. package/3rdparty/walkontable/src/selection/manager.js +0 -1
  54. package/3rdparty/walkontable/src/selection/manager.mjs +0 -1
  55. package/3rdparty/walkontable/src/settings.js +5 -2
  56. package/3rdparty/walkontable/src/settings.mjs +4 -2
  57. package/3rdparty/walkontable/src/table.js +2 -3
  58. package/3rdparty/walkontable/src/table.mjs +2 -3
  59. package/3rdparty/walkontable/src/utils/column.js +29 -14
  60. package/3rdparty/walkontable/src/utils/column.mjs +29 -14
  61. package/3rdparty/walkontable/src/utils/columnStretching.js +219 -0
  62. package/3rdparty/walkontable/src/utils/columnStretching.mjs +215 -0
  63. package/3rdparty/walkontable/src/utils/nodesPool.js +2 -2
  64. package/3rdparty/walkontable/src/utils/nodesPool.mjs +2 -2
  65. package/3rdparty/walkontable/src/utils/orderView/view.js +2 -2
  66. package/3rdparty/walkontable/src/utils/orderView/view.mjs +2 -2
  67. package/3rdparty/walkontable/src/utils/orderView/viewSize.js +2 -2
  68. package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +2 -2
  69. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +2 -2
  70. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +2 -2
  71. package/3rdparty/walkontable/src/utils/row.js +2 -2
  72. package/3rdparty/walkontable/src/utils/row.mjs +2 -2
  73. package/3rdparty/walkontable/src/viewport.js +22 -17
  74. package/3rdparty/walkontable/src/viewport.mjs +23 -18
  75. package/base.js +4 -2
  76. package/base.mjs +2 -2
  77. package/core/focusCatcher/index.js +44 -6
  78. package/core/focusCatcher/index.mjs +44 -6
  79. package/core.js +0 -11
  80. package/core.mjs +0 -11
  81. package/dataMap/dataMap.js +3 -2
  82. package/dataMap/dataMap.mjs +2 -2
  83. package/dataMap/dataSource.js +2 -2
  84. package/dataMap/dataSource.mjs +2 -2
  85. package/dataMap/metaManager/lazyFactoryMap.js +2 -2
  86. package/dataMap/metaManager/lazyFactoryMap.mjs +2 -2
  87. package/dataMap/metaManager/metaLayers/cellMeta.js +2 -2
  88. package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -2
  89. package/dataMap/metaManager/metaLayers/columnMeta.js +2 -2
  90. package/dataMap/metaManager/metaLayers/columnMeta.mjs +2 -2
  91. package/dataMap/metaManager/metaLayers/globalMeta.js +2 -2
  92. package/dataMap/metaManager/metaLayers/globalMeta.mjs +2 -2
  93. package/dataMap/metaManager/metaLayers/tableMeta.js +2 -2
  94. package/dataMap/metaManager/metaLayers/tableMeta.mjs +2 -2
  95. package/dataMap/metaManager/metaSchema.js +28 -2
  96. package/dataMap/metaManager/metaSchema.mjs +28 -2
  97. package/dataMap/metaManager/mods/dynamicCellMeta.js +2 -2
  98. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +2 -2
  99. package/dataMap/metaManager/mods/extendMetaProperties.js +14 -2
  100. package/dataMap/metaManager/mods/extendMetaProperties.mjs +14 -2
  101. package/dist/handsontable.css +2 -2
  102. package/dist/handsontable.full.css +3 -3
  103. package/dist/handsontable.full.js +3991 -5589
  104. package/dist/handsontable.full.min.css +3 -3
  105. package/dist/handsontable.full.min.js +66 -71
  106. package/dist/handsontable.js +3070 -4317
  107. package/dist/handsontable.min.css +2 -2
  108. package/dist/handsontable.min.js +35 -39
  109. package/editorManager.js +5 -6
  110. package/editorManager.mjs +5 -6
  111. package/editors/autocompleteEditor/autocompleteEditor.js +2 -4
  112. package/editors/autocompleteEditor/autocompleteEditor.mjs +2 -4
  113. package/editors/baseEditor/baseEditor.js +2 -2
  114. package/editors/baseEditor/baseEditor.mjs +2 -2
  115. package/editors/dateEditor/dateEditor.d.ts +1 -1
  116. package/editors/dateEditor/dateEditor.js +6 -3
  117. package/editors/dateEditor/dateEditor.mjs +6 -3
  118. package/editors/handsontableEditor/handsontableEditor.js +0 -1
  119. package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
  120. package/editors/textEditor/textEditor.js +2 -6
  121. package/editors/textEditor/textEditor.mjs +2 -6
  122. package/eventManager.js +2 -2
  123. package/eventManager.mjs +2 -2
  124. package/helpers/browser.js +5 -2
  125. package/helpers/browser.mjs +5 -2
  126. package/helpers/feature.js +10 -0
  127. package/helpers/feature.mjs +9 -0
  128. package/helpers/mixed.js +1 -1
  129. package/helpers/mixed.mjs +1 -1
  130. package/package.json +3 -4
  131. package/pluginHooks.d.ts +6 -29
  132. package/pluginHooks.js +67 -125
  133. package/pluginHooks.mjs +64 -124
  134. package/plugins/autoColumnSize/autoColumnSize.js +2 -2
  135. package/plugins/autoColumnSize/autoColumnSize.mjs +2 -2
  136. package/plugins/autoRowSize/autoRowSize.js +2 -2
  137. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  138. package/plugins/autofill/autofill.js +2 -2
  139. package/plugins/autofill/autofill.mjs +2 -2
  140. package/plugins/base/base.js +2 -2
  141. package/plugins/base/base.mjs +2 -2
  142. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +2 -2
  143. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +2 -2
  144. package/plugins/collapsibleColumns/collapsibleColumns.js +2 -2
  145. package/plugins/collapsibleColumns/collapsibleColumns.mjs +2 -2
  146. package/plugins/columnSorting/columnSorting.js +2 -2
  147. package/plugins/columnSorting/columnSorting.mjs +2 -2
  148. package/plugins/columnSorting/columnStatesManager.js +2 -2
  149. package/plugins/columnSorting/columnStatesManager.mjs +2 -2
  150. package/plugins/columnSummary/columnSummary.js +2 -2
  151. package/plugins/columnSummary/columnSummary.mjs +2 -2
  152. package/plugins/columnSummary/endpoints.js +2 -2
  153. package/plugins/columnSummary/endpoints.mjs +2 -2
  154. package/plugins/comments/commentEditor.js +2 -2
  155. package/plugins/comments/commentEditor.mjs +2 -2
  156. package/plugins/comments/comments.js +2 -2
  157. package/plugins/comments/comments.mjs +2 -2
  158. package/plugins/comments/displaySwitch.js +2 -2
  159. package/plugins/comments/displaySwitch.mjs +2 -2
  160. package/plugins/contextMenu/commandExecutor.js +2 -2
  161. package/plugins/contextMenu/commandExecutor.mjs +2 -2
  162. package/plugins/contextMenu/contextMenu.js +2 -2
  163. package/plugins/contextMenu/contextMenu.mjs +2 -2
  164. package/plugins/contextMenu/itemsFactory.js +2 -2
  165. package/plugins/contextMenu/itemsFactory.mjs +2 -2
  166. package/plugins/contextMenu/menu/cursor.js +2 -2
  167. package/plugins/contextMenu/menu/cursor.mjs +2 -2
  168. package/plugins/contextMenu/menu/menu.js +2 -2
  169. package/plugins/contextMenu/menu/menu.mjs +2 -2
  170. package/plugins/copyPaste/clipboardData.js +18 -0
  171. package/plugins/copyPaste/clipboardData.mjs +14 -0
  172. package/plugins/copyPaste/copyPaste.js +131 -53
  173. package/plugins/copyPaste/copyPaste.mjs +134 -56
  174. package/plugins/copyPaste/copyableRanges.js +43 -7
  175. package/plugins/copyPaste/copyableRanges.mjs +42 -7
  176. package/plugins/copyPaste/pasteEvent.mjs +1 -1
  177. package/plugins/customBorders/customBorders.js +2 -7
  178. package/plugins/customBorders/customBorders.mjs +2 -7
  179. package/plugins/customBorders/utils.js +0 -1
  180. package/plugins/customBorders/utils.mjs +0 -1
  181. package/plugins/dragToScroll/dragToScroll.js +2 -2
  182. package/plugins/dragToScroll/dragToScroll.mjs +2 -2
  183. package/plugins/dropdownMenu/dropdownMenu.js +2 -2
  184. package/plugins/dropdownMenu/dropdownMenu.mjs +2 -2
  185. package/plugins/exportFile/dataProvider.js +2 -2
  186. package/plugins/exportFile/dataProvider.mjs +2 -2
  187. package/plugins/exportFile/types/_base.js +2 -2
  188. package/plugins/exportFile/types/_base.mjs +2 -2
  189. package/plugins/filters/component/_base.js +2 -2
  190. package/plugins/filters/component/_base.mjs +2 -2
  191. package/plugins/filters/component/actionBar.js +2 -2
  192. package/plugins/filters/component/actionBar.mjs +2 -2
  193. package/plugins/filters/component/condition.js +2 -2
  194. package/plugins/filters/component/condition.mjs +2 -2
  195. package/plugins/filters/component/operators.js +2 -2
  196. package/plugins/filters/component/operators.mjs +2 -2
  197. package/plugins/filters/component/value.js +2 -2
  198. package/plugins/filters/component/value.mjs +2 -2
  199. package/plugins/filters/conditionCollection.js +2 -2
  200. package/plugins/filters/conditionCollection.mjs +2 -2
  201. package/plugins/filters/conditionUpdateObserver.js +2 -2
  202. package/plugins/filters/conditionUpdateObserver.mjs +2 -2
  203. package/plugins/filters/dataFilter.js +2 -2
  204. package/plugins/filters/dataFilter.mjs +2 -2
  205. package/plugins/filters/filters.js +2 -2
  206. package/plugins/filters/filters.mjs +2 -2
  207. package/plugins/filters/ui/_base.js +2 -2
  208. package/plugins/filters/ui/_base.mjs +2 -2
  209. package/plugins/filters/ui/radioInput.js +1 -1
  210. package/plugins/filters/ui/radioInput.mjs +1 -1
  211. package/plugins/formulas/formulas.js +2 -4
  212. package/plugins/formulas/formulas.mjs +2 -4
  213. package/plugins/formulas/indexSyncer/axisSyncer.js +0 -1
  214. package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -1
  215. package/plugins/manualColumnMove/ui/_base.js +2 -2
  216. package/plugins/manualColumnMove/ui/_base.mjs +2 -2
  217. package/plugins/manualColumnResize/manualColumnResize.js +0 -1
  218. package/plugins/manualColumnResize/manualColumnResize.mjs +0 -1
  219. package/plugins/manualRowMove/ui/_base.js +2 -2
  220. package/plugins/manualRowMove/ui/_base.mjs +2 -2
  221. package/plugins/mergeCells/calculations/autofill.js +2 -2
  222. package/plugins/mergeCells/calculations/autofill.mjs +2 -2
  223. package/plugins/mergeCells/calculations/selection.js +2 -2
  224. package/plugins/mergeCells/calculations/selection.mjs +2 -2
  225. package/plugins/mergeCells/cellCoords.js +2 -2
  226. package/plugins/mergeCells/cellCoords.mjs +2 -2
  227. package/plugins/mergeCells/cellsCollection.js +2 -2
  228. package/plugins/mergeCells/cellsCollection.mjs +2 -2
  229. package/plugins/mergeCells/mergeCells.js +3 -129
  230. package/plugins/mergeCells/mergeCells.mjs +3 -129
  231. package/plugins/multiColumnSorting/multiColumnSorting.js +2 -2
  232. package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -2
  233. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +2 -2
  234. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +2 -2
  235. package/plugins/nestedHeaders/nestedHeaders.js +43 -89
  236. package/plugins/nestedHeaders/nestedHeaders.mjs +44 -90
  237. package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
  238. package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
  239. package/plugins/nestedHeaders/utils/ghostTable.js +2 -2
  240. package/plugins/nestedHeaders/utils/ghostTable.mjs +2 -2
  241. package/plugins/nestedRows/data/dataManager.js +2 -2
  242. package/plugins/nestedRows/data/dataManager.mjs +2 -2
  243. package/plugins/nestedRows/nestedRows.js +2 -2
  244. package/plugins/nestedRows/nestedRows.mjs +2 -2
  245. package/plugins/nestedRows/ui/_base.js +2 -2
  246. package/plugins/nestedRows/ui/_base.mjs +2 -2
  247. package/plugins/nestedRows/ui/contextMenu.js +2 -2
  248. package/plugins/nestedRows/ui/contextMenu.mjs +2 -2
  249. package/plugins/nestedRows/utils/rowMoveController.js +2 -2
  250. package/plugins/nestedRows/utils/rowMoveController.mjs +2 -2
  251. package/plugins/persistentState/persistentState.js +2 -2
  252. package/plugins/persistentState/persistentState.mjs +2 -2
  253. package/plugins/persistentState/storage.js +2 -2
  254. package/plugins/persistentState/storage.mjs +2 -2
  255. package/plugins/search/search.js +2 -2
  256. package/plugins/search/search.mjs +2 -2
  257. package/plugins/touchScroll/touchScroll.js +2 -2
  258. package/plugins/touchScroll/touchScroll.mjs +2 -2
  259. package/plugins/trimRows/trimRows.js +2 -2
  260. package/plugins/trimRows/trimRows.mjs +2 -2
  261. package/plugins/undoRedo/undoRedo.js +0 -2
  262. package/plugins/undoRedo/undoRedo.mjs +0 -2
  263. package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -1
  264. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +0 -1
  265. package/renderers/checkboxRenderer/checkboxRenderer.js +0 -2
  266. package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -2
  267. package/selection/highlight/highlight.js +2 -3
  268. package/selection/highlight/highlight.mjs +2 -3
  269. package/selection/highlight/visualSelection.js +2 -2
  270. package/selection/highlight/visualSelection.mjs +2 -2
  271. package/selection/index.js +1 -3
  272. package/selection/index.mjs +2 -2
  273. package/selection/range.js +2 -2
  274. package/selection/range.mjs +2 -2
  275. package/selection/selection.js +2 -2
  276. package/selection/selection.mjs +2 -2
  277. package/selection/utils.js +0 -34
  278. package/selection/utils.mjs +0 -33
  279. package/settings.d.ts +2 -1
  280. package/tableView.js +3 -4
  281. package/tableView.mjs +3 -4
  282. package/translations/indexMapper.js +4 -3
  283. package/translations/indexMapper.mjs +2 -2
  284. package/translations/mapCollections/aggregatedCollection.js +2 -2
  285. package/translations/mapCollections/aggregatedCollection.mjs +2 -2
  286. package/translations/mapCollections/mapCollection.js +2 -2
  287. package/translations/mapCollections/mapCollection.mjs +2 -2
  288. package/translations/maps/indexMap.js +2 -2
  289. package/translations/maps/indexMap.mjs +2 -2
  290. package/translations/maps/linkedPhysicalIndexToValueMap.js +2 -2
  291. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +2 -2
  292. package/utils/dataStructures/linkedList.js +2 -2
  293. package/utils/dataStructures/linkedList.mjs +2 -2
  294. package/utils/dataStructures/tree.js +2 -2
  295. package/utils/dataStructures/tree.mjs +2 -2
  296. package/utils/ghostTable.js +2 -2
  297. package/utils/ghostTable.mjs +2 -2
  298. package/utils/interval.js +2 -2
  299. package/utils/interval.mjs +2 -2
  300. package/utils/parseTable.js +84 -538
  301. package/utils/parseTable.mjs +83 -534
  302. package/utils/samplesGenerator.js +2 -2
  303. package/utils/samplesGenerator.mjs +2 -2
  304. package/validators/timeValidator/timeValidator.js +0 -1
  305. package/validators/timeValidator/timeValidator.mjs +0 -1
  306. package/plugins/copyPaste/clipboardData/clipboardData.js +0 -588
  307. package/plugins/copyPaste/clipboardData/clipboardData.mjs +0 -584
  308. package/plugins/copyPaste/clipboardData/copyClipboardData.js +0 -69
  309. package/plugins/copyPaste/clipboardData/copyClipboardData.mjs +0 -65
  310. package/plugins/copyPaste/clipboardData/index.js +0 -9
  311. package/plugins/copyPaste/clipboardData/index.mjs +0 -4
  312. package/plugins/copyPaste/clipboardData/pasteClipboardData.js +0 -81
  313. package/plugins/copyPaste/clipboardData/pasteClipboardData.mjs +0 -77
@@ -0,0 +1,219 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ require("core-js/modules/es.error.cause.js");
5
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
6
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
9
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
11
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
12
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
13
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
14
+ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
15
+ var _totalTargetWidth = /*#__PURE__*/new WeakMap();
16
+ var _totalColumns = /*#__PURE__*/new WeakMap();
17
+ var _stretchingColumnWidthFn = /*#__PURE__*/new WeakMap();
18
+ var _columnWidthFn = /*#__PURE__*/new WeakMap();
19
+ var _stretchMode = /*#__PURE__*/new WeakMap();
20
+ /**
21
+ * @typedef {object} ColumnStretchingOptions
22
+ * @property {number} totalColumns Total number of columns.
23
+ * @property {Function} columnWidthFn Function that returns the width of the column at a given index (in px).
24
+ * @property {'all' | 'last' | 'none'} stretchMode Stretch mode 'all', 'last' or 'none'.
25
+ * @property {Function} stretchingColumnWidthFn Function that returns the new width of the stretched column.
26
+ */
27
+ /**
28
+ * @class ColumnStretching
29
+ */
30
+ class ColumnStretching {
31
+ /**
32
+ * Default column width.
33
+ *
34
+ * @type {number}
35
+ */
36
+ static get DEFAULT_WIDTH() {
37
+ return 50;
38
+ }
39
+
40
+ /**
41
+ * @type {number}
42
+ */
43
+
44
+ /**
45
+ * @param {ColumnStretchingOptions} options Object with all options specified for column viewport calculation.
46
+ */
47
+ constructor(_ref) {
48
+ let {
49
+ totalColumns,
50
+ stretchMode,
51
+ stretchingColumnWidthFn,
52
+ columnWidthFn
53
+ } = _ref;
54
+ _defineProperty(this, "stretchAllRatio", 0);
55
+ /**
56
+ * @type {number}
57
+ */
58
+ _defineProperty(this, "stretchLastWidth", 0);
59
+ /**
60
+ * @type {number[]}
61
+ */
62
+ _defineProperty(this, "stretchAllColumnsWidth", []);
63
+ /**
64
+ * @type {number}
65
+ */
66
+ _classPrivateFieldInitSpec(this, _totalTargetWidth, {
67
+ writable: true,
68
+ value: 0
69
+ });
70
+ /**
71
+ * @type {boolean}
72
+ */
73
+ _defineProperty(this, "needVerifyLastColumnWidth", true);
74
+ /**
75
+ * The total number of columns.
76
+ *
77
+ * @type {function(): number}
78
+ */
79
+ _classPrivateFieldInitSpec(this, _totalColumns, {
80
+ writable: true,
81
+ value: () => 0
82
+ });
83
+ /**
84
+ * Function that returns the width of the stretched column at a given index (in px).
85
+ *
86
+ * @type {function(): number}
87
+ */
88
+ _classPrivateFieldInitSpec(this, _stretchingColumnWidthFn, {
89
+ writable: true,
90
+ value: width => width
91
+ });
92
+ /**
93
+ * Function that returns the width of the column at a given index (in px).
94
+ *
95
+ * @type {function(): number}
96
+ */
97
+ _classPrivateFieldInitSpec(this, _columnWidthFn, {
98
+ writable: true,
99
+ value: width => width
100
+ });
101
+ /**
102
+ * Stretch mode.
103
+ *
104
+ * @type {function(): 'all' | 'last' | 'none'}
105
+ */
106
+ _classPrivateFieldInitSpec(this, _stretchMode, {
107
+ writable: true,
108
+ value: () => 'none'
109
+ });
110
+ _classPrivateFieldSet(this, _totalColumns, totalColumns);
111
+ _classPrivateFieldSet(this, _stretchMode, stretchMode);
112
+ _classPrivateFieldSet(this, _stretchingColumnWidthFn, stretchingColumnWidthFn !== null && stretchingColumnWidthFn !== void 0 ? stretchingColumnWidthFn : _classPrivateFieldGet(this, _stretchingColumnWidthFn));
113
+ _classPrivateFieldSet(this, _columnWidthFn, columnWidthFn !== null && columnWidthFn !== void 0 ? columnWidthFn : _classPrivateFieldGet(this, _columnWidthFn));
114
+ }
115
+
116
+ /**
117
+ * Recalculate columns stretching.
118
+ *
119
+ * @param {number} totalWidth The total width of the table.
120
+ */
121
+ refreshStretching(totalWidth) {
122
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'none') {
123
+ return;
124
+ }
125
+ _classPrivateFieldSet(this, _totalTargetWidth, totalWidth);
126
+ let sumAll = 0;
127
+ for (let i = 0; i < _classPrivateFieldGet(this, _totalColumns).call(this); i++) {
128
+ const columnWidth = this._getColumnWidth(i);
129
+ const permanentColumnWidth = _classPrivateFieldGet(this, _stretchingColumnWidthFn).call(this, undefined, i);
130
+ if (typeof permanentColumnWidth === 'number') {
131
+ totalWidth -= permanentColumnWidth;
132
+ } else {
133
+ sumAll += columnWidth;
134
+ }
135
+ }
136
+ const remainingSize = totalWidth - sumAll;
137
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'all' && remainingSize > 0) {
138
+ this.stretchAllRatio = totalWidth / sumAll;
139
+ this.stretchAllColumnsWidth = [];
140
+ this.needVerifyLastColumnWidth = true;
141
+ } else if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'last' && totalWidth !== Infinity) {
142
+ const columnWidth = this._getColumnWidth(_classPrivateFieldGet(this, _totalColumns).call(this) - 1);
143
+ const lastColumnWidth = remainingSize + columnWidth;
144
+ this.stretchLastWidth = lastColumnWidth >= 0 ? lastColumnWidth : columnWidth;
145
+ }
146
+ }
147
+
148
+ /**
149
+ * Get stretched column width based on stretchH (all or last) setting passed in handsontable instance.
150
+ *
151
+ * @param {number} column The visual column index.
152
+ * @param {number} baseWidth The default column width.
153
+ * @returns {number|null}
154
+ */
155
+ getStretchedColumnWidth(column, baseWidth) {
156
+ let result = null;
157
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'all' && this.stretchAllRatio !== 0) {
158
+ result = this._getStretchedAllColumnWidth(column, baseWidth);
159
+ } else if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'last' && this.stretchLastWidth !== 0) {
160
+ result = this._getStretchedLastColumnWidth(column);
161
+ }
162
+ return result;
163
+ }
164
+
165
+ /**
166
+ * @param {number} column The visual column index.
167
+ * @param {number} baseWidth The default column width.
168
+ * @returns {number}
169
+ * @private
170
+ */
171
+ _getStretchedAllColumnWidth(column, baseWidth) {
172
+ let sumRatioWidth = 0;
173
+ if (!this.stretchAllColumnsWidth[column]) {
174
+ const stretchedWidth = Math.round(baseWidth * this.stretchAllRatio);
175
+ const newStretchedWidth = _classPrivateFieldGet(this, _stretchingColumnWidthFn).call(this, stretchedWidth, column);
176
+ if (newStretchedWidth === undefined) {
177
+ this.stretchAllColumnsWidth[column] = stretchedWidth;
178
+ } else {
179
+ this.stretchAllColumnsWidth[column] = isNaN(newStretchedWidth) ? this._getColumnWidth(column) : newStretchedWidth;
180
+ }
181
+ }
182
+ if (this.stretchAllColumnsWidth.length === _classPrivateFieldGet(this, _totalColumns).call(this) && this.needVerifyLastColumnWidth) {
183
+ this.needVerifyLastColumnWidth = false;
184
+ for (let i = 0; i < this.stretchAllColumnsWidth.length; i++) {
185
+ sumRatioWidth += this.stretchAllColumnsWidth[i];
186
+ }
187
+ if (sumRatioWidth !== _classPrivateFieldGet(this, _totalTargetWidth)) {
188
+ this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length - 1] += _classPrivateFieldGet(this, _totalTargetWidth) - sumRatioWidth;
189
+ }
190
+ }
191
+ return this.stretchAllColumnsWidth[column];
192
+ }
193
+
194
+ /**
195
+ * @param {number} column The visual column index.
196
+ * @returns {number|null}
197
+ * @private
198
+ */
199
+ _getStretchedLastColumnWidth(column) {
200
+ if (column === _classPrivateFieldGet(this, _totalColumns).call(this) - 1) {
201
+ return this.stretchLastWidth;
202
+ }
203
+ return null;
204
+ }
205
+
206
+ /**
207
+ * @param {number} column The visual column index.
208
+ * @returns {number}
209
+ * @private
210
+ */
211
+ _getColumnWidth(column) {
212
+ let width = _classPrivateFieldGet(this, _columnWidthFn).call(this, column);
213
+ if (isNaN(width)) {
214
+ width = ColumnStretching.DEFAULT_WIDTH;
215
+ }
216
+ return width;
217
+ }
218
+ }
219
+ exports.ColumnStretching = ColumnStretching;
@@ -0,0 +1,215 @@
1
+ import "core-js/modules/es.error.cause.js";
2
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
3
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
8
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
9
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
10
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
11
+ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
12
+ var _totalTargetWidth = /*#__PURE__*/new WeakMap();
13
+ var _totalColumns = /*#__PURE__*/new WeakMap();
14
+ var _stretchingColumnWidthFn = /*#__PURE__*/new WeakMap();
15
+ var _columnWidthFn = /*#__PURE__*/new WeakMap();
16
+ var _stretchMode = /*#__PURE__*/new WeakMap();
17
+ /**
18
+ * @typedef {object} ColumnStretchingOptions
19
+ * @property {number} totalColumns Total number of columns.
20
+ * @property {Function} columnWidthFn Function that returns the width of the column at a given index (in px).
21
+ * @property {'all' | 'last' | 'none'} stretchMode Stretch mode 'all', 'last' or 'none'.
22
+ * @property {Function} stretchingColumnWidthFn Function that returns the new width of the stretched column.
23
+ */
24
+ /**
25
+ * @class ColumnStretching
26
+ */
27
+ export class ColumnStretching {
28
+ /**
29
+ * Default column width.
30
+ *
31
+ * @type {number}
32
+ */
33
+ static get DEFAULT_WIDTH() {
34
+ return 50;
35
+ }
36
+
37
+ /**
38
+ * @type {number}
39
+ */
40
+
41
+ /**
42
+ * @param {ColumnStretchingOptions} options Object with all options specified for column viewport calculation.
43
+ */
44
+ constructor(_ref) {
45
+ let {
46
+ totalColumns,
47
+ stretchMode,
48
+ stretchingColumnWidthFn,
49
+ columnWidthFn
50
+ } = _ref;
51
+ _defineProperty(this, "stretchAllRatio", 0);
52
+ /**
53
+ * @type {number}
54
+ */
55
+ _defineProperty(this, "stretchLastWidth", 0);
56
+ /**
57
+ * @type {number[]}
58
+ */
59
+ _defineProperty(this, "stretchAllColumnsWidth", []);
60
+ /**
61
+ * @type {number}
62
+ */
63
+ _classPrivateFieldInitSpec(this, _totalTargetWidth, {
64
+ writable: true,
65
+ value: 0
66
+ });
67
+ /**
68
+ * @type {boolean}
69
+ */
70
+ _defineProperty(this, "needVerifyLastColumnWidth", true);
71
+ /**
72
+ * The total number of columns.
73
+ *
74
+ * @type {function(): number}
75
+ */
76
+ _classPrivateFieldInitSpec(this, _totalColumns, {
77
+ writable: true,
78
+ value: () => 0
79
+ });
80
+ /**
81
+ * Function that returns the width of the stretched column at a given index (in px).
82
+ *
83
+ * @type {function(): number}
84
+ */
85
+ _classPrivateFieldInitSpec(this, _stretchingColumnWidthFn, {
86
+ writable: true,
87
+ value: width => width
88
+ });
89
+ /**
90
+ * Function that returns the width of the column at a given index (in px).
91
+ *
92
+ * @type {function(): number}
93
+ */
94
+ _classPrivateFieldInitSpec(this, _columnWidthFn, {
95
+ writable: true,
96
+ value: width => width
97
+ });
98
+ /**
99
+ * Stretch mode.
100
+ *
101
+ * @type {function(): 'all' | 'last' | 'none'}
102
+ */
103
+ _classPrivateFieldInitSpec(this, _stretchMode, {
104
+ writable: true,
105
+ value: () => 'none'
106
+ });
107
+ _classPrivateFieldSet(this, _totalColumns, totalColumns);
108
+ _classPrivateFieldSet(this, _stretchMode, stretchMode);
109
+ _classPrivateFieldSet(this, _stretchingColumnWidthFn, stretchingColumnWidthFn !== null && stretchingColumnWidthFn !== void 0 ? stretchingColumnWidthFn : _classPrivateFieldGet(this, _stretchingColumnWidthFn));
110
+ _classPrivateFieldSet(this, _columnWidthFn, columnWidthFn !== null && columnWidthFn !== void 0 ? columnWidthFn : _classPrivateFieldGet(this, _columnWidthFn));
111
+ }
112
+
113
+ /**
114
+ * Recalculate columns stretching.
115
+ *
116
+ * @param {number} totalWidth The total width of the table.
117
+ */
118
+ refreshStretching(totalWidth) {
119
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'none') {
120
+ return;
121
+ }
122
+ _classPrivateFieldSet(this, _totalTargetWidth, totalWidth);
123
+ let sumAll = 0;
124
+ for (let i = 0; i < _classPrivateFieldGet(this, _totalColumns).call(this); i++) {
125
+ const columnWidth = this._getColumnWidth(i);
126
+ const permanentColumnWidth = _classPrivateFieldGet(this, _stretchingColumnWidthFn).call(this, undefined, i);
127
+ if (typeof permanentColumnWidth === 'number') {
128
+ totalWidth -= permanentColumnWidth;
129
+ } else {
130
+ sumAll += columnWidth;
131
+ }
132
+ }
133
+ const remainingSize = totalWidth - sumAll;
134
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'all' && remainingSize > 0) {
135
+ this.stretchAllRatio = totalWidth / sumAll;
136
+ this.stretchAllColumnsWidth = [];
137
+ this.needVerifyLastColumnWidth = true;
138
+ } else if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'last' && totalWidth !== Infinity) {
139
+ const columnWidth = this._getColumnWidth(_classPrivateFieldGet(this, _totalColumns).call(this) - 1);
140
+ const lastColumnWidth = remainingSize + columnWidth;
141
+ this.stretchLastWidth = lastColumnWidth >= 0 ? lastColumnWidth : columnWidth;
142
+ }
143
+ }
144
+
145
+ /**
146
+ * Get stretched column width based on stretchH (all or last) setting passed in handsontable instance.
147
+ *
148
+ * @param {number} column The visual column index.
149
+ * @param {number} baseWidth The default column width.
150
+ * @returns {number|null}
151
+ */
152
+ getStretchedColumnWidth(column, baseWidth) {
153
+ let result = null;
154
+ if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'all' && this.stretchAllRatio !== 0) {
155
+ result = this._getStretchedAllColumnWidth(column, baseWidth);
156
+ } else if (_classPrivateFieldGet(this, _stretchMode).call(this) === 'last' && this.stretchLastWidth !== 0) {
157
+ result = this._getStretchedLastColumnWidth(column);
158
+ }
159
+ return result;
160
+ }
161
+
162
+ /**
163
+ * @param {number} column The visual column index.
164
+ * @param {number} baseWidth The default column width.
165
+ * @returns {number}
166
+ * @private
167
+ */
168
+ _getStretchedAllColumnWidth(column, baseWidth) {
169
+ let sumRatioWidth = 0;
170
+ if (!this.stretchAllColumnsWidth[column]) {
171
+ const stretchedWidth = Math.round(baseWidth * this.stretchAllRatio);
172
+ const newStretchedWidth = _classPrivateFieldGet(this, _stretchingColumnWidthFn).call(this, stretchedWidth, column);
173
+ if (newStretchedWidth === undefined) {
174
+ this.stretchAllColumnsWidth[column] = stretchedWidth;
175
+ } else {
176
+ this.stretchAllColumnsWidth[column] = isNaN(newStretchedWidth) ? this._getColumnWidth(column) : newStretchedWidth;
177
+ }
178
+ }
179
+ if (this.stretchAllColumnsWidth.length === _classPrivateFieldGet(this, _totalColumns).call(this) && this.needVerifyLastColumnWidth) {
180
+ this.needVerifyLastColumnWidth = false;
181
+ for (let i = 0; i < this.stretchAllColumnsWidth.length; i++) {
182
+ sumRatioWidth += this.stretchAllColumnsWidth[i];
183
+ }
184
+ if (sumRatioWidth !== _classPrivateFieldGet(this, _totalTargetWidth)) {
185
+ this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length - 1] += _classPrivateFieldGet(this, _totalTargetWidth) - sumRatioWidth;
186
+ }
187
+ }
188
+ return this.stretchAllColumnsWidth[column];
189
+ }
190
+
191
+ /**
192
+ * @param {number} column The visual column index.
193
+ * @returns {number|null}
194
+ * @private
195
+ */
196
+ _getStretchedLastColumnWidth(column) {
197
+ if (column === _classPrivateFieldGet(this, _totalColumns).call(this) - 1) {
198
+ return this.stretchLastWidth;
199
+ }
200
+ return null;
201
+ }
202
+
203
+ /**
204
+ * @param {number} column The visual column index.
205
+ * @returns {number}
206
+ * @private
207
+ */
208
+ _getColumnWidth(column) {
209
+ let width = _classPrivateFieldGet(this, _columnWidthFn).call(this, column);
210
+ if (isNaN(width)) {
211
+ width = ColumnStretching.DEFAULT_WIDTH;
212
+ }
213
+ return width;
214
+ }
215
+ }
@@ -3,8 +3,8 @@
3
3
  exports.__esModule = true;
4
4
  require("core-js/modules/es.error.cause.js");
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
7
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
8
  /**
9
9
  * Factory for newly created DOM elements.
10
10
  *
@@ -1,7 +1,7 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  /**
6
6
  * Factory for newly created DOM elements.
7
7
  *
@@ -7,8 +7,8 @@ var _constants = require("./constants");
7
7
  var _viewSizeSet = _interopRequireDefault(require("./viewSizeSet"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
9
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
11
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
11
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  /**
13
13
  * Executive model for each table renderer. It's responsible for injecting DOM nodes in a
14
14
  * specified order and adjusting the number of elements in the root node.
@@ -1,8 +1,8 @@
1
1
  import "core-js/modules/es.array.push.js";
2
2
  import "core-js/modules/es.error.cause.js";
3
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  import { WORKING_SPACE_TOP, WORKING_SPACE_BOTTOM } from "./constants.mjs";
7
7
  import ViewSizeSet from "./viewSizeSet.mjs";
8
8
  /**
@@ -3,8 +3,8 @@
3
3
  exports.__esModule = true;
4
4
  require("core-js/modules/es.error.cause.js");
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
7
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
8
  /**
9
9
  * Holder for current and next size (count of rendered and to render DOM elements) and offset.
10
10
  *
@@ -1,7 +1,7 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  /**
6
6
  * Holder for current and next size (count of rendered and to render DOM elements) and offset.
7
7
  *
@@ -6,8 +6,8 @@ var _viewSize = _interopRequireDefault(require("./viewSize"));
6
6
  var _constants = require("./constants");
7
7
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
8
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
10
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
10
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
11
  /**
12
12
  * The class is a source of the truth of information about the current and
13
13
  * next size of the rendered DOM elements and current and next offset of
@@ -1,7 +1,7 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import ViewSize from "./viewSize.mjs";
6
6
  import { WORKING_SPACE_ALL, WORKING_SPACE_TOP, WORKING_SPACE_BOTTOM } from "./constants.mjs";
7
7
  /**
@@ -3,8 +3,8 @@
3
3
  exports.__esModule = true;
4
4
  require("core-js/modules/es.error.cause.js");
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
7
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
8
  /**
9
9
  * Row utils class contains all necessary information about sizes of the rows.
10
10
  *
@@ -1,7 +1,7 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  /**
6
6
  * Row utils class contains all necessary information about sizes of the rows.
7
7
  *
@@ -255,15 +255,15 @@ class Viewport {
255
255
  wtSettings,
256
256
  wtTable
257
257
  } = this;
258
- let height;
258
+ if (wtSettings.getSetting('renderAllRows') && calculationType === _calculator.RENDER_TYPE) {
259
+ return new _calculator.RenderAllRowsCalculator({
260
+ totalRows: wtSettings.getSetting('totalRows')
261
+ });
262
+ }
263
+ let height = this.getViewportHeight();
259
264
  let scrollbarHeight;
260
265
  let fixedRowsHeight;
261
266
  this.rowHeaderWidth = NaN;
262
- if (wtSettings.getSetting('renderAllRows') && calculationType === _calculator.RENDER_TYPE) {
263
- height = Infinity;
264
- } else {
265
- height = this.getViewportHeight();
266
- }
267
267
  let pos = this.dataAccessObject.topScrollPosition - this.dataAccessObject.topParentOffset;
268
268
  const fixedRowsTop = wtSettings.getSetting('fixedRowsTop');
269
269
  const fixedRowsBottom = wtSettings.getSetting('fixedRowsBottom');
@@ -308,6 +308,11 @@ class Viewport {
308
308
  wtSettings,
309
309
  wtTable
310
310
  } = this;
311
+ if (wtSettings.getSetting('renderAllColumns') && calculationType === _calculator.RENDER_TYPE) {
312
+ return new _calculator.RenderAllColumnsCalculator({
313
+ totalColumns: wtSettings.getSetting('totalColumns')
314
+ });
315
+ }
311
316
  let width = this.getViewportWidth();
312
317
  let pos = Math.abs(this.dataAccessObject.inlineStartScrollPosition) - this.dataAccessObject.inlineStartParentOffset;
313
318
  this.columnHeaderHeight = NaN;
@@ -327,10 +332,6 @@ class Viewport {
327
332
  columnWidthFn: sourceCol => wtTable.getColumnWidth(sourceCol),
328
333
  overrideFn: wtSettings.getSettingPure('viewportColumnCalculatorOverride'),
329
334
  calculationType,
330
- stretchMode: wtSettings.getSetting('stretchH'),
331
- stretchingColumnWidthFn: (stretchedWidth, column) => {
332
- return wtSettings.getSetting('onBeforeStretchingColumnWidth', stretchedWidth, column);
333
- },
334
335
  inlineStartOffset: this.dataAccessObject.inlineStartParentOffset
335
336
  });
336
337
  }
@@ -345,22 +346,26 @@ class Viewport {
345
346
  */
346
347
  createRenderCalculators() {
347
348
  let fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
348
- let runFastDraw = fastDraw;
349
- if (runFastDraw) {
349
+ const {
350
+ wtSettings
351
+ } = this;
352
+ if (fastDraw && !wtSettings.getSetting('renderAllRows')) {
350
353
  const proposedRowsVisibleCalculator = this.createRowsCalculator(_calculator.FULLY_VISIBLE_TYPE);
354
+ fastDraw = this.areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator);
355
+ }
356
+ if (fastDraw && !wtSettings.getSetting('renderAllColumns')) {
351
357
  const proposedColumnsVisibleCalculator = this.createColumnsCalculator(_calculator.FULLY_VISIBLE_TYPE);
352
- if (!(this.areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator) && this.areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator))) {
353
- runFastDraw = false;
354
- }
358
+ fastDraw = this.areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator);
355
359
  }
356
- if (!runFastDraw) {
360
+ if (!fastDraw) {
357
361
  this.rowsRenderCalculator = this.createRowsCalculator(_calculator.RENDER_TYPE);
358
362
  this.columnsRenderCalculator = this.createColumnsCalculator(_calculator.RENDER_TYPE);
359
363
  }
364
+
360
365
  // delete temporarily to make sure that renderers always use rowsRenderCalculator, not rowsVisibleCalculator
361
366
  this.rowsVisibleCalculator = null;
362
367
  this.columnsVisibleCalculator = null;
363
- return runFastDraw;
368
+ return fastDraw;
364
369
  }
365
370
 
366
371
  /**