@odoo/o-spreadsheet 18.1.29 → 18.1.30
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.
|
@@ -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 18.1.
|
|
6
|
-
* @date 2025-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.1.30
|
|
6
|
+
* @date 2025-07-28T13:37:30.885Z
|
|
7
|
+
* @hash d42e484
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -11136,6 +11136,7 @@ const autoCompleteProviders = new Registry();
|
|
|
11136
11136
|
|
|
11137
11137
|
autoCompleteProviders.add("dataValidation", {
|
|
11138
11138
|
displayAllOnInitialContent: true,
|
|
11139
|
+
canBeToggled: false,
|
|
11139
11140
|
getProposals(tokenAtCursor, content) {
|
|
11140
11141
|
if (content.startsWith("=")) {
|
|
11141
11142
|
return [];
|
|
@@ -18938,11 +18939,17 @@ const COLUMN = {
|
|
|
18938
18939
|
if (isEvaluationError(cellReference?.value)) {
|
|
18939
18940
|
return cellReference;
|
|
18940
18941
|
}
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
18944
|
-
|
|
18945
|
-
|
|
18942
|
+
if (cellReference === undefined) {
|
|
18943
|
+
assert(() => this.__originCellPosition?.col !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
18944
|
+
return this.__originCellPosition.col + 1;
|
|
18945
|
+
}
|
|
18946
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
18947
|
+
if (zone.left === zone.right) {
|
|
18948
|
+
return zone.left + 1;
|
|
18949
|
+
}
|
|
18950
|
+
return generateMatrix(zone.right - zone.left + 1, 1, (col, row) => ({
|
|
18951
|
+
value: zone.left + col + 1,
|
|
18952
|
+
}));
|
|
18946
18953
|
},
|
|
18947
18954
|
isExported: true,
|
|
18948
18955
|
};
|
|
@@ -19161,11 +19168,17 @@ const ROW = {
|
|
|
19161
19168
|
if (isEvaluationError(cellReference?.value)) {
|
|
19162
19169
|
return cellReference;
|
|
19163
19170
|
}
|
|
19164
|
-
|
|
19165
|
-
|
|
19166
|
-
|
|
19167
|
-
|
|
19168
|
-
|
|
19171
|
+
if (cellReference === undefined) {
|
|
19172
|
+
assert(() => this.__originCellPosition?.row !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
19173
|
+
return this.__originCellPosition.row + 1;
|
|
19174
|
+
}
|
|
19175
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
19176
|
+
if (zone.top === zone.bottom) {
|
|
19177
|
+
return zone.top + 1;
|
|
19178
|
+
}
|
|
19179
|
+
return generateMatrix(1, zone.bottom - zone.top + 1, (col, row) => ({
|
|
19180
|
+
value: zone.top + row + 1,
|
|
19181
|
+
}));
|
|
19169
19182
|
},
|
|
19170
19183
|
isExported: true,
|
|
19171
19184
|
};
|
|
@@ -21441,6 +21454,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
21441
21454
|
proposals,
|
|
21442
21455
|
selectProposal: provider.selectProposal,
|
|
21443
21456
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
21457
|
+
canBeToggled: provider.canBeToggled,
|
|
21444
21458
|
};
|
|
21445
21459
|
}
|
|
21446
21460
|
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
@@ -21463,6 +21477,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
21463
21477
|
proposals,
|
|
21464
21478
|
selectProposal: provider.selectProposal,
|
|
21465
21479
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
21480
|
+
canBeToggled: provider.canBeToggled,
|
|
21466
21481
|
};
|
|
21467
21482
|
}
|
|
21468
21483
|
}
|
|
@@ -41501,9 +41516,13 @@ class Composer extends owl.Component {
|
|
|
41501
41516
|
}
|
|
41502
41517
|
}
|
|
41503
41518
|
closeAssistant() {
|
|
41519
|
+
if (!this.canBeToggled)
|
|
41520
|
+
return;
|
|
41504
41521
|
this.assistant.forcedClosed = true;
|
|
41505
41522
|
}
|
|
41506
41523
|
openAssistant() {
|
|
41524
|
+
if (!this.canBeToggled)
|
|
41525
|
+
return;
|
|
41507
41526
|
this.assistant.forcedClosed = false;
|
|
41508
41527
|
}
|
|
41509
41528
|
onWheel(event) {
|
|
@@ -41513,6 +41532,9 @@ class Composer extends owl.Component {
|
|
|
41513
41532
|
event.stopPropagation();
|
|
41514
41533
|
}
|
|
41515
41534
|
}
|
|
41535
|
+
get canBeToggled() {
|
|
41536
|
+
return this.autoCompleteState.provider?.canBeToggled ?? true;
|
|
41537
|
+
}
|
|
41516
41538
|
// ---------------------------------------------------------------------------
|
|
41517
41539
|
// Private
|
|
41518
41540
|
// ---------------------------------------------------------------------------
|
|
@@ -41648,7 +41670,7 @@ class Composer extends owl.Component {
|
|
|
41648
41670
|
}
|
|
41649
41671
|
}
|
|
41650
41672
|
autoComplete(value) {
|
|
41651
|
-
if (!value || this.assistant.forcedClosed) {
|
|
41673
|
+
if (!value || (this.assistant.forcedClosed && this.canBeToggled)) {
|
|
41652
41674
|
return;
|
|
41653
41675
|
}
|
|
41654
41676
|
this.autoCompleteState.provider?.selectProposal(value);
|
|
@@ -46893,9 +46915,15 @@ class SpreadsheetPivot {
|
|
|
46893
46915
|
return domain.reduce((current, acc) => this.filterDataEntriesFromDomainNode(current, acc), dataEntries);
|
|
46894
46916
|
}
|
|
46895
46917
|
filterDataEntriesFromDomainNode(dataEntries, domain) {
|
|
46896
|
-
const { field, value } = domain;
|
|
46918
|
+
const { field, value, type } = domain;
|
|
46897
46919
|
const { nameWithGranularity } = this.getDimension(field);
|
|
46898
|
-
return dataEntries.filter((entry) =>
|
|
46920
|
+
return dataEntries.filter((entry) => {
|
|
46921
|
+
const cellValue = entry[nameWithGranularity]?.value;
|
|
46922
|
+
if (type === "char") {
|
|
46923
|
+
return String(cellValue) === String(value);
|
|
46924
|
+
}
|
|
46925
|
+
return cellValue === value;
|
|
46926
|
+
});
|
|
46899
46927
|
}
|
|
46900
46928
|
getDimension(nameWithGranularity) {
|
|
46901
46929
|
return this.definition.getDimension(nameWithGranularity);
|
|
@@ -49395,6 +49423,11 @@ class GridComposer extends owl.Component {
|
|
|
49395
49423
|
rect = this.defaultRect;
|
|
49396
49424
|
isEditing = false;
|
|
49397
49425
|
isCellReferenceVisible = false;
|
|
49426
|
+
currentEditedCell = {
|
|
49427
|
+
col: 0,
|
|
49428
|
+
row: 0,
|
|
49429
|
+
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
49430
|
+
};
|
|
49398
49431
|
composerStore;
|
|
49399
49432
|
composerFocusStore;
|
|
49400
49433
|
composerInterface;
|
|
@@ -49424,7 +49457,7 @@ class GridComposer extends owl.Component {
|
|
|
49424
49457
|
return this.isCellReferenceVisible;
|
|
49425
49458
|
}
|
|
49426
49459
|
get cellReference() {
|
|
49427
|
-
const { col, row, sheetId } = this.
|
|
49460
|
+
const { col, row, sheetId } = this.currentEditedCell;
|
|
49428
49461
|
const prefixSheet = sheetId !== this.env.model.getters.getActiveSheetId();
|
|
49429
49462
|
return getFullReference(prefixSheet ? this.env.model.getters.getSheetName(sheetId) : undefined, toXC(col, row));
|
|
49430
49463
|
}
|
|
@@ -49516,12 +49549,17 @@ class GridComposer extends owl.Component {
|
|
|
49516
49549
|
if (!isEditing && this.composerFocusStore.activeComposer !== this.composerInterface) {
|
|
49517
49550
|
this.composerFocusStore.focusComposer(this.composerInterface, { focusMode: "inactive" });
|
|
49518
49551
|
}
|
|
49552
|
+
let shouldRecomputeRect = isEditing && !deepEquals(this.currentEditedCell, this.composerStore.currentEditedCell);
|
|
49519
49553
|
if (this.isEditing !== isEditing) {
|
|
49520
49554
|
this.isEditing = isEditing;
|
|
49521
49555
|
if (!isEditing) {
|
|
49522
49556
|
this.rect = this.defaultRect;
|
|
49523
49557
|
return;
|
|
49524
49558
|
}
|
|
49559
|
+
this.currentEditedCell = this.composerStore.currentEditedCell;
|
|
49560
|
+
shouldRecomputeRect = true;
|
|
49561
|
+
}
|
|
49562
|
+
if (shouldRecomputeRect) {
|
|
49525
49563
|
const position = this.env.model.getters.getActivePosition();
|
|
49526
49564
|
const zone = this.env.model.getters.expandZone(position.sheetId, positionToZone(position));
|
|
49527
49565
|
this.rect = this.env.model.getters.getVisibleRect(zone);
|
|
@@ -62489,6 +62527,23 @@ class HeaderSizeUIPlugin extends UIPlugin {
|
|
|
62489
62527
|
static getters = ["getRowSize", "getHeaderSize"];
|
|
62490
62528
|
tallestCellInRow = {};
|
|
62491
62529
|
ctx = document.createElement("canvas").getContext("2d");
|
|
62530
|
+
beforeHandle(cmd) {
|
|
62531
|
+
switch (cmd.type) {
|
|
62532
|
+
// Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
|
|
62533
|
+
// "UPDATE_CELL" uses the Sheet core plugin to access row data.
|
|
62534
|
+
// If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
|
|
62535
|
+
// size updates may apply to incorrect (pre-insert) rows.
|
|
62536
|
+
case "ADD_COLUMNS_ROWS":
|
|
62537
|
+
if (cmd.dimension === "COL") {
|
|
62538
|
+
return;
|
|
62539
|
+
}
|
|
62540
|
+
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
62541
|
+
const newCells = Array(cmd.quantity).fill(undefined);
|
|
62542
|
+
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
62543
|
+
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
62544
|
+
break;
|
|
62545
|
+
}
|
|
62546
|
+
}
|
|
62492
62547
|
handle(cmd) {
|
|
62493
62548
|
switch (cmd.type) {
|
|
62494
62549
|
case "START":
|
|
@@ -62518,16 +62573,6 @@ class HeaderSizeUIPlugin extends UIPlugin {
|
|
|
62518
62573
|
this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
|
|
62519
62574
|
break;
|
|
62520
62575
|
}
|
|
62521
|
-
case "ADD_COLUMNS_ROWS": {
|
|
62522
|
-
if (cmd.dimension === "COL") {
|
|
62523
|
-
return;
|
|
62524
|
-
}
|
|
62525
|
-
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
62526
|
-
const newCells = Array(cmd.quantity).fill(undefined);
|
|
62527
|
-
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
62528
|
-
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
62529
|
-
break;
|
|
62530
|
-
}
|
|
62531
62576
|
case "RESIZE_COLUMNS_ROWS":
|
|
62532
62577
|
{
|
|
62533
62578
|
const sheetId = cmd.sheetId;
|
|
@@ -68268,6 +68313,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68268
68313
|
const isBasedBefore = cmd.base < start;
|
|
68269
68314
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
68270
68315
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
68316
|
+
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
68317
|
+
const originalSize = Object.fromEntries(toRemove.map((element) => {
|
|
68318
|
+
const size = isCol
|
|
68319
|
+
? this.getters.getColSize(cmd.sheetId, element)
|
|
68320
|
+
: this.getters.getUserRowSize(cmd.sheetId, element);
|
|
68321
|
+
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
68322
|
+
return [element, isDefaultCol ? undefined : size];
|
|
68323
|
+
}));
|
|
68271
68324
|
const target = [
|
|
68272
68325
|
{
|
|
68273
68326
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -68298,13 +68351,12 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68298
68351
|
const col = selection.left;
|
|
68299
68352
|
const row = selection.top;
|
|
68300
68353
|
this.setSelectionMixin({ zone: selection, cell: { col, row } }, [selection]);
|
|
68301
|
-
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
68302
68354
|
let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
68303
68355
|
const resizingGroups = {};
|
|
68304
68356
|
for (const element of toRemove) {
|
|
68305
|
-
const size =
|
|
68357
|
+
const size = originalSize[element];
|
|
68306
68358
|
const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
|
|
68307
|
-
if (size != currentSize) {
|
|
68359
|
+
if (size && size != currentSize) {
|
|
68308
68360
|
resizingGroups[size] ??= [];
|
|
68309
68361
|
resizingGroups[size].push(currentIndex);
|
|
68310
68362
|
currentIndex += 1;
|
|
@@ -70023,14 +70075,12 @@ class BottomBarSheet extends owl.Component {
|
|
|
70023
70075
|
this.editionState = "initializing";
|
|
70024
70076
|
}
|
|
70025
70077
|
stopEdition() {
|
|
70026
|
-
|
|
70027
|
-
if (!this.state.isEditing || !input)
|
|
70078
|
+
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
70028
70079
|
return;
|
|
70029
70080
|
this.state.isEditing = false;
|
|
70030
70081
|
this.editionState = "initializing";
|
|
70031
|
-
|
|
70082
|
+
this.sheetNameRef.el.blur();
|
|
70032
70083
|
const inputValue = this.getInputContent() || "";
|
|
70033
|
-
input.innerText = inputValue;
|
|
70034
70084
|
interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
|
|
70035
70085
|
}
|
|
70036
70086
|
cancelEdition() {
|
|
@@ -76706,6 +76756,6 @@ exports.tokenColors = tokenColors;
|
|
|
76706
76756
|
exports.tokenize = tokenize;
|
|
76707
76757
|
|
|
76708
76758
|
|
|
76709
|
-
__info__.version = "18.1.
|
|
76710
|
-
__info__.date = "2025-07-
|
|
76711
|
-
__info__.hash = "
|
|
76759
|
+
__info__.version = "18.1.30";
|
|
76760
|
+
__info__.date = "2025-07-28T13:37:30.885Z";
|
|
76761
|
+
__info__.hash = "d42e484";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -5278,6 +5278,7 @@ declare class HeaderSizeUIPlugin extends UIPlugin<HeaderSizeState> implements He
|
|
|
5278
5278
|
static getters: readonly ["getRowSize", "getHeaderSize"];
|
|
5279
5279
|
readonly tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
5280
5280
|
private ctx;
|
|
5281
|
+
beforeHandle(cmd: Command): void;
|
|
5281
5282
|
handle(cmd: Command): void;
|
|
5282
5283
|
getRowSize(sheetId: UID, row: HeaderIndex): Pixel;
|
|
5283
5284
|
getHeaderSize(sheetId: UID, dimension: Dimension, index: HeaderIndex): Pixel;
|
|
@@ -8476,6 +8477,7 @@ declare class Composer extends Component<CellComposerProps, SpreadsheetChildEnv>
|
|
|
8476
8477
|
closeAssistant(): void;
|
|
8477
8478
|
openAssistant(): void;
|
|
8478
8479
|
onWheel(event: WheelEvent): void;
|
|
8480
|
+
get canBeToggled(): boolean;
|
|
8479
8481
|
private processContent;
|
|
8480
8482
|
/**
|
|
8481
8483
|
* Get the HTML content corresponding to the current composer token, divided by lines.
|
|
@@ -8517,6 +8519,7 @@ interface AutoCompleteProvider {
|
|
|
8517
8519
|
proposals: AutoCompleteProposal[];
|
|
8518
8520
|
selectProposal(text: string): void;
|
|
8519
8521
|
autoSelectFirstProposal: boolean;
|
|
8522
|
+
canBeToggled?: boolean;
|
|
8520
8523
|
}
|
|
8521
8524
|
interface ComposerStoreInterface {
|
|
8522
8525
|
currentEditedCell?: CellPosition;
|
|
@@ -8536,6 +8539,7 @@ interface ComposerStoreInterface {
|
|
|
8536
8539
|
interface AutoCompleteProviderDefinition {
|
|
8537
8540
|
sequence?: number;
|
|
8538
8541
|
autoSelectFirstProposal?: boolean;
|
|
8542
|
+
canBeToggled?: boolean;
|
|
8539
8543
|
displayAllOnInitialContent?: boolean;
|
|
8540
8544
|
maxDisplayedProposals?: number;
|
|
8541
8545
|
getProposals(this: {
|
|
@@ -8843,6 +8847,7 @@ declare class GridComposer extends Component<Props$J, SpreadsheetChildEnv> {
|
|
|
8843
8847
|
private rect;
|
|
8844
8848
|
private isEditing;
|
|
8845
8849
|
private isCellReferenceVisible;
|
|
8850
|
+
private currentEditedCell;
|
|
8846
8851
|
private composerStore;
|
|
8847
8852
|
composerFocusStore: Store<ComposerFocusStore>;
|
|
8848
8853
|
private composerInterface;
|
|
@@ -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 18.1.
|
|
6
|
-
* @date 2025-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.1.30
|
|
6
|
+
* @date 2025-07-28T13:37:30.885Z
|
|
7
|
+
* @hash d42e484
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -11134,6 +11134,7 @@ const autoCompleteProviders = new Registry();
|
|
|
11134
11134
|
|
|
11135
11135
|
autoCompleteProviders.add("dataValidation", {
|
|
11136
11136
|
displayAllOnInitialContent: true,
|
|
11137
|
+
canBeToggled: false,
|
|
11137
11138
|
getProposals(tokenAtCursor, content) {
|
|
11138
11139
|
if (content.startsWith("=")) {
|
|
11139
11140
|
return [];
|
|
@@ -18936,11 +18937,17 @@ const COLUMN = {
|
|
|
18936
18937
|
if (isEvaluationError(cellReference?.value)) {
|
|
18937
18938
|
return cellReference;
|
|
18938
18939
|
}
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
18940
|
+
if (cellReference === undefined) {
|
|
18941
|
+
assert(() => this.__originCellPosition?.col !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
18942
|
+
return this.__originCellPosition.col + 1;
|
|
18943
|
+
}
|
|
18944
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
18945
|
+
if (zone.left === zone.right) {
|
|
18946
|
+
return zone.left + 1;
|
|
18947
|
+
}
|
|
18948
|
+
return generateMatrix(zone.right - zone.left + 1, 1, (col, row) => ({
|
|
18949
|
+
value: zone.left + col + 1,
|
|
18950
|
+
}));
|
|
18944
18951
|
},
|
|
18945
18952
|
isExported: true,
|
|
18946
18953
|
};
|
|
@@ -19159,11 +19166,17 @@ const ROW = {
|
|
|
19159
19166
|
if (isEvaluationError(cellReference?.value)) {
|
|
19160
19167
|
return cellReference;
|
|
19161
19168
|
}
|
|
19162
|
-
|
|
19163
|
-
|
|
19164
|
-
|
|
19165
|
-
|
|
19166
|
-
|
|
19169
|
+
if (cellReference === undefined) {
|
|
19170
|
+
assert(() => this.__originCellPosition?.row !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
19171
|
+
return this.__originCellPosition.row + 1;
|
|
19172
|
+
}
|
|
19173
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
19174
|
+
if (zone.top === zone.bottom) {
|
|
19175
|
+
return zone.top + 1;
|
|
19176
|
+
}
|
|
19177
|
+
return generateMatrix(1, zone.bottom - zone.top + 1, (col, row) => ({
|
|
19178
|
+
value: zone.top + row + 1,
|
|
19179
|
+
}));
|
|
19167
19180
|
},
|
|
19168
19181
|
isExported: true,
|
|
19169
19182
|
};
|
|
@@ -21439,6 +21452,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
21439
21452
|
proposals,
|
|
21440
21453
|
selectProposal: provider.selectProposal,
|
|
21441
21454
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
21455
|
+
canBeToggled: provider.canBeToggled,
|
|
21442
21456
|
};
|
|
21443
21457
|
}
|
|
21444
21458
|
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
@@ -21461,6 +21475,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
21461
21475
|
proposals,
|
|
21462
21476
|
selectProposal: provider.selectProposal,
|
|
21463
21477
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
21478
|
+
canBeToggled: provider.canBeToggled,
|
|
21464
21479
|
};
|
|
21465
21480
|
}
|
|
21466
21481
|
}
|
|
@@ -41499,9 +41514,13 @@ class Composer extends Component {
|
|
|
41499
41514
|
}
|
|
41500
41515
|
}
|
|
41501
41516
|
closeAssistant() {
|
|
41517
|
+
if (!this.canBeToggled)
|
|
41518
|
+
return;
|
|
41502
41519
|
this.assistant.forcedClosed = true;
|
|
41503
41520
|
}
|
|
41504
41521
|
openAssistant() {
|
|
41522
|
+
if (!this.canBeToggled)
|
|
41523
|
+
return;
|
|
41505
41524
|
this.assistant.forcedClosed = false;
|
|
41506
41525
|
}
|
|
41507
41526
|
onWheel(event) {
|
|
@@ -41511,6 +41530,9 @@ class Composer extends Component {
|
|
|
41511
41530
|
event.stopPropagation();
|
|
41512
41531
|
}
|
|
41513
41532
|
}
|
|
41533
|
+
get canBeToggled() {
|
|
41534
|
+
return this.autoCompleteState.provider?.canBeToggled ?? true;
|
|
41535
|
+
}
|
|
41514
41536
|
// ---------------------------------------------------------------------------
|
|
41515
41537
|
// Private
|
|
41516
41538
|
// ---------------------------------------------------------------------------
|
|
@@ -41646,7 +41668,7 @@ class Composer extends Component {
|
|
|
41646
41668
|
}
|
|
41647
41669
|
}
|
|
41648
41670
|
autoComplete(value) {
|
|
41649
|
-
if (!value || this.assistant.forcedClosed) {
|
|
41671
|
+
if (!value || (this.assistant.forcedClosed && this.canBeToggled)) {
|
|
41650
41672
|
return;
|
|
41651
41673
|
}
|
|
41652
41674
|
this.autoCompleteState.provider?.selectProposal(value);
|
|
@@ -46891,9 +46913,15 @@ class SpreadsheetPivot {
|
|
|
46891
46913
|
return domain.reduce((current, acc) => this.filterDataEntriesFromDomainNode(current, acc), dataEntries);
|
|
46892
46914
|
}
|
|
46893
46915
|
filterDataEntriesFromDomainNode(dataEntries, domain) {
|
|
46894
|
-
const { field, value } = domain;
|
|
46916
|
+
const { field, value, type } = domain;
|
|
46895
46917
|
const { nameWithGranularity } = this.getDimension(field);
|
|
46896
|
-
return dataEntries.filter((entry) =>
|
|
46918
|
+
return dataEntries.filter((entry) => {
|
|
46919
|
+
const cellValue = entry[nameWithGranularity]?.value;
|
|
46920
|
+
if (type === "char") {
|
|
46921
|
+
return String(cellValue) === String(value);
|
|
46922
|
+
}
|
|
46923
|
+
return cellValue === value;
|
|
46924
|
+
});
|
|
46897
46925
|
}
|
|
46898
46926
|
getDimension(nameWithGranularity) {
|
|
46899
46927
|
return this.definition.getDimension(nameWithGranularity);
|
|
@@ -49393,6 +49421,11 @@ class GridComposer extends Component {
|
|
|
49393
49421
|
rect = this.defaultRect;
|
|
49394
49422
|
isEditing = false;
|
|
49395
49423
|
isCellReferenceVisible = false;
|
|
49424
|
+
currentEditedCell = {
|
|
49425
|
+
col: 0,
|
|
49426
|
+
row: 0,
|
|
49427
|
+
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
49428
|
+
};
|
|
49396
49429
|
composerStore;
|
|
49397
49430
|
composerFocusStore;
|
|
49398
49431
|
composerInterface;
|
|
@@ -49422,7 +49455,7 @@ class GridComposer extends Component {
|
|
|
49422
49455
|
return this.isCellReferenceVisible;
|
|
49423
49456
|
}
|
|
49424
49457
|
get cellReference() {
|
|
49425
|
-
const { col, row, sheetId } = this.
|
|
49458
|
+
const { col, row, sheetId } = this.currentEditedCell;
|
|
49426
49459
|
const prefixSheet = sheetId !== this.env.model.getters.getActiveSheetId();
|
|
49427
49460
|
return getFullReference(prefixSheet ? this.env.model.getters.getSheetName(sheetId) : undefined, toXC(col, row));
|
|
49428
49461
|
}
|
|
@@ -49514,12 +49547,17 @@ class GridComposer extends Component {
|
|
|
49514
49547
|
if (!isEditing && this.composerFocusStore.activeComposer !== this.composerInterface) {
|
|
49515
49548
|
this.composerFocusStore.focusComposer(this.composerInterface, { focusMode: "inactive" });
|
|
49516
49549
|
}
|
|
49550
|
+
let shouldRecomputeRect = isEditing && !deepEquals(this.currentEditedCell, this.composerStore.currentEditedCell);
|
|
49517
49551
|
if (this.isEditing !== isEditing) {
|
|
49518
49552
|
this.isEditing = isEditing;
|
|
49519
49553
|
if (!isEditing) {
|
|
49520
49554
|
this.rect = this.defaultRect;
|
|
49521
49555
|
return;
|
|
49522
49556
|
}
|
|
49557
|
+
this.currentEditedCell = this.composerStore.currentEditedCell;
|
|
49558
|
+
shouldRecomputeRect = true;
|
|
49559
|
+
}
|
|
49560
|
+
if (shouldRecomputeRect) {
|
|
49523
49561
|
const position = this.env.model.getters.getActivePosition();
|
|
49524
49562
|
const zone = this.env.model.getters.expandZone(position.sheetId, positionToZone(position));
|
|
49525
49563
|
this.rect = this.env.model.getters.getVisibleRect(zone);
|
|
@@ -62487,6 +62525,23 @@ class HeaderSizeUIPlugin extends UIPlugin {
|
|
|
62487
62525
|
static getters = ["getRowSize", "getHeaderSize"];
|
|
62488
62526
|
tallestCellInRow = {};
|
|
62489
62527
|
ctx = document.createElement("canvas").getContext("2d");
|
|
62528
|
+
beforeHandle(cmd) {
|
|
62529
|
+
switch (cmd.type) {
|
|
62530
|
+
// Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
|
|
62531
|
+
// "UPDATE_CELL" uses the Sheet core plugin to access row data.
|
|
62532
|
+
// If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
|
|
62533
|
+
// size updates may apply to incorrect (pre-insert) rows.
|
|
62534
|
+
case "ADD_COLUMNS_ROWS":
|
|
62535
|
+
if (cmd.dimension === "COL") {
|
|
62536
|
+
return;
|
|
62537
|
+
}
|
|
62538
|
+
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
62539
|
+
const newCells = Array(cmd.quantity).fill(undefined);
|
|
62540
|
+
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
62541
|
+
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
62542
|
+
break;
|
|
62543
|
+
}
|
|
62544
|
+
}
|
|
62490
62545
|
handle(cmd) {
|
|
62491
62546
|
switch (cmd.type) {
|
|
62492
62547
|
case "START":
|
|
@@ -62516,16 +62571,6 @@ class HeaderSizeUIPlugin extends UIPlugin {
|
|
|
62516
62571
|
this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
|
|
62517
62572
|
break;
|
|
62518
62573
|
}
|
|
62519
|
-
case "ADD_COLUMNS_ROWS": {
|
|
62520
|
-
if (cmd.dimension === "COL") {
|
|
62521
|
-
return;
|
|
62522
|
-
}
|
|
62523
|
-
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
62524
|
-
const newCells = Array(cmd.quantity).fill(undefined);
|
|
62525
|
-
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
62526
|
-
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
62527
|
-
break;
|
|
62528
|
-
}
|
|
62529
62574
|
case "RESIZE_COLUMNS_ROWS":
|
|
62530
62575
|
{
|
|
62531
62576
|
const sheetId = cmd.sheetId;
|
|
@@ -68266,6 +68311,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68266
68311
|
const isBasedBefore = cmd.base < start;
|
|
68267
68312
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
68268
68313
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
68314
|
+
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
68315
|
+
const originalSize = Object.fromEntries(toRemove.map((element) => {
|
|
68316
|
+
const size = isCol
|
|
68317
|
+
? this.getters.getColSize(cmd.sheetId, element)
|
|
68318
|
+
: this.getters.getUserRowSize(cmd.sheetId, element);
|
|
68319
|
+
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
68320
|
+
return [element, isDefaultCol ? undefined : size];
|
|
68321
|
+
}));
|
|
68269
68322
|
const target = [
|
|
68270
68323
|
{
|
|
68271
68324
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -68296,13 +68349,12 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68296
68349
|
const col = selection.left;
|
|
68297
68350
|
const row = selection.top;
|
|
68298
68351
|
this.setSelectionMixin({ zone: selection, cell: { col, row } }, [selection]);
|
|
68299
|
-
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
68300
68352
|
let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
68301
68353
|
const resizingGroups = {};
|
|
68302
68354
|
for (const element of toRemove) {
|
|
68303
|
-
const size =
|
|
68355
|
+
const size = originalSize[element];
|
|
68304
68356
|
const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
|
|
68305
|
-
if (size != currentSize) {
|
|
68357
|
+
if (size && size != currentSize) {
|
|
68306
68358
|
resizingGroups[size] ??= [];
|
|
68307
68359
|
resizingGroups[size].push(currentIndex);
|
|
68308
68360
|
currentIndex += 1;
|
|
@@ -70021,14 +70073,12 @@ class BottomBarSheet extends Component {
|
|
|
70021
70073
|
this.editionState = "initializing";
|
|
70022
70074
|
}
|
|
70023
70075
|
stopEdition() {
|
|
70024
|
-
|
|
70025
|
-
if (!this.state.isEditing || !input)
|
|
70076
|
+
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
70026
70077
|
return;
|
|
70027
70078
|
this.state.isEditing = false;
|
|
70028
70079
|
this.editionState = "initializing";
|
|
70029
|
-
|
|
70080
|
+
this.sheetNameRef.el.blur();
|
|
70030
70081
|
const inputValue = this.getInputContent() || "";
|
|
70031
|
-
input.innerText = inputValue;
|
|
70032
70082
|
interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
|
|
70033
70083
|
}
|
|
70034
70084
|
cancelEdition() {
|
|
@@ -76660,6 +76710,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
76660
76710
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
76661
76711
|
|
|
76662
76712
|
|
|
76663
|
-
__info__.version = "18.1.
|
|
76664
|
-
__info__.date = "2025-07-
|
|
76665
|
-
__info__.hash = "
|
|
76713
|
+
__info__.version = "18.1.30";
|
|
76714
|
+
__info__.date = "2025-07-28T13:37:30.885Z";
|
|
76715
|
+
__info__.hash = "d42e484";
|