handsontable 14.0.0-next-1127661-20231114 → 14.0.0-next-ae5997a-20231116

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/base.js +2 -2
  2. package/base.mjs +2 -2
  3. package/core/focusCatcher/index.js +4 -5
  4. package/core/focusCatcher/index.mjs +4 -5
  5. package/dataMap/metaManager/metaSchema.js +7 -7
  6. package/dataMap/metaManager/metaSchema.mjs +7 -7
  7. package/dist/handsontable.css +2 -2
  8. package/dist/handsontable.full.css +2 -2
  9. package/dist/handsontable.full.js +411 -309
  10. package/dist/handsontable.full.min.css +2 -2
  11. package/dist/handsontable.full.min.js +147 -147
  12. package/dist/handsontable.js +411 -309
  13. package/dist/handsontable.min.css +2 -2
  14. package/dist/handsontable.min.js +22 -22
  15. package/editors/textEditor/textEditor.js +4 -27
  16. package/editors/textEditor/textEditor.mjs +4 -27
  17. package/helpers/mixed.js +2 -2
  18. package/helpers/mixed.mjs +2 -2
  19. package/package.json +1 -1
  20. package/pluginHooks.d.ts +2 -2
  21. package/plugins/manualColumnMove/manualColumnMove.js +31 -28
  22. package/plugins/manualColumnMove/manualColumnMove.mjs +29 -26
  23. package/plugins/manualColumnResize/manualColumnResize.js +161 -105
  24. package/plugins/manualColumnResize/manualColumnResize.mjs +160 -104
  25. package/plugins/manualRowMove/manualRowMove.js +31 -28
  26. package/plugins/manualRowMove/manualRowMove.mjs +29 -26
  27. package/plugins/manualRowResize/manualRowResize.js +160 -104
  28. package/plugins/manualRowResize/manualRowResize.mjs +159 -103
  29. package/selection/transformation.js +12 -12
  30. package/selection/transformation.mjs +13 -13
  31. package/settings.d.ts +1 -1
  32. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -1
  33. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -1
