handsontable 0.0.0-next-440bcae-20231107 → 0.0.0-next-dc2c114-20231107
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 +2 -2
- package/3rdparty/SheetClip/SheetClip.mjs +2 -2
- package/3rdparty/autoResize/autoResize.js +2 -2
- package/3rdparty/autoResize/autoResize.mjs +2 -2
- package/3rdparty/walkontable/src/calculator/viewportColumns.js +108 -85
- package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +108 -85
- package/3rdparty/walkontable/src/calculator/viewportRows.js +60 -52
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +60 -52
- package/3rdparty/walkontable/src/core/clone.js +6 -0
- package/3rdparty/walkontable/src/core/clone.mjs +6 -0
- package/3rdparty/walkontable/src/event.js +125 -74
- package/3rdparty/walkontable/src/event.mjs +125 -74
- package/3rdparty/walkontable/src/filter/column.js +16 -0
- package/3rdparty/walkontable/src/filter/column.mjs +16 -0
- package/3rdparty/walkontable/src/filter/row.js +16 -0
- package/3rdparty/walkontable/src/filter/row.mjs +16 -0
- package/3rdparty/walkontable/src/overlay/bottom.js +1 -1
- package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -1
- package/3rdparty/walkontable/src/overlay/top.js +1 -1
- package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/_base.js +12 -5
- package/3rdparty/walkontable/src/renderer/_base.mjs +12 -5
- package/3rdparty/walkontable/src/renderer/cells.js +6 -2
- package/3rdparty/walkontable/src/renderer/cells.mjs +6 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -2
- package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +6 -2
- package/3rdparty/walkontable/src/renderer/rows.js +5 -0
- package/3rdparty/walkontable/src/renderer/rows.mjs +5 -0
- package/3rdparty/walkontable/src/renderer/table.js +24 -17
- package/3rdparty/walkontable/src/renderer/table.mjs +24 -17
- package/3rdparty/walkontable/src/scroll.js +2 -2
- package/3rdparty/walkontable/src/scroll.mjs +2 -2
- package/3rdparty/walkontable/src/selection/border/border.js +1 -1
- package/3rdparty/walkontable/src/selection/border/border.mjs +1 -1
- package/3rdparty/walkontable/src/settings.js +10 -10
- package/3rdparty/walkontable/src/settings.mjs +10 -10
- package/3rdparty/walkontable/src/table.js +3 -3
- package/3rdparty/walkontable/src/table.mjs +3 -3
- package/3rdparty/walkontable/src/utils/column.js +19 -4
- package/3rdparty/walkontable/src/utils/column.mjs +19 -4
- package/3rdparty/walkontable/src/utils/nodesPool.js +5 -0
- package/3rdparty/walkontable/src/utils/nodesPool.mjs +5 -0
- package/3rdparty/walkontable/src/utils/orderView/view.js +13 -6
- package/3rdparty/walkontable/src/utils/orderView/view.mjs +13 -6
- package/3rdparty/walkontable/src/utils/orderView/viewSize.js +9 -6
- package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +9 -6
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +7 -4
- package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +7 -4
- package/3rdparty/walkontable/src/utils/row.js +14 -2
- package/3rdparty/walkontable/src/utils/row.mjs +14 -2
- package/3rdparty/walkontable/src/viewport.js +9 -9
- package/3rdparty/walkontable/src/viewport.mjs +9 -9
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.js +31 -26
- package/core.mjs +31 -26
- package/dataMap/dataMap.js +99 -90
- package/dataMap/dataMap.mjs +99 -90
- package/dataMap/dataSource.js +14 -8
- package/dataMap/dataSource.mjs +14 -8
- package/dataMap/metaManager/lazyFactoryMap.js +19 -7
- package/dataMap/metaManager/lazyFactoryMap.mjs +19 -7
- package/dataMap/metaManager/metaLayers/cellMeta.js +8 -3
- package/dataMap/metaManager/metaLayers/cellMeta.mjs +8 -3
- package/dataMap/metaManager/metaLayers/columnMeta.js +7 -1
- package/dataMap/metaManager/metaLayers/columnMeta.mjs +7 -1
- package/dataMap/metaManager/metaLayers/globalMeta.js +6 -1
- package/dataMap/metaManager/metaLayers/globalMeta.mjs +6 -1
- package/dataMap/metaManager/metaLayers/tableMeta.js +6 -2
- package/dataMap/metaManager/metaLayers/tableMeta.mjs +6 -2
- package/dataMap/metaManager/metaSchema.js +55 -55
- package/dataMap/metaManager/metaSchema.mjs +55 -55
- package/dataMap/metaManager/mods/dynamicCellMeta.js +7 -2
- package/dataMap/metaManager/mods/dynamicCellMeta.mjs +7 -2
- package/dataMap/metaManager/mods/extendMetaProperties.js +8 -4
- package/dataMap/metaManager/mods/extendMetaProperties.mjs +8 -4
- package/dataMap/metaManager/utils.js +2 -2
- package/dataMap/metaManager/utils.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +7251 -6352
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +120 -120
- package/dist/handsontable.js +7250 -6351
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +28 -28
- package/editorManager.js +105 -95
- package/editorManager.mjs +105 -95
- package/editors/autocompleteEditor/autocompleteEditor.js +47 -46
- package/editors/autocompleteEditor/autocompleteEditor.mjs +46 -45
- package/editors/baseEditor/baseEditor.js +23 -26
- package/editors/baseEditor/baseEditor.mjs +23 -26
- package/editors/dateEditor/dateEditor.js +24 -15
- package/editors/dateEditor/dateEditor.mjs +24 -15
- package/editors/dropdownEditor/dropdownEditor.js +1 -1
- package/editors/dropdownEditor/dropdownEditor.mjs +1 -1
- package/editors/handsontableEditor/handsontableEditor.js +4 -4
- package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
- package/editors/textEditor/textEditor.js +23 -17
- package/editors/textEditor/textEditor.mjs +24 -18
- package/eventManager.js +8 -0
- package/eventManager.mjs +8 -0
- package/helpers/array.js +2 -2
- package/helpers/array.mjs +2 -2
- package/helpers/dom/element.js +7 -7
- package/helpers/dom/element.mjs +7 -7
- package/helpers/function.js +1 -1
- package/helpers/function.mjs +1 -1
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/helpers/object.js +4 -4
- package/helpers/object.mjs +4 -4
- package/helpers/string.js +1 -1
- package/helpers/string.mjs +1 -1
- package/package.json +1 -1
- package/pluginHooks.js +12 -3
- package/pluginHooks.mjs +12 -3
- package/plugins/autoColumnSize/autoColumnSize.js +141 -130
- package/plugins/autoColumnSize/autoColumnSize.mjs +140 -129
- package/plugins/autoRowSize/autoRowSize.js +112 -125
- package/plugins/autoRowSize/autoRowSize.mjs +110 -123
- package/plugins/autofill/autofill.js +97 -102
- package/plugins/autofill/autofill.mjs +96 -101
- package/plugins/base/base.js +57 -22
- package/plugins/base/base.mjs +56 -22
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +29 -24
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +28 -23
- package/plugins/collapsibleColumns/collapsibleColumns.js +104 -107
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +102 -104
- package/plugins/columnSorting/columnSorting.js +105 -98
- package/plugins/columnSorting/columnSorting.mjs +104 -97
- package/plugins/columnSorting/columnStatesManager.js +12 -6
- package/plugins/columnSorting/columnStatesManager.mjs +12 -6
- package/plugins/columnSummary/columnSummary.js +71 -58
- package/plugins/columnSummary/columnSummary.mjs +70 -57
- package/plugins/columnSummary/endpoints.js +20 -14
- package/plugins/columnSummary/endpoints.mjs +20 -14
- package/plugins/comments/commentEditor.js +30 -2
- package/plugins/comments/commentEditor.mjs +30 -2
- package/plugins/comments/comments.js +158 -169
- package/plugins/comments/comments.mjs +157 -168
- package/plugins/comments/displaySwitch.js +7 -3
- package/plugins/comments/displaySwitch.mjs +7 -3
- package/plugins/contextMenu/commandExecutor.js +15 -2
- package/plugins/contextMenu/commandExecutor.mjs +15 -2
- package/plugins/contextMenu/contextMenu.js +91 -101
- package/plugins/contextMenu/contextMenu.mjs +90 -100
- package/plugins/contextMenu/itemsFactory.js +19 -4
- package/plugins/contextMenu/itemsFactory.mjs +19 -4
- package/plugins/contextMenu/menu/cursor.js +36 -0
- package/plugins/contextMenu/menu/cursor.mjs +36 -0
- package/plugins/contextMenu/menu/menu.js +57 -5
- package/plugins/contextMenu/menu/menu.mjs +57 -5
- package/plugins/copyPaste/copyPaste.js +74 -75
- package/plugins/copyPaste/copyPaste.mjs +74 -75
- package/plugins/customBorders/customBorders.js +49 -48
- package/plugins/customBorders/customBorders.mjs +48 -47
- package/plugins/dragToScroll/dragToScroll.js +50 -54
- package/plugins/dragToScroll/dragToScroll.mjs +49 -52
- package/plugins/dropdownMenu/dropdownMenu.js +132 -129
- package/plugins/dropdownMenu/dropdownMenu.mjs +132 -129
- package/plugins/exportFile/dataProvider.js +7 -2
- package/plugins/exportFile/dataProvider.mjs +7 -2
- package/plugins/exportFile/exportFile.js +1 -1
- package/plugins/exportFile/exportFile.mjs +1 -1
- package/plugins/exportFile/types/_base.js +14 -6
- package/plugins/exportFile/types/_base.mjs +14 -6
- package/plugins/filters/component/actionBar.js +9 -0
- package/plugins/filters/component/actionBar.mjs +9 -0
- package/plugins/filters/component/condition.js +13 -0
- package/plugins/filters/component/condition.mjs +13 -0
- package/plugins/filters/component/operators.js +9 -0
- package/plugins/filters/component/operators.mjs +9 -0
- package/plugins/filters/component/value.js +9 -0
- package/plugins/filters/component/value.mjs +9 -0
- package/plugins/filters/conditionCollection.js +9 -4
- package/plugins/filters/conditionCollection.mjs +9 -4
- package/plugins/filters/conditionUpdateObserver.js +53 -42
- package/plugins/filters/conditionUpdateObserver.mjs +53 -42
- package/plugins/filters/dataFilter.js +9 -3
- package/plugins/filters/dataFilter.mjs +9 -3
- package/plugins/filters/filters.js +184 -189
- package/plugins/filters/filters.mjs +182 -187
- package/plugins/filters/ui/_base.js +1 -1
- package/plugins/filters/ui/_base.mjs +1 -1
- package/plugins/filters/utils.js +1 -1
- package/plugins/filters/utils.mjs +1 -1
- package/plugins/formulas/engine/settings.js +1 -1
- package/plugins/formulas/engine/settings.mjs +1 -1
- package/plugins/formulas/formulas.js +684 -602
- package/plugins/formulas/formulas.mjs +682 -600
- package/plugins/hiddenColumns/hiddenColumns.js +174 -169
- package/plugins/hiddenColumns/hiddenColumns.mjs +173 -168
- package/plugins/hiddenRows/hiddenRows.js +170 -165
- package/plugins/hiddenRows/hiddenRows.mjs +169 -164
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
- package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
- package/plugins/manualColumnFreeze/manualColumnFreeze.js +67 -54
- package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +64 -51
- package/plugins/manualColumnMove/manualColumnMove.js +287 -232
- package/plugins/manualColumnMove/manualColumnMove.mjs +286 -231
- package/plugins/manualColumnMove/ui/_base.js +9 -3
- package/plugins/manualColumnMove/ui/_base.mjs +9 -3
- package/plugins/manualColumnResize/manualColumnResize.js +291 -246
- package/plugins/manualColumnResize/manualColumnResize.mjs +290 -244
- package/plugins/manualRowMove/manualRowMove.js +223 -208
- package/plugins/manualRowMove/manualRowMove.mjs +222 -207
- package/plugins/manualRowMove/ui/_base.js +10 -5
- package/plugins/manualRowMove/ui/_base.mjs +10 -5
- package/plugins/manualRowResize/manualRowResize.js +254 -209
- package/plugins/manualRowResize/manualRowResize.mjs +253 -207
- package/plugins/mergeCells/calculations/autofill.js +9 -3
- package/plugins/mergeCells/calculations/autofill.mjs +9 -3
- package/plugins/mergeCells/calculations/selection.js +10 -4
- package/plugins/mergeCells/calculations/selection.mjs +10 -4
- package/plugins/mergeCells/cellCoords.js +16 -6
- package/plugins/mergeCells/cellCoords.mjs +16 -6
- package/plugins/mergeCells/cellsCollection.js +10 -4
- package/plugins/mergeCells/cellsCollection.mjs +10 -4
- package/plugins/mergeCells/mergeCells.js +582 -502
- package/plugins/mergeCells/mergeCells.mjs +580 -500
- package/plugins/multiColumnSorting/multiColumnSorting.js +13 -10
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +13 -10
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +16 -28
- package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +16 -27
- package/plugins/nestedHeaders/nestedHeaders.js +542 -499
- package/plugins/nestedHeaders/nestedHeaders.mjs +554 -511
- package/plugins/nestedHeaders/stateManager/index.js +1 -1
- package/plugins/nestedHeaders/stateManager/index.mjs +1 -1
- package/plugins/nestedRows/data/dataManager.js +21 -15
- package/plugins/nestedRows/data/dataManager.mjs +21 -15
- package/plugins/nestedRows/nestedRows.js +326 -278
- package/plugins/nestedRows/nestedRows.mjs +325 -277
- package/plugins/nestedRows/ui/_base.js +7 -1
- package/plugins/nestedRows/ui/_base.mjs +7 -1
- package/plugins/nestedRows/ui/collapsing.js +2 -2
- package/plugins/nestedRows/ui/collapsing.mjs +2 -2
- package/plugins/nestedRows/ui/contextMenu.js +28 -18
- package/plugins/nestedRows/ui/contextMenu.mjs +28 -18
- package/plugins/nestedRows/utils/rowMoveController.js +12 -4
- package/plugins/nestedRows/utils/rowMoveController.mjs +12 -4
- package/plugins/persistentState/persistentState.js +14 -11
- package/plugins/persistentState/persistentState.mjs +14 -11
- package/plugins/persistentState/storage.js +11 -6
- package/plugins/persistentState/storage.mjs +11 -6
- package/plugins/registry.js +2 -2
- package/plugins/registry.mjs +2 -2
- package/plugins/search/search.js +57 -46
- package/plugins/search/search.mjs +56 -45
- package/plugins/touchScroll/touchScroll.js +102 -100
- package/plugins/touchScroll/touchScroll.mjs +100 -98
- package/plugins/trimRows/trimRows.js +33 -28
- package/plugins/trimRows/trimRows.mjs +32 -27
- package/plugins/undoRedo/undoRedo.js +2 -2
- package/plugins/undoRedo/undoRedo.mjs +2 -2
- package/renderers/autocompleteRenderer/autocompleteRenderer.js +11 -11
- package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +11 -11
- package/renderers/baseRenderer/baseRenderer.js +2 -2
- package/renderers/baseRenderer/baseRenderer.mjs +2 -2
- package/renderers/checkboxRenderer/checkboxRenderer.js +23 -23
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +23 -23
- package/renderers/dateRenderer/dateRenderer.js +4 -4
- package/renderers/dateRenderer/dateRenderer.mjs +4 -4
- package/renderers/handsontableRenderer/handsontableRenderer.js +4 -4
- package/renderers/handsontableRenderer/handsontableRenderer.mjs +4 -4
- package/renderers/htmlRenderer/htmlRenderer.js +4 -4
- package/renderers/htmlRenderer/htmlRenderer.mjs +4 -4
- package/renderers/numericRenderer/numericRenderer.js +3 -3
- package/renderers/numericRenderer/numericRenderer.mjs +3 -3
- package/renderers/passwordRenderer/passwordRenderer.js +3 -3
- package/renderers/passwordRenderer/passwordRenderer.mjs +3 -3
- package/renderers/selectRenderer/selectRenderer.js +4 -4
- package/renderers/selectRenderer/selectRenderer.mjs +4 -4
- package/renderers/textRenderer/textRenderer.js +5 -5
- package/renderers/textRenderer/textRenderer.mjs +5 -5
- package/renderers/timeRenderer/timeRenderer.js +3 -3
- package/renderers/timeRenderer/timeRenderer.mjs +3 -3
- package/selection/highlight/highlight.js +1 -4
- package/selection/highlight/highlight.mjs +1 -4
- package/selection/range.js +12 -2
- package/selection/range.mjs +12 -2
- package/selection/selection.js +3 -3
- package/selection/selection.mjs +3 -3
- package/tableView.js +208 -200
- package/tableView.mjs +208 -200
- package/translations/changesObservable/utils.js +2 -2
- package/translations/changesObservable/utils.mjs +2 -2
- package/translations/indexMapper.js +25 -22
- package/translations/indexMapper.mjs +25 -22
- package/translations/mapCollections/aggregatedCollection.js +8 -2
- package/translations/mapCollections/aggregatedCollection.mjs +8 -2
- package/translations/mapCollections/mapCollection.js +5 -2
- package/translations/mapCollections/mapCollection.mjs +5 -2
- package/translations/maps/indexMap.js +6 -1
- package/translations/maps/indexMap.mjs +6 -1
- package/translations/maps/utils/physicallyIndexed.js +2 -2
- package/translations/maps/utils/physicallyIndexed.mjs +2 -2
- package/utils/dataStructures/linkedList.js +10 -6
- package/utils/dataStructures/linkedList.mjs +10 -6
- package/utils/dataStructures/queue.js +1 -1
- package/utils/dataStructures/queue.mjs +1 -1
- package/utils/dataStructures/stack.js +1 -1
- package/utils/dataStructures/stack.mjs +1 -1
- package/utils/ghostTable.js +2 -2
- package/utils/ghostTable.mjs +2 -2
- package/utils/interval.js +73 -36
- package/utils/interval.mjs +73 -36
- package/utils/parseTable.js +1 -1
- package/utils/parseTable.mjs +1 -1
- package/validators/autocompleteValidator/autocompleteValidator.js +1 -1
- package/validators/autocompleteValidator/autocompleteValidator.mjs +1 -1
- package/validators/dateValidator/dateValidator.js +1 -1
- package/validators/dateValidator/dateValidator.mjs +1 -1
- package/validators/numericValidator/numericValidator.js +1 -1
- package/validators/numericValidator/numericValidator.mjs +1 -1
package/core.js
CHANGED
@@ -291,7 +291,12 @@ function Core(rootElement, userSettings) {
|
|
291
291
|
createCellRange: (highlight, from, to) => instance._createCellRange(highlight, from, to),
|
292
292
|
visualToRenderableCoords,
|
293
293
|
renderableToVisualCoords,
|
294
|
-
isDisabledCellSelection: (visualRow, visualColumn) =>
|
294
|
+
isDisabledCellSelection: (visualRow, visualColumn) => {
|
295
|
+
if (visualRow < 0 || visualColumn < 0) {
|
296
|
+
return instance.getSettings().disableVisualSelection;
|
297
|
+
}
|
298
|
+
return instance.getCellMeta(visualRow, visualColumn).disableVisualSelection;
|
299
|
+
}
|
295
300
|
});
|
296
301
|
this.selection = selection;
|
297
302
|
const onIndexMapperCacheUpdate = _ref => {
|
@@ -1237,7 +1242,7 @@ function Core(rootElement, userSettings) {
|
|
1237
1242
|
/* eslint-disable no-continue */
|
1238
1243
|
continue;
|
1239
1244
|
}
|
1240
|
-
if ((changes[i][2] === null || changes[i][2] ===
|
1245
|
+
if ((changes[i][2] === null || changes[i][2] === undefined) && (changes[i][3] === null || changes[i][3] === undefined)) {
|
1241
1246
|
/* eslint-disable no-continue */
|
1242
1247
|
continue;
|
1243
1248
|
}
|
@@ -1245,7 +1250,7 @@ function Core(rootElement, userSettings) {
|
|
1245
1250
|
while (changes[i][0] > instance.countRows() - 1) {
|
1246
1251
|
const {
|
1247
1252
|
delta: numberOfCreatedRows
|
1248
|
-
} = datamap.createRow(
|
1253
|
+
} = datamap.createRow(undefined, undefined, {
|
1249
1254
|
source
|
1250
1255
|
});
|
1251
1256
|
if (numberOfCreatedRows === 0) {
|
@@ -1258,7 +1263,7 @@ function Core(rootElement, userSettings) {
|
|
1258
1263
|
while (datamap.propToCol(changes[i][1]) > instance.countCols() - 1) {
|
1259
1264
|
const {
|
1260
1265
|
delta: numberOfCreatedColumns
|
1261
|
-
} = datamap.createCol(
|
1266
|
+
} = datamap.createCol(undefined, undefined, {
|
1262
1267
|
source
|
1263
1268
|
});
|
1264
1269
|
if (numberOfCreatedColumns === 0) {
|
@@ -2354,11 +2359,11 @@ function Core(rootElement, userSettings) {
|
|
2354
2359
|
}
|
2355
2360
|
|
2356
2361
|
// Load data or create data map
|
2357
|
-
if (settings.data ===
|
2362
|
+
if (settings.data === undefined && tableMeta.data === undefined) {
|
2358
2363
|
dataUpdateFunction(null, 'updateSettings'); // data source created just now
|
2359
|
-
} else if (settings.data !==
|
2364
|
+
} else if (settings.data !== undefined) {
|
2360
2365
|
dataUpdateFunction(settings.data, 'updateSettings'); // data source given as option
|
2361
|
-
} else if (settings.columns !==
|
2366
|
+
} else if (settings.columns !== undefined) {
|
2362
2367
|
datamap.createMap();
|
2363
2368
|
|
2364
2369
|
// The `column` property has changed - dataset may be expanded or narrowed down. The `loadData` do the same.
|
@@ -2373,7 +2378,7 @@ function Core(rootElement, userSettings) {
|
|
2373
2378
|
}
|
2374
2379
|
|
2375
2380
|
// Clear cell meta cache
|
2376
|
-
if (settings.cell !==
|
2381
|
+
if (settings.cell !== undefined || settings.cells !== undefined || settings.columns !== undefined) {
|
2377
2382
|
metaManager.clearCache();
|
2378
2383
|
}
|
2379
2384
|
if (clen > 0) {
|
@@ -2416,7 +2421,7 @@ function Core(rootElement, userSettings) {
|
|
2416
2421
|
instance.rootElement.style.height = '';
|
2417
2422
|
instance.rootElement.style.overflow = '';
|
2418
2423
|
}
|
2419
|
-
} else if (height !==
|
2424
|
+
} else if (height !== undefined) {
|
2420
2425
|
instance.rootElement.style.height = isNaN(height) ? `${height}` : `${height}px`;
|
2421
2426
|
instance.rootElement.style.overflow = 'hidden';
|
2422
2427
|
}
|
@@ -2442,7 +2447,7 @@ function Core(rootElement, userSettings) {
|
|
2442
2447
|
instance.view._wt.wtOverlays.adjustElementsSize();
|
2443
2448
|
editorManager.unlockEditor();
|
2444
2449
|
}
|
2445
|
-
if (!init && instance.view && (currentHeight === '' || height === '' || height ===
|
2450
|
+
if (!init && instance.view && (currentHeight === '' || height === '' || height === undefined) && currentHeight !== height) {
|
2446
2451
|
instance.view._wt.wtOverlays.updateMainScrollableElements();
|
2447
2452
|
}
|
2448
2453
|
};
|
@@ -2805,7 +2810,7 @@ function Core(rootElement, userSettings) {
|
|
2805
2810
|
*/
|
2806
2811
|
this.getSourceData = function (row, column, row2, column2) {
|
2807
2812
|
let data;
|
2808
|
-
if (row ===
|
2813
|
+
if (row === undefined) {
|
2809
2814
|
data = dataSource.getData();
|
2810
2815
|
} else {
|
2811
2816
|
data = dataSource.getByRange(instance._createCellCoords(row, column), instance._createCellCoords(row2, column2));
|
@@ -2831,7 +2836,7 @@ function Core(rootElement, userSettings) {
|
|
2831
2836
|
*/
|
2832
2837
|
this.getSourceDataArray = function (row, column, row2, column2) {
|
2833
2838
|
let data;
|
2834
|
-
if (row ===
|
2839
|
+
if (row === undefined) {
|
2835
2840
|
data = dataSource.getData(true);
|
2836
2841
|
} else {
|
2837
2842
|
data = dataSource.getByRange(instance._createCellCoords(row, column), instance._createCellCoords(row2, column2), true);
|
@@ -2951,15 +2956,15 @@ function Core(rootElement, userSettings) {
|
|
2951
2956
|
* @returns {string} Cell type (e.q: `'mixed'`, `'text'`, `'numeric'`, `'autocomplete'`).
|
2952
2957
|
*/
|
2953
2958
|
this.getDataType = function (rowFrom, columnFrom, rowTo, columnTo) {
|
2954
|
-
const coords = rowFrom ===
|
2959
|
+
const coords = rowFrom === undefined ? [0, 0, this.countRows(), this.countCols()] : [rowFrom, columnFrom, rowTo, columnTo];
|
2955
2960
|
const [rowStart, columnStart] = coords;
|
2956
2961
|
let [,, rowEnd, columnEnd] = coords;
|
2957
2962
|
let previousType = null;
|
2958
2963
|
let currentType = null;
|
2959
|
-
if (rowEnd ===
|
2964
|
+
if (rowEnd === undefined) {
|
2960
2965
|
rowEnd = rowStart;
|
2961
2966
|
}
|
2962
|
-
if (columnEnd ===
|
2967
|
+
if (columnEnd === undefined) {
|
2963
2968
|
columnEnd = columnStart;
|
2964
2969
|
}
|
2965
2970
|
let type = 'mixed';
|
@@ -3357,15 +3362,15 @@ function Core(rootElement, userSettings) {
|
|
3357
3362
|
this.getRowHeader = function (row) {
|
3358
3363
|
let rowHeader = tableMeta.rowHeaders;
|
3359
3364
|
let physicalRow = row;
|
3360
|
-
if (physicalRow !==
|
3365
|
+
if (physicalRow !== undefined) {
|
3361
3366
|
physicalRow = instance.runHooks('modifyRowHeader', physicalRow);
|
3362
3367
|
}
|
3363
|
-
if (physicalRow ===
|
3368
|
+
if (physicalRow === undefined) {
|
3364
3369
|
rowHeader = [];
|
3365
3370
|
(0, _number.rangeEach)(instance.countRows() - 1, i => {
|
3366
3371
|
rowHeader.push(instance.getRowHeader(i));
|
3367
3372
|
});
|
3368
|
-
} else if (Array.isArray(rowHeader) && rowHeader[physicalRow] !==
|
3373
|
+
} else if (Array.isArray(rowHeader) && rowHeader[physicalRow] !== undefined) {
|
3369
3374
|
rowHeader = rowHeader[physicalRow];
|
3370
3375
|
} else if ((0, _function.isFunction)(rowHeader)) {
|
3371
3376
|
rowHeader = rowHeader(physicalRow);
|
@@ -3394,7 +3399,7 @@ function Core(rootElement, userSettings) {
|
|
3394
3399
|
* @returns {boolean} `true` if the instance has the column headers enabled, `false` otherwise.
|
3395
3400
|
*/
|
3396
3401
|
this.hasColHeaders = function () {
|
3397
|
-
if (tableMeta.colHeaders !==
|
3402
|
+
if (tableMeta.colHeaders !== undefined && tableMeta.colHeaders !== null) {
|
3398
3403
|
// Polymer has empty value = null
|
3399
3404
|
return !!tableMeta.colHeaders;
|
3400
3405
|
}
|
@@ -3448,7 +3453,7 @@ function Core(rootElement, userSettings) {
|
|
3448
3453
|
this.getColHeader = function (column) {
|
3449
3454
|
let headerLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
|
3450
3455
|
const columnIndex = instance.runHooks('modifyColHeader', column);
|
3451
|
-
if (columnIndex ===
|
3456
|
+
if (columnIndex === undefined) {
|
3452
3457
|
const out = [];
|
3453
3458
|
const ilen = instance.countCols();
|
3454
3459
|
for (let i = 0; i < ilen; i++) {
|
@@ -3476,7 +3481,7 @@ function Core(rootElement, userSettings) {
|
|
3476
3481
|
result = tableMeta.columns(prop).title;
|
3477
3482
|
} else if (tableMeta.columns && tableMeta.columns[physicalColumn] && tableMeta.columns[physicalColumn].title) {
|
3478
3483
|
result = tableMeta.columns[physicalColumn].title;
|
3479
|
-
} else if (Array.isArray(tableMeta.colHeaders) && tableMeta.colHeaders[physicalColumn] !==
|
3484
|
+
} else if (Array.isArray(tableMeta.colHeaders) && tableMeta.colHeaders[physicalColumn] !== undefined) {
|
3480
3485
|
result = tableMeta.colHeaders[physicalColumn];
|
3481
3486
|
} else if ((0, _function.isFunction)(tableMeta.colHeaders)) {
|
3482
3487
|
result = tableMeta.colHeaders(physicalColumn);
|
@@ -3505,10 +3510,10 @@ function Core(rootElement, userSettings) {
|
|
3505
3510
|
const cellProperties = instance.getCellMeta(0, col);
|
3506
3511
|
width = cellProperties.width;
|
3507
3512
|
}
|
3508
|
-
if (width ===
|
3513
|
+
if (width === undefined || width === tableMeta.width) {
|
3509
3514
|
width = tableMeta.colWidths;
|
3510
3515
|
}
|
3511
|
-
if (width !==
|
3516
|
+
if (width !== undefined && width !== null) {
|
3512
3517
|
switch (typeof width) {
|
3513
3518
|
case 'object':
|
3514
3519
|
// array
|
@@ -3539,7 +3544,7 @@ function Core(rootElement, userSettings) {
|
|
3539
3544
|
this.getColWidth = function (column) {
|
3540
3545
|
let width = instance._getColWidthFromSettings(column);
|
3541
3546
|
width = instance.runHooks('modifyColWidth', width, column);
|
3542
|
-
if (width ===
|
3547
|
+
if (width === undefined) {
|
3543
3548
|
width = _src.ViewportColumnsCalculator.DEFAULT_WIDTH;
|
3544
3549
|
}
|
3545
3550
|
return width;
|
@@ -3558,11 +3563,11 @@ function Core(rootElement, userSettings) {
|
|
3558
3563
|
// let cellProperties = instance.getCellMeta(row, 0);
|
3559
3564
|
// let height = cellProperties.height;
|
3560
3565
|
//
|
3561
|
-
// if (height ===
|
3566
|
+
// if (height === undefined || height === tableMeta.height) {
|
3562
3567
|
// height = cellProperties.rowHeights;
|
3563
3568
|
// }
|
3564
3569
|
let height = tableMeta.rowHeights;
|
3565
|
-
if (height !==
|
3570
|
+
if (height !== undefined && height !== null) {
|
3566
3571
|
switch (typeof height) {
|
3567
3572
|
case 'object':
|
3568
3573
|
// array
|
package/core.mjs
CHANGED
@@ -286,7 +286,12 @@ export default function Core(rootElement, userSettings) {
|
|
286
286
|
createCellRange: (highlight, from, to) => instance._createCellRange(highlight, from, to),
|
287
287
|
visualToRenderableCoords,
|
288
288
|
renderableToVisualCoords,
|
289
|
-
isDisabledCellSelection: (visualRow, visualColumn) =>
|
289
|
+
isDisabledCellSelection: (visualRow, visualColumn) => {
|
290
|
+
if (visualRow < 0 || visualColumn < 0) {
|
291
|
+
return instance.getSettings().disableVisualSelection;
|
292
|
+
}
|
293
|
+
return instance.getCellMeta(visualRow, visualColumn).disableVisualSelection;
|
294
|
+
}
|
290
295
|
});
|
291
296
|
this.selection = selection;
|
292
297
|
const onIndexMapperCacheUpdate = _ref => {
|
@@ -1232,7 +1237,7 @@ export default function Core(rootElement, userSettings) {
|
|
1232
1237
|
/* eslint-disable no-continue */
|
1233
1238
|
continue;
|
1234
1239
|
}
|
1235
|
-
if ((changes[i][2] === null || changes[i][2] ===
|
1240
|
+
if ((changes[i][2] === null || changes[i][2] === undefined) && (changes[i][3] === null || changes[i][3] === undefined)) {
|
1236
1241
|
/* eslint-disable no-continue */
|
1237
1242
|
continue;
|
1238
1243
|
}
|
@@ -1240,7 +1245,7 @@ export default function Core(rootElement, userSettings) {
|
|
1240
1245
|
while (changes[i][0] > instance.countRows() - 1) {
|
1241
1246
|
const {
|
1242
1247
|
delta: numberOfCreatedRows
|
1243
|
-
} = datamap.createRow(
|
1248
|
+
} = datamap.createRow(undefined, undefined, {
|
1244
1249
|
source
|
1245
1250
|
});
|
1246
1251
|
if (numberOfCreatedRows === 0) {
|
@@ -1253,7 +1258,7 @@ export default function Core(rootElement, userSettings) {
|
|
1253
1258
|
while (datamap.propToCol(changes[i][1]) > instance.countCols() - 1) {
|
1254
1259
|
const {
|
1255
1260
|
delta: numberOfCreatedColumns
|
1256
|
-
} = datamap.createCol(
|
1261
|
+
} = datamap.createCol(undefined, undefined, {
|
1257
1262
|
source
|
1258
1263
|
});
|
1259
1264
|
if (numberOfCreatedColumns === 0) {
|
@@ -2349,11 +2354,11 @@ export default function Core(rootElement, userSettings) {
|
|
2349
2354
|
}
|
2350
2355
|
|
2351
2356
|
// Load data or create data map
|
2352
|
-
if (settings.data ===
|
2357
|
+
if (settings.data === undefined && tableMeta.data === undefined) {
|
2353
2358
|
dataUpdateFunction(null, 'updateSettings'); // data source created just now
|
2354
|
-
} else if (settings.data !==
|
2359
|
+
} else if (settings.data !== undefined) {
|
2355
2360
|
dataUpdateFunction(settings.data, 'updateSettings'); // data source given as option
|
2356
|
-
} else if (settings.columns !==
|
2361
|
+
} else if (settings.columns !== undefined) {
|
2357
2362
|
datamap.createMap();
|
2358
2363
|
|
2359
2364
|
// The `column` property has changed - dataset may be expanded or narrowed down. The `loadData` do the same.
|
@@ -2368,7 +2373,7 @@ export default function Core(rootElement, userSettings) {
|
|
2368
2373
|
}
|
2369
2374
|
|
2370
2375
|
// Clear cell meta cache
|
2371
|
-
if (settings.cell !==
|
2376
|
+
if (settings.cell !== undefined || settings.cells !== undefined || settings.columns !== undefined) {
|
2372
2377
|
metaManager.clearCache();
|
2373
2378
|
}
|
2374
2379
|
if (clen > 0) {
|
@@ -2411,7 +2416,7 @@ export default function Core(rootElement, userSettings) {
|
|
2411
2416
|
instance.rootElement.style.height = '';
|
2412
2417
|
instance.rootElement.style.overflow = '';
|
2413
2418
|
}
|
2414
|
-
} else if (height !==
|
2419
|
+
} else if (height !== undefined) {
|
2415
2420
|
instance.rootElement.style.height = isNaN(height) ? `${height}` : `${height}px`;
|
2416
2421
|
instance.rootElement.style.overflow = 'hidden';
|
2417
2422
|
}
|
@@ -2437,7 +2442,7 @@ export default function Core(rootElement, userSettings) {
|
|
2437
2442
|
instance.view._wt.wtOverlays.adjustElementsSize();
|
2438
2443
|
editorManager.unlockEditor();
|
2439
2444
|
}
|
2440
|
-
if (!init && instance.view && (currentHeight === '' || height === '' || height ===
|
2445
|
+
if (!init && instance.view && (currentHeight === '' || height === '' || height === undefined) && currentHeight !== height) {
|
2441
2446
|
instance.view._wt.wtOverlays.updateMainScrollableElements();
|
2442
2447
|
}
|
2443
2448
|
};
|
@@ -2800,7 +2805,7 @@ export default function Core(rootElement, userSettings) {
|
|
2800
2805
|
*/
|
2801
2806
|
this.getSourceData = function (row, column, row2, column2) {
|
2802
2807
|
let data;
|
2803
|
-
if (row ===
|
2808
|
+
if (row === undefined) {
|
2804
2809
|
data = dataSource.getData();
|
2805
2810
|
} else {
|
2806
2811
|
data = dataSource.getByRange(instance._createCellCoords(row, column), instance._createCellCoords(row2, column2));
|
@@ -2826,7 +2831,7 @@ export default function Core(rootElement, userSettings) {
|
|
2826
2831
|
*/
|
2827
2832
|
this.getSourceDataArray = function (row, column, row2, column2) {
|
2828
2833
|
let data;
|
2829
|
-
if (row ===
|
2834
|
+
if (row === undefined) {
|
2830
2835
|
data = dataSource.getData(true);
|
2831
2836
|
} else {
|
2832
2837
|
data = dataSource.getByRange(instance._createCellCoords(row, column), instance._createCellCoords(row2, column2), true);
|
@@ -2946,15 +2951,15 @@ export default function Core(rootElement, userSettings) {
|
|
2946
2951
|
* @returns {string} Cell type (e.q: `'mixed'`, `'text'`, `'numeric'`, `'autocomplete'`).
|
2947
2952
|
*/
|
2948
2953
|
this.getDataType = function (rowFrom, columnFrom, rowTo, columnTo) {
|
2949
|
-
const coords = rowFrom ===
|
2954
|
+
const coords = rowFrom === undefined ? [0, 0, this.countRows(), this.countCols()] : [rowFrom, columnFrom, rowTo, columnTo];
|
2950
2955
|
const [rowStart, columnStart] = coords;
|
2951
2956
|
let [,, rowEnd, columnEnd] = coords;
|
2952
2957
|
let previousType = null;
|
2953
2958
|
let currentType = null;
|
2954
|
-
if (rowEnd ===
|
2959
|
+
if (rowEnd === undefined) {
|
2955
2960
|
rowEnd = rowStart;
|
2956
2961
|
}
|
2957
|
-
if (columnEnd ===
|
2962
|
+
if (columnEnd === undefined) {
|
2958
2963
|
columnEnd = columnStart;
|
2959
2964
|
}
|
2960
2965
|
let type = 'mixed';
|
@@ -3352,15 +3357,15 @@ export default function Core(rootElement, userSettings) {
|
|
3352
3357
|
this.getRowHeader = function (row) {
|
3353
3358
|
let rowHeader = tableMeta.rowHeaders;
|
3354
3359
|
let physicalRow = row;
|
3355
|
-
if (physicalRow !==
|
3360
|
+
if (physicalRow !== undefined) {
|
3356
3361
|
physicalRow = instance.runHooks('modifyRowHeader', physicalRow);
|
3357
3362
|
}
|
3358
|
-
if (physicalRow ===
|
3363
|
+
if (physicalRow === undefined) {
|
3359
3364
|
rowHeader = [];
|
3360
3365
|
rangeEach(instance.countRows() - 1, i => {
|
3361
3366
|
rowHeader.push(instance.getRowHeader(i));
|
3362
3367
|
});
|
3363
|
-
} else if (Array.isArray(rowHeader) && rowHeader[physicalRow] !==
|
3368
|
+
} else if (Array.isArray(rowHeader) && rowHeader[physicalRow] !== undefined) {
|
3364
3369
|
rowHeader = rowHeader[physicalRow];
|
3365
3370
|
} else if (isFunction(rowHeader)) {
|
3366
3371
|
rowHeader = rowHeader(physicalRow);
|
@@ -3389,7 +3394,7 @@ export default function Core(rootElement, userSettings) {
|
|
3389
3394
|
* @returns {boolean} `true` if the instance has the column headers enabled, `false` otherwise.
|
3390
3395
|
*/
|
3391
3396
|
this.hasColHeaders = function () {
|
3392
|
-
if (tableMeta.colHeaders !==
|
3397
|
+
if (tableMeta.colHeaders !== undefined && tableMeta.colHeaders !== null) {
|
3393
3398
|
// Polymer has empty value = null
|
3394
3399
|
return !!tableMeta.colHeaders;
|
3395
3400
|
}
|
@@ -3443,7 +3448,7 @@ export default function Core(rootElement, userSettings) {
|
|
3443
3448
|
this.getColHeader = function (column) {
|
3444
3449
|
let headerLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
|
3445
3450
|
const columnIndex = instance.runHooks('modifyColHeader', column);
|
3446
|
-
if (columnIndex ===
|
3451
|
+
if (columnIndex === undefined) {
|
3447
3452
|
const out = [];
|
3448
3453
|
const ilen = instance.countCols();
|
3449
3454
|
for (let i = 0; i < ilen; i++) {
|
@@ -3471,7 +3476,7 @@ export default function Core(rootElement, userSettings) {
|
|
3471
3476
|
result = tableMeta.columns(prop).title;
|
3472
3477
|
} else if (tableMeta.columns && tableMeta.columns[physicalColumn] && tableMeta.columns[physicalColumn].title) {
|
3473
3478
|
result = tableMeta.columns[physicalColumn].title;
|
3474
|
-
} else if (Array.isArray(tableMeta.colHeaders) && tableMeta.colHeaders[physicalColumn] !==
|
3479
|
+
} else if (Array.isArray(tableMeta.colHeaders) && tableMeta.colHeaders[physicalColumn] !== undefined) {
|
3475
3480
|
result = tableMeta.colHeaders[physicalColumn];
|
3476
3481
|
} else if (isFunction(tableMeta.colHeaders)) {
|
3477
3482
|
result = tableMeta.colHeaders(physicalColumn);
|
@@ -3500,10 +3505,10 @@ export default function Core(rootElement, userSettings) {
|
|
3500
3505
|
const cellProperties = instance.getCellMeta(0, col);
|
3501
3506
|
width = cellProperties.width;
|
3502
3507
|
}
|
3503
|
-
if (width ===
|
3508
|
+
if (width === undefined || width === tableMeta.width) {
|
3504
3509
|
width = tableMeta.colWidths;
|
3505
3510
|
}
|
3506
|
-
if (width !==
|
3511
|
+
if (width !== undefined && width !== null) {
|
3507
3512
|
switch (typeof width) {
|
3508
3513
|
case 'object':
|
3509
3514
|
// array
|
@@ -3534,7 +3539,7 @@ export default function Core(rootElement, userSettings) {
|
|
3534
3539
|
this.getColWidth = function (column) {
|
3535
3540
|
let width = instance._getColWidthFromSettings(column);
|
3536
3541
|
width = instance.runHooks('modifyColWidth', width, column);
|
3537
|
-
if (width ===
|
3542
|
+
if (width === undefined) {
|
3538
3543
|
width = ViewportColumnsCalculator.DEFAULT_WIDTH;
|
3539
3544
|
}
|
3540
3545
|
return width;
|
@@ -3553,11 +3558,11 @@ export default function Core(rootElement, userSettings) {
|
|
3553
3558
|
// let cellProperties = instance.getCellMeta(row, 0);
|
3554
3559
|
// let height = cellProperties.height;
|
3555
3560
|
//
|
3556
|
-
// if (height ===
|
3561
|
+
// if (height === undefined || height === tableMeta.height) {
|
3557
3562
|
// height = cellProperties.rowHeights;
|
3558
3563
|
// }
|
3559
3564
|
let height = tableMeta.rowHeights;
|
3560
|
-
if (height !==
|
3565
|
+
if (height !== undefined && height !== null) {
|
3561
3566
|
switch (typeof height) {
|
3562
3567
|
case 'object':
|
3563
3568
|
// array
|