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.
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/focusCatcher/index.js +4 -5
- package/core/focusCatcher/index.mjs +4 -5
- package/dataMap/metaManager/metaSchema.js +7 -7
- package/dataMap/metaManager/metaSchema.mjs +7 -7
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +411 -309
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +147 -147
- package/dist/handsontable.js +411 -309
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +22 -22
- package/editors/textEditor/textEditor.js +4 -27
- package/editors/textEditor/textEditor.mjs +4 -27
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/package.json +1 -1
- package/pluginHooks.d.ts +2 -2
- package/plugins/manualColumnMove/manualColumnMove.js +31 -28
- package/plugins/manualColumnMove/manualColumnMove.mjs +29 -26
- package/plugins/manualColumnResize/manualColumnResize.js +161 -105
- package/plugins/manualColumnResize/manualColumnResize.mjs +160 -104
- package/plugins/manualRowMove/manualRowMove.js +31 -28
- package/plugins/manualRowMove/manualRowMove.mjs +29 -26
- package/plugins/manualRowResize/manualRowResize.js +160 -104
- package/plugins/manualRowResize/manualRowResize.mjs +159 -103
- package/selection/transformation.js +12 -12
- package/selection/transformation.mjs +13 -13
- package/settings.d.ts +1 -1
- package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -1
- 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
|
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',
|
151
|
-
if (
|
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 (
|
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',
|
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
|
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',
|
170
|
-
if (
|
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 (
|
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',
|
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
|
-
|
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
|
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
|
6
|
+
hot.selection.transformStart(tabMoves.row, tabMoves.col);
|
7
7
|
}
|
8
8
|
};
|