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
@@ -0,0 +1,4605 @@
|
|
1
|
+
import "core-js/modules/es.symbol.js";
|
2
|
+
import "core-js/modules/es.symbol.description.js";
|
3
|
+
import "core-js/modules/es.object.to-string.js";
|
4
|
+
import "core-js/modules/es.symbol.iterator.js";
|
5
|
+
import "core-js/modules/es.array.iterator.js";
|
6
|
+
import "core-js/modules/es.string.iterator.js";
|
7
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
8
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
9
|
+
import { isEmpty } from "../../helpers/mixed.mjs";
|
10
|
+
import { isObjectEqual } from "../../helpers/object.mjs";
|
11
|
+
/* eslint-disable jsdoc/require-description-complete-sentence */
|
12
|
+
/**
|
13
|
+
* @alias Options
|
14
|
+
* @class Options
|
15
|
+
* @description
|
16
|
+
*
|
17
|
+
* [Configuration options](@/guides/getting-started/configuration-options.md) let you heavily customize your Handsontable instance. For example, you can:
|
18
|
+
*
|
19
|
+
* - Enable and disable built-in features
|
20
|
+
* - Enable and configure additional [plugins](@/guides/tools-and-building/custom-plugins.md)
|
21
|
+
* - Personalize Handsontable's look
|
22
|
+
* - Adjust Handsontable's behavior
|
23
|
+
* - Implement your own custom features
|
24
|
+
*
|
25
|
+
* ::: only-for javascript
|
26
|
+
*
|
27
|
+
* To apply [configuration options](@/guides/getting-started/configuration-options.md), pass them as
|
28
|
+
* a second argument of the [Handsontable constructor](@/guides/getting-started/installation.md#initialize-handsontable),
|
29
|
+
* using the [object literal notation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer):
|
30
|
+
*
|
31
|
+
* Read more on the [Configuration options](@/guides/getting-started/configuration-options.md) page.
|
32
|
+
*
|
33
|
+
* ```js
|
34
|
+
* const container = document.getElementById('example');
|
35
|
+
*
|
36
|
+
* const hot = new Handsontable(container, {
|
37
|
+
* // configuration options, in the object literal notation
|
38
|
+
* licenseKey: 'non-commercial-and-evaluation',
|
39
|
+
* data: [
|
40
|
+
* ['A1', 'B1', 'C1', 'D1', 'E1'],
|
41
|
+
* ['A2', 'B2', 'C2', 'D2', 'E2'],
|
42
|
+
* ['A3', 'B3', 'C3', 'D3', 'E3'],
|
43
|
+
* ['A4', 'B4', 'C4', 'D4', 'E4'],
|
44
|
+
* ['A5', 'B5', 'C5', 'D5', 'E5'],
|
45
|
+
* ],
|
46
|
+
* width: 400,
|
47
|
+
* height: 300,
|
48
|
+
* colHeaders: true,
|
49
|
+
* rowHeaders: true,
|
50
|
+
* customBorders: true,
|
51
|
+
* dropdownMenu: true,
|
52
|
+
* multiColumnSorting: true,
|
53
|
+
* filters: true,
|
54
|
+
* manualRowMove: true,
|
55
|
+
* });
|
56
|
+
* ```
|
57
|
+
* :::
|
58
|
+
*
|
59
|
+
* ::: only-for react
|
60
|
+
*
|
61
|
+
* To apply configuration options, pass them as individual props
|
62
|
+
* of the [`HotTable`](@/guides/getting-started/installation.md##hottable-component)
|
63
|
+
* or [`HotColumn`](@/guides/columns/react-hot-column.md) components.
|
64
|
+
*
|
65
|
+
* Read more on the [Configuration options](@/guides/getting-started/configuration-options.md) page.
|
66
|
+
*
|
67
|
+
* ```jsx
|
68
|
+
* <HotTable
|
69
|
+
* // configuration options, in the object literal notation
|
70
|
+
* licenseKey='non-commercial-and-evaluation'
|
71
|
+
* data={[
|
72
|
+
* ['A1', 'B1', 'C1', 'D1', 'E1'],
|
73
|
+
* ['A2', 'B2', 'C2', 'D2', 'E2'],
|
74
|
+
* ['A3', 'B3', 'C3', 'D3', 'E3'],
|
75
|
+
* ['A4', 'B4', 'C4', 'D4', 'E4'],
|
76
|
+
* ['A5', 'B5', 'C5', 'D5', 'E5'],
|
77
|
+
* ]}
|
78
|
+
* width={400}
|
79
|
+
* height={300}
|
80
|
+
* colHeaders={true}
|
81
|
+
* rowHeaders={true}
|
82
|
+
* customBorders={true}
|
83
|
+
* dropdownMenu={true}
|
84
|
+
* multiColumnSorting={true}
|
85
|
+
* filters={true}
|
86
|
+
* manualRowMove={true}
|
87
|
+
* />
|
88
|
+
* ```
|
89
|
+
* :::
|
90
|
+
*
|
91
|
+
* Depending on your needs, you can apply [configuration options](@/api/options.md) to different elements of your grid:
|
92
|
+
* - [The entire grid](@/guides/getting-started/configuration-options.md#setting-grid-options)
|
93
|
+
* - [Individual columns](@/guides/getting-started/configuration-options.md#setting-column-options)
|
94
|
+
* - [Individual rows](@/guides/getting-started/configuration-options.md#setting-row-options)
|
95
|
+
* - [Individual cells](@/guides/getting-started/configuration-options.md#setting-cell-options)
|
96
|
+
* - [Individual grid elements, based on any logic you implement](@/guides/getting-started/configuration-options.md#implementing-custom-logic)
|
97
|
+
*
|
98
|
+
* Read more:
|
99
|
+
* - [Configuration options](@/guides/getting-started/configuration-options.md)
|
100
|
+
*/
|
101
|
+
export default (function () {
|
102
|
+
return {
|
103
|
+
/* eslint-disable jsdoc/require-description-complete-sentence */
|
104
|
+
|
105
|
+
/**
|
106
|
+
* Information on which of the meta properties were added automatically.
|
107
|
+
* For example: setting the `renderer` property directly won't extend the `_automaticallyAssignedMetaProps`
|
108
|
+
* entry, but setting a `type` will modify it to:
|
109
|
+
* ```
|
110
|
+
* _automaticallyAssignedMetaProps: {
|
111
|
+
* renderer: true,
|
112
|
+
* editor: true,
|
113
|
+
* validator: true
|
114
|
+
* }
|
115
|
+
* ```
|
116
|
+
*
|
117
|
+
* @private
|
118
|
+
* @type {object}
|
119
|
+
* @default {}
|
120
|
+
*/
|
121
|
+
_automaticallyAssignedMetaProps: {},
|
122
|
+
/**
|
123
|
+
* The `activeHeaderClassName` option lets you add a CSS class name
|
124
|
+
* to every currently-active, currently-selected header (when a whole column or row is selected).
|
125
|
+
*
|
126
|
+
* Read more:
|
127
|
+
* - [`currentRowClassName`](#currentRowClassName)
|
128
|
+
* - [`currentColClassName`](#currentColClassName)
|
129
|
+
* - [`currentHeaderClassName`](#currentHeaderClassName)
|
130
|
+
* - [`invalidCellClassName`](#invalidCellClassName)
|
131
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
132
|
+
* - [`commentedCellClassName`](#commentedCellClassName)
|
133
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
134
|
+
* - [`TableClassName`](#TableClassName)
|
135
|
+
* - [`className`](#className)
|
136
|
+
*
|
137
|
+
* @memberof Options#
|
138
|
+
* @type {string}
|
139
|
+
* @since 0.38.2
|
140
|
+
* @default 'ht__active_highlight'
|
141
|
+
* @category Core
|
142
|
+
*
|
143
|
+
* @example
|
144
|
+
* ```js
|
145
|
+
* // add an `ht__active_highlight` CSS class name
|
146
|
+
* // to every currently-active, currently-selected header
|
147
|
+
* activeHeaderClassName: 'ht__active_highlight',
|
148
|
+
* ```
|
149
|
+
*/
|
150
|
+
activeHeaderClassName: 'ht__active_highlight',
|
151
|
+
/**
|
152
|
+
* The `allowEmpty` option determines whether Handsontable accepts the following values:
|
153
|
+
* - `null`
|
154
|
+
* - `undefined`
|
155
|
+
* - `''`
|
156
|
+
*
|
157
|
+
* You can set the `allowEmpty` option to one of the following:
|
158
|
+
*
|
159
|
+
* | Setting | Description |
|
160
|
+
* | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
161
|
+
* | `true` (default) | - Accept `null`, `undefined` and `''` values<br>- Mark cells that contain `null`, `undefined` or `''` values as `valid` |
|
162
|
+
* | `false` | - Don't accept `null`, `undefined` and `''` values<br>- Mark cells that contain `null`, `undefined` or `''` values with as `invalid` |
|
163
|
+
*
|
164
|
+
* ::: tip
|
165
|
+
* To use the [`allowEmpty`](#allowempty) option, you need to set the [`validator`](#validator) option (or the [`type`](#type) option).
|
166
|
+
* :::
|
167
|
+
*
|
168
|
+
* @memberof Options#
|
169
|
+
* @type {boolean}
|
170
|
+
* @default true
|
171
|
+
* @category Core
|
172
|
+
*
|
173
|
+
* @example
|
174
|
+
* ```js
|
175
|
+
* // allow empty values in each cell of the entire grid
|
176
|
+
* allowEmpty: true,
|
177
|
+
*
|
178
|
+
* // or
|
179
|
+
* columns: [
|
180
|
+
* {
|
181
|
+
* type: 'date',
|
182
|
+
* dateFormat: 'DD/MM/YYYY',
|
183
|
+
* // allow empty values in each cell of the 'date' column
|
184
|
+
* allowEmpty: true
|
185
|
+
* }
|
186
|
+
* ],
|
187
|
+
* ```
|
188
|
+
*/
|
189
|
+
allowEmpty: true,
|
190
|
+
/**
|
191
|
+
* The `allowHtml` option configures whether [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md)
|
192
|
+
* and [`dropdown`](@/guides/cell-types/dropdown-cell-type.md) cells' [`source`](#source) data
|
193
|
+
* is treated as HTML.
|
194
|
+
*
|
195
|
+
* You can set the `allowHtml` option to one of the following:
|
196
|
+
*
|
197
|
+
* | Setting | Description |
|
198
|
+
* | ----------------- | --------------------------------------------------- |
|
199
|
+
* | `false` (default) | The [`source`](#source) data is not treated as HTML |
|
200
|
+
* | `true` | The [`source`](#source) data is treated as HTML |
|
201
|
+
*
|
202
|
+
* __Warning:__ Setting the `allowHtml` option to `true` can cause serious XSS vulnerabilities.
|
203
|
+
*
|
204
|
+
* Read more:
|
205
|
+
* - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)
|
206
|
+
* - [Dropdown cell type](@/guides/cell-types/dropdown-cell-type.md)
|
207
|
+
* - [`source`](#source)
|
208
|
+
*
|
209
|
+
* @memberof Options#
|
210
|
+
* @type {boolean}
|
211
|
+
* @default false
|
212
|
+
* @category Core
|
213
|
+
*
|
214
|
+
* @example
|
215
|
+
* ```js
|
216
|
+
* columns: [
|
217
|
+
* {
|
218
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
219
|
+
* type: 'autocomplete',
|
220
|
+
* // set options available in every `autocomplete` cell of this column
|
221
|
+
* source: ['<strong>foo</strong>', '<strong>bar</strong>']
|
222
|
+
* // use HTML in the `source` list
|
223
|
+
* allowHtml: true,
|
224
|
+
* },
|
225
|
+
* ],
|
226
|
+
* ```
|
227
|
+
*/
|
228
|
+
allowHtml: false,
|
229
|
+
/**
|
230
|
+
* If set to `true`, the `allowInsertColumn` option adds the following menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md):
|
231
|
+
* - **Insert column left**
|
232
|
+
* - **Insert column right**
|
233
|
+
*
|
234
|
+
* @memberof Options#
|
235
|
+
* @type {boolean}
|
236
|
+
* @default true
|
237
|
+
* @category Core
|
238
|
+
*
|
239
|
+
* @example
|
240
|
+
* ```js
|
241
|
+
* // hide the 'Insert column left' and 'Insert column right' menu items from the context menu
|
242
|
+
* allowInsertColumn: false,
|
243
|
+
* ```
|
244
|
+
*/
|
245
|
+
allowInsertColumn: true,
|
246
|
+
/**
|
247
|
+
* If set to `true`, the `allowInsertRow` option adds the following menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md):
|
248
|
+
* - **Insert row above**
|
249
|
+
* - **Insert row below**
|
250
|
+
*
|
251
|
+
* @memberof Options#
|
252
|
+
* @type {boolean}
|
253
|
+
* @default true
|
254
|
+
* @category Core
|
255
|
+
*
|
256
|
+
* @example
|
257
|
+
* ```js
|
258
|
+
* // hide the 'Insert row above' and 'Insert row below' menu items from the context menu
|
259
|
+
* allowInsertRow: false,
|
260
|
+
* ```
|
261
|
+
*/
|
262
|
+
allowInsertRow: true,
|
263
|
+
/**
|
264
|
+
* The `allowInvalid` option determines whether Handsontable accepts values
|
265
|
+
* that were marked as `invalid` by the [cell validator](@/guides/cell-functions/cell-validator.md).
|
266
|
+
*
|
267
|
+
* You can set the `allowInvalid` option to one of the following:
|
268
|
+
*
|
269
|
+
* | Setting | Description |
|
270
|
+
* | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
271
|
+
* | `true` (default) | - Accept `invalid` values<br>- Allow the user to close the [cell editor](@/guides/cell-functions/cell-editor.md) with `invalid` values<br>- Save `invalid` values into the data source |
|
272
|
+
* | `false` | - Don't accept `invalid` values<br>- Don't allow the user to close the [cell editor](@/guides/cell-functions/cell-editor.md) with `invalid` values<br>- Don't save `invalid` values into the data source |
|
273
|
+
*
|
274
|
+
* Setting the `allowInvalid` option to `false` can be useful when used with the [Autocomplete strict mode](@/guides/cell-types/autocomplete-cell-type.md#autocomplete-strict-mode).
|
275
|
+
*
|
276
|
+
* Read more:
|
277
|
+
* - [Cell validator](@/guides/cell-functions/cell-validator.md)
|
278
|
+
* - [Cell editor](@/guides/cell-functions/cell-editor.md)
|
279
|
+
* - [Autocomplete strict mode](@/guides/cell-types/autocomplete-cell-type.md#autocomplete-strict-mode)
|
280
|
+
*
|
281
|
+
* @memberof Options#
|
282
|
+
* @type {boolean}
|
283
|
+
* @default true
|
284
|
+
* @category Core
|
285
|
+
*
|
286
|
+
* @example
|
287
|
+
* ```js
|
288
|
+
* // don't accept `invalid` values
|
289
|
+
* // don't allow the user to close the cell editor
|
290
|
+
* // don't save `invalid` values into the data source
|
291
|
+
* allowInvalid: false,
|
292
|
+
* ```
|
293
|
+
*/
|
294
|
+
allowInvalid: true,
|
295
|
+
/**
|
296
|
+
* If set to `true`, the `allowRemoveColumn` option adds the following menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md):
|
297
|
+
* - **Remove column**
|
298
|
+
*
|
299
|
+
* Read more:
|
300
|
+
* - [Context menu](@/guides/accessories-and-menus/context-menu.md)
|
301
|
+
*
|
302
|
+
* @memberof Options#
|
303
|
+
* @type {boolean}
|
304
|
+
* @default true
|
305
|
+
* @category Core
|
306
|
+
*
|
307
|
+
* @example
|
308
|
+
* ```js
|
309
|
+
* // hide the 'Remove column' menu item from the context menu
|
310
|
+
* allowRemoveColumn: false,
|
311
|
+
* ```
|
312
|
+
*/
|
313
|
+
allowRemoveColumn: true,
|
314
|
+
/**
|
315
|
+
* If set to `true`, the `allowRemoveRow` option adds the following menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md):
|
316
|
+
* - **Remove row**
|
317
|
+
*
|
318
|
+
* Read more:
|
319
|
+
* - [Context menu](@/guides/accessories-and-menus/context-menu.md)
|
320
|
+
*
|
321
|
+
* @memberof Options#
|
322
|
+
* @type {boolean}
|
323
|
+
* @default true
|
324
|
+
* @category Core
|
325
|
+
*
|
326
|
+
* @example
|
327
|
+
* ```js
|
328
|
+
* // hide the 'Remove row' menu item from the context menu
|
329
|
+
* allowRemoveRow: false,
|
330
|
+
* ```
|
331
|
+
*/
|
332
|
+
allowRemoveRow: true,
|
333
|
+
/**
|
334
|
+
* The `autoColumnSize` option configures the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin.
|
335
|
+
*
|
336
|
+
* You can set the `autoColumnSize` option to one of the following:
|
337
|
+
*
|
338
|
+
* | Setting | Description |
|
339
|
+
* | --------- | -------------------------------------------------------------------------------------------- |
|
340
|
+
* | `false` | Disable the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin |
|
341
|
+
* | `true` | Enable the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin with the default configuration |
|
342
|
+
* | An object | Enable the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin and modify the plugin options |
|
343
|
+
*
|
344
|
+
* If you set the `autoColumnSize` option to an object, you can set the following [`AutoColumnSize`](@/api/autoColumnSize.md) plugin options:
|
345
|
+
*
|
346
|
+
* | Property | Possible values | Description |
|
347
|
+
* | ----------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
348
|
+
* | `syncLimit` | A number \| A percentage string | The number/percentage of columns to keep in sync<br>(default: `50`) |
|
349
|
+
* | `useHeaders` | `true` \| `false` | When calculating column widths:<br>`true`: use column headers<br>`false`: don't use column headers |
|
350
|
+
* | `samplingRatio` | A number | The number of samples of the same length to be used in column width calculations |
|
351
|
+
* | `allowSampleDuplicates` | `true` \| `false` | When calculating column widths:<br>`true`: Allow duplicate samples<br>`false`: Don't allow duplicate samples |
|
352
|
+
*
|
353
|
+
* By default, the `autoColumnSize` option is set to `undefined`,
|
354
|
+
* but the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin acts as enabled.
|
355
|
+
* To disable the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin completely,
|
356
|
+
* set the `autoColumnSize` option to `false`.
|
357
|
+
*
|
358
|
+
* Using the [`colWidths`](#colWidths) option forcibly disables the [`AutoColumnSize`](@/api/autoColumnSize.md) plugin.
|
359
|
+
*
|
360
|
+
* Read more:
|
361
|
+
* - [Plugins: `AutoColumnSize`](@/api/autoColumnSize.md)
|
362
|
+
*
|
363
|
+
* @memberof Options#
|
364
|
+
* @type {object|boolean}
|
365
|
+
* @default undefined
|
366
|
+
* @category AutoColumnSize
|
367
|
+
*
|
368
|
+
* @example
|
369
|
+
* ```js
|
370
|
+
* autoColumnSize: {
|
371
|
+
* // keep 40% of columns in sync (the rest of columns: async)
|
372
|
+
* syncLimit: '40%',
|
373
|
+
* // when calculating column widths, use column headers
|
374
|
+
* useHeaders: true,
|
375
|
+
* // when calculating column widths, use 10 samples of the same length
|
376
|
+
* samplingRatio: 10,
|
377
|
+
* // when calculating column widths, allow duplicate samples
|
378
|
+
* allowSampleDuplicates: true
|
379
|
+
* },
|
380
|
+
* ```
|
381
|
+
*/
|
382
|
+
autoColumnSize: void 0,
|
383
|
+
/**
|
384
|
+
* The `autoRowSize` option configures the [`AutoRowSize`](@/api/autoRowSize.md) plugin.
|
385
|
+
*
|
386
|
+
* You can set the `autoRowSize` option to one of the following:
|
387
|
+
*
|
388
|
+
* | Setting | Description |
|
389
|
+
* | --------- | -------------------------------------------------------------------------------------- |
|
390
|
+
* | `false` | Disable the [`AutoRowSize`](@/api/autoRowSize.md) plugin |
|
391
|
+
* | `true` | Enable the [`AutoRowSize`](@/api/autoRowSize.md) plugin with the default configuration |
|
392
|
+
* | An object | Enable the [`AutoRowSize`](@/api/autoRowSize.md) plugin and modify the plugin options |
|
393
|
+
*
|
394
|
+
* To give Handsontable's [scrollbar](https://handsontable.com/docs/8.0.0/demo-scrolling.html)
|
395
|
+
* a proper size, set the `autoRowSize` option to `true`.
|
396
|
+
*
|
397
|
+
* If you set the `autoRowSize` option to an object, you can set the following [`AutoRowSize`](@/api/autoRowSize.md) plugin options:
|
398
|
+
*
|
399
|
+
* | Property | Possible values | Description |
|
400
|
+
* | ----------- | ------------------------------- | ----------------------------------------------------------------- |
|
401
|
+
* | `syncLimit` | A number \| A percentage string | The number/percentage of rows to keep in sync<br>(default: `500`) |
|
402
|
+
*
|
403
|
+
* Using the [`rowHeights`](#rowHeights) option forcibly disables the [`AutoRowSize`](@/api/autoRowSize.md) plugin.
|
404
|
+
*
|
405
|
+
* Read more:
|
406
|
+
* - [Plugins: `AutoRowSize`](@/api/autoRowSize.md)
|
407
|
+
*
|
408
|
+
* @memberof Options#
|
409
|
+
* @type {object|boolean}
|
410
|
+
* @default undefined
|
411
|
+
* @category AutoRowSize
|
412
|
+
*
|
413
|
+
* @example
|
414
|
+
* ```js
|
415
|
+
* autoRowSize: {
|
416
|
+
* // keep 40% of rows in sync (the rest of rows: async)
|
417
|
+
* syncLimit: '40%'
|
418
|
+
* },
|
419
|
+
* ```
|
420
|
+
*/
|
421
|
+
autoRowSize: void 0,
|
422
|
+
/**
|
423
|
+
* The `autoWrapCol` option determines what happens to current cell selection when you navigate to the grid's top or bottom edge.
|
424
|
+
*
|
425
|
+
* You can set the `autoWrapCol` option to one of the following:
|
426
|
+
*
|
427
|
+
* | Setting | Description |
|
428
|
+
* | ----------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
429
|
+
* | `true` | On reaching the grid's top or bottom edge<br>- Jump to the opposite edge<br>- Select a cell in the previous/next column |
|
430
|
+
* | `false` (default) | On reaching the grid's top or bottom edge, stop |
|
431
|
+
*
|
432
|
+
* @memberof Options#
|
433
|
+
* @type {boolean}
|
434
|
+
* @default false
|
435
|
+
* @category Core
|
436
|
+
*
|
437
|
+
* @example
|
438
|
+
* ```js
|
439
|
+
* // on reaching the grid's top or bottom edge, jump to the opposite edge
|
440
|
+
* autoWrapCol: true,
|
441
|
+
* ```
|
442
|
+
*/
|
443
|
+
autoWrapCol: false,
|
444
|
+
/**
|
445
|
+
* The `autoWrapRow` option determines what happens to current cell selection when you navigate to the grid's left or right edge.
|
446
|
+
*
|
447
|
+
* You can set the `autoWrapRow` option to one of the following:
|
448
|
+
*
|
449
|
+
* | Setting | Description |
|
450
|
+
* | ----------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
451
|
+
* | `true` | On reaching the grid's left or right edge:<br>- Jump to the grid's opposite edge<br>- Select a cell in the previous/next row |
|
452
|
+
* | `false` (default) | On reaching the grid's left or right edge, stop |
|
453
|
+
*
|
454
|
+
* @memberof Options#
|
455
|
+
* @type {boolean}
|
456
|
+
* @default false
|
457
|
+
* @category Core
|
458
|
+
*
|
459
|
+
* @example
|
460
|
+
* ```js
|
461
|
+
* // on reaching the grid's left or right edge, jump to the opposite edge
|
462
|
+
* autoWrapRow: true,
|
463
|
+
* ```
|
464
|
+
*/
|
465
|
+
autoWrapRow: false,
|
466
|
+
/**
|
467
|
+
* @description
|
468
|
+
* The `bindRowsWithHeaders` option configures the [`BindRowsWithHeaders`](@/api/bindRowsWithHeaders.md) plugin.
|
469
|
+
*
|
470
|
+
* You can set the `bindRowsWithHeaders` option to one of the following:
|
471
|
+
*
|
472
|
+
* | Setting | Description |
|
473
|
+
* | ------- | ---------------------------------------------------------------------------- |
|
474
|
+
* | `false` | Disable the the [`BindRowsWithHeaders`](@/api/bindRowsWithHeaders.md) plugin |
|
475
|
+
* | `true` | Enable the the [`BindRowsWithHeaders`](@/api/bindRowsWithHeaders.md) plugin |
|
476
|
+
*
|
477
|
+
* Read more:
|
478
|
+
* - [Plugins: `BindRowsWithHeaders`](@/api/bindRowsWithHeaders.md)
|
479
|
+
*
|
480
|
+
* @memberof Options#
|
481
|
+
* @type {boolean|string}
|
482
|
+
* @default undefined
|
483
|
+
* @category BindRowsWithHeaders
|
484
|
+
*
|
485
|
+
* @example
|
486
|
+
* ```js
|
487
|
+
* // enable the `BindRowsWithHeaders` plugin
|
488
|
+
* bindRowsWithHeaders: true
|
489
|
+
* ```
|
490
|
+
*/
|
491
|
+
bindRowsWithHeaders: void 0,
|
492
|
+
/**
|
493
|
+
* The `cell` option lets you apply [configuration options](@/guides/getting-started/configuration-options.md) to individual cells.
|
494
|
+
*
|
495
|
+
* The `cell` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#setting-grid-options),
|
496
|
+
* and the [`columns`](#columns) options.
|
497
|
+
*
|
498
|
+
* Read more:
|
499
|
+
* - [Configuration options: Setting cell options](@/guides/getting-started/configuration-options.md#setting-cell-options)
|
500
|
+
* - [`columns`](#columns)
|
501
|
+
*
|
502
|
+
* @memberof Options#
|
503
|
+
* @type {Array[]}
|
504
|
+
* @default []
|
505
|
+
* @category Core
|
506
|
+
*
|
507
|
+
* @example
|
508
|
+
* ```js
|
509
|
+
* // set the `cell` option to an array of objects
|
510
|
+
* cell: [
|
511
|
+
* // make the cell with coordinates (0, 0) read-only
|
512
|
+
* {
|
513
|
+
* row: 0,
|
514
|
+
* col: 0,
|
515
|
+
* readOnly: true
|
516
|
+
* }
|
517
|
+
* ],
|
518
|
+
* ```
|
519
|
+
*/
|
520
|
+
cell: [],
|
521
|
+
/**
|
522
|
+
* @description
|
523
|
+
* The `cells` option lets you apply any other [configuration options](@/guides/getting-started/configuration-options.md) to
|
524
|
+
* individual grid elements (columns, rows, cells), based on any logic you implement.
|
525
|
+
*
|
526
|
+
* The `cells` option overwrites all other options (including options set by [`columns`](#columns) and [`cell`](#cell)).
|
527
|
+
* It takes the following parameters:
|
528
|
+
*
|
529
|
+
* | Parameter | Required | Type | Description |
|
530
|
+
* | --------- | -------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
531
|
+
* | `row` | Yes | Number | A physical row index |
|
532
|
+
* | `column` | Yes | Number | A physical column index |
|
533
|
+
* | `prop` | No | String \| Number | If [`data`](#data) is set to an [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays), `prop` is the same number as `column`.<br><br>If [`data`](#data) is set to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects), `prop` is a property name for the column's data object. |
|
534
|
+
*
|
535
|
+
* Read more:
|
536
|
+
* - [Configuration options: Implementing custom logic](@/guides/getting-started/configuration-options.md#implementing-custom-logic)
|
537
|
+
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#setting-row-options)
|
538
|
+
* - [`columns`](#columns)
|
539
|
+
* - [`cell`](#cell)
|
540
|
+
*
|
541
|
+
* @memberof Options#
|
542
|
+
* @type {Function}
|
543
|
+
* @default undefined
|
544
|
+
* @category Core
|
545
|
+
*
|
546
|
+
* @example
|
547
|
+
* ```js
|
548
|
+
* // set the `cells` option to your custom function
|
549
|
+
* cells(row, column, prop) {
|
550
|
+
* const cellProperties = { readOnly: false };
|
551
|
+
* const visualRowIndex = this.instance.toVisualRow(row);
|
552
|
+
* const visualColIndex = this.instance.toVisualColumn(column);
|
553
|
+
*
|
554
|
+
* if (visualRowIndex === 0 && visualColIndex === 0) {
|
555
|
+
* cellProperties.readOnly = true;
|
556
|
+
* }
|
557
|
+
*
|
558
|
+
* return cellProperties;
|
559
|
+
* },
|
560
|
+
* ```
|
561
|
+
*/
|
562
|
+
cells: void 0,
|
563
|
+
/**
|
564
|
+
* The `checkedTemplate` option lets you configure what value
|
565
|
+
* a checked [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell has.
|
566
|
+
*
|
567
|
+
* You can set the `checkedTemplate` option to one of the following:
|
568
|
+
*
|
569
|
+
* | Setting | Description |
|
570
|
+
* | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
571
|
+
* | `true` (default) | If a [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell is checked,<br>the [`getDataAtCell`](@/api/core.md#getDataAtCell) method for this cell returns `true` |
|
572
|
+
* | A string | If a [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell is checked,<br>the [`getDataAtCell`](@/api/core.md#getDataAtCell) method for this cell returns a string of your choice |
|
573
|
+
*
|
574
|
+
* Read more:
|
575
|
+
* - [Checkbox cell type: Checkbox template](@/guides/cell-types/checkbox-cell-type.md#checkbox-template)
|
576
|
+
* - [`getDataAtCell()`](@/api/core.md#getDataAtCell)
|
577
|
+
* - [`uncheckedTemplate`](#uncheckedTemplate)
|
578
|
+
*
|
579
|
+
* @memberof Options#
|
580
|
+
* @type {boolean|string|number}
|
581
|
+
* @default true
|
582
|
+
* @category Core
|
583
|
+
*
|
584
|
+
* @example
|
585
|
+
* ```js
|
586
|
+
* columns: [
|
587
|
+
* {
|
588
|
+
* // set the `type` of each cell in this column to `checkbox`
|
589
|
+
* // when checked, the cell's value is `true`
|
590
|
+
* // when unchecked, the cell's value is `false`
|
591
|
+
* type: 'checkbox',
|
592
|
+
* },
|
593
|
+
* {
|
594
|
+
* // set the `type` of each cell in this column to `checkbox`
|
595
|
+
* type: 'checkbox',
|
596
|
+
* // when checked, the cell's value is `'Yes'`
|
597
|
+
* checkedTemplate: 'Yes',
|
598
|
+
* // when unchecked, the cell's value is `'No'`
|
599
|
+
* uncheckedTemplate: 'No'
|
600
|
+
* }
|
601
|
+
* ],
|
602
|
+
* ```
|
603
|
+
*/
|
604
|
+
checkedTemplate: void 0,
|
605
|
+
/**
|
606
|
+
* The `className` option lets you add CSS class names to every currently-selected element.
|
607
|
+
*
|
608
|
+
* You can set the `className` option to one of the following:
|
609
|
+
*
|
610
|
+
* | Setting | Description |
|
611
|
+
* | ------------------- | ---------------------------------------------------------------- |
|
612
|
+
* | A string | Add a single CSS class name to every currently-selected element |
|
613
|
+
* | An array of strings | Add multiple CSS class names to every currently-selected element |
|
614
|
+
*
|
615
|
+
* ::: tip
|
616
|
+
* Don't change the `className` metadata of the [column summary](@/guides/columns/column-summary.md) row.
|
617
|
+
* To style the summary row, use the class name assigned automatically by the [`ColumnSummary`](@/api/columnSummary.md) plugin: `columnSummaryResult`.
|
618
|
+
* :::
|
619
|
+
*
|
620
|
+
* To apply different CSS class names on different levels, use Handsontable's [cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration).
|
621
|
+
*
|
622
|
+
* Read more:
|
623
|
+
* - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)
|
624
|
+
* - [`currentRowClassName`](#currentRowClassName)
|
625
|
+
* - [`currentColClassName`](#currentColClassName)
|
626
|
+
* - [`currentHeaderClassName`](#currentHeaderClassName)
|
627
|
+
* - [`activeHeaderClassName`](#activeHeaderClassName)
|
628
|
+
* - [`invalidCellClassName`](#invalidCellClassName)
|
629
|
+
* - [`placeholderCellClassName`](#placeholderCellClassName)
|
630
|
+
* - [`commentedCellClassName`](#commentedCellClassName)
|
631
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
632
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
633
|
+
* - [`TableClassName`](#TableClassName)
|
634
|
+
*
|
635
|
+
* @memberof Options#
|
636
|
+
* @type {string|string[]}
|
637
|
+
* @default undefined
|
638
|
+
* @category Core
|
639
|
+
*
|
640
|
+
* @example
|
641
|
+
* ```js
|
642
|
+
* // add a `your-class-name` CSS class name
|
643
|
+
* // to every currently-selected element
|
644
|
+
* className: 'your-class-name',
|
645
|
+
*
|
646
|
+
* // add `first-class-name` and `second-class-name` CSS class names
|
647
|
+
* // to every currently-selected element
|
648
|
+
* className: ['first-class-name', 'second-class-name'],
|
649
|
+
* ```
|
650
|
+
*/
|
651
|
+
className: void 0,
|
652
|
+
/**
|
653
|
+
* The `colHeaders` option configures your grid's column headers.
|
654
|
+
*
|
655
|
+
* You can set the `colHeaders` option to one of the following:
|
656
|
+
*
|
657
|
+
* | Setting | Description |
|
658
|
+
* | -------- | -------------------------------------------------------------------- |
|
659
|
+
* | `true` | Enable the default column headers ('A', 'B', 'C', ...) |
|
660
|
+
* | `false` | Disable column headers |
|
661
|
+
* | An array | Define your own column headers (e.g. `['One', 'Two', 'Three', ...]`) |
|
662
|
+
* | A function | Define your own column headers, using a function |
|
663
|
+
*
|
664
|
+
* Read more:
|
665
|
+
* - [Column header](@/guides/columns/column-header.md)
|
666
|
+
*
|
667
|
+
* @memberof Options#
|
668
|
+
* @type {boolean|string[]|Function}
|
669
|
+
* @default null
|
670
|
+
* @category Core
|
671
|
+
*
|
672
|
+
* @example
|
673
|
+
* ```js
|
674
|
+
* // enable the default column headers
|
675
|
+
* colHeaders: true,
|
676
|
+
*
|
677
|
+
* // set your own column headers
|
678
|
+
* colHeaders: ['One', 'Two', 'Three'],
|
679
|
+
*
|
680
|
+
* // set your own column headers, using a function
|
681
|
+
* colHeaders: function(visualColumnIndex) {
|
682
|
+
* return `${visualColumnIndex} + : AB`;
|
683
|
+
* },
|
684
|
+
* ```
|
685
|
+
*/
|
686
|
+
colHeaders: null,
|
687
|
+
/**
|
688
|
+
* @description
|
689
|
+
* The `collapsibleColumns` option configures the [`CollapsibleColumns`](@/api/collapsibleColumns.md) plugin.
|
690
|
+
*
|
691
|
+
* You can set the `collapsibleColumns` option to one of the following:
|
692
|
+
*
|
693
|
+
* | Setting | Description |
|
694
|
+
* | -------------------- | ------------------------------------------------------------------------------------------------- |
|
695
|
+
* | `false` | Disable the [`CollapsibleColumns`](@/api/collapsibleColumns.md) plugin |
|
696
|
+
* | `true` | Enable the [`CollapsibleColumns`](@/api/collapsibleColumns.md) plugin |
|
697
|
+
* | An array of objects | Enable the [`CollapsibleColumns`](@/api/collapsibleColumns.md) plugin for selected column headers |
|
698
|
+
*
|
699
|
+
* Read more:
|
700
|
+
* - [Plugins: `CollapsibleColumns`](@/api/collapsibleColumns.md)
|
701
|
+
*
|
702
|
+
* @memberof Options#
|
703
|
+
* @type {boolean|object[]}
|
704
|
+
* @default undefined
|
705
|
+
* @category CollapsibleColumns
|
706
|
+
*
|
707
|
+
* @example
|
708
|
+
* ```js
|
709
|
+
* // enable column collapsing for all headers
|
710
|
+
* collapsibleColumns: true,
|
711
|
+
*
|
712
|
+
* // enable column collapsing for selected headers
|
713
|
+
* collapsibleColumns: [
|
714
|
+
* {row: -4, col: 1, collapsible: true},
|
715
|
+
* {row: -3, col: 5, collapsible: true}
|
716
|
+
* ],
|
717
|
+
* ```
|
718
|
+
*/
|
719
|
+
collapsibleColumns: void 0,
|
720
|
+
/**
|
721
|
+
* @description
|
722
|
+
* The `columnHeaderHeight` option configures the height of column headers.
|
723
|
+
*
|
724
|
+
* You can set the `columnHeaderHeight` option to one of the following:
|
725
|
+
*
|
726
|
+
* | Setting | Description |
|
727
|
+
* | -------- | --------------------------------------------------- |
|
728
|
+
* | A number | Set the same height for every column header |
|
729
|
+
* | An array | Set different heights for individual column headers |
|
730
|
+
*
|
731
|
+
* @memberof Options#
|
732
|
+
* @type {number|number[]}
|
733
|
+
* @default undefined
|
734
|
+
* @category Core
|
735
|
+
*
|
736
|
+
* @example
|
737
|
+
* ```js
|
738
|
+
* // set the same height for every column header
|
739
|
+
* columnHeaderHeight: 25,
|
740
|
+
*
|
741
|
+
* // set different heights for individual column headers
|
742
|
+
* columnHeaderHeight: [25, 30, 55],
|
743
|
+
* ```
|
744
|
+
*/
|
745
|
+
columnHeaderHeight: void 0,
|
746
|
+
/**
|
747
|
+
* @description
|
748
|
+
* The `columns` option lets you apply any other [configuration options](@/guides/getting-started/configuration-options.md) to individual columns (or ranges of columns).
|
749
|
+
*
|
750
|
+
* You can set the `columns` option to one of the following:
|
751
|
+
* - An array of objects (each object represents one column)
|
752
|
+
* - A function that returns an array of objects
|
753
|
+
*
|
754
|
+
* The `columns` option overwrites the [top-level grid options](@/guides/getting-started/configuration-options.md#setting-grid-options).
|
755
|
+
*
|
756
|
+
* When you use `columns`, the [`startCols`](#startCols), [`minCols`](#minCols), and [`maxCols`](#maxCols) options are ignored.
|
757
|
+
*
|
758
|
+
* Read more:
|
759
|
+
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#setting-column-options)
|
760
|
+
* - [`startCols`](#startCols)
|
761
|
+
* - [`minCols`](#minCols)
|
762
|
+
* - [`maxCols`](#maxCols)
|
763
|
+
* - [`data`](#data)
|
764
|
+
*
|
765
|
+
* @memberof Options#
|
766
|
+
* @type {object[]|Function}
|
767
|
+
* @default undefined
|
768
|
+
* @category Core
|
769
|
+
*
|
770
|
+
* @example
|
771
|
+
* ```js
|
772
|
+
* // set the `columns` option to an array of objects
|
773
|
+
* // each object represents one column
|
774
|
+
* columns: [
|
775
|
+
* {
|
776
|
+
* // column options for the first (by physical index) column
|
777
|
+
* type: 'numeric',
|
778
|
+
* numericFormat: {
|
779
|
+
* pattern: '0,0.00 $'
|
780
|
+
* }
|
781
|
+
* },
|
782
|
+
* {
|
783
|
+
* // column options for the second (by physical index) column
|
784
|
+
* type: 'text',
|
785
|
+
* readOnly: true
|
786
|
+
* }
|
787
|
+
* ],
|
788
|
+
*
|
789
|
+
* // or set the `columns` option to a function, based on physical indexes
|
790
|
+
* columns(index) {
|
791
|
+
* return {
|
792
|
+
* type: index > 0 ? 'numeric' : 'text',
|
793
|
+
* readOnly: index < 1
|
794
|
+
* }
|
795
|
+
* }
|
796
|
+
* ```
|
797
|
+
*/
|
798
|
+
columns: void 0,
|
799
|
+
/**
|
800
|
+
* @description
|
801
|
+
* The `columnSorting` option configures the [`ColumnSorting`](@/api/columnSorting.md) plugin.
|
802
|
+
*
|
803
|
+
* You can set the `columnSorting` option to one of the following:
|
804
|
+
*
|
805
|
+
* | Setting | Description |
|
806
|
+
* | ---------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
807
|
+
* | `true` | Enable the [`ColumnSorting`](@/api/columnSorting.md) plugin with the default configuration |
|
808
|
+
* | `false` | Disable the [`ColumnSorting`](@/api/columnSorting.md) plugin |
|
809
|
+
* | An object | - Enable the [`ColumnSorting`](@/api/columnSorting.md) plugin<br>- Modify the [`ColumnSorting`](@/api/columnSorting.md) plugin options |
|
810
|
+
*
|
811
|
+
* If you set the `columnSorting` option to an object,
|
812
|
+
* you can set the following [`ColumnSorting`](@/api/columnSorting.md) plugin options:
|
813
|
+
*
|
814
|
+
* | Option | Possible settings |
|
815
|
+
* | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
816
|
+
* | `indicator` | `true`: Display an arrow icon in the column header, to indicate a sortable column<br>`false`: Don't display the arrow icon in the column header |
|
817
|
+
* | `headerAction` | `true`: Enable clicking on the column header to sort the column<br>`false`: Disable clicking on the column header to sort the column |
|
818
|
+
* | `sortEmptyCells` | `true`: Sort empty cells as well<br>`false`: Place empty cells at the end |
|
819
|
+
* | `compareFunctionFactory` | A [custom compare function](@/guides/rows/row-sorting.md#custom-compare-functions) |
|
820
|
+
*
|
821
|
+
* If you set the `columnSorting` option to an object,
|
822
|
+
* you can also sort individual columns at Handsontable's initialization.
|
823
|
+
* In the `columnSorting` object, add an object named `initialConfig`,
|
824
|
+
* with the following properties:
|
825
|
+
*
|
826
|
+
* | Option | Possible settings | Description |
|
827
|
+
* | ----------- | ------------------- | ---------------------------------------------------------------- |
|
828
|
+
* | `column` | A number | The index of the column that you want to sort at initialization |
|
829
|
+
* | `sortOrder` | `'asc'` \| `'desc'` | The sorting order:<br>`'asc'`: ascending<br>`'desc'`: descending |
|
830
|
+
*
|
831
|
+
* Read more:
|
832
|
+
* - [Row sorting](@/guides/rows/row-sorting.md)
|
833
|
+
* - [Row sorting: Custom compare functions](@/guides/rows/row-sorting.md#custom-compare-functions)
|
834
|
+
* - [`multiColumnSorting`](#multiColumnSorting)
|
835
|
+
*
|
836
|
+
* @memberof Options#
|
837
|
+
* @type {boolean|object}
|
838
|
+
* @default undefined
|
839
|
+
* @category ColumnSorting
|
840
|
+
*
|
841
|
+
* @example
|
842
|
+
* ```js
|
843
|
+
* // enable the `ColumnSorting` plugin
|
844
|
+
* columnSorting: true
|
845
|
+
*
|
846
|
+
* // enable the `ColumnSorting` plugin with custom configuration
|
847
|
+
* columnSorting: {
|
848
|
+
* // sort empty cells as well
|
849
|
+
* sortEmptyCells: true,
|
850
|
+
* // display an arrow icon in the column header
|
851
|
+
* indicator: true,
|
852
|
+
* // disable clicking on the column header to sort the column
|
853
|
+
* headerAction: false,
|
854
|
+
* // add a custom compare function
|
855
|
+
* compareFunctionFactory(sortOrder, columnMeta) {
|
856
|
+
* return function(value, nextValue) {
|
857
|
+
* // some value comparisons which will return -1, 0 or 1...
|
858
|
+
* }
|
859
|
+
* }
|
860
|
+
* }
|
861
|
+
*
|
862
|
+
* // enable the `ColumnSorting` plugin
|
863
|
+
* columnSorting: {
|
864
|
+
* // at initialization, sort column 1 in ascending order
|
865
|
+
* initialConfig: {
|
866
|
+
* column: 1,
|
867
|
+
* sortOrder: 'asc'
|
868
|
+
* },
|
869
|
+
* // at initialization, sort column 2 in descending order
|
870
|
+
* initialConfig: {
|
871
|
+
* column: 2,
|
872
|
+
* sortOrder: 'desc'
|
873
|
+
* }
|
874
|
+
* }
|
875
|
+
* ```
|
876
|
+
*/
|
877
|
+
columnSorting: void 0,
|
878
|
+
/**
|
879
|
+
* @description
|
880
|
+
* The `columnSummary` option configures the [`ColumnSummary`](@/api/columnSummary.md) plugin.
|
881
|
+
*
|
882
|
+
* You can set the `columnSummary` option to an array of objects.
|
883
|
+
* Each object configures a single column summary, using the following properties:
|
884
|
+
*
|
885
|
+
* | Property | Possible values | Description |
|
886
|
+
* | ------------------------ | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
887
|
+
* | `sourceColumn` | A number | [Column to summarize](@/guides/columns/column-summary.md#step-2-select-cells-that-you-want-to-summarize) |
|
888
|
+
* | `ranges` | An array | [Ranges of rows to summarize](@/guides/columns/column-summary.md#step-2-select-cells-that-you-want-to-summarize) |
|
889
|
+
* | `type` | `'sum'` \| `'min'` \| `'max'` \| `'count'` \| `'average'` \| `'custom'` | [Summary function](@/guides/columns/column-summary.md#step-3-calculate-your-summary) |
|
890
|
+
* | `destinationRow` | A number | [Destination cell's row coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
891
|
+
* | `destinationColumn` | A number | [Destination cell's column coordinate](@/guides/columns/column-summary.md#step-4-provide-the-destination-cell-s-coordinates) |
|
892
|
+
* | `forceNumeric` | `true` \| `false` | [Treat non-numerics as numerics](@/guides/columns/column-summary.md#forcing-numeric-values) |
|
893
|
+
* | `reversedRowCoords` | `true` \| `false` | [Reverse row coordinates](@/guides/columns/column-summary.md#step-5-make-room-for-the-destination-cell) |
|
894
|
+
* | `suppressDataTypeErrors` | `true` \| `false` | [Suppress data type errors](@/guides/columns/column-summary.md#throwing-data-type-errors) |
|
895
|
+
* | `readOnly` | `true` \| `false` | Make summary cell read-only |
|
896
|
+
* | `roundFloat` | `true` \| `false` | [Round summary result](@/guides/columns/column-summary.md#rounding-a-column-summary-result) |
|
897
|
+
* | `customFunction` | A function | [Custom summary function](@/guides/columns/column-summary.md#implementing-a-custom-summary-function) |
|
898
|
+
*
|
899
|
+
* Read more:
|
900
|
+
* - [Column summary](@/guides/columns/column-summary.md)
|
901
|
+
* - [Plugins: `ColumnSummary`](@/api/columnSummary.md)
|
902
|
+
*
|
903
|
+
* @memberof Options#
|
904
|
+
* @type {object[]|Function}
|
905
|
+
* @default undefined
|
906
|
+
* @category ColumnSummary
|
907
|
+
*
|
908
|
+
* @example
|
909
|
+
* ```js
|
910
|
+
* columnSummary: [
|
911
|
+
* {
|
912
|
+
* sourceColumn: 0,
|
913
|
+
* ranges: [
|
914
|
+
* [0, 2], [4], [6, 8]
|
915
|
+
* ],
|
916
|
+
* type: 'custom',
|
917
|
+
* destinationRow: 4,
|
918
|
+
* destinationColumn: 1,
|
919
|
+
* forceNumeric: true,
|
920
|
+
* reversedRowCoords: true,
|
921
|
+
* suppressDataTypeErrors: false,
|
922
|
+
* readOnly: true,
|
923
|
+
* roundFloat: false,
|
924
|
+
* customFunction(endpoint) {
|
925
|
+
* return 100;
|
926
|
+
* }
|
927
|
+
* }
|
928
|
+
* ],
|
929
|
+
* ```
|
930
|
+
*/
|
931
|
+
columnSummary: void 0,
|
932
|
+
/**
|
933
|
+
* The `colWidths` option sets columns' widths, in pixels.
|
934
|
+
*
|
935
|
+
* In the rendering process, the default column width is 50px. To change it,
|
936
|
+
* set the `colWidths` option to one of the following:
|
937
|
+
*
|
938
|
+
* | Setting | Description | Example |
|
939
|
+
* | ----------- | ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
940
|
+
* | A number | Set the same width for every column | `colWidths: 100` |
|
941
|
+
* | A string | Set the same width for every column | `colWidths: '100px'` |
|
942
|
+
* | An array | Set widths separately for each column | `colWidths: [100, 120, undefined]` |
|
943
|
+
* | A function | Set column widths dynamically,<br>on each render | `colWidths(visualColumnIndex) { return visualColumnIndex * 10; }` |
|
944
|
+
* | `undefined` | Used by the [modifyColWidth](@/api/hooks.md#modifyColWidth) hook,<br>to detect column width changes. | `colWidths: undefined` |
|
945
|
+
*
|
946
|
+
* Setting the `colWidths` option disables the {@link AutoColumnSize} plugin.
|
947
|
+
*
|
948
|
+
* Read more:
|
949
|
+
* - [Column width](@/guides/columns/column-width.md)
|
950
|
+
* - [Hooks: `modifyColWidth`](@/api/hooks.md#modifyColWidth)
|
951
|
+
* - [`autoColumnSize`](#autoColumnSize)
|
952
|
+
*
|
953
|
+
* @memberof Options#
|
954
|
+
* @type {number|number[]|string|string[]|Array<undefined>|Function}
|
955
|
+
* @default undefined
|
956
|
+
* @category Core
|
957
|
+
*
|
958
|
+
* @example
|
959
|
+
* ```js
|
960
|
+
* // set every column's width to 100px
|
961
|
+
* colWidths: 100,
|
962
|
+
*
|
963
|
+
* // set every column's width to 100px
|
964
|
+
* colWidths: '100px',
|
965
|
+
*
|
966
|
+
* // set the first (by visual index) column's width to 100
|
967
|
+
* // set the second (by visual index) column's width to 120
|
968
|
+
* // set the third (by visual index) column's width to `undefined`
|
969
|
+
* // set any other column's width to the default 50px
|
970
|
+
* colWidths: [100, 120, undefined],
|
971
|
+
*
|
972
|
+
* // set each column's width individually, using a function
|
973
|
+
* colWidths(visualColumnIndex) {
|
974
|
+
* return visualColumnIndex * 10;
|
975
|
+
* },
|
976
|
+
* ```
|
977
|
+
*/
|
978
|
+
colWidths: void 0,
|
979
|
+
/**
|
980
|
+
* The `commentedCellClassName` option lets you add a CSS class name to cells
|
981
|
+
* that have comments.
|
982
|
+
*
|
983
|
+
* Read more:
|
984
|
+
* - [Comments](@/guides/cell-features/comments.md)
|
985
|
+
* - [`comments`](#comments)
|
986
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
987
|
+
* - [`currentRowClassName`](#currentRowClassName)
|
988
|
+
* - [`currentHeaderClassName`](#currentHeaderClassName)
|
989
|
+
* - [`activeHeaderClassName`](#activeHeaderClassName)
|
990
|
+
* - [`invalidCellClassName`](#invalidCellClassName)
|
991
|
+
* - [`placeholderCellClassName`](#placeholderCellClassName)
|
992
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
993
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
994
|
+
* - [`TableClassName`](#TableClassName)
|
995
|
+
* - [`className`](#className)
|
996
|
+
*
|
997
|
+
* @memberof Options#
|
998
|
+
* @type {string}
|
999
|
+
* @default 'htCommentCell'
|
1000
|
+
* @category Core
|
1001
|
+
*
|
1002
|
+
* @example
|
1003
|
+
* ```js
|
1004
|
+
* // add a `has-comment` CSS class name
|
1005
|
+
* // to each cell that has a comment
|
1006
|
+
* commentedCellClassName: 'has-comment',
|
1007
|
+
* ```
|
1008
|
+
*/
|
1009
|
+
commentedCellClassName: 'htCommentCell',
|
1010
|
+
/**
|
1011
|
+
* @description
|
1012
|
+
* The `comments` option configures the [`Comments`](@/api/comments.md) plugin.
|
1013
|
+
*
|
1014
|
+
* You can set the `comments` option to one of the following:
|
1015
|
+
*
|
1016
|
+
* | Setting | Description |
|
1017
|
+
* | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
1018
|
+
* | `true` | - Enable the [`Comments`](@/api/comments.md) plugin<br>- Add comment menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md) |
|
1019
|
+
* | `false` | Disable the [`Comments`](@/api/comments.md) plugin |
|
1020
|
+
* | An object | - Enable the [`Comments`](@/api/comments.md) plugin<br>- Add comment menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md)<br>- Configure comment settings |
|
1021
|
+
*
|
1022
|
+
* If you set the `comments` option to an object, you can configure the following comment options:
|
1023
|
+
*
|
1024
|
+
* | Option | Possible settings | Description |
|
1025
|
+
* | -------------- | --------------------------- | --------------------------------------------------- |
|
1026
|
+
* | `displayDelay` | A number (default: `250`) | Display comments after a delay (in milliseconds) |
|
1027
|
+
* | `readOnly` | `true` \| `false` (default) | `true`: Make comments read-only |
|
1028
|
+
* | `style` | An object | Set comment boxes' `width` and `height` (in pixels) |
|
1029
|
+
*
|
1030
|
+
* Read more:
|
1031
|
+
* - [Comments](@/guides/cell-features/comments.md)
|
1032
|
+
* - [Context menu](@/guides/accessories-and-menus/context-menu.md)
|
1033
|
+
* - [`width`](#width)
|
1034
|
+
* - [`height`](#height)
|
1035
|
+
* - [`readOnly`](#readOnly)
|
1036
|
+
* - [`commentedCellClassName`](#commentedCellClassName)
|
1037
|
+
*
|
1038
|
+
* @memberof Options#
|
1039
|
+
* @type {boolean|object[]}
|
1040
|
+
* @default false
|
1041
|
+
* @category Comments
|
1042
|
+
*
|
1043
|
+
* @example
|
1044
|
+
* ```js
|
1045
|
+
* // enable the `Comments` plugin
|
1046
|
+
* comments: true,
|
1047
|
+
*
|
1048
|
+
* // enable the `Comments` plugin
|
1049
|
+
* // and configure its settings
|
1050
|
+
* comments: {
|
1051
|
+
* // display all comments with a 1-second delay
|
1052
|
+
* displayDelay: 1000,
|
1053
|
+
* // make all comments read-only
|
1054
|
+
* readOnly: true,
|
1055
|
+
* // set the default size of all comment boxes
|
1056
|
+
* style: {
|
1057
|
+
* width: 300,
|
1058
|
+
* height: 100
|
1059
|
+
* }
|
1060
|
+
* }
|
1061
|
+
* ```
|
1062
|
+
*/
|
1063
|
+
comments: false,
|
1064
|
+
/**
|
1065
|
+
* @description
|
1066
|
+
* The `contextMenu` option configures the [`ContextMenu`](@/api/contextMenu.md) plugin.
|
1067
|
+
*
|
1068
|
+
* You can set the `contextMenu` option to one of the following:
|
1069
|
+
*
|
1070
|
+
* | Setting | Description |
|
1071
|
+
* | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
1072
|
+
* | `false` | Disable the [`ContextMenu`](@/api/contextMenu.md) plugin |
|
1073
|
+
* | `true` | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin<br>- Use the [default context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-default-options) |
|
1074
|
+
* | An array | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin<br>- Modify [individual context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-specific-options) |
|
1075
|
+
* | An object | - Enable the [`ContextMenu`](@/api/contextMenu.md) plugin<br>- Apply a [custom context menu configuration](@/guides/accessories-and-menus/context-menu.md#context-menu-with-fully-custom-configuration) |
|
1076
|
+
*
|
1077
|
+
* Read more:
|
1078
|
+
* - [Context menu](@/guides/accessories-and-menus/context-menu.md)
|
1079
|
+
* - [Context menu: Context menu with default options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-default-options)
|
1080
|
+
* - [Context menu: Context menu with specific options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-specific-options)
|
1081
|
+
* - [Context menu: Context menu with fully custom configuration options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-fully-custom-configuration)
|
1082
|
+
* - [Plugins: `ContextMenu`](@/api/contextMenu.md)
|
1083
|
+
*
|
1084
|
+
* @memberof Options#
|
1085
|
+
* @type {boolean|string[]|object}
|
1086
|
+
* @default undefined
|
1087
|
+
* @category ContextMenu
|
1088
|
+
*
|
1089
|
+
* @example
|
1090
|
+
* ```js
|
1091
|
+
* // enable the `ContextMenu` plugin
|
1092
|
+
* // use the default context menu options
|
1093
|
+
* contextMenu: true,
|
1094
|
+
*
|
1095
|
+
* // enable the `ContextMenu` plugin
|
1096
|
+
* // and modify individual context menu options
|
1097
|
+
* contextMenu: ['row_above', 'row_below', '---------', 'undo', 'redo'],
|
1098
|
+
*
|
1099
|
+
* // enable the `ContextMenu` plugin
|
1100
|
+
* // and apply a custom context menu configuration
|
1101
|
+
* contextMenu: {
|
1102
|
+
* items: {
|
1103
|
+
* 'option1': {
|
1104
|
+
* name: 'option1'
|
1105
|
+
* },
|
1106
|
+
* 'option2': {
|
1107
|
+
* name: 'option2',
|
1108
|
+
* submenu: {
|
1109
|
+
* items: [
|
1110
|
+
* {
|
1111
|
+
* key: 'option2:suboption1',
|
1112
|
+
* name: 'option2:suboption1',
|
1113
|
+
* callback: function(key, options) {
|
1114
|
+
* ...
|
1115
|
+
* }
|
1116
|
+
* },
|
1117
|
+
* ...
|
1118
|
+
* ]
|
1119
|
+
* }
|
1120
|
+
* }
|
1121
|
+
* }
|
1122
|
+
* },
|
1123
|
+
* ```
|
1124
|
+
*/
|
1125
|
+
contextMenu: void 0,
|
1126
|
+
/**
|
1127
|
+
* @description
|
1128
|
+
* The `copyable` option determines whether a cell's value can be copied to the clipboard or not.
|
1129
|
+
*
|
1130
|
+
* You can set the `copyable` option to one of the following:
|
1131
|
+
*
|
1132
|
+
* | Setting | Description |
|
1133
|
+
* | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
1134
|
+
* | `true` (default) | - On pressing <kbd>**Ctrl**</kbd>/<kbd>**Cmd**</kbd> + <kbd>**C**</kbd>, add the cell's value to the clipboard |
|
1135
|
+
* | `false`<br>(default for the [`password`](@/guides/cell-types/password-cell-type.md) [cell type](#type)) | - On pressing <kbd>**Ctrl**</kbd>/<kbd>**Cmd**</kbd> + <kbd>**C**</kbd>, add an empty string (`""`) to the clipboard |
|
1136
|
+
*
|
1137
|
+
* Read more:
|
1138
|
+
* - [Clipboard](@/guides/cell-features/clipboard.md)
|
1139
|
+
* - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)
|
1140
|
+
* - [Password cell type](@/guides/cell-types/password-cell-type.md)
|
1141
|
+
*
|
1142
|
+
* @memberof Options#
|
1143
|
+
* @type {boolean}
|
1144
|
+
* @default true
|
1145
|
+
* @category Core
|
1146
|
+
*
|
1147
|
+
* @example
|
1148
|
+
* ```js
|
1149
|
+
* // enable copying for each cell of the entire grid
|
1150
|
+
* copyable: true,
|
1151
|
+
*
|
1152
|
+
* // enable copying for individual columns
|
1153
|
+
* columns: [
|
1154
|
+
* {
|
1155
|
+
* // enable copying for each cell of this column
|
1156
|
+
* copyable: true
|
1157
|
+
* },
|
1158
|
+
* {
|
1159
|
+
* // disable copying for each cell of this column
|
1160
|
+
* copyable: false
|
1161
|
+
* }
|
1162
|
+
* ]
|
1163
|
+
*
|
1164
|
+
* // enable copying for specific cells
|
1165
|
+
* cells: [
|
1166
|
+
* {
|
1167
|
+
* cell: 0,
|
1168
|
+
* row: 0,
|
1169
|
+
* // disable copying for cell (0, 0)
|
1170
|
+
* copyable: false,
|
1171
|
+
* }
|
1172
|
+
* ],
|
1173
|
+
* ```
|
1174
|
+
*/
|
1175
|
+
copyable: true,
|
1176
|
+
/**
|
1177
|
+
* The `copyPaste` option configures the [`CopyPaste`](@/api/copyPaste.md) plugin.
|
1178
|
+
*
|
1179
|
+
* You can set the `copyPaste` option to one of the following:
|
1180
|
+
*
|
1181
|
+
* | Setting | Description |
|
1182
|
+
* | ----------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
1183
|
+
* | `true` (default) | Enable the [`CopyPaste`](@/api/copyPaste.md) plugin with the default configuration |
|
1184
|
+
* | `false` | Disable the [`CopyPaste`](@/api/copyPaste.md) plugin |
|
1185
|
+
* | An object | - Enable the [`CopyPaste`](@/api/copyPaste.md) plugin<br>- Modify the [`CopyPaste`](@/api/copyPaste.md) plugin options |
|
1186
|
+
*
|
1187
|
+
* If you set the `copyPaste` option to an object, you can set the following `CopyPaste` plugin options:
|
1188
|
+
*
|
1189
|
+
* | Option | Possible settings | Description |
|
1190
|
+
* | -------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
1191
|
+
* | `columnsLimit` | A number (default: `Infinity`) | A maximum number of columns that can be copied |
|
1192
|
+
* | `rowsLimit` | A number (default: `Infinity`) | A maximum number of columns that can be copied |
|
1193
|
+
* | `pasteMode` | `'overwrite'` \| `'shift_down'` \| `'shift_right'` | When pasting:<br>`'overwrite'`: overwrite currently-selected cells<br>`'shift_down'`: move currently-selected cells down<br>`'shift_right'`: move currently-selected cells to the right |
|
1194
|
+
* | `uiContainer` | An HTML element | A UI container for the secondary focusable element |
|
1195
|
+
*
|
1196
|
+
* Read more:
|
1197
|
+
* - [Plugins: `CopyPaste`](@/api/copyPaste.md)
|
1198
|
+
*
|
1199
|
+
* @memberof Options#
|
1200
|
+
* @type {object|boolean}
|
1201
|
+
* @default true
|
1202
|
+
* @category CopyPaste
|
1203
|
+
*
|
1204
|
+
* @example
|
1205
|
+
* ```js
|
1206
|
+
* // disable the `CopyPaste` plugin
|
1207
|
+
* copyPaste: false,
|
1208
|
+
*
|
1209
|
+
* // enable the `CopyPaste` plugin
|
1210
|
+
* // and modify the `CopyPaste` plugin options
|
1211
|
+
* copyPaste: {
|
1212
|
+
* // set the maximum number of columns that can be copied
|
1213
|
+
* columnsLimit: 25,
|
1214
|
+
* // set the maximum number of rows that can be copied
|
1215
|
+
* rowsLimit: 50,
|
1216
|
+
* // set the paste behavior
|
1217
|
+
* pasteMode: 'shift_down',
|
1218
|
+
* // set the UI container
|
1219
|
+
* uiContainer: document.body,
|
1220
|
+
* },
|
1221
|
+
* ```
|
1222
|
+
*/
|
1223
|
+
copyPaste: true,
|
1224
|
+
/**
|
1225
|
+
* The `correctFormat` option configures whether incorrectly-formatted times and dates are amended or not.
|
1226
|
+
*
|
1227
|
+
* When the user enters dates and times, Handsontable can automatically adjust their format
|
1228
|
+
* to match the [`dateFormat`](#dateFormat) and [`timeFormat`](@/guides/cell-types/time-cell-type.md) settings.
|
1229
|
+
*
|
1230
|
+
* You can set the `correctFormat` option to one of the following:
|
1231
|
+
*
|
1232
|
+
* | Setting | Description |
|
1233
|
+
* | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
1234
|
+
* | `false` (default) | Don't correct the format of the entered date or time (treat the entered date or time as invalid) |
|
1235
|
+
* | `true` | Correct the format of the entered date or time to match the [`dateFormat`](#dateFormat) or [`timeFormat`](@/guides/cell-types/time-cell-type.md) settings |
|
1236
|
+
*
|
1237
|
+
* Read more:
|
1238
|
+
* - [Date cell type](@/guides/cell-types/date-cell-type.md)
|
1239
|
+
* - [Time cell type](@/guides/cell-types/time-cell-type.md)
|
1240
|
+
* - [`dateFormat`](#dateFormat)
|
1241
|
+
*
|
1242
|
+
* @memberof Options#
|
1243
|
+
* @type {boolean}
|
1244
|
+
* @default false
|
1245
|
+
* @category Core
|
1246
|
+
*
|
1247
|
+
* @example
|
1248
|
+
* ```js
|
1249
|
+
* columns: [
|
1250
|
+
* {
|
1251
|
+
* // set the `type` of each cell in this column to `date`
|
1252
|
+
* type: 'date',
|
1253
|
+
* // for every `date` cell of this column, set the date format to `YYYY-MM-DD`
|
1254
|
+
* dateFormat: 'YYYY-MM-DD',
|
1255
|
+
* // enforce the `YYYY-MM-DD` date format
|
1256
|
+
* correctFormat: true
|
1257
|
+
* },
|
1258
|
+
*
|
1259
|
+
* {
|
1260
|
+
* // set the `type` of each cell in this column to `time`
|
1261
|
+
* type: 'time',
|
1262
|
+
* // for every `time` cell of this column, set the time format to `h:mm:ss a`
|
1263
|
+
* timeFormat: 'h:mm:ss a',
|
1264
|
+
* // enforce the `h:mm:ss a` time format
|
1265
|
+
* correctFormat: true
|
1266
|
+
* },
|
1267
|
+
* ],
|
1268
|
+
* ```
|
1269
|
+
*/
|
1270
|
+
correctFormat: false,
|
1271
|
+
/**
|
1272
|
+
* The `currentColClassName` option lets you add a CSS class name
|
1273
|
+
* to each cell of the currently-visible, currently-selected columns.
|
1274
|
+
*
|
1275
|
+
* Read more:
|
1276
|
+
* - [`currentRowClassName`](#currentRowClassName)
|
1277
|
+
* - [`currentHeaderClassName`](#currentHeaderClassName)
|
1278
|
+
* - [`activeHeaderClassName`](#activeHeaderClassName)
|
1279
|
+
* - [`invalidCellClassName`](#invalidCellClassName)
|
1280
|
+
* - [`placeholderCellClassName`](#placeholderCellClassName)
|
1281
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
1282
|
+
* - [`commentedCellClassName`](#commentedCellClassName)
|
1283
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
1284
|
+
* - [`TableClassName`](#TableClassName)
|
1285
|
+
* - [`className`](#className)
|
1286
|
+
*
|
1287
|
+
* @memberof Options#
|
1288
|
+
* @type {string}
|
1289
|
+
* @default undefined
|
1290
|
+
* @category Core
|
1291
|
+
*
|
1292
|
+
* @example
|
1293
|
+
* ```js
|
1294
|
+
* // add a `your-class-name` CSS class name
|
1295
|
+
* // to each cell of the currently-visible, currently-selected columns
|
1296
|
+
* currentColClassName: 'your-class-name',
|
1297
|
+
* ```
|
1298
|
+
*/
|
1299
|
+
currentColClassName: void 0,
|
1300
|
+
/**
|
1301
|
+
* The `currentHeaderClassName` option lets you add a CSS class name
|
1302
|
+
* to every currently-visible, currently-selected header.
|
1303
|
+
*
|
1304
|
+
* Read more:
|
1305
|
+
* - [`currentRowClassName`](#currentRowClassName)
|
1306
|
+
* - [`currentColClassName`](#currentColClassName)
|
1307
|
+
* - [`activeHeaderClassName`](#activeHeaderClassName)
|
1308
|
+
* - [`invalidCellClassName`](#invalidCellClassName)
|
1309
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
1310
|
+
* - [`commentedCellClassName`](#commentedCellClassName)
|
1311
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
1312
|
+
* - [`TableClassName`](#TableClassName)
|
1313
|
+
* - [`className`](#className)
|
1314
|
+
*
|
1315
|
+
* @memberof Options#
|
1316
|
+
* @type {string}
|
1317
|
+
* @default 'ht__highlight'
|
1318
|
+
* @category Core
|
1319
|
+
*
|
1320
|
+
* @example
|
1321
|
+
* ```js
|
1322
|
+
* // add an `ht__highlight` CSS class name
|
1323
|
+
* // to every currently-visible, currently-selected header
|
1324
|
+
* currentHeaderClassName: 'ht__highlight',
|
1325
|
+
* ```
|
1326
|
+
*/
|
1327
|
+
currentHeaderClassName: 'ht__highlight',
|
1328
|
+
/**
|
1329
|
+
* The `currentRowClassName` option lets you add a CSS class name
|
1330
|
+
* to each cell of the currently-visible, currently-selected rows.
|
1331
|
+
*
|
1332
|
+
* Read more:
|
1333
|
+
* - [`currentColClassName`](#currentColClassName)
|
1334
|
+
* - [`currentHeaderClassName`](#currentHeaderClassName)
|
1335
|
+
* - [`activeHeaderClassName`](#activeHeaderClassName)
|
1336
|
+
* - [`invalidCellClassName`](#invalidCellClassName)
|
1337
|
+
* - [`placeholderCellClassName`](#placeholderCellClassName)
|
1338
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
1339
|
+
* - [`commentedCellClassName`](#commentedCellClassName)
|
1340
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
1341
|
+
* - [`TableClassName`](#TableClassName)
|
1342
|
+
* - [`className`](#className)
|
1343
|
+
*
|
1344
|
+
* @memberof Options#
|
1345
|
+
* @type {string}
|
1346
|
+
* @default undefined
|
1347
|
+
* @category Core
|
1348
|
+
*
|
1349
|
+
* @example
|
1350
|
+
* ```js
|
1351
|
+
* // add a `your-class-name` CSS class name
|
1352
|
+
* // to each cell of the currently-visible, currently-selected rows
|
1353
|
+
* currentRowClassName: 'your-class-name',
|
1354
|
+
* ```
|
1355
|
+
*/
|
1356
|
+
currentRowClassName: void 0,
|
1357
|
+
/**
|
1358
|
+
* @description
|
1359
|
+
* The `customBorders` option configures the [`CustomBorders`](@/api/customBorders.md) plugin.
|
1360
|
+
*
|
1361
|
+
* To enable the [`CustomBorders`](@/api/customBorders.md) plugin
|
1362
|
+
* (and add its menu items to the [context menu](@/guides/accessories-and-menus/context-menu.md)),
|
1363
|
+
* set the `customBorders` option to `true`.
|
1364
|
+
*
|
1365
|
+
* To enable the [`CustomBorders`](@/api/customBorders.md) plugin
|
1366
|
+
* and add a predefined border around a particular cell,
|
1367
|
+
* set the `customBorders` option to an array of objects.
|
1368
|
+
* Each object represents a border configuration for one cell, and has the following properties:
|
1369
|
+
*
|
1370
|
+
* | Property | Sub-properties | Types | Description |
|
1371
|
+
* | -------- | ------------------ | ---------------------------------- | ----------------------------------------------------------------- |
|
1372
|
+
* | `row` | - | `row`: Number | The cell's row coordinate. |
|
1373
|
+
* | `col` | - | `col`: Number | The cell's column coordinate. |
|
1374
|
+
* | `start` | `width`<br>`color` | `width`: Number<br>`color`: String | If the [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default): `start` sets the width (`width`) and color (`color`) of the left-hand border.<br><br>If the [layout direction](@/guides/internationalization/layout-direction.md) is RTL: `start` sets the width (`width`) and color (`color`) of the right-hand border. |
|
1375
|
+
* | `end` | `width`<br>`color` | `width`: Number<br>`color`: String | If the [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default): `end` sets the width (`width`) and color (`color`) of the right-hand border.<br><br>If the [layout direction](@/guides/internationalization/layout-direction.md) is RTL: `end` sets the width (`width`) and color (`color`) of the left-hand border. |
|
1376
|
+
* | `top` | `width`<br>`color` | `width`: Number<br>`color`: String | Sets the width (`width`) and color (`color`) of the top border. |
|
1377
|
+
* | `bottom` | `width`<br>`color` | `width`: Number<br>`color`: String | Sets the width (`width`) and color (`color`) of the bottom border. |
|
1378
|
+
*
|
1379
|
+
* To enable the [`CustomBorders`](@/api/customBorders.md) plugin
|
1380
|
+
* and add a predefined border around a range of cells,
|
1381
|
+
* set the `customBorders` option to an array of objects.
|
1382
|
+
* Each object represents a border configuration for a single range of cells, and has the following properties:
|
1383
|
+
*
|
1384
|
+
* | Property | Sub-properties | Types | Description |
|
1385
|
+
* | -------- | -------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
1386
|
+
* | `range` | `from` {`row`, `col`}<br>`to` {`row`, `col`} | `from`: Object<br>`to`: Object<br>`row`: Number<br>`col`: Number | If the [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default):<br>- `from` selects the range's top-left corner.<br>- `to` selects the range's bottom-right corner.<br><br>If the [layout direction](@/guides/internationalization/layout-direction.md) is RTL: <br>- `from` selects the range's top-right corner.<br>- `to` selects the range's bottom-left corner. |
|
1387
|
+
* | `start` | `width`<br>`color` | `width`: Number<br>`color`: String | If the [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default): `start` sets the width (`width`) and color (`color`) of the left-hand border.<br><br>If the [layout direction](@/guides/internationalization/layout-direction.md) is RTL: `start` sets the width (`width`) and color (`color`) of the right-hand border. |
|
1388
|
+
* | `end` | `width`<br>`color` | `width`: Number<br>`color`: String | If the [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default): `end` sets the width (`width`) and color (`color`) of the right-hand border.<br><br>If the [layout direction](@/guides/internationalization/layout-direction.md) is RTL: `end` sets the width (`width`) and color (`color`) of the left-hand border. |
|
1389
|
+
* | `top` | `width`<br>`color` | `width`: Number<br>`color`: String | Sets the width (`width`) and color (`color`) of the top border. |
|
1390
|
+
* | `bottom` | `width`<br>`color` | `width`: Number<br>`color`: String | Sets the width (`width`) and color (`color`) of the bottom border. |
|
1391
|
+
*
|
1392
|
+
* Read more:
|
1393
|
+
* - [Formatting cells: Custom cell borders](@/guides/cell-features/formatting-cells.md#custom-cell-borders)
|
1394
|
+
* - [Context menu](@/guides/accessories-and-menus/context-menu.md)
|
1395
|
+
* - [Plugins: `CustomBorders`](@/api/customBorders.md)
|
1396
|
+
* - [Layout direction](@/guides/internationalization/layout-direction.md)
|
1397
|
+
* - [`layoutDirection`](#layoutDirection)
|
1398
|
+
*
|
1399
|
+
* @memberof Options#
|
1400
|
+
* @type {boolean|object[]}
|
1401
|
+
* @default false
|
1402
|
+
* @category CustomBorders
|
1403
|
+
*
|
1404
|
+
* @example
|
1405
|
+
* ```js
|
1406
|
+
* // enable the `CustomBorders` plugin
|
1407
|
+
* customBorders: true,
|
1408
|
+
*
|
1409
|
+
* // enable the `CustomBorders` plugin
|
1410
|
+
* // and add a predefined border for a particular cell
|
1411
|
+
* customBorders: [
|
1412
|
+
* // add an object with a border configuration for one cell
|
1413
|
+
* {
|
1414
|
+
* // set the cell's row coordinate
|
1415
|
+
* row: 2,
|
1416
|
+
* // set the cell's column coordinate
|
1417
|
+
* col: 2,
|
1418
|
+
* // set the left/right border's width and color
|
1419
|
+
* start: {
|
1420
|
+
* width: 2,
|
1421
|
+
* color: 'red'
|
1422
|
+
* },
|
1423
|
+
* // set the right/left border's width and color
|
1424
|
+
* end: {
|
1425
|
+
* width: 1,
|
1426
|
+
* color: 'green'
|
1427
|
+
* },
|
1428
|
+
* // set the top border's width and color
|
1429
|
+
* top: '',
|
1430
|
+
* // set the bottom border's width and color
|
1431
|
+
* bottom: ''
|
1432
|
+
* }
|
1433
|
+
* ],
|
1434
|
+
*
|
1435
|
+
* // enable the `CustomBorders` plugin
|
1436
|
+
* // and add a predefined border for a range of cells
|
1437
|
+
* customBorders: [
|
1438
|
+
* // add an object with a border configuration for one range of cells
|
1439
|
+
* {
|
1440
|
+
* // select a range of cells
|
1441
|
+
* range: {
|
1442
|
+
* // set the range's top-left corner
|
1443
|
+
* from: {
|
1444
|
+
* row: 1,
|
1445
|
+
* col: 1
|
1446
|
+
* },
|
1447
|
+
* // set the range's bottom-right corner
|
1448
|
+
* to: {
|
1449
|
+
* row: 3,
|
1450
|
+
* col: 4
|
1451
|
+
* }
|
1452
|
+
* },
|
1453
|
+
* // set the left/right border's width and color
|
1454
|
+
* start: {
|
1455
|
+
* width: 2,
|
1456
|
+
* color: 'red'
|
1457
|
+
* },
|
1458
|
+
* // set the right/left border's width and color
|
1459
|
+
* end: {},
|
1460
|
+
* // set the top border's width and color
|
1461
|
+
* top: {},
|
1462
|
+
* // set the bottom border's width and color
|
1463
|
+
* bottom: {}
|
1464
|
+
* }
|
1465
|
+
* ],
|
1466
|
+
* ```
|
1467
|
+
*/
|
1468
|
+
customBorders: false,
|
1469
|
+
/**
|
1470
|
+
* @description
|
1471
|
+
* The `data` option sets the initial [data](@/guides/getting-started/binding-to-data.md) of your Handsontable instance.
|
1472
|
+
*
|
1473
|
+
* Handsontable's data is bound to your source data by reference (i.e. when you edit Handsontable's data, your source data alters as well).
|
1474
|
+
*
|
1475
|
+
* You can set the `data` option:
|
1476
|
+
* - Either to an [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays).
|
1477
|
+
* - Or to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects).
|
1478
|
+
*
|
1479
|
+
* If you don't set the `data` option (or set it to `null`), Handsontable renders as an empty 5x5 grid by default.
|
1480
|
+
*
|
1481
|
+
* Read more:
|
1482
|
+
* - [Binding to data](@/guides/getting-started/binding-to-data.md)
|
1483
|
+
* - [`dataSchema`](#dataSchema)
|
1484
|
+
* - [`startRows`](#startRows)
|
1485
|
+
* - [`startCols`](#startCols)
|
1486
|
+
*
|
1487
|
+
* @memberof Options#
|
1488
|
+
* @type {Array[]|object[]}
|
1489
|
+
* @default undefined
|
1490
|
+
* @category Core
|
1491
|
+
*
|
1492
|
+
* @example
|
1493
|
+
* ```js
|
1494
|
+
* // as an array of arrays
|
1495
|
+
* data: [
|
1496
|
+
* ['A', 'B', 'C'],
|
1497
|
+
* ['D', 'E', 'F'],
|
1498
|
+
* ['G', 'H', 'J']
|
1499
|
+
* ]
|
1500
|
+
*
|
1501
|
+
* // as an array of objects
|
1502
|
+
* data: [
|
1503
|
+
* {id: 1, name: 'Ted Right'},
|
1504
|
+
* {id: 2, name: 'Frank Honest'},
|
1505
|
+
* {id: 3, name: 'Joan Well'},
|
1506
|
+
* {id: 4, name: 'Gail Polite'},
|
1507
|
+
* {id: 5, name: 'Michael Fair'},
|
1508
|
+
* ]
|
1509
|
+
* ```
|
1510
|
+
*/
|
1511
|
+
data: void 0,
|
1512
|
+
/**
|
1513
|
+
* @description
|
1514
|
+
* When the [`data`](#data) option is set to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects)
|
1515
|
+
* (or is empty), the `dataSchema` option defines the structure of new rows.
|
1516
|
+
*
|
1517
|
+
* Using the `dataSchema` option, you can start out with an empty grid.
|
1518
|
+
*
|
1519
|
+
* You can set the `dataSchema` option to one of the following:
|
1520
|
+
* - An object
|
1521
|
+
* - A function
|
1522
|
+
*
|
1523
|
+
* Read more:
|
1524
|
+
* - [Binding to data: Array of objects with custom data schema](@/guides/getting-started/binding-to-data.md#array-of-objects-with-custom-data-schema)
|
1525
|
+
* - [Binding to data: Function data source and schema](@/guides/getting-started/binding-to-data.md#function-data-source-and-schema)
|
1526
|
+
* - [`data`](#data)
|
1527
|
+
*
|
1528
|
+
* @memberof Options#
|
1529
|
+
* @type {object|Function}
|
1530
|
+
* @default undefined
|
1531
|
+
* @category Core
|
1532
|
+
*
|
1533
|
+
* @example
|
1534
|
+
* ```js
|
1535
|
+
* // with `dataSchema`, you can start with an empty grid
|
1536
|
+
* data: null,
|
1537
|
+
* dataSchema: {id: null, name: {first: null, last: null}, address: null},
|
1538
|
+
* colHeaders: ['ID', 'First Name', 'Last Name', 'Address'],
|
1539
|
+
* columns: [
|
1540
|
+
* {data: 'id'},
|
1541
|
+
* {data: 'name.first'},
|
1542
|
+
* {data: 'name.last'},
|
1543
|
+
* {data: 'address'}
|
1544
|
+
* ],
|
1545
|
+
* startRows: 5,
|
1546
|
+
* minSpareRows: 1
|
1547
|
+
* ```
|
1548
|
+
*/
|
1549
|
+
dataSchema: void 0,
|
1550
|
+
/**
|
1551
|
+
* The `dateFormat` option configures the date format accepted by [`date`](@/guides/cell-types/date-cell-type.md) cells.
|
1552
|
+
*
|
1553
|
+
* You can set the `dateFormat` option to a string with a proper date format. The default value is: `'DD/MM/YYYY'`.
|
1554
|
+
*
|
1555
|
+
* To automatically correct dates whose format doesn't match the `dateFormat` setting, use the [`correctFormat`](#correctFormat) option.
|
1556
|
+
*
|
1557
|
+
* Read more:
|
1558
|
+
* - [Date cell type](@/guides/cell-types/date-cell-type.md)
|
1559
|
+
* - [`correctFormat`](#correctFormat)
|
1560
|
+
* - [`defaultDate`](#defaultDate)
|
1561
|
+
*
|
1562
|
+
* @memberof Options#
|
1563
|
+
* @type {string}
|
1564
|
+
* @default 'DD/MM/YYYY'
|
1565
|
+
* @category Core
|
1566
|
+
*
|
1567
|
+
* @example
|
1568
|
+
* ```js
|
1569
|
+
* columns: [
|
1570
|
+
* {
|
1571
|
+
* // set the `type` of each cell in this column to `date`
|
1572
|
+
* type: 'date',
|
1573
|
+
* // for every `date` cell of this column, set the date format to `YYYY-MM-DD`
|
1574
|
+
* dateFormat: 'YYYY-MM-DD',
|
1575
|
+
* },
|
1576
|
+
* ],
|
1577
|
+
* ```
|
1578
|
+
*/
|
1579
|
+
dateFormat: 'DD/MM/YYYY',
|
1580
|
+
/**
|
1581
|
+
* The `datePickerConfig` option configures the `date` [cell editor](@/guides/cell-functions/cell-editor.md)'s date picker, which uses an external dependency: [Pikaday](https://github.com/Pikaday/Pikaday/tree/1.8.2).
|
1582
|
+
*
|
1583
|
+
* You can set the `datePickerConfig` option to an object with any of the available [Pikaday options](https://github.com/Pikaday/Pikaday/tree/1.8.2#configuration),
|
1584
|
+
* except for the following, which are always overwritten by the `date` [cell editor](@/guides/cell-functions/cell-editor.md):
|
1585
|
+
* - `bound`
|
1586
|
+
* - `container`
|
1587
|
+
* - `field`
|
1588
|
+
* - `trigger`
|
1589
|
+
*
|
1590
|
+
* If the `datePickerConfig` option is not defined, the `date` [cell editor](@/guides/cell-functions/cell-editor.md) overwrites the following [Pikaday options](https://github.com/Pikaday/Pikaday/tree/1.8.2#configuration) as well:
|
1591
|
+
*
|
1592
|
+
* | Pikaday option | Handsontable's setting |
|
1593
|
+
* | -------------------- | ---------------------- |
|
1594
|
+
* | `format` | `'DD/MM/YYYY'` |
|
1595
|
+
* | `reposition` | `false` |
|
1596
|
+
*
|
1597
|
+
* Read more:
|
1598
|
+
* - [`editor`](#editor)
|
1599
|
+
* - [`dateFormat`](#dateFormat)
|
1600
|
+
* - [Cell editor](@/guides/cell-functions/cell-editor.md)
|
1601
|
+
* - [All Pikaday options →](https://github.com/Pikaday/Pikaday/tree/1.8.2#configuration)
|
1602
|
+
*
|
1603
|
+
* @memberof Options#
|
1604
|
+
* @type {object}
|
1605
|
+
* @default undefined
|
1606
|
+
* @category Core
|
1607
|
+
*/
|
1608
|
+
datePickerConfig: void 0,
|
1609
|
+
/**
|
1610
|
+
* The `defaultDate` option configures the date displayed
|
1611
|
+
* in empty [`date`](@/guides/cell-types/date-cell-type.md) cells.
|
1612
|
+
*
|
1613
|
+
* You can set the `defaultDate` option to a string.
|
1614
|
+
*
|
1615
|
+
* Read more:
|
1616
|
+
* - [Date cell type](@/guides/cell-types/date-cell-type.md)
|
1617
|
+
* - [`dateFormat`](#dateFormat)
|
1618
|
+
*
|
1619
|
+
* @memberof Options#
|
1620
|
+
* @type {string}
|
1621
|
+
* @default undefined
|
1622
|
+
* @category Core
|
1623
|
+
*
|
1624
|
+
* @example
|
1625
|
+
* ```js
|
1626
|
+
* columns: [
|
1627
|
+
* {
|
1628
|
+
* // set the `type` of each cell in this column to `date`
|
1629
|
+
* type: 'date',
|
1630
|
+
* // in every empty `date` cell of this column, display `2015-02-02`
|
1631
|
+
* defaultDate: '2015-02-02'
|
1632
|
+
* }
|
1633
|
+
* ],
|
1634
|
+
* ```
|
1635
|
+
*/
|
1636
|
+
defaultDate: void 0,
|
1637
|
+
/**
|
1638
|
+
* @description
|
1639
|
+
* The `disableVisualSelection` option configures how
|
1640
|
+
* [selection](@/guides/cell-features/selection.md) is shown.
|
1641
|
+
*
|
1642
|
+
* You can set the `disableVisualSelection` option to one of the following:
|
1643
|
+
*
|
1644
|
+
* | Setting | Description |
|
1645
|
+
* | ----------------- | --------------------------------------------------------------------------------------------------- |
|
1646
|
+
* | `false` (default) | - Show single-cell selection<br>- Show range selection<br>- Show header selection |
|
1647
|
+
* | `true` | - Don't show single-cell selection<br>- Don't show range selection<br>- Don't show header selection |
|
1648
|
+
* | `'current'` | - Don't show single-cell selection<br>- Show range selection<br>- Show header selection |
|
1649
|
+
* | `'area'` | - Show single-cell selection<br>- Don't show range selection<br>- Show header selection |
|
1650
|
+
* | `'header'` | - Show single-cell selection<br>- Show range selection<br>- Don't show header selection |
|
1651
|
+
* | An array | A combination of `'current'`, `'area'`, and/or `'header'` |
|
1652
|
+
*
|
1653
|
+
* Read more:
|
1654
|
+
* - [Selection](@/guides/cell-features/selection.md)
|
1655
|
+
*
|
1656
|
+
* @memberof Options#
|
1657
|
+
* @type {boolean|string|string[]}
|
1658
|
+
* @default false
|
1659
|
+
* @category Core
|
1660
|
+
*
|
1661
|
+
* @example
|
1662
|
+
* ```js
|
1663
|
+
* // don't show single-cell selection
|
1664
|
+
* // don't show range selection
|
1665
|
+
* // don't show header selection
|
1666
|
+
* disableVisualSelection: true,
|
1667
|
+
*
|
1668
|
+
* // don't show single-cell selection
|
1669
|
+
* // show range selection
|
1670
|
+
* // show header selection
|
1671
|
+
* disableVisualSelection: 'current',
|
1672
|
+
*
|
1673
|
+
* // don't show single-cell selection
|
1674
|
+
* // don't show range selection
|
1675
|
+
* // show header selection
|
1676
|
+
* disableVisualSelection: ['current', 'area'],
|
1677
|
+
* ```
|
1678
|
+
*/
|
1679
|
+
disableVisualSelection: false,
|
1680
|
+
/**
|
1681
|
+
* @description
|
1682
|
+
* The `dragToScroll` option configures the [`DragToScroll`](@/api/dragToScroll.md) plugin.
|
1683
|
+
*
|
1684
|
+
* You can set the `dragToScroll` option to one of the following:
|
1685
|
+
*
|
1686
|
+
* | Setting | Description |
|
1687
|
+
* | ---------------- | --------------------------------------------------------------------------- |
|
1688
|
+
* | `true` (default) | When selection reaches the edge of the grid's viewport, scroll the viewport |
|
1689
|
+
* | `false` | Don't scroll the viewport |
|
1690
|
+
*
|
1691
|
+
* Read more:
|
1692
|
+
* - [Plugins: `DragToScroll`](@/api/dragToScroll.md)
|
1693
|
+
*
|
1694
|
+
* @memberof Options#
|
1695
|
+
* @type {boolean}
|
1696
|
+
* @default true
|
1697
|
+
* @category DragToScroll
|
1698
|
+
*
|
1699
|
+
* @example
|
1700
|
+
* ```js
|
1701
|
+
* // when selection reaches the edge of the grid's viewport, scroll the viewport
|
1702
|
+
* dragToScroll: true,
|
1703
|
+
* ```
|
1704
|
+
*/
|
1705
|
+
dragToScroll: true,
|
1706
|
+
/**
|
1707
|
+
* The `dropdownMenu` option configures the [`DropdownMenu`](@/api/dropdownMenu.md) plugin.
|
1708
|
+
*
|
1709
|
+
* You can set the `dropdownMenu` option to one of the following:
|
1710
|
+
*
|
1711
|
+
* | Setting | Description |
|
1712
|
+
* | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
1713
|
+
* | `false` | Disable the [`DropdownMenu`](@/api/dropdownMenu.md) plugin |
|
1714
|
+
* | `true` | - Enable the [`DropdownMenu`](@/api/dropdownMenu.md) plugin<br>- Use the [default context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-default-options) |
|
1715
|
+
* | An array | - Enable the [`DropdownMenu`](@/api/dropdownMenu.md) plugin<br>- Modify [individual context menu options](@/guides/accessories-and-menus/context-menu.md#context-menu-with-specific-options) |
|
1716
|
+
* | An object | - Enable the [`DropdownMenu`](@/api/dropdownMenu.md) plugin<br>- Apply a custom dropdown menu configuration |
|
1717
|
+
*
|
1718
|
+
* Read more:
|
1719
|
+
* - [Context menu](@/guides/accessories-and-menus/context-menu.md)
|
1720
|
+
* - [Plugins: `DropdownMenu`](@/api/dropdownMenu.md)
|
1721
|
+
*
|
1722
|
+
* @memberof Options#
|
1723
|
+
* @type {boolean|object|string[]}
|
1724
|
+
* @default undefined
|
1725
|
+
* @category DropdownMenu
|
1726
|
+
*
|
1727
|
+
* @example
|
1728
|
+
* ```js
|
1729
|
+
* // enable the `DropdownMenu` plugin
|
1730
|
+
* // use the default context menu options
|
1731
|
+
* dropdownMenu: true,
|
1732
|
+
*
|
1733
|
+
* // enable the `DropdownMenu` plugin
|
1734
|
+
* // and modify individual context menu options
|
1735
|
+
* dropdownMenu: ['row_above', 'row_below', '---------', 'undo', 'redo'],
|
1736
|
+
*
|
1737
|
+
* // enable the `DropdownMenu` plugin
|
1738
|
+
* // and apply a custom dropdown menu configuration
|
1739
|
+
* dropdownMenu: {
|
1740
|
+
* items: {
|
1741
|
+
* 'option1': {
|
1742
|
+
* name: 'option1'
|
1743
|
+
* },
|
1744
|
+
* 'option2': {
|
1745
|
+
* name: 'option2',
|
1746
|
+
* submenu: {
|
1747
|
+
* items: [
|
1748
|
+
* {
|
1749
|
+
* key: 'option2:suboption1',
|
1750
|
+
* name: 'option2:suboption1',
|
1751
|
+
* callback(key, options) {
|
1752
|
+
* ...
|
1753
|
+
* }
|
1754
|
+
* },
|
1755
|
+
* ...
|
1756
|
+
* ]
|
1757
|
+
* }
|
1758
|
+
* }
|
1759
|
+
* }
|
1760
|
+
* },
|
1761
|
+
* ```
|
1762
|
+
*/
|
1763
|
+
dropdownMenu: void 0,
|
1764
|
+
/**
|
1765
|
+
* The `editor` option sets a [cell editor](@/guides/cell-functions/cell-editor.md) for a cell.
|
1766
|
+
*
|
1767
|
+
* You can set the `editor` option to one of the following [cell editor aliases](@/guides/cell-functions/cell-editor.md):
|
1768
|
+
*
|
1769
|
+
* | Alias | Cell editor function |
|
1770
|
+
* | ------------------- | -------------------------------------------------------------------------- |
|
1771
|
+
* | A custom alias | Your [custom cell editor](@/guides/cell-functions/cell-editor.md) function |
|
1772
|
+
* | `'autocomplete'` | `AutocompleteEditor` |
|
1773
|
+
* | `'base'` | `BaseEditor` |
|
1774
|
+
* | `'checkbox'` | `CheckboxEditor` |
|
1775
|
+
* | `'date'` | `DateEditor` |
|
1776
|
+
* | `'dropdown'` | `DropdownEditor` |
|
1777
|
+
* | `'handsontable'` | `HandsontableEditor` |
|
1778
|
+
* | `'numeric'` | `NumericEditor` |
|
1779
|
+
* | `'password'` | `PasswordEditor` |
|
1780
|
+
* | `'select'` | `SelectEditor` |
|
1781
|
+
* | `'text'` | `TextEditor` |
|
1782
|
+
* | `'time'` | `TimeEditor` |
|
1783
|
+
*
|
1784
|
+
* To disable editing cells through cell editors,
|
1785
|
+
* set the `editor` option to `false`.
|
1786
|
+
* You'll still be able to change cells' content through Handsontable's API
|
1787
|
+
* or through plugins (e.g. [`CopyPaste`](@/api/copyPaste.md)), though.
|
1788
|
+
*
|
1789
|
+
* To set the [`editor`](#editor), [`renderer`](#renderer), and [`validator`](#validator)
|
1790
|
+
* options all at once, use the [`type`](#type) option.
|
1791
|
+
*
|
1792
|
+
* Read more:
|
1793
|
+
* - [Cell editor](@/guides/cell-functions/cell-editor.md)
|
1794
|
+
* - [Cell type](@/guides/cell-types/cell-type.md)
|
1795
|
+
* - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)
|
1796
|
+
* - [`type`](#type)
|
1797
|
+
*
|
1798
|
+
* @memberof Options#
|
1799
|
+
* @type {string|Function|boolean}
|
1800
|
+
* @default undefined
|
1801
|
+
* @category Core
|
1802
|
+
*
|
1803
|
+
* @example
|
1804
|
+
* ```js
|
1805
|
+
* // use the `numeric` editor for each cell of the entire grid
|
1806
|
+
* editor: 'numeric',
|
1807
|
+
*
|
1808
|
+
* // apply the `editor` option to individual columns
|
1809
|
+
* columns: [
|
1810
|
+
* {
|
1811
|
+
* // use the `autocomplete` editor for each cell of this column
|
1812
|
+
* editor: 'autocomplete'
|
1813
|
+
* },
|
1814
|
+
* {
|
1815
|
+
* // disable editing cells through cell editors for each cell of this column
|
1816
|
+
* editor: false
|
1817
|
+
* }
|
1818
|
+
* ]
|
1819
|
+
* ```
|
1820
|
+
*/
|
1821
|
+
editor: void 0,
|
1822
|
+
/**
|
1823
|
+
* The `enterBeginsEditing` option configures the action of the <kbd>**Enter**</kbd> key.
|
1824
|
+
*
|
1825
|
+
* You can set the `enterBeginsEditing` option to one of the following:
|
1826
|
+
*
|
1827
|
+
* | Setting | Description |
|
1828
|
+
* | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
1829
|
+
* | `true` (default) | - On pressing <kbd>**Enter**</kbd> once, enter the editing mode of the active cell<br>- On pressing <kbd>**Enter**</kbd> twice, move to another cell,<br>as configured by the [`enterMoves`](#enterMoves) setting |
|
1830
|
+
* | `false` | - On pressing <kbd>**Enter**</kbd> once, move to another cell,<br>as configured by the [`enterMoves`](#enterMoves) setting |
|
1831
|
+
*
|
1832
|
+
* Read more:
|
1833
|
+
* - [`enterMoves`](#enterMoves)
|
1834
|
+
*
|
1835
|
+
* @memberof Options#
|
1836
|
+
* @type {boolean}
|
1837
|
+
* @default true
|
1838
|
+
* @category Core
|
1839
|
+
*
|
1840
|
+
* @example
|
1841
|
+
* ```js
|
1842
|
+
* // press Enter once to start editing
|
1843
|
+
* // press Enter twice to move to another cell
|
1844
|
+
* enterBeginsEditing: true,
|
1845
|
+
*
|
1846
|
+
* // press Enter once to move to another cell
|
1847
|
+
* enterBeginsEditing: false,
|
1848
|
+
* ```
|
1849
|
+
*/
|
1850
|
+
enterBeginsEditing: true,
|
1851
|
+
/**
|
1852
|
+
* The `enterMoves` option configures the action of the <kbd>**Enter**</kbd> key.
|
1853
|
+
*
|
1854
|
+
* If the [`enterBeginsEditing`](#enterBeginsEditing) option is set to `true`,
|
1855
|
+
* the `enterMoves` setting applies to the **second** pressing of the <kbd>**Enter**</kbd> key.
|
1856
|
+
*
|
1857
|
+
* If the [`enterBeginsEditing`](#enterBeginsEditing) option is set to `false`,
|
1858
|
+
* the `enterMoves` setting applies to the **first** pressing of the <kbd>**Enter**</kbd> key.
|
1859
|
+
*
|
1860
|
+
* You can set the `enterMoves` option to an object with the following properties
|
1861
|
+
* (or to a function that returns such an object):
|
1862
|
+
*
|
1863
|
+
* | Property | Type | Description |
|
1864
|
+
* | -------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
1865
|
+
* | `col` | Number | - On pressing <kbd>**Enter**</kbd>, move selection `col` columns right<br>- On pressing <kbd>**Shift**</kbd> + <kbd>**Enter**</kbd>, move selection `col` columns left |
|
1866
|
+
* | `row` | Number | - On pressing <kbd>**Enter**</kbd>, move selection `row` rows down<br>- On pressing <kbd>**Shift**</kbd> + <kbd>**Enter**</kbd>, move selection `row` rows up |
|
1867
|
+
*
|
1868
|
+
* Read more:
|
1869
|
+
* - [`enterBeginsEditing`](#enterBeginsEditing)
|
1870
|
+
*
|
1871
|
+
* @memberof Options#
|
1872
|
+
* @type {object|Function}
|
1873
|
+
* @default {col: 0, row: 1}
|
1874
|
+
* @category Core
|
1875
|
+
*
|
1876
|
+
* @example
|
1877
|
+
* ```js
|
1878
|
+
* // on pressing Enter, move selection 1 column right and 1 row down
|
1879
|
+
* // on pressing Shift+Enter, move selection 1 column left and 1 row up
|
1880
|
+
* enterMoves: {col: 1, row: 1},
|
1881
|
+
*
|
1882
|
+
* // the same setting, as a function
|
1883
|
+
* // `event` is a DOM Event object received on pressing Enter
|
1884
|
+
* // you can use it to check whether the user pressed Enter or Shift+Enter
|
1885
|
+
* enterMoves(event) {
|
1886
|
+
* return {col: 1, row: 1};
|
1887
|
+
* },
|
1888
|
+
* ```
|
1889
|
+
*/
|
1890
|
+
enterMoves: {
|
1891
|
+
col: 0,
|
1892
|
+
row: 1
|
1893
|
+
},
|
1894
|
+
/**
|
1895
|
+
* The `fillHandle` option configures the [Autofill](@/api/autofill.md) plugin.
|
1896
|
+
*
|
1897
|
+
* You can set the `fillHandle` option to one the following:
|
1898
|
+
*
|
1899
|
+
* | Setting | Description |
|
1900
|
+
* | -------------- | -------------------------------------------------------------------------- |
|
1901
|
+
* | `true` | - Enable autofill in all directions<br>- Add the fill handle |
|
1902
|
+
* | `false` | Disable autofill |
|
1903
|
+
* | `'vertical'` | - Enable vertical autofill<br>- Add the fill handle |
|
1904
|
+
* | `'horizontal'` | - Enable horizontal autofill<br>- Add the fill handle |
|
1905
|
+
* | An object | - Enable autofill<br>- Add the fill handle<br>- Configure autofill options |
|
1906
|
+
*
|
1907
|
+
* If you set the `fillHandle` option to an object, you can configure the following autofill options:
|
1908
|
+
*
|
1909
|
+
* | Option | Possible settings | Description |
|
1910
|
+
* | --------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------- |
|
1911
|
+
* | `autoInsertRow` | `true` (default) \| `false` | `true`: When you reach the grid's bottom, add new rows<br>`false`: When you reach the grid's bottom, stop |
|
1912
|
+
* | `direction` | `'vertical'` \| `'horizontal'` | `'vertical'`: Enable vertical autofill<br>`'horizontal'`: Enable horizontal autofill |
|
1913
|
+
*
|
1914
|
+
* Read more:
|
1915
|
+
* - [AutoFill values](@/guides/cell-features/autofill-values.md)
|
1916
|
+
*
|
1917
|
+
* @memberof Options#
|
1918
|
+
* @type {boolean|string|object}
|
1919
|
+
* @default true
|
1920
|
+
* @category Core
|
1921
|
+
*
|
1922
|
+
* @example
|
1923
|
+
* ```js
|
1924
|
+
* // enable autofill in all directions
|
1925
|
+
* // with `autoInsertRow` enabled
|
1926
|
+
* fillHandle: true,
|
1927
|
+
*
|
1928
|
+
* // enable vertical autofill
|
1929
|
+
* // with `autoInsertRow` enabled
|
1930
|
+
* fillHandle: 'vertical',
|
1931
|
+
*
|
1932
|
+
* // enable horizontal autofill
|
1933
|
+
* // with `autoInsertRow` enabled
|
1934
|
+
* fillHandle: 'horizontal',
|
1935
|
+
*
|
1936
|
+
* // enable autofill in all directions
|
1937
|
+
* // with `autoInsertRow` disabled
|
1938
|
+
* fillHandle: {
|
1939
|
+
* autoInsertRow: false,
|
1940
|
+
* },
|
1941
|
+
*
|
1942
|
+
* // enable vertical autofill
|
1943
|
+
* // with `autoInsertRow` disabled
|
1944
|
+
* fillHandle: {
|
1945
|
+
* autoInsertRow: false,
|
1946
|
+
* direction: 'vertical'
|
1947
|
+
* },
|
1948
|
+
* ```
|
1949
|
+
*/
|
1950
|
+
fillHandle: {
|
1951
|
+
autoInsertRow: false
|
1952
|
+
},
|
1953
|
+
/**
|
1954
|
+
* The `filter` option configures whether [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells'
|
1955
|
+
* lists are updated by the end user's input.
|
1956
|
+
*
|
1957
|
+
* You can set the `filter` option to one of the following:
|
1958
|
+
*
|
1959
|
+
* | Setting | Description |
|
1960
|
+
* | ---------------- | --------------------------------------------------------------------------------------------------------------------- |
|
1961
|
+
* | `true` (default) | When the end user types into the input area, only options matching the input are displayed |
|
1962
|
+
* | `false` | When the end user types into the input area, all options are displayed<br>(options matching the input are put in bold |
|
1963
|
+
*
|
1964
|
+
* Read more:
|
1965
|
+
* - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)
|
1966
|
+
* - [`source`](#source)
|
1967
|
+
* - [`filteringCaseSensitive`](#filteringCaseSensitive)
|
1968
|
+
*
|
1969
|
+
* @memberof Options#
|
1970
|
+
* @type {boolean}
|
1971
|
+
* @default true
|
1972
|
+
* @category Core
|
1973
|
+
*
|
1974
|
+
* @example
|
1975
|
+
* ```js
|
1976
|
+
* columns: [{
|
1977
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
1978
|
+
* type: 'autocomplete',
|
1979
|
+
* // set options available in every `autocomplete` cell of this column
|
1980
|
+
* source: ['A', 'B', 'C'],
|
1981
|
+
* // when the end user types in `A`, display only the A option
|
1982
|
+
* // when the end user types in `B`, display only the B option
|
1983
|
+
* // when the end user types in `C`, display only the C option
|
1984
|
+
* filter: true
|
1985
|
+
* }],
|
1986
|
+
* ```
|
1987
|
+
*/
|
1988
|
+
filter: true,
|
1989
|
+
/**
|
1990
|
+
* The `filteringCaseSensitive` option configures whether [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells'
|
1991
|
+
* input is case-sensitive.
|
1992
|
+
*
|
1993
|
+
* You can set the `filteringCaseSensitive` option to one of the following:
|
1994
|
+
*
|
1995
|
+
* | Setting | Description |
|
1996
|
+
* | ----------------- | -------------------------------------------------------------------------------------------------- |
|
1997
|
+
* | `false` (default) | [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells' input is not case-sensitive |
|
1998
|
+
* | `true` | [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells' input is case-sensitive |
|
1999
|
+
*
|
2000
|
+
* Read more:
|
2001
|
+
* - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)
|
2002
|
+
* - [`source`](#source)
|
2003
|
+
* - [`filter`](#filter)
|
2004
|
+
*
|
2005
|
+
* @memberof Options#
|
2006
|
+
* @type {boolean}
|
2007
|
+
* @default false
|
2008
|
+
* @category Core
|
2009
|
+
*
|
2010
|
+
* @example
|
2011
|
+
* ```js
|
2012
|
+
* columns: [
|
2013
|
+
* {
|
2014
|
+
* type: 'autocomplete',
|
2015
|
+
* source: [ ... ],
|
2016
|
+
* // match case while searching autocomplete options
|
2017
|
+
* filteringCaseSensitive: true
|
2018
|
+
* }
|
2019
|
+
* ],
|
2020
|
+
* ```
|
2021
|
+
*/
|
2022
|
+
filteringCaseSensitive: false,
|
2023
|
+
/**
|
2024
|
+
* The `filters` option configures the [`Filters`](@/api/filters.md) plugin.
|
2025
|
+
*
|
2026
|
+
* You can set the `filters` option to one of the following:
|
2027
|
+
*
|
2028
|
+
* | Setting | Description |
|
2029
|
+
* | ------- | ------------------------------------------------ |
|
2030
|
+
* | `false` | Disable the [`Filters`](@/api/filters.md) plugin |
|
2031
|
+
* | `true` | Enable the [`Filters`](@/api/filters.md) plugin |
|
2032
|
+
*
|
2033
|
+
* Read more:
|
2034
|
+
* - [Column filter](@/guides/columns/column-filter.md)
|
2035
|
+
* - [Plugins: `Filters`](@/api/filters.md)
|
2036
|
+
* - [`dropdownMenu`](#dropdownMenu)
|
2037
|
+
*
|
2038
|
+
* @memberof Options#
|
2039
|
+
* @type {boolean}
|
2040
|
+
* @default undefined
|
2041
|
+
* @category Filters
|
2042
|
+
*
|
2043
|
+
* @example
|
2044
|
+
* ```js
|
2045
|
+
* // enable the `Filters` plugin
|
2046
|
+
* filters: true,
|
2047
|
+
* ```
|
2048
|
+
*/
|
2049
|
+
filters: void 0,
|
2050
|
+
/**
|
2051
|
+
* `fixedColumnsLeft` is a legacy option.
|
2052
|
+
*
|
2053
|
+
* If your grid's [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default), `fixedColumnsLeft` acts like the [`fixedColumnsStart`](#fixedColumnsStart) option.
|
2054
|
+
*
|
2055
|
+
* If your grid's [layout direction](@/guides/internationalization/layout-direction.md) is RTL, using `fixedColumnsLeft` throws an error.
|
2056
|
+
*
|
2057
|
+
* Use [`fixedColumnsStart`](#fixedColumnsStart), which works in any layout direction.
|
2058
|
+
*
|
2059
|
+
* Read more:
|
2060
|
+
* - [`fixedColumnsStart`](#fixedcolumnsstart)
|
2061
|
+
*
|
2062
|
+
* @memberof Options#
|
2063
|
+
* @type {number}
|
2064
|
+
* @default 0
|
2065
|
+
* @category Core
|
2066
|
+
*
|
2067
|
+
* @example
|
2068
|
+
* ```js
|
2069
|
+
* // freeze the first 3 columns from the left
|
2070
|
+
* fixedColumnsLeft: 3,
|
2071
|
+
* ```
|
2072
|
+
*/
|
2073
|
+
fixedColumnsLeft: 0,
|
2074
|
+
/**
|
2075
|
+
* If your grid's [layout direction](@/guides/internationalization/layout-direction.md) is LTR (default), the `fixedColumnsStart` option sets the number of [frozen columns](@/guides/columns/column-freezing.md) at the left-hand edge of the grid.
|
2076
|
+
*
|
2077
|
+
* If your grid's [layout direction](@/guides/internationalization/layout-direction.md) is RTL, the `fixedColumnsStart` option sets the number of [frozen columns](@/guides/columns/column-freezing.md) at the right-hand edge of the grid.
|
2078
|
+
*
|
2079
|
+
* Read more:
|
2080
|
+
* - [Column freezing](@/guides/columns/column-freezing.md)
|
2081
|
+
* - [Layout direction](@/guides/internationalization/layout-direction.md)
|
2082
|
+
* - [`fixedColumnsLeft`](#fixedcolumnsleft)
|
2083
|
+
* - [`layoutDirection`](#layoutDirection)
|
2084
|
+
*
|
2085
|
+
* @memberof Options#
|
2086
|
+
* @type {number}
|
2087
|
+
* @default 0
|
2088
|
+
* @category Core
|
2089
|
+
*
|
2090
|
+
* @example
|
2091
|
+
* ```js
|
2092
|
+
* // when `layoutDirection` is set to `inherit` (default)
|
2093
|
+
* // freeze the first 3 columns from the left or from the right
|
2094
|
+
* // depending on your HTML document's `dir` attribute
|
2095
|
+
* layoutDirection: 'inherit',
|
2096
|
+
* fixedColumnsStart: 3,
|
2097
|
+
*
|
2098
|
+
* // when `layoutDirection` is set to `rtl`
|
2099
|
+
* // freeze the first 3 columns from the right
|
2100
|
+
* // regardless of your HTML document's `dir` attribute
|
2101
|
+
* layoutDirection: 'rtl',
|
2102
|
+
* fixedColumnsStart: 3,
|
2103
|
+
*
|
2104
|
+
* // when `layoutDirection` is set to `ltr`
|
2105
|
+
* // freeze the first 3 columns from the left
|
2106
|
+
* // regardless of your HTML document's `dir` attribute
|
2107
|
+
* layoutDirection: 'ltr',
|
2108
|
+
* fixedColumnsStart: 3,
|
2109
|
+
* ```
|
2110
|
+
*/
|
2111
|
+
fixedColumnsStart: 0,
|
2112
|
+
/**
|
2113
|
+
* The `fixedRowsBottom` option sets the number of [frozen rows](@/guides/rows/row-freezing.md)
|
2114
|
+
* at the bottom of the grid.
|
2115
|
+
*
|
2116
|
+
* Read more:
|
2117
|
+
* - [Row freezing](@/guides/rows/row-freezing.md)
|
2118
|
+
*
|
2119
|
+
* @memberof Options#
|
2120
|
+
* @type {number}
|
2121
|
+
* @default 0
|
2122
|
+
* @category Core
|
2123
|
+
*
|
2124
|
+
* @example
|
2125
|
+
* ```js
|
2126
|
+
* // freeze the bottom 3 rows
|
2127
|
+
* fixedRowsBottom: 3,
|
2128
|
+
* ```
|
2129
|
+
*/
|
2130
|
+
fixedRowsBottom: 0,
|
2131
|
+
/**
|
2132
|
+
* The `fixedRowsTop` option sets the number of [frozen rows](@/guides/rows/row-freezing.md) at the top of the grid.
|
2133
|
+
*
|
2134
|
+
* Read more:
|
2135
|
+
* - [Row freezing](@/guides/rows/row-freezing.md)
|
2136
|
+
*
|
2137
|
+
* @memberof Options#
|
2138
|
+
* @type {number}
|
2139
|
+
* @default 0
|
2140
|
+
* @category Core
|
2141
|
+
*
|
2142
|
+
* @example
|
2143
|
+
* ```js
|
2144
|
+
* // freeze the top 3 rows
|
2145
|
+
* fixedRowsTop: 3,
|
2146
|
+
* ```
|
2147
|
+
*/
|
2148
|
+
fixedRowsTop: 0,
|
2149
|
+
/**
|
2150
|
+
* The `formulas` option configures the [`Formulas`](@/api/formulas.md) plugin.
|
2151
|
+
*
|
2152
|
+
* The [`Formulas`](@/api/formulas.md) plugin uses the [HyperFormula](https://handsontable.github.io/hyperformula/) calculation engine.
|
2153
|
+
* To install [HyperFormula](https://handsontable.github.io/hyperformula/), read the following:
|
2154
|
+
* - [Formula calculation: Initialization methods](@/guides/formulas/formula-calculation.md#initialization-methods)
|
2155
|
+
*
|
2156
|
+
* You can set the `formulas` option to an object with the following properties:
|
2157
|
+
*
|
2158
|
+
* | Property | Possible values |
|
2159
|
+
* | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
2160
|
+
* | `engine` | `HyperFormula` \|<br>A [HyperFormula](https://handsontable.github.io/hyperformula/) instance \|<br>A [HyperFormula configuration](https://handsontable.github.io/hyperformula/api/interfaces/configparams.html) object |
|
2161
|
+
* | `sheetId` | A number |
|
2162
|
+
* | `sheetName` | A string |
|
2163
|
+
*
|
2164
|
+
* Read more:
|
2165
|
+
* - [Plugins: `Formulas`](@/api/formulas.md)
|
2166
|
+
* - [Formula calculation](@/guides/formulas/formula-calculation.md)
|
2167
|
+
* - [HyperFormula documentation: Client-side installation](https://handsontable.github.io/hyperformula/guide/client-side-installation)
|
2168
|
+
* - [HyperFormula documentation: Configuration options](https://handsontable.github.io/hyperformula/api/interfaces/configparams.html)
|
2169
|
+
*
|
2170
|
+
* @memberof Options#
|
2171
|
+
* @type {object}
|
2172
|
+
* @default undefined
|
2173
|
+
* @category Formulas
|
2174
|
+
*
|
2175
|
+
* @example
|
2176
|
+
* ```js
|
2177
|
+
* // either add the `HyperFormula` class
|
2178
|
+
* formulas: {
|
2179
|
+
* // set `engine` to `HyperFormula`
|
2180
|
+
* engine: HyperFormula,
|
2181
|
+
* sheetId: 1,
|
2182
|
+
* sheetName: 'Sheet 1'
|
2183
|
+
* }
|
2184
|
+
*
|
2185
|
+
* // or, add a HyperFormula instance
|
2186
|
+
* // initialized with the `'internal-use-in-handsontable'` license key
|
2187
|
+
* const hyperformulaInstance = HyperFormula.buildEmpty({
|
2188
|
+
* licenseKey: 'internal-use-in-handsontable',
|
2189
|
+
* });
|
2190
|
+
*
|
2191
|
+
* formulas: {
|
2192
|
+
* // set `engine` to a HyperFormula instance
|
2193
|
+
* engine: hyperFormulaInstance,
|
2194
|
+
* sheetId: 1,
|
2195
|
+
* sheetName: 'Sheet 1'
|
2196
|
+
* }
|
2197
|
+
*
|
2198
|
+
* // or, add a HyperFormula configuration object
|
2199
|
+
* formulas: {
|
2200
|
+
* // set `engine` to a HyperFormula configuration object
|
2201
|
+
* engine: {
|
2202
|
+
* hyperformula: HyperFormula // or `engine: hyperFormulaInstance`
|
2203
|
+
* leapYear1900: false, // this option comes from HyperFormula
|
2204
|
+
* // add more HyperFormula configuration options
|
2205
|
+
* },
|
2206
|
+
* sheetId: 1,
|
2207
|
+
* sheetName: 'Sheet 1'
|
2208
|
+
* }
|
2209
|
+
*
|
2210
|
+
* // use the same HyperFormula instance in multiple Handsontable instances
|
2211
|
+
*
|
2212
|
+
* // a Handsontable instance `hot1`
|
2213
|
+
* formulas: {
|
2214
|
+
* engine: HyperFormula,
|
2215
|
+
* sheetId: 1,
|
2216
|
+
* sheetName: 'Sheet 1'
|
2217
|
+
* }
|
2218
|
+
*
|
2219
|
+
* // a Handsontable instance `hot2`
|
2220
|
+
* formulas: {
|
2221
|
+
* engine: hot1.getPlugin('formulas').engine,
|
2222
|
+
* sheetId: 1,
|
2223
|
+
* sheetName: 'Sheet 1'
|
2224
|
+
* }
|
2225
|
+
* ```
|
2226
|
+
*/
|
2227
|
+
formulas: void 0,
|
2228
|
+
/**
|
2229
|
+
* The `fragmentSelection` option configures text selection settings.
|
2230
|
+
*
|
2231
|
+
* You can set the `fragmentSelection` option to one of the following:
|
2232
|
+
*
|
2233
|
+
* | Setting | Decription |
|
2234
|
+
* | ----------------- | ------------------------------------------------- |
|
2235
|
+
* | `false` (default) | Disable text selection |
|
2236
|
+
* | `true` | Enable text selection in multiple cells at a time |
|
2237
|
+
* | `'cell'` | Enable text selection in one cell at a time |
|
2238
|
+
*
|
2239
|
+
* @memberof Options#
|
2240
|
+
* @type {boolean|string}
|
2241
|
+
* @default false
|
2242
|
+
* @category Core
|
2243
|
+
*
|
2244
|
+
* @example
|
2245
|
+
* ```js
|
2246
|
+
* // enable text selection in multiple cells at a time
|
2247
|
+
* fragmentSelection: true,
|
2248
|
+
*
|
2249
|
+
* // enable text selection in one cell a time
|
2250
|
+
* fragmentSelection: 'cell',
|
2251
|
+
* ```
|
2252
|
+
*/
|
2253
|
+
fragmentSelection: false,
|
2254
|
+
/**
|
2255
|
+
* The `height` option configures the height of your grid.
|
2256
|
+
*
|
2257
|
+
* You can set `height` option to one of the following:
|
2258
|
+
*
|
2259
|
+
* | Setting | Example |
|
2260
|
+
* | -------------------------------------------------------------------------- | -------------------------- |
|
2261
|
+
* | A number of pixels | `height: 500` |
|
2262
|
+
* | A string with a [CSS unit](https://www.w3schools.com/cssref/css_units.asp) | `height: '75vw'` |
|
2263
|
+
* | A function that returns a valid number or string | `height() { return 500; }` |
|
2264
|
+
*
|
2265
|
+
* Read more:
|
2266
|
+
* - [Grid size](@/guides/getting-started/grid-size.md)
|
2267
|
+
*
|
2268
|
+
* @memberof Options#
|
2269
|
+
* @type {number|string|Function}
|
2270
|
+
* @default undefined
|
2271
|
+
* @category Core
|
2272
|
+
*
|
2273
|
+
* @example
|
2274
|
+
* ```js
|
2275
|
+
* // set the grid's height to 500px
|
2276
|
+
* height: 500,
|
2277
|
+
*
|
2278
|
+
* // set the grid's height to 75vh
|
2279
|
+
* height: '75vh',
|
2280
|
+
*
|
2281
|
+
* // set the grid's height to 500px, using a function
|
2282
|
+
* height() {
|
2283
|
+
* return 500;
|
2284
|
+
* },
|
2285
|
+
* ```
|
2286
|
+
*/
|
2287
|
+
height: void 0,
|
2288
|
+
/**
|
2289
|
+
* The `hiddenColumns` option configures the [`HiddenColumns`](@/api/hiddenColumns.md) plugin.
|
2290
|
+
*
|
2291
|
+
* You can set the `hiddenColumns` option to one of the following:
|
2292
|
+
*
|
2293
|
+
* | Setting | Description |
|
2294
|
+
* | --------- | -------------------------------------------------------------------------------------------- |
|
2295
|
+
* | `false` | Disable the [`HiddenColumns`](@/api/hiddenColumns.md) plugin |
|
2296
|
+
* | `true` | Enable the [`HiddenColumns`](@/api/hiddenColumns.md) plugin with the default plugin options |
|
2297
|
+
* | An object | - Enable the [`HiddenColumns`](@/api/hiddenColumns.md) plugin<br>- Modify the plugin options |
|
2298
|
+
*
|
2299
|
+
* If you set the `hiddenColumns` to an object, you can set the following [`HiddenColumns`](@/api/hiddenColumns.md) plugin options:
|
2300
|
+
*
|
2301
|
+
* | Property | Possible values | Description |
|
2302
|
+
* | ------------------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
2303
|
+
* | `columns` | An array of indexes | An array of indexes of columns that are hidden at initialization |
|
2304
|
+
* | `copyPasteEnabled` | `true` \| `false` | `true`: when copying or pasting data, take hidden columns into account<br>`false`: when copying or pasting data, don't take hidden columns into account |
|
2305
|
+
* | `indicators` | `true` \| `false` | `true`: display UI markers to indicate the presence of hidden columns<br>`false`: display UI markers |
|
2306
|
+
*
|
2307
|
+
* Read more:
|
2308
|
+
* - [Plugins: `HiddenColumns`](@/api/hiddenColumns.md)
|
2309
|
+
* - [Column hiding](@/guides/columns/column-hiding.md)
|
2310
|
+
*
|
2311
|
+
* @memberof Options#
|
2312
|
+
* @type {boolean|object}
|
2313
|
+
* @default undefined
|
2314
|
+
* @category HiddenColumns
|
2315
|
+
*
|
2316
|
+
* @example
|
2317
|
+
* ```js
|
2318
|
+
* // enable the `HiddenColumns` plugin
|
2319
|
+
* hiddenColumns: true,
|
2320
|
+
*
|
2321
|
+
* // enable `HiddenColumns` plugin, and modify the plugin options
|
2322
|
+
* hiddenColumns: {
|
2323
|
+
* // set columns that are hidden by default
|
2324
|
+
* columns: [5, 10, 15],
|
2325
|
+
* // when copying or pasting data, take hidden columns into account
|
2326
|
+
* copyPasteEnabled: true,
|
2327
|
+
* // show where hidden columns are
|
2328
|
+
* indicators: true
|
2329
|
+
* }
|
2330
|
+
* ```
|
2331
|
+
*/
|
2332
|
+
hiddenColumns: void 0,
|
2333
|
+
/**
|
2334
|
+
* The `hiddenRows` option configures the [`HiddenRows`](@/api/hiddenRows.md) plugin.
|
2335
|
+
*
|
2336
|
+
* You can set the `hiddenRows` option to one of the following:
|
2337
|
+
*
|
2338
|
+
* | Setting | Description |
|
2339
|
+
* | --------- | -------------------------------------------------------------------------------------- |
|
2340
|
+
* | `false` | Disable the [`HiddenRows`](@/api/hiddenRows.md) plugin |
|
2341
|
+
* | `true` | Enable the [`HiddenRows`](@/api/hiddenRows.md) plugin with the default plugin options |
|
2342
|
+
* | An object | - Enable the [`HiddenRows`](@/api/hiddenRows.md) plugin<br>- Modify the plugin options |
|
2343
|
+
*
|
2344
|
+
* If you set the `hiddenRows` to an object, you can set the following [`HiddenRows`](@/api/hiddenRows.md) plugin options:
|
2345
|
+
*
|
2346
|
+
* | Property | Possible values | Description |
|
2347
|
+
* | ------------------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
2348
|
+
* | `rows ` | An array of indexes | An array of indexes of rows that are hidden at initialization |
|
2349
|
+
* | `copyPasteEnabled` | `true` \| `false` | `true`: when copying or pasting data, take hidden rows into account<br>`false`: when copying or pasting data, don't take hidden rows into account |
|
2350
|
+
* | `indicators` | `true` \| `false` | `true`: display UI markers to indicate the presence of hidden rows<br>`false`: display UI markers |
|
2351
|
+
*
|
2352
|
+
* Read more:
|
2353
|
+
* - [Plugins: `HiddenRows`](@/api/hiddenRows.md)
|
2354
|
+
* - [Row hiding](@/guides/rows/row-hiding.md)
|
2355
|
+
*
|
2356
|
+
* @memberof Options#
|
2357
|
+
* @type {boolean|object}
|
2358
|
+
* @default undefined
|
2359
|
+
* @category HiddenRows
|
2360
|
+
*
|
2361
|
+
* @example
|
2362
|
+
* ```js
|
2363
|
+
* // enable the `HiddenRows` plugin
|
2364
|
+
* hiddenRows: true,
|
2365
|
+
*
|
2366
|
+
* // enable `HiddenRows` plugin, and modify the plugin options
|
2367
|
+
* hiddenRows: {
|
2368
|
+
* // set rows that are hidden by default
|
2369
|
+
* rows: [5, 10, 15],
|
2370
|
+
* // when copying or pasting data, take hidden rows into account
|
2371
|
+
* copyPasteEnabled: true,
|
2372
|
+
* // show where hidden rows are
|
2373
|
+
* indicators: true
|
2374
|
+
* }
|
2375
|
+
* ```
|
2376
|
+
*/
|
2377
|
+
hiddenRows: void 0,
|
2378
|
+
/**
|
2379
|
+
* The `invalidCellClassName` option lets you add a CSS class name to cells
|
2380
|
+
* that were marked as `invalid` by the [cell validator](@/guides/cell-functions/cell-validator.md).
|
2381
|
+
*
|
2382
|
+
* Read more:
|
2383
|
+
* - [Cell validator](@/guides/cell-functions/cell-validator.md)
|
2384
|
+
* - [`currentRowClassName`](#currentRowClassName)
|
2385
|
+
* - [`currentHeaderClassName`](#currentHeaderClassName)
|
2386
|
+
* - [`activeHeaderClassName`](#activeHeaderClassName)
|
2387
|
+
* - [`currentColClassName`](#currentColClassName)
|
2388
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
2389
|
+
* - [`commentedCellClassName`](#commentedCellClassName)
|
2390
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
2391
|
+
* - [`TableClassName`](#TableClassName)
|
2392
|
+
* - [`className`](#className)
|
2393
|
+
*
|
2394
|
+
* @memberof Options#
|
2395
|
+
* @type {string}
|
2396
|
+
* @default 'htInvalid'
|
2397
|
+
* @category Core
|
2398
|
+
*
|
2399
|
+
* @example
|
2400
|
+
* ```js
|
2401
|
+
* // add a `highlight-error` CSS class name
|
2402
|
+
* // to every `invalid` cell`
|
2403
|
+
* invalidCellClassName: 'highlight-error',
|
2404
|
+
* ```
|
2405
|
+
*/
|
2406
|
+
invalidCellClassName: 'htInvalid',
|
2407
|
+
/**
|
2408
|
+
* The `isEmptyCol` option lets you define your own custom method
|
2409
|
+
* for checking if a column at a given visual index is empty.
|
2410
|
+
*
|
2411
|
+
* The `isEmptyCol` setting overwrites the built-in [`isEmptyCol`](@/api/core.md#isEmptyCol) method.
|
2412
|
+
*
|
2413
|
+
* @memberof Options#
|
2414
|
+
* @type {Function}
|
2415
|
+
* @param {number} col Visual column index.
|
2416
|
+
* @returns {boolean}
|
2417
|
+
* @category Core
|
2418
|
+
*
|
2419
|
+
* @example
|
2420
|
+
* ```js
|
2421
|
+
* // overwrite the built-in `isEmptyCol` method
|
2422
|
+
* isEmptyCol(visualColumnIndex) {
|
2423
|
+
* // your custom method
|
2424
|
+
* ...
|
2425
|
+
* },
|
2426
|
+
* ```
|
2427
|
+
*/
|
2428
|
+
isEmptyCol: function isEmptyCol(col) {
|
2429
|
+
var row;
|
2430
|
+
var rowLen;
|
2431
|
+
var value;
|
2432
|
+
for (row = 0, rowLen = this.countRows(); row < rowLen; row++) {
|
2433
|
+
value = this.getDataAtCell(row, col);
|
2434
|
+
if (isEmpty(value) === false) {
|
2435
|
+
return false;
|
2436
|
+
}
|
2437
|
+
}
|
2438
|
+
return true;
|
2439
|
+
},
|
2440
|
+
/**
|
2441
|
+
* The `isEmptyRow` option lets you define your own custom method
|
2442
|
+
* for checking if a row at a given visual index is empty.
|
2443
|
+
*
|
2444
|
+
* The `isEmptyRow` setting overwrites the built-in [`isEmptyRow`](@/api/core.md#isEmptyRow) method.
|
2445
|
+
*
|
2446
|
+
* @memberof Options#
|
2447
|
+
* @type {Function}
|
2448
|
+
* @param {number} row Visual row index.
|
2449
|
+
* @returns {boolean}
|
2450
|
+
* @category Core
|
2451
|
+
*
|
2452
|
+
* @example
|
2453
|
+
* ```js
|
2454
|
+
* // overwrite the built-in `isEmptyRow` method
|
2455
|
+
* isEmptyRow(visualRowIndex) {
|
2456
|
+
* // your custom method
|
2457
|
+
* ...
|
2458
|
+
* },
|
2459
|
+
* ```
|
2460
|
+
*/
|
2461
|
+
isEmptyRow: function isEmptyRow(row) {
|
2462
|
+
var col;
|
2463
|
+
var colLen;
|
2464
|
+
var value;
|
2465
|
+
var meta;
|
2466
|
+
for (col = 0, colLen = this.countCols(); col < colLen; col++) {
|
2467
|
+
value = this.getDataAtCell(row, col);
|
2468
|
+
if (isEmpty(value) === false) {
|
2469
|
+
if (_typeof(value) === 'object') {
|
2470
|
+
meta = this.getCellMeta(row, col);
|
2471
|
+
return isObjectEqual(this.getSchema()[meta.prop], value);
|
2472
|
+
}
|
2473
|
+
return false;
|
2474
|
+
}
|
2475
|
+
}
|
2476
|
+
return true;
|
2477
|
+
},
|
2478
|
+
/**
|
2479
|
+
* @description
|
2480
|
+
* The `label` option configures [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cells` labels.
|
2481
|
+
*
|
2482
|
+
* You can set the `label` option to an object with the following properties:
|
2483
|
+
*
|
2484
|
+
* | Property | Possible values | Description |
|
2485
|
+
* | ----------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
2486
|
+
* | `position` | `'after'` (default) \| `'before'` | `'after'`: place the label to the right of the checkbox<br>`'before'`: place the label to the left of the checkbox |
|
2487
|
+
* | `value` | A string \| A function | The label's text |
|
2488
|
+
* | `separated` | `false` (default) \| `true` | `false`: don't separate the label from the checkbox<br>`true`: separate the label from the checkbox |
|
2489
|
+
* | `property` | A string | - A [`data`](#data) object property name that's used as the label's text <br>- Works only when the [`data`](#data) option is set to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects) |
|
2490
|
+
*
|
2491
|
+
* Read more:
|
2492
|
+
* - [Checkbox cell type: Checkbox labels](@/guides/cell-types/checkbox-cell-type.md#checkbox-labels)
|
2493
|
+
*
|
2494
|
+
* @memberof Options#
|
2495
|
+
* @type {object}
|
2496
|
+
* @default undefined
|
2497
|
+
* @category Core
|
2498
|
+
*
|
2499
|
+
* @example
|
2500
|
+
* ```js
|
2501
|
+
* columns: [{
|
2502
|
+
* type: 'checkbox',
|
2503
|
+
* // add 'My label:' after the checkbox
|
2504
|
+
* label: { position: 'after', value: 'My label: ', separated: true }
|
2505
|
+
* }],
|
2506
|
+
* ```
|
2507
|
+
*/
|
2508
|
+
label: void 0,
|
2509
|
+
/**
|
2510
|
+
* The `language` option configures Handsontable's [language](@/guides/internationalization/language.md) settings.
|
2511
|
+
*
|
2512
|
+
* You can set the `language` option to one of the following:
|
2513
|
+
*
|
2514
|
+
* | Setting | Description |
|
2515
|
+
* | ------------------- | --------------------------- |
|
2516
|
+
* | `'en-US'` (default) | English - United States |
|
2517
|
+
* | `'ar-AR'` | Arabic - Global.<br><br>To properly render this language, set the [layout direction](@/guides/internationalization/layout-direction.md) to RTL. |
|
2518
|
+
* | `'cs-CZ'` | Czech - Czech Republic |
|
2519
|
+
* | `'de-CH'` | German - Switzerland |
|
2520
|
+
* | `'de-DE'` | German - Germany |
|
2521
|
+
* | `'es-MX'` | Spanish - Mexico |
|
2522
|
+
* | `'fr-FR'` | French - France |
|
2523
|
+
* | `'it-IT'` | Italian - Italy |
|
2524
|
+
* | `'ja-JP'` | Japanese - Japan |
|
2525
|
+
* | `'ko-KR'` | Korean - Korea |
|
2526
|
+
* | `'lv-LV'` | Latvian - Latvia |
|
2527
|
+
* | `'nb-NO'` | Norwegian (Bokmål) - Norway |
|
2528
|
+
* | `'nl-NL'` | Dutch - Netherlands |
|
2529
|
+
* | `'pl-PL'` | Polish - Poland |
|
2530
|
+
* | `'pt-BR'` | Portuguese - Brazil |
|
2531
|
+
* | `'ru-RU'` | Russian - Russia |
|
2532
|
+
* | `'sr-SP'` | Serbian (Latin) - Serbia |
|
2533
|
+
* | `'zh-CN'` | Chinese - China |
|
2534
|
+
* | `'zh-TW'` | Chinese - Taiwan |
|
2535
|
+
*
|
2536
|
+
* Read more:
|
2537
|
+
* - [Language](@/guides/internationalization/language.md)
|
2538
|
+
* - [`locale`](#locale)
|
2539
|
+
* - [`layoutDirection`](#layoutdirection)
|
2540
|
+
*
|
2541
|
+
* @memberof Options#
|
2542
|
+
* @type {string}
|
2543
|
+
* @default 'en-US'
|
2544
|
+
* @category Core
|
2545
|
+
*
|
2546
|
+
* @example
|
2547
|
+
* ```js
|
2548
|
+
* // set Handsontable's language to Polish
|
2549
|
+
* language: 'pl-PL',
|
2550
|
+
* ```
|
2551
|
+
*/
|
2552
|
+
language: 'en-US',
|
2553
|
+
/**
|
2554
|
+
* The `layoutDirection` option configures whether Handsontable renders from the left to the right, or from the right to the left.
|
2555
|
+
*
|
2556
|
+
* You can set the layout direction only at Handsontable's [initialization](@/guides/getting-started/installation.md#initialize-handsontable). Any change of the `layoutDirection` option after the initialization (e.g. using the [`updateSettings()`](@/api/core.md#updatesettings) method) is ignored.
|
2557
|
+
*
|
2558
|
+
* You can set the `layoutDirection` option only [for the entire grid](@/guides/getting-started/configuration-options.md#setting-grid-options).
|
2559
|
+
* You can't set it for individual columns, rows, or cells.
|
2560
|
+
*
|
2561
|
+
* You can set the `layoutDirection` option to one of the following strings:
|
2562
|
+
*
|
2563
|
+
* | Setting | Description |
|
2564
|
+
* | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
2565
|
+
* | `inherit` (default) | Set Handsontable's layout direction automatically,<br>based on the value of your HTML document's [`dir`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir) attribute |
|
2566
|
+
* | `rtl` | Render Handsontable from the right to the left,<br>even when your HTML document's [`dir`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir) attribute is set to `ltr` |
|
2567
|
+
* | `ltr` | Render Handsontable from the left to the right,<br>even when your HTML document's [`dir`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir) attribute is set to `rtl` |
|
2568
|
+
*
|
2569
|
+
* Read more:
|
2570
|
+
* - [Layout direction](@/guides/internationalization/layout-direction.md)
|
2571
|
+
* - [Language](@/guides/internationalization/language.md)
|
2572
|
+
* - [`language`](#language)
|
2573
|
+
* - [`locale`](#locale)
|
2574
|
+
* - [`fixedColumnsStart`](#fixedcolumnsstart)
|
2575
|
+
* - [`customBorders`](#customBorders)
|
2576
|
+
*
|
2577
|
+
* @memberof Options#
|
2578
|
+
* @type {string}
|
2579
|
+
* @default 'inherit'
|
2580
|
+
* @category Core
|
2581
|
+
*
|
2582
|
+
* @example
|
2583
|
+
* ```js
|
2584
|
+
* // inherit Handsontable's layout direction
|
2585
|
+
* // from the value of your HTML document's `dir` attribute
|
2586
|
+
* layoutDirection: 'inherit',
|
2587
|
+
*
|
2588
|
+
* // render Handsontable from the right to the left
|
2589
|
+
* // regardless of your HTML document's `dir`
|
2590
|
+
* layoutDirection: 'rtl',
|
2591
|
+
*
|
2592
|
+
* // render Handsontable from the left to the right
|
2593
|
+
* // regardless of your HTML document's `dir`
|
2594
|
+
* layoutDirection: 'ltr',
|
2595
|
+
* ```
|
2596
|
+
*/
|
2597
|
+
layoutDirection: 'inherit',
|
2598
|
+
/**
|
2599
|
+
* The `licenseKey` option sets your Handsontable license key.
|
2600
|
+
*
|
2601
|
+
* You can set the `licenseKey` option to one of the following:
|
2602
|
+
*
|
2603
|
+
* | Setting | Description |
|
2604
|
+
* | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
2605
|
+
* | A string with your [commercial license key](@/guides/getting-started/license-key.md#commercial-license) | For [commercial use](@/guides/technical-specification/software-license.md#commercial-use) |
|
2606
|
+
* | `'non-commercial-and-evaluation'` | For [non-commercial use](@/guides/technical-specification/software-license.md#non-commercial-use) |
|
2607
|
+
*
|
2608
|
+
* Read more:
|
2609
|
+
* - [License key](@/guides/getting-started/license-key.md)
|
2610
|
+
*
|
2611
|
+
* @memberof Options#
|
2612
|
+
* @type {string}
|
2613
|
+
* @default undefined
|
2614
|
+
* @category Core
|
2615
|
+
*
|
2616
|
+
* @example
|
2617
|
+
* ```js
|
2618
|
+
* // for commercial use
|
2619
|
+
* licenseKey: 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxx', // your commercial license key
|
2620
|
+
*
|
2621
|
+
* // for non-commercial use
|
2622
|
+
* licenseKey: 'non-commercial-and-evaluation',
|
2623
|
+
* ```
|
2624
|
+
*/
|
2625
|
+
licenseKey: void 0,
|
2626
|
+
/**
|
2627
|
+
* The `locale` option configures Handsontable's [locale](@/guides/internationalization/locale.md) settings.
|
2628
|
+
*
|
2629
|
+
* You can set the `locale` option to any valid and canonicalized Unicode BCP 47 locale tag,
|
2630
|
+
* both for the [entire grid](@/guides/internationalization/locale.md#setting-the-grid-s-locale),
|
2631
|
+
* and for [individual columns](@/guides/internationalization/locale.md#setting-a-column-s-locale).
|
2632
|
+
*
|
2633
|
+
* Read more:
|
2634
|
+
* - [Locale](@/guides/internationalization/locale.md)
|
2635
|
+
* - [`language`](#language)
|
2636
|
+
* - [`layoutDirection`](#layoutdirection)
|
2637
|
+
*
|
2638
|
+
* @memberof Options#
|
2639
|
+
* @type {string}
|
2640
|
+
* @default 'en-US'
|
2641
|
+
* @category Core
|
2642
|
+
*
|
2643
|
+
* @example
|
2644
|
+
* ```js
|
2645
|
+
* // set the entire grid's locale to Polish
|
2646
|
+
* locale: 'pl-PL',
|
2647
|
+
*
|
2648
|
+
* // set individual columns' locales
|
2649
|
+
* columns: [
|
2650
|
+
* {
|
2651
|
+
* // set the first column's locale to Polish
|
2652
|
+
* locale: 'pl-PL',
|
2653
|
+
* },
|
2654
|
+
* {
|
2655
|
+
* // set the second column's locale to German
|
2656
|
+
* locale: 'de-DE',
|
2657
|
+
* },
|
2658
|
+
* ],
|
2659
|
+
* ```
|
2660
|
+
*/
|
2661
|
+
locale: 'en-US',
|
2662
|
+
/**
|
2663
|
+
* The `manualColumnFreeze` option configures the [`ManualColumnFreeze`](@/api/manualColumnFreeze.md) plugin.
|
2664
|
+
*
|
2665
|
+
* You can set the `manualColumnFreeze` option to one of the following:
|
2666
|
+
*
|
2667
|
+
* | Setting | Description |
|
2668
|
+
* | -------- | ---------------------------------------------------------------------- |
|
2669
|
+
* | `true` | Enable the [`ManualColumnFreeze`](@/api/manualColumnFreeze.md) plugin |
|
2670
|
+
* | `false` | Disable the [`ManualColumnFreeze`](@/api/manualColumnFreeze.md) plugin |
|
2671
|
+
*
|
2672
|
+
* Read more:
|
2673
|
+
* - [Column freezing](@/guides/columns/column-freezing.md#user-triggered-freeze)
|
2674
|
+
*
|
2675
|
+
* @memberof Options#
|
2676
|
+
* @type {boolean}
|
2677
|
+
* @default undefined
|
2678
|
+
* @category ManualColumnFreeze
|
2679
|
+
*
|
2680
|
+
* @example
|
2681
|
+
* ```js
|
2682
|
+
* // enable the `ManualColumnFreeze` plugin
|
2683
|
+
* manualColumnFreeze: true,
|
2684
|
+
* ```
|
2685
|
+
*/
|
2686
|
+
manualColumnFreeze: void 0,
|
2687
|
+
/**
|
2688
|
+
* The `manualColumnMove` option configures the [`ManualColumnMove`](@/api/manualColumnMove.md) plugin.
|
2689
|
+
*
|
2690
|
+
* You can set the `manualColumnMove` option to one of the following:
|
2691
|
+
*
|
2692
|
+
* | Setting | Description |
|
2693
|
+
* | -------- | ------------------------------------------------------------------------------------------------------------------ |
|
2694
|
+
* | `true` | Enable the [`ManualColumnMove`](@/api/manualColumnMove.md) plugin |
|
2695
|
+
* | `false` | Disable the [`ManualColumnMove`](@/api/manualColumnMove.md) plugin |
|
2696
|
+
* | An array | - Enable the [`ManualColumnMove`](@/api/manualColumnMove.md) plugin<br>- Move individual columns at initialization |
|
2697
|
+
*
|
2698
|
+
* Read more:
|
2699
|
+
* - [Column moving](@/guides/columns/column-moving.md)
|
2700
|
+
*
|
2701
|
+
* @memberof Options#
|
2702
|
+
* @type {boolean|number[]}
|
2703
|
+
* @default undefined
|
2704
|
+
* @category ManualColumnMove
|
2705
|
+
*
|
2706
|
+
* @example
|
2707
|
+
* ```js
|
2708
|
+
* // enable the `ManualColumnMove` plugin
|
2709
|
+
* manualColumnMove: true,
|
2710
|
+
*
|
2711
|
+
* // enable the `ManualColumnMove` plugin
|
2712
|
+
* // at initialization, move column 0 to 1
|
2713
|
+
* // at initialization, move column 1 to 4
|
2714
|
+
* // at initialization, move column 2 to 6
|
2715
|
+
* manualColumnMove: [1, 4, 6],
|
2716
|
+
* ```
|
2717
|
+
*/
|
2718
|
+
manualColumnMove: void 0,
|
2719
|
+
/**
|
2720
|
+
* @description
|
2721
|
+
* The `manualColumnResize` option configures the [`ManualColumnResize`](@/api/manualColumnResize.md) plugin.
|
2722
|
+
*
|
2723
|
+
* You can set the `manualColumnResize` option to one of the following:
|
2724
|
+
*
|
2725
|
+
* | Setting | Description |
|
2726
|
+
* | -------- | --------------------------------------------------------------------------------------------------------------------- |
|
2727
|
+
* | `true` | Enable the [`ManualColumnResize`](@/api/manualColumnResize.md) plugin |
|
2728
|
+
* | `false` | Disable the [`ManualColumnResize`](@/api/manualColumnResize.md) plugin |
|
2729
|
+
* | An array | - Enable the [`ManualColumnResize`](@/api/manualColumnResize.md) plugin<br>- Set initial widths of individual columns |
|
2730
|
+
*
|
2731
|
+
* Read more:
|
2732
|
+
* - [Column width: Column stretching](@/guides/columns/column-width.md#column-stretching)
|
2733
|
+
*
|
2734
|
+
* @memberof Options#
|
2735
|
+
* @type {boolean|number[]}
|
2736
|
+
* @default undefined
|
2737
|
+
* @category ManualColumnResize
|
2738
|
+
*
|
2739
|
+
* @example
|
2740
|
+
* ```js
|
2741
|
+
* // enable the `manualColumnResize` plugin
|
2742
|
+
* manualColumnResize: true,
|
2743
|
+
*
|
2744
|
+
* // enable the `manualColumnResize` plugin
|
2745
|
+
* // set the initial width of column 0 to 40 pixels
|
2746
|
+
* // set the initial width of column 1 to 50 pixels
|
2747
|
+
* // set the initial width of column 2 to 60 pixels
|
2748
|
+
* manualColumnResize: [40, 50, 60],
|
2749
|
+
* ```
|
2750
|
+
*/
|
2751
|
+
manualColumnResize: void 0,
|
2752
|
+
/**
|
2753
|
+
* @description
|
2754
|
+
* The `manualRowMove` option configures the [`ManualRowMove`](@/api/manualRowMove.md) plugin.
|
2755
|
+
*
|
2756
|
+
* You can set the `manualRowMove` option to one of the following:
|
2757
|
+
*
|
2758
|
+
* | Setting | Description |
|
2759
|
+
* | -------- | --------------------------------------------------------------------------------------------------------- |
|
2760
|
+
* | `true` | Enable the [`ManualRowMove`](@/api/manualRowMove.md) plugin |
|
2761
|
+
* | `false` | Disable the [`ManualRowMove`](@/api/manualRowMove.md) plugin |
|
2762
|
+
* | An array | - Enable the [`ManualRowMove`](@/api/manualRowMove.md) plugin<br>- Move individual rows at initialization |
|
2763
|
+
*
|
2764
|
+
* Read more:
|
2765
|
+
* - [Row moving](@/guides/rows/row-moving.md)
|
2766
|
+
*
|
2767
|
+
* @memberof Options#
|
2768
|
+
* @type {boolean|number[]}
|
2769
|
+
* @default undefined
|
2770
|
+
* @category ManualRowMove
|
2771
|
+
*
|
2772
|
+
* @example
|
2773
|
+
* ```js
|
2774
|
+
* // enable the `ManualRowMove` plugin
|
2775
|
+
* manualRowMove: true,
|
2776
|
+
*
|
2777
|
+
* // enable the `ManualRowMove` plugin
|
2778
|
+
* // at initialization, move row 0 to 1
|
2779
|
+
* // at initialization, move row 1 to 4
|
2780
|
+
* // at initialization, move row 2 to 6
|
2781
|
+
* manualColumnMove: [1, 4, 6],
|
2782
|
+
* ```
|
2783
|
+
*/
|
2784
|
+
manualRowMove: void 0,
|
2785
|
+
/**
|
2786
|
+
* @description
|
2787
|
+
* The `manualRowResize` option configures the [`ManualRowResize`](@/api/manualRowResize.md) plugin.
|
2788
|
+
*
|
2789
|
+
* You can set the `manualRowResize` option to one of the following:
|
2790
|
+
*
|
2791
|
+
* | Setting | Description |
|
2792
|
+
* | -------- | ------------------------------------------------------------------------------------------------------------- |
|
2793
|
+
* | `true` | Enable the [`ManualRowResize`](@/api/manualRowResize.md) plugin |
|
2794
|
+
* | `false` | Disable the [`ManualRowResize`](@/api/manualRowResize.md) plugin |
|
2795
|
+
* | An array | - Enable the [`ManualRowResize`](@/api/manualRowResize.md) plugin<br>- Set initial heights of individual rows |
|
2796
|
+
*
|
2797
|
+
* Read more:
|
2798
|
+
* - [Row height: Adjust the row height manually](@/guides/rows/row-height.md#adjust-the-row-height-manually)
|
2799
|
+
*
|
2800
|
+
* @memberof Options#
|
2801
|
+
* @type {boolean|number[]}
|
2802
|
+
* @default undefined
|
2803
|
+
* @category ManualRowResize
|
2804
|
+
*
|
2805
|
+
* @example
|
2806
|
+
* ```js
|
2807
|
+
* // enable the `ManualRowResize` plugin
|
2808
|
+
* manualColumnResize: true,
|
2809
|
+
*
|
2810
|
+
* // enable the `ManualRowResize` plugin
|
2811
|
+
* // set the initial height of row 0 to 40 pixels
|
2812
|
+
* // set the initial height of row 1 to 50 pixels
|
2813
|
+
* // set the initial height of row 2 to 60 pixels
|
2814
|
+
* manualColumnResize: [40, 50, 60],
|
2815
|
+
* ```
|
2816
|
+
*/
|
2817
|
+
manualRowResize: void 0,
|
2818
|
+
/**
|
2819
|
+
* The `maxCols` option sets a maximum number of columns.
|
2820
|
+
*
|
2821
|
+
* The `maxCols` option is used:
|
2822
|
+
* - At initialization: if the `maxCols` value is lower than the initial number of columns,
|
2823
|
+
* Handsontable trims columns from the right.
|
2824
|
+
* - At runtime: for example, when inserting columns.
|
2825
|
+
*
|
2826
|
+
* @memberof Options#
|
2827
|
+
* @type {number}
|
2828
|
+
* @default Infinity
|
2829
|
+
* @category Core
|
2830
|
+
*
|
2831
|
+
* @example
|
2832
|
+
* ```js
|
2833
|
+
* // set the maximum number of columns to 300
|
2834
|
+
* maxCols: 300,
|
2835
|
+
* ```
|
2836
|
+
*/
|
2837
|
+
maxCols: Infinity,
|
2838
|
+
/**
|
2839
|
+
* The `maxRows` option sets a maximum number of rows.
|
2840
|
+
*
|
2841
|
+
* The `maxRows` option is used:
|
2842
|
+
* - At initialization: if the `maxRows` value is lower than the initial number of columns,
|
2843
|
+
* Handsontable trims rows from the bottom.
|
2844
|
+
* - At runtime: for example, when inserting rows.
|
2845
|
+
*
|
2846
|
+
* @memberof Options#
|
2847
|
+
* @type {number}
|
2848
|
+
* @default Infinity
|
2849
|
+
* @category Core
|
2850
|
+
*
|
2851
|
+
* @example
|
2852
|
+
* ```js
|
2853
|
+
* // set the maximum number of rows to 300
|
2854
|
+
* maxRows: 300,
|
2855
|
+
* ```
|
2856
|
+
*/
|
2857
|
+
maxRows: Infinity,
|
2858
|
+
/**
|
2859
|
+
* @description
|
2860
|
+
* The `mergeCells` option configures the [`MergeCells`](@/api/mergeCells.md) plugin.
|
2861
|
+
*
|
2862
|
+
* You can set the `mergeCells` option to one of the following:
|
2863
|
+
*
|
2864
|
+
* | Setting | Description |
|
2865
|
+
* | ------------------- | --------------------------------------------------------------------------------------------------- |
|
2866
|
+
* | `true` | Enable the [`MergeCells`](@/api/mergeCells.md) plugin |
|
2867
|
+
* | `false` | Disable the [`MergeCells`](@/api/mergeCells.md) plugin |
|
2868
|
+
* | An array of objects | - Enable the [`MergeCells`](@/api/mergeCells.md) plugin<br>- Merge specific cells at initialization |
|
2869
|
+
*
|
2870
|
+
* To merge specific cells at Handsontable's initialization,
|
2871
|
+
* set the `mergeCells` option to an array of objects, with the following properties:
|
2872
|
+
*
|
2873
|
+
* | Property | Description |
|
2874
|
+
* | --------- | ---------------------------------------------------------- |
|
2875
|
+
* | `row` | The row index of the merged section's beginning |
|
2876
|
+
* | `col` | The column index of the merged section's beginning |
|
2877
|
+
* | `rowspan` | The width (as a number of rows) of the merged section |
|
2878
|
+
* | `colspan` | The height (as a number of columns ) of the merged section |
|
2879
|
+
*
|
2880
|
+
* Read more:
|
2881
|
+
* - [Merge cells](@/guides/cell-features/merge-cells.md)
|
2882
|
+
*
|
2883
|
+
* @memberof Options#
|
2884
|
+
* @type {boolean|object[]}
|
2885
|
+
* @default false
|
2886
|
+
* @category MergeCells
|
2887
|
+
*
|
2888
|
+
* @example
|
2889
|
+
* ```js
|
2890
|
+
* // enable the `MergeCells` plugin
|
2891
|
+
* mergeCells: true,
|
2892
|
+
*
|
2893
|
+
* // enable the `MergeCells` plugin
|
2894
|
+
* // and merge specific cells at initialization
|
2895
|
+
* mergeCells: [
|
2896
|
+
* // merge cells from cell (1,1) to cell (3,3)
|
2897
|
+
* {row: 1, col: 1, rowspan: 3, colspan: 3},
|
2898
|
+
* // merge cells from cell (3,4) to cell (2,2)
|
2899
|
+
* {row: 3, col: 4, rowspan: 2, colspan: 2},
|
2900
|
+
* // merge cells from cell (5,6) to cell (3,3)
|
2901
|
+
* {row: 5, col: 6, rowspan: 3, colspan: 3}
|
2902
|
+
* ],
|
2903
|
+
* ```
|
2904
|
+
*/
|
2905
|
+
mergeCells: false,
|
2906
|
+
/**
|
2907
|
+
* The `minCols` option sets a minimum number of columns.
|
2908
|
+
*
|
2909
|
+
* The `minCols` option is used:
|
2910
|
+
* - At initialization: if the `minCols` value is higher than the initial number of columns,
|
2911
|
+
* Handsontable adds empty columns to the right.
|
2912
|
+
* - At runtime: for example, when removing columns.
|
2913
|
+
*
|
2914
|
+
* The `minCols` option works only when your [`data`](#data) is an [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays).
|
2915
|
+
* When your [`data`](#data) is an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects),
|
2916
|
+
* you can only have as many columns as defined in:
|
2917
|
+
* - The first data row
|
2918
|
+
* - The [`dataSchema`](#dataSchema) option
|
2919
|
+
* - The [`columns`](#columns) option
|
2920
|
+
*
|
2921
|
+
* @memberof Options#
|
2922
|
+
* @type {number}
|
2923
|
+
* @default 0
|
2924
|
+
* @category Core
|
2925
|
+
*
|
2926
|
+
* @example
|
2927
|
+
* ```js
|
2928
|
+
* // set the minimum number of columns to 10
|
2929
|
+
* minCols: 10,
|
2930
|
+
* ```
|
2931
|
+
*/
|
2932
|
+
minCols: 0,
|
2933
|
+
/**
|
2934
|
+
* The `minRows` option sets a minimum number of rows.
|
2935
|
+
*
|
2936
|
+
* The `minRows` option is used:
|
2937
|
+
* - At initialization: if the `minRows` value is higher than the initial number of rows,
|
2938
|
+
* Handsontable adds empty rows at the bottom.
|
2939
|
+
* - At runtime: for example, when removing rows.
|
2940
|
+
*
|
2941
|
+
* @memberof Options#
|
2942
|
+
* @type {number}
|
2943
|
+
* @default 0
|
2944
|
+
* @category Core
|
2945
|
+
*
|
2946
|
+
* @example
|
2947
|
+
* ```js
|
2948
|
+
* // set the minimum number of rows to 10
|
2949
|
+
* minRows: 10,
|
2950
|
+
* ```
|
2951
|
+
*/
|
2952
|
+
minRows: 0,
|
2953
|
+
/**
|
2954
|
+
* The `minSpareCols` option sets a minimum number of empty columns
|
2955
|
+
* at the grid's right-hand end.
|
2956
|
+
*
|
2957
|
+
* If there already are other empty columns at the grid's right-hand end,
|
2958
|
+
* they are counted into the `minSpareCols` value.
|
2959
|
+
*
|
2960
|
+
* The total number of columns can't exceed the [`maxCols`](#maxCols) value.
|
2961
|
+
*
|
2962
|
+
* The `minSpareCols` option works only when your [`data`](#data) is an [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays).
|
2963
|
+
* When your [`data`](#data) is an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects),
|
2964
|
+
* you can only have as many columns as defined in:
|
2965
|
+
* - The first data row
|
2966
|
+
* - The [`dataSchema`](#dataSchema) option
|
2967
|
+
* - The [`columns`](#columns) option
|
2968
|
+
*
|
2969
|
+
* @memberof Options#
|
2970
|
+
* @type {number}
|
2971
|
+
* @default 0
|
2972
|
+
* @category Core
|
2973
|
+
*
|
2974
|
+
* @example
|
2975
|
+
* ```js
|
2976
|
+
* // at Handsontable's initialization, add at least 3 empty columns on the right
|
2977
|
+
* minSpareCols: 3,
|
2978
|
+
* ```
|
2979
|
+
*/
|
2980
|
+
minSpareCols: 0,
|
2981
|
+
/**
|
2982
|
+
* The `minSpareRows` option sets a minimum number of empty rows
|
2983
|
+
* at the bottom of the grid.
|
2984
|
+
*
|
2985
|
+
* If there already are other empty rows at the bottom,
|
2986
|
+
* they are counted into the `minSpareRows` value.
|
2987
|
+
*
|
2988
|
+
* The total number of rows can't exceed the [`maxRows`](#maxRows) value.
|
2989
|
+
*
|
2990
|
+
* @memberof Options#
|
2991
|
+
* @type {number}
|
2992
|
+
* @default 0
|
2993
|
+
* @category Core
|
2994
|
+
*
|
2995
|
+
* @example
|
2996
|
+
* ```js
|
2997
|
+
* // at Handsontable's initialization, add at least 3 empty rows at the bottom
|
2998
|
+
* minSpareRows: 3,
|
2999
|
+
* ```
|
3000
|
+
*/
|
3001
|
+
minSpareRows: 0,
|
3002
|
+
/**
|
3003
|
+
* @description
|
3004
|
+
* The `multiColumnSorting` option configures the [`MultiColumnSorting`](@/api/columnSorting.md) plugin.
|
3005
|
+
*
|
3006
|
+
* You can set the `multiColumnSorting` option to one of the following:
|
3007
|
+
*
|
3008
|
+
* | Setting | Description |
|
3009
|
+
* | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
3010
|
+
* | `true` | Enable the [`MultiColumnSorting`](@/api/multiColumnSorting.md) plugin with the default configuration |
|
3011
|
+
* | `false` | Disable the [`MultiColumnSorting`](@/api/multiColumnSorting.md) plugin |
|
3012
|
+
* | An object | - Enable the [`MultiColumnSorting`](@/api/multiColumnSorting.md) plugin<br>- Modify the [`MultiColumnSorting`](@/api/multiColumnSorting.md) plugin options |
|
3013
|
+
*
|
3014
|
+
* If you set the `multiColumnSorting` option to an object,
|
3015
|
+
* you can set the following [`MultiColumnSorting`](@/api/multiColumnSorting.md) plugin options:
|
3016
|
+
*
|
3017
|
+
* | Option | Possible settings |
|
3018
|
+
* | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
3019
|
+
* | `indicator` | `true`: Display an arrow icon in the column header, to indicate a sortable column<br>`false`: Don't display the arrow icon in the column header |
|
3020
|
+
* | `headerAction` | `true`: Enable clicking on the column header to sort the column<br>`false`: Disable clicking on the column header to sort the column |
|
3021
|
+
* | `sortEmptyCells` | `true`: Sort empty cells as well<br>`false`: Place empty cells at the end |
|
3022
|
+
* | `compareFunctionFactory` | A [custom compare function](@/guides/rows/row-sorting.md#custom-compare-functions) |
|
3023
|
+
*
|
3024
|
+
* If you set the `multiColumnSorting` option to an object,
|
3025
|
+
* you can also sort individual columns at Handsontable's initialization.
|
3026
|
+
* In the `multiColumnSorting` object, add an object named `initialConfig`,
|
3027
|
+
* with the following properties:
|
3028
|
+
*
|
3029
|
+
* | Option | Possible settings | Description |
|
3030
|
+
* | ----------- | ------------------- | ---------------------------------------------------------------- |
|
3031
|
+
* | `column` | A number | The index of the column that you want to sort at initialization |
|
3032
|
+
* | `sortOrder` | `'asc'` \| `'desc'` | The sorting order:<br>`'asc'`: ascending<br>`'desc'`: descending |
|
3033
|
+
*
|
3034
|
+
* Read more:
|
3035
|
+
* - [Row sorting](@/guides/rows/row-sorting.md)
|
3036
|
+
* - [`columnSorting`](#columnSorting)
|
3037
|
+
*
|
3038
|
+
* @memberof Options#
|
3039
|
+
* @type {boolean|object}
|
3040
|
+
* @default undefined
|
3041
|
+
* @category MultiColumnSorting
|
3042
|
+
*
|
3043
|
+
* @example
|
3044
|
+
* ```js
|
3045
|
+
* // enable the `MultiColumnSorting` plugin
|
3046
|
+
* multiColumnSorting: true
|
3047
|
+
*
|
3048
|
+
* // enable the `MultiColumnSorting` plugin with custom configuration
|
3049
|
+
* multiColumnSorting: {
|
3050
|
+
* // sort empty cells as well
|
3051
|
+
* sortEmptyCells: true,
|
3052
|
+
* // display an arrow icon in the column header
|
3053
|
+
* indicator: true,
|
3054
|
+
* // disable clicking on the column header to sort the column
|
3055
|
+
* headerAction: false,
|
3056
|
+
* // add a custom compare function
|
3057
|
+
* compareFunctionFactory(sortOrder, columnMeta) {
|
3058
|
+
* return function(value, nextValue) {
|
3059
|
+
* // some value comparisons which will return -1, 0 or 1...
|
3060
|
+
* }
|
3061
|
+
* }
|
3062
|
+
* }
|
3063
|
+
*
|
3064
|
+
* // enable the `MultiColumnSorting` plugin
|
3065
|
+
* multiColumnSorting: {
|
3066
|
+
* // at initialization, sort column 1 in ascending order
|
3067
|
+
* initialConfig: {
|
3068
|
+
* column: 1,
|
3069
|
+
* sortOrder: 'asc'
|
3070
|
+
* },
|
3071
|
+
* // at initialization, sort column 2 in descending order
|
3072
|
+
* initialConfig: {
|
3073
|
+
* column: 2,
|
3074
|
+
* sortOrder: 'desc'
|
3075
|
+
* }
|
3076
|
+
* }
|
3077
|
+
* ```
|
3078
|
+
*/
|
3079
|
+
multiColumnSorting: void 0,
|
3080
|
+
/**
|
3081
|
+
* @description
|
3082
|
+
* The `nestedHeaders` option configures the [`NestedHeaders`](@/api/nestedHeaders.md) plugin.
|
3083
|
+
*
|
3084
|
+
* You can set the `nestedHeaders` option to one of the following:
|
3085
|
+
*
|
3086
|
+
* | Setting | Description |
|
3087
|
+
* | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
3088
|
+
* | `false` (default) | Disable the [`NestedHeaders`](@/api/nestedHeaders.md) plugin |
|
3089
|
+
* | `true` | - Enable the [`NestedHeaders`](@/api/nestedHeaders.md) plugin<br>- Don't configure any nested headers |
|
3090
|
+
* | Array of arrays | - Enable the [`NestedHeaders`](@/api/nestedHeaders.md) plugin<br>- Configure headers that are nested on Handsontable's initialization |
|
3091
|
+
*
|
3092
|
+
* If you set the `nestedHeaders` option to an array of arrays, each array configures one set of nested headers.
|
3093
|
+
*
|
3094
|
+
* Each array element configures one header, and can be one of the following:
|
3095
|
+
*
|
3096
|
+
* | Array element | Description |
|
3097
|
+
* | ------------- | -------------------------------------------------------------------------------------------- |
|
3098
|
+
* | A string | The header's label |
|
3099
|
+
* | An object | Properties:<br>`label` (string): the header's label<br>`colspan` (integer): the column width |
|
3100
|
+
*
|
3101
|
+
* Read more:
|
3102
|
+
* - [Plugins: `NestedHeaders`](@/api/nestedHeaders.md)
|
3103
|
+
* - [Column groups: Nested headers](@/guides/columns/column-groups.md#nested-headers)
|
3104
|
+
*
|
3105
|
+
* @memberof Options#
|
3106
|
+
* @type {boolean|Array[]}
|
3107
|
+
* @default undefined
|
3108
|
+
* @category NestedHeaders
|
3109
|
+
*
|
3110
|
+
* @example
|
3111
|
+
* ```js
|
3112
|
+
* nestedHeaders: [
|
3113
|
+
* ['A', {label: 'B', colspan: 8}, 'C'],
|
3114
|
+
* ['D', {label: 'E', colspan: 4}, {label: 'F', colspan: 4}, 'G'],
|
3115
|
+
* ['H', 'I', 'J', 'K', 'L', 'M', 'N', 'R', 'S', 'T']
|
3116
|
+
* ],
|
3117
|
+
* ```
|
3118
|
+
*/
|
3119
|
+
nestedHeaders: void 0,
|
3120
|
+
/**
|
3121
|
+
* @description
|
3122
|
+
* The `nestedRows` option configures the [`NestedRows`](@/api/nestedRows.md) plugin.
|
3123
|
+
*
|
3124
|
+
* You can set the `nestedRows` option to one of the following:
|
3125
|
+
*
|
3126
|
+
* | Setting | Description |
|
3127
|
+
* | ----------------- | ------------------------------------------------------ |
|
3128
|
+
* | `false` (default) | Disable the [`NestedRows`](@/api/nestedRows.md) plugin |
|
3129
|
+
* | `true` | Enable the [`NestedRows`](@/api/nestedRows.md) plugin |
|
3130
|
+
*
|
3131
|
+
* Read more:
|
3132
|
+
* - [Plugins: `NestedRows`](@/api/nestedRows.md)
|
3133
|
+
*
|
3134
|
+
* @example
|
3135
|
+
* ```js
|
3136
|
+
* // enable the `NestedRows` plugin
|
3137
|
+
* nestedRows: true,
|
3138
|
+
* ```
|
3139
|
+
*
|
3140
|
+
* @memberof Options#
|
3141
|
+
* @type {boolean}
|
3142
|
+
* @default false
|
3143
|
+
* @category NestedRows
|
3144
|
+
*/
|
3145
|
+
nestedRows: void 0,
|
3146
|
+
/**
|
3147
|
+
* The `noWordWrapClassName` option lets you add a CSS class name
|
3148
|
+
* to each cell that has the [`wordWrap`](#wordWrap) option set to `false`.
|
3149
|
+
*
|
3150
|
+
* Read more:
|
3151
|
+
* - [`wordWrap`](#wordWrap)
|
3152
|
+
* - [`currentRowClassName`](#currentRowClassName)
|
3153
|
+
* - [`currentColClassName`](#currentColClassName)
|
3154
|
+
* - [`currentHeaderClassName`](#currentHeaderClassName)
|
3155
|
+
* - [`invalidCellClassName`](#invalidCellClassName)
|
3156
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
3157
|
+
* - [`commentedCellClassName`](#commentedCellClassName)
|
3158
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
3159
|
+
* - [`TableClassName`](#TableClassName)
|
3160
|
+
* - [`className`](#className)
|
3161
|
+
*
|
3162
|
+
* @memberof Options#
|
3163
|
+
* @type {string}
|
3164
|
+
* @default 'htNoWrap'
|
3165
|
+
* @category Core
|
3166
|
+
*
|
3167
|
+
* @example
|
3168
|
+
* ```js
|
3169
|
+
* // add an `is-noWrapCell` CSS class name
|
3170
|
+
* // to each cell that doesn't wrap content
|
3171
|
+
* noWordWrapClassName: 'is-noWrapCell',
|
3172
|
+
* ```
|
3173
|
+
*/
|
3174
|
+
noWordWrapClassName: 'htNoWrap',
|
3175
|
+
/**
|
3176
|
+
* The `numericFormat` option configures the number format and the currency format
|
3177
|
+
* of [`numeric`](@/guides/cell-types/numeric-cell-type.md) cells` displayed output
|
3178
|
+
* in the numeric cell renderer.
|
3179
|
+
*
|
3180
|
+
* You can set the `numericFormat` option to an object with the following properties:
|
3181
|
+
*
|
3182
|
+
* | Property | Possible values | Description |
|
3183
|
+
* | ----------- | ----------------------------------------------------------------------------- | --------------- |
|
3184
|
+
* | `pattern` | All [`numbro.js` number formats](https://numbrojs.com/format.html#numbers) | Number format |
|
3185
|
+
* | `culture` | All [`numbro.js` currency formats](https://numbrojs.com/format.html#currency) | Currency format |
|
3186
|
+
*
|
3187
|
+
* The `numericFormat` option as no effect on the numeric cell editor.
|
3188
|
+
*
|
3189
|
+
* In the source data, numeric data is stored as JavaScript numbers.
|
3190
|
+
*
|
3191
|
+
* Read more:
|
3192
|
+
* - [Numeric cell type](@/guides/cell-types/numeric-cell-type.md)
|
3193
|
+
* - [Third-party licenses](@/guides/technical-specification/third-party-licenses.md)
|
3194
|
+
*
|
3195
|
+
* @memberof Options#
|
3196
|
+
* @since 0.35.0
|
3197
|
+
* @type {object}
|
3198
|
+
* @default undefined
|
3199
|
+
* @category Core
|
3200
|
+
*
|
3201
|
+
* @example
|
3202
|
+
* ```js
|
3203
|
+
* columns: [
|
3204
|
+
* {
|
3205
|
+
* // set the `type` of each cell in this column to `numeric`
|
3206
|
+
* type: 'numeric',
|
3207
|
+
* // set the `numericFormat` option for every `numeric` cell of this column
|
3208
|
+
* numericFormat: {
|
3209
|
+
* // set the number format
|
3210
|
+
* pattern: '0,00',
|
3211
|
+
* // set the currency format
|
3212
|
+
* culture: 'en-US'
|
3213
|
+
* }
|
3214
|
+
* }
|
3215
|
+
* ],
|
3216
|
+
* ```
|
3217
|
+
*/
|
3218
|
+
numericFormat: void 0,
|
3219
|
+
/**
|
3220
|
+
* If the `observeDOMVisibility` option is set to `true`,
|
3221
|
+
* Handsontable rerenders every time it detects that the grid was made visible in the DOM.
|
3222
|
+
*
|
3223
|
+
* @memberof Options#
|
3224
|
+
* @type {boolean}
|
3225
|
+
* @default true
|
3226
|
+
* @category Core
|
3227
|
+
*
|
3228
|
+
* @example
|
3229
|
+
* ```js
|
3230
|
+
* // don't rerender the grid on visibility changes
|
3231
|
+
* observeDOMVisibility: false,
|
3232
|
+
* ```
|
3233
|
+
*/
|
3234
|
+
observeDOMVisibility: true,
|
3235
|
+
/**
|
3236
|
+
* The `outsideClickDeselects` option determines what happens to the current [selection](@/guides/cell-features/selection.md)
|
3237
|
+
* when you click outside of the grid.
|
3238
|
+
*
|
3239
|
+
* You can set the `outsideClickDeselects` option to one of the following:
|
3240
|
+
*
|
3241
|
+
* | Setting | Description |
|
3242
|
+
* | ---------------- | -------------------------------------------------------------------------------------------------------- |
|
3243
|
+
* | `true` (default) | On a mouse click outside of the grid, clear the current [selection](@/guides/cell-features/selection.md) |
|
3244
|
+
* | `false` | On a mouse click outside of the grid, keep the current [selection](@/guides/cell-features/selection.md) |
|
3245
|
+
* | A function | A function that takes the click event target and returns a boolean |
|
3246
|
+
*
|
3247
|
+
* @memberof Options#
|
3248
|
+
* @type {boolean|Function}
|
3249
|
+
* @default true
|
3250
|
+
* @category Core
|
3251
|
+
*
|
3252
|
+
* @example
|
3253
|
+
* ```js
|
3254
|
+
* // on a mouse click outside of the grid, clear the current selection
|
3255
|
+
* outsideClickDeselects: true,
|
3256
|
+
*
|
3257
|
+
* // on a mouse click outside of the grid, keep the current selection
|
3258
|
+
* outsideClickDeselects: false,
|
3259
|
+
*
|
3260
|
+
* // take the click event target and return `false`
|
3261
|
+
* outsideClickDeselects(event) {
|
3262
|
+
* return false;
|
3263
|
+
* }
|
3264
|
+
*
|
3265
|
+
* // take the click event target and return `true`
|
3266
|
+
* outsideClickDeselects(event) {
|
3267
|
+
* return false;
|
3268
|
+
* }
|
3269
|
+
* ```
|
3270
|
+
*/
|
3271
|
+
outsideClickDeselects: true,
|
3272
|
+
/**
|
3273
|
+
* @description
|
3274
|
+
* The `persistentState` option configures the [`PersistentState`](@/api/persistentState.md) plugin.
|
3275
|
+
*
|
3276
|
+
* You can set the `persistentState` to one of the following:
|
3277
|
+
*
|
3278
|
+
* | Setting | Description |
|
3279
|
+
* | ----------------- | ---------------------------------------------------------------- |
|
3280
|
+
* | `false` (default) | Disable the [`PersistentState`](@/api/persistentState.md) plugin |
|
3281
|
+
* | `true` | Enable the [`PersistentState`](@/api/persistentState.md) plugin |
|
3282
|
+
*
|
3283
|
+
* Read more:
|
3284
|
+
* - [Saving data: Saving data locally](@/guides/getting-started/saving-data.md#saving-data-locally)
|
3285
|
+
* - [Plugins: `PersistentState`](@/api/persistentState.md)
|
3286
|
+
*
|
3287
|
+
* @memberof Options#
|
3288
|
+
* @type {boolean}
|
3289
|
+
* @default false
|
3290
|
+
* @category PersistentState
|
3291
|
+
*
|
3292
|
+
* @example
|
3293
|
+
* ```js
|
3294
|
+
* // enable the `PersistentState` plugin
|
3295
|
+
* persistentState: true,
|
3296
|
+
* ```
|
3297
|
+
*/
|
3298
|
+
persistentState: void 0,
|
3299
|
+
/**
|
3300
|
+
* The `placeholder` option lets you display placeholder text in every empty cell.
|
3301
|
+
*
|
3302
|
+
* You can set the `placeholder` option to one of the following:
|
3303
|
+
*
|
3304
|
+
* | Setting | Example | Description |
|
3305
|
+
* | ------------------ | -------------- | --------------------------------------------------------------------- |
|
3306
|
+
* | A non-empty string | `'Empty cell'` | Display `Empty cell` text in empty cells |
|
3307
|
+
* | A non-string value | `000` | Display `000` text in empty cells (non-string values get stringified) |
|
3308
|
+
*
|
3309
|
+
* Read more:
|
3310
|
+
* - [`placeholderCellClassName`](#placeholderCellClassName)
|
3311
|
+
*
|
3312
|
+
* @memberof Options#
|
3313
|
+
* @type {string}
|
3314
|
+
* @default undefined
|
3315
|
+
* @category Core
|
3316
|
+
*
|
3317
|
+
* @example
|
3318
|
+
* ```js
|
3319
|
+
* // display 'Empty cell' text
|
3320
|
+
* // in every empty cell of the entire grid
|
3321
|
+
* placeholder: 'Empty cell',
|
3322
|
+
*
|
3323
|
+
* // or
|
3324
|
+
* columns: [
|
3325
|
+
* {
|
3326
|
+
* data: 'date',
|
3327
|
+
* dateFormat: 'DD/MM/YYYY',
|
3328
|
+
* // display 'Empty date cell' text
|
3329
|
+
* // in every empty cell of the `date` column
|
3330
|
+
* placeholder: 'Empty date cell'
|
3331
|
+
* }
|
3332
|
+
* ],
|
3333
|
+
* ```
|
3334
|
+
*/
|
3335
|
+
placeholder: void 0,
|
3336
|
+
/**
|
3337
|
+
* The `placeholderCellClassName` option lets you add a CSS class name to cells
|
3338
|
+
* that contain [`placeholder`](#placeholder) text.
|
3339
|
+
*
|
3340
|
+
* Read more:
|
3341
|
+
* - [Cell validator](@/guides/cell-functions/cell-validator.md)
|
3342
|
+
* - [`placeholder`](#placeholder)
|
3343
|
+
* - [`currentRowClassName`](#currentRowClassName)
|
3344
|
+
* - [`currentHeaderClassName`](#currentHeaderClassName)
|
3345
|
+
* - [`activeHeaderClassName`](#activeHeaderClassName)
|
3346
|
+
* - [`currentColClassName`](#currentColClassName)
|
3347
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
3348
|
+
* - [`commentedCellClassName`](#commentedCellClassName)
|
3349
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
3350
|
+
* - [`TableClassName`](#TableClassName)
|
3351
|
+
* - [`className`](#className)
|
3352
|
+
*
|
3353
|
+
* @memberof Options#
|
3354
|
+
* @type {string}
|
3355
|
+
* @default 'htPlaceholder'
|
3356
|
+
* @category Core
|
3357
|
+
*
|
3358
|
+
* @example
|
3359
|
+
* ```js
|
3360
|
+
* // add a `has-placeholder` CSS class name
|
3361
|
+
* // to each cell that contains `placeholder` text
|
3362
|
+
* placeholderCellClassName: 'has-placeholder',
|
3363
|
+
* ```
|
3364
|
+
*/
|
3365
|
+
placeholderCellClassName: 'htPlaceholder',
|
3366
|
+
/**
|
3367
|
+
* The `preventOverflow` option configures preventing Handsontable
|
3368
|
+
* from overflowing outside of its parent element.
|
3369
|
+
*
|
3370
|
+
* You can set the `preventOverflow` option to one of the following:
|
3371
|
+
*
|
3372
|
+
* | Setting | Description |
|
3373
|
+
* | ----------------- | -------------------------------- |
|
3374
|
+
* | `false` (default) | Don't prevent overflowing |
|
3375
|
+
* | `'horizontal'` | Prevent horizontal overflowing |
|
3376
|
+
* | `'vertical'` | Prevent vertical overflowing |
|
3377
|
+
*
|
3378
|
+
* @memberof Options#
|
3379
|
+
* @type {string|boolean}
|
3380
|
+
* @default false
|
3381
|
+
* @category Core
|
3382
|
+
*
|
3383
|
+
* @example
|
3384
|
+
* ```js
|
3385
|
+
* // prevent horizontal overflowing
|
3386
|
+
* preventOverflow: 'horizontal',
|
3387
|
+
* ```
|
3388
|
+
*/
|
3389
|
+
preventOverflow: false,
|
3390
|
+
/**
|
3391
|
+
* The `preventWheel` option configures preventing the `wheel` event's default action
|
3392
|
+
* on overlays.
|
3393
|
+
*
|
3394
|
+
* You can set the `preventWheel` option to one of the following:
|
3395
|
+
*
|
3396
|
+
* | Setting | Description |
|
3397
|
+
* | ----------------- | ------------------------------------------------ |
|
3398
|
+
* | `false` (default) | Don't prevent the `wheel` event's default action |
|
3399
|
+
* | `true` | Prevent the `wheel` event's default action |
|
3400
|
+
*
|
3401
|
+
* @memberof Options#
|
3402
|
+
* @private
|
3403
|
+
* @type {boolean}
|
3404
|
+
* @default false
|
3405
|
+
* @category Core
|
3406
|
+
*
|
3407
|
+
* @example
|
3408
|
+
* ```js
|
3409
|
+
* // don't prevent the `wheel` event's default action
|
3410
|
+
* preventWheel: false,
|
3411
|
+
* ```
|
3412
|
+
*/
|
3413
|
+
preventWheel: false,
|
3414
|
+
/**
|
3415
|
+
* @description
|
3416
|
+
* The `readOnly` option determines whether a cell, column or comment is editable or not.
|
3417
|
+
*
|
3418
|
+
* You can set the `readOnly` option to one of the following:
|
3419
|
+
*
|
3420
|
+
* | Setting | Decription |
|
3421
|
+
* | ----------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
3422
|
+
* | `false` (default) | Set as editable |
|
3423
|
+
* | `true` | - Set as read-only<br>- Add the [`readOnlyCellClassName`](#readOnlyCellClassName) CSS class name (by default: `htDimmed`) |
|
3424
|
+
*
|
3425
|
+
* `readOnly` cells can't be changed by the [`populateFromArray()`](@/api/core.md#populatefromarray) method.
|
3426
|
+
*
|
3427
|
+
* Read more:
|
3428
|
+
* - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)
|
3429
|
+
*
|
3430
|
+
* @memberof Options#
|
3431
|
+
* @type {boolean}
|
3432
|
+
* @default false
|
3433
|
+
* @category Core
|
3434
|
+
*
|
3435
|
+
* @example
|
3436
|
+
* ```js
|
3437
|
+
* // set as read-only
|
3438
|
+
* readOnly: true,
|
3439
|
+
* ```
|
3440
|
+
*/
|
3441
|
+
readOnly: false,
|
3442
|
+
/**
|
3443
|
+
* The `readOnlyCellClassName` option lets you add a CSS class name to [read-only](#readOnly) cells.
|
3444
|
+
*
|
3445
|
+
* Read more:
|
3446
|
+
* - [`currentRowClassName`](#currentRowClassName)
|
3447
|
+
* - [`currentColClassName`](#currentColClassName)
|
3448
|
+
* - [`currentHeaderClassName`](#currentHeaderClassName)
|
3449
|
+
* - [`activeHeaderClassName`](#activeHeaderClassName)
|
3450
|
+
* - [`invalidCellClassName`](#invalidCellClassName)
|
3451
|
+
* - [`placeholderCellClassName`](#placeholderCellClassName)
|
3452
|
+
* - [`commentedCellClassName`](#commentedCellClassName)
|
3453
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
3454
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
3455
|
+
* - [`TableClassName`](#TableClassName)
|
3456
|
+
*
|
3457
|
+
* @memberof Options#
|
3458
|
+
* @type {string}
|
3459
|
+
* @default 'htDimmed'
|
3460
|
+
* @category Core
|
3461
|
+
*
|
3462
|
+
* @example
|
3463
|
+
* ```js
|
3464
|
+
* // add a `is-readOnly` CSS class name
|
3465
|
+
* // to every read-only cell
|
3466
|
+
* readOnlyCellClassName: 'is-readOnly',
|
3467
|
+
* ```
|
3468
|
+
*/
|
3469
|
+
readOnlyCellClassName: 'htDimmed',
|
3470
|
+
/**
|
3471
|
+
* The `renderAllRows` option configures Handsontable's [row virtualization](@/guides/rows/row-virtualization.md).
|
3472
|
+
*
|
3473
|
+
* You can set the `renderAllRows` option to one of the following:
|
3474
|
+
*
|
3475
|
+
* | Setting | Description |
|
3476
|
+
* | ----------------- | -------------------------------------------------------------------------------------------------- |
|
3477
|
+
* | `false` (default) | Enable [row virtualization](@/guides/rows/row-virtualization.md) |
|
3478
|
+
* | `true` | Disable [row virtualization](@/guides/rows/row-virtualization.md)<br>(render all rows of the grid) |
|
3479
|
+
*
|
3480
|
+
* Read more:
|
3481
|
+
* - [Row virtualization](@/guides/rows/row-virtualization.md)
|
3482
|
+
*
|
3483
|
+
* @memberof Options#
|
3484
|
+
* @type {boolean}
|
3485
|
+
* @default undefined
|
3486
|
+
* @category Core
|
3487
|
+
*
|
3488
|
+
* @example
|
3489
|
+
* ```js
|
3490
|
+
* // disable row virtualization
|
3491
|
+
* renderAllRows: true,
|
3492
|
+
* ```
|
3493
|
+
*/
|
3494
|
+
renderAllRows: void 0,
|
3495
|
+
/**
|
3496
|
+
* @description
|
3497
|
+
* The `renderer` option sets a [cell renderer](@/guides/cell-functions/cell-renderer.md) for a cell.
|
3498
|
+
*
|
3499
|
+
* You can set the `renderer` option to one of the following:
|
3500
|
+
* - A custom renderer function
|
3501
|
+
* - One of the following [cell renderer aliases](@/guides/cell-functions/cell-renderer.md):
|
3502
|
+
*
|
3503
|
+
* | Alias | Cell renderer function |
|
3504
|
+
* | ------------------- | ------------------------------------------------------------------------------ |
|
3505
|
+
* | A custom alias | Your [custom cell renderer](@/guides/cell-functions/cell-renderer.md) function |
|
3506
|
+
* | `'autocomplete'` | `AutocompleteRenderer` |
|
3507
|
+
* | `'base'` | `BaseRenderer` |
|
3508
|
+
* | `'checkbox'` | `CheckboxRenderer` |
|
3509
|
+
* | `'date'` | `DateRenderer` |
|
3510
|
+
* | `'dropdown'` | `DropdownRenderer` |
|
3511
|
+
* | `'html'` | `HtmlRenderer` |
|
3512
|
+
* | `'numeric'` | `NumericRenderer` |
|
3513
|
+
* | `'password'` | `PasswordRenderer` |
|
3514
|
+
* | `'text'` | `TextRenderer` |
|
3515
|
+
* | `'time'` | `TimeRenderer` |
|
3516
|
+
*
|
3517
|
+
* To set the [`renderer`](#renderer), [`editor`](#editor), and [`validator`](#validator)
|
3518
|
+
* options all at once, use the [`type`](#type) option.
|
3519
|
+
*
|
3520
|
+
* Read more:
|
3521
|
+
* - [Cell renderer](@/guides/cell-functions/cell-renderer.md)
|
3522
|
+
* - [Cell type](@/guides/cell-types/cell-type.md)
|
3523
|
+
* - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)
|
3524
|
+
* - [`type`](#type)
|
3525
|
+
*
|
3526
|
+
* @memberof Options#
|
3527
|
+
* @type {string|Function}
|
3528
|
+
* @default undefined
|
3529
|
+
* @category Core
|
3530
|
+
*
|
3531
|
+
* @example
|
3532
|
+
* ```js
|
3533
|
+
* // use the `numeric` renderer for each cell of the entire grid
|
3534
|
+
* renderer: `'numeric'`,
|
3535
|
+
*
|
3536
|
+
* // add a custom renderer function
|
3537
|
+
* renderer(hotInstance, td, row, column, prop, value, cellProperties) {
|
3538
|
+
* // your custom renderer's logic
|
3539
|
+
* ...
|
3540
|
+
* }
|
3541
|
+
*
|
3542
|
+
* // apply the `renderer` option to individual columns
|
3543
|
+
* columns: [
|
3544
|
+
* {
|
3545
|
+
* // use the `autocomplete` renderer for each cell of this column
|
3546
|
+
* renderer: 'autocomplete'
|
3547
|
+
* },
|
3548
|
+
* {
|
3549
|
+
* // use the `myCustomRenderer` renderer for each cell of this column
|
3550
|
+
* renderer: 'myCustomRenderer'
|
3551
|
+
* }
|
3552
|
+
* ]
|
3553
|
+
* ```
|
3554
|
+
*/
|
3555
|
+
renderer: void 0,
|
3556
|
+
/**
|
3557
|
+
* The `rowHeaders` option configures your grid's row headers.
|
3558
|
+
*
|
3559
|
+
* You can set the `rowHeaders` option to one of the following:
|
3560
|
+
*
|
3561
|
+
* | Setting | Description |
|
3562
|
+
* | ---------- | ----------------------------------------------------------------- |
|
3563
|
+
* | `true` | Enable the default row headers ('1', '2', '3', ...) |
|
3564
|
+
* | `false` | Disable row headers |
|
3565
|
+
* | An array | Define your own row headers (e.g. `['One', 'Two', 'Three', ...]`) |
|
3566
|
+
* | A function | Define your own row headers, using a function |
|
3567
|
+
*
|
3568
|
+
* Read more:
|
3569
|
+
* - [Row header](@/guides/rows/row-header.md)
|
3570
|
+
*
|
3571
|
+
* @memberof Options#
|
3572
|
+
* @type {boolean|string[]|Function}
|
3573
|
+
* @default undefined
|
3574
|
+
* @category Core
|
3575
|
+
*
|
3576
|
+
* @example
|
3577
|
+
* ```js
|
3578
|
+
* // enable the default row headers
|
3579
|
+
* rowHeaders: true,
|
3580
|
+
*
|
3581
|
+
* // set your own row headers
|
3582
|
+
* rowHeaders: ['One', 'Two', 'Three'],
|
3583
|
+
*
|
3584
|
+
* // set your own row headers, using a function
|
3585
|
+
* rowHeaders: function(visualRowIndex) {
|
3586
|
+
* return `${visualRowIndex}: AB`;
|
3587
|
+
* },
|
3588
|
+
* ```
|
3589
|
+
*/
|
3590
|
+
rowHeaders: void 0,
|
3591
|
+
/**
|
3592
|
+
* @description
|
3593
|
+
* The `rowHeaderWidth` option configures the width of row headers.
|
3594
|
+
*
|
3595
|
+
* You can set the `rowHeaderWidth` option to one of the following:
|
3596
|
+
*
|
3597
|
+
* | Setting | Description |
|
3598
|
+
* | -------- | ----------------------------------------------- |
|
3599
|
+
* | A number | Set the same width for every row header |
|
3600
|
+
* | An array | Set different widths for individual row headers |
|
3601
|
+
*
|
3602
|
+
* @memberof Options#
|
3603
|
+
* @type {number|number[]}
|
3604
|
+
* @default undefined
|
3605
|
+
* @category Core
|
3606
|
+
*
|
3607
|
+
* @example
|
3608
|
+
* ```js
|
3609
|
+
* // set the same width for every row header
|
3610
|
+
* rowHeaderWidth: 25,
|
3611
|
+
*
|
3612
|
+
* // set different widths for individual row headers
|
3613
|
+
* rowHeaderWidth: [25, 30, 55],
|
3614
|
+
* ```
|
3615
|
+
*/
|
3616
|
+
rowHeaderWidth: void 0,
|
3617
|
+
/**
|
3618
|
+
* The `rowHeights` option sets rows' heights, in pixels.
|
3619
|
+
*
|
3620
|
+
* In the rendering process, the default row height is 23 px (22 px + 1 px of the row's bottom border).
|
3621
|
+
* You can change it to equal or greater than 23px, by setting the `rowHeights` option to one of the following:
|
3622
|
+
*
|
3623
|
+
* | Setting | Description | Example |
|
3624
|
+
* | ----------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
|
3625
|
+
* | A number | Set the same height for every row | `rowHeights: 100` |
|
3626
|
+
* | A string | Set the same height for every row | `rowHeights: '100px'` |
|
3627
|
+
* | An array | Set heights separately for each row | `rowHeights: [100, 120, undefined]` |
|
3628
|
+
* | A function | Set row heights dynamically,<br>on each render | `rowHeights(visualRowIndex) { return visualRowIndex * 10; }` |
|
3629
|
+
* | `undefined` | Used by the [modifyRowHeight](@/api/hooks.md#modifyRowHeight) hook,<br>to detect row height changes | `rowHeights: undefined` |
|
3630
|
+
*
|
3631
|
+
* The `rowHeights` option also sets the minimum row height that can be set
|
3632
|
+
* via the {@link ManualRowResize} and {@link AutoRowSize} plugins (if they are enabled).
|
3633
|
+
*
|
3634
|
+
* Read more:
|
3635
|
+
* - [Row height](@/guides/rows/row-height.md)
|
3636
|
+
*
|
3637
|
+
* @memberof Options#
|
3638
|
+
* @type {number|number[]|string|string[]|Array<undefined>|Function}
|
3639
|
+
* @default undefined
|
3640
|
+
* @category Core
|
3641
|
+
*
|
3642
|
+
* @example
|
3643
|
+
* ```js
|
3644
|
+
* // set every row's height to 100px
|
3645
|
+
* rowHeights: 100,
|
3646
|
+
*
|
3647
|
+
* // set every row's height to 100px
|
3648
|
+
* rowHeights: '100px',
|
3649
|
+
*
|
3650
|
+
* // set the first (by visual index) row's height to 100
|
3651
|
+
* // set the second (by visual index) row's height to 120
|
3652
|
+
* // set the third (by visual index) row's height to `undefined`
|
3653
|
+
* // set any other row's height to the default 23px
|
3654
|
+
* rowHeights: [100, 120, undefined],
|
3655
|
+
*
|
3656
|
+
* // set each row's height individually, using a function
|
3657
|
+
* rowHeights(visualRowIndex) {
|
3658
|
+
* return visualRowIndex * 10;
|
3659
|
+
* },
|
3660
|
+
* ```
|
3661
|
+
*/
|
3662
|
+
rowHeights: void 0,
|
3663
|
+
/**
|
3664
|
+
* @description
|
3665
|
+
* The `search` option configures the [`Search`](@/api/search.md) plugin.
|
3666
|
+
*
|
3667
|
+
* You can set the `search` option to one of the following:
|
3668
|
+
*
|
3669
|
+
* | Setting | Description |
|
3670
|
+
* | ----------------- | ------------------------------------------------------------------------------------ |
|
3671
|
+
* | `false` (default) | Disable the [`Search`](@/api/search.md) plugin |
|
3672
|
+
* | `true` | Enable the [`Search`](@/api/search.md) plugin with the default configuration |
|
3673
|
+
* | An object | - Enable the [`Search`](@/api/search.md) plugin<br>- Apply your custom configuration |
|
3674
|
+
*
|
3675
|
+
* If you set the `search` option to an object, you can configure the following search options:
|
3676
|
+
*
|
3677
|
+
* | Option | Possible settings | Description |
|
3678
|
+
* | ------------------- | ----------------- | ---------------------------------------------------------------------------------------------------- |
|
3679
|
+
* | `searchResultClass` | A string | Add a custom CSS class name to search results |
|
3680
|
+
* | `queryMethod` | A function | Add a [custom query method](@/guides/accessories-and-menus/searching-values.md#custom-query-method) |
|
3681
|
+
* | `callback` | A function | Add a [custom callback function](@/guides/accessories-and-menus/searching-values.md#custom-callback) |
|
3682
|
+
*
|
3683
|
+
* Read more:
|
3684
|
+
* - [Searching values](@/guides/accessories-and-menus/searching-values.md)
|
3685
|
+
* - [Searching values: Custom query method](@/guides/accessories-and-menus/searching-values.md#custom-query-method)
|
3686
|
+
* - [Searching values: Custom callback](@/guides/accessories-and-menus/searching-values.md#custom-callback)
|
3687
|
+
*
|
3688
|
+
* @memberof Options#
|
3689
|
+
* @type {boolean|object}
|
3690
|
+
* @default false
|
3691
|
+
* @category Search
|
3692
|
+
*
|
3693
|
+
* @example
|
3694
|
+
* ```js
|
3695
|
+
* // enable the `Search` plugin with the default configuration
|
3696
|
+
* search: true,
|
3697
|
+
*
|
3698
|
+
* // enable the `Search` plugin with a custom configuration
|
3699
|
+
* search: {
|
3700
|
+
* // add a `customClass` CSS class name to search results
|
3701
|
+
* searchResultClass: 'customClass',
|
3702
|
+
* // add a custom query method
|
3703
|
+
* queryMethod(queryStr, value) {
|
3704
|
+
* ...
|
3705
|
+
* },
|
3706
|
+
* // add a custom callback function
|
3707
|
+
* callback(instance, row, column, value, result) {
|
3708
|
+
* ...
|
3709
|
+
* }
|
3710
|
+
* }
|
3711
|
+
* ```
|
3712
|
+
*/
|
3713
|
+
search: false,
|
3714
|
+
/**
|
3715
|
+
* @description
|
3716
|
+
* The `selectionMode` option configures how [selection](@/guides/cell-features/selection.md) works.
|
3717
|
+
*
|
3718
|
+
* You can set the `selectionMode` option to one of the following:
|
3719
|
+
*
|
3720
|
+
* | Setting | Description |
|
3721
|
+
* | ------------ | ------------------------------------------------------------ |
|
3722
|
+
* | `'single'` | Allow the user to select only one cell at a time. |
|
3723
|
+
* | `'range'` | Allow the user to select one range of cells at a time. |
|
3724
|
+
* | `'multiple'` | Allow the user to select multiple ranges of cells at a time. |
|
3725
|
+
*
|
3726
|
+
* Read more:
|
3727
|
+
* - [Selection: Selecting ranges](@/guides/cell-features/selection.md#selecting-ranges)
|
3728
|
+
*
|
3729
|
+
* @memberof Options#
|
3730
|
+
* @type {string}
|
3731
|
+
* @default 'multiple'
|
3732
|
+
* @category Core
|
3733
|
+
*
|
3734
|
+
* @example
|
3735
|
+
* ```js
|
3736
|
+
* // you can only select one cell at at a time
|
3737
|
+
* selectionMode: 'single',
|
3738
|
+
*
|
3739
|
+
* // you can select one range of cells at a time
|
3740
|
+
* selectionMode: 'range',
|
3741
|
+
*
|
3742
|
+
* // you can select multiple ranges of cells at a time
|
3743
|
+
* selectionMode: 'multiple',
|
3744
|
+
* ```
|
3745
|
+
*/
|
3746
|
+
selectionMode: 'multiple',
|
3747
|
+
/**
|
3748
|
+
* The `selectOptions` option configures options that the end user can choose from in [`select`](@/guides/cell-types/select-cell-type.md) cells.
|
3749
|
+
*
|
3750
|
+
* You can set the `selectOptions` option to one of the following:
|
3751
|
+
*
|
3752
|
+
* | Setting | Description |
|
3753
|
+
* | ------------------------------- | ----------------------------------------------------------------------------- |
|
3754
|
+
* | An array of strings | Each string is one option's value and label |
|
3755
|
+
* | An object with key-string pairs | - Each key is one option's value<br>- The key's string is that option's label |
|
3756
|
+
* | A function | A function that returns an object with key-string pairs |
|
3757
|
+
*
|
3758
|
+
* Read more:
|
3759
|
+
* - [Select cell type](@/guides/cell-types/select-cell-type.md)
|
3760
|
+
*
|
3761
|
+
* @memberof Options#
|
3762
|
+
* @type {string[]|object|Function}
|
3763
|
+
* @default undefined
|
3764
|
+
* @category Core
|
3765
|
+
*
|
3766
|
+
* @example
|
3767
|
+
* ```js
|
3768
|
+
* columns: [
|
3769
|
+
* {
|
3770
|
+
* // set the `type` of each cell in this column to `select`
|
3771
|
+
* type: 'select',
|
3772
|
+
* // set the first option's value and label to `A`
|
3773
|
+
* // set the second option's value and label to `B`
|
3774
|
+
* // set the third option's value and label to `C`
|
3775
|
+
* selectOptions: ['A', 'B', 'C'],
|
3776
|
+
* },
|
3777
|
+
* {
|
3778
|
+
* // set the `type` of each cell in this column to `select`
|
3779
|
+
* type: 'select',
|
3780
|
+
* selectOptions: {
|
3781
|
+
* // set the first option's value to `value1` and label to `Label 1`
|
3782
|
+
* value1: 'Label 1',
|
3783
|
+
* // set the second option's value to `value2` and label to `Label 2`
|
3784
|
+
* value2: 'Label 2',
|
3785
|
+
* // set the third option's value to `value3` and label to `Label 3`
|
3786
|
+
* value3: 'Label 3',
|
3787
|
+
* },
|
3788
|
+
* },
|
3789
|
+
* {
|
3790
|
+
* // set the `type` of each cell in this column to `select`
|
3791
|
+
* type: 'select',
|
3792
|
+
* // set `selectOption` to a function that returns available options as an object
|
3793
|
+
* selectOptions(visualRow, visualColumn, prop) {
|
3794
|
+
* return {
|
3795
|
+
* value1: 'Label 1',
|
3796
|
+
* value2: 'Label 2',
|
3797
|
+
* value3: 'Label 3',
|
3798
|
+
* };
|
3799
|
+
* },
|
3800
|
+
* ],
|
3801
|
+
* ```
|
3802
|
+
*/
|
3803
|
+
selectOptions: void 0,
|
3804
|
+
/**
|
3805
|
+
* @description
|
3806
|
+
* The `skipColumnOnPaste` option determines whether you can paste data into a given column.
|
3807
|
+
*
|
3808
|
+
* You can only apply the `skipColumnOnPaste` option to an entire column, using the [`columns`](#columns) option.
|
3809
|
+
*
|
3810
|
+
* You can set the `skipColumnOnPaste` option to one of the following:
|
3811
|
+
*
|
3812
|
+
* | Setting | Description |
|
3813
|
+
* | ----------------- | ----------------------------------------------------------------------------------------------------- |
|
3814
|
+
* | `false` (default) | Enable pasting data into this column |
|
3815
|
+
* | `true` | - Disable pasting data into this column<br>- On pasting, paste data into the next column to the right |
|
3816
|
+
*
|
3817
|
+
* Read more:
|
3818
|
+
* - [Configuration options: Setting column options](@/guides/getting-started/configuration-options.md#setting-column-options)
|
3819
|
+
*
|
3820
|
+
* @memberof Options#
|
3821
|
+
* @type {boolean}
|
3822
|
+
* @default false
|
3823
|
+
* @category Core
|
3824
|
+
*
|
3825
|
+
* @example
|
3826
|
+
* ```js
|
3827
|
+
* columns: [
|
3828
|
+
* {
|
3829
|
+
* // disable pasting data into this column
|
3830
|
+
* skipColumnOnPaste: true
|
3831
|
+
* }
|
3832
|
+
* ],
|
3833
|
+
* ```
|
3834
|
+
*/
|
3835
|
+
skipColumnOnPaste: false,
|
3836
|
+
/**
|
3837
|
+
* @description
|
3838
|
+
*
|
3839
|
+
* The `skipRowOnPaste` option determines whether you can paste data into a given row.
|
3840
|
+
*
|
3841
|
+
* You can only apply the `skipRowOnPaste` option to an entire row, using the [`cells`](#cells) option.
|
3842
|
+
*
|
3843
|
+
* You can set the `skipRowOnPaste` option to one of the following:
|
3844
|
+
*
|
3845
|
+
* | Setting | Description |
|
3846
|
+
* | ----------------- | ----------------------------------------------------------------------------------- |
|
3847
|
+
* | `false` (default) | Enable pasting data into this row |
|
3848
|
+
* | `true` | - Disable pasting data into this row<br>- On pasting, paste data into the row below |
|
3849
|
+
*
|
3850
|
+
* Read more:
|
3851
|
+
* - [Configuration options: Setting row options](@/guides/getting-started/configuration-options.md#setting-row-options)
|
3852
|
+
*
|
3853
|
+
* @memberof Options#
|
3854
|
+
* @type {boolean}
|
3855
|
+
* @default false
|
3856
|
+
* @category Core
|
3857
|
+
*
|
3858
|
+
* @example
|
3859
|
+
* ```js
|
3860
|
+
* cells(row, column) {
|
3861
|
+
* const cellProperties = {};
|
3862
|
+
*
|
3863
|
+
* // disable pasting data into row 1
|
3864
|
+
* if (row === 1) {
|
3865
|
+
* cellProperties.skipRowOnPaste = true;
|
3866
|
+
* }
|
3867
|
+
*
|
3868
|
+
* return cellProperties;
|
3869
|
+
* }
|
3870
|
+
* ```
|
3871
|
+
*/
|
3872
|
+
skipRowOnPaste: false,
|
3873
|
+
/**
|
3874
|
+
* The `sortByRelevance` option configures whether [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells'
|
3875
|
+
* lists are sorted in the same order as provided in the [`source`](#source) option.
|
3876
|
+
*
|
3877
|
+
* You can set the `sortByRelevance` option to one of the following:
|
3878
|
+
*
|
3879
|
+
* | Setting | Description |
|
3880
|
+
* | ---------------- | ---------------------------------------------------------------------------- |
|
3881
|
+
* | `true` (default) | Sort options in the same order as provided in the [`source`](#source) option |
|
3882
|
+
* | `false` | Sort options alphabetically |
|
3883
|
+
*
|
3884
|
+
* Read more:
|
3885
|
+
* - [`source`](#source)
|
3886
|
+
* - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)
|
3887
|
+
*
|
3888
|
+
* @memberof Options#
|
3889
|
+
* @type {boolean}
|
3890
|
+
* @default true
|
3891
|
+
* @category Core
|
3892
|
+
*
|
3893
|
+
* @example
|
3894
|
+
* ```js
|
3895
|
+
* columns: [{
|
3896
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
3897
|
+
* type: 'autocomplete',
|
3898
|
+
* // set options available in every `autocomplete` cell of this column
|
3899
|
+
* source: ['D', 'C', 'B', 'A'],
|
3900
|
+
* // sort the `autocomplete` option in this order: D, C, B, A
|
3901
|
+
* sortByRelevance: true
|
3902
|
+
* }],
|
3903
|
+
* ```
|
3904
|
+
*/
|
3905
|
+
sortByRelevance: true,
|
3906
|
+
/**
|
3907
|
+
* The `source` option sets options available in [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md)
|
3908
|
+
* and [`dropdown`](@/guides/cell-types/dropdown-cell-type.md) cells.
|
3909
|
+
*
|
3910
|
+
* You can set the `source` option to one of the following:
|
3911
|
+
*
|
3912
|
+
* - An array
|
3913
|
+
* - A function
|
3914
|
+
*
|
3915
|
+
* Read more:
|
3916
|
+
* - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)
|
3917
|
+
* - [Dropdown cell type](@/guides/cell-types/dropdown-cell-type.md)
|
3918
|
+
* - [`strict`](#strict)
|
3919
|
+
* - [`allowHtml`](#allowHtml)
|
3920
|
+
* - [`filter`](#filter)
|
3921
|
+
* - [`sortByRelevance`](#sortByRelevance)
|
3922
|
+
*
|
3923
|
+
* @memberof Options#
|
3924
|
+
* @type {Array|Function}
|
3925
|
+
* @default undefined
|
3926
|
+
* @category Core
|
3927
|
+
*
|
3928
|
+
* @example
|
3929
|
+
* ```js
|
3930
|
+
* // set `source` to an array
|
3931
|
+
* columns: [{
|
3932
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
3933
|
+
* type: 'autocomplete',
|
3934
|
+
* // set options available in every `autocomplete` cell of this column
|
3935
|
+
* source: ['A', 'B', 'C', 'D']
|
3936
|
+
* }],
|
3937
|
+
*
|
3938
|
+
* // set `source` to a function
|
3939
|
+
* columns: [{
|
3940
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
3941
|
+
* type: 'autocomplete',
|
3942
|
+
* // for every `autocomplete` cell in this column, fetch data from an external source
|
3943
|
+
* source(query, callback) {
|
3944
|
+
* fetch('https://example.com/query?q=' + query, function(response) {
|
3945
|
+
* callback(response.items);
|
3946
|
+
* })
|
3947
|
+
* }
|
3948
|
+
* }],
|
3949
|
+
* ```
|
3950
|
+
*/
|
3951
|
+
source: void 0,
|
3952
|
+
/**
|
3953
|
+
* @description
|
3954
|
+
* If the [`data`](#data) option is not set, the `startCols` option sets the initial number of empty columns.
|
3955
|
+
*
|
3956
|
+
* The `startCols` option works only in Handsontable's constructor.
|
3957
|
+
*
|
3958
|
+
* @memberof Options#
|
3959
|
+
* @type {number}
|
3960
|
+
* @default 5
|
3961
|
+
* @category Core
|
3962
|
+
*
|
3963
|
+
* @example
|
3964
|
+
* ```js
|
3965
|
+
* // start with 15 empty columns
|
3966
|
+
* startCols: 15,
|
3967
|
+
* ```
|
3968
|
+
*/
|
3969
|
+
startCols: 5,
|
3970
|
+
/**
|
3971
|
+
* @description
|
3972
|
+
* If the [`data`](#data) option is not set, the `startRows` option sets the initial number of empty rows.
|
3973
|
+
*
|
3974
|
+
* The `startRows` option works only in Handsontable's constructor.
|
3975
|
+
*
|
3976
|
+
* @memberof Options#
|
3977
|
+
* @type {number}
|
3978
|
+
* @default 5
|
3979
|
+
* @category Core
|
3980
|
+
*
|
3981
|
+
* @example
|
3982
|
+
* ```js
|
3983
|
+
* // start with 15 empty rows
|
3984
|
+
* startRows: 15,
|
3985
|
+
* ```
|
3986
|
+
*/
|
3987
|
+
startRows: 5,
|
3988
|
+
/**
|
3989
|
+
* @description
|
3990
|
+
* The `stretchH` option determines what happens when the declared grid width
|
3991
|
+
* is different from the calculated sum of all column widths.
|
3992
|
+
*
|
3993
|
+
* You can set the `stretchH` option to one of the following:
|
3994
|
+
*
|
3995
|
+
* | Setting | Description |
|
3996
|
+
* | ------------------ | ----------------------------------------------------------------- |
|
3997
|
+
* | `'none'` (default) | Don't fit the grid to the container (disable column stretching) |
|
3998
|
+
* | `'last'` | Fit the grid to the container, by stretching only the last column |
|
3999
|
+
* | `'all'` | Fit the grid to the container, by stretching all columns evenly |
|
4000
|
+
*
|
4001
|
+
* Read more:
|
4002
|
+
* - [Column width: Column stretching](@/guides/columns/column-width.md#column-stretching)
|
4003
|
+
*
|
4004
|
+
* @memberof Options#
|
4005
|
+
* @type {string}
|
4006
|
+
* @default 'none'
|
4007
|
+
* @category Core
|
4008
|
+
*
|
4009
|
+
* @example
|
4010
|
+
* ```js
|
4011
|
+
* // fit the grid to the container
|
4012
|
+
* // by stretching all columns evenly
|
4013
|
+
* stretchH: 'all',
|
4014
|
+
* ```
|
4015
|
+
*/
|
4016
|
+
stretchH: 'none',
|
4017
|
+
/**
|
4018
|
+
* The `strict` option configures the behavior of [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md) cells.
|
4019
|
+
*
|
4020
|
+
* You can set the `strict` option to one of the following:
|
4021
|
+
*
|
4022
|
+
* | Setting | Mode | Description |
|
4023
|
+
* | ------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
4024
|
+
* | `true` | [Strict mode](@/guides/cell-types/autocomplete-cell-type.md#autocomplete-strict-mode) | The end user:<br>- Can only choose one of suggested values<br>- Can't enter a custom value |
|
4025
|
+
* | `false` | [Flexible mode](@/guides/cell-types/autocomplete-cell-type.md#autocomplete-flexible-mode) | The end user:<br>- Can choose one of suggested values<br>- Can enter a custom value |
|
4026
|
+
*
|
4027
|
+
* Read more:
|
4028
|
+
* - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)
|
4029
|
+
* - [`source`](#source)
|
4030
|
+
*
|
4031
|
+
* @memberof Options#
|
4032
|
+
* @type {boolean}
|
4033
|
+
* @default undefined
|
4034
|
+
* @category Core
|
4035
|
+
*
|
4036
|
+
* @example
|
4037
|
+
* ```js
|
4038
|
+
* columns: [
|
4039
|
+
* {
|
4040
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
4041
|
+
* type: 'autocomplete',
|
4042
|
+
* // set options available in every `autocomplete` cell of this column
|
4043
|
+
* source: ['A', 'B', 'C'],
|
4044
|
+
* // values entered must match `A`, `B`, or `C`
|
4045
|
+
* strict: true
|
4046
|
+
* },
|
4047
|
+
* ],
|
4048
|
+
* ```
|
4049
|
+
*/
|
4050
|
+
strict: void 0,
|
4051
|
+
/**
|
4052
|
+
* The `tableClassName` option lets you add CSS class names
|
4053
|
+
* to every Handsontable instance inside the `container` element.
|
4054
|
+
*
|
4055
|
+
* You can set the `tableClassName` option to one of the following:
|
4056
|
+
*
|
4057
|
+
* | Setting | Description |
|
4058
|
+
* | ------------------- | ------------------------------------------------------------------------------------------ |
|
4059
|
+
* | A string | Add a single CSS class name to every Handsontable instance inside the `container` element |
|
4060
|
+
* | An array of strings | Add multiple CSS class names to every Handsontable instance inside the `container` element |
|
4061
|
+
*
|
4062
|
+
* Read more:
|
4063
|
+
* - [`currentRowClassName`](#currentRowClassName)
|
4064
|
+
* - [`currentColClassName`](#currentColClassName)
|
4065
|
+
* - [`currentHeaderClassName`](#currentHeaderClassName)
|
4066
|
+
* - [`activeHeaderClassName`](#activeHeaderClassName)
|
4067
|
+
* - [`invalidCellClassName`](#invalidCellClassName)
|
4068
|
+
* - [`placeholderCellClassName`](#placeholderCellClassName)
|
4069
|
+
* - [`readOnlyCellClassName`](#readOnlyCellClassName)
|
4070
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
4071
|
+
* - [`commentedCellClassName`](#commentedCellClassName)
|
4072
|
+
* - [`className`](#className)
|
4073
|
+
*
|
4074
|
+
* @memberof Options#
|
4075
|
+
* @type {string|string[]}
|
4076
|
+
* @default undefined
|
4077
|
+
* @category Core
|
4078
|
+
*
|
4079
|
+
* @example
|
4080
|
+
* ```js
|
4081
|
+
* // add a `your-class-name` CSS class name
|
4082
|
+
* // to every Handsontable instance inside the `container` element
|
4083
|
+
* tableClassName: 'your-class-name',
|
4084
|
+
*
|
4085
|
+
* // add `first-class-name` and `second-class-name` CSS class names
|
4086
|
+
* // to every Handsontable instance inside the `container` element
|
4087
|
+
* tableClassName: ['first-class-name', 'second-class-name'],
|
4088
|
+
* ```
|
4089
|
+
*/
|
4090
|
+
tableClassName: void 0,
|
4091
|
+
/**
|
4092
|
+
* The `tabMoves` option configures the action of the <kbd>**Tab**</kbd> key.
|
4093
|
+
*
|
4094
|
+
* You can set the `tabMoves` option to an object with the following properties
|
4095
|
+
* (or to a function that returns such an object):
|
4096
|
+
*
|
4097
|
+
* | Property | Type | Description |
|
4098
|
+
* | -------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
4099
|
+
* | `row` | Number | - On pressing <kbd>**Tab**</kbd>, move selection `row` rows down<br>- On pressing <kbd>**Shift**</kbd> + <kbd>**Tab**</kbd>, move selection `row` rows up |
|
4100
|
+
* | `col` | Number | - On pressing <kbd>**Tab**</kbd>, move selection `col` columns right<br>- On pressing <kbd>**Shift**</kbd> + <kbd>**Tab**</kbd>, move selection `col` columns left |
|
4101
|
+
*
|
4102
|
+
* @memberof Options#
|
4103
|
+
* @type {object|Function}
|
4104
|
+
* @default {row: 0, col: 1}
|
4105
|
+
* @category Core
|
4106
|
+
*
|
4107
|
+
* @example
|
4108
|
+
* ```js
|
4109
|
+
* // on pressing Tab, move selection 2 rows down and 2 columns right
|
4110
|
+
* // on pressing Shift+Tab, move selection 2 rows up and 2 columns left
|
4111
|
+
* tabMoves: {row: 2, col: 2},
|
4112
|
+
*
|
4113
|
+
* // the same setting, as a function
|
4114
|
+
* // `event` is a DOM Event object received on pressing Tab
|
4115
|
+
* // you can use it to check whether the user pressed Tab or Shift+Tab
|
4116
|
+
* tabMoves(event) {
|
4117
|
+
* return {row: 2, col: 2};
|
4118
|
+
* },
|
4119
|
+
* ```
|
4120
|
+
*/
|
4121
|
+
tabMoves: {
|
4122
|
+
row: 0,
|
4123
|
+
col: 1
|
4124
|
+
},
|
4125
|
+
/**
|
4126
|
+
* @description
|
4127
|
+
* The `title` option configures [column header](@/guides/columns/column-header.md) names.
|
4128
|
+
*
|
4129
|
+
* You can set the `title` option to a string.
|
4130
|
+
*
|
4131
|
+
* Read more:
|
4132
|
+
* - [Column header](@/guides/columns/column-header.md)
|
4133
|
+
* - [`columns`](#columns)
|
4134
|
+
*
|
4135
|
+
* @memberof Options#
|
4136
|
+
* @type {string}
|
4137
|
+
* @default undefined
|
4138
|
+
* @category Core
|
4139
|
+
*
|
4140
|
+
* @example
|
4141
|
+
* ```js
|
4142
|
+
* columns: [
|
4143
|
+
* {
|
4144
|
+
* // set the first column header name to `First name`
|
4145
|
+
* title: 'First name',
|
4146
|
+
* type: 'text',
|
4147
|
+
* },
|
4148
|
+
* {
|
4149
|
+
* // set the second column header name to `Last name`
|
4150
|
+
* title: 'Last name',
|
4151
|
+
* type: 'text',
|
4152
|
+
* }
|
4153
|
+
* ],
|
4154
|
+
* ```
|
4155
|
+
*/
|
4156
|
+
title: void 0,
|
4157
|
+
/**
|
4158
|
+
* The `trimDropdown` option configures the width of the [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md)
|
4159
|
+
* and [`dropdown`](@/guides/cell-types/dropdown-cell-type.md) lists.
|
4160
|
+
*
|
4161
|
+
* You can set the `trimDropdown` option to one of the following:
|
4162
|
+
*
|
4163
|
+
* | Setting | Description |
|
4164
|
+
* | ---------------- | ------------------------------------------------------------------------------- |
|
4165
|
+
* | `true` (default) | Make the dropdown/autocomplete list's width the same as the edited cell's width |
|
4166
|
+
* | `false` | Scale the dropdown/autocomplete list's width to the list's content |
|
4167
|
+
*
|
4168
|
+
* Read more:
|
4169
|
+
* - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)
|
4170
|
+
* - [Dropdown cell type](@/guides/cell-types/dropdown-cell-type.md)
|
4171
|
+
*
|
4172
|
+
* @memberof Options#
|
4173
|
+
* @type {boolean}
|
4174
|
+
* @default true
|
4175
|
+
* @category Core
|
4176
|
+
*
|
4177
|
+
* @example
|
4178
|
+
* ```js
|
4179
|
+
* columns: [
|
4180
|
+
* {
|
4181
|
+
* type: 'autocomplete',
|
4182
|
+
* // for each cell of this column
|
4183
|
+
* // make the `autocomplete` list's width the same as the edited cell's width
|
4184
|
+
* trimDropdown: true,
|
4185
|
+
* },
|
4186
|
+
* {
|
4187
|
+
* type: 'dropdown',
|
4188
|
+
* // for each cell of this column
|
4189
|
+
* // scale the `dropdown` list's width to the list's content
|
4190
|
+
* trimDropdown: false,
|
4191
|
+
* }
|
4192
|
+
* ],
|
4193
|
+
* ```
|
4194
|
+
*/
|
4195
|
+
trimDropdown: true,
|
4196
|
+
/**
|
4197
|
+
* @description
|
4198
|
+
* The `trimRows` option configures the [`TrimRows`](@/api/trimRows.md) plugin.
|
4199
|
+
*
|
4200
|
+
* You can set the `trimRows` option to one of the following:
|
4201
|
+
*
|
4202
|
+
* | Setting | Description |
|
4203
|
+
* | -------------------------------- | --------------------------------------------------------------------------------------------- |
|
4204
|
+
* | `false` | Disable the [`TrimRows`](@/api/trimRows.md) plugin |
|
4205
|
+
* | `true` | Enable the [`TrimRows`](@/api/trimRows.md) plugin |
|
4206
|
+
* | An array of physical row indexes | - Enable the [`TrimRows`](@/api/trimRows.md) plugin<br>- Trim selected rows at initialization |
|
4207
|
+
*
|
4208
|
+
* Read more:
|
4209
|
+
* - [Plugins: `TrimRows`](@/api/trimRows.md)
|
4210
|
+
* - [Row trimming](@/guides/rows/row-trimming.md)
|
4211
|
+
*
|
4212
|
+
* @memberof Options#
|
4213
|
+
* @type {boolean|number[]}
|
4214
|
+
* @default undefined
|
4215
|
+
* @category TrimRows
|
4216
|
+
*
|
4217
|
+
* @example
|
4218
|
+
* ```js
|
4219
|
+
* // enable the `TrimRows` plugin
|
4220
|
+
* trimRows: true,
|
4221
|
+
*
|
4222
|
+
* // enable the `TrimRows` plugin
|
4223
|
+
* // at Handsontable's initialization, trim rows 5, 10, and 15
|
4224
|
+
* trimRows: [5, 10, 15],
|
4225
|
+
* ```
|
4226
|
+
*/
|
4227
|
+
trimRows: void 0,
|
4228
|
+
/**
|
4229
|
+
* The `trimWhitespace` option configures automatic whitespace removal. This option
|
4230
|
+
* affects the cell renderer and the cell editor.
|
4231
|
+
*
|
4232
|
+
* You can set the `trimWhitespace` option to one of the following:
|
4233
|
+
*
|
4234
|
+
* | Setting | Description |
|
4235
|
+
* | ---------------- | --------------------------------------------------------------- |
|
4236
|
+
* | `true` (default) | Remove whitespace at the beginning and at the end of each cell |
|
4237
|
+
* | `false` | Don't remove whitespace |
|
4238
|
+
*
|
4239
|
+
* @memberof Options#
|
4240
|
+
* @type {boolean}
|
4241
|
+
* @default true
|
4242
|
+
* @category Core
|
4243
|
+
*
|
4244
|
+
* @example
|
4245
|
+
* ```js
|
4246
|
+
* columns: [
|
4247
|
+
* {
|
4248
|
+
* // don't remove whitespace
|
4249
|
+
* // from any cell of this column
|
4250
|
+
* trimWhitespace: false
|
4251
|
+
* }
|
4252
|
+
* ]
|
4253
|
+
* ```
|
4254
|
+
*/
|
4255
|
+
trimWhitespace: true,
|
4256
|
+
/**
|
4257
|
+
* @description
|
4258
|
+
* The `type` option lets you set the [`renderer`](#renderer), [`editor`](#editor), and [`validator`](#validator)
|
4259
|
+
* options all at once, by selecting a [cell type](@/guides/cell-types/cell-type.md).
|
4260
|
+
*
|
4261
|
+
* You can set the `type` option to one of the following:
|
4262
|
+
*
|
4263
|
+
* | Cell type | Renderer, editor & validator |
|
4264
|
+
* | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
4265
|
+
* | A [custom cell type](@/guides/cell-types/cell-type.md) | Renderer: your [custom cell renderer](@/guides/cell-functions/cell-renderer.md)<br>Editor: your [custom cell editor](@/guides/cell-functions/cell-editor.md)<br>Validator: your [custom cell validator](@/guides/cell-functions/cell-validator.md) |
|
4266
|
+
* | [`'autocomplete'`](@/guides/cell-types/autocomplete-cell-type.md) | Renderer: `AutocompleteRenderer`<br>Editor: `AutocompleteEditor`<br>Validator: `AutocompleteValidator` |
|
4267
|
+
* | [`'checkbox'`](@/guides/cell-types/checkbox-cell-type.md) | Renderer: `CheckboxRenderer`<br>Editor: `CheckboxEditor`<br>Validator: - |
|
4268
|
+
* | [`'date'`](@/guides/cell-types/date-cell-type.md) | Renderer: `DateRenderer`<br>Editor: `DateEditor`<br>Validator: `DateValidator` |
|
4269
|
+
* | [`'dropdown'`](@/guides/cell-types/dropdown-cell-type.md) | Renderer: `DropdownRenderer`<br>Editor: `DropdownEditor`<br>Validator: `DropdownValidator` |
|
4270
|
+
* | [`'handsontable'`](@/guides/cell-types/handsontable-cell-type.md) | Renderer: `AutocompleteRenderer`<br>Editor: `HandsontableEditor`<br>Validator: - |
|
4271
|
+
* | [`'numeric'`](@/guides/cell-types/numeric-cell-type.md) | Renderer: `NumericRenderer`<br>Editor: `NumericEditor`<br>Validator: `NumericValidator` |
|
4272
|
+
* | [`'password'`](@/guides/cell-types/password-cell-type.md) | Renderer: `PasswordRenderer`<br>Editor: `PasswordEditor`<br>Validator: - |
|
4273
|
+
* | `'text'` | Renderer: `TextRenderer`<br>Editor: `TextEditor`<br>Validator: - |
|
4274
|
+
* | [`'time`'](@/guides/cell-types/time-cell-type.md) | Renderer: `TimeRenderer`<br>Editor: `TimeEditor`<br>Validator: `TimeValidator` |
|
4275
|
+
*
|
4276
|
+
* Read more:
|
4277
|
+
* - [Cell type](@/guides/cell-types/cell-type.md)
|
4278
|
+
* - [Cell renderer](@/guides/cell-functions/cell-renderer.md)
|
4279
|
+
* - [Cell editor](@/guides/cell-functions/cell-editor.md)
|
4280
|
+
* - [Cell validator](@/guides/cell-functions/cell-validator.md)
|
4281
|
+
* - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)
|
4282
|
+
* - [`renderer`](#renderer)
|
4283
|
+
* - [`editor`](#editor)
|
4284
|
+
* - [`validator`](#validator)
|
4285
|
+
*
|
4286
|
+
* @memberof Options#
|
4287
|
+
* @type {string}
|
4288
|
+
* @default 'text'
|
4289
|
+
* @category Core
|
4290
|
+
*
|
4291
|
+
* @example
|
4292
|
+
* ```js
|
4293
|
+
* // set the `numeric` cell type for each cell of the entire grid
|
4294
|
+
* type: `'numeric'`,
|
4295
|
+
*
|
4296
|
+
* // apply the `type` option to individual columns
|
4297
|
+
* columns: [
|
4298
|
+
* {
|
4299
|
+
* // set the `autocomplete` cell type for each cell of this column
|
4300
|
+
* type: 'autocomplete'
|
4301
|
+
* },
|
4302
|
+
* {
|
4303
|
+
* // set the `myCustomCellType` cell type for each cell of this column
|
4304
|
+
* type: 'myCustomCellType'
|
4305
|
+
* }
|
4306
|
+
* ]
|
4307
|
+
* ```
|
4308
|
+
*/
|
4309
|
+
type: 'text',
|
4310
|
+
/**
|
4311
|
+
* The `uncheckedTemplate` option lets you configure what value
|
4312
|
+
* an unchecked [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell has.
|
4313
|
+
*
|
4314
|
+
* You can set the `uncheckedTemplate` option to one of the following:
|
4315
|
+
*
|
4316
|
+
* | Setting | Description |
|
4317
|
+
* | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
4318
|
+
* | `false` (default) | If a [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell is unchecked,<br>the [`getDataAtCell`](@/api/core.md#getDataAtCell) method for this cell returns `false` |
|
4319
|
+
* | A string | If a [`checkbox`](@/guides/cell-types/checkbox-cell-type.md) cell is unchecked,<br>the [`getDataAtCell`](@/api/core.md#getDataAtCell) method for this cell returns a string of your choice |
|
4320
|
+
*
|
4321
|
+
* Read more:
|
4322
|
+
* - [Checkbox cell type: Checkbox template](@/guides/cell-types/checkbox-cell-type.md#checkbox-template)
|
4323
|
+
* - [`getDataAtCell()`](@/api/core.md#getDataAtCell)
|
4324
|
+
* - [`checkedTemplate`](#checkedTemplate)
|
4325
|
+
*
|
4326
|
+
* @memberof Options#
|
4327
|
+
* @type {boolean|string|number}
|
4328
|
+
* @default false
|
4329
|
+
* @category Core
|
4330
|
+
*
|
4331
|
+
* @example
|
4332
|
+
* ```js
|
4333
|
+
* columns: [
|
4334
|
+
* {
|
4335
|
+
* // set the `type` of each cell in this column to `checkbox`
|
4336
|
+
* // when unchecked, the cell's value is `false`
|
4337
|
+
* // when checked, the cell's value is `true`
|
4338
|
+
* type: 'checkbox',
|
4339
|
+
* },
|
4340
|
+
* {
|
4341
|
+
* // set the `type` of each cell in this column to `checkbox`
|
4342
|
+
* // when unchecked, the cell's value is `'No'`
|
4343
|
+
* // when checked, the cell's value is `'Yes'`
|
4344
|
+
* type: 'checkbox',
|
4345
|
+
* uncheckedTemplate: 'No'
|
4346
|
+
* checkedTemplate: 'Yes',
|
4347
|
+
* }
|
4348
|
+
* ],
|
4349
|
+
* ```
|
4350
|
+
*/
|
4351
|
+
uncheckedTemplate: void 0,
|
4352
|
+
/**
|
4353
|
+
* The `undo` option configures the [`UndoRedo`](@/api/undoRedo.md) plugin.
|
4354
|
+
*
|
4355
|
+
* You can set the `undo` option to one of the following:
|
4356
|
+
*
|
4357
|
+
* | Setting | Description |
|
4358
|
+
* | ------- | -------------------------------------------------- |
|
4359
|
+
* | `true` | Enable the [`UndoRedo`](@/api/undoRedo.md) plugin |
|
4360
|
+
* | `false` | Disable the [`UndoRedo`](@/api/undoRedo.md) plugin |
|
4361
|
+
*
|
4362
|
+
* By default, the `undo` option is set to `undefined`,
|
4363
|
+
* but the [`UndoRedo`](@/api/undoRedo.md) plugin acts as enabled.
|
4364
|
+
* To disable the [`UndoRedo`](@/api/undoRedo.md) plugin completely,
|
4365
|
+
* set the `undo` option to `false`.
|
4366
|
+
*
|
4367
|
+
* Read more:
|
4368
|
+
* - [Undo and redo](@/guides/accessories-and-menus/undo-redo.md)
|
4369
|
+
*
|
4370
|
+
* @memberof Options#
|
4371
|
+
* @type {boolean}
|
4372
|
+
* @default undefined
|
4373
|
+
* @category UndoRedo
|
4374
|
+
*
|
4375
|
+
* @example
|
4376
|
+
* ```js
|
4377
|
+
* // enable the `UndoRedo` plugin
|
4378
|
+
* undo: true,
|
4379
|
+
* ```
|
4380
|
+
*/
|
4381
|
+
undo: void 0,
|
4382
|
+
/**
|
4383
|
+
* @description
|
4384
|
+
* The `validator` option sets a [cell validator](@/guides/cell-functions/cell-validator.md) for a cell.
|
4385
|
+
*
|
4386
|
+
* You can set the `validator` option to one of the following:
|
4387
|
+
*
|
4388
|
+
* | Setting | Description |
|
4389
|
+
* | -------------------- | -------------------------------------------------------------------------------- |
|
4390
|
+
* | A string | A [cell validator alias](@/guides/cell-functions/cell-validator.md) |
|
4391
|
+
* | A function | Your [custom cell validator function](@/guides/cell-functions/cell-validator.md) |
|
4392
|
+
* | A regular expression | A regular expression used for cell validation |
|
4393
|
+
*
|
4394
|
+
* By setting the `validator` option to a string,
|
4395
|
+
* you can use one of the following [cell validator aliases](@/guides/cell-functions/cell-validator.md):
|
4396
|
+
*
|
4397
|
+
* | Alias | Cell validator function |
|
4398
|
+
* | ------------------- | ----------------------------------------------------------------------- |
|
4399
|
+
* | A custom alias | Your [custom cell validator](@/guides/cell-functions/cell-validator.md) |
|
4400
|
+
* | `'autocomplete'` | `AutocompleteValidator` |
|
4401
|
+
* | `'date'` | `DateValidator` |
|
4402
|
+
* | `'dropdown'` | `DropdownValidator` |
|
4403
|
+
* | `'numeric'` | `NumericValidator` |
|
4404
|
+
* | `'time'` | `TimeValidator` |
|
4405
|
+
*
|
4406
|
+
* To set the [`editor`](#editor), [`renderer`](#renderer), and [`validator`](#validator)
|
4407
|
+
* options all at once, use the [`type`](#type) option.
|
4408
|
+
*
|
4409
|
+
* Read more:
|
4410
|
+
* - [Cell validator](@/guides/cell-functions/cell-validator.md)
|
4411
|
+
* - [Cell type](@/guides/cell-types/cell-type.md)
|
4412
|
+
* - [Configuration options: Cascading configuration](@/guides/getting-started/configuration-options.md#cascading-configuration)
|
4413
|
+
* - [`type`](#type)
|
4414
|
+
*
|
4415
|
+
* @memberof Options#
|
4416
|
+
* @type {Function|RegExp|string}
|
4417
|
+
* @default undefined
|
4418
|
+
* @category Core
|
4419
|
+
*
|
4420
|
+
* @example
|
4421
|
+
* ```js
|
4422
|
+
* columns: [
|
4423
|
+
* {
|
4424
|
+
* // use a built-in `numeric` cell validator
|
4425
|
+
* validator: 'numeric'
|
4426
|
+
* },
|
4427
|
+
* {
|
4428
|
+
* // validate against a regular expression
|
4429
|
+
* validator: /^[0-9]$/
|
4430
|
+
* },
|
4431
|
+
* {
|
4432
|
+
* // add a custom cell validator function
|
4433
|
+
* validator(value, callback) {
|
4434
|
+
* ...
|
4435
|
+
* }
|
4436
|
+
* },
|
4437
|
+
* ],
|
4438
|
+
* ```
|
4439
|
+
*/
|
4440
|
+
validator: void 0,
|
4441
|
+
/**
|
4442
|
+
* @description
|
4443
|
+
* The `viewportColumnRenderingOffset` option configures the number of columns
|
4444
|
+
* to be rendered outside of the grid's viewport.
|
4445
|
+
*
|
4446
|
+
* You can set the `viewportColumnRenderingOffset` option to one of the following:
|
4447
|
+
*
|
4448
|
+
* | Setting | Description |
|
4449
|
+
* | ------------------ | ------------------------------------------------------- |
|
4450
|
+
* | `auto` (default) | Use the offset calculated automatically by Handsontable |
|
4451
|
+
* | A number | Set the offset manually |
|
4452
|
+
*
|
4453
|
+
* Read more:
|
4454
|
+
* - [Performance: Define the number of pre-rendered rows and columns](@/guides/optimization/performance.md#define-the-number-of-pre-rendered-rows-and-columns)
|
4455
|
+
*
|
4456
|
+
* @memberof Options#
|
4457
|
+
* @type {number|string}
|
4458
|
+
* @default 'auto'
|
4459
|
+
* @category Core
|
4460
|
+
*
|
4461
|
+
* @example
|
4462
|
+
* ```js
|
4463
|
+
* // render 70 columns outside of the grid's viewport
|
4464
|
+
* viewportColumnRenderingOffset: 70,
|
4465
|
+
* ```
|
4466
|
+
*/
|
4467
|
+
viewportColumnRenderingOffset: 'auto',
|
4468
|
+
/**
|
4469
|
+
* @description
|
4470
|
+
* The `viewportRowRenderingOffset` option configures the number of rows
|
4471
|
+
* to be rendered outside of the grid's viewport.
|
4472
|
+
*
|
4473
|
+
* You can set the `viewportRowRenderingOffset` option to one of the following:
|
4474
|
+
*
|
4475
|
+
* | Setting | Description |
|
4476
|
+
* | ------------------ | ------------------------------------------------------- |
|
4477
|
+
* | `auto` (default) | Use the offset calculated automatically by Handsontable |
|
4478
|
+
* | A number | Set the offset manually |
|
4479
|
+
*
|
4480
|
+
* Read more:
|
4481
|
+
* - [Performance: Define the number of pre-rendered rows and columns](@/guides/optimization/performance.md#define-the-number-of-pre-rendered-rows-and-columns)
|
4482
|
+
* - [Column virtualization](@/guides/columns/column-virtualization.md)
|
4483
|
+
*
|
4484
|
+
* @memberof Options#
|
4485
|
+
* @type {number|string}
|
4486
|
+
* @default 'auto'
|
4487
|
+
* @category Core
|
4488
|
+
*
|
4489
|
+
* @example
|
4490
|
+
* ```js
|
4491
|
+
* // render 70 rows outside of the grid's viewport
|
4492
|
+
* viewportRowRenderingOffset: 70,
|
4493
|
+
* ```
|
4494
|
+
*/
|
4495
|
+
viewportRowRenderingOffset: 'auto',
|
4496
|
+
/**
|
4497
|
+
* The `visibleRows` option sets the height of the [`autocomplete`](@/guides/cell-types/autocomplete-cell-type.md)
|
4498
|
+
* and [`dropdown`](@/guides/cell-types/dropdown-cell-type.md) lists.
|
4499
|
+
*
|
4500
|
+
* When the number of list options exceeds the `visibleRows` number, a scrollbar appears.
|
4501
|
+
*
|
4502
|
+
* Read more:
|
4503
|
+
* - [Autocomplete cell type](@/guides/cell-types/autocomplete-cell-type.md)
|
4504
|
+
* - [Dropdown cell type](@/guides/cell-types/dropdown-cell-type.md)
|
4505
|
+
*
|
4506
|
+
* @memberof Options#
|
4507
|
+
* @type {number}
|
4508
|
+
* @default 10
|
4509
|
+
* @category Core
|
4510
|
+
*
|
4511
|
+
* @example
|
4512
|
+
* ```js
|
4513
|
+
* columns: [
|
4514
|
+
* {
|
4515
|
+
* type: 'autocomplete',
|
4516
|
+
* // set the `autocomplete` list's height to 15 options
|
4517
|
+
* // for each cell of this column
|
4518
|
+
* visibleRows: 15,
|
4519
|
+
* },
|
4520
|
+
* {
|
4521
|
+
* type: 'dropdown',
|
4522
|
+
* // set the `dropdown` list's height to 5 options
|
4523
|
+
* // for each cell of this column
|
4524
|
+
* visibleRows: 5,
|
4525
|
+
* }
|
4526
|
+
* ],
|
4527
|
+
* ```
|
4528
|
+
*/
|
4529
|
+
visibleRows: 10,
|
4530
|
+
/**
|
4531
|
+
* The `width` option configures the width of your grid.
|
4532
|
+
*
|
4533
|
+
* You can set the `width` option to one of the following:
|
4534
|
+
*
|
4535
|
+
* | Setting | Example |
|
4536
|
+
* | -------------------------------------------------------------------------- | ------------------------- |
|
4537
|
+
* | A number of pixels | `width: 500` |
|
4538
|
+
* | A string with a [CSS unit](https://www.w3schools.com/cssref/css_units.asp) | `width: '75vw'` |
|
4539
|
+
* | A function that returns a valid number or string | `width() { return 500; }` |
|
4540
|
+
*
|
4541
|
+
* Read more:
|
4542
|
+
* - [Grid size](@/guides/getting-started/grid-size.md)
|
4543
|
+
*
|
4544
|
+
* @memberof Options#
|
4545
|
+
* @type {number|string|Function}
|
4546
|
+
* @default undefined
|
4547
|
+
* @category Core
|
4548
|
+
*
|
4549
|
+
* @example
|
4550
|
+
* ```js
|
4551
|
+
* // set the grid's width to 500px
|
4552
|
+
* width: 500,
|
4553
|
+
*
|
4554
|
+
* // set the grid's width to 75vw
|
4555
|
+
* width: '75vw',
|
4556
|
+
*
|
4557
|
+
* // set the grid's width to 500px, using a function
|
4558
|
+
* width() {
|
4559
|
+
* return 500;
|
4560
|
+
* },
|
4561
|
+
* ```
|
4562
|
+
*/
|
4563
|
+
width: void 0,
|
4564
|
+
/**
|
4565
|
+
* The `wordWrap` option configures whether content that exceeds a column's width is wrapped or not.
|
4566
|
+
*
|
4567
|
+
* You can set the `wordWrap` option to one of the following:
|
4568
|
+
*
|
4569
|
+
* | Setting | Description |
|
4570
|
+
* | ---------------- | ------------------------------------------------------- |
|
4571
|
+
* | `true` (default) | If content exceeds the column's width, wrap the content |
|
4572
|
+
* | `false` | Don't wrap content |
|
4573
|
+
*
|
4574
|
+
* To style cells that don't wrap content, use the [`noWordWrapClassName`](#noWordWrapClassName) option.
|
4575
|
+
*
|
4576
|
+
* Read more:
|
4577
|
+
* - [`noWordWrapClassName`](#noWordWrapClassName)
|
4578
|
+
*
|
4579
|
+
* @memberof Options#
|
4580
|
+
* @type {boolean}
|
4581
|
+
* @default true
|
4582
|
+
* @category Core
|
4583
|
+
*
|
4584
|
+
* @example
|
4585
|
+
* ```js
|
4586
|
+
* // set column width for every column of the entire grid
|
4587
|
+
* colWidths: 100,
|
4588
|
+
*
|
4589
|
+
* columns: [
|
4590
|
+
* {
|
4591
|
+
* // don't wrap content in this column
|
4592
|
+
* wordWrap: false,
|
4593
|
+
* },
|
4594
|
+
* {
|
4595
|
+
* // if content exceeds this column's width, wrap the content
|
4596
|
+
* wordWrap: true,
|
4597
|
+
* }
|
4598
|
+
* ],
|
4599
|
+
* ```
|
4600
|
+
*/
|
4601
|
+
wordWrap: true
|
4602
|
+
|
4603
|
+
/* eslint-enable jsdoc/require-description-complete-sentence */
|
4604
|
+
};
|
4605
|
+
});
|