@@ -8,7 +8,7 @@ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(
8
8
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
9
9
  function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
10
10
  function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
11
- import { mixin } from "../helpers/object.mjs";
11
+ import { mixin, createObjectPropListener } from "../helpers/object.mjs";
12
12
  import localHooks from "./../mixins/localHooks.mjs";
13
13
  /**
14
14
  * The Transformation class implements algorithms for transforming coordinates based on current settings
@@ -143,39 +143,39 @@ class Transformation {
143
143
  const autoWrapCol = _classPrivateFieldGet(this, _options).autoWrapCol();
144
144
  const zeroBasedCoords = _classPrivateFieldGet(this, _options).createCellCoords(row + delta.row, col + delta.col);
145
145
  if (zeroBasedCoords.row >= height) {
146
- const autoInsertingMode = createMissingRecords && minSpareRows > 0 && fixedRowsBottom === 0;
147
- const isWrapEnabled = !autoInsertingMode && autoWrapCol;
146
+ const isActionInterrupted = createObjectPropListener(createMissingRecords && minSpareRows > 0 && fixedRowsBottom === 0);
148
147
  const nextColumn = zeroBasedCoords.col + 1;
149
148
  const newCoords = _classPrivateFieldGet(this, _options).createCellCoords(zeroBasedCoords.row - height, nextColumn >= width ? nextColumn - width : nextColumn);
150
- this.runLocalHooks('beforeColumnWrap', isWrapEnabled, _classPrivateMethodGet(this, _zeroBasedToVisualCoords, _zeroBasedToVisualCoords2).call(this, newCoords), nextColumn >= width);
151
- if (autoInsertingMode) {
149
+ this.runLocalHooks('beforeColumnWrap', isActionInterrupted, _classPrivateMethodGet(this, _zeroBasedToVisualCoords, _zeroBasedToVisualCoords2).call(this, newCoords), nextColumn >= width);
150
+ if (isActionInterrupted.value) {
152
151
  this.runLocalHooks('insertRowRequire', _classPrivateFieldGet(this, _options).countRenderableRows());
153
- } else if (isWrapEnabled) {
152
+ } else if (autoWrapCol) {
154
153
  zeroBasedCoords.assign(newCoords);
155
154
  }
156
155
  } else if (zeroBasedCoords.row < 0) {
156
+ const isActionInterrupted = createObjectPropListener(autoWrapCol);
157
157
  const previousColumn = zeroBasedCoords.col - 1;
158
158
  const newCoords = _classPrivateFieldGet(this, _options).createCellCoords(height + zeroBasedCoords.row, previousColumn < 0 ? width + previousColumn : previousColumn);
159
- this.runLocalHooks('beforeColumnWrap', autoWrapCol, _classPrivateMethodGet(this, _zeroBasedToVisualCoords, _zeroBasedToVisualCoords2).call(this, newCoords), previousColumn < 0);
159
+ this.runLocalHooks('beforeColumnWrap', isActionInterrupted, _classPrivateMethodGet(this, _zeroBasedToVisualCoords, _zeroBasedToVisualCoords2).call(this, newCoords), previousColumn < 0);
160
160
  if (autoWrapCol) {
161
161
  zeroBasedCoords.assign(newCoords);
162
162
  }
163
163
  }
164
164
  if (zeroBasedCoords.col >= width) {
165
- const autoInsertingMode = createMissingRecords && minSpareCols > 0;
166
- const isWrapEnabled = !autoInsertingMode && autoWrapRow;
165
+ const isActionInterrupted = createObjectPropListener(createMissingRecords && minSpareCols > 0);
167
166
  const nextRow = zeroBasedCoords.row + 1;
168
167
  const newCoords = _classPrivateFieldGet(this, _options).createCellCoords(nextRow >= height ? nextRow - height : nextRow, zeroBasedCoords.col - width);
169
- this.runLocalHooks('beforeRowWrap', isWrapEnabled, _classPrivateMethodGet(this, _zeroBasedToVisualCoords, _zeroBasedToVisualCoords2).call(this, newCoords), nextRow >= height);
170
- if (autoInsertingMode) {
168
+ this.runLocalHooks('beforeRowWrap', isActionInterrupted, _classPrivateMethodGet(this, _zeroBasedToVisualCoords, _zeroBasedToVisualCoords2).call(this, newCoords), nextRow >= height);
169
+ if (isActionInterrupted.value) {
171
170
  this.runLocalHooks('insertColRequire', _classPrivateFieldGet(this, _options).countRenderableColumns());
172
- } else if (isWrapEnabled) {
171
+ } else if (autoWrapRow) {
173
172
  zeroBasedCoords.assign(newCoords);
174
173
  }
175
174
  } else if (zeroBasedCoords.col < 0) {
175
+ const isActionInterrupted = createObjectPropListener(autoWrapRow);
176
176
  const previousRow = zeroBasedCoords.row - 1;
177
177
  const newCoords = _classPrivateFieldGet(this, _options).createCellCoords(previousRow < 0 ? height + previousRow : previousRow, width + zeroBasedCoords.col);
178
- this.runLocalHooks('beforeRowWrap', autoWrapRow, _classPrivateMethodGet(this, _zeroBasedToVisualCoords, _zeroBasedToVisualCoords2).call(this, newCoords), previousRow < 0);
178
+ this.runLocalHooks('beforeRowWrap', isActionInterrupted, _classPrivateMethodGet(this, _zeroBasedToVisualCoords, _zeroBasedToVisualCoords2).call(this, newCoords), previousRow < 0);
179
179
  if (autoWrapRow) {
180
180
  zeroBasedCoords.assign(newCoords);
181
181
  }
package/settings.d.ts CHANGED
@@ -125,7 +125,7 @@ export interface GridSettings extends Events {
125
125
  dateFormat?: string;
126
126
  datePickerConfig?: PikadayOptions;
127
127
  defaultDate?: string;
128
- disableTabNavigation?: boolean;
128
+ tabNavigation?: boolean;
129
129
  disableVisualSelection?: boolean | 'current' | 'area' | 'header' | Array<'current' | 'area' | 'header'>;
130
130
  dragToScroll?: boolean;
131
131
  dropdownMenu?: DropdownMenuSettings;
@@ -6,6 +6,6 @@ const command = exports.command = {
6
6
  callback(hot, event) {
7
7
  const settings = hot.getSettings();
8
8
  const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
9
- hot.selection.transformStart(tabMoves.row, tabMoves.col, true);
9
+ hot.selection.transformStart(tabMoves.row, tabMoves.col);
10
10
  }
11
11
  };
@@ -3,6 +3,6 @@ export const command = {
3
3
  callback(hot, event) {
4
4
  const settings = hot.getSettings();
5
5
  const tabMoves = typeof settings.tabMoves === 'function' ? settings.tabMoves(event) : settings.tabMoves;
6
- hot.selection.transformStart(tabMoves.row, tabMoves.col, true);
6
+ hot.selection.transformStart(tabMoves.row, tabMoves.col);
7
7
  }
8
8
  };