@odoo/o-spreadsheet 17.0.1 → 17.1.0-alpha.1
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/o-spreadsheet.cjs.js +115 -86
- package/dist/o-spreadsheet.d.ts +1 -0
- package/dist/o-spreadsheet.esm.js +115 -86
- package/dist/o-spreadsheet.iife.js +115 -86
- package/dist/o-spreadsheet.iife.min.js +259 -259
- package/dist/o_spreadsheet.xml +4 -4
- package/package.json +2 -2
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 17.0.1
|
|
6
|
-
* @date 2023-11-02T09:35:
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.1.0-alpha.1
|
|
6
|
+
* @date 2023-11-02T09:35:10.532Z
|
|
7
|
+
* @hash 3b1fe3b
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -6636,6 +6636,31 @@ function* iterateChildren(el) {
|
|
|
6636
6636
|
function getOpenedMenus() {
|
|
6637
6637
|
return Array.from(document.querySelectorAll(".o-spreadsheet .o-menu"));
|
|
6638
6638
|
}
|
|
6639
|
+
const letterRegex = /^[a-zA-Z]$/;
|
|
6640
|
+
/**
|
|
6641
|
+
* Transform a keyboard event into a shortcut string that represent this event. The letters keys will be uppercased.
|
|
6642
|
+
*
|
|
6643
|
+
* @argument ev - The keyboard event to transform
|
|
6644
|
+
* @argument mode - Use either ev.key of ev.code to get the string shortcut
|
|
6645
|
+
*
|
|
6646
|
+
* @example
|
|
6647
|
+
* event : { ctrlKey: true, key: "a" } => "Ctrl+A"
|
|
6648
|
+
* event : { shift: true, alt: true, key: "Home" } => "Alt+Shift+Home"
|
|
6649
|
+
*/
|
|
6650
|
+
function keyboardEventToShortcutString(ev, mode = "key") {
|
|
6651
|
+
let keyDownString = "";
|
|
6652
|
+
if (ev.ctrlKey && ev.key !== "Ctrl")
|
|
6653
|
+
keyDownString += "Ctrl+";
|
|
6654
|
+
if (ev.metaKey)
|
|
6655
|
+
keyDownString += "Ctrl+";
|
|
6656
|
+
if (ev.altKey && ev.key !== "Alt")
|
|
6657
|
+
keyDownString += "Alt+";
|
|
6658
|
+
if (ev.shiftKey && ev.key !== "Shift")
|
|
6659
|
+
keyDownString += "Shift+";
|
|
6660
|
+
const key = mode === "key" ? ev.key : ev.code;
|
|
6661
|
+
keyDownString += letterRegex.test(key) ? key.toUpperCase() : key;
|
|
6662
|
+
return keyDownString;
|
|
6663
|
+
}
|
|
6639
6664
|
|
|
6640
6665
|
/**
|
|
6641
6666
|
* Return the o-spreadsheet element position relative
|
|
@@ -26474,16 +26499,16 @@ class Composer extends Component {
|
|
|
26474
26499
|
shouldProcessInputEvents = false;
|
|
26475
26500
|
tokens = [];
|
|
26476
26501
|
keyMapping = {
|
|
26477
|
-
|
|
26478
|
-
|
|
26479
|
-
|
|
26480
|
-
|
|
26481
|
-
Enter: this.processEnterKey,
|
|
26502
|
+
Enter: (ev) => this.processEnterKey(ev, "down"),
|
|
26503
|
+
"Shift+Enter": (ev) => this.processEnterKey(ev, "up"),
|
|
26504
|
+
"Alt+Enter": this.processNewLineEvent,
|
|
26505
|
+
"Ctrl+Enter": this.processNewLineEvent,
|
|
26482
26506
|
Escape: this.processEscapeKey,
|
|
26483
26507
|
F2: () => console.warn("Not implemented"),
|
|
26484
26508
|
F4: this.processF4Key,
|
|
26485
|
-
Tab: (ev) => this.processTabKey(ev),
|
|
26486
|
-
"
|
|
26509
|
+
Tab: (ev) => this.processTabKey(ev, "right"),
|
|
26510
|
+
"Shift+Tab": (ev) => this.processTabKey(ev, "left"),
|
|
26511
|
+
"Ctrl+ ": this.processSpaceKey,
|
|
26487
26512
|
};
|
|
26488
26513
|
keyCodeMapping = {
|
|
26489
26514
|
NumpadDecimal: this.processNumpadDecimal,
|
|
@@ -26545,7 +26570,7 @@ class Composer extends Component {
|
|
|
26545
26570
|
}
|
|
26546
26571
|
}
|
|
26547
26572
|
}
|
|
26548
|
-
processTabKey(ev) {
|
|
26573
|
+
processTabKey(ev, direction) {
|
|
26549
26574
|
ev.preventDefault();
|
|
26550
26575
|
ev.stopPropagation();
|
|
26551
26576
|
const state = this.autoCompleteState;
|
|
@@ -26556,25 +26581,18 @@ class Composer extends Component {
|
|
|
26556
26581
|
return;
|
|
26557
26582
|
}
|
|
26558
26583
|
}
|
|
26559
|
-
const direction = ev.shiftKey ? "left" : "right";
|
|
26560
26584
|
interactiveStopEdition(this.env);
|
|
26561
26585
|
this.env.model.selection.moveAnchorCell(direction, 1);
|
|
26562
26586
|
}
|
|
26563
26587
|
processSpaceKey(ev) {
|
|
26564
|
-
|
|
26565
|
-
|
|
26566
|
-
|
|
26567
|
-
|
|
26568
|
-
this.env.model.dispatch("STOP_COMPOSER_RANGE_SELECTION");
|
|
26569
|
-
}
|
|
26588
|
+
ev.preventDefault();
|
|
26589
|
+
ev.stopPropagation();
|
|
26590
|
+
this.showFunctionAutocomplete("");
|
|
26591
|
+
this.env.model.dispatch("STOP_COMPOSER_RANGE_SELECTION");
|
|
26570
26592
|
}
|
|
26571
|
-
processEnterKey(ev) {
|
|
26593
|
+
processEnterKey(ev, direction) {
|
|
26572
26594
|
ev.preventDefault();
|
|
26573
26595
|
ev.stopPropagation();
|
|
26574
|
-
if (ev.altKey || ev.ctrlKey) {
|
|
26575
|
-
this.composerRef.el?.dispatchEvent(new InputEvent("input", { inputType: "insertParagraph", bubbles: true, isComposing: false }));
|
|
26576
|
-
return;
|
|
26577
|
-
}
|
|
26578
26596
|
const state = this.autoCompleteState;
|
|
26579
26597
|
if (state.showProvider && state.selectedIndex !== undefined) {
|
|
26580
26598
|
const autoCompleteValue = this.autoCompleteState.values[state.selectedIndex]?.text;
|
|
@@ -26584,9 +26602,22 @@ class Composer extends Component {
|
|
|
26584
26602
|
}
|
|
26585
26603
|
}
|
|
26586
26604
|
interactiveStopEdition(this.env);
|
|
26587
|
-
const direction = ev.shiftKey ? "up" : "down";
|
|
26588
26605
|
this.env.model.selection.moveAnchorCell(direction, 1);
|
|
26589
26606
|
}
|
|
26607
|
+
processNewLineEvent(ev) {
|
|
26608
|
+
ev.preventDefault();
|
|
26609
|
+
ev.stopPropagation();
|
|
26610
|
+
const content = this.contentHelper.getText();
|
|
26611
|
+
const selection = this.contentHelper.getCurrentSelection();
|
|
26612
|
+
const start = Math.min(selection.start, selection.end);
|
|
26613
|
+
const end = Math.max(selection.start, selection.end);
|
|
26614
|
+
this.env.model.dispatch("STOP_COMPOSER_RANGE_SELECTION");
|
|
26615
|
+
this.env.model.dispatch("SET_CURRENT_CONTENT", {
|
|
26616
|
+
content: content.slice(0, start) + NEWLINE + content.slice(end),
|
|
26617
|
+
selection: { start: start + 1, end: start + 1 },
|
|
26618
|
+
});
|
|
26619
|
+
this.processContent();
|
|
26620
|
+
}
|
|
26590
26621
|
processEscapeKey() {
|
|
26591
26622
|
this.env.model.dispatch("CANCEL_EDITION");
|
|
26592
26623
|
}
|
|
@@ -26620,7 +26651,12 @@ class Composer extends Component {
|
|
|
26620
26651
|
this.compositionActive = false;
|
|
26621
26652
|
}
|
|
26622
26653
|
onKeydown(ev) {
|
|
26623
|
-
|
|
26654
|
+
if (ev.key.startsWith("Arrow")) {
|
|
26655
|
+
this.processArrowKeys(ev);
|
|
26656
|
+
return;
|
|
26657
|
+
}
|
|
26658
|
+
let handler = this.keyMapping[keyboardEventToShortcutString(ev)] ||
|
|
26659
|
+
this.keyCodeMapping[keyboardEventToShortcutString(ev, "code")];
|
|
26624
26660
|
if (handler) {
|
|
26625
26661
|
handler.call(this, ev);
|
|
26626
26662
|
}
|
|
@@ -26637,12 +26673,6 @@ class Composer extends Component {
|
|
|
26637
26673
|
}
|
|
26638
26674
|
let content = this.contentHelper.getText();
|
|
26639
26675
|
let selection = this.contentHelper.getCurrentSelection();
|
|
26640
|
-
if (ev.inputType === "insertParagraph") {
|
|
26641
|
-
const start = Math.min(selection.start, selection.end);
|
|
26642
|
-
const end = Math.max(selection.start, selection.end);
|
|
26643
|
-
content = content.slice(0, start) + NEWLINE + content.slice(end);
|
|
26644
|
-
selection = { start: start + 1, end: start + 1 };
|
|
26645
|
-
}
|
|
26646
26676
|
this.env.model.dispatch("STOP_COMPOSER_RANGE_SELECTION");
|
|
26647
26677
|
this.env.model.dispatch("SET_CURRENT_CONTENT", {
|
|
26648
26678
|
content,
|
|
@@ -29339,33 +29369,33 @@ class Grid extends Component {
|
|
|
29339
29369
|
// this map will handle most of the actions that should happen on key down. The arrow keys are managed in the key
|
|
29340
29370
|
// down itself
|
|
29341
29371
|
keyDownMapping = {
|
|
29342
|
-
|
|
29372
|
+
Enter: () => {
|
|
29343
29373
|
const cell = this.env.model.getters.getActiveCell();
|
|
29344
29374
|
cell.type === CellValueType.empty
|
|
29345
29375
|
? this.props.onGridComposerCellFocused()
|
|
29346
29376
|
: this.props.onComposerContentFocused();
|
|
29347
29377
|
},
|
|
29348
|
-
|
|
29349
|
-
"
|
|
29378
|
+
Tab: () => this.env.model.selection.moveAnchorCell("right", 1),
|
|
29379
|
+
"Shift+Tab": () => this.env.model.selection.moveAnchorCell("left", 1),
|
|
29350
29380
|
F2: () => {
|
|
29351
29381
|
const cell = this.env.model.getters.getActiveCell();
|
|
29352
29382
|
cell.type === CellValueType.empty
|
|
29353
29383
|
? this.props.onGridComposerCellFocused()
|
|
29354
29384
|
: this.props.onComposerContentFocused();
|
|
29355
29385
|
},
|
|
29356
|
-
|
|
29386
|
+
Delete: () => {
|
|
29357
29387
|
this.env.model.dispatch("DELETE_CONTENT", {
|
|
29358
29388
|
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
29359
29389
|
target: this.env.model.getters.getSelectedZones(),
|
|
29360
29390
|
});
|
|
29361
29391
|
},
|
|
29362
|
-
|
|
29392
|
+
Backspace: () => {
|
|
29363
29393
|
this.env.model.dispatch("DELETE_CONTENT", {
|
|
29364
29394
|
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
29365
29395
|
target: this.env.model.getters.getSelectedZones(),
|
|
29366
29396
|
});
|
|
29367
29397
|
},
|
|
29368
|
-
|
|
29398
|
+
Escape: () => {
|
|
29369
29399
|
/** TODO: Clean once we introduce proper focus on sub components. Grid should not have to handle all this logic */
|
|
29370
29400
|
if (this.env.model.getters.hasOpenedPopover()) {
|
|
29371
29401
|
this.closeOpenedPopover();
|
|
@@ -29380,27 +29410,27 @@ class Grid extends Component {
|
|
|
29380
29410
|
this.env.model.dispatch("CLEAN_CLIPBOARD_HIGHLIGHT");
|
|
29381
29411
|
}
|
|
29382
29412
|
},
|
|
29383
|
-
"
|
|
29384
|
-
"
|
|
29385
|
-
"
|
|
29413
|
+
"Ctrl+A": () => this.env.model.selection.loopSelection(),
|
|
29414
|
+
"Ctrl+Z": () => this.env.model.dispatch("REQUEST_UNDO"),
|
|
29415
|
+
"Ctrl+Y": () => this.env.model.dispatch("REQUEST_REDO"),
|
|
29386
29416
|
F4: () => this.env.model.dispatch("REQUEST_REDO"),
|
|
29387
|
-
"
|
|
29417
|
+
"Ctrl+B": () => this.env.model.dispatch("SET_FORMATTING", {
|
|
29388
29418
|
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
29389
29419
|
target: this.env.model.getters.getSelectedZones(),
|
|
29390
29420
|
style: { bold: !this.env.model.getters.getCurrentStyle().bold },
|
|
29391
29421
|
}),
|
|
29392
|
-
"
|
|
29422
|
+
"Ctrl+I": () => this.env.model.dispatch("SET_FORMATTING", {
|
|
29393
29423
|
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
29394
29424
|
target: this.env.model.getters.getSelectedZones(),
|
|
29395
29425
|
style: { italic: !this.env.model.getters.getCurrentStyle().italic },
|
|
29396
29426
|
}),
|
|
29397
|
-
"
|
|
29427
|
+
"Ctrl+U": () => this.env.model.dispatch("SET_FORMATTING", {
|
|
29398
29428
|
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
29399
29429
|
target: this.env.model.getters.getSelectedZones(),
|
|
29400
29430
|
style: { underline: !this.env.model.getters.getCurrentStyle().underline },
|
|
29401
29431
|
}),
|
|
29402
|
-
"
|
|
29403
|
-
"
|
|
29432
|
+
"Ctrl+O": () => CREATE_IMAGE(this.env),
|
|
29433
|
+
"Alt+=": () => {
|
|
29404
29434
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
29405
29435
|
const mainSelectedZone = this.env.model.getters.getSelectedZone();
|
|
29406
29436
|
const { anchor } = this.env.model.getters.getSelection();
|
|
@@ -29416,13 +29446,13 @@ class Grid extends Component {
|
|
|
29416
29446
|
this.env.model.dispatch("SUM_SELECTION");
|
|
29417
29447
|
}
|
|
29418
29448
|
},
|
|
29419
|
-
"
|
|
29449
|
+
"Alt+Enter": () => {
|
|
29420
29450
|
const cell = this.env.model.getters.getActiveCell();
|
|
29421
29451
|
if (cell.link) {
|
|
29422
29452
|
openLink(cell.link, this.env);
|
|
29423
29453
|
}
|
|
29424
29454
|
},
|
|
29425
|
-
"
|
|
29455
|
+
"Ctrl+Home": () => {
|
|
29426
29456
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
29427
29457
|
const { col, row } = this.env.model.getters.getNextVisibleCellPosition({
|
|
29428
29458
|
sheetId,
|
|
@@ -29431,13 +29461,13 @@ class Grid extends Component {
|
|
|
29431
29461
|
});
|
|
29432
29462
|
this.env.model.selection.selectCell(col, row);
|
|
29433
29463
|
},
|
|
29434
|
-
"
|
|
29464
|
+
"Ctrl+End": () => {
|
|
29435
29465
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
29436
29466
|
const col = this.env.model.getters.findVisibleHeader(sheetId, "COL", this.env.model.getters.getNumberCols(sheetId) - 1, 0);
|
|
29437
29467
|
const row = this.env.model.getters.findVisibleHeader(sheetId, "ROW", this.env.model.getters.getNumberRows(sheetId) - 1, 0);
|
|
29438
29468
|
this.env.model.selection.selectCell(col, row);
|
|
29439
29469
|
},
|
|
29440
|
-
"
|
|
29470
|
+
"Shift+ ": () => {
|
|
29441
29471
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
29442
29472
|
const newZone = {
|
|
29443
29473
|
...this.env.model.getters.getSelectedZone(),
|
|
@@ -29447,7 +29477,7 @@ class Grid extends Component {
|
|
|
29447
29477
|
const position = this.env.model.getters.getActivePosition();
|
|
29448
29478
|
this.env.model.selection.selectZone({ cell: position, zone: newZone });
|
|
29449
29479
|
},
|
|
29450
|
-
"
|
|
29480
|
+
"Ctrl+ ": () => {
|
|
29451
29481
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
29452
29482
|
const newZone = {
|
|
29453
29483
|
...this.env.model.getters.getSelectedZone(),
|
|
@@ -29457,18 +29487,18 @@ class Grid extends Component {
|
|
|
29457
29487
|
const position = this.env.model.getters.getActivePosition();
|
|
29458
29488
|
this.env.model.selection.selectZone({ cell: position, zone: newZone });
|
|
29459
29489
|
},
|
|
29460
|
-
"
|
|
29461
|
-
"
|
|
29462
|
-
"
|
|
29463
|
-
"
|
|
29464
|
-
"
|
|
29465
|
-
"
|
|
29466
|
-
"
|
|
29467
|
-
"
|
|
29468
|
-
"
|
|
29490
|
+
"Ctrl+D": async () => this.env.model.dispatch("COPY_PASTE_CELLS_ABOVE"),
|
|
29491
|
+
"Ctrl+R": async () => this.env.model.dispatch("COPY_PASTE_CELLS_ON_LEFT"),
|
|
29492
|
+
"Ctrl+Shift+E": () => this.setHorizontalAlign("center"),
|
|
29493
|
+
"Ctrl+Shift+L": () => this.setHorizontalAlign("left"),
|
|
29494
|
+
"Ctrl+Shift+R": () => this.setHorizontalAlign("right"),
|
|
29495
|
+
"Ctrl+Shift+V": () => PASTE_VALUE_ACTION(this.env),
|
|
29496
|
+
"Ctrl+Shift+<": () => this.clearFormatting(),
|
|
29497
|
+
"Ctrl+<": () => this.clearFormatting(),
|
|
29498
|
+
"Ctrl+Shift+ ": () => {
|
|
29469
29499
|
this.env.model.selection.selectAll();
|
|
29470
29500
|
},
|
|
29471
|
-
"
|
|
29501
|
+
"Ctrl+Alt+=": () => {
|
|
29472
29502
|
const activeCols = this.env.model.getters.getActiveCols();
|
|
29473
29503
|
const activeRows = this.env.model.getters.getActiveRows();
|
|
29474
29504
|
const isSingleSelection = this.env.model.getters.getSelectedZones().length === 1;
|
|
@@ -29481,7 +29511,7 @@ class Grid extends Component {
|
|
|
29481
29511
|
INSERT_ROWS_BEFORE_ACTION(this.env);
|
|
29482
29512
|
}
|
|
29483
29513
|
},
|
|
29484
|
-
"
|
|
29514
|
+
"Ctrl+Alt+-": () => {
|
|
29485
29515
|
const columns = [...this.env.model.getters.getActiveCols()];
|
|
29486
29516
|
const rows = [...this.env.model.getters.getActiveRows()];
|
|
29487
29517
|
if (columns.length > 0 && rows.length === 0) {
|
|
@@ -29499,19 +29529,19 @@ class Grid extends Component {
|
|
|
29499
29529
|
});
|
|
29500
29530
|
}
|
|
29501
29531
|
},
|
|
29502
|
-
"
|
|
29532
|
+
"Shift+PageDown": () => {
|
|
29503
29533
|
this.env.model.dispatch("ACTIVATE_NEXT_SHEET");
|
|
29504
29534
|
},
|
|
29505
|
-
"
|
|
29535
|
+
"Shift+PageUp": () => {
|
|
29506
29536
|
this.env.model.dispatch("ACTIVATE_PREVIOUS_SHEET");
|
|
29507
29537
|
},
|
|
29508
|
-
|
|
29509
|
-
|
|
29510
|
-
"
|
|
29511
|
-
"
|
|
29512
|
-
"
|
|
29513
|
-
"
|
|
29514
|
-
"
|
|
29538
|
+
PageDown: () => this.env.model.dispatch("SHIFT_VIEWPORT_DOWN"),
|
|
29539
|
+
PageUp: () => this.env.model.dispatch("SHIFT_VIEWPORT_UP"),
|
|
29540
|
+
"Ctrl+K": () => INSERT_LINK(this.env),
|
|
29541
|
+
"Alt+Shift+ArrowRight": () => this.processHeaderGroupingKey("right"),
|
|
29542
|
+
"Alt+Shift+ArrowLeft": () => this.processHeaderGroupingKey("left"),
|
|
29543
|
+
"Alt+Shift+ArrowUp": () => this.processHeaderGroupingKey("up"),
|
|
29544
|
+
"Alt+Shift+ArrowDown": () => this.processHeaderGroupingKey("down"),
|
|
29515
29545
|
};
|
|
29516
29546
|
focus() {
|
|
29517
29547
|
if (!this.env.model.getters.getSelectedFigureId() &&
|
|
@@ -29639,18 +29669,8 @@ class Grid extends Component {
|
|
|
29639
29669
|
}
|
|
29640
29670
|
}
|
|
29641
29671
|
onKeydown(ev) {
|
|
29642
|
-
const
|
|
29643
|
-
|
|
29644
|
-
if (ev.ctrlKey && eventKey !== "CTRL")
|
|
29645
|
-
keyDownString += "CTRL+";
|
|
29646
|
-
if (ev.metaKey)
|
|
29647
|
-
keyDownString += "CTRL+";
|
|
29648
|
-
if (ev.altKey && eventKey !== "ALT")
|
|
29649
|
-
keyDownString += "ALT+";
|
|
29650
|
-
if (ev.shiftKey && eventKey !== "SHIFT")
|
|
29651
|
-
keyDownString += "SHIFT+";
|
|
29652
|
-
keyDownString += ev.key.toUpperCase();
|
|
29653
|
-
let handler = this.keyDownMapping[keyDownString];
|
|
29672
|
+
const keyDownString = keyboardEventToShortcutString(ev);
|
|
29673
|
+
const handler = this.keyDownMapping[keyDownString];
|
|
29654
29674
|
if (handler) {
|
|
29655
29675
|
ev.preventDefault();
|
|
29656
29676
|
ev.stopPropagation();
|
|
@@ -43485,6 +43505,8 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
|
|
|
43485
43505
|
if (height > 1 || width > 1 || isCutOperation) {
|
|
43486
43506
|
const zones = this.pastedZones(target, width, height);
|
|
43487
43507
|
const newZone = isCutOperation ? zones[0] : union(...zones);
|
|
43508
|
+
// we want grid selection to capture the selection stream
|
|
43509
|
+
this.selection.getBackToDefault();
|
|
43488
43510
|
this.selection.selectZone({ cell: { col, row }, zone: newZone }, { scrollIntoView: false });
|
|
43489
43511
|
}
|
|
43490
43512
|
}
|
|
@@ -44151,6 +44173,8 @@ class FindAndReplacePlugin extends UIPlugin {
|
|
|
44151
44173
|
//modulo of negative value to be able to cycle in both directions with previous and next
|
|
44152
44174
|
nextIndex = ((nextIndex % matches.length) + matches.length) % matches.length;
|
|
44153
44175
|
this.selectedMatchIndex = nextIndex;
|
|
44176
|
+
// we want grid selection to capture the selection stream
|
|
44177
|
+
this.selection.getBackToDefault();
|
|
44154
44178
|
this.selection.selectCell(matches[nextIndex].col, matches[nextIndex].row);
|
|
44155
44179
|
for (let index = 0; index < this.searchMatches.length; index++) {
|
|
44156
44180
|
this.searchMatches[index].selected = index === this.selectedMatchIndex;
|
|
@@ -45498,7 +45522,10 @@ class SelectionInputsManagerPlugin extends UIPlugin {
|
|
|
45498
45522
|
};
|
|
45499
45523
|
this.selection.capture(input, anchor, {
|
|
45500
45524
|
handleEvent: input.handleEvent.bind(input),
|
|
45501
|
-
release: () =>
|
|
45525
|
+
release: () => {
|
|
45526
|
+
this.focusedInputId = null;
|
|
45527
|
+
input.focusedRangeIndex = null;
|
|
45528
|
+
},
|
|
45502
45529
|
});
|
|
45503
45530
|
this.focusedInputId = id;
|
|
45504
45531
|
}
|
|
@@ -46679,6 +46706,8 @@ class ClipboardOsState extends ClipboardCellsAbstractState {
|
|
|
46679
46706
|
right: activeCol + numberOfCols - 1,
|
|
46680
46707
|
bottom: activeRow + numberOfRows - 1,
|
|
46681
46708
|
};
|
|
46709
|
+
// we want grid selection to capture the selection stream
|
|
46710
|
+
this.selection.getBackToDefault();
|
|
46682
46711
|
this.selection.selectZone({ cell: { col: activeCol, row: activeRow }, zone }, { scrollIntoView: false });
|
|
46683
46712
|
}
|
|
46684
46713
|
getClipboardContent() {
|
|
@@ -55834,6 +55863,6 @@ const constants = {
|
|
|
55834
55863
|
export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
55835
55864
|
|
|
55836
55865
|
|
|
55837
|
-
__info__.version = "17.0.1";
|
|
55838
|
-
__info__.date = "2023-11-02T09:35:
|
|
55839
|
-
__info__.hash = "
|
|
55866
|
+
__info__.version = "17.1.0-alpha.1";
|
|
55867
|
+
__info__.date = "2023-11-02T09:35:10.532Z";
|
|
55868
|
+
__info__.hash = "3b1fe3b";
|