@odoo/o-spreadsheet 18.2.21 → 18.2.22
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.2.
|
|
6
|
-
* @date 2025-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.2.22
|
|
6
|
+
* @date 2025-07-28T13:37:29.067Z
|
|
7
|
+
* @hash 0e414b1
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -11309,6 +11309,7 @@ const autoCompleteProviders = new Registry();
|
|
|
11309
11309
|
|
|
11310
11310
|
autoCompleteProviders.add("dataValidation", {
|
|
11311
11311
|
displayAllOnInitialContent: true,
|
|
11312
|
+
canBeToggled: false,
|
|
11312
11313
|
getProposals(tokenAtCursor, content) {
|
|
11313
11314
|
if (content.startsWith("=")) {
|
|
11314
11315
|
return [];
|
|
@@ -19111,11 +19112,17 @@ const COLUMN = {
|
|
|
19111
19112
|
if (isEvaluationError(cellReference?.value)) {
|
|
19112
19113
|
return cellReference;
|
|
19113
19114
|
}
|
|
19114
|
-
|
|
19115
|
-
|
|
19116
|
-
|
|
19117
|
-
|
|
19118
|
-
|
|
19115
|
+
if (cellReference === undefined) {
|
|
19116
|
+
assert(() => this.__originCellPosition?.col !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
19117
|
+
return this.__originCellPosition.col + 1;
|
|
19118
|
+
}
|
|
19119
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
19120
|
+
if (zone.left === zone.right) {
|
|
19121
|
+
return zone.left + 1;
|
|
19122
|
+
}
|
|
19123
|
+
return generateMatrix(zone.right - zone.left + 1, 1, (col, row) => ({
|
|
19124
|
+
value: zone.left + col + 1,
|
|
19125
|
+
}));
|
|
19119
19126
|
},
|
|
19120
19127
|
isExported: true,
|
|
19121
19128
|
};
|
|
@@ -19334,11 +19341,17 @@ const ROW = {
|
|
|
19334
19341
|
if (isEvaluationError(cellReference?.value)) {
|
|
19335
19342
|
return cellReference;
|
|
19336
19343
|
}
|
|
19337
|
-
|
|
19338
|
-
|
|
19339
|
-
|
|
19340
|
-
|
|
19341
|
-
|
|
19344
|
+
if (cellReference === undefined) {
|
|
19345
|
+
assert(() => this.__originCellPosition?.row !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
19346
|
+
return this.__originCellPosition.row + 1;
|
|
19347
|
+
}
|
|
19348
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
19349
|
+
if (zone.top === zone.bottom) {
|
|
19350
|
+
return zone.top + 1;
|
|
19351
|
+
}
|
|
19352
|
+
return generateMatrix(1, zone.bottom - zone.top + 1, (col, row) => ({
|
|
19353
|
+
value: zone.top + row + 1,
|
|
19354
|
+
}));
|
|
19342
19355
|
},
|
|
19343
19356
|
isExported: true,
|
|
19344
19357
|
};
|
|
@@ -21614,6 +21627,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
21614
21627
|
proposals,
|
|
21615
21628
|
selectProposal: provider.selectProposal,
|
|
21616
21629
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
21630
|
+
canBeToggled: provider.canBeToggled,
|
|
21617
21631
|
};
|
|
21618
21632
|
}
|
|
21619
21633
|
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
@@ -21636,6 +21650,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
21636
21650
|
proposals,
|
|
21637
21651
|
selectProposal: provider.selectProposal,
|
|
21638
21652
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
21653
|
+
canBeToggled: provider.canBeToggled,
|
|
21639
21654
|
};
|
|
21640
21655
|
}
|
|
21641
21656
|
}
|
|
@@ -41307,9 +41322,13 @@ class Composer extends owl.Component {
|
|
|
41307
41322
|
}
|
|
41308
41323
|
}
|
|
41309
41324
|
closeAssistant() {
|
|
41325
|
+
if (!this.canBeToggled)
|
|
41326
|
+
return;
|
|
41310
41327
|
this.assistant.forcedClosed = true;
|
|
41311
41328
|
}
|
|
41312
41329
|
openAssistant() {
|
|
41330
|
+
if (!this.canBeToggled)
|
|
41331
|
+
return;
|
|
41313
41332
|
this.assistant.forcedClosed = false;
|
|
41314
41333
|
}
|
|
41315
41334
|
onWheel(event) {
|
|
@@ -41319,6 +41338,9 @@ class Composer extends owl.Component {
|
|
|
41319
41338
|
event.stopPropagation();
|
|
41320
41339
|
}
|
|
41321
41340
|
}
|
|
41341
|
+
get canBeToggled() {
|
|
41342
|
+
return this.autoCompleteState.provider?.canBeToggled ?? true;
|
|
41343
|
+
}
|
|
41322
41344
|
// ---------------------------------------------------------------------------
|
|
41323
41345
|
// Private
|
|
41324
41346
|
// ---------------------------------------------------------------------------
|
|
@@ -41454,7 +41476,7 @@ class Composer extends owl.Component {
|
|
|
41454
41476
|
}
|
|
41455
41477
|
}
|
|
41456
41478
|
autoComplete(value) {
|
|
41457
|
-
if (!value || this.assistant.forcedClosed) {
|
|
41479
|
+
if (!value || (this.assistant.forcedClosed && this.canBeToggled)) {
|
|
41458
41480
|
return;
|
|
41459
41481
|
}
|
|
41460
41482
|
this.autoCompleteState.provider?.selectProposal(value);
|
|
@@ -47238,9 +47260,15 @@ class SpreadsheetPivot {
|
|
|
47238
47260
|
return domain.reduce((current, acc) => this.filterDataEntriesFromDomainNode(current, acc), dataEntries);
|
|
47239
47261
|
}
|
|
47240
47262
|
filterDataEntriesFromDomainNode(dataEntries, domain) {
|
|
47241
|
-
const { field, value } = domain;
|
|
47263
|
+
const { field, value, type } = domain;
|
|
47242
47264
|
const { nameWithGranularity } = this.getDimension(field);
|
|
47243
|
-
return dataEntries.filter((entry) =>
|
|
47265
|
+
return dataEntries.filter((entry) => {
|
|
47266
|
+
const cellValue = entry[nameWithGranularity]?.value;
|
|
47267
|
+
if (type === "char") {
|
|
47268
|
+
return String(cellValue) === String(value);
|
|
47269
|
+
}
|
|
47270
|
+
return cellValue === value;
|
|
47271
|
+
});
|
|
47244
47272
|
}
|
|
47245
47273
|
getDimension(nameWithGranularity) {
|
|
47246
47274
|
return this.definition.getDimension(nameWithGranularity);
|
|
@@ -49736,6 +49764,11 @@ class GridComposer extends owl.Component {
|
|
|
49736
49764
|
rect = this.defaultRect;
|
|
49737
49765
|
isEditing = false;
|
|
49738
49766
|
isCellReferenceVisible = false;
|
|
49767
|
+
currentEditedCell = {
|
|
49768
|
+
col: 0,
|
|
49769
|
+
row: 0,
|
|
49770
|
+
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
49771
|
+
};
|
|
49739
49772
|
composerStore;
|
|
49740
49773
|
composerFocusStore;
|
|
49741
49774
|
composerInterface;
|
|
@@ -49765,7 +49798,7 @@ class GridComposer extends owl.Component {
|
|
|
49765
49798
|
return this.isCellReferenceVisible;
|
|
49766
49799
|
}
|
|
49767
49800
|
get cellReference() {
|
|
49768
|
-
const { col, row, sheetId } = this.
|
|
49801
|
+
const { col, row, sheetId } = this.currentEditedCell;
|
|
49769
49802
|
const prefixSheet = sheetId !== this.env.model.getters.getActiveSheetId();
|
|
49770
49803
|
return getFullReference(prefixSheet ? this.env.model.getters.getSheetName(sheetId) : undefined, toXC(col, row));
|
|
49771
49804
|
}
|
|
@@ -49857,12 +49890,17 @@ class GridComposer extends owl.Component {
|
|
|
49857
49890
|
if (!isEditing && this.composerFocusStore.activeComposer !== this.composerInterface) {
|
|
49858
49891
|
this.composerFocusStore.focusComposer(this.composerInterface, { focusMode: "inactive" });
|
|
49859
49892
|
}
|
|
49893
|
+
let shouldRecomputeRect = isEditing && !deepEquals(this.currentEditedCell, this.composerStore.currentEditedCell);
|
|
49860
49894
|
if (this.isEditing !== isEditing) {
|
|
49861
49895
|
this.isEditing = isEditing;
|
|
49862
49896
|
if (!isEditing) {
|
|
49863
49897
|
this.rect = this.defaultRect;
|
|
49864
49898
|
return;
|
|
49865
49899
|
}
|
|
49900
|
+
this.currentEditedCell = this.composerStore.currentEditedCell;
|
|
49901
|
+
shouldRecomputeRect = true;
|
|
49902
|
+
}
|
|
49903
|
+
if (shouldRecomputeRect) {
|
|
49866
49904
|
const position = this.env.model.getters.getActivePosition();
|
|
49867
49905
|
const zone = this.env.model.getters.expandZone(position.sheetId, positionToZone(position));
|
|
49868
49906
|
this.rect = this.env.model.getters.getVisibleRect(zone);
|
|
@@ -62971,6 +63009,23 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
62971
63009
|
static getters = ["getRowSize", "getHeaderSize"];
|
|
62972
63010
|
tallestCellInRow = {};
|
|
62973
63011
|
ctx = document.createElement("canvas").getContext("2d");
|
|
63012
|
+
beforeHandle(cmd) {
|
|
63013
|
+
switch (cmd.type) {
|
|
63014
|
+
// Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
|
|
63015
|
+
// "UPDATE_CELL" uses the Sheet core plugin to access row data.
|
|
63016
|
+
// If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
|
|
63017
|
+
// size updates may apply to incorrect (pre-insert) rows.
|
|
63018
|
+
case "ADD_COLUMNS_ROWS":
|
|
63019
|
+
if (cmd.dimension === "COL") {
|
|
63020
|
+
return;
|
|
63021
|
+
}
|
|
63022
|
+
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
63023
|
+
const newCells = Array(cmd.quantity).fill(undefined);
|
|
63024
|
+
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
63025
|
+
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
63026
|
+
break;
|
|
63027
|
+
}
|
|
63028
|
+
}
|
|
62974
63029
|
handle(cmd) {
|
|
62975
63030
|
switch (cmd.type) {
|
|
62976
63031
|
case "START":
|
|
@@ -63000,16 +63055,6 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
63000
63055
|
this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
|
|
63001
63056
|
break;
|
|
63002
63057
|
}
|
|
63003
|
-
case "ADD_COLUMNS_ROWS": {
|
|
63004
|
-
if (cmd.dimension === "COL") {
|
|
63005
|
-
return;
|
|
63006
|
-
}
|
|
63007
|
-
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
63008
|
-
const newCells = Array(cmd.quantity).fill(undefined);
|
|
63009
|
-
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
63010
|
-
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
63011
|
-
break;
|
|
63012
|
-
}
|
|
63013
63058
|
case "RESIZE_COLUMNS_ROWS":
|
|
63014
63059
|
{
|
|
63015
63060
|
const sheetId = cmd.sheetId;
|
|
@@ -68762,6 +68807,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68762
68807
|
const isBasedBefore = cmd.base < start;
|
|
68763
68808
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
68764
68809
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
68810
|
+
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
68811
|
+
const originalSize = Object.fromEntries(toRemove.map((element) => {
|
|
68812
|
+
const size = isCol
|
|
68813
|
+
? this.getters.getColSize(cmd.sheetId, element)
|
|
68814
|
+
: this.getters.getUserRowSize(cmd.sheetId, element);
|
|
68815
|
+
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
68816
|
+
return [element, isDefaultCol ? undefined : size];
|
|
68817
|
+
}));
|
|
68765
68818
|
const target = [
|
|
68766
68819
|
{
|
|
68767
68820
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -68792,13 +68845,12 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68792
68845
|
const col = selection.left;
|
|
68793
68846
|
const row = selection.top;
|
|
68794
68847
|
this.setSelectionMixin({ zone: selection, cell: { col, row } }, [selection]);
|
|
68795
|
-
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
68796
68848
|
let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
68797
68849
|
const resizingGroups = {};
|
|
68798
68850
|
for (const element of toRemove) {
|
|
68799
|
-
const size =
|
|
68851
|
+
const size = originalSize[element];
|
|
68800
68852
|
const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
|
|
68801
|
-
if (size != currentSize) {
|
|
68853
|
+
if (size && size != currentSize) {
|
|
68802
68854
|
resizingGroups[size] ??= [];
|
|
68803
68855
|
resizingGroups[size].push(currentIndex);
|
|
68804
68856
|
currentIndex += 1;
|
|
@@ -70483,14 +70535,12 @@ class BottomBarSheet extends owl.Component {
|
|
|
70483
70535
|
this.editionState = "initializing";
|
|
70484
70536
|
}
|
|
70485
70537
|
stopEdition() {
|
|
70486
|
-
|
|
70487
|
-
if (!this.state.isEditing || !input)
|
|
70538
|
+
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
70488
70539
|
return;
|
|
70489
70540
|
this.state.isEditing = false;
|
|
70490
70541
|
this.editionState = "initializing";
|
|
70491
|
-
|
|
70542
|
+
this.sheetNameRef.el.blur();
|
|
70492
70543
|
const inputValue = this.getInputContent() || "";
|
|
70493
|
-
input.innerText = inputValue;
|
|
70494
70544
|
interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
|
|
70495
70545
|
}
|
|
70496
70546
|
cancelEdition() {
|
|
@@ -77187,6 +77237,6 @@ exports.tokenColors = tokenColors;
|
|
|
77187
77237
|
exports.tokenize = tokenize;
|
|
77188
77238
|
|
|
77189
77239
|
|
|
77190
|
-
__info__.version = "18.2.
|
|
77191
|
-
__info__.date = "2025-07-
|
|
77192
|
-
__info__.hash = "
|
|
77240
|
+
__info__.version = "18.2.22";
|
|
77241
|
+
__info__.date = "2025-07-28T13:37:29.067Z";
|
|
77242
|
+
__info__.hash = "0e414b1";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -5316,6 +5316,7 @@ declare class HeaderSizeUIPlugin extends CoreViewPlugin<HeaderSizeState> impleme
|
|
|
5316
5316
|
static getters: readonly ["getRowSize", "getHeaderSize"];
|
|
5317
5317
|
readonly tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
5318
5318
|
private ctx;
|
|
5319
|
+
beforeHandle(cmd: Command): void;
|
|
5319
5320
|
handle(cmd: Command): void;
|
|
5320
5321
|
getRowSize(sheetId: UID, row: HeaderIndex): Pixel;
|
|
5321
5322
|
getHeaderSize(sheetId: UID, dimension: Dimension, index: HeaderIndex): Pixel;
|
|
@@ -8313,6 +8314,7 @@ declare class Composer extends Component<CellComposerProps, SpreadsheetChildEnv>
|
|
|
8313
8314
|
closeAssistant(): void;
|
|
8314
8315
|
openAssistant(): void;
|
|
8315
8316
|
onWheel(event: WheelEvent): void;
|
|
8317
|
+
get canBeToggled(): boolean;
|
|
8316
8318
|
private processContent;
|
|
8317
8319
|
/**
|
|
8318
8320
|
* Get the HTML content corresponding to the current composer token, divided by lines.
|
|
@@ -8354,6 +8356,7 @@ interface AutoCompleteProvider {
|
|
|
8354
8356
|
proposals: AutoCompleteProposal[];
|
|
8355
8357
|
selectProposal(text: string): void;
|
|
8356
8358
|
autoSelectFirstProposal: boolean;
|
|
8359
|
+
canBeToggled?: boolean;
|
|
8357
8360
|
}
|
|
8358
8361
|
interface ComposerStoreInterface {
|
|
8359
8362
|
currentEditedCell?: CellPosition;
|
|
@@ -8373,6 +8376,7 @@ interface ComposerStoreInterface {
|
|
|
8373
8376
|
interface AutoCompleteProviderDefinition {
|
|
8374
8377
|
sequence?: number;
|
|
8375
8378
|
autoSelectFirstProposal?: boolean;
|
|
8379
|
+
canBeToggled?: boolean;
|
|
8376
8380
|
displayAllOnInitialContent?: boolean;
|
|
8377
8381
|
maxDisplayedProposals?: number;
|
|
8378
8382
|
getProposals(this: {
|
|
@@ -8972,6 +8976,7 @@ declare class GridComposer extends Component<Props$J, SpreadsheetChildEnv> {
|
|
|
8972
8976
|
private rect;
|
|
8973
8977
|
private isEditing;
|
|
8974
8978
|
private isCellReferenceVisible;
|
|
8979
|
+
private currentEditedCell;
|
|
8975
8980
|
private composerStore;
|
|
8976
8981
|
composerFocusStore: Store<ComposerFocusStore>;
|
|
8977
8982
|
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.2.
|
|
6
|
-
* @date 2025-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.2.22
|
|
6
|
+
* @date 2025-07-28T13:37:29.067Z
|
|
7
|
+
* @hash 0e414b1
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -11307,6 +11307,7 @@ const autoCompleteProviders = new Registry();
|
|
|
11307
11307
|
|
|
11308
11308
|
autoCompleteProviders.add("dataValidation", {
|
|
11309
11309
|
displayAllOnInitialContent: true,
|
|
11310
|
+
canBeToggled: false,
|
|
11310
11311
|
getProposals(tokenAtCursor, content) {
|
|
11311
11312
|
if (content.startsWith("=")) {
|
|
11312
11313
|
return [];
|
|
@@ -19109,11 +19110,17 @@ const COLUMN = {
|
|
|
19109
19110
|
if (isEvaluationError(cellReference?.value)) {
|
|
19110
19111
|
return cellReference;
|
|
19111
19112
|
}
|
|
19112
|
-
|
|
19113
|
-
|
|
19114
|
-
|
|
19115
|
-
|
|
19116
|
-
|
|
19113
|
+
if (cellReference === undefined) {
|
|
19114
|
+
assert(() => this.__originCellPosition?.col !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
19115
|
+
return this.__originCellPosition.col + 1;
|
|
19116
|
+
}
|
|
19117
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
19118
|
+
if (zone.left === zone.right) {
|
|
19119
|
+
return zone.left + 1;
|
|
19120
|
+
}
|
|
19121
|
+
return generateMatrix(zone.right - zone.left + 1, 1, (col, row) => ({
|
|
19122
|
+
value: zone.left + col + 1,
|
|
19123
|
+
}));
|
|
19117
19124
|
},
|
|
19118
19125
|
isExported: true,
|
|
19119
19126
|
};
|
|
@@ -19332,11 +19339,17 @@ const ROW = {
|
|
|
19332
19339
|
if (isEvaluationError(cellReference?.value)) {
|
|
19333
19340
|
return cellReference;
|
|
19334
19341
|
}
|
|
19335
|
-
|
|
19336
|
-
|
|
19337
|
-
|
|
19338
|
-
|
|
19339
|
-
|
|
19342
|
+
if (cellReference === undefined) {
|
|
19343
|
+
assert(() => this.__originCellPosition?.row !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
19344
|
+
return this.__originCellPosition.row + 1;
|
|
19345
|
+
}
|
|
19346
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
19347
|
+
if (zone.top === zone.bottom) {
|
|
19348
|
+
return zone.top + 1;
|
|
19349
|
+
}
|
|
19350
|
+
return generateMatrix(1, zone.bottom - zone.top + 1, (col, row) => ({
|
|
19351
|
+
value: zone.top + row + 1,
|
|
19352
|
+
}));
|
|
19340
19353
|
},
|
|
19341
19354
|
isExported: true,
|
|
19342
19355
|
};
|
|
@@ -21612,6 +21625,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
21612
21625
|
proposals,
|
|
21613
21626
|
selectProposal: provider.selectProposal,
|
|
21614
21627
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
21628
|
+
canBeToggled: provider.canBeToggled,
|
|
21615
21629
|
};
|
|
21616
21630
|
}
|
|
21617
21631
|
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
@@ -21634,6 +21648,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
21634
21648
|
proposals,
|
|
21635
21649
|
selectProposal: provider.selectProposal,
|
|
21636
21650
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
21651
|
+
canBeToggled: provider.canBeToggled,
|
|
21637
21652
|
};
|
|
21638
21653
|
}
|
|
21639
21654
|
}
|
|
@@ -41305,9 +41320,13 @@ class Composer extends Component {
|
|
|
41305
41320
|
}
|
|
41306
41321
|
}
|
|
41307
41322
|
closeAssistant() {
|
|
41323
|
+
if (!this.canBeToggled)
|
|
41324
|
+
return;
|
|
41308
41325
|
this.assistant.forcedClosed = true;
|
|
41309
41326
|
}
|
|
41310
41327
|
openAssistant() {
|
|
41328
|
+
if (!this.canBeToggled)
|
|
41329
|
+
return;
|
|
41311
41330
|
this.assistant.forcedClosed = false;
|
|
41312
41331
|
}
|
|
41313
41332
|
onWheel(event) {
|
|
@@ -41317,6 +41336,9 @@ class Composer extends Component {
|
|
|
41317
41336
|
event.stopPropagation();
|
|
41318
41337
|
}
|
|
41319
41338
|
}
|
|
41339
|
+
get canBeToggled() {
|
|
41340
|
+
return this.autoCompleteState.provider?.canBeToggled ?? true;
|
|
41341
|
+
}
|
|
41320
41342
|
// ---------------------------------------------------------------------------
|
|
41321
41343
|
// Private
|
|
41322
41344
|
// ---------------------------------------------------------------------------
|
|
@@ -41452,7 +41474,7 @@ class Composer extends Component {
|
|
|
41452
41474
|
}
|
|
41453
41475
|
}
|
|
41454
41476
|
autoComplete(value) {
|
|
41455
|
-
if (!value || this.assistant.forcedClosed) {
|
|
41477
|
+
if (!value || (this.assistant.forcedClosed && this.canBeToggled)) {
|
|
41456
41478
|
return;
|
|
41457
41479
|
}
|
|
41458
41480
|
this.autoCompleteState.provider?.selectProposal(value);
|
|
@@ -47236,9 +47258,15 @@ class SpreadsheetPivot {
|
|
|
47236
47258
|
return domain.reduce((current, acc) => this.filterDataEntriesFromDomainNode(current, acc), dataEntries);
|
|
47237
47259
|
}
|
|
47238
47260
|
filterDataEntriesFromDomainNode(dataEntries, domain) {
|
|
47239
|
-
const { field, value } = domain;
|
|
47261
|
+
const { field, value, type } = domain;
|
|
47240
47262
|
const { nameWithGranularity } = this.getDimension(field);
|
|
47241
|
-
return dataEntries.filter((entry) =>
|
|
47263
|
+
return dataEntries.filter((entry) => {
|
|
47264
|
+
const cellValue = entry[nameWithGranularity]?.value;
|
|
47265
|
+
if (type === "char") {
|
|
47266
|
+
return String(cellValue) === String(value);
|
|
47267
|
+
}
|
|
47268
|
+
return cellValue === value;
|
|
47269
|
+
});
|
|
47242
47270
|
}
|
|
47243
47271
|
getDimension(nameWithGranularity) {
|
|
47244
47272
|
return this.definition.getDimension(nameWithGranularity);
|
|
@@ -49734,6 +49762,11 @@ class GridComposer extends Component {
|
|
|
49734
49762
|
rect = this.defaultRect;
|
|
49735
49763
|
isEditing = false;
|
|
49736
49764
|
isCellReferenceVisible = false;
|
|
49765
|
+
currentEditedCell = {
|
|
49766
|
+
col: 0,
|
|
49767
|
+
row: 0,
|
|
49768
|
+
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
49769
|
+
};
|
|
49737
49770
|
composerStore;
|
|
49738
49771
|
composerFocusStore;
|
|
49739
49772
|
composerInterface;
|
|
@@ -49763,7 +49796,7 @@ class GridComposer extends Component {
|
|
|
49763
49796
|
return this.isCellReferenceVisible;
|
|
49764
49797
|
}
|
|
49765
49798
|
get cellReference() {
|
|
49766
|
-
const { col, row, sheetId } = this.
|
|
49799
|
+
const { col, row, sheetId } = this.currentEditedCell;
|
|
49767
49800
|
const prefixSheet = sheetId !== this.env.model.getters.getActiveSheetId();
|
|
49768
49801
|
return getFullReference(prefixSheet ? this.env.model.getters.getSheetName(sheetId) : undefined, toXC(col, row));
|
|
49769
49802
|
}
|
|
@@ -49855,12 +49888,17 @@ class GridComposer extends Component {
|
|
|
49855
49888
|
if (!isEditing && this.composerFocusStore.activeComposer !== this.composerInterface) {
|
|
49856
49889
|
this.composerFocusStore.focusComposer(this.composerInterface, { focusMode: "inactive" });
|
|
49857
49890
|
}
|
|
49891
|
+
let shouldRecomputeRect = isEditing && !deepEquals(this.currentEditedCell, this.composerStore.currentEditedCell);
|
|
49858
49892
|
if (this.isEditing !== isEditing) {
|
|
49859
49893
|
this.isEditing = isEditing;
|
|
49860
49894
|
if (!isEditing) {
|
|
49861
49895
|
this.rect = this.defaultRect;
|
|
49862
49896
|
return;
|
|
49863
49897
|
}
|
|
49898
|
+
this.currentEditedCell = this.composerStore.currentEditedCell;
|
|
49899
|
+
shouldRecomputeRect = true;
|
|
49900
|
+
}
|
|
49901
|
+
if (shouldRecomputeRect) {
|
|
49864
49902
|
const position = this.env.model.getters.getActivePosition();
|
|
49865
49903
|
const zone = this.env.model.getters.expandZone(position.sheetId, positionToZone(position));
|
|
49866
49904
|
this.rect = this.env.model.getters.getVisibleRect(zone);
|
|
@@ -62969,6 +63007,23 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
62969
63007
|
static getters = ["getRowSize", "getHeaderSize"];
|
|
62970
63008
|
tallestCellInRow = {};
|
|
62971
63009
|
ctx = document.createElement("canvas").getContext("2d");
|
|
63010
|
+
beforeHandle(cmd) {
|
|
63011
|
+
switch (cmd.type) {
|
|
63012
|
+
// Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
|
|
63013
|
+
// "UPDATE_CELL" uses the Sheet core plugin to access row data.
|
|
63014
|
+
// If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
|
|
63015
|
+
// size updates may apply to incorrect (pre-insert) rows.
|
|
63016
|
+
case "ADD_COLUMNS_ROWS":
|
|
63017
|
+
if (cmd.dimension === "COL") {
|
|
63018
|
+
return;
|
|
63019
|
+
}
|
|
63020
|
+
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
63021
|
+
const newCells = Array(cmd.quantity).fill(undefined);
|
|
63022
|
+
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
63023
|
+
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
63024
|
+
break;
|
|
63025
|
+
}
|
|
63026
|
+
}
|
|
62972
63027
|
handle(cmd) {
|
|
62973
63028
|
switch (cmd.type) {
|
|
62974
63029
|
case "START":
|
|
@@ -62998,16 +63053,6 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
62998
63053
|
this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
|
|
62999
63054
|
break;
|
|
63000
63055
|
}
|
|
63001
|
-
case "ADD_COLUMNS_ROWS": {
|
|
63002
|
-
if (cmd.dimension === "COL") {
|
|
63003
|
-
return;
|
|
63004
|
-
}
|
|
63005
|
-
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
63006
|
-
const newCells = Array(cmd.quantity).fill(undefined);
|
|
63007
|
-
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
63008
|
-
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
63009
|
-
break;
|
|
63010
|
-
}
|
|
63011
63056
|
case "RESIZE_COLUMNS_ROWS":
|
|
63012
63057
|
{
|
|
63013
63058
|
const sheetId = cmd.sheetId;
|
|
@@ -68760,6 +68805,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68760
68805
|
const isBasedBefore = cmd.base < start;
|
|
68761
68806
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
68762
68807
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
68808
|
+
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
68809
|
+
const originalSize = Object.fromEntries(toRemove.map((element) => {
|
|
68810
|
+
const size = isCol
|
|
68811
|
+
? this.getters.getColSize(cmd.sheetId, element)
|
|
68812
|
+
: this.getters.getUserRowSize(cmd.sheetId, element);
|
|
68813
|
+
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
68814
|
+
return [element, isDefaultCol ? undefined : size];
|
|
68815
|
+
}));
|
|
68763
68816
|
const target = [
|
|
68764
68817
|
{
|
|
68765
68818
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -68790,13 +68843,12 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68790
68843
|
const col = selection.left;
|
|
68791
68844
|
const row = selection.top;
|
|
68792
68845
|
this.setSelectionMixin({ zone: selection, cell: { col, row } }, [selection]);
|
|
68793
|
-
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
68794
68846
|
let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
68795
68847
|
const resizingGroups = {};
|
|
68796
68848
|
for (const element of toRemove) {
|
|
68797
|
-
const size =
|
|
68849
|
+
const size = originalSize[element];
|
|
68798
68850
|
const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
|
|
68799
|
-
if (size != currentSize) {
|
|
68851
|
+
if (size && size != currentSize) {
|
|
68800
68852
|
resizingGroups[size] ??= [];
|
|
68801
68853
|
resizingGroups[size].push(currentIndex);
|
|
68802
68854
|
currentIndex += 1;
|
|
@@ -70481,14 +70533,12 @@ class BottomBarSheet extends Component {
|
|
|
70481
70533
|
this.editionState = "initializing";
|
|
70482
70534
|
}
|
|
70483
70535
|
stopEdition() {
|
|
70484
|
-
|
|
70485
|
-
if (!this.state.isEditing || !input)
|
|
70536
|
+
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
70486
70537
|
return;
|
|
70487
70538
|
this.state.isEditing = false;
|
|
70488
70539
|
this.editionState = "initializing";
|
|
70489
|
-
|
|
70540
|
+
this.sheetNameRef.el.blur();
|
|
70490
70541
|
const inputValue = this.getInputContent() || "";
|
|
70491
|
-
input.innerText = inputValue;
|
|
70492
70542
|
interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
|
|
70493
70543
|
}
|
|
70494
70544
|
cancelEdition() {
|
|
@@ -77140,6 +77190,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
77140
77190
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, CoreViewPlugin, 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 };
|
|
77141
77191
|
|
|
77142
77192
|
|
|
77143
|
-
__info__.version = "18.2.
|
|
77144
|
-
__info__.date = "2025-07-
|
|
77145
|
-
__info__.hash = "
|
|
77193
|
+
__info__.version = "18.2.22";
|
|
77194
|
+
__info__.date = "2025-07-28T13:37:29.067Z";
|
|
77195
|
+
__info__.hash = "0e414b1";
|