@odoo/o-spreadsheet 18.2.20 → 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.20
6
- * @date 2025-06-27T09:11:55.800Z
7
- * @hash 16dfc38
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';
@@ -821,6 +821,7 @@ const specialWhiteSpaceSpecialCharacters = [
821
821
  ];
822
822
  const specialWhiteSpaceRegexp = new RegExp(specialWhiteSpaceSpecialCharacters.join("|"), "g");
823
823
  const newLineRegexp = /(\r\n|\r)/g;
824
+ const whiteSpaceCharacters = specialWhiteSpaceSpecialCharacters.concat([" "]);
824
825
  /**
825
826
  * Replace all different newlines characters by \n
826
827
  */
@@ -2837,8 +2838,9 @@ const INITIAL_JS_DAY = DateTime.fromTimestamp(0);
2837
2838
  const DATE_JS_1900_OFFSET = INITIAL_JS_DAY.getTime() - INITIAL_1900_DAY.getTime();
2838
2839
  const mdyDateRegexp = /^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/;
2839
2840
  const ymdDateRegexp = /^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/;
2840
- const dateSeparatorsRegex = /\/|-|\s/;
2841
- const dateRegexp = /^(\d{1,4})[\/-\s](\d{1,4})([\/-\s](\d{1,4}))?$/;
2841
+ const whiteSpaceChars = whiteSpaceCharacters.join("");
2842
+ const dateSeparatorsRegex = new RegExp(`\/|-|${whiteSpaceCharacters.join("|")}`);
2843
+ const dateRegexp = new RegExp(`^(\\d{1,4})[\/${whiteSpaceChars}\-](\\d{1,4})([\/${whiteSpaceChars}\-](\\d{1,4}))?$`);
2842
2844
  const timeRegexp = /((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/;
2843
2845
  /** Convert a value number representing a date, or return undefined if it isn't possible */
2844
2846
  function valueToDateNumber(value, locale) {
@@ -6541,6 +6543,8 @@ function splitWordToSpecificWidth(ctx, word, width, style) {
6541
6543
  function splitTextToWidth(ctx, text, style, width) {
6542
6544
  if (!style)
6543
6545
  style = {};
6546
+ if (isMarkdownLink(text))
6547
+ text = parseMarkdownLink(text).label;
6544
6548
  const brokenText = [];
6545
6549
  // Checking if text contains NEWLINE before split makes it very slightly slower if text contains it,
6546
6550
  // but 5-10x faster if it doesn't
@@ -8505,6 +8509,10 @@ function toNormalizedPivotValue(dimension, groupValue) {
8505
8509
  if (groupValue === null || groupValue === "null") {
8506
8510
  return null;
8507
8511
  }
8512
+ const extractedGroupValue = typeof groupValue === "object" ? groupValue.value : groupValue;
8513
+ if (isEvaluationError(extractedGroupValue)) {
8514
+ return extractedGroupValue;
8515
+ }
8508
8516
  const groupValueString = typeof groupValue === "boolean"
8509
8517
  ? toString(groupValue).toLocaleLowerCase()
8510
8518
  : toString(groupValue);
@@ -11299,6 +11307,7 @@ const autoCompleteProviders = new Registry();
11299
11307
 
11300
11308
  autoCompleteProviders.add("dataValidation", {
11301
11309
  displayAllOnInitialContent: true,
11310
+ canBeToggled: false,
11302
11311
  getProposals(tokenAtCursor, content) {
11303
11312
  if (content.startsWith("=")) {
11304
11313
  return [];
@@ -19101,11 +19110,17 @@ const COLUMN = {
19101
19110
  if (isEvaluationError(cellReference?.value)) {
19102
19111
  return cellReference;
19103
19112
  }
19104
- const column = cellReference === undefined
19105
- ? this.__originCellPosition?.col
19106
- : toZone(cellReference.value).left;
19107
- assert(() => column !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
19108
- return column + 1;
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
+ }));
19109
19124
  },
19110
19125
  isExported: true,
19111
19126
  };
@@ -19324,11 +19339,17 @@ const ROW = {
19324
19339
  if (isEvaluationError(cellReference?.value)) {
19325
19340
  return cellReference;
19326
19341
  }
19327
- const row = cellReference === undefined
19328
- ? this.__originCellPosition?.row
19329
- : toZone(cellReference.value).top;
19330
- assert(() => row !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
19331
- return row + 1;
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
+ }));
19332
19353
  },
19333
19354
  isExported: true,
19334
19355
  };
@@ -21604,6 +21625,7 @@ class AbstractComposerStore extends SpreadsheetStore {
21604
21625
  proposals,
21605
21626
  selectProposal: provider.selectProposal,
21606
21627
  autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
21628
+ canBeToggled: provider.canBeToggled,
21607
21629
  };
21608
21630
  }
21609
21631
  if (exactMatch && this._currentContent !== this.initialContent) {
@@ -21626,6 +21648,7 @@ class AbstractComposerStore extends SpreadsheetStore {
21626
21648
  proposals,
21627
21649
  selectProposal: provider.selectProposal,
21628
21650
  autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
21651
+ canBeToggled: provider.canBeToggled,
21629
21652
  };
21630
21653
  }
21631
21654
  }
@@ -25809,40 +25832,112 @@ function convertPivotTableConfig(pivotTable) {
25809
25832
  * In all the sheets, replace the table-only references in the formula cells with standard references.
25810
25833
  */
25811
25834
  function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
25835
+ let deconstructedSheets = null;
25812
25836
  for (let tableSheet of convertedSheets) {
25813
25837
  const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
25838
+ if (!tables || tables.length === 0) {
25839
+ continue;
25840
+ }
25841
+ // Only deconstruct sheets if we are sure there are tables to process
25842
+ if (!deconstructedSheets) {
25843
+ deconstructedSheets = deconstructSheets(convertedSheets);
25844
+ }
25814
25845
  for (let table of tables) {
25815
- const tabRef = table.name + "[";
25816
- for (let sheet of convertedSheets) {
25817
- for (let xc in sheet.cells) {
25818
- const cell = sheet.cells[xc];
25819
- let cellContent = sheet.cells[xc];
25820
- if (cell && cellContent && cellContent.startsWith("=")) {
25821
- let refIndex;
25822
- while ((refIndex = cellContent.indexOf(tabRef)) !== -1) {
25823
- let endIndex = refIndex + tabRef.length;
25824
- let openBrackets = 1;
25825
- while (openBrackets > 0 && endIndex < cellContent.length) {
25826
- if (cellContent[endIndex] === "[") {
25827
- openBrackets++;
25828
- }
25829
- else if (cellContent[endIndex] === "]") {
25830
- openBrackets--;
25831
- }
25832
- endIndex++;
25833
- }
25834
- let reference = cellContent.slice(refIndex + tabRef.length, endIndex - 1);
25835
- const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
25836
- const convertedRef = convertTableReference(sheetPrefix, reference, table, xc);
25837
- cellContent =
25838
- cellContent.slice(0, refIndex) + convertedRef + cellContent.slice(endIndex);
25846
+ for (let sheetId in deconstructedSheets) {
25847
+ const sheet = convertedSheets.find((s) => s.id === sheetId);
25848
+ for (let xc in deconstructedSheets[sheetId]) {
25849
+ const deconstructedCell = deconstructedSheets[sheetId][xc];
25850
+ for (let i = deconstructedCell.length - 3; i >= 0; i -= 2) {
25851
+ const possibleTable = deconstructedSheets[sheetId][xc][i];
25852
+ if (!possibleTable.endsWith(table.name)) {
25853
+ continue;
25839
25854
  }
25855
+ const possibleRef = deconstructedSheets[sheetId][xc][i + 1];
25856
+ const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
25857
+ const convertedRef = convertTableReference(sheetPrefix, possibleRef, table, xc);
25858
+ deconstructedSheets[sheetId][xc][i + 2] =
25859
+ possibleTable.slice(0, possibleTable.indexOf(table.name)) +
25860
+ convertedRef +
25861
+ deconstructedSheets[sheetId][xc][i + 2];
25862
+ deconstructedSheets[sheetId][xc].splice(i, 2);
25840
25863
  }
25841
- sheet.cells[xc] = cellContent;
25864
+ // sheet.cells[xc] = cellContent;
25865
+ }
25866
+ }
25867
+ }
25868
+ }
25869
+ if (!deconstructedSheets) {
25870
+ return;
25871
+ }
25872
+ for (let sheetId in deconstructedSheets) {
25873
+ const sheet = convertedSheets.find((s) => s.id === sheetId);
25874
+ for (let xc in deconstructedSheets[sheetId]) {
25875
+ const deconstructedCell = deconstructedSheets[sheetId][xc];
25876
+ if (deconstructedCell.length === 1) {
25877
+ sheet.cells[xc] = deconstructedCell[0];
25878
+ continue;
25879
+ }
25880
+ let newContent = "";
25881
+ for (let i = 0; i < deconstructedCell.length; i += 2) {
25882
+ newContent += deconstructedCell[i] + "[" + deconstructedCell[i + 1] + "]";
25883
+ }
25884
+ newContent += deconstructedCell[deconstructedCell.length - 1];
25885
+ sheet.cells[xc] = newContent;
25886
+ }
25887
+ }
25888
+ }
25889
+ /**
25890
+ * Deconstruct the content of the cells in the sheets to extract possible table references.
25891
+ * Example from "=AVERAGE(Table1[colName1])-AVERAGE(Table2[colName2])":
25892
+ * return --> ["=AVERAGE(Table1", "colName1", ")-AVERAGE(Table2", "colName2", ")"]
25893
+ */
25894
+ function deconstructSheets(convertedSheets) {
25895
+ const deconstructedSheets = {};
25896
+ for (let sheet of convertedSheets) {
25897
+ for (let xc in sheet.cells) {
25898
+ const cellContent = sheet.cells[xc];
25899
+ if (!cellContent || !cellContent.startsWith("=")) {
25900
+ continue;
25901
+ }
25902
+ const startIndex = cellContent.indexOf("[");
25903
+ if (startIndex === -1) {
25904
+ continue;
25905
+ }
25906
+ const deconstructedCell = [];
25907
+ let possibleTable = cellContent.slice(0, startIndex);
25908
+ let possibleRef = "";
25909
+ let openBrackets = 1;
25910
+ let mainPossibleTableIndex = 0;
25911
+ let mainOpenBracketIndex = startIndex;
25912
+ for (let index = startIndex + 1; index < cellContent.length; index++) {
25913
+ if (cellContent[index] === "[") {
25914
+ if (openBrackets === 0) {
25915
+ possibleTable = cellContent.slice(mainPossibleTableIndex, index);
25916
+ mainOpenBracketIndex = index;
25917
+ }
25918
+ openBrackets++;
25919
+ continue;
25920
+ }
25921
+ if (cellContent[index] === "]") {
25922
+ openBrackets--;
25923
+ if (openBrackets === 0) {
25924
+ possibleRef = cellContent.slice(mainOpenBracketIndex + 1, index);
25925
+ deconstructedCell.push(possibleTable);
25926
+ deconstructedCell.push(possibleRef);
25927
+ mainPossibleTableIndex = index + 1;
25928
+ }
25929
+ }
25930
+ }
25931
+ if (deconstructedCell.length) {
25932
+ if (!deconstructedSheets[sheet.id]) {
25933
+ deconstructedSheets[sheet.id] = {};
25842
25934
  }
25935
+ deconstructedCell.push(cellContent.slice(mainPossibleTableIndex));
25936
+ deconstructedSheets[sheet.id][xc] = [...deconstructedCell];
25843
25937
  }
25844
25938
  }
25845
25939
  }
25940
+ return deconstructedSheets;
25846
25941
  }
25847
25942
  /**
25848
25943
  * Convert table-specific references in formulas into standard references. A table reference is composed of columns names,
@@ -33286,6 +33381,9 @@ class ErrorToolTip extends Component {
33286
33381
  return undefined;
33287
33382
  }
33288
33383
  get errorOriginPositionString() {
33384
+ if (this.env.model.getters.isDashboard()) {
33385
+ return "";
33386
+ }
33289
33387
  const evaluationError = this.evaluationError;
33290
33388
  const position = evaluationError?.errorOriginPosition;
33291
33389
  if (!position || deepEquals(position, this.props.cellPosition)) {
@@ -41222,9 +41320,13 @@ class Composer extends Component {
41222
41320
  }
41223
41321
  }
41224
41322
  closeAssistant() {
41323
+ if (!this.canBeToggled)
41324
+ return;
41225
41325
  this.assistant.forcedClosed = true;
41226
41326
  }
41227
41327
  openAssistant() {
41328
+ if (!this.canBeToggled)
41329
+ return;
41228
41330
  this.assistant.forcedClosed = false;
41229
41331
  }
41230
41332
  onWheel(event) {
@@ -41234,6 +41336,9 @@ class Composer extends Component {
41234
41336
  event.stopPropagation();
41235
41337
  }
41236
41338
  }
41339
+ get canBeToggled() {
41340
+ return this.autoCompleteState.provider?.canBeToggled ?? true;
41341
+ }
41237
41342
  // ---------------------------------------------------------------------------
41238
41343
  // Private
41239
41344
  // ---------------------------------------------------------------------------
@@ -41369,7 +41474,7 @@ class Composer extends Component {
41369
41474
  }
41370
41475
  }
41371
41476
  autoComplete(value) {
41372
- if (!value || this.assistant.forcedClosed) {
41477
+ if (!value || (this.assistant.forcedClosed && this.canBeToggled)) {
41373
41478
  return;
41374
41479
  }
41375
41480
  this.autoCompleteState.provider?.selectProposal(value);
@@ -47060,10 +47165,7 @@ class SpreadsheetPivot {
47060
47165
  if (finalCell.value === null) {
47061
47166
  return { value: _t("(Undefined)") };
47062
47167
  }
47063
- return {
47064
- value: finalCell.value,
47065
- format: finalCell.format,
47066
- };
47168
+ return finalCell;
47067
47169
  }
47068
47170
  getPivotCellValueAndFormat(measureId, domain) {
47069
47171
  const dataEntries = this.filterDataEntriesFromDomain(this.dataEntries, domain);
@@ -47156,9 +47258,15 @@ class SpreadsheetPivot {
47156
47258
  return domain.reduce((current, acc) => this.filterDataEntriesFromDomainNode(current, acc), dataEntries);
47157
47259
  }
47158
47260
  filterDataEntriesFromDomainNode(dataEntries, domain) {
47159
- const { field, value } = domain;
47261
+ const { field, value, type } = domain;
47160
47262
  const { nameWithGranularity } = this.getDimension(field);
47161
- return dataEntries.filter((entry) => entry[nameWithGranularity]?.value === value);
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
+ });
47162
47270
  }
47163
47271
  getDimension(nameWithGranularity) {
47164
47272
  return this.definition.getDimension(nameWithGranularity);
@@ -47292,7 +47400,6 @@ pivotRegistry.add("SPREADSHEET", {
47292
47400
  ui: SpreadsheetPivot,
47293
47401
  definition: SpreadsheetPivotRuntimeDefinition,
47294
47402
  externalData: false,
47295
- onIterationEndEvaluation: (pivot) => pivot.markAsDirtyForEvaluation(),
47296
47403
  dateGranularities: [...dateGranularities],
47297
47404
  datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
47298
47405
  isMeasureCandidate: (field) => field.type !== "boolean",
@@ -49655,6 +49762,11 @@ class GridComposer extends Component {
49655
49762
  rect = this.defaultRect;
49656
49763
  isEditing = false;
49657
49764
  isCellReferenceVisible = false;
49765
+ currentEditedCell = {
49766
+ col: 0,
49767
+ row: 0,
49768
+ sheetId: this.env.model.getters.getActiveSheetId(),
49769
+ };
49658
49770
  composerStore;
49659
49771
  composerFocusStore;
49660
49772
  composerInterface;
@@ -49684,7 +49796,7 @@ class GridComposer extends Component {
49684
49796
  return this.isCellReferenceVisible;
49685
49797
  }
49686
49798
  get cellReference() {
49687
- const { col, row, sheetId } = this.composerStore.currentEditedCell;
49799
+ const { col, row, sheetId } = this.currentEditedCell;
49688
49800
  const prefixSheet = sheetId !== this.env.model.getters.getActiveSheetId();
49689
49801
  return getFullReference(prefixSheet ? this.env.model.getters.getSheetName(sheetId) : undefined, toXC(col, row));
49690
49802
  }
@@ -49776,12 +49888,17 @@ class GridComposer extends Component {
49776
49888
  if (!isEditing && this.composerFocusStore.activeComposer !== this.composerInterface) {
49777
49889
  this.composerFocusStore.focusComposer(this.composerInterface, { focusMode: "inactive" });
49778
49890
  }
49891
+ let shouldRecomputeRect = isEditing && !deepEquals(this.currentEditedCell, this.composerStore.currentEditedCell);
49779
49892
  if (this.isEditing !== isEditing) {
49780
49893
  this.isEditing = isEditing;
49781
49894
  if (!isEditing) {
49782
49895
  this.rect = this.defaultRect;
49783
49896
  return;
49784
49897
  }
49898
+ this.currentEditedCell = this.composerStore.currentEditedCell;
49899
+ shouldRecomputeRect = true;
49900
+ }
49901
+ if (shouldRecomputeRect) {
49785
49902
  const position = this.env.model.getters.getActivePosition();
49786
49903
  const zone = this.env.model.getters.expandZone(position.sheetId, positionToZone(position));
49787
49904
  this.rect = this.env.model.getters.getVisibleRect(zone);
@@ -60058,7 +60175,7 @@ const onIterationEndEvaluationRegistry = new Registry();
60058
60175
  onIterationEndEvaluationRegistry.add("pivots", (getters) => {
60059
60176
  for (const pivotId of getters.getPivotIds()) {
60060
60177
  const pivot = getters.getPivot(pivotId);
60061
- pivotRegistry.get(pivot.type).onIterationEndEvaluation(pivot);
60178
+ pivot.markAsDirtyForEvaluation?.();
60062
60179
  }
60063
60180
  });
60064
60181
 
@@ -62890,6 +63007,23 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
62890
63007
  static getters = ["getRowSize", "getHeaderSize"];
62891
63008
  tallestCellInRow = {};
62892
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
+ }
62893
63027
  handle(cmd) {
62894
63028
  switch (cmd.type) {
62895
63029
  case "START":
@@ -62919,16 +63053,6 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
62919
63053
  this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
62920
63054
  break;
62921
63055
  }
62922
- case "ADD_COLUMNS_ROWS": {
62923
- if (cmd.dimension === "COL") {
62924
- return;
62925
- }
62926
- const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
62927
- const newCells = Array(cmd.quantity).fill(undefined);
62928
- const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
62929
- this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
62930
- break;
62931
- }
62932
63056
  case "RESIZE_COLUMNS_ROWS":
62933
63057
  {
62934
63058
  const sheetId = cmd.sheetId;
@@ -63064,13 +63188,13 @@ function withPivotPresentationLayer (PivotClass) {
63064
63188
  super(custom, params);
63065
63189
  this.getters = params.getters;
63066
63190
  }
63067
- init(params) {
63191
+ markAsDirtyForEvaluation() {
63068
63192
  this.cache = {};
63069
63193
  this.rankAsc = {};
63070
63194
  this.rankDesc = {};
63071
63195
  this.runningTotal = {};
63072
63196
  this.runningTotalInPercent = {};
63073
- super.init(params);
63197
+ super.markAsDirtyForEvaluation?.();
63074
63198
  }
63075
63199
  getPivotCellValueAndFormat(measureName, domain) {
63076
63200
  return this.getMeasureDisplayValue(measureName, domain);
@@ -63195,7 +63319,7 @@ function withPivotPresentationLayer (PivotClass) {
63195
63319
  return this.getSubTreeMatchingDomain(node.children, domain, domainLevel + 1);
63196
63320
  }
63197
63321
  }
63198
- return tree;
63322
+ return [];
63199
63323
  }
63200
63324
  treeToLeafDomains(tree, parentDomain = []) {
63201
63325
  const domains = [];
@@ -68681,6 +68805,14 @@ class GridSelectionPlugin extends UIPlugin {
68681
68805
  const isBasedBefore = cmd.base < start;
68682
68806
  const deltaCol = isBasedBefore && isCol ? thickness : 0;
68683
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
+ }));
68684
68816
  const target = [
68685
68817
  {
68686
68818
  left: isCol ? start + deltaCol : 0,
@@ -68711,13 +68843,12 @@ class GridSelectionPlugin extends UIPlugin {
68711
68843
  const col = selection.left;
68712
68844
  const row = selection.top;
68713
68845
  this.setSelectionMixin({ zone: selection, cell: { col, row } }, [selection]);
68714
- const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
68715
68846
  let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
68716
68847
  const resizingGroups = {};
68717
68848
  for (const element of toRemove) {
68718
- const size = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, element);
68849
+ const size = originalSize[element];
68719
68850
  const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
68720
- if (size != currentSize) {
68851
+ if (size && size != currentSize) {
68721
68852
  resizingGroups[size] ??= [];
68722
68853
  resizingGroups[size].push(currentIndex);
68723
68854
  currentIndex += 1;
@@ -70402,14 +70533,12 @@ class BottomBarSheet extends Component {
70402
70533
  this.editionState = "initializing";
70403
70534
  }
70404
70535
  stopEdition() {
70405
- const input = this.sheetNameRef.el;
70406
- if (!this.state.isEditing || !input)
70536
+ if (!this.state.isEditing || !this.sheetNameRef.el)
70407
70537
  return;
70408
70538
  this.state.isEditing = false;
70409
70539
  this.editionState = "initializing";
70410
- input.blur();
70540
+ this.sheetNameRef.el.blur();
70411
70541
  const inputValue = this.getInputContent() || "";
70412
- input.innerText = inputValue;
70413
70542
  interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
70414
70543
  }
70415
70544
  cancelEdition() {
@@ -77061,6 +77190,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
77061
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 };
77062
77191
 
77063
77192
 
77064
- __info__.version = "18.2.20";
77065
- __info__.date = "2025-06-27T09:11:55.800Z";
77066
- __info__.hash = "16dfc38";
77193
+ __info__.version = "18.2.22";
77194
+ __info__.date = "2025-07-28T13:37:29.067Z";
77195
+ __info__.hash = "0e414b1";