@gridkitjs/core 0.0.0-dev-20261118081957 → 0.0.0-dev-20261118115237
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.
- package/dist/{chunk-DHSWUNSZ.js → chunk-PUD53NFG.js} +23 -10
- package/dist/{chunk-DHSWUNSZ.js.map → chunk-PUD53NFG.js.map} +1 -1
- package/dist/{filterEditor-C2nZkvgC.d.ts → filterEditor-Dr7kwpCC.d.ts} +29 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/renderer.d.ts +2 -2
- package/dist/renderer.js +3 -1
- package/dist/renderer.js.map +1 -1
- package/package.json +1 -1
|
@@ -945,9 +945,10 @@ function beginColumnResize(column, startWidth, startPosition, defaults) {
|
|
|
945
945
|
constraints: resolveColumnConstraints(column, defaults)
|
|
946
946
|
};
|
|
947
947
|
}
|
|
948
|
-
function applyColumnResize(session, position) {
|
|
948
|
+
function applyColumnResize(session, position, direction = "ltr") {
|
|
949
|
+
const moved = position - session.startPosition;
|
|
949
950
|
return clampColumnWidth(
|
|
950
|
-
session.startWidth + (
|
|
951
|
+
session.startWidth + (direction === "rtl" ? -moved : moved),
|
|
951
952
|
session.constraints
|
|
952
953
|
);
|
|
953
954
|
}
|
|
@@ -3204,6 +3205,19 @@ function contextMenuEntries(contextMenu, context) {
|
|
|
3204
3205
|
}
|
|
3205
3206
|
}
|
|
3206
3207
|
|
|
3208
|
+
// src/util/direction.ts
|
|
3209
|
+
function inlineStep(key, direction = "ltr") {
|
|
3210
|
+
const forward = direction === "rtl" ? "ArrowLeft" : "ArrowRight";
|
|
3211
|
+
const backward = direction === "rtl" ? "ArrowRight" : "ArrowLeft";
|
|
3212
|
+
if (key === forward) {
|
|
3213
|
+
return 1;
|
|
3214
|
+
}
|
|
3215
|
+
if (key === backward) {
|
|
3216
|
+
return -1;
|
|
3217
|
+
}
|
|
3218
|
+
return null;
|
|
3219
|
+
}
|
|
3220
|
+
|
|
3207
3221
|
// src/util/navigation.ts
|
|
3208
3222
|
function headerFocus(columnIndex) {
|
|
3209
3223
|
return { area: "header", columnIndex };
|
|
@@ -3251,7 +3265,7 @@ function skipSkippableRows(target, direction, rowCount, isSkippableRow, fallback
|
|
|
3251
3265
|
}
|
|
3252
3266
|
return bodyFocus(rowIndex, target.columnIndex);
|
|
3253
3267
|
}
|
|
3254
|
-
function nextFocusForKey(key, modifiers, focus, rowCount, columnCount2, pageSize, isSkippableRow = noRowsSkippable) {
|
|
3268
|
+
function nextFocusForKey(key, modifiers, focus, rowCount, columnCount2, pageSize, isSkippableRow = noRowsSkippable, direction = "ltr") {
|
|
3255
3269
|
if (modifiers.altKey) {
|
|
3256
3270
|
return null;
|
|
3257
3271
|
}
|
|
@@ -3265,13 +3279,11 @@ function nextFocusForKey(key, modifiers, focus, rowCount, columnCount2, pageSize
|
|
|
3265
3279
|
focus
|
|
3266
3280
|
);
|
|
3267
3281
|
}
|
|
3282
|
+
const step = inlineStep(key, direction);
|
|
3283
|
+
if (step !== null) {
|
|
3284
|
+
return modifiers.ctrlKey ? null : { ...focus, columnIndex: columnIndex + step };
|
|
3285
|
+
}
|
|
3268
3286
|
switch (key) {
|
|
3269
|
-
case "ArrowLeft":
|
|
3270
|
-
if (modifiers.ctrlKey) return null;
|
|
3271
|
-
return { ...focus, columnIndex: columnIndex - 1 };
|
|
3272
|
-
case "ArrowRight":
|
|
3273
|
-
if (modifiers.ctrlKey) return null;
|
|
3274
|
-
return { ...focus, columnIndex: columnIndex + 1 };
|
|
3275
3287
|
case "ArrowUp":
|
|
3276
3288
|
return moveRows(-1);
|
|
3277
3289
|
case "ArrowDown":
|
|
@@ -3421,9 +3433,10 @@ export {
|
|
|
3421
3433
|
defaultContextMenu,
|
|
3422
3434
|
hasContextMenu,
|
|
3423
3435
|
contextMenuEntries,
|
|
3436
|
+
inlineStep,
|
|
3424
3437
|
headerFocus,
|
|
3425
3438
|
bodyFocus,
|
|
3426
3439
|
clampFocus,
|
|
3427
3440
|
nextFocusForKey
|
|
3428
3441
|
};
|
|
3429
|
-
//# sourceMappingURL=chunk-
|
|
3442
|
+
//# sourceMappingURL=chunk-PUD53NFG.js.map
|