handsontable 0.0.0-next-9ec04ce-20221121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/SheetClip/SheetClip.js +128 -0
- package/3rdparty/SheetClip/SheetClip.mjs +123 -0
- package/3rdparty/SheetClip/index.js +7 -0
- package/3rdparty/SheetClip/index.mjs +1 -0
- package/3rdparty/autoResize/autoResize.js +164 -0
- package/3rdparty/autoResize/autoResize.mjs +160 -0
- package/3rdparty/autoResize/index.js +6 -0
- package/3rdparty/autoResize/index.mjs +1 -0
- package/3rdparty/walkontable/src/border.js +746 -0
- package/3rdparty/walkontable/src/border.mjs +741 -0
- package/3rdparty/walkontable/src/calculator/constants.js +30 -0
- package/3rdparty/walkontable/src/calculator/constants.mjs +23 -0
- package/3rdparty/walkontable/src/calculator/index.js +22 -0
- package/3rdparty/walkontable/src/calculator/index.mjs +4 -0
- package/3rdparty/walkontable/src/calculator/viewportColumns.d.ts +18 -0
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +297 -0
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +292 -0
- package/3rdparty/walkontable/src/calculator/viewportRows.js +175 -0
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +170 -0
- package/3rdparty/walkontable/src/cell/coords.d.ts +16 -0
- package/3rdparty/walkontable/src/cell/coords.js +185 -0
- package/3rdparty/walkontable/src/cell/coords.mjs +180 -0
- package/3rdparty/walkontable/src/cell/range.d.ts +59 -0
- package/3rdparty/walkontable/src/cell/range.js +888 -0
- package/3rdparty/walkontable/src/cell/range.mjs +882 -0
- package/3rdparty/walkontable/src/core/_base.js +395 -0
- package/3rdparty/walkontable/src/core/_base.mjs +390 -0
- package/3rdparty/walkontable/src/core/clone.js +59 -0
- package/3rdparty/walkontable/src/core/clone.mjs +54 -0
- package/3rdparty/walkontable/src/core/core.js +130 -0
- package/3rdparty/walkontable/src/core/core.mjs +125 -0
- package/3rdparty/walkontable/src/event.js +401 -0
- package/3rdparty/walkontable/src/event.mjs +396 -0
- package/3rdparty/walkontable/src/facade/core.js +236 -0
- package/3rdparty/walkontable/src/facade/core.mjs +231 -0
- package/3rdparty/walkontable/src/filter/column.js +107 -0
- package/3rdparty/walkontable/src/filter/column.mjs +102 -0
- package/3rdparty/walkontable/src/filter/row.js +107 -0
- package/3rdparty/walkontable/src/filter/row.mjs +102 -0
- package/3rdparty/walkontable/src/index.d.ts +1 -0
- package/3rdparty/walkontable/src/index.js +37 -0
- package/3rdparty/walkontable/src/index.mjs +10 -0
- package/3rdparty/walkontable/src/overlay/_base.js +363 -0
- package/3rdparty/walkontable/src/overlay/_base.mjs +357 -0
- package/3rdparty/walkontable/src/overlay/bottom.js +397 -0
- package/3rdparty/walkontable/src/overlay/bottom.mjs +391 -0
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.js +140 -0
- package/3rdparty/walkontable/src/overlay/bottomInlineStartCorner.mjs +134 -0
- package/3rdparty/walkontable/src/overlay/constants.js +26 -0
- package/3rdparty/walkontable/src/overlay/constants.mjs +15 -0
- package/3rdparty/walkontable/src/overlay/index.js +34 -0
- package/3rdparty/walkontable/src/overlay/index.mjs +7 -0
- package/3rdparty/walkontable/src/overlay/inlineStart.js +385 -0
- package/3rdparty/walkontable/src/overlay/inlineStart.mjs +379 -0
- package/3rdparty/walkontable/src/overlay/top.js +415 -0
- package/3rdparty/walkontable/src/overlay/top.mjs +409 -0
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +130 -0
- package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +124 -0
- package/3rdparty/walkontable/src/overlays.js +675 -0
- package/3rdparty/walkontable/src/overlays.mjs +670 -0
- package/3rdparty/walkontable/src/renderer/_base.js +83 -0
- package/3rdparty/walkontable/src/renderer/_base.mjs +78 -0
- package/3rdparty/walkontable/src/renderer/cells.js +127 -0
- package/3rdparty/walkontable/src/renderer/cells.mjs +122 -0
- package/3rdparty/walkontable/src/renderer/colGroup.js +101 -0
- package/3rdparty/walkontable/src/renderer/colGroup.mjs +96 -0
- package/3rdparty/walkontable/src/renderer/columnHeaders.js +115 -0
- package/3rdparty/walkontable/src/renderer/columnHeaders.mjs +110 -0
- package/3rdparty/walkontable/src/renderer/index.js +118 -0
- package/3rdparty/walkontable/src/renderer/index.mjs +107 -0
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +119 -0
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +114 -0
- package/3rdparty/walkontable/src/renderer/rows.js +99 -0
- package/3rdparty/walkontable/src/renderer/rows.mjs +94 -0
- package/3rdparty/walkontable/src/renderer/table.js +317 -0
- package/3rdparty/walkontable/src/renderer/table.mjs +313 -0
- package/3rdparty/walkontable/src/scroll.js +316 -0
- package/3rdparty/walkontable/src/scroll.mjs +311 -0
- package/3rdparty/walkontable/src/selection.js +349 -0
- package/3rdparty/walkontable/src/selection.mjs +343 -0
- package/3rdparty/walkontable/src/settings.js +306 -0
- package/3rdparty/walkontable/src/settings.mjs +302 -0
- package/3rdparty/walkontable/src/table/bottom.js +56 -0
- package/3rdparty/walkontable/src/table/bottom.mjs +50 -0
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.js +57 -0
- package/3rdparty/walkontable/src/table/bottomInlineStartCorner.mjs +51 -0
- package/3rdparty/walkontable/src/table/inlineStart.js +53 -0
- package/3rdparty/walkontable/src/table/inlineStart.mjs +47 -0
- package/3rdparty/walkontable/src/table/master.js +132 -0
- package/3rdparty/walkontable/src/table/master.mjs +126 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +93 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +88 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +93 -0
- package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +88 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +85 -0
- package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +80 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +90 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +85 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +85 -0
- package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +80 -0
- package/3rdparty/walkontable/src/table/top.js +56 -0
- package/3rdparty/walkontable/src/table/top.mjs +50 -0
- package/3rdparty/walkontable/src/table/topInlineStartCorner.js +57 -0
- package/3rdparty/walkontable/src/table/topInlineStartCorner.mjs +51 -0
- package/3rdparty/walkontable/src/table.js +1171 -0
- package/3rdparty/walkontable/src/table.mjs +1165 -0
- package/3rdparty/walkontable/src/types.js +98 -0
- package/3rdparty/walkontable/src/types.mjs +97 -0
- package/3rdparty/walkontable/src/utils/column.js +121 -0
- package/3rdparty/walkontable/src/utils/column.mjs +117 -0
- package/3rdparty/walkontable/src/utils/nodesPool.js +48 -0
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +44 -0
- package/3rdparty/walkontable/src/utils/orderView/constants.js +30 -0
- package/3rdparty/walkontable/src/utils/orderView/constants.mjs +23 -0
- package/3rdparty/walkontable/src/utils/orderView/index.js +8 -0
- package/3rdparty/walkontable/src/utils/orderView/index.mjs +3 -0
- package/3rdparty/walkontable/src/utils/orderView/sharedView.js +81 -0
- package/3rdparty/walkontable/src/utils/orderView/sharedView.mjs +76 -0
- package/3rdparty/walkontable/src/utils/orderView/view.js +216 -0
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +211 -0
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +68 -0
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +64 -0
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +137 -0
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +132 -0
- package/3rdparty/walkontable/src/utils/row.js +43 -0
- package/3rdparty/walkontable/src/utils/row.mjs +39 -0
- package/3rdparty/walkontable/src/viewport.js +491 -0
- package/3rdparty/walkontable/src/viewport.mjs +486 -0
- package/CHANGELOG.md +716 -0
- package/LICENSE.txt +25 -0
- package/README.md +140 -0
- package/base.d.ts +3 -0
- package/base.js +54 -0
- package/base.mjs +44 -0
- package/cellTypes/autocompleteType/autocompleteType.d.ts +17 -0
- package/cellTypes/autocompleteType/autocompleteType.js +16 -0
- package/cellTypes/autocompleteType/autocompleteType.mjs +10 -0
- package/cellTypes/autocompleteType/index.d.ts +1 -0
- package/cellTypes/autocompleteType/index.js +7 -0
- package/cellTypes/autocompleteType/index.mjs +1 -0
- package/cellTypes/base.d.ts +14 -0
- package/cellTypes/checkboxType/checkboxType.d.ts +14 -0
- package/cellTypes/checkboxType/checkboxType.js +14 -0
- package/cellTypes/checkboxType/checkboxType.mjs +8 -0
- package/cellTypes/checkboxType/index.d.ts +1 -0
- package/cellTypes/checkboxType/index.js +7 -0
- package/cellTypes/checkboxType/index.mjs +1 -0
- package/cellTypes/dateType/dateType.d.ts +17 -0
- package/cellTypes/dateType/dateType.js +17 -0
- package/cellTypes/dateType/dateType.mjs +11 -0
- package/cellTypes/dateType/index.d.ts +1 -0
- package/cellTypes/dateType/index.js +7 -0
- package/cellTypes/dateType/index.mjs +1 -0
- package/cellTypes/dropdownType/dropdownType.d.ts +17 -0
- package/cellTypes/dropdownType/dropdownType.js +17 -0
- package/cellTypes/dropdownType/dropdownType.mjs +11 -0
- package/cellTypes/dropdownType/index.d.ts +1 -0
- package/cellTypes/dropdownType/index.js +7 -0
- package/cellTypes/dropdownType/index.mjs +1 -0
- package/cellTypes/handsontableType/handsontableType.d.ts +14 -0
- package/cellTypes/handsontableType/handsontableType.js +15 -0
- package/cellTypes/handsontableType/handsontableType.mjs +9 -0
- package/cellTypes/handsontableType/index.d.ts +1 -0
- package/cellTypes/handsontableType/index.js +7 -0
- package/cellTypes/handsontableType/index.mjs +1 -0
- package/cellTypes/index.d.ts +47 -0
- package/cellTypes/index.js +52 -0
- package/cellTypes/index.mjs +26 -0
- package/cellTypes/numericType/index.d.ts +1 -0
- package/cellTypes/numericType/index.js +7 -0
- package/cellTypes/numericType/index.mjs +1 -0
- package/cellTypes/numericType/numericType.d.ts +17 -0
- package/cellTypes/numericType/numericType.js +17 -0
- package/cellTypes/numericType/numericType.mjs +11 -0
- package/cellTypes/passwordType/index.d.ts +1 -0
- package/cellTypes/passwordType/index.js +7 -0
- package/cellTypes/passwordType/index.mjs +1 -0
- package/cellTypes/passwordType/passwordType.d.ts +14 -0
- package/cellTypes/passwordType/passwordType.js +15 -0
- package/cellTypes/passwordType/passwordType.mjs +9 -0
- package/cellTypes/registry.d.ts +18 -0
- package/cellTypes/registry.js +60 -0
- package/cellTypes/registry.mjs +51 -0
- package/cellTypes/textType/index.d.ts +1 -0
- package/cellTypes/textType/index.js +7 -0
- package/cellTypes/textType/index.mjs +1 -0
- package/cellTypes/textType/textType.d.ts +14 -0
- package/cellTypes/textType/textType.js +14 -0
- package/cellTypes/textType/textType.mjs +8 -0
- package/cellTypes/timeType/index.d.ts +1 -0
- package/cellTypes/timeType/index.js +7 -0
- package/cellTypes/timeType/index.mjs +1 -0
- package/cellTypes/timeType/timeType.d.ts +17 -0
- package/cellTypes/timeType/timeType.js +16 -0
- package/cellTypes/timeType/timeType.mjs +10 -0
- package/common.d.ts +74 -0
- package/core.d.ts +167 -0
- package/core.js +4684 -0
- package/core.mjs +4679 -0
- package/dataMap/dataMap.js +975 -0
- package/dataMap/dataMap.mjs +970 -0
- package/dataMap/dataSource.js +325 -0
- package/dataMap/dataSource.mjs +320 -0
- package/dataMap/index.js +16 -0
- package/dataMap/index.mjs +7 -0
- package/dataMap/metaManager/index.js +339 -0
- package/dataMap/metaManager/index.mjs +334 -0
- package/dataMap/metaManager/lazyFactoryMap.js +370 -0
- package/dataMap/metaManager/lazyFactoryMap.mjs +366 -0
- package/dataMap/metaManager/metaLayers/cellMeta.js +275 -0
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +270 -0
- package/dataMap/metaManager/metaLayers/columnMeta.js +153 -0
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +148 -0
- package/dataMap/metaManager/metaLayers/globalMeta.js +103 -0
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +98 -0
- package/dataMap/metaManager/metaLayers/tableMeta.js +73 -0
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +69 -0
- package/dataMap/metaManager/metaSchema.js +4610 -0
- package/dataMap/metaManager/metaSchema.mjs +4605 -0
- package/dataMap/metaManager/mods/dynamicCellMeta.js +107 -0
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +101 -0
- package/dataMap/metaManager/mods/extendMetaProperties.js +104 -0
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +99 -0
- package/dataMap/metaManager/utils.js +99 -0
- package/dataMap/metaManager/utils.mjs +91 -0
- package/dataMap/replaceData.js +119 -0
- package/dataMap/replaceData.mjs +115 -0
- package/dist/README.md +54 -0
- package/dist/handsontable.css +1941 -0
- package/dist/handsontable.full.css +2172 -0
- package/dist/handsontable.full.js +150392 -0
- package/dist/handsontable.full.min.css +47 -0
- package/dist/handsontable.full.min.js +869 -0
- package/dist/handsontable.js +94075 -0
- package/dist/handsontable.min.css +43 -0
- package/dist/handsontable.min.js +31 -0
- package/dist/languages/all.js +583 -0
- package/dist/languages/all.min.js +1 -0
- package/dist/languages/ar-AR.js +157 -0
- package/dist/languages/ar-AR.min.js +1 -0
- package/dist/languages/cs-CZ.js +157 -0
- package/dist/languages/cs-CZ.min.js +1 -0
- package/dist/languages/de-CH.js +158 -0
- package/dist/languages/de-CH.min.js +1 -0
- package/dist/languages/de-DE.js +159 -0
- package/dist/languages/de-DE.min.js +1 -0
- package/dist/languages/en-US.js +160 -0
- package/dist/languages/en-US.min.js +1 -0
- package/dist/languages/es-MX.js +161 -0
- package/dist/languages/es-MX.min.js +1 -0
- package/dist/languages/fr-FR.js +162 -0
- package/dist/languages/fr-FR.min.js +1 -0
- package/dist/languages/it-IT.js +164 -0
- package/dist/languages/it-IT.min.js +1 -0
- package/dist/languages/ja-JP.js +161 -0
- package/dist/languages/ja-JP.min.js +1 -0
- package/dist/languages/ko-KR.js +161 -0
- package/dist/languages/ko-KR.min.js +1 -0
- package/dist/languages/lv-LV.js +161 -0
- package/dist/languages/lv-LV.min.js +1 -0
- package/dist/languages/nb-NO.js +161 -0
- package/dist/languages/nb-NO.min.js +1 -0
- package/dist/languages/nl-NL.js +161 -0
- package/dist/languages/nl-NL.min.js +1 -0
- package/dist/languages/pl-PL.js +161 -0
- package/dist/languages/pl-PL.min.js +1 -0
- package/dist/languages/pt-BR.js +161 -0
- package/dist/languages/pt-BR.min.js +1 -0
- package/dist/languages/ru-RU.js +161 -0
- package/dist/languages/ru-RU.min.js +1 -0
- package/dist/languages/sr-SP.js +161 -0
- package/dist/languages/sr-SP.min.js +1 -0
- package/dist/languages/zh-CN.js +161 -0
- package/dist/languages/zh-CN.min.js +1 -0
- package/dist/languages/zh-TW.js +161 -0
- package/dist/languages/zh-TW.min.js +1 -0
- package/editorManager.js +522 -0
- package/editorManager.mjs +514 -0
- package/editors/autocompleteEditor/autocompleteEditor.d.ts +29 -0
- package/editors/autocompleteEditor/autocompleteEditor.js +584 -0
- package/editors/autocompleteEditor/autocompleteEditor.mjs +578 -0
- package/editors/autocompleteEditor/index.d.ts +1 -0
- package/editors/autocompleteEditor/index.js +7 -0
- package/editors/autocompleteEditor/index.mjs +1 -0
- package/editors/baseEditor/baseEditor.d.ts +45 -0
- package/editors/baseEditor/baseEditor.js +688 -0
- package/editors/baseEditor/baseEditor.mjs +679 -0
- package/editors/baseEditor/index.d.ts +1 -0
- package/editors/baseEditor/index.js +8 -0
- package/editors/baseEditor/index.mjs +1 -0
- package/editors/checkboxEditor/checkboxEditor.d.ts +12 -0
- package/editors/checkboxEditor/checkboxEditor.js +85 -0
- package/editors/checkboxEditor/checkboxEditor.mjs +79 -0
- package/editors/checkboxEditor/index.d.ts +1 -0
- package/editors/checkboxEditor/index.js +7 -0
- package/editors/checkboxEditor/index.mjs +1 -0
- package/editors/dateEditor/dateEditor.d.ts +18 -0
- package/editors/dateEditor/dateEditor.js +325 -0
- package/editors/dateEditor/dateEditor.mjs +318 -0
- package/editors/dateEditor/index.d.ts +1 -0
- package/editors/dateEditor/index.js +7 -0
- package/editors/dateEditor/index.mjs +1 -0
- package/editors/dropdownEditor/dropdownEditor.d.ts +7 -0
- package/editors/dropdownEditor/dropdownEditor.js +81 -0
- package/editors/dropdownEditor/dropdownEditor.mjs +74 -0
- package/editors/dropdownEditor/index.d.ts +1 -0
- package/editors/dropdownEditor/index.js +7 -0
- package/editors/dropdownEditor/index.mjs +1 -0
- package/editors/handsontableEditor/handsontableEditor.d.ts +10 -0
- package/editors/handsontableEditor/handsontableEditor.js +306 -0
- package/editors/handsontableEditor/handsontableEditor.mjs +300 -0
- package/editors/handsontableEditor/index.d.ts +1 -0
- package/editors/handsontableEditor/index.js +7 -0
- package/editors/handsontableEditor/index.mjs +1 -0
- package/editors/index.d.ts +56 -0
- package/editors/index.js +63 -0
- package/editors/index.mjs +30 -0
- package/editors/numericEditor/index.d.ts +1 -0
- package/editors/numericEditor/index.js +7 -0
- package/editors/numericEditor/index.mjs +1 -0
- package/editors/numericEditor/numericEditor.d.ts +7 -0
- package/editors/numericEditor/numericEditor.js +49 -0
- package/editors/numericEditor/numericEditor.mjs +43 -0
- package/editors/passwordEditor/index.d.ts +1 -0
- package/editors/passwordEditor/index.js +7 -0
- package/editors/passwordEditor/index.mjs +1 -0
- package/editors/passwordEditor/passwordEditor.d.ts +7 -0
- package/editors/passwordEditor/passwordEditor.js +68 -0
- package/editors/passwordEditor/passwordEditor.mjs +62 -0
- package/editors/registry.d.ts +29 -0
- package/editors/registry.js +106 -0
- package/editors/registry.mjs +94 -0
- package/editors/selectEditor/index.d.ts +1 -0
- package/editors/selectEditor/index.js +7 -0
- package/editors/selectEditor/index.mjs +1 -0
- package/editors/selectEditor/selectEditor.d.ts +16 -0
- package/editors/selectEditor/selectEditor.js +302 -0
- package/editors/selectEditor/selectEditor.mjs +296 -0
- package/editors/textEditor/caretPositioner.js +37 -0
- package/editors/textEditor/caretPositioner.mjs +33 -0
- package/editors/textEditor/index.d.ts +1 -0
- package/editors/textEditor/index.js +7 -0
- package/editors/textEditor/index.mjs +1 -0
- package/editors/textEditor/textEditor.d.ts +24 -0
- package/editors/textEditor/textEditor.js +612 -0
- package/editors/textEditor/textEditor.mjs +605 -0
- package/editors/timeEditor/index.d.ts +1 -0
- package/editors/timeEditor/index.js +7 -0
- package/editors/timeEditor/index.mjs +1 -0
- package/editors/timeEditor/timeEditor.d.ts +7 -0
- package/editors/timeEditor/timeEditor.js +70 -0
- package/editors/timeEditor/timeEditor.mjs +64 -0
- package/eventManager.d.ts +13 -0
- package/eventManager.js +236 -0
- package/eventManager.mjs +231 -0
- package/handsontable-non-commercial-license.pdf +0 -0
- package/helpers/array.d.ts +18 -0
- package/helpers/array.js +353 -0
- package/helpers/array.mjs +333 -0
- package/helpers/browser.d.ts +25 -0
- package/helpers/browser.js +231 -0
- package/helpers/browser.mjs +210 -0
- package/helpers/console.d.ts +4 -0
- package/helpers/console.js +65 -0
- package/helpers/console.mjs +56 -0
- package/helpers/data.d.ts +12 -0
- package/helpers/data.js +247 -0
- package/helpers/data.mjs +234 -0
- package/helpers/date.d.ts +1 -0
- package/helpers/date.js +22 -0
- package/helpers/date.mjs +18 -0
- package/helpers/dom/element.d.ts +49 -0
- package/helpers/dom/element.js +1117 -0
- package/helpers/dom/element.mjs +1064 -0
- package/helpers/dom/event.d.ts +4 -0
- package/helpers/dom/event.js +46 -0
- package/helpers/dom/event.mjs +39 -0
- package/helpers/dom/index.d.ts +2 -0
- package/helpers/feature.d.ts +11 -0
- package/helpers/feature.js +184 -0
- package/helpers/feature.mjs +172 -0
- package/helpers/function.d.ts +10 -0
- package/helpers/function.js +319 -0
- package/helpers/function.mjs +307 -0
- package/helpers/index.d.ts +14 -0
- package/helpers/mixed.d.ts +5 -0
- package/helpers/mixed.js +230 -0
- package/helpers/mixed.mjs +220 -0
- package/helpers/number.d.ts +5 -0
- package/helpers/number.js +142 -0
- package/helpers/number.mjs +134 -0
- package/helpers/object.d.ts +16 -0
- package/helpers/object.js +371 -0
- package/helpers/object.mjs +352 -0
- package/helpers/string.d.ts +7 -0
- package/helpers/string.js +115 -0
- package/helpers/string.mjs +104 -0
- package/helpers/templateLiteralTag.d.ts +1 -0
- package/helpers/templateLiteralTag.js +26 -0
- package/helpers/templateLiteralTag.mjs +22 -0
- package/helpers/unicode.d.ts +73 -0
- package/helpers/unicode.js +158 -0
- package/helpers/unicode.mjs +148 -0
- package/helpers/wrappers/jquery.js +50 -0
- package/helpers/wrappers/jquery.mjs +46 -0
- package/i18n/constants.js +162 -0
- package/i18n/constants.mjs +82 -0
- package/i18n/index.d.ts +2 -0
- package/i18n/index.js +18 -0
- package/i18n/index.mjs +2 -0
- package/i18n/languages/ar-AR.js +25 -0
- package/i18n/languages/ar-AR.mjs +15 -0
- package/i18n/languages/cs-CZ.js +24 -0
- package/i18n/languages/cs-CZ.mjs +14 -0
- package/i18n/languages/de-CH.d.ts +5 -0
- package/i18n/languages/de-CH.js +24 -0
- package/i18n/languages/de-CH.mjs +14 -0
- package/i18n/languages/de-DE.d.ts +5 -0
- package/i18n/languages/de-DE.js +24 -0
- package/i18n/languages/de-DE.mjs +14 -0
- package/i18n/languages/en-US.d.ts +5 -0
- package/i18n/languages/en-US.js +24 -0
- package/i18n/languages/en-US.mjs +14 -0
- package/i18n/languages/es-MX.d.ts +5 -0
- package/i18n/languages/es-MX.js +24 -0
- package/i18n/languages/es-MX.mjs +13 -0
- package/i18n/languages/fr-FR.d.ts +5 -0
- package/i18n/languages/fr-FR.js +24 -0
- package/i18n/languages/fr-FR.mjs +14 -0
- package/i18n/languages/index.d.ts +35 -0
- package/i18n/languages/index.js +42 -0
- package/i18n/languages/index.mjs +20 -0
- package/i18n/languages/it-IT.d.ts +5 -0
- package/i18n/languages/it-IT.js +24 -0
- package/i18n/languages/it-IT.mjs +14 -0
- package/i18n/languages/ja-JP.d.ts +5 -0
- package/i18n/languages/ja-JP.js +24 -0
- package/i18n/languages/ja-JP.mjs +14 -0
- package/i18n/languages/ko-KR.d.ts +5 -0
- package/i18n/languages/ko-KR.js +24 -0
- package/i18n/languages/ko-KR.mjs +14 -0
- package/i18n/languages/lv-LV.d.ts +5 -0
- package/i18n/languages/lv-LV.js +24 -0
- package/i18n/languages/lv-LV.mjs +14 -0
- package/i18n/languages/nb-NO.d.ts +5 -0
- package/i18n/languages/nb-NO.js +24 -0
- package/i18n/languages/nb-NO.mjs +14 -0
- package/i18n/languages/nl-NL.d.ts +5 -0
- package/i18n/languages/nl-NL.js +24 -0
- package/i18n/languages/nl-NL.mjs +14 -0
- package/i18n/languages/pl-PL.d.ts +5 -0
- package/i18n/languages/pl-PL.js +24 -0
- package/i18n/languages/pl-PL.mjs +14 -0
- package/i18n/languages/pt-BR.d.ts +5 -0
- package/i18n/languages/pt-BR.js +24 -0
- package/i18n/languages/pt-BR.mjs +14 -0
- package/i18n/languages/ru-RU.d.ts +5 -0
- package/i18n/languages/ru-RU.js +24 -0
- package/i18n/languages/ru-RU.mjs +14 -0
- package/i18n/languages/sr-SP.js +24 -0
- package/i18n/languages/sr-SP.mjs +14 -0
- package/i18n/languages/zh-CN.d.ts +5 -0
- package/i18n/languages/zh-CN.js +24 -0
- package/i18n/languages/zh-CN.mjs +14 -0
- package/i18n/languages/zh-TW.d.ts +5 -0
- package/i18n/languages/zh-TW.js +24 -0
- package/i18n/languages/zh-TW.mjs +14 -0
- package/i18n/phraseFormatters/index.js +31 -0
- package/i18n/phraseFormatters/index.mjs +26 -0
- package/i18n/phraseFormatters/pluralize.js +21 -0
- package/i18n/phraseFormatters/pluralize.mjs +17 -0
- package/i18n/phraseFormatters/substituteVariables.js +22 -0
- package/i18n/phraseFormatters/substituteVariables.mjs +18 -0
- package/i18n/registry.d.ts +13 -0
- package/i18n/registry.js +180 -0
- package/i18n/registry.mjs +155 -0
- package/i18n/utils.js +90 -0
- package/i18n/utils.mjs +83 -0
- package/index.d.ts +520 -0
- package/index.js +130 -0
- package/index.mjs +112 -0
- package/languages/all.js +583 -0
- package/languages/ar-AR.js +157 -0
- package/languages/ar-AR.mjs +17 -0
- package/languages/cs-CZ.js +157 -0
- package/languages/cs-CZ.mjs +16 -0
- package/languages/de-CH.js +158 -0
- package/languages/de-CH.mjs +16 -0
- package/languages/de-DE.js +159 -0
- package/languages/de-DE.mjs +16 -0
- package/languages/en-US.js +160 -0
- package/languages/en-US.mjs +16 -0
- package/languages/es-MX.js +161 -0
- package/languages/es-MX.mjs +15 -0
- package/languages/fr-FR.js +162 -0
- package/languages/fr-FR.mjs +16 -0
- package/languages/index.js +583 -0
- package/languages/index.mjs +20 -0
- package/languages/it-IT.js +164 -0
- package/languages/it-IT.mjs +16 -0
- package/languages/ja-JP.js +161 -0
- package/languages/ja-JP.mjs +16 -0
- package/languages/ko-KR.js +161 -0
- package/languages/ko-KR.mjs +16 -0
- package/languages/lv-LV.js +161 -0
- package/languages/lv-LV.mjs +16 -0
- package/languages/nb-NO.js +161 -0
- package/languages/nb-NO.mjs +16 -0
- package/languages/nl-NL.js +161 -0
- package/languages/nl-NL.mjs +16 -0
- package/languages/pl-PL.js +161 -0
- package/languages/pl-PL.mjs +16 -0
- package/languages/pt-BR.js +161 -0
- package/languages/pt-BR.mjs +16 -0
- package/languages/ru-RU.js +161 -0
- package/languages/ru-RU.mjs +16 -0
- package/languages/sr-SP.js +161 -0
- package/languages/sr-SP.mjs +16 -0
- package/languages/zh-CN.js +161 -0
- package/languages/zh-CN.mjs +16 -0
- package/languages/zh-TW.js +161 -0
- package/languages/zh-TW.mjs +16 -0
- package/mixins/hooksRefRegisterer.js +61 -0
- package/mixins/hooksRefRegisterer.mjs +56 -0
- package/mixins/localHooks.js +71 -0
- package/mixins/localHooks.mjs +66 -0
- package/package.json +751 -0
- package/pluginHooks.d.ts +256 -0
- package/pluginHooks.js +2750 -0
- package/pluginHooks.mjs +2744 -0
- package/plugins/autoColumnSize/autoColumnSize.d.ts +27 -0
- package/plugins/autoColumnSize/autoColumnSize.js +796 -0
- package/plugins/autoColumnSize/autoColumnSize.mjs +788 -0
- package/plugins/autoColumnSize/index.d.ts +1 -0
- package/plugins/autoColumnSize/index.js +8 -0
- package/plugins/autoColumnSize/index.mjs +1 -0
- package/plugins/autoRowSize/autoRowSize.d.ts +27 -0
- package/plugins/autoRowSize/autoRowSize.js +735 -0
- package/plugins/autoRowSize/autoRowSize.mjs +727 -0
- package/plugins/autoRowSize/index.d.ts +1 -0
- package/plugins/autoRowSize/index.js +8 -0
- package/plugins/autoRowSize/index.mjs +1 -0
- package/plugins/autofill/autofill.d.ts +18 -0
- package/plugins/autofill/autofill.js +694 -0
- package/plugins/autofill/autofill.mjs +687 -0
- package/plugins/autofill/index.d.ts +1 -0
- package/plugins/autofill/index.js +8 -0
- package/plugins/autofill/index.mjs +1 -0
- package/plugins/autofill/utils.js +134 -0
- package/plugins/autofill/utils.mjs +126 -0
- package/plugins/base/base.d.ts +27 -0
- package/plugins/base/base.js +345 -0
- package/plugins/base/base.mjs +339 -0
- package/plugins/base/index.d.ts +1 -0
- package/plugins/base/index.js +7 -0
- package/plugins/base/index.mjs +1 -0
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.d.ts +9 -0
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +169 -0
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +161 -0
- package/plugins/bindRowsWithHeaders/index.d.ts +1 -0
- package/plugins/bindRowsWithHeaders/index.js +8 -0
- package/plugins/bindRowsWithHeaders/index.mjs +1 -0
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.js +80 -0
- package/plugins/bindRowsWithHeaders/maps/looseBindsMap.mjs +75 -0
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.js +103 -0
- package/plugins/bindRowsWithHeaders/maps/strictBindsMap.mjs +98 -0
- package/plugins/collapsibleColumns/collapsibleColumns.d.ts +22 -0
- package/plugins/collapsibleColumns/collapsibleColumns.js +592 -0
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +584 -0
- package/plugins/collapsibleColumns/index.d.ts +1 -0
- package/plugins/collapsibleColumns/index.js +8 -0
- package/plugins/collapsibleColumns/index.mjs +1 -0
- package/plugins/columnSorting/columnSorting.d.ts +30 -0
- package/plugins/columnSorting/columnSorting.js +865 -0
- package/plugins/columnSorting/columnSorting.mjs +857 -0
- package/plugins/columnSorting/columnStatesManager.js +273 -0
- package/plugins/columnSorting/columnStatesManager.mjs +268 -0
- package/plugins/columnSorting/domHelpers.js +54 -0
- package/plugins/columnSorting/domHelpers.mjs +49 -0
- package/plugins/columnSorting/index.d.ts +1 -0
- package/plugins/columnSorting/index.js +8 -0
- package/plugins/columnSorting/index.mjs +1 -0
- package/plugins/columnSorting/rootComparator.js +52 -0
- package/plugins/columnSorting/rootComparator.mjs +48 -0
- package/plugins/columnSorting/sortFunction/checkbox.js +64 -0
- package/plugins/columnSorting/sortFunction/checkbox.mjs +58 -0
- package/plugins/columnSorting/sortFunction/date.js +61 -0
- package/plugins/columnSorting/sortFunction/date.mjs +54 -0
- package/plugins/columnSorting/sortFunction/default.js +65 -0
- package/plugins/columnSorting/sortFunction/default.mjs +59 -0
- package/plugins/columnSorting/sortFunction/numeric.js +49 -0
- package/plugins/columnSorting/sortFunction/numeric.mjs +43 -0
- package/plugins/columnSorting/sortService/engine.js +26 -0
- package/plugins/columnSorting/sortService/engine.mjs +18 -0
- package/plugins/columnSorting/sortService/index.js +13 -0
- package/plugins/columnSorting/sortService/index.mjs +3 -0
- package/plugins/columnSorting/sortService/registry.js +37 -0
- package/plugins/columnSorting/sortService/registry.mjs +30 -0
- package/plugins/columnSorting/utils.js +122 -0
- package/plugins/columnSorting/utils.mjs +110 -0
- package/plugins/columnSummary/columnSummary.d.ts +72 -0
- package/plugins/columnSummary/columnSummary.js +544 -0
- package/plugins/columnSummary/columnSummary.mjs +536 -0
- package/plugins/columnSummary/endpoints.js +557 -0
- package/plugins/columnSummary/endpoints.mjs +552 -0
- package/plugins/columnSummary/index.d.ts +1 -0
- package/plugins/columnSummary/index.js +8 -0
- package/plugins/columnSummary/index.mjs +1 -0
- package/plugins/columnSummary/utils.js +13 -0
- package/plugins/columnSummary/utils.mjs +9 -0
- package/plugins/comments/commentEditor.js +241 -0
- package/plugins/comments/commentEditor.mjs +236 -0
- package/plugins/comments/comments.d.ts +50 -0
- package/plugins/comments/comments.js +942 -0
- package/plugins/comments/comments.mjs +932 -0
- package/plugins/comments/displaySwitch.js +115 -0
- package/plugins/comments/displaySwitch.mjs +109 -0
- package/plugins/comments/index.d.ts +1 -0
- package/plugins/comments/index.js +8 -0
- package/plugins/comments/index.mjs +1 -0
- package/plugins/contextMenu/commandExecutor.js +113 -0
- package/plugins/contextMenu/commandExecutor.mjs +108 -0
- package/plugins/contextMenu/contextMenu.d.ts +65 -0
- package/plugins/contextMenu/contextMenu.js +445 -0
- package/plugins/contextMenu/contextMenu.mjs +437 -0
- package/plugins/contextMenu/cursor.js +126 -0
- package/plugins/contextMenu/cursor.mjs +121 -0
- package/plugins/contextMenu/index.d.ts +1 -0
- package/plugins/contextMenu/index.js +8 -0
- package/plugins/contextMenu/index.mjs +1 -0
- package/plugins/contextMenu/itemsFactory.js +136 -0
- package/plugins/contextMenu/itemsFactory.mjs +131 -0
- package/plugins/contextMenu/menu.js +1003 -0
- package/plugins/contextMenu/menu.mjs +997 -0
- package/plugins/contextMenu/predefinedItems/alignment.js +277 -0
- package/plugins/contextMenu/predefinedItems/alignment.mjs +259 -0
- package/plugins/contextMenu/predefinedItems/clearColumn.js +47 -0
- package/plugins/contextMenu/predefinedItems/clearColumn.mjs +29 -0
- package/plugins/contextMenu/predefinedItems/columnLeft.js +57 -0
- package/plugins/contextMenu/predefinedItems/columnLeft.mjs +39 -0
- package/plugins/contextMenu/predefinedItems/columnRight.js +55 -0
- package/plugins/contextMenu/predefinedItems/columnRight.mjs +37 -0
- package/plugins/contextMenu/predefinedItems/noItems.js +22 -0
- package/plugins/contextMenu/predefinedItems/noItems.mjs +16 -0
- package/plugins/contextMenu/predefinedItems/readOnly.js +69 -0
- package/plugins/contextMenu/predefinedItems/readOnly.mjs +51 -0
- package/plugins/contextMenu/predefinedItems/redo.js +42 -0
- package/plugins/contextMenu/predefinedItems/redo.mjs +24 -0
- package/plugins/contextMenu/predefinedItems/removeColumn.js +79 -0
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +68 -0
- package/plugins/contextMenu/predefinedItems/removeRow.js +78 -0
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +67 -0
- package/plugins/contextMenu/predefinedItems/rowAbove.js +53 -0
- package/plugins/contextMenu/predefinedItems/rowAbove.mjs +35 -0
- package/plugins/contextMenu/predefinedItems/rowBelow.js +51 -0
- package/plugins/contextMenu/predefinedItems/rowBelow.mjs +33 -0
- package/plugins/contextMenu/predefinedItems/separator.js +16 -0
- package/plugins/contextMenu/predefinedItems/separator.mjs +10 -0
- package/plugins/contextMenu/predefinedItems/undo.js +42 -0
- package/plugins/contextMenu/predefinedItems/undo.mjs +24 -0
- package/plugins/contextMenu/predefinedItems.js +76 -0
- package/plugins/contextMenu/predefinedItems.mjs +57 -0
- package/plugins/contextMenu/utils.js +278 -0
- package/plugins/contextMenu/utils.mjs +261 -0
- package/plugins/copyPaste/clipboardData.js +29 -0
- package/plugins/copyPaste/clipboardData.mjs +25 -0
- package/plugins/copyPaste/contextMenuItem/copy.js +45 -0
- package/plugins/copyPaste/contextMenuItem/copy.mjs +29 -0
- package/plugins/copyPaste/contextMenuItem/cut.js +45 -0
- package/plugins/copyPaste/contextMenuItem/cut.mjs +29 -0
- package/plugins/copyPaste/copyPaste.d.ts +35 -0
- package/plugins/copyPaste/copyPaste.js +721 -0
- package/plugins/copyPaste/copyPaste.mjs +713 -0
- package/plugins/copyPaste/focusableElement.js +210 -0
- package/plugins/copyPaste/focusableElement.mjs +204 -0
- package/plugins/copyPaste/index.d.ts +1 -0
- package/plugins/copyPaste/index.js +8 -0
- package/plugins/copyPaste/index.mjs +1 -0
- package/plugins/copyPaste/pasteEvent.js +17 -0
- package/plugins/copyPaste/pasteEvent.mjs +12 -0
- package/plugins/customBorders/contextMenuItem/bottom.js +39 -0
- package/plugins/customBorders/contextMenuItem/bottom.mjs +23 -0
- package/plugins/customBorders/contextMenuItem/index.js +14 -0
- package/plugins/customBorders/contextMenuItem/index.mjs +6 -0
- package/plugins/customBorders/contextMenuItem/left.js +40 -0
- package/plugins/customBorders/contextMenuItem/left.mjs +24 -0
- package/plugins/customBorders/contextMenuItem/noBorders.js +36 -0
- package/plugins/customBorders/contextMenuItem/noBorders.mjs +20 -0
- package/plugins/customBorders/contextMenuItem/right.js +40 -0
- package/plugins/customBorders/contextMenuItem/right.mjs +24 -0
- package/plugins/customBorders/contextMenuItem/top.js +39 -0
- package/plugins/customBorders/contextMenuItem/top.mjs +23 -0
- package/plugins/customBorders/customBorders.d.ts +38 -0
- package/plugins/customBorders/customBorders.js +887 -0
- package/plugins/customBorders/customBorders.mjs +877 -0
- package/plugins/customBorders/index.d.ts +1 -0
- package/plugins/customBorders/index.js +8 -0
- package/plugins/customBorders/index.mjs +1 -0
- package/plugins/customBorders/utils.js +265 -0
- package/plugins/customBorders/utils.mjs +249 -0
- package/plugins/dragToScroll/dragToScroll.d.ts +15 -0
- package/plugins/dragToScroll/dragToScroll.js +335 -0
- package/plugins/dragToScroll/dragToScroll.mjs +327 -0
- package/plugins/dragToScroll/index.d.ts +1 -0
- package/plugins/dragToScroll/index.js +8 -0
- package/plugins/dragToScroll/index.mjs +1 -0
- package/plugins/dropdownMenu/dropdownMenu.d.ts +24 -0
- package/plugins/dropdownMenu/dropdownMenu.js +511 -0
- package/plugins/dropdownMenu/dropdownMenu.mjs +504 -0
- package/plugins/dropdownMenu/index.d.ts +1 -0
- package/plugins/dropdownMenu/index.js +8 -0
- package/plugins/dropdownMenu/index.mjs +1 -0
- package/plugins/exportFile/dataProvider.js +200 -0
- package/plugins/exportFile/dataProvider.mjs +195 -0
- package/plugins/exportFile/exportFile.d.ts +12 -0
- package/plugins/exportFile/exportFile.js +262 -0
- package/plugins/exportFile/exportFile.mjs +250 -0
- package/plugins/exportFile/index.d.ts +1 -0
- package/plugins/exportFile/index.js +8 -0
- package/plugins/exportFile/index.mjs +1 -0
- package/plugins/exportFile/typeFactory.js +30 -0
- package/plugins/exportFile/typeFactory.mjs +21 -0
- package/plugins/exportFile/types/_base.js +78 -0
- package/plugins/exportFile/types/_base.mjs +73 -0
- package/plugins/exportFile/types/csv.js +131 -0
- package/plugins/exportFile/types/csv.mjs +125 -0
- package/plugins/filters/component/_base.js +169 -0
- package/plugins/filters/component/_base.mjs +163 -0
- package/plugins/filters/component/actionBar.js +161 -0
- package/plugins/filters/component/actionBar.mjs +151 -0
- package/plugins/filters/component/condition.js +325 -0
- package/plugins/filters/component/condition.mjs +316 -0
- package/plugins/filters/component/operators.js +222 -0
- package/plugins/filters/component/operators.mjs +216 -0
- package/plugins/filters/component/value.js +278 -0
- package/plugins/filters/component/value.mjs +269 -0
- package/plugins/filters/condition/beginsWith.js +50 -0
- package/plugins/filters/condition/beginsWith.mjs +39 -0
- package/plugins/filters/condition/between.js +64 -0
- package/plugins/filters/condition/between.mjs +53 -0
- package/plugins/filters/condition/byValue.js +48 -0
- package/plugins/filters/condition/byValue.mjs +42 -0
- package/plugins/filters/condition/contains.js +50 -0
- package/plugins/filters/condition/contains.mjs +39 -0
- package/plugins/filters/condition/date/after.js +55 -0
- package/plugins/filters/condition/date/after.mjs +43 -0
- package/plugins/filters/condition/date/before.js +55 -0
- package/plugins/filters/condition/date/before.mjs +43 -0
- package/plugins/filters/condition/date/today.js +39 -0
- package/plugins/filters/condition/date/today.mjs +20 -0
- package/plugins/filters/condition/date/tomorrow.js +39 -0
- package/plugins/filters/condition/date/tomorrow.mjs +20 -0
- package/plugins/filters/condition/date/yesterday.js +39 -0
- package/plugins/filters/condition/date/yesterday.mjs +20 -0
- package/plugins/filters/condition/empty.js +35 -0
- package/plugins/filters/condition/empty.mjs +17 -0
- package/plugins/filters/condition/endsWith.js +50 -0
- package/plugins/filters/condition/endsWith.mjs +39 -0
- package/plugins/filters/condition/equal.js +49 -0
- package/plugins/filters/condition/equal.mjs +38 -0
- package/plugins/filters/condition/false.js +18 -0
- package/plugins/filters/condition/false.mjs +12 -0
- package/plugins/filters/condition/greaterThan.js +52 -0
- package/plugins/filters/condition/greaterThan.mjs +41 -0
- package/plugins/filters/condition/greaterThanOrEqual.js +52 -0
- package/plugins/filters/condition/greaterThanOrEqual.mjs +41 -0
- package/plugins/filters/condition/lessThan.js +52 -0
- package/plugins/filters/condition/lessThan.mjs +41 -0
- package/plugins/filters/condition/lessThanOrEqual.js +52 -0
- package/plugins/filters/condition/lessThanOrEqual.mjs +41 -0
- package/plugins/filters/condition/none.js +33 -0
- package/plugins/filters/condition/none.mjs +15 -0
- package/plugins/filters/condition/notBetween.js +36 -0
- package/plugins/filters/condition/notBetween.mjs +18 -0
- package/plugins/filters/condition/notContains.js +36 -0
- package/plugins/filters/condition/notContains.mjs +18 -0
- package/plugins/filters/condition/notEmpty.js +36 -0
- package/plugins/filters/condition/notEmpty.mjs +18 -0
- package/plugins/filters/condition/notEqual.js +36 -0
- package/plugins/filters/condition/notEqual.mjs +18 -0
- package/plugins/filters/condition/true.js +18 -0
- package/plugins/filters/condition/true.mjs +12 -0
- package/plugins/filters/conditionCollection.d.ts +32 -0
- package/plugins/filters/conditionCollection.js +343 -0
- package/plugins/filters/conditionCollection.mjs +337 -0
- package/plugins/filters/conditionRegisterer.js +61 -0
- package/plugins/filters/conditionRegisterer.mjs +53 -0
- package/plugins/filters/conditionUpdateObserver.d.ts +10 -0
- package/plugins/filters/conditionUpdateObserver.js +248 -0
- package/plugins/filters/conditionUpdateObserver.mjs +242 -0
- package/plugins/filters/constants.js +103 -0
- package/plugins/filters/constants.mjs +69 -0
- package/plugins/filters/dataFilter.js +98 -0
- package/plugins/filters/dataFilter.mjs +93 -0
- package/plugins/filters/filters.d.ts +56 -0
- package/plugins/filters/filters.js +1037 -0
- package/plugins/filters/filters.mjs +1026 -0
- package/plugins/filters/index.d.ts +1 -0
- package/plugins/filters/index.js +8 -0
- package/plugins/filters/index.mjs +1 -0
- package/plugins/filters/logicalOperationRegisterer.js +50 -0
- package/plugins/filters/logicalOperationRegisterer.mjs +42 -0
- package/plugins/filters/logicalOperations/conjunction.js +36 -0
- package/plugins/filters/logicalOperations/conjunction.mjs +18 -0
- package/plugins/filters/logicalOperations/disjunction.js +36 -0
- package/plugins/filters/logicalOperations/disjunction.mjs +18 -0
- package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.js +40 -0
- package/plugins/filters/logicalOperations/disjunctionWithExtraCondition.mjs +22 -0
- package/plugins/filters/ui/_base.js +249 -0
- package/plugins/filters/ui/_base.mjs +231 -0
- package/plugins/filters/ui/input.js +140 -0
- package/plugins/filters/ui/input.mjs +134 -0
- package/plugins/filters/ui/link.js +86 -0
- package/plugins/filters/ui/link.mjs +80 -0
- package/plugins/filters/ui/multipleSelect.js +441 -0
- package/plugins/filters/ui/multipleSelect.mjs +434 -0
- package/plugins/filters/ui/radioInput.js +130 -0
- package/plugins/filters/ui/radioInput.mjs +124 -0
- package/plugins/filters/ui/select.js +269 -0
- package/plugins/filters/ui/select.mjs +261 -0
- package/plugins/filters/utils.js +143 -0
- package/plugins/filters/utils.mjs +134 -0
- package/plugins/formulas/engine/register.js +259 -0
- package/plugins/formulas/engine/register.mjs +247 -0
- package/plugins/formulas/engine/settings.js +115 -0
- package/plugins/formulas/engine/settings.mjs +107 -0
- package/plugins/formulas/formulas.d.ts +31 -0
- package/plugins/formulas/formulas.js +1229 -0
- package/plugins/formulas/formulas.mjs +1221 -0
- package/plugins/formulas/index.d.ts +1 -0
- package/plugins/formulas/index.js +8 -0
- package/plugins/formulas/index.mjs +1 -0
- package/plugins/formulas/utils.js +24 -0
- package/plugins/formulas/utils.mjs +19 -0
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.js +76 -0
- package/plugins/hiddenColumns/contextMenuItem/hideColumn.mjs +67 -0
- package/plugins/hiddenColumns/contextMenuItem/showColumn.js +124 -0
- package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +115 -0
- package/plugins/hiddenColumns/hiddenColumns.d.ts +21 -0
- package/plugins/hiddenColumns/hiddenColumns.js +620 -0
- package/plugins/hiddenColumns/hiddenColumns.mjs +612 -0
- package/plugins/hiddenColumns/index.d.ts +1 -0
- package/plugins/hiddenColumns/index.js +8 -0
- package/plugins/hiddenColumns/index.mjs +1 -0
- package/plugins/hiddenRows/contextMenuItem/hideRow.js +76 -0
- package/plugins/hiddenRows/contextMenuItem/hideRow.mjs +67 -0
- package/plugins/hiddenRows/contextMenuItem/showRow.js +124 -0
- package/plugins/hiddenRows/contextMenuItem/showRow.mjs +115 -0
- package/plugins/hiddenRows/hiddenRows.d.ts +21 -0
- package/plugins/hiddenRows/hiddenRows.js +612 -0
- package/plugins/hiddenRows/hiddenRows.mjs +604 -0
- package/plugins/hiddenRows/index.d.ts +1 -0
- package/plugins/hiddenRows/index.js +8 -0
- package/plugins/hiddenRows/index.mjs +1 -0
- package/plugins/index.d.ts +111 -0
- package/plugins/index.js +115 -0
- package/plugins/index.mjs +75 -0
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +58 -0
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +49 -0
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +58 -0
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +49 -0
- package/plugins/manualColumnFreeze/index.d.ts +1 -0
- package/plugins/manualColumnFreeze/index.js +8 -0
- package/plugins/manualColumnFreeze/index.mjs +1 -0
- package/plugins/manualColumnFreeze/manualColumnFreeze.d.ts +11 -0
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +250 -0
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +242 -0
- package/plugins/manualColumnMove/index.d.ts +1 -0
- package/plugins/manualColumnMove/index.js +8 -0
- package/plugins/manualColumnMove/index.mjs +1 -0
- package/plugins/manualColumnMove/manualColumnMove.d.ts +14 -0
- package/plugins/manualColumnMove/manualColumnMove.js +775 -0
- package/plugins/manualColumnMove/manualColumnMove.mjs +767 -0
- package/plugins/manualColumnMove/ui/_base.js +209 -0
- package/plugins/manualColumnMove/ui/_base.mjs +204 -0
- package/plugins/manualColumnMove/ui/backlight.js +60 -0
- package/plugins/manualColumnMove/ui/backlight.mjs +54 -0
- package/plugins/manualColumnMove/ui/guideline.js +60 -0
- package/plugins/manualColumnMove/ui/guideline.mjs +54 -0
- package/plugins/manualColumnResize/index.d.ts +1 -0
- package/plugins/manualColumnResize/index.js +8 -0
- package/plugins/manualColumnResize/index.mjs +1 -0
- package/plugins/manualColumnResize/manualColumnResize.d.ts +30 -0
- package/plugins/manualColumnResize/manualColumnResize.js +690 -0
- package/plugins/manualColumnResize/manualColumnResize.mjs +680 -0
- package/plugins/manualRowMove/index.d.ts +1 -0
- package/plugins/manualRowMove/index.js +8 -0
- package/plugins/manualRowMove/index.mjs +1 -0
- package/plugins/manualRowMove/manualRowMove.d.ts +14 -0
- package/plugins/manualRowMove/manualRowMove.js +757 -0
- package/plugins/manualRowMove/manualRowMove.mjs +749 -0
- package/plugins/manualRowMove/ui/_base.js +196 -0
- package/plugins/manualRowMove/ui/_base.mjs +191 -0
- package/plugins/manualRowMove/ui/backlight.js +60 -0
- package/plugins/manualRowMove/ui/backlight.mjs +54 -0
- package/plugins/manualRowMove/ui/guideline.js +60 -0
- package/plugins/manualRowMove/ui/guideline.mjs +54 -0
- package/plugins/manualRowResize/index.d.ts +1 -0
- package/plugins/manualRowResize/index.js +8 -0
- package/plugins/manualRowResize/index.mjs +1 -0
- package/plugins/manualRowResize/manualRowResize.d.ts +29 -0
- package/plugins/manualRowResize/manualRowResize.js +652 -0
- package/plugins/manualRowResize/manualRowResize.mjs +642 -0
- package/plugins/mergeCells/calculations/autofill.js +464 -0
- package/plugins/mergeCells/calculations/autofill.mjs +459 -0
- package/plugins/mergeCells/calculations/selection.js +204 -0
- package/plugins/mergeCells/calculations/selection.mjs +199 -0
- package/plugins/mergeCells/cellCoords.js +347 -0
- package/plugins/mergeCells/cellCoords.mjs +342 -0
- package/plugins/mergeCells/cellsCollection.js +344 -0
- package/plugins/mergeCells/cellsCollection.mjs +338 -0
- package/plugins/mergeCells/contextMenuItem/toggleMerge.js +55 -0
- package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +38 -0
- package/plugins/mergeCells/index.d.ts +1 -0
- package/plugins/mergeCells/index.js +8 -0
- package/plugins/mergeCells/index.mjs +1 -0
- package/plugins/mergeCells/mergeCells.d.ts +22 -0
- package/plugins/mergeCells/mergeCells.js +1290 -0
- package/plugins/mergeCells/mergeCells.mjs +1282 -0
- package/plugins/mergeCells/utils.js +30 -0
- package/plugins/mergeCells/utils.mjs +26 -0
- package/plugins/multiColumnSorting/domHelpers.js +44 -0
- package/plugins/multiColumnSorting/domHelpers.mjs +39 -0
- package/plugins/multiColumnSorting/index.d.ts +1 -0
- package/plugins/multiColumnSorting/index.js +8 -0
- package/plugins/multiColumnSorting/index.mjs +1 -0
- package/plugins/multiColumnSorting/multiColumnSorting.d.ts +8 -0
- package/plugins/multiColumnSorting/multiColumnSorting.js +336 -0
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +329 -0
- package/plugins/multiColumnSorting/rootComparator.js +55 -0
- package/plugins/multiColumnSorting/rootComparator.mjs +51 -0
- package/plugins/multiColumnSorting/utils.js +16 -0
- package/plugins/multiColumnSorting/utils.mjs +12 -0
- package/plugins/multipleSelectionHandles/index.d.ts +1 -0
- package/plugins/multipleSelectionHandles/index.js +8 -0
- package/plugins/multipleSelectionHandles/index.mjs +1 -0
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.d.ts +21 -0
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +394 -0
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +386 -0
- package/plugins/nestedHeaders/index.d.ts +1 -0
- package/plugins/nestedHeaders/index.js +8 -0
- package/plugins/nestedHeaders/index.mjs +1 -0
- package/plugins/nestedHeaders/nestedHeaders.d.ts +17 -0
- package/plugins/nestedHeaders/nestedHeaders.js +666 -0
- package/plugins/nestedHeaders/nestedHeaders.mjs +658 -0
- package/plugins/nestedHeaders/stateManager/headersTree.js +288 -0
- package/plugins/nestedHeaders/stateManager/headersTree.mjs +283 -0
- package/plugins/nestedHeaders/stateManager/index.js +417 -0
- package/plugins/nestedHeaders/stateManager/index.mjs +412 -0
- package/plugins/nestedHeaders/stateManager/matrixGenerator.js +102 -0
- package/plugins/nestedHeaders/stateManager/matrixGenerator.mjs +99 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.js +98 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +94 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.js +95 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/expand.mjs +91 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/hideColumn.js +54 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/hideColumn.mjs +50 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/index.js +40 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/index.mjs +35 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/showColumn.js +55 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/showColumn.mjs +51 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/utils/tree.js +61 -0
- package/plugins/nestedHeaders/stateManager/nodeModifiers/utils/tree.mjs +55 -0
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +122 -0
- package/plugins/nestedHeaders/stateManager/settingsNormalizer.mjs +119 -0
- package/plugins/nestedHeaders/stateManager/sourceSettings.js +250 -0
- package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +245 -0
- package/plugins/nestedHeaders/stateManager/utils.js +75 -0
- package/plugins/nestedHeaders/stateManager/utils.mjs +70 -0
- package/plugins/nestedHeaders/utils/ghostTable.js +167 -0
- package/plugins/nestedHeaders/utils/ghostTable.mjs +162 -0
- package/plugins/nestedRows/data/dataManager.js +809 -0
- package/plugins/nestedRows/data/dataManager.mjs +804 -0
- package/plugins/nestedRows/index.d.ts +1 -0
- package/plugins/nestedRows/index.js +8 -0
- package/plugins/nestedRows/index.mjs +1 -0
- package/plugins/nestedRows/nestedRows.d.ts +12 -0
- package/plugins/nestedRows/nestedRows.js +592 -0
- package/plugins/nestedRows/nestedRows.mjs +584 -0
- package/plugins/nestedRows/ui/_base.js +28 -0
- package/plugins/nestedRows/ui/_base.mjs +23 -0
- package/plugins/nestedRows/ui/collapsing.js +562 -0
- package/plugins/nestedRows/ui/collapsing.mjs +556 -0
- package/plugins/nestedRows/ui/contextMenu.js +147 -0
- package/plugins/nestedRows/ui/contextMenu.mjs +138 -0
- package/plugins/nestedRows/ui/headers.js +157 -0
- package/plugins/nestedRows/ui/headers.mjs +151 -0
- package/plugins/nestedRows/utils/rowMoveController.js +331 -0
- package/plugins/nestedRows/utils/rowMoveController.mjs +327 -0
- package/plugins/persistentState/index.d.ts +1 -0
- package/plugins/persistentState/index.js +8 -0
- package/plugins/persistentState/index.mjs +1 -0
- package/plugins/persistentState/persistentState.d.ts +13 -0
- package/plugins/persistentState/persistentState.js +207 -0
- package/plugins/persistentState/persistentState.mjs +199 -0
- package/plugins/persistentState/storage.js +138 -0
- package/plugins/persistentState/storage.mjs +133 -0
- package/plugins/registry.d.ts +9 -0
- package/plugins/registry.js +150 -0
- package/plugins/registry.mjs +146 -0
- package/plugins/search/index.d.ts +1 -0
- package/plugins/search/index.js +8 -0
- package/plugins/search/index.mjs +1 -0
- package/plugins/search/search.d.ts +28 -0
- package/plugins/search/search.js +377 -0
- package/plugins/search/search.mjs +370 -0
- package/plugins/touchScroll/index.d.ts +1 -0
- package/plugins/touchScroll/index.js +8 -0
- package/plugins/touchScroll/index.mjs +1 -0
- package/plugins/touchScroll/touchScroll.d.ts +13 -0
- package/plugins/touchScroll/touchScroll.js +250 -0
- package/plugins/touchScroll/touchScroll.mjs +243 -0
- package/plugins/trimRows/index.d.ts +1 -0
- package/plugins/trimRows/index.js +8 -0
- package/plugins/trimRows/index.mjs +1 -0
- package/plugins/trimRows/trimRows.d.ts +17 -0
- package/plugins/trimRows/trimRows.js +393 -0
- package/plugins/trimRows/trimRows.mjs +386 -0
- package/plugins/undoRedo/index.d.ts +1 -0
- package/plugins/undoRedo/index.js +18 -0
- package/plugins/undoRedo/index.mjs +2 -0
- package/plugins/undoRedo/undoRedo.d.ts +49 -0
- package/plugins/undoRedo/undoRedo.js +935 -0
- package/plugins/undoRedo/undoRedo.mjs +928 -0
- package/registry.d.ts +6 -0
- package/registry.js +35 -0
- package/registry.mjs +26 -0
- package/renderers/autocompleteRenderer/autocompleteRenderer.d.ts +5 -0
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +59 -0
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +52 -0
- package/renderers/autocompleteRenderer/index.d.ts +1 -0
- package/renderers/autocompleteRenderer/index.js +7 -0
- package/renderers/autocompleteRenderer/index.mjs +1 -0
- package/renderers/base.d.ts +3 -0
- package/renderers/baseRenderer/baseRenderer.d.ts +5 -0
- package/renderers/baseRenderer/baseRenderer.js +46 -0
- package/renderers/baseRenderer/baseRenderer.mjs +39 -0
- package/renderers/baseRenderer/index.d.ts +1 -0
- package/renderers/baseRenderer/index.js +7 -0
- package/renderers/baseRenderer/index.mjs +1 -0
- package/renderers/checkboxRenderer/checkboxRenderer.d.ts +5 -0
- package/renderers/checkboxRenderer/checkboxRenderer.js +398 -0
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +391 -0
- package/renderers/checkboxRenderer/index.d.ts +1 -0
- package/renderers/checkboxRenderer/index.js +7 -0
- package/renderers/checkboxRenderer/index.mjs +1 -0
- package/renderers/htmlRenderer/htmlRenderer.d.ts +5 -0
- package/renderers/htmlRenderer/htmlRenderer.js +25 -0
- package/renderers/htmlRenderer/htmlRenderer.mjs +19 -0
- package/renderers/htmlRenderer/index.d.ts +1 -0
- package/renderers/htmlRenderer/index.js +7 -0
- package/renderers/htmlRenderer/index.mjs +1 -0
- package/renderers/index.d.ts +45 -0
- package/renderers/index.js +48 -0
- package/renderers/index.mjs +24 -0
- package/renderers/numericRenderer/index.d.ts +1 -0
- package/renderers/numericRenderer/index.js +7 -0
- package/renderers/numericRenderer/index.mjs +1 -0
- package/renderers/numericRenderer/numericRenderer.d.ts +5 -0
- package/renderers/numericRenderer/numericRenderer.js +57 -0
- package/renderers/numericRenderer/numericRenderer.mjs +50 -0
- package/renderers/passwordRenderer/index.d.ts +1 -0
- package/renderers/passwordRenderer/index.js +7 -0
- package/renderers/passwordRenderer/index.mjs +1 -0
- package/renderers/passwordRenderer/passwordRenderer.d.ts +5 -0
- package/renderers/passwordRenderer/passwordRenderer.js +32 -0
- package/renderers/passwordRenderer/passwordRenderer.mjs +26 -0
- package/renderers/registry.d.ts +18 -0
- package/renderers/registry.js +48 -0
- package/renderers/registry.mjs +38 -0
- package/renderers/textRenderer/index.d.ts +1 -0
- package/renderers/textRenderer/index.js +7 -0
- package/renderers/textRenderer/index.mjs +1 -0
- package/renderers/textRenderer/textRenderer.d.ts +5 -0
- package/renderers/textRenderer/textRenderer.js +48 -0
- package/renderers/textRenderer/textRenderer.mjs +42 -0
- package/renderers/timeRenderer/index.d.ts +1 -0
- package/renderers/timeRenderer/index.js +7 -0
- package/renderers/timeRenderer/index.mjs +1 -0
- package/renderers/timeRenderer/timeRenderer.d.ts +5 -0
- package/renderers/timeRenderer/timeRenderer.js +26 -0
- package/renderers/timeRenderer/timeRenderer.mjs +20 -0
- package/selection/highlight/constants.js +16 -0
- package/selection/highlight/constants.mjs +6 -0
- package/selection/highlight/highlight.js +330 -0
- package/selection/highlight/highlight.mjs +325 -0
- package/selection/highlight/types/activeHeader.js +38 -0
- package/selection/highlight/types/activeHeader.mjs +32 -0
- package/selection/highlight/types/area.js +49 -0
- package/selection/highlight/types/area.mjs +43 -0
- package/selection/highlight/types/cell.js +46 -0
- package/selection/highlight/types/cell.mjs +40 -0
- package/selection/highlight/types/customSelection.js +41 -0
- package/selection/highlight/types/customSelection.mjs +35 -0
- package/selection/highlight/types/fill.js +41 -0
- package/selection/highlight/types/fill.mjs +35 -0
- package/selection/highlight/types/header.js +49 -0
- package/selection/highlight/types/header.mjs +43 -0
- package/selection/highlight/types/index.js +43 -0
- package/selection/highlight/types/index.mjs +39 -0
- package/selection/highlight/visualSelection.js +277 -0
- package/selection/highlight/visualSelection.mjs +272 -0
- package/selection/index.d.ts +5 -0
- package/selection/index.js +30 -0
- package/selection/index.mjs +6 -0
- package/selection/mouseEventHandler.js +135 -0
- package/selection/mouseEventHandler.mjs +129 -0
- package/selection/range.js +173 -0
- package/selection/range.mjs +168 -0
- package/selection/selection.js +802 -0
- package/selection/selection.mjs +796 -0
- package/selection/transformation.js +169 -0
- package/selection/transformation.mjs +163 -0
- package/selection/utils.js +256 -0
- package/selection/utils.mjs +242 -0
- package/settings.d.ts +210 -0
- package/shortcuts/context.d.ts +20 -0
- package/shortcuts/context.js +241 -0
- package/shortcuts/context.mjs +236 -0
- package/shortcuts/index.d.ts +1 -0
- package/shortcuts/index.js +6 -0
- package/shortcuts/index.mjs +1 -0
- package/shortcuts/keyObserver.js +58 -0
- package/shortcuts/keyObserver.mjs +54 -0
- package/shortcuts/manager.d.ts +10 -0
- package/shortcuts/manager.js +165 -0
- package/shortcuts/manager.mjs +159 -0
- package/shortcuts/recorder.js +165 -0
- package/shortcuts/recorder.mjs +161 -0
- package/shortcuts/utils.js +58 -0
- package/shortcuts/utils.mjs +51 -0
- package/tableView.js +1313 -0
- package/tableView.mjs +1307 -0
- package/translations/changesObservable/observable.js +175 -0
- package/translations/changesObservable/observable.mjs +170 -0
- package/translations/changesObservable/observer.js +100 -0
- package/translations/changesObservable/observer.mjs +94 -0
- package/translations/changesObservable/utils.js +50 -0
- package/translations/changesObservable/utils.mjs +46 -0
- package/translations/index.d.ts +1 -0
- package/translations/index.js +29 -0
- package/translations/index.mjs +4 -0
- package/translations/indexMapper.d.ts +48 -0
- package/translations/indexMapper.js +865 -0
- package/translations/indexMapper.mjs +859 -0
- package/translations/mapCollections/aggregatedCollection.js +139 -0
- package/translations/mapCollections/aggregatedCollection.mjs +134 -0
- package/translations/mapCollections/index.js +18 -0
- package/translations/mapCollections/index.mjs +2 -0
- package/translations/mapCollections/mapCollection.js +164 -0
- package/translations/mapCollections/mapCollection.mjs +156 -0
- package/translations/maps/hidingMap.js +63 -0
- package/translations/maps/hidingMap.mjs +58 -0
- package/translations/maps/index.js +59 -0
- package/translations/maps/index.mjs +29 -0
- package/translations/maps/indexMap.d.ts +10 -0
- package/translations/maps/indexMap.js +203 -0
- package/translations/maps/indexMap.mjs +197 -0
- package/translations/maps/indexesSequence.js +82 -0
- package/translations/maps/indexesSequence.mjs +77 -0
- package/translations/maps/linkedPhysicalIndexToValueMap.js +216 -0
- package/translations/maps/linkedPhysicalIndexToValueMap.mjs +211 -0
- package/translations/maps/physicalIndexToValueMap.js +76 -0
- package/translations/maps/physicalIndexToValueMap.mjs +71 -0
- package/translations/maps/trimmingMap.js +63 -0
- package/translations/maps/trimmingMap.mjs +58 -0
- package/translations/maps/utils/actionsOnIndexes.js +42 -0
- package/translations/maps/utils/actionsOnIndexes.mjs +37 -0
- package/translations/maps/utils/index.js +28 -0
- package/translations/maps/utils/index.mjs +22 -0
- package/translations/maps/utils/indexesSequence.js +52 -0
- package/translations/maps/utils/indexesSequence.mjs +47 -0
- package/translations/maps/utils/physicallyIndexed.js +61 -0
- package/translations/maps/utils/physicallyIndexed.mjs +56 -0
- package/utils/dataStructures/linkedList.js +263 -0
- package/utils/dataStructures/linkedList.mjs +258 -0
- package/utils/dataStructures/priorityMap.js +106 -0
- package/utils/dataStructures/priorityMap.mjs +99 -0
- package/utils/dataStructures/queue.js +83 -0
- package/utils/dataStructures/queue.mjs +78 -0
- package/utils/dataStructures/stack.js +83 -0
- package/utils/dataStructures/stack.mjs +78 -0
- package/utils/dataStructures/tree.js +254 -0
- package/utils/dataStructures/tree.mjs +246 -0
- package/utils/dataStructures/uniqueMap.js +144 -0
- package/utils/dataStructures/uniqueMap.mjs +140 -0
- package/utils/dataStructures/uniqueSet.js +78 -0
- package/utils/dataStructures/uniqueSet.mjs +74 -0
- package/utils/ghostTable.js +536 -0
- package/utils/ghostTable.mjs +531 -0
- package/utils/interval.js +134 -0
- package/utils/interval.mjs +129 -0
- package/utils/parseTable.d.ts +5 -0
- package/utils/parseTable.js +305 -0
- package/utils/parseTable.mjs +299 -0
- package/utils/rootInstance.js +48 -0
- package/utils/rootInstance.mjs +38 -0
- package/utils/samplesGenerator.js +210 -0
- package/utils/samplesGenerator.mjs +205 -0
- package/utils/staticRegister.js +92 -0
- package/utils/staticRegister.mjs +86 -0
- package/validators/autocompleteValidator/autocompleteValidator.d.ts +5 -0
- package/validators/autocompleteValidator/autocompleteValidator.js +56 -0
- package/validators/autocompleteValidator/autocompleteValidator.mjs +50 -0
- package/validators/autocompleteValidator/index.d.ts +1 -0
- package/validators/autocompleteValidator/index.js +7 -0
- package/validators/autocompleteValidator/index.mjs +1 -0
- package/validators/base.d.ts +6 -0
- package/validators/dateValidator/dateValidator.d.ts +5 -0
- package/validators/dateValidator/dateValidator.js +77 -0
- package/validators/dateValidator/dateValidator.mjs +69 -0
- package/validators/dateValidator/index.d.ts +1 -0
- package/validators/dateValidator/index.js +8 -0
- package/validators/dateValidator/index.mjs +1 -0
- package/validators/index.d.ts +33 -0
- package/validators/index.js +32 -0
- package/validators/index.mjs +16 -0
- package/validators/numericValidator/index.d.ts +1 -0
- package/validators/numericValidator/index.js +7 -0
- package/validators/numericValidator/index.mjs +1 -0
- package/validators/numericValidator/numericValidator.d.ts +5 -0
- package/validators/numericValidator/numericValidator.js +30 -0
- package/validators/numericValidator/numericValidator.mjs +24 -0
- package/validators/registry.d.ts +18 -0
- package/validators/registry.js +48 -0
- package/validators/registry.mjs +38 -0
- package/validators/timeValidator/index.d.ts +1 -0
- package/validators/timeValidator/index.js +7 -0
- package/validators/timeValidator/index.mjs +1 -0
- package/validators/timeValidator/timeValidator.d.ts +5 -0
- package/validators/timeValidator/timeValidator.js +66 -0
- package/validators/timeValidator/timeValidator.mjs +60 -0
package/tableView.mjs
ADDED
@@ -0,0 +1,1307 @@
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
4
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
5
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
6
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
8
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
11
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12
|
+
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); } }
|
13
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
14
|
+
import "core-js/modules/es.array.iterator.js";
|
15
|
+
import "core-js/modules/es.object.to-string.js";
|
16
|
+
import "core-js/modules/es.string.iterator.js";
|
17
|
+
import "core-js/modules/es.weak-map.js";
|
18
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
19
|
+
import "core-js/modules/es.number.is-integer.js";
|
20
|
+
import "core-js/modules/es.number.constructor.js";
|
21
|
+
import "core-js/modules/es.symbol.js";
|
22
|
+
import "core-js/modules/es.symbol.description.js";
|
23
|
+
import "core-js/modules/es.symbol.iterator.js";
|
24
|
+
import "core-js/modules/es.array.from.js";
|
25
|
+
import "core-js/modules/es.array.slice.js";
|
26
|
+
import "core-js/modules/es.function.name.js";
|
27
|
+
import "core-js/modules/es.regexp.exec.js";
|
28
|
+
import { addClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput } from "./helpers/dom/element.mjs";
|
29
|
+
import EventManager from "./eventManager.mjs";
|
30
|
+
import { isImmediatePropagationStopped, isRightClick, isLeftClick } from "./helpers/dom/event.mjs";
|
31
|
+
import Walkontable from "./3rdparty/walkontable/src/index.mjs";
|
32
|
+
import { handleMouseEvent } from "./selection/mouseEventHandler.mjs";
|
33
|
+
import { isRootInstance } from "./utils/rootInstance.mjs";
|
34
|
+
var privatePool = new WeakMap();
|
35
|
+
|
36
|
+
/**
|
37
|
+
* @class TableView
|
38
|
+
* @private
|
39
|
+
*/
|
40
|
+
var TableView = /*#__PURE__*/function () {
|
41
|
+
/**
|
42
|
+
* @param {Hanstontable} instance Instance of {@link Handsontable}.
|
43
|
+
*/
|
44
|
+
function TableView(instance) {
|
45
|
+
_classCallCheck(this, TableView);
|
46
|
+
/**
|
47
|
+
* Instance of {@link Handsontable}.
|
48
|
+
*
|
49
|
+
* @private
|
50
|
+
* @type {Handsontable}
|
51
|
+
*/
|
52
|
+
this.instance = instance;
|
53
|
+
/**
|
54
|
+
* Instance of {@link EventManager}.
|
55
|
+
*
|
56
|
+
* @private
|
57
|
+
* @type {EventManager}
|
58
|
+
*/
|
59
|
+
this.eventManager = new EventManager(instance);
|
60
|
+
/**
|
61
|
+
* Current Handsontable's GridSettings object.
|
62
|
+
*
|
63
|
+
* @private
|
64
|
+
* @type {GridSettings}
|
65
|
+
*/
|
66
|
+
this.settings = instance.getSettings();
|
67
|
+
/**
|
68
|
+
* Main <THEAD> element.
|
69
|
+
*
|
70
|
+
* @private
|
71
|
+
* @type {HTMLTableSectionElement}
|
72
|
+
*/
|
73
|
+
this.THEAD = void 0;
|
74
|
+
/**
|
75
|
+
* Main <TBODY> element.
|
76
|
+
*
|
77
|
+
* @private
|
78
|
+
* @type {HTMLTableSectionElement}
|
79
|
+
*/
|
80
|
+
this.TBODY = void 0;
|
81
|
+
/**
|
82
|
+
* Main Walkontable instance.
|
83
|
+
*
|
84
|
+
* @private
|
85
|
+
* @type {Walkontable}
|
86
|
+
*/
|
87
|
+
this._wt = void 0;
|
88
|
+
/**
|
89
|
+
* Main Walkontable instance.
|
90
|
+
*
|
91
|
+
* @private
|
92
|
+
* @type {Walkontable}
|
93
|
+
*/
|
94
|
+
this.activeWt = void 0;
|
95
|
+
/**
|
96
|
+
* The flag determines if the `adjustElementsSize` method call was made during
|
97
|
+
* the render suspending. If true, the method has to be triggered once after render
|
98
|
+
* resuming.
|
99
|
+
*
|
100
|
+
* @private
|
101
|
+
* @type {boolean}
|
102
|
+
*/
|
103
|
+
this.postponedAdjustElementsSize = false;
|
104
|
+
privatePool.set(this, {
|
105
|
+
/**
|
106
|
+
* Defines if the text should be selected during mousemove.
|
107
|
+
*
|
108
|
+
* @private
|
109
|
+
* @type {boolean}
|
110
|
+
*/
|
111
|
+
selectionMouseDown: false,
|
112
|
+
/**
|
113
|
+
* @private
|
114
|
+
* @type {boolean}
|
115
|
+
*/
|
116
|
+
mouseDown: void 0,
|
117
|
+
/**
|
118
|
+
* Main <TABLE> element.
|
119
|
+
*
|
120
|
+
* @private
|
121
|
+
* @type {HTMLTableElement}
|
122
|
+
*/
|
123
|
+
table: void 0,
|
124
|
+
/**
|
125
|
+
* Cached width of the rootElement.
|
126
|
+
*
|
127
|
+
* @type {number}
|
128
|
+
*/
|
129
|
+
lastWidth: 0,
|
130
|
+
/**
|
131
|
+
* Cached height of the rootElement.
|
132
|
+
*
|
133
|
+
* @type {number}
|
134
|
+
*/
|
135
|
+
lastHeight: 0
|
136
|
+
});
|
137
|
+
this.createElements();
|
138
|
+
this.registerEvents();
|
139
|
+
this.initializeWalkontable();
|
140
|
+
}
|
141
|
+
|
142
|
+
/**
|
143
|
+
* Renders WalkontableUI.
|
144
|
+
*/
|
145
|
+
_createClass(TableView, [{
|
146
|
+
key: "render",
|
147
|
+
value: function render() {
|
148
|
+
if (!this.instance.isRenderSuspended()) {
|
149
|
+
this.instance.runHooks('beforeRender', this.instance.forceFullRender);
|
150
|
+
if (this.postponedAdjustElementsSize) {
|
151
|
+
this.postponedAdjustElementsSize = false;
|
152
|
+
this.adjustElementsSize(true);
|
153
|
+
}
|
154
|
+
this._wt.draw(!this.instance.forceFullRender);
|
155
|
+
this.instance.runHooks('afterRender', this.instance.forceFullRender);
|
156
|
+
this.instance.forceFullRender = false;
|
157
|
+
this.instance.renderCall = false;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
/**
|
162
|
+
* Adjust overlays elements size and master table size.
|
163
|
+
*
|
164
|
+
* @param {boolean} [force=false] When `true`, it adjust the DOM nodes sizes for all overlays.
|
165
|
+
*/
|
166
|
+
}, {
|
167
|
+
key: "adjustElementsSize",
|
168
|
+
value: function adjustElementsSize() {
|
169
|
+
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
170
|
+
if (this.instance.isRenderSuspended()) {
|
171
|
+
this.postponedAdjustElementsSize = true;
|
172
|
+
} else {
|
173
|
+
this._wt.wtOverlays.adjustElementsSize(force);
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
/**
|
178
|
+
* Returns td object given coordinates.
|
179
|
+
*
|
180
|
+
* @param {CellCoords} coords Renderable cell coordinates.
|
181
|
+
* @param {boolean} topmost Indicates whether the cell should be calculated from the topmost.
|
182
|
+
* @returns {HTMLTableCellElement|null}
|
183
|
+
*/
|
184
|
+
}, {
|
185
|
+
key: "getCellAtCoords",
|
186
|
+
value: function getCellAtCoords(coords, topmost) {
|
187
|
+
var td = this._wt.getCell(coords, topmost);
|
188
|
+
if (td < 0) {
|
189
|
+
// there was an exit code (cell is out of bounds)
|
190
|
+
return null;
|
191
|
+
}
|
192
|
+
return td;
|
193
|
+
}
|
194
|
+
|
195
|
+
/**
|
196
|
+
* Scroll viewport to a cell.
|
197
|
+
*
|
198
|
+
* @param {CellCoords} coords Renderable cell coordinates.
|
199
|
+
* @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.
|
200
|
+
* @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right side of the table.
|
201
|
+
* @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom side of the table.
|
202
|
+
* @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left side of the table.
|
203
|
+
* @returns {boolean}
|
204
|
+
*/
|
205
|
+
}, {
|
206
|
+
key: "scrollViewport",
|
207
|
+
value: function scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft) {
|
208
|
+
return this._wt.scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft);
|
209
|
+
}
|
210
|
+
|
211
|
+
/**
|
212
|
+
* Scroll viewport to a column.
|
213
|
+
*
|
214
|
+
* @param {number} column Renderable column index.
|
215
|
+
* @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right side of the table.
|
216
|
+
* @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left side of the table.
|
217
|
+
* @returns {boolean}
|
218
|
+
*/
|
219
|
+
}, {
|
220
|
+
key: "scrollViewportHorizontally",
|
221
|
+
value: function scrollViewportHorizontally(column, snapToRight, snapToLeft) {
|
222
|
+
return this._wt.scrollViewportHorizontally(column, snapToRight, snapToLeft);
|
223
|
+
}
|
224
|
+
|
225
|
+
/**
|
226
|
+
* Scroll viewport to a row.
|
227
|
+
*
|
228
|
+
* @param {number} row Renderable row index.
|
229
|
+
* @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.
|
230
|
+
* @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom side of the table.
|
231
|
+
* @returns {boolean}
|
232
|
+
*/
|
233
|
+
}, {
|
234
|
+
key: "scrollViewportVertically",
|
235
|
+
value: function scrollViewportVertically(row, snapToTop, snapToBottom) {
|
236
|
+
return this._wt.scrollViewportVertically(row, snapToTop, snapToBottom);
|
237
|
+
}
|
238
|
+
|
239
|
+
/**
|
240
|
+
* Prepares DOMElements and adds correct className to the root element.
|
241
|
+
*
|
242
|
+
* @private
|
243
|
+
*/
|
244
|
+
}, {
|
245
|
+
key: "createElements",
|
246
|
+
value: function createElements() {
|
247
|
+
var priv = privatePool.get(this);
|
248
|
+
var _this$instance = this.instance,
|
249
|
+
rootElement = _this$instance.rootElement,
|
250
|
+
rootDocument = _this$instance.rootDocument;
|
251
|
+
var originalStyle = rootElement.getAttribute('style');
|
252
|
+
if (originalStyle) {
|
253
|
+
rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions
|
254
|
+
}
|
255
|
+
|
256
|
+
addClass(rootElement, 'handsontable');
|
257
|
+
priv.table = rootDocument.createElement('TABLE');
|
258
|
+
addClass(priv.table, 'htCore');
|
259
|
+
if (this.instance.getSettings().tableClassName) {
|
260
|
+
addClass(priv.table, this.instance.getSettings().tableClassName);
|
261
|
+
}
|
262
|
+
this.THEAD = rootDocument.createElement('THEAD');
|
263
|
+
priv.table.appendChild(this.THEAD);
|
264
|
+
this.TBODY = rootDocument.createElement('TBODY');
|
265
|
+
priv.table.appendChild(this.TBODY);
|
266
|
+
this.instance.table = priv.table;
|
267
|
+
this.instance.container.insertBefore(priv.table, this.instance.container.firstChild);
|
268
|
+
}
|
269
|
+
|
270
|
+
/**
|
271
|
+
* Attaches necessary listeners.
|
272
|
+
*
|
273
|
+
* @private
|
274
|
+
*/
|
275
|
+
}, {
|
276
|
+
key: "registerEvents",
|
277
|
+
value: function registerEvents() {
|
278
|
+
var _this = this;
|
279
|
+
var priv = privatePool.get(this);
|
280
|
+
var _this$instance2 = this.instance,
|
281
|
+
rootElement = _this$instance2.rootElement,
|
282
|
+
rootDocument = _this$instance2.rootDocument,
|
283
|
+
selection = _this$instance2.selection;
|
284
|
+
var documentElement = rootDocument.documentElement;
|
285
|
+
this.eventManager.addEventListener(rootElement, 'mousedown', function (event) {
|
286
|
+
priv.selectionMouseDown = true;
|
287
|
+
if (!_this.isTextSelectionAllowed(event.target)) {
|
288
|
+
var rootWindow = _this.instance.rootWindow;
|
289
|
+
clearTextSelection(rootWindow);
|
290
|
+
event.preventDefault();
|
291
|
+
rootWindow.focus(); // make sure that window that contains HOT is active. Important when HOT is in iframe.
|
292
|
+
}
|
293
|
+
});
|
294
|
+
|
295
|
+
this.eventManager.addEventListener(rootElement, 'mouseup', function () {
|
296
|
+
priv.selectionMouseDown = false;
|
297
|
+
});
|
298
|
+
this.eventManager.addEventListener(rootElement, 'mousemove', function (event) {
|
299
|
+
if (priv.selectionMouseDown && !_this.isTextSelectionAllowed(event.target)) {
|
300
|
+
// Clear selection only when fragmentSelection is enabled, otherwise clearing selection breaks the IME editor.
|
301
|
+
if (_this.settings.fragmentSelection) {
|
302
|
+
clearTextSelection(_this.instance.rootWindow);
|
303
|
+
}
|
304
|
+
event.preventDefault();
|
305
|
+
}
|
306
|
+
});
|
307
|
+
this.eventManager.addEventListener(documentElement, 'keyup', function (event) {
|
308
|
+
// TODO: is it the best place and way to finish cell selection?
|
309
|
+
if (selection.isInProgress() && !event.shiftKey) {
|
310
|
+
selection.finish();
|
311
|
+
}
|
312
|
+
});
|
313
|
+
this.eventManager.addEventListener(documentElement, 'mouseup', function (event) {
|
314
|
+
if (selection.isInProgress() && isLeftClick(event)) {
|
315
|
+
// is left mouse button
|
316
|
+
selection.finish();
|
317
|
+
}
|
318
|
+
priv.mouseDown = false;
|
319
|
+
if (isOutsideInput(rootDocument.activeElement) || !selection.isSelected() && !selection.isSelectedByAnyHeader() && !rootElement.contains(event.target) && !isRightClick(event)) {
|
320
|
+
_this.instance.unlisten();
|
321
|
+
}
|
322
|
+
});
|
323
|
+
this.eventManager.addEventListener(documentElement, 'contextmenu', function (event) {
|
324
|
+
if (selection.isInProgress() && isRightClick(event)) {
|
325
|
+
selection.finish();
|
326
|
+
priv.mouseDown = false;
|
327
|
+
}
|
328
|
+
});
|
329
|
+
this.eventManager.addEventListener(documentElement, 'touchend', function () {
|
330
|
+
if (selection.isInProgress()) {
|
331
|
+
selection.finish();
|
332
|
+
}
|
333
|
+
priv.mouseDown = false;
|
334
|
+
});
|
335
|
+
this.eventManager.addEventListener(documentElement, 'mousedown', function (event) {
|
336
|
+
var originalTarget = event.target;
|
337
|
+
var eventX = event.x || event.clientX;
|
338
|
+
var eventY = event.y || event.clientY;
|
339
|
+
var next = event.target;
|
340
|
+
if (priv.mouseDown || !rootElement || !_this.instance.view) {
|
341
|
+
return; // it must have been started in a cell
|
342
|
+
}
|
343
|
+
|
344
|
+
// immediate click on "holder" means click on the right side of vertical scrollbar
|
345
|
+
var holder = _this.instance.view._wt.wtTable.holder;
|
346
|
+
if (next === holder) {
|
347
|
+
var scrollbarWidth = getScrollbarWidth(rootDocument);
|
348
|
+
if (rootDocument.elementFromPoint(eventX + scrollbarWidth, eventY) !== holder || rootDocument.elementFromPoint(eventX, eventY + scrollbarWidth) !== holder) {
|
349
|
+
return;
|
350
|
+
}
|
351
|
+
} else {
|
352
|
+
while (next !== documentElement) {
|
353
|
+
if (next === null) {
|
354
|
+
if (event.isTargetWebComponent) {
|
355
|
+
break;
|
356
|
+
}
|
357
|
+
|
358
|
+
// click on something that was a row but now is detached (possibly because your click triggered a rerender)
|
359
|
+
return;
|
360
|
+
}
|
361
|
+
if (next === rootElement) {
|
362
|
+
// click inside container
|
363
|
+
return;
|
364
|
+
}
|
365
|
+
next = next.parentNode;
|
366
|
+
}
|
367
|
+
}
|
368
|
+
|
369
|
+
// function did not return until here, we have an outside click!
|
370
|
+
var outsideClickDeselects = typeof _this.settings.outsideClickDeselects === 'function' ? _this.settings.outsideClickDeselects(originalTarget) : _this.settings.outsideClickDeselects;
|
371
|
+
if (outsideClickDeselects) {
|
372
|
+
_this.instance.deselectCell();
|
373
|
+
} else {
|
374
|
+
_this.instance.destroyEditor(false, false);
|
375
|
+
}
|
376
|
+
});
|
377
|
+
this.eventManager.addEventListener(priv.table, 'selectstart', function (event) {
|
378
|
+
if (_this.settings.fragmentSelection || isInput(event.target)) {
|
379
|
+
return;
|
380
|
+
}
|
381
|
+
// https://github.com/handsontable/handsontable/issues/160
|
382
|
+
// Prevent text from being selected when performing drag down.
|
383
|
+
event.preventDefault();
|
384
|
+
});
|
385
|
+
}
|
386
|
+
|
387
|
+
/**
|
388
|
+
* Translate renderable cell coordinates to visual coordinates.
|
389
|
+
*
|
390
|
+
* @param {CellCoords} coords The cell coordinates.
|
391
|
+
* @returns {CellCoords}
|
392
|
+
*/
|
393
|
+
}, {
|
394
|
+
key: "translateFromRenderableToVisualCoords",
|
395
|
+
value: function translateFromRenderableToVisualCoords(_ref) {
|
396
|
+
var _this$instance3;
|
397
|
+
var row = _ref.row,
|
398
|
+
col = _ref.col;
|
399
|
+
// TODO: To consider an idea to reusing the CellCoords instance instead creating new one.
|
400
|
+
return (_this$instance3 = this.instance)._createCellCoords.apply(_this$instance3, _toConsumableArray(this.translateFromRenderableToVisualIndex(row, col)));
|
401
|
+
}
|
402
|
+
|
403
|
+
/**
|
404
|
+
* Translate renderable row and column indexes to visual row and column indexes.
|
405
|
+
*
|
406
|
+
* @param {number} renderableRow Renderable row index.
|
407
|
+
* @param {number} renderableColumn Renderable columnIndex.
|
408
|
+
* @returns {number[]}
|
409
|
+
*/
|
410
|
+
}, {
|
411
|
+
key: "translateFromRenderableToVisualIndex",
|
412
|
+
value: function translateFromRenderableToVisualIndex(renderableRow, renderableColumn) {
|
413
|
+
// TODO: Some helper may be needed.
|
414
|
+
// We perform translation for indexes (without headers).
|
415
|
+
var visualRow = renderableRow >= 0 ? this.instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow;
|
416
|
+
var visualColumn = renderableColumn >= 0 ? this.instance.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn;
|
417
|
+
if (visualRow === null) {
|
418
|
+
visualRow = renderableRow;
|
419
|
+
}
|
420
|
+
if (visualColumn === null) {
|
421
|
+
visualColumn = renderableColumn;
|
422
|
+
}
|
423
|
+
return [visualRow, visualColumn];
|
424
|
+
}
|
425
|
+
|
426
|
+
/**
|
427
|
+
* Returns the number of renderable indexes.
|
428
|
+
*
|
429
|
+
* @private
|
430
|
+
* @param {IndexMapper} indexMapper The IndexMapper instance for specific axis.
|
431
|
+
* @param {number} maxElements Maximum number of elements (rows or columns).
|
432
|
+
*
|
433
|
+
* @returns {number|*}
|
434
|
+
*/
|
435
|
+
}, {
|
436
|
+
key: "countRenderableIndexes",
|
437
|
+
value: function countRenderableIndexes(indexMapper, maxElements) {
|
438
|
+
var consideredElements = Math.min(indexMapper.getNotTrimmedIndexesLength(), maxElements);
|
439
|
+
// Don't take hidden indexes into account. We are looking just for renderable indexes.
|
440
|
+
var firstNotHiddenIndex = indexMapper.getNearestNotHiddenIndex(consideredElements - 1, -1);
|
441
|
+
|
442
|
+
// There are no renderable indexes.
|
443
|
+
if (firstNotHiddenIndex === null) {
|
444
|
+
return 0;
|
445
|
+
}
|
446
|
+
return indexMapper.getRenderableFromVisualIndex(firstNotHiddenIndex) + 1;
|
447
|
+
}
|
448
|
+
|
449
|
+
/**
|
450
|
+
* Returns the number of renderable columns.
|
451
|
+
*
|
452
|
+
* @returns {number}
|
453
|
+
*/
|
454
|
+
}, {
|
455
|
+
key: "countRenderableColumns",
|
456
|
+
value: function countRenderableColumns() {
|
457
|
+
return this.countRenderableIndexes(this.instance.columnIndexMapper, this.settings.maxCols);
|
458
|
+
}
|
459
|
+
|
460
|
+
/**
|
461
|
+
* Returns the number of renderable rows.
|
462
|
+
*
|
463
|
+
* @returns {number}
|
464
|
+
*/
|
465
|
+
}, {
|
466
|
+
key: "countRenderableRows",
|
467
|
+
value: function countRenderableRows() {
|
468
|
+
return this.countRenderableIndexes(this.instance.rowIndexMapper, this.settings.maxRows);
|
469
|
+
}
|
470
|
+
|
471
|
+
/**
|
472
|
+
* Returns number of not hidden row indexes counting from the passed starting index.
|
473
|
+
* The counting direction can be controlled by `incrementBy` argument.
|
474
|
+
*
|
475
|
+
* @param {number} visualIndex The visual index from which the counting begins.
|
476
|
+
* @param {number} incrementBy If `-1` then counting is backwards or forward when `1`.
|
477
|
+
* @returns {number}
|
478
|
+
*/
|
479
|
+
}, {
|
480
|
+
key: "countNotHiddenRowIndexes",
|
481
|
+
value: function countNotHiddenRowIndexes(visualIndex, incrementBy) {
|
482
|
+
return this.countNotHiddenIndexes(visualIndex, incrementBy, this.instance.rowIndexMapper, this.countRenderableRows());
|
483
|
+
}
|
484
|
+
|
485
|
+
/**
|
486
|
+
* Returns number of not hidden column indexes counting from the passed starting index.
|
487
|
+
* The counting direction can be controlled by `incrementBy` argument.
|
488
|
+
*
|
489
|
+
* @param {number} visualIndex The visual index from which the counting begins.
|
490
|
+
* @param {number} incrementBy If `-1` then counting is backwards or forward when `1`.
|
491
|
+
* @returns {number}
|
492
|
+
*/
|
493
|
+
}, {
|
494
|
+
key: "countNotHiddenColumnIndexes",
|
495
|
+
value: function countNotHiddenColumnIndexes(visualIndex, incrementBy) {
|
496
|
+
return this.countNotHiddenIndexes(visualIndex, incrementBy, this.instance.columnIndexMapper, this.countRenderableColumns());
|
497
|
+
}
|
498
|
+
|
499
|
+
/**
|
500
|
+
* Returns number of not hidden indexes counting from the passed starting index.
|
501
|
+
* The counting direction can be controlled by `incrementBy` argument.
|
502
|
+
*
|
503
|
+
* @param {number} visualIndex The visual index from which the counting begins.
|
504
|
+
* @param {number} incrementBy If `-1` then counting is backwards or forward when `1`.
|
505
|
+
* @param {IndexMapper} indexMapper The IndexMapper instance for specific axis.
|
506
|
+
* @param {number} renderableIndexesCount Total count of renderable indexes for specific axis.
|
507
|
+
* @returns {number}
|
508
|
+
*/
|
509
|
+
}, {
|
510
|
+
key: "countNotHiddenIndexes",
|
511
|
+
value: function countNotHiddenIndexes(visualIndex, incrementBy, indexMapper, renderableIndexesCount) {
|
512
|
+
if (isNaN(visualIndex) || visualIndex < 0) {
|
513
|
+
return 0;
|
514
|
+
}
|
515
|
+
var firstVisibleIndex = indexMapper.getNearestNotHiddenIndex(visualIndex, incrementBy);
|
516
|
+
var renderableIndex = indexMapper.getRenderableFromVisualIndex(firstVisibleIndex);
|
517
|
+
if (!Number.isInteger(renderableIndex)) {
|
518
|
+
return 0;
|
519
|
+
}
|
520
|
+
var notHiddenIndexes = 0;
|
521
|
+
if (incrementBy < 0) {
|
522
|
+
// Zero-based numbering for renderable indexes corresponds to a number of not hidden indexes.
|
523
|
+
notHiddenIndexes = renderableIndex + 1;
|
524
|
+
} else if (incrementBy > 0) {
|
525
|
+
notHiddenIndexes = renderableIndexesCount - renderableIndex;
|
526
|
+
}
|
527
|
+
return notHiddenIndexes;
|
528
|
+
}
|
529
|
+
|
530
|
+
/**
|
531
|
+
* The function returns the number of not hidden column indexes that fit between the first and
|
532
|
+
* last fixed column in the left (or right in RTL mode) overlay.
|
533
|
+
*
|
534
|
+
* @returns {number}
|
535
|
+
*/
|
536
|
+
}, {
|
537
|
+
key: "countNotHiddenFixedColumnsStart",
|
538
|
+
value: function countNotHiddenFixedColumnsStart() {
|
539
|
+
var countCols = this.instance.countCols();
|
540
|
+
var visualFixedColumnsStart = Math.min(parseInt(this.settings.fixedColumnsStart, 10), countCols) - 1;
|
541
|
+
return this.countNotHiddenColumnIndexes(visualFixedColumnsStart, -1);
|
542
|
+
}
|
543
|
+
|
544
|
+
/**
|
545
|
+
* The function returns the number of not hidden row indexes that fit between the first and
|
546
|
+
* last fixed row in the top overlay.
|
547
|
+
*
|
548
|
+
* @returns {number}
|
549
|
+
*/
|
550
|
+
}, {
|
551
|
+
key: "countNotHiddenFixedRowsTop",
|
552
|
+
value: function countNotHiddenFixedRowsTop() {
|
553
|
+
var countRows = this.instance.countRows();
|
554
|
+
var visualFixedRowsTop = Math.min(parseInt(this.settings.fixedRowsTop, 10), countRows) - 1;
|
555
|
+
return this.countNotHiddenRowIndexes(visualFixedRowsTop, -1);
|
556
|
+
}
|
557
|
+
|
558
|
+
/**
|
559
|
+
* The function returns the number of not hidden row indexes that fit between the first and
|
560
|
+
* last fixed row in the bottom overlay.
|
561
|
+
*
|
562
|
+
* @returns {number}
|
563
|
+
*/
|
564
|
+
}, {
|
565
|
+
key: "countNotHiddenFixedRowsBottom",
|
566
|
+
value: function countNotHiddenFixedRowsBottom() {
|
567
|
+
var countRows = this.instance.countRows();
|
568
|
+
var visualFixedRowsBottom = Math.max(countRows - parseInt(this.settings.fixedRowsBottom, 10), 0);
|
569
|
+
return this.countNotHiddenRowIndexes(visualFixedRowsBottom, 1);
|
570
|
+
}
|
571
|
+
|
572
|
+
/**
|
573
|
+
* Checks if at least one cell than belongs to the main table is not covered by the top, left or
|
574
|
+
* bottom overlay.
|
575
|
+
*
|
576
|
+
* @returns {boolean}
|
577
|
+
*/
|
578
|
+
}, {
|
579
|
+
key: "isMainTableNotFullyCoveredByOverlays",
|
580
|
+
value: function isMainTableNotFullyCoveredByOverlays() {
|
581
|
+
var fixedAllRows = this.countNotHiddenFixedRowsTop() + this.countNotHiddenFixedRowsBottom();
|
582
|
+
var fixedAllColumns = this.countNotHiddenFixedColumnsStart();
|
583
|
+
return this.instance.countRenderedRows() > fixedAllRows && this.instance.countRenderedCols() > fixedAllColumns;
|
584
|
+
}
|
585
|
+
|
586
|
+
/**
|
587
|
+
* Defines default configuration and initializes WalkOnTable instance.
|
588
|
+
*
|
589
|
+
* @private
|
590
|
+
*/
|
591
|
+
}, {
|
592
|
+
key: "initializeWalkontable",
|
593
|
+
value: function initializeWalkontable() {
|
594
|
+
var _this2 = this;
|
595
|
+
var priv = privatePool.get(this);
|
596
|
+
var walkontableConfig = {
|
597
|
+
rtlMode: this.instance.isRtl(),
|
598
|
+
externalRowCalculator: this.instance.getPlugin('autoRowSize') && this.instance.getPlugin('autoRowSize').isEnabled(),
|
599
|
+
table: priv.table,
|
600
|
+
isDataViewInstance: function isDataViewInstance() {
|
601
|
+
return isRootInstance(_this2.instance);
|
602
|
+
},
|
603
|
+
preventOverflow: function preventOverflow() {
|
604
|
+
return _this2.settings.preventOverflow;
|
605
|
+
},
|
606
|
+
preventWheel: function preventWheel() {
|
607
|
+
return _this2.settings.preventWheel;
|
608
|
+
},
|
609
|
+
stretchH: function stretchH() {
|
610
|
+
return _this2.settings.stretchH;
|
611
|
+
},
|
612
|
+
data: function data(renderableRow, renderableColumn) {
|
613
|
+
var _this2$instance;
|
614
|
+
return (_this2$instance = _this2.instance).getDataAtCell.apply(_this2$instance, _toConsumableArray(_this2.translateFromRenderableToVisualIndex(renderableRow, renderableColumn)));
|
615
|
+
},
|
616
|
+
totalRows: function totalRows() {
|
617
|
+
return _this2.countRenderableRows();
|
618
|
+
},
|
619
|
+
totalColumns: function totalColumns() {
|
620
|
+
return _this2.countRenderableColumns();
|
621
|
+
},
|
622
|
+
// Number of renderable columns for the left overlay.
|
623
|
+
fixedColumnsStart: function fixedColumnsStart() {
|
624
|
+
return _this2.countNotHiddenFixedColumnsStart();
|
625
|
+
},
|
626
|
+
// Number of renderable rows for the top overlay.
|
627
|
+
fixedRowsTop: function fixedRowsTop() {
|
628
|
+
return _this2.countNotHiddenFixedRowsTop();
|
629
|
+
},
|
630
|
+
// Number of renderable rows for the bottom overlay.
|
631
|
+
fixedRowsBottom: function fixedRowsBottom() {
|
632
|
+
return _this2.countNotHiddenFixedRowsBottom();
|
633
|
+
},
|
634
|
+
// Enable the inline start overlay when conditions are met.
|
635
|
+
shouldRenderInlineStartOverlay: function shouldRenderInlineStartOverlay() {
|
636
|
+
return _this2.settings.fixedColumnsStart > 0 || walkontableConfig.rowHeaders().length > 0;
|
637
|
+
},
|
638
|
+
// Enable the top overlay when conditions are met.
|
639
|
+
shouldRenderTopOverlay: function shouldRenderTopOverlay() {
|
640
|
+
return _this2.settings.fixedRowsTop > 0 || walkontableConfig.columnHeaders().length > 0;
|
641
|
+
},
|
642
|
+
// Enable the bottom overlay when conditions are met.
|
643
|
+
shouldRenderBottomOverlay: function shouldRenderBottomOverlay() {
|
644
|
+
return _this2.settings.fixedRowsBottom > 0;
|
645
|
+
},
|
646
|
+
minSpareRows: function minSpareRows() {
|
647
|
+
return _this2.settings.minSpareRows;
|
648
|
+
},
|
649
|
+
renderAllRows: this.settings.renderAllRows,
|
650
|
+
rowHeaders: function rowHeaders() {
|
651
|
+
var headerRenderers = [];
|
652
|
+
if (_this2.instance.hasRowHeaders()) {
|
653
|
+
headerRenderers.push(function (renderableRowIndex, TH) {
|
654
|
+
// TODO: Some helper may be needed.
|
655
|
+
// We perform translation for row indexes (without row headers).
|
656
|
+
var visualRowIndex = renderableRowIndex >= 0 ? _this2.instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
|
657
|
+
_this2.appendRowHeader(visualRowIndex, TH);
|
658
|
+
});
|
659
|
+
}
|
660
|
+
_this2.instance.runHooks('afterGetRowHeaderRenderers', headerRenderers);
|
661
|
+
return headerRenderers;
|
662
|
+
},
|
663
|
+
columnHeaders: function columnHeaders() {
|
664
|
+
var headerRenderers = [];
|
665
|
+
if (_this2.instance.hasColHeaders()) {
|
666
|
+
headerRenderers.push(function (renderedColumnIndex, TH) {
|
667
|
+
// TODO: Some helper may be needed.
|
668
|
+
// We perform translation for columns indexes (without column headers).
|
669
|
+
var visualColumnsIndex = renderedColumnIndex >= 0 ? _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex) : renderedColumnIndex;
|
670
|
+
_this2.appendColHeader(visualColumnsIndex, TH);
|
671
|
+
});
|
672
|
+
}
|
673
|
+
_this2.instance.runHooks('afterGetColumnHeaderRenderers', headerRenderers);
|
674
|
+
return headerRenderers;
|
675
|
+
},
|
676
|
+
columnWidth: function columnWidth(renderedColumnIndex) {
|
677
|
+
var visualIndex = _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
|
678
|
+
|
679
|
+
// It's not a bug that we can't find visual index for some handled by method indexes. The function is called also
|
680
|
+
// for indexes that are not displayed (indexes that are beyond the grid's boundaries), i.e. when `fixedColumnsStart` > `startCols` (wrong config?) or
|
681
|
+
// scrolling and dataset is empty (scroll should handle that?).
|
682
|
+
return _this2.instance.getColWidth(visualIndex === null ? renderedColumnIndex : visualIndex);
|
683
|
+
},
|
684
|
+
rowHeight: function rowHeight(renderedRowIndex) {
|
685
|
+
var visualIndex = _this2.instance.rowIndexMapper.getVisualFromRenderableIndex(renderedRowIndex);
|
686
|
+
return _this2.instance.getRowHeight(visualIndex === null ? renderedRowIndex : visualIndex);
|
687
|
+
},
|
688
|
+
cellRenderer: function cellRenderer(renderedRowIndex, renderedColumnIndex, TD) {
|
689
|
+
var _this2$translateFromR = _this2.translateFromRenderableToVisualIndex(renderedRowIndex, renderedColumnIndex),
|
690
|
+
_this2$translateFromR2 = _slicedToArray(_this2$translateFromR, 2),
|
691
|
+
visualRowIndex = _this2$translateFromR2[0],
|
692
|
+
visualColumnIndex = _this2$translateFromR2[1];
|
693
|
+
|
694
|
+
// Coords may be modified. For example, by the `MergeCells` plugin. It should affect cell value and cell meta.
|
695
|
+
var modifiedCellCoords = _this2.instance.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex);
|
696
|
+
var visualRowToCheck = visualRowIndex;
|
697
|
+
var visualColumnToCheck = visualColumnIndex;
|
698
|
+
if (Array.isArray(modifiedCellCoords)) {
|
699
|
+
var _modifiedCellCoords = _slicedToArray(modifiedCellCoords, 2);
|
700
|
+
visualRowToCheck = _modifiedCellCoords[0];
|
701
|
+
visualColumnToCheck = _modifiedCellCoords[1];
|
702
|
+
}
|
703
|
+
var cellProperties = _this2.instance.getCellMeta(visualRowToCheck, visualColumnToCheck);
|
704
|
+
var prop = _this2.instance.colToProp(visualColumnToCheck);
|
705
|
+
var value = _this2.instance.getDataAtRowProp(visualRowToCheck, prop);
|
706
|
+
if (_this2.instance.hasHook('beforeValueRender')) {
|
707
|
+
value = _this2.instance.runHooks('beforeValueRender', value, cellProperties);
|
708
|
+
}
|
709
|
+
_this2.instance.runHooks('beforeRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
|
710
|
+
_this2.instance.getCellRenderer(cellProperties)(_this2.instance, TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
|
711
|
+
_this2.instance.runHooks('afterRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);
|
712
|
+
},
|
713
|
+
selections: this.instance.selection.highlight,
|
714
|
+
hideBorderOnMouseDownOver: function hideBorderOnMouseDownOver() {
|
715
|
+
return _this2.settings.fragmentSelection;
|
716
|
+
},
|
717
|
+
onWindowResize: function onWindowResize() {
|
718
|
+
if (_this2.instance && !_this2.instance.isDestroyed) {
|
719
|
+
_this2.instance.refreshDimensions();
|
720
|
+
}
|
721
|
+
},
|
722
|
+
onContainerElementResize: function onContainerElementResize() {
|
723
|
+
if (_this2.instance && !_this2.instance.isDestroyed) {
|
724
|
+
_this2.instance.refreshDimensions();
|
725
|
+
}
|
726
|
+
},
|
727
|
+
onCellMouseDown: function onCellMouseDown(event, coords, TD, wt) {
|
728
|
+
var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);
|
729
|
+
var controller = {
|
730
|
+
row: false,
|
731
|
+
column: false,
|
732
|
+
cell: false
|
733
|
+
};
|
734
|
+
_this2.instance.listen();
|
735
|
+
_this2.activeWt = wt;
|
736
|
+
priv.mouseDown = true;
|
737
|
+
_this2.instance.runHooks('beforeOnCellMouseDown', event, visualCoords, TD, controller);
|
738
|
+
if (isImmediatePropagationStopped(event)) {
|
739
|
+
return;
|
740
|
+
}
|
741
|
+
handleMouseEvent(event, {
|
742
|
+
coords: visualCoords,
|
743
|
+
selection: _this2.instance.selection,
|
744
|
+
controller: controller,
|
745
|
+
cellCoordsFactory: function cellCoordsFactory(row, column) {
|
746
|
+
return _this2.instance._createCellCoords(row, column);
|
747
|
+
}
|
748
|
+
});
|
749
|
+
_this2.instance.runHooks('afterOnCellMouseDown', event, visualCoords, TD);
|
750
|
+
_this2.activeWt = _this2._wt;
|
751
|
+
},
|
752
|
+
onCellContextMenu: function onCellContextMenu(event, coords, TD, wt) {
|
753
|
+
var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);
|
754
|
+
_this2.activeWt = wt;
|
755
|
+
priv.mouseDown = false;
|
756
|
+
if (_this2.instance.selection.isInProgress()) {
|
757
|
+
_this2.instance.selection.finish();
|
758
|
+
}
|
759
|
+
_this2.instance.runHooks('beforeOnCellContextMenu', event, visualCoords, TD);
|
760
|
+
if (isImmediatePropagationStopped(event)) {
|
761
|
+
return;
|
762
|
+
}
|
763
|
+
_this2.instance.runHooks('afterOnCellContextMenu', event, visualCoords, TD);
|
764
|
+
_this2.activeWt = _this2._wt;
|
765
|
+
},
|
766
|
+
onCellMouseOut: function onCellMouseOut(event, coords, TD, wt) {
|
767
|
+
var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);
|
768
|
+
_this2.activeWt = wt;
|
769
|
+
_this2.instance.runHooks('beforeOnCellMouseOut', event, visualCoords, TD);
|
770
|
+
if (isImmediatePropagationStopped(event)) {
|
771
|
+
return;
|
772
|
+
}
|
773
|
+
_this2.instance.runHooks('afterOnCellMouseOut', event, visualCoords, TD);
|
774
|
+
_this2.activeWt = _this2._wt;
|
775
|
+
},
|
776
|
+
onCellMouseOver: function onCellMouseOver(event, coords, TD, wt) {
|
777
|
+
var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);
|
778
|
+
var controller = {
|
779
|
+
row: false,
|
780
|
+
column: false,
|
781
|
+
cell: false
|
782
|
+
};
|
783
|
+
_this2.activeWt = wt;
|
784
|
+
_this2.instance.runHooks('beforeOnCellMouseOver', event, visualCoords, TD, controller);
|
785
|
+
if (isImmediatePropagationStopped(event)) {
|
786
|
+
return;
|
787
|
+
}
|
788
|
+
if (priv.mouseDown) {
|
789
|
+
handleMouseEvent(event, {
|
790
|
+
coords: visualCoords,
|
791
|
+
selection: _this2.instance.selection,
|
792
|
+
controller: controller,
|
793
|
+
cellCoordsFactory: function cellCoordsFactory(row, column) {
|
794
|
+
return _this2.instance._createCellCoords(row, column);
|
795
|
+
}
|
796
|
+
});
|
797
|
+
}
|
798
|
+
_this2.instance.runHooks('afterOnCellMouseOver', event, visualCoords, TD);
|
799
|
+
_this2.activeWt = _this2._wt;
|
800
|
+
},
|
801
|
+
onCellMouseUp: function onCellMouseUp(event, coords, TD, wt) {
|
802
|
+
var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);
|
803
|
+
_this2.activeWt = wt;
|
804
|
+
_this2.instance.runHooks('beforeOnCellMouseUp', event, visualCoords, TD);
|
805
|
+
|
806
|
+
// TODO: The second condition check is a workaround. Callback corresponding the method `updateSettings`
|
807
|
+
// disable plugin and enable it again. Disabling plugin closes the menu. Thus, calling the
|
808
|
+
// `updateSettings` in a body of any callback executed right after some context-menu action
|
809
|
+
// breaks the table (#7231).
|
810
|
+
if (isImmediatePropagationStopped(event) || _this2.instance.isDestroyed) {
|
811
|
+
return;
|
812
|
+
}
|
813
|
+
_this2.instance.runHooks('afterOnCellMouseUp', event, visualCoords, TD);
|
814
|
+
_this2.activeWt = _this2._wt;
|
815
|
+
},
|
816
|
+
onCellCornerMouseDown: function onCellCornerMouseDown(event) {
|
817
|
+
event.preventDefault();
|
818
|
+
_this2.instance.runHooks('afterOnCellCornerMouseDown', event);
|
819
|
+
},
|
820
|
+
onCellCornerDblClick: function onCellCornerDblClick(event) {
|
821
|
+
event.preventDefault();
|
822
|
+
_this2.instance.runHooks('afterOnCellCornerDblClick', event);
|
823
|
+
},
|
824
|
+
beforeDraw: function beforeDraw(force, skipRender) {
|
825
|
+
return _this2.beforeRender(force, skipRender);
|
826
|
+
},
|
827
|
+
onDraw: function onDraw(force) {
|
828
|
+
return _this2.afterRender(force);
|
829
|
+
},
|
830
|
+
onScrollVertically: function onScrollVertically() {
|
831
|
+
return _this2.instance.runHooks('afterScrollVertically');
|
832
|
+
},
|
833
|
+
onScrollHorizontally: function onScrollHorizontally() {
|
834
|
+
return _this2.instance.runHooks('afterScrollHorizontally');
|
835
|
+
},
|
836
|
+
onBeforeRemoveCellClassNames: function onBeforeRemoveCellClassNames() {
|
837
|
+
return _this2.instance.runHooks('beforeRemoveCellClassNames');
|
838
|
+
},
|
839
|
+
onBeforeHighlightingRowHeader: function onBeforeHighlightingRowHeader(renderableRow, headerLevel, highlightMeta) {
|
840
|
+
var rowMapper = _this2.instance.rowIndexMapper;
|
841
|
+
var visualRow = rowMapper.getVisualFromRenderableIndex(renderableRow);
|
842
|
+
var newVisualRow = _this2.instance.runHooks('beforeHighlightingRowHeader', visualRow, headerLevel, highlightMeta);
|
843
|
+
return rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(newVisualRow, 1));
|
844
|
+
},
|
845
|
+
onBeforeHighlightingColumnHeader: function onBeforeHighlightingColumnHeader(renderableColumn, headerLevel, highlightMeta) {
|
846
|
+
var columnMapper = _this2.instance.columnIndexMapper;
|
847
|
+
var visualColumn = columnMapper.getVisualFromRenderableIndex(renderableColumn);
|
848
|
+
var newVisualColumn = _this2.instance.runHooks('beforeHighlightingColumnHeader', visualColumn, headerLevel, highlightMeta);
|
849
|
+
return columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(newVisualColumn, 1));
|
850
|
+
},
|
851
|
+
onAfterDrawSelection: function onAfterDrawSelection(currentRow, currentColumn, layerLevel) {
|
852
|
+
var cornersOfSelection;
|
853
|
+
var _this2$translateFromR3 = _this2.translateFromRenderableToVisualIndex(currentRow, currentColumn),
|
854
|
+
_this2$translateFromR4 = _slicedToArray(_this2$translateFromR3, 2),
|
855
|
+
visualRowIndex = _this2$translateFromR4[0],
|
856
|
+
visualColumnIndex = _this2$translateFromR4[1];
|
857
|
+
var selectedRange = _this2.instance.selection.getSelectedRange();
|
858
|
+
var selectionRangeSize = selectedRange.size();
|
859
|
+
if (selectionRangeSize > 0) {
|
860
|
+
// Selection layers are stored from the "oldest" to the "newest". We should calculate the offset.
|
861
|
+
// Please look at the `SelectedRange` class and it's method for getting selection's layer for more information.
|
862
|
+
var selectionOffset = (layerLevel !== null && layerLevel !== void 0 ? layerLevel : 0) + 1 - selectionRangeSize;
|
863
|
+
var selectionForLayer = selectedRange.peekByIndex(selectionOffset);
|
864
|
+
cornersOfSelection = [selectionForLayer.from.row, selectionForLayer.from.col, selectionForLayer.to.row, selectionForLayer.to.col];
|
865
|
+
}
|
866
|
+
return _this2.instance.runHooks('afterDrawSelection', visualRowIndex, visualColumnIndex, cornersOfSelection, layerLevel);
|
867
|
+
},
|
868
|
+
onBeforeDrawBorders: function onBeforeDrawBorders(corners, borderClassName) {
|
869
|
+
var _corners = _slicedToArray(corners, 4),
|
870
|
+
startRenderableRow = _corners[0],
|
871
|
+
startRenderableColumn = _corners[1],
|
872
|
+
endRenderableRow = _corners[2],
|
873
|
+
endRenderableColumn = _corners[3];
|
874
|
+
var visualCorners = [_this2.instance.rowIndexMapper.getVisualFromRenderableIndex(startRenderableRow), _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(startRenderableColumn), _this2.instance.rowIndexMapper.getVisualFromRenderableIndex(endRenderableRow), _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(endRenderableColumn)];
|
875
|
+
return _this2.instance.runHooks('beforeDrawBorders', visualCorners, borderClassName);
|
876
|
+
},
|
877
|
+
onBeforeTouchScroll: function onBeforeTouchScroll() {
|
878
|
+
return _this2.instance.runHooks('beforeTouchScroll');
|
879
|
+
},
|
880
|
+
onAfterMomentumScroll: function onAfterMomentumScroll() {
|
881
|
+
return _this2.instance.runHooks('afterMomentumScroll');
|
882
|
+
},
|
883
|
+
onBeforeStretchingColumnWidth: function onBeforeStretchingColumnWidth(stretchedWidth, renderedColumnIndex) {
|
884
|
+
var visualColumnIndex = _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);
|
885
|
+
return _this2.instance.runHooks('beforeStretchingColumnWidth', stretchedWidth, visualColumnIndex);
|
886
|
+
},
|
887
|
+
onModifyRowHeaderWidth: function onModifyRowHeaderWidth(rowHeaderWidth) {
|
888
|
+
return _this2.instance.runHooks('modifyRowHeaderWidth', rowHeaderWidth);
|
889
|
+
},
|
890
|
+
onModifyGetCellCoords: function onModifyGetCellCoords(renderableRowIndex, renderableColumnIndex, topmost) {
|
891
|
+
var rowMapper = _this2.instance.rowIndexMapper;
|
892
|
+
var columnMapper = _this2.instance.columnIndexMapper;
|
893
|
+
|
894
|
+
// Callback handle also headers. We shouldn't translate them.
|
895
|
+
var visualColumnIndex = renderableColumnIndex >= 0 ? columnMapper.getVisualFromRenderableIndex(renderableColumnIndex) : renderableColumnIndex;
|
896
|
+
var visualRowIndex = renderableRowIndex >= 0 ? rowMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;
|
897
|
+
var visualIndexes = _this2.instance.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex, topmost);
|
898
|
+
if (Array.isArray(visualIndexes)) {
|
899
|
+
var _visualIndexes = _slicedToArray(visualIndexes, 4),
|
900
|
+
visualRowFrom = _visualIndexes[0],
|
901
|
+
visualColumnFrom = _visualIndexes[1],
|
902
|
+
visualRowTo = _visualIndexes[2],
|
903
|
+
visualColumnTo = _visualIndexes[3];
|
904
|
+
|
905
|
+
// Result of the hook is handled by the Walkontable (renderable indexes).
|
906
|
+
return [visualRowFrom >= 0 ? rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(visualRowFrom, 1)) : visualRowFrom, visualColumnFrom >= 0 ? columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(visualColumnFrom, 1)) : visualColumnFrom, visualRowTo >= 0 ? rowMapper.getRenderableFromVisualIndex(rowMapper.getNearestNotHiddenIndex(visualRowTo, -1)) : visualRowTo, visualColumnTo >= 0 ? columnMapper.getRenderableFromVisualIndex(columnMapper.getNearestNotHiddenIndex(visualColumnTo, -1)) : visualColumnTo];
|
907
|
+
}
|
908
|
+
},
|
909
|
+
viewportRowCalculatorOverride: function viewportRowCalculatorOverride(calc) {
|
910
|
+
var viewportOffset = _this2.settings.viewportRowRenderingOffset;
|
911
|
+
if (viewportOffset === 'auto' && _this2.settings.fixedRowsTop) {
|
912
|
+
viewportOffset = 10;
|
913
|
+
}
|
914
|
+
if (viewportOffset > 0 || viewportOffset === 'auto') {
|
915
|
+
var renderableRows = _this2.countRenderableRows();
|
916
|
+
var firstRenderedRow = calc.startRow;
|
917
|
+
var lastRenderedRow = calc.endRow;
|
918
|
+
if (typeof viewportOffset === 'number') {
|
919
|
+
calc.startRow = Math.max(firstRenderedRow - viewportOffset, 0);
|
920
|
+
calc.endRow = Math.min(lastRenderedRow + viewportOffset, renderableRows - 1);
|
921
|
+
} else if (viewportOffset === 'auto') {
|
922
|
+
var offset = Math.ceil(lastRenderedRow / renderableRows * 12);
|
923
|
+
calc.startRow = Math.max(firstRenderedRow - offset, 0);
|
924
|
+
calc.endRow = Math.min(lastRenderedRow + offset, renderableRows - 1);
|
925
|
+
}
|
926
|
+
}
|
927
|
+
_this2.instance.runHooks('afterViewportRowCalculatorOverride', calc);
|
928
|
+
},
|
929
|
+
viewportColumnCalculatorOverride: function viewportColumnCalculatorOverride(calc) {
|
930
|
+
var viewportOffset = _this2.settings.viewportColumnRenderingOffset;
|
931
|
+
if (viewportOffset === 'auto' && _this2.settings.fixedColumnsStart) {
|
932
|
+
viewportOffset = 10;
|
933
|
+
}
|
934
|
+
if (viewportOffset > 0 || viewportOffset === 'auto') {
|
935
|
+
var renderableColumns = _this2.countRenderableColumns();
|
936
|
+
var firstRenderedColumn = calc.startColumn;
|
937
|
+
var lastRenderedColumn = calc.endColumn;
|
938
|
+
if (typeof viewportOffset === 'number') {
|
939
|
+
calc.startColumn = Math.max(firstRenderedColumn - viewportOffset, 0);
|
940
|
+
calc.endColumn = Math.min(lastRenderedColumn + viewportOffset, renderableColumns - 1);
|
941
|
+
}
|
942
|
+
if (viewportOffset === 'auto') {
|
943
|
+
var offset = Math.ceil(lastRenderedColumn / renderableColumns * 6);
|
944
|
+
calc.startColumn = Math.max(firstRenderedColumn - offset, 0);
|
945
|
+
calc.endColumn = Math.min(lastRenderedColumn + offset, renderableColumns - 1);
|
946
|
+
}
|
947
|
+
}
|
948
|
+
_this2.instance.runHooks('afterViewportColumnCalculatorOverride', calc);
|
949
|
+
},
|
950
|
+
rowHeaderWidth: function rowHeaderWidth() {
|
951
|
+
return _this2.settings.rowHeaderWidth;
|
952
|
+
},
|
953
|
+
columnHeaderHeight: function columnHeaderHeight() {
|
954
|
+
var columnHeaderHeight = _this2.instance.runHooks('modifyColumnHeaderHeight');
|
955
|
+
return _this2.settings.columnHeaderHeight || columnHeaderHeight;
|
956
|
+
}
|
957
|
+
};
|
958
|
+
this.instance.runHooks('beforeInitWalkontable', walkontableConfig);
|
959
|
+
this._wt = new Walkontable(walkontableConfig);
|
960
|
+
this.activeWt = this._wt;
|
961
|
+
var spreader = this._wt.wtTable.spreader;
|
962
|
+
// We have to cache width and height after Walkontable initialization.
|
963
|
+
var _this$instance$rootEl = this.instance.rootElement.getBoundingClientRect(),
|
964
|
+
width = _this$instance$rootEl.width,
|
965
|
+
height = _this$instance$rootEl.height;
|
966
|
+
this.setLastSize(width, height);
|
967
|
+
this.eventManager.addEventListener(spreader, 'mousedown', function (event) {
|
968
|
+
// right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar
|
969
|
+
if (event.target === spreader && event.which === 3) {
|
970
|
+
event.stopPropagation();
|
971
|
+
}
|
972
|
+
});
|
973
|
+
this.eventManager.addEventListener(spreader, 'contextmenu', function (event) {
|
974
|
+
// right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar
|
975
|
+
if (event.target === spreader && event.which === 3) {
|
976
|
+
event.stopPropagation();
|
977
|
+
}
|
978
|
+
});
|
979
|
+
this.eventManager.addEventListener(this.instance.rootDocument.documentElement, 'click', function () {
|
980
|
+
if (_this2.settings.observeDOMVisibility) {
|
981
|
+
if (_this2._wt.drawInterrupted) {
|
982
|
+
_this2.instance.forceFullRender = true;
|
983
|
+
_this2.render();
|
984
|
+
}
|
985
|
+
}
|
986
|
+
});
|
987
|
+
}
|
988
|
+
|
989
|
+
/**
|
990
|
+
* Checks if it's possible to create text selection in element.
|
991
|
+
*
|
992
|
+
* @private
|
993
|
+
* @param {HTMLElement} el The element to check.
|
994
|
+
* @returns {boolean}
|
995
|
+
*/
|
996
|
+
}, {
|
997
|
+
key: "isTextSelectionAllowed",
|
998
|
+
value: function isTextSelectionAllowed(el) {
|
999
|
+
if (isInput(el)) {
|
1000
|
+
return true;
|
1001
|
+
}
|
1002
|
+
var isChildOfTableBody = isChildOf(el, this.instance.view._wt.wtTable.spreader);
|
1003
|
+
if (this.settings.fragmentSelection === true && isChildOfTableBody) {
|
1004
|
+
return true;
|
1005
|
+
}
|
1006
|
+
if (this.settings.fragmentSelection === 'cell' && this.isSelectedOnlyCell() && isChildOfTableBody) {
|
1007
|
+
return true;
|
1008
|
+
}
|
1009
|
+
if (!this.settings.fragmentSelection && this.isCellEdited() && this.isSelectedOnlyCell()) {
|
1010
|
+
return true;
|
1011
|
+
}
|
1012
|
+
return false;
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
/**
|
1016
|
+
* Checks if user's been called mousedown.
|
1017
|
+
*
|
1018
|
+
* @private
|
1019
|
+
* @returns {boolean}
|
1020
|
+
*/
|
1021
|
+
}, {
|
1022
|
+
key: "isMouseDown",
|
1023
|
+
value: function isMouseDown() {
|
1024
|
+
return privatePool.get(this).mouseDown;
|
1025
|
+
}
|
1026
|
+
|
1027
|
+
/**
|
1028
|
+
* Check if selected only one cell.
|
1029
|
+
*
|
1030
|
+
* @private
|
1031
|
+
* @returns {boolean}
|
1032
|
+
*/
|
1033
|
+
}, {
|
1034
|
+
key: "isSelectedOnlyCell",
|
1035
|
+
value: function isSelectedOnlyCell() {
|
1036
|
+
var _this$instance$getSel, _this$instance$getSel2;
|
1037
|
+
return (_this$instance$getSel = (_this$instance$getSel2 = this.instance.getSelectedRangeLast()) === null || _this$instance$getSel2 === void 0 ? void 0 : _this$instance$getSel2.isSingle()) !== null && _this$instance$getSel !== void 0 ? _this$instance$getSel : false;
|
1038
|
+
}
|
1039
|
+
|
1040
|
+
/**
|
1041
|
+
* Checks if active cell is editing.
|
1042
|
+
*
|
1043
|
+
* @private
|
1044
|
+
* @returns {boolean}
|
1045
|
+
*/
|
1046
|
+
}, {
|
1047
|
+
key: "isCellEdited",
|
1048
|
+
value: function isCellEdited() {
|
1049
|
+
var activeEditor = this.instance.getActiveEditor();
|
1050
|
+
return activeEditor && activeEditor.isOpened();
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
/**
|
1054
|
+
* `beforeDraw` callback.
|
1055
|
+
*
|
1056
|
+
* @private
|
1057
|
+
* @param {boolean} force If `true` rendering was triggered by a change of settings or data or `false` if
|
1058
|
+
* rendering was triggered by scrolling or moving selection.
|
1059
|
+
* @param {object} skipRender Object with `skipRender` property, if it is set to `true ` the next rendering
|
1060
|
+
* cycle will be skipped.
|
1061
|
+
*/
|
1062
|
+
}, {
|
1063
|
+
key: "beforeRender",
|
1064
|
+
value: function beforeRender(force, skipRender) {
|
1065
|
+
if (force) {
|
1066
|
+
// this.instance.forceFullRender = did Handsontable request full render?
|
1067
|
+
this.instance.runHooks('beforeViewRender', this.instance.forceFullRender, skipRender);
|
1068
|
+
}
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
/**
|
1072
|
+
* `afterRender` callback.
|
1073
|
+
*
|
1074
|
+
* @private
|
1075
|
+
* @param {boolean} force If `true` rendering was triggered by a change of settings or data or `false` if
|
1076
|
+
* rendering was triggered by scrolling or moving selection.
|
1077
|
+
*/
|
1078
|
+
}, {
|
1079
|
+
key: "afterRender",
|
1080
|
+
value: function afterRender(force) {
|
1081
|
+
if (force) {
|
1082
|
+
// this.instance.forceFullRender = did Handsontable request full render?
|
1083
|
+
this.instance.runHooks('afterViewRender', this.instance.forceFullRender);
|
1084
|
+
}
|
1085
|
+
}
|
1086
|
+
|
1087
|
+
/**
|
1088
|
+
* Append row header to a TH element.
|
1089
|
+
*
|
1090
|
+
* @private
|
1091
|
+
* @param {number} visualRowIndex The visual row index.
|
1092
|
+
* @param {HTMLTableHeaderCellElement} TH The table header element.
|
1093
|
+
*/
|
1094
|
+
}, {
|
1095
|
+
key: "appendRowHeader",
|
1096
|
+
value: function appendRowHeader(visualRowIndex, TH) {
|
1097
|
+
if (TH.firstChild) {
|
1098
|
+
var container = TH.firstChild;
|
1099
|
+
if (!hasClass(container, 'relative')) {
|
1100
|
+
empty(TH);
|
1101
|
+
this.appendRowHeader(visualRowIndex, TH);
|
1102
|
+
return;
|
1103
|
+
}
|
1104
|
+
this.updateCellHeader(container.querySelector('.rowHeader'), visualRowIndex, this.instance.getRowHeader);
|
1105
|
+
} else {
|
1106
|
+
var _this$instance4 = this.instance,
|
1107
|
+
rootDocument = _this$instance4.rootDocument,
|
1108
|
+
getRowHeader = _this$instance4.getRowHeader;
|
1109
|
+
var div = rootDocument.createElement('div');
|
1110
|
+
var span = rootDocument.createElement('span');
|
1111
|
+
div.className = 'relative';
|
1112
|
+
span.className = 'rowHeader';
|
1113
|
+
this.updateCellHeader(span, visualRowIndex, getRowHeader);
|
1114
|
+
div.appendChild(span);
|
1115
|
+
TH.appendChild(div);
|
1116
|
+
}
|
1117
|
+
this.instance.runHooks('afterGetRowHeader', visualRowIndex, TH);
|
1118
|
+
}
|
1119
|
+
|
1120
|
+
/**
|
1121
|
+
* Append column header to a TH element.
|
1122
|
+
*
|
1123
|
+
* @private
|
1124
|
+
* @param {number} visualColumnIndex Visual column index.
|
1125
|
+
* @param {HTMLTableCellElement} TH The table header element.
|
1126
|
+
* @param {Function} label The function that returns the header label.
|
1127
|
+
* @param {number} [headerLevel=0] The index of header level counting from the top (positive
|
1128
|
+
* values counting from 0 to N).
|
1129
|
+
*/
|
1130
|
+
}, {
|
1131
|
+
key: "appendColHeader",
|
1132
|
+
value: function appendColHeader(visualColumnIndex, TH) {
|
1133
|
+
var label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.instance.getColHeader;
|
1134
|
+
var headerLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
1135
|
+
if (TH.firstChild) {
|
1136
|
+
var container = TH.firstChild;
|
1137
|
+
if (hasClass(container, 'relative')) {
|
1138
|
+
this.updateCellHeader(container.querySelector('.colHeader'), visualColumnIndex, label);
|
1139
|
+
} else {
|
1140
|
+
empty(TH);
|
1141
|
+
this.appendColHeader(visualColumnIndex, TH, headerLevel);
|
1142
|
+
}
|
1143
|
+
} else {
|
1144
|
+
var rootDocument = this.instance.rootDocument;
|
1145
|
+
var div = rootDocument.createElement('div');
|
1146
|
+
var span = rootDocument.createElement('span');
|
1147
|
+
div.className = 'relative';
|
1148
|
+
span.className = 'colHeader';
|
1149
|
+
this.updateCellHeader(span, visualColumnIndex, label);
|
1150
|
+
div.appendChild(span);
|
1151
|
+
TH.appendChild(div);
|
1152
|
+
}
|
1153
|
+
this.instance.runHooks('afterGetColHeader', visualColumnIndex, TH, headerLevel);
|
1154
|
+
}
|
1155
|
+
|
1156
|
+
/**
|
1157
|
+
* Updates header cell content.
|
1158
|
+
*
|
1159
|
+
* @since 0.15.0-beta4
|
1160
|
+
* @param {HTMLElement} element Element to update.
|
1161
|
+
* @param {number} index Row index or column index.
|
1162
|
+
* @param {Function} content Function which should be returns content for this cell.
|
1163
|
+
*/
|
1164
|
+
}, {
|
1165
|
+
key: "updateCellHeader",
|
1166
|
+
value: function updateCellHeader(element, index, content) {
|
1167
|
+
var renderedIndex = index;
|
1168
|
+
var parentOverlay = this._wt.wtOverlays.getParentOverlay(element) || this._wt;
|
1169
|
+
|
1170
|
+
// prevent wrong calculations from SampleGenerator
|
1171
|
+
if (element.parentNode) {
|
1172
|
+
if (hasClass(element, 'colHeader')) {
|
1173
|
+
renderedIndex = parentOverlay.wtTable.columnFilter.sourceToRendered(index);
|
1174
|
+
} else if (hasClass(element, 'rowHeader')) {
|
1175
|
+
renderedIndex = parentOverlay.wtTable.rowFilter.sourceToRendered(index);
|
1176
|
+
}
|
1177
|
+
}
|
1178
|
+
if (renderedIndex > -1) {
|
1179
|
+
fastInnerHTML(element, content(index));
|
1180
|
+
} else {
|
1181
|
+
// workaround for https://github.com/handsontable/handsontable/issues/1946
|
1182
|
+
fastInnerText(element, String.fromCharCode(160));
|
1183
|
+
addClass(element, 'cornerHeader');
|
1184
|
+
}
|
1185
|
+
}
|
1186
|
+
|
1187
|
+
/**
|
1188
|
+
* Given a element's left (or right in RTL mode) position relative to the viewport, returns maximum
|
1189
|
+
* element width until the right (or left) edge of the viewport (before scrollbar).
|
1190
|
+
*
|
1191
|
+
* @private
|
1192
|
+
* @param {number} inlineOffset The left (or right in RTL mode) offset.
|
1193
|
+
* @returns {number}
|
1194
|
+
*/
|
1195
|
+
}, {
|
1196
|
+
key: "maximumVisibleElementWidth",
|
1197
|
+
value: function maximumVisibleElementWidth(inlineOffset) {
|
1198
|
+
var workspaceWidth = this._wt.wtViewport.getWorkspaceWidth();
|
1199
|
+
var maxWidth = workspaceWidth - inlineOffset;
|
1200
|
+
return maxWidth > 0 ? maxWidth : 0;
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
/**
|
1204
|
+
* Given a element's top position relative to the viewport, returns maximum element height until the bottom
|
1205
|
+
* edge of the viewport (before scrollbar).
|
1206
|
+
*
|
1207
|
+
* @private
|
1208
|
+
* @param {number} topOffset The top offset.
|
1209
|
+
* @returns {number}
|
1210
|
+
*/
|
1211
|
+
}, {
|
1212
|
+
key: "maximumVisibleElementHeight",
|
1213
|
+
value: function maximumVisibleElementHeight(topOffset) {
|
1214
|
+
var workspaceHeight = this._wt.wtViewport.getWorkspaceHeight();
|
1215
|
+
var maxHeight = workspaceHeight - topOffset;
|
1216
|
+
return maxHeight > 0 ? maxHeight : 0;
|
1217
|
+
}
|
1218
|
+
|
1219
|
+
/**
|
1220
|
+
* Sets new dimensions of the container.
|
1221
|
+
*
|
1222
|
+
* @param {number} width The table width.
|
1223
|
+
* @param {number} height The table height.
|
1224
|
+
*/
|
1225
|
+
}, {
|
1226
|
+
key: "setLastSize",
|
1227
|
+
value: function setLastSize(width, height) {
|
1228
|
+
var priv = privatePool.get(this);
|
1229
|
+
var _ref2 = [width, height];
|
1230
|
+
priv.lastWidth = _ref2[0];
|
1231
|
+
priv.lastHeight = _ref2[1];
|
1232
|
+
}
|
1233
|
+
|
1234
|
+
/**
|
1235
|
+
* Returns cached dimensions.
|
1236
|
+
*
|
1237
|
+
* @returns {object}
|
1238
|
+
*/
|
1239
|
+
}, {
|
1240
|
+
key: "getLastSize",
|
1241
|
+
value: function getLastSize() {
|
1242
|
+
var priv = privatePool.get(this);
|
1243
|
+
return {
|
1244
|
+
width: priv.lastWidth,
|
1245
|
+
height: priv.lastHeight
|
1246
|
+
};
|
1247
|
+
}
|
1248
|
+
|
1249
|
+
/**
|
1250
|
+
* Returns the first fully visible row in the table viewport.
|
1251
|
+
*
|
1252
|
+
* @returns {number}
|
1253
|
+
*/
|
1254
|
+
}, {
|
1255
|
+
key: "getFirstFullyVisibleRow",
|
1256
|
+
value: function getFirstFullyVisibleRow() {
|
1257
|
+
return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleRow());
|
1258
|
+
}
|
1259
|
+
|
1260
|
+
/**
|
1261
|
+
* Returns the last fully visible row in the table viewport.
|
1262
|
+
*
|
1263
|
+
* @returns {number}
|
1264
|
+
*/
|
1265
|
+
}, {
|
1266
|
+
key: "getLastFullyVisibleRow",
|
1267
|
+
value: function getLastFullyVisibleRow() {
|
1268
|
+
return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleRow());
|
1269
|
+
}
|
1270
|
+
|
1271
|
+
/**
|
1272
|
+
* Returns the first fully visible column in the table viewport.
|
1273
|
+
*
|
1274
|
+
* @returns {number}
|
1275
|
+
*/
|
1276
|
+
}, {
|
1277
|
+
key: "getFirstFullyVisibleColumn",
|
1278
|
+
value: function getFirstFullyVisibleColumn() {
|
1279
|
+
return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleColumn());
|
1280
|
+
}
|
1281
|
+
|
1282
|
+
/**
|
1283
|
+
* Returns the last fully visible column in the table viewport.
|
1284
|
+
*
|
1285
|
+
* @returns {number}
|
1286
|
+
*/
|
1287
|
+
}, {
|
1288
|
+
key: "getLastFullyVisibleColumn",
|
1289
|
+
value: function getLastFullyVisibleColumn() {
|
1290
|
+
return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleColumn());
|
1291
|
+
}
|
1292
|
+
|
1293
|
+
/**
|
1294
|
+
* Destroys internal WalkOnTable's instance. Detaches all of the bonded listeners.
|
1295
|
+
*
|
1296
|
+
* @private
|
1297
|
+
*/
|
1298
|
+
}, {
|
1299
|
+
key: "destroy",
|
1300
|
+
value: function destroy() {
|
1301
|
+
this._wt.destroy();
|
1302
|
+
this.eventManager.destroy();
|
1303
|
+
}
|
1304
|
+
}]);
|
1305
|
+
return TableView;
|
1306
|
+
}();
|
1307
|
+
export default TableView;
|