handsontable 14.0.0-next-c080457-20231107 → 14.0.0-next-bfad250-20231108
Sign up to get free protection for your applications and to get access to all the features.
- 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/cell/coords.js +7 -5
- package/3rdparty/walkontable/src/cell/coords.mjs +7 -5
- 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 +25 -25
- package/core.mjs +25 -25
- 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 +7337 -6389
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +154 -154
- package/dist/handsontable.js +7336 -6388
- 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.d.ts +0 -2
- 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.d.ts +0 -1
- package/plugins/autofill/autofill.js +98 -102
- package/plugins/autofill/autofill.mjs +97 -101
- package/plugins/base/base.js +61 -28
- package/plugins/base/base.mjs +60 -28
- 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 +107 -99
- package/plugins/columnSorting/columnSorting.mjs +106 -98
- 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 +96 -102
- package/plugins/contextMenu/contextMenu.mjs +95 -101
- 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/contextMenu/predefinedItems/removeColumn.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeColumn.mjs +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.js +1 -1
- package/plugins/contextMenu/predefinedItems/removeRow.mjs +1 -1
- package/plugins/copyPaste/copyPaste.js +74 -75
- package/plugins/copyPaste/copyPaste.mjs +74 -75
- package/plugins/customBorders/customBorders.js +57 -50
- package/plugins/customBorders/customBorders.mjs +56 -49
- package/plugins/dragToScroll/dragToScroll.js +50 -54
- package/plugins/dragToScroll/dragToScroll.mjs +49 -52
- package/plugins/dropdownMenu/dropdownMenu.js +136 -131
- package/plugins/dropdownMenu/dropdownMenu.mjs +136 -131
- 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 +66 -53
- 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 +15 -11
- package/plugins/multiColumnSorting/multiColumnSorting.mjs +15 -11
- 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 +335 -279
- package/plugins/nestedRows/nestedRows.mjs +334 -278
- 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/range.js +12 -2
- package/selection/range.mjs +12 -2
- package/selection/selection.js +28 -10
- package/selection/selection.mjs +28 -10
- package/selection/utils.js +24 -14
- package/selection/utils.mjs +25 -15
- package/shortcuts/manager.js +1 -1
- package/shortcuts/manager.mjs +1 -1
- 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
@@ -1242,7 +1242,7 @@ function Core(rootElement, userSettings) {
|
|
1242
1242
|
/* eslint-disable no-continue */
|
1243
1243
|
continue;
|
1244
1244
|
}
|
1245
|
-
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)) {
|
1246
1246
|
/* eslint-disable no-continue */
|
1247
1247
|
continue;
|
1248
1248
|
}
|
@@ -1250,7 +1250,7 @@ function Core(rootElement, userSettings) {
|
|
1250
1250
|
while (changes[i][0] > instance.countRows() - 1) {
|
1251
1251
|
const {
|
1252
1252
|
delta: numberOfCreatedRows
|
1253
|
-
} = datamap.createRow(
|
1253
|
+
} = datamap.createRow(undefined, undefined, {
|
1254
1254
|
source
|
1255
1255
|
});
|
1256
1256
|
if (numberOfCreatedRows === 0) {
|
@@ -1263,7 +1263,7 @@ function Core(rootElement, userSettings) {
|
|
1263
1263
|
while (datamap.propToCol(changes[i][1]) > instance.countCols() - 1) {
|
1264
1264
|
const {
|
1265
1265
|
delta: numberOfCreatedColumns
|
1266
|
-
} = datamap.createCol(
|
1266
|
+
} = datamap.createCol(undefined, undefined, {
|
1267
1267
|
source
|
1268
1268
|
});
|
1269
1269
|
if (numberOfCreatedColumns === 0) {
|
@@ -2359,11 +2359,11 @@ function Core(rootElement, userSettings) {
|
|
2359
2359
|
}
|
2360
2360
|
|
2361
2361
|
// Load data or create data map
|
2362
|
-
if (settings.data ===
|
2362
|
+
if (settings.data === undefined && tableMeta.data === undefined) {
|
2363
2363
|
dataUpdateFunction(null, 'updateSettings'); // data source created just now
|
2364
|
-
} else if (settings.data !==
|
2364
|
+
} else if (settings.data !== undefined) {
|
2365
2365
|
dataUpdateFunction(settings.data, 'updateSettings'); // data source given as option
|
2366
|
-
} else if (settings.columns !==
|
2366
|
+
} else if (settings.columns !== undefined) {
|
2367
2367
|
datamap.createMap();
|
2368
2368
|
|
2369
2369
|
// The `column` property has changed - dataset may be expanded or narrowed down. The `loadData` do the same.
|
@@ -2378,7 +2378,7 @@ function Core(rootElement, userSettings) {
|
|
2378
2378
|
}
|
2379
2379
|
|
2380
2380
|
// Clear cell meta cache
|
2381
|
-
if (settings.cell !==
|
2381
|
+
if (settings.cell !== undefined || settings.cells !== undefined || settings.columns !== undefined) {
|
2382
2382
|
metaManager.clearCache();
|
2383
2383
|
}
|
2384
2384
|
if (clen > 0) {
|
@@ -2421,7 +2421,7 @@ function Core(rootElement, userSettings) {
|
|
2421
2421
|
instance.rootElement.style.height = '';
|
2422
2422
|
instance.rootElement.style.overflow = '';
|
2423
2423
|
}
|
2424
|
-
} else if (height !==
|
2424
|
+
} else if (height !== undefined) {
|
2425
2425
|
instance.rootElement.style.height = isNaN(height) ? `${height}` : `${height}px`;
|
2426
2426
|
instance.rootElement.style.overflow = 'hidden';
|
2427
2427
|
}
|
@@ -2447,7 +2447,7 @@ function Core(rootElement, userSettings) {
|
|
2447
2447
|
instance.view._wt.wtOverlays.adjustElementsSize();
|
2448
2448
|
editorManager.unlockEditor();
|
2449
2449
|
}
|
2450
|
-
if (!init && instance.view && (currentHeight === '' || height === '' || height ===
|
2450
|
+
if (!init && instance.view && (currentHeight === '' || height === '' || height === undefined) && currentHeight !== height) {
|
2451
2451
|
instance.view._wt.wtOverlays.updateMainScrollableElements();
|
2452
2452
|
}
|
2453
2453
|
};
|
@@ -2810,7 +2810,7 @@ function Core(rootElement, userSettings) {
|
|
2810
2810
|
*/
|
2811
2811
|
this.getSourceData = function (row, column, row2, column2) {
|
2812
2812
|
let data;
|
2813
|
-
if (row ===
|
2813
|
+
if (row === undefined) {
|
2814
2814
|
data = dataSource.getData();
|
2815
2815
|
} else {
|
2816
2816
|
data = dataSource.getByRange(instance._createCellCoords(row, column), instance._createCellCoords(row2, column2));
|
@@ -2836,7 +2836,7 @@ function Core(rootElement, userSettings) {
|
|
2836
2836
|
*/
|
2837
2837
|
this.getSourceDataArray = function (row, column, row2, column2) {
|
2838
2838
|
let data;
|
2839
|
-
if (row ===
|
2839
|
+
if (row === undefined) {
|
2840
2840
|
data = dataSource.getData(true);
|
2841
2841
|
} else {
|
2842
2842
|
data = dataSource.getByRange(instance._createCellCoords(row, column), instance._createCellCoords(row2, column2), true);
|
@@ -2956,15 +2956,15 @@ function Core(rootElement, userSettings) {
|
|
2956
2956
|
* @returns {string} Cell type (e.q: `'mixed'`, `'text'`, `'numeric'`, `'autocomplete'`).
|
2957
2957
|
*/
|
2958
2958
|
this.getDataType = function (rowFrom, columnFrom, rowTo, columnTo) {
|
2959
|
-
const coords = rowFrom ===
|
2959
|
+
const coords = rowFrom === undefined ? [0, 0, this.countRows(), this.countCols()] : [rowFrom, columnFrom, rowTo, columnTo];
|
2960
2960
|
const [rowStart, columnStart] = coords;
|
2961
2961
|
let [,, rowEnd, columnEnd] = coords;
|
2962
2962
|
let previousType = null;
|
2963
2963
|
let currentType = null;
|
2964
|
-
if (rowEnd ===
|
2964
|
+
if (rowEnd === undefined) {
|
2965
2965
|
rowEnd = rowStart;
|
2966
2966
|
}
|
2967
|
-
if (columnEnd ===
|
2967
|
+
if (columnEnd === undefined) {
|
2968
2968
|
columnEnd = columnStart;
|
2969
2969
|
}
|
2970
2970
|
let type = 'mixed';
|
@@ -3362,15 +3362,15 @@ function Core(rootElement, userSettings) {
|
|
3362
3362
|
this.getRowHeader = function (row) {
|
3363
3363
|
let rowHeader = tableMeta.rowHeaders;
|
3364
3364
|
let physicalRow = row;
|
3365
|
-
if (physicalRow !==
|
3365
|
+
if (physicalRow !== undefined) {
|
3366
3366
|
physicalRow = instance.runHooks('modifyRowHeader', physicalRow);
|
3367
3367
|
}
|
3368
|
-
if (physicalRow ===
|
3368
|
+
if (physicalRow === undefined) {
|
3369
3369
|
rowHeader = [];
|
3370
3370
|
(0, _number.rangeEach)(instance.countRows() - 1, i => {
|
3371
3371
|
rowHeader.push(instance.getRowHeader(i));
|
3372
3372
|
});
|
3373
|
-
} else if (Array.isArray(rowHeader) && rowHeader[physicalRow] !==
|
3373
|
+
} else if (Array.isArray(rowHeader) && rowHeader[physicalRow] !== undefined) {
|
3374
3374
|
rowHeader = rowHeader[physicalRow];
|
3375
3375
|
} else if ((0, _function.isFunction)(rowHeader)) {
|
3376
3376
|
rowHeader = rowHeader(physicalRow);
|
@@ -3399,7 +3399,7 @@ function Core(rootElement, userSettings) {
|
|
3399
3399
|
* @returns {boolean} `true` if the instance has the column headers enabled, `false` otherwise.
|
3400
3400
|
*/
|
3401
3401
|
this.hasColHeaders = function () {
|
3402
|
-
if (tableMeta.colHeaders !==
|
3402
|
+
if (tableMeta.colHeaders !== undefined && tableMeta.colHeaders !== null) {
|
3403
3403
|
// Polymer has empty value = null
|
3404
3404
|
return !!tableMeta.colHeaders;
|
3405
3405
|
}
|
@@ -3453,7 +3453,7 @@ function Core(rootElement, userSettings) {
|
|
3453
3453
|
this.getColHeader = function (column) {
|
3454
3454
|
let headerLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
|
3455
3455
|
const columnIndex = instance.runHooks('modifyColHeader', column);
|
3456
|
-
if (columnIndex ===
|
3456
|
+
if (columnIndex === undefined) {
|
3457
3457
|
const out = [];
|
3458
3458
|
const ilen = instance.countCols();
|
3459
3459
|
for (let i = 0; i < ilen; i++) {
|
@@ -3481,7 +3481,7 @@ function Core(rootElement, userSettings) {
|
|
3481
3481
|
result = tableMeta.columns(prop).title;
|
3482
3482
|
} else if (tableMeta.columns && tableMeta.columns[physicalColumn] && tableMeta.columns[physicalColumn].title) {
|
3483
3483
|
result = tableMeta.columns[physicalColumn].title;
|
3484
|
-
} else if (Array.isArray(tableMeta.colHeaders) && tableMeta.colHeaders[physicalColumn] !==
|
3484
|
+
} else if (Array.isArray(tableMeta.colHeaders) && tableMeta.colHeaders[physicalColumn] !== undefined) {
|
3485
3485
|
result = tableMeta.colHeaders[physicalColumn];
|
3486
3486
|
} else if ((0, _function.isFunction)(tableMeta.colHeaders)) {
|
3487
3487
|
result = tableMeta.colHeaders(physicalColumn);
|
@@ -3510,10 +3510,10 @@ function Core(rootElement, userSettings) {
|
|
3510
3510
|
const cellProperties = instance.getCellMeta(0, col);
|
3511
3511
|
width = cellProperties.width;
|
3512
3512
|
}
|
3513
|
-
if (width ===
|
3513
|
+
if (width === undefined || width === tableMeta.width) {
|
3514
3514
|
width = tableMeta.colWidths;
|
3515
3515
|
}
|
3516
|
-
if (width !==
|
3516
|
+
if (width !== undefined && width !== null) {
|
3517
3517
|
switch (typeof width) {
|
3518
3518
|
case 'object':
|
3519
3519
|
// array
|
@@ -3544,7 +3544,7 @@ function Core(rootElement, userSettings) {
|
|
3544
3544
|
this.getColWidth = function (column) {
|
3545
3545
|
let width = instance._getColWidthFromSettings(column);
|
3546
3546
|
width = instance.runHooks('modifyColWidth', width, column);
|
3547
|
-
if (width ===
|
3547
|
+
if (width === undefined) {
|
3548
3548
|
width = _src.ViewportColumnsCalculator.DEFAULT_WIDTH;
|
3549
3549
|
}
|
3550
3550
|
return width;
|
@@ -3563,11 +3563,11 @@ function Core(rootElement, userSettings) {
|
|
3563
3563
|
// let cellProperties = instance.getCellMeta(row, 0);
|
3564
3564
|
// let height = cellProperties.height;
|
3565
3565
|
//
|
3566
|
-
// if (height ===
|
3566
|
+
// if (height === undefined || height === tableMeta.height) {
|
3567
3567
|
// height = cellProperties.rowHeights;
|
3568
3568
|
// }
|
3569
3569
|
let height = tableMeta.rowHeights;
|
3570
|
-
if (height !==
|
3570
|
+
if (height !== undefined && height !== null) {
|
3571
3571
|
switch (typeof height) {
|
3572
3572
|
case 'object':
|
3573
3573
|
// array
|
package/core.mjs
CHANGED
@@ -1237,7 +1237,7 @@ export default function Core(rootElement, userSettings) {
|
|
1237
1237
|
/* eslint-disable no-continue */
|
1238
1238
|
continue;
|
1239
1239
|
}
|
1240
|
-
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)) {
|
1241
1241
|
/* eslint-disable no-continue */
|
1242
1242
|
continue;
|
1243
1243
|
}
|
@@ -1245,7 +1245,7 @@ export default function Core(rootElement, userSettings) {
|
|
1245
1245
|
while (changes[i][0] > instance.countRows() - 1) {
|
1246
1246
|
const {
|
1247
1247
|
delta: numberOfCreatedRows
|
1248
|
-
} = datamap.createRow(
|
1248
|
+
} = datamap.createRow(undefined, undefined, {
|
1249
1249
|
source
|
1250
1250
|
});
|
1251
1251
|
if (numberOfCreatedRows === 0) {
|
@@ -1258,7 +1258,7 @@ export default function Core(rootElement, userSettings) {
|
|
1258
1258
|
while (datamap.propToCol(changes[i][1]) > instance.countCols() - 1) {
|
1259
1259
|
const {
|
1260
1260
|
delta: numberOfCreatedColumns
|
1261
|
-
} = datamap.createCol(
|
1261
|
+
} = datamap.createCol(undefined, undefined, {
|
1262
1262
|
source
|
1263
1263
|
});
|
1264
1264
|
if (numberOfCreatedColumns === 0) {
|
@@ -2354,11 +2354,11 @@ export default function Core(rootElement, userSettings) {
|
|
2354
2354
|
}
|
2355
2355
|
|
2356
2356
|
// Load data or create data map
|
2357
|
-
if (settings.data ===
|
2357
|
+
if (settings.data === undefined && tableMeta.data === undefined) {
|
2358
2358
|
dataUpdateFunction(null, 'updateSettings'); // data source created just now
|
2359
|
-
} else if (settings.data !==
|
2359
|
+
} else if (settings.data !== undefined) {
|
2360
2360
|
dataUpdateFunction(settings.data, 'updateSettings'); // data source given as option
|
2361
|
-
} else if (settings.columns !==
|
2361
|
+
} else if (settings.columns !== undefined) {
|
2362
2362
|
datamap.createMap();
|
2363
2363
|
|
2364
2364
|
// The `column` property has changed - dataset may be expanded or narrowed down. The `loadData` do the same.
|
@@ -2373,7 +2373,7 @@ export default function Core(rootElement, userSettings) {
|
|
2373
2373
|
}
|
2374
2374
|
|
2375
2375
|
// Clear cell meta cache
|
2376
|
-
if (settings.cell !==
|
2376
|
+
if (settings.cell !== undefined || settings.cells !== undefined || settings.columns !== undefined) {
|
2377
2377
|
metaManager.clearCache();
|
2378
2378
|
}
|
2379
2379
|
if (clen > 0) {
|
@@ -2416,7 +2416,7 @@ export default function Core(rootElement, userSettings) {
|
|
2416
2416
|
instance.rootElement.style.height = '';
|
2417
2417
|
instance.rootElement.style.overflow = '';
|
2418
2418
|
}
|
2419
|
-
} else if (height !==
|
2419
|
+
} else if (height !== undefined) {
|
2420
2420
|
instance.rootElement.style.height = isNaN(height) ? `${height}` : `${height}px`;
|
2421
2421
|
instance.rootElement.style.overflow = 'hidden';
|
2422
2422
|
}
|
@@ -2442,7 +2442,7 @@ export default function Core(rootElement, userSettings) {
|
|
2442
2442
|
instance.view._wt.wtOverlays.adjustElementsSize();
|
2443
2443
|
editorManager.unlockEditor();
|
2444
2444
|
}
|
2445
|
-
if (!init && instance.view && (currentHeight === '' || height === '' || height ===
|
2445
|
+
if (!init && instance.view && (currentHeight === '' || height === '' || height === undefined) && currentHeight !== height) {
|
2446
2446
|
instance.view._wt.wtOverlays.updateMainScrollableElements();
|
2447
2447
|
}
|
2448
2448
|
};
|
@@ -2805,7 +2805,7 @@ export default function Core(rootElement, userSettings) {
|
|
2805
2805
|
*/
|
2806
2806
|
this.getSourceData = function (row, column, row2, column2) {
|
2807
2807
|
let data;
|
2808
|
-
if (row ===
|
2808
|
+
if (row === undefined) {
|
2809
2809
|
data = dataSource.getData();
|
2810
2810
|
} else {
|
2811
2811
|
data = dataSource.getByRange(instance._createCellCoords(row, column), instance._createCellCoords(row2, column2));
|
@@ -2831,7 +2831,7 @@ export default function Core(rootElement, userSettings) {
|
|
2831
2831
|
*/
|
2832
2832
|
this.getSourceDataArray = function (row, column, row2, column2) {
|
2833
2833
|
let data;
|
2834
|
-
if (row ===
|
2834
|
+
if (row === undefined) {
|
2835
2835
|
data = dataSource.getData(true);
|
2836
2836
|
} else {
|
2837
2837
|
data = dataSource.getByRange(instance._createCellCoords(row, column), instance._createCellCoords(row2, column2), true);
|
@@ -2951,15 +2951,15 @@ export default function Core(rootElement, userSettings) {
|
|
2951
2951
|
* @returns {string} Cell type (e.q: `'mixed'`, `'text'`, `'numeric'`, `'autocomplete'`).
|
2952
2952
|
*/
|
2953
2953
|
this.getDataType = function (rowFrom, columnFrom, rowTo, columnTo) {
|
2954
|
-
const coords = rowFrom ===
|
2954
|
+
const coords = rowFrom === undefined ? [0, 0, this.countRows(), this.countCols()] : [rowFrom, columnFrom, rowTo, columnTo];
|
2955
2955
|
const [rowStart, columnStart] = coords;
|
2956
2956
|
let [,, rowEnd, columnEnd] = coords;
|
2957
2957
|
let previousType = null;
|
2958
2958
|
let currentType = null;
|
2959
|
-
if (rowEnd ===
|
2959
|
+
if (rowEnd === undefined) {
|
2960
2960
|
rowEnd = rowStart;
|
2961
2961
|
}
|
2962
|
-
if (columnEnd ===
|
2962
|
+
if (columnEnd === undefined) {
|
2963
2963
|
columnEnd = columnStart;
|
2964
2964
|
}
|
2965
2965
|
let type = 'mixed';
|
@@ -3357,15 +3357,15 @@ export default function Core(rootElement, userSettings) {
|
|
3357
3357
|
this.getRowHeader = function (row) {
|
3358
3358
|
let rowHeader = tableMeta.rowHeaders;
|
3359
3359
|
let physicalRow = row;
|
3360
|
-
if (physicalRow !==
|
3360
|
+
if (physicalRow !== undefined) {
|
3361
3361
|
physicalRow = instance.runHooks('modifyRowHeader', physicalRow);
|
3362
3362
|
}
|
3363
|
-
if (physicalRow ===
|
3363
|
+
if (physicalRow === undefined) {
|
3364
3364
|
rowHeader = [];
|
3365
3365
|
rangeEach(instance.countRows() - 1, i => {
|
3366
3366
|
rowHeader.push(instance.getRowHeader(i));
|
3367
3367
|
});
|
3368
|
-
} else if (Array.isArray(rowHeader) && rowHeader[physicalRow] !==
|
3368
|
+
} else if (Array.isArray(rowHeader) && rowHeader[physicalRow] !== undefined) {
|
3369
3369
|
rowHeader = rowHeader[physicalRow];
|
3370
3370
|
} else if (isFunction(rowHeader)) {
|
3371
3371
|
rowHeader = rowHeader(physicalRow);
|
@@ -3394,7 +3394,7 @@ export default function Core(rootElement, userSettings) {
|
|
3394
3394
|
* @returns {boolean} `true` if the instance has the column headers enabled, `false` otherwise.
|
3395
3395
|
*/
|
3396
3396
|
this.hasColHeaders = function () {
|
3397
|
-
if (tableMeta.colHeaders !==
|
3397
|
+
if (tableMeta.colHeaders !== undefined && tableMeta.colHeaders !== null) {
|
3398
3398
|
// Polymer has empty value = null
|
3399
3399
|
return !!tableMeta.colHeaders;
|
3400
3400
|
}
|
@@ -3448,7 +3448,7 @@ export default function Core(rootElement, userSettings) {
|
|
3448
3448
|
this.getColHeader = function (column) {
|
3449
3449
|
let headerLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
|
3450
3450
|
const columnIndex = instance.runHooks('modifyColHeader', column);
|
3451
|
-
if (columnIndex ===
|
3451
|
+
if (columnIndex === undefined) {
|
3452
3452
|
const out = [];
|
3453
3453
|
const ilen = instance.countCols();
|
3454
3454
|
for (let i = 0; i < ilen; i++) {
|
@@ -3476,7 +3476,7 @@ export default function Core(rootElement, userSettings) {
|
|
3476
3476
|
result = tableMeta.columns(prop).title;
|
3477
3477
|
} else if (tableMeta.columns && tableMeta.columns[physicalColumn] && tableMeta.columns[physicalColumn].title) {
|
3478
3478
|
result = tableMeta.columns[physicalColumn].title;
|
3479
|
-
} else if (Array.isArray(tableMeta.colHeaders) && tableMeta.colHeaders[physicalColumn] !==
|
3479
|
+
} else if (Array.isArray(tableMeta.colHeaders) && tableMeta.colHeaders[physicalColumn] !== undefined) {
|
3480
3480
|
result = tableMeta.colHeaders[physicalColumn];
|
3481
3481
|
} else if (isFunction(tableMeta.colHeaders)) {
|
3482
3482
|
result = tableMeta.colHeaders(physicalColumn);
|
@@ -3505,10 +3505,10 @@ export default function Core(rootElement, userSettings) {
|
|
3505
3505
|
const cellProperties = instance.getCellMeta(0, col);
|
3506
3506
|
width = cellProperties.width;
|
3507
3507
|
}
|
3508
|
-
if (width ===
|
3508
|
+
if (width === undefined || width === tableMeta.width) {
|
3509
3509
|
width = tableMeta.colWidths;
|
3510
3510
|
}
|
3511
|
-
if (width !==
|
3511
|
+
if (width !== undefined && width !== null) {
|
3512
3512
|
switch (typeof width) {
|
3513
3513
|
case 'object':
|
3514
3514
|
// array
|
@@ -3539,7 +3539,7 @@ export default function Core(rootElement, userSettings) {
|
|
3539
3539
|
this.getColWidth = function (column) {
|
3540
3540
|
let width = instance._getColWidthFromSettings(column);
|
3541
3541
|
width = instance.runHooks('modifyColWidth', width, column);
|
3542
|
-
if (width ===
|
3542
|
+
if (width === undefined) {
|
3543
3543
|
width = ViewportColumnsCalculator.DEFAULT_WIDTH;
|
3544
3544
|
}
|
3545
3545
|
return width;
|
@@ -3558,11 +3558,11 @@ export default function Core(rootElement, userSettings) {
|
|
3558
3558
|
// let cellProperties = instance.getCellMeta(row, 0);
|
3559
3559
|
// let height = cellProperties.height;
|
3560
3560
|
//
|
3561
|
-
// if (height ===
|
3561
|
+
// if (height === undefined || height === tableMeta.height) {
|
3562
3562
|
// height = cellProperties.rowHeights;
|
3563
3563
|
// }
|
3564
3564
|
let height = tableMeta.rowHeights;
|
3565
|
-
if (height !==
|
3565
|
+
if (height !== undefined && height !== null) {
|
3566
3566
|
switch (typeof height) {
|
3567
3567
|
case 'object':
|
3568
3568
|
// array
|