@odoo/o-spreadsheet 18.3.11 → 18.3.13

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.3.11
6
- * @date 2025-06-27T09:13:07.206Z
7
- * @hash 460d5d0
5
+ * @version 18.3.13
6
+ * @date 2025-07-28T13:39:23.645Z
7
+ * @hash d30327c
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';
@@ -825,6 +825,7 @@ const specialWhiteSpaceSpecialCharacters = [
825
825
  ];
826
826
  const specialWhiteSpaceRegexp = new RegExp(specialWhiteSpaceSpecialCharacters.join("|"), "g");
827
827
  const newLineRegexp = /(\r\n|\r)/g;
828
+ const whiteSpaceCharacters = specialWhiteSpaceSpecialCharacters.concat([" "]);
828
829
  /**
829
830
  * Replace all different newlines characters by \n
830
831
  */
@@ -2800,8 +2801,9 @@ const INITIAL_JS_DAY = DateTime.fromTimestamp(0);
2800
2801
  const DATE_JS_1900_OFFSET = INITIAL_JS_DAY.getTime() - INITIAL_1900_DAY.getTime();
2801
2802
  const mdyDateRegexp = /^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/;
2802
2803
  const ymdDateRegexp = /^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/;
2803
- const dateSeparatorsRegex = /\/|-|\s/;
2804
- const dateRegexp = /^(\d{1,4})[\/-\s](\d{1,4})([\/-\s](\d{1,4}))?$/;
2804
+ const whiteSpaceChars = whiteSpaceCharacters.join("");
2805
+ const dateSeparatorsRegex = new RegExp(`\/|-|${whiteSpaceCharacters.join("|")}`);
2806
+ const dateRegexp = new RegExp(`^(\\d{1,4})[\/${whiteSpaceChars}\-](\\d{1,4})([\/${whiteSpaceChars}\-](\\d{1,4}))?$`);
2805
2807
  const timeRegexp = /((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/;
2806
2808
  /** Convert a value number representing a date, or return undefined if it isn't possible */
2807
2809
  function valueToDateNumber(value, locale) {
@@ -6793,6 +6795,8 @@ function splitWordToSpecificWidth(ctx, word, width, style) {
6793
6795
  function splitTextToWidth(ctx, text, style, width) {
6794
6796
  if (!style)
6795
6797
  style = {};
6798
+ if (isMarkdownLink(text))
6799
+ text = parseMarkdownLink(text).label;
6796
6800
  const brokenText = [];
6797
6801
  // Checking if text contains NEWLINE before split makes it very slightly slower if text contains it,
6798
6802
  // but 5-10x faster if it doesn't
@@ -8807,6 +8811,10 @@ function toNormalizedPivotValue(dimension, groupValue) {
8807
8811
  if (groupValue === null || groupValue === "null") {
8808
8812
  return null;
8809
8813
  }
8814
+ const extractedGroupValue = typeof groupValue === "object" ? groupValue.value : groupValue;
8815
+ if (isEvaluationError(extractedGroupValue)) {
8816
+ return extractedGroupValue;
8817
+ }
8810
8818
  const groupValueString = typeof groupValue === "boolean"
8811
8819
  ? toString(groupValue).toLocaleLowerCase()
8812
8820
  : toString(groupValue);
@@ -18398,11 +18406,17 @@ const COLUMN = {
18398
18406
  if (isEvaluationError(cellReference?.value)) {
18399
18407
  return cellReference;
18400
18408
  }
18401
- const column = cellReference === undefined
18402
- ? this.__originCellPosition?.col
18403
- : toZone(cellReference.value).left;
18404
- assert(() => column !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
18405
- return column + 1;
18409
+ if (cellReference === undefined) {
18410
+ assert(() => this.__originCellPosition?.col !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
18411
+ return this.__originCellPosition.col + 1;
18412
+ }
18413
+ const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
18414
+ if (zone.left === zone.right) {
18415
+ return zone.left + 1;
18416
+ }
18417
+ return generateMatrix(zone.right - zone.left + 1, 1, (col, row) => ({
18418
+ value: zone.left + col + 1,
18419
+ }));
18406
18420
  },
18407
18421
  isExported: true,
18408
18422
  };
@@ -18621,11 +18635,17 @@ const ROW = {
18621
18635
  if (isEvaluationError(cellReference?.value)) {
18622
18636
  return cellReference;
18623
18637
  }
18624
- const row = cellReference === undefined
18625
- ? this.__originCellPosition?.row
18626
- : toZone(cellReference.value).top;
18627
- assert(() => row !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
18628
- return row + 1;
18638
+ if (cellReference === undefined) {
18639
+ assert(() => this.__originCellPosition?.row !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
18640
+ return this.__originCellPosition.row + 1;
18641
+ }
18642
+ const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
18643
+ if (zone.top === zone.bottom) {
18644
+ return zone.top + 1;
18645
+ }
18646
+ return generateMatrix(1, zone.bottom - zone.top + 1, (col, row) => ({
18647
+ value: zone.top + row + 1,
18648
+ }));
18629
18649
  },
18630
18650
  isExported: true,
18631
18651
  };
@@ -22605,6 +22625,7 @@ const autoCompleteProviders = new Registry();
22605
22625
 
22606
22626
  autoCompleteProviders.add("dataValidation", {
22607
22627
  displayAllOnInitialContent: true,
22628
+ canBeToggled: false,
22608
22629
  getProposals(tokenAtCursor, content) {
22609
22630
  if (isFormula(content)) {
22610
22631
  return [];
@@ -23501,6 +23522,7 @@ class AbstractComposerStore extends SpreadsheetStore {
23501
23522
  proposals,
23502
23523
  selectProposal: provider.selectProposal,
23503
23524
  autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
23525
+ canBeToggled: provider.canBeToggled,
23504
23526
  };
23505
23527
  }
23506
23528
  if (exactMatch && this._currentContent !== this.initialContent) {
@@ -23523,6 +23545,7 @@ class AbstractComposerStore extends SpreadsheetStore {
23523
23545
  proposals,
23524
23546
  selectProposal: provider.selectProposal,
23525
23547
  autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
23548
+ canBeToggled: provider.canBeToggled,
23526
23549
  };
23527
23550
  }
23528
23551
  }
@@ -32903,40 +32926,112 @@ function convertPivotTableConfig(pivotTable) {
32903
32926
  * In all the sheets, replace the table-only references in the formula cells with standard references.
32904
32927
  */
32905
32928
  function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
32929
+ let deconstructedSheets = null;
32906
32930
  for (let tableSheet of convertedSheets) {
32907
32931
  const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
32932
+ if (!tables || tables.length === 0) {
32933
+ continue;
32934
+ }
32935
+ // Only deconstruct sheets if we are sure there are tables to process
32936
+ if (!deconstructedSheets) {
32937
+ deconstructedSheets = deconstructSheets(convertedSheets);
32938
+ }
32908
32939
  for (let table of tables) {
32909
- const tabRef = table.name + "[";
32910
- for (let sheet of convertedSheets) {
32911
- for (let xc in sheet.cells) {
32912
- const cell = sheet.cells[xc];
32913
- let cellContent = sheet.cells[xc];
32914
- if (cell && cellContent && cellContent.startsWith("=")) {
32915
- let refIndex;
32916
- while ((refIndex = cellContent.indexOf(tabRef)) !== -1) {
32917
- let endIndex = refIndex + tabRef.length;
32918
- let openBrackets = 1;
32919
- while (openBrackets > 0 && endIndex < cellContent.length) {
32920
- if (cellContent[endIndex] === "[") {
32921
- openBrackets++;
32922
- }
32923
- else if (cellContent[endIndex] === "]") {
32924
- openBrackets--;
32925
- }
32926
- endIndex++;
32927
- }
32928
- let reference = cellContent.slice(refIndex + tabRef.length, endIndex - 1);
32929
- const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
32930
- const convertedRef = convertTableReference(sheetPrefix, reference, table, xc);
32931
- cellContent =
32932
- cellContent.slice(0, refIndex) + convertedRef + cellContent.slice(endIndex);
32940
+ for (let sheetId in deconstructedSheets) {
32941
+ const sheet = convertedSheets.find((s) => s.id === sheetId);
32942
+ for (let xc in deconstructedSheets[sheetId]) {
32943
+ const deconstructedCell = deconstructedSheets[sheetId][xc];
32944
+ for (let i = deconstructedCell.length - 3; i >= 0; i -= 2) {
32945
+ const possibleTable = deconstructedSheets[sheetId][xc][i];
32946
+ if (!possibleTable.endsWith(table.name)) {
32947
+ continue;
32933
32948
  }
32949
+ const possibleRef = deconstructedSheets[sheetId][xc][i + 1];
32950
+ const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
32951
+ const convertedRef = convertTableReference(sheetPrefix, possibleRef, table, xc);
32952
+ deconstructedSheets[sheetId][xc][i + 2] =
32953
+ possibleTable.slice(0, possibleTable.indexOf(table.name)) +
32954
+ convertedRef +
32955
+ deconstructedSheets[sheetId][xc][i + 2];
32956
+ deconstructedSheets[sheetId][xc].splice(i, 2);
32934
32957
  }
32935
- sheet.cells[xc] = cellContent;
32958
+ // sheet.cells[xc] = cellContent;
32959
+ }
32960
+ }
32961
+ }
32962
+ }
32963
+ if (!deconstructedSheets) {
32964
+ return;
32965
+ }
32966
+ for (let sheetId in deconstructedSheets) {
32967
+ const sheet = convertedSheets.find((s) => s.id === sheetId);
32968
+ for (let xc in deconstructedSheets[sheetId]) {
32969
+ const deconstructedCell = deconstructedSheets[sheetId][xc];
32970
+ if (deconstructedCell.length === 1) {
32971
+ sheet.cells[xc] = deconstructedCell[0];
32972
+ continue;
32973
+ }
32974
+ let newContent = "";
32975
+ for (let i = 0; i < deconstructedCell.length; i += 2) {
32976
+ newContent += deconstructedCell[i] + "[" + deconstructedCell[i + 1] + "]";
32977
+ }
32978
+ newContent += deconstructedCell[deconstructedCell.length - 1];
32979
+ sheet.cells[xc] = newContent;
32980
+ }
32981
+ }
32982
+ }
32983
+ /**
32984
+ * Deconstruct the content of the cells in the sheets to extract possible table references.
32985
+ * Example from "=AVERAGE(Table1[colName1])-AVERAGE(Table2[colName2])":
32986
+ * return --> ["=AVERAGE(Table1", "colName1", ")-AVERAGE(Table2", "colName2", ")"]
32987
+ */
32988
+ function deconstructSheets(convertedSheets) {
32989
+ const deconstructedSheets = {};
32990
+ for (let sheet of convertedSheets) {
32991
+ for (let xc in sheet.cells) {
32992
+ const cellContent = sheet.cells[xc];
32993
+ if (!cellContent || !cellContent.startsWith("=")) {
32994
+ continue;
32995
+ }
32996
+ const startIndex = cellContent.indexOf("[");
32997
+ if (startIndex === -1) {
32998
+ continue;
32999
+ }
33000
+ const deconstructedCell = [];
33001
+ let possibleTable = cellContent.slice(0, startIndex);
33002
+ let possibleRef = "";
33003
+ let openBrackets = 1;
33004
+ let mainPossibleTableIndex = 0;
33005
+ let mainOpenBracketIndex = startIndex;
33006
+ for (let index = startIndex + 1; index < cellContent.length; index++) {
33007
+ if (cellContent[index] === "[") {
33008
+ if (openBrackets === 0) {
33009
+ possibleTable = cellContent.slice(mainPossibleTableIndex, index);
33010
+ mainOpenBracketIndex = index;
33011
+ }
33012
+ openBrackets++;
33013
+ continue;
33014
+ }
33015
+ if (cellContent[index] === "]") {
33016
+ openBrackets--;
33017
+ if (openBrackets === 0) {
33018
+ possibleRef = cellContent.slice(mainOpenBracketIndex + 1, index);
33019
+ deconstructedCell.push(possibleTable);
33020
+ deconstructedCell.push(possibleRef);
33021
+ mainPossibleTableIndex = index + 1;
33022
+ }
33023
+ }
33024
+ }
33025
+ if (deconstructedCell.length) {
33026
+ if (!deconstructedSheets[sheet.id]) {
33027
+ deconstructedSheets[sheet.id] = {};
32936
33028
  }
33029
+ deconstructedCell.push(cellContent.slice(mainPossibleTableIndex));
33030
+ deconstructedSheets[sheet.id][xc] = [...deconstructedCell];
32937
33031
  }
32938
33032
  }
32939
33033
  }
33034
+ return deconstructedSheets;
32940
33035
  }
32941
33036
  /**
32942
33037
  * Convert table-specific references in formulas into standard references. A table reference is composed of columns names,
@@ -35998,6 +36093,9 @@ class ErrorToolTip extends Component {
35998
36093
  return undefined;
35999
36094
  }
36000
36095
  get errorOriginPositionString() {
36096
+ if (this.env.model.getters.isDashboard()) {
36097
+ return "";
36098
+ }
36001
36099
  const evaluationError = this.evaluationError;
36002
36100
  const position = evaluationError?.errorOriginPosition;
36003
36101
  if (!position || deepEquals(position, this.props.cellPosition)) {
@@ -43692,9 +43790,13 @@ class Composer extends Component {
43692
43790
  }
43693
43791
  }
43694
43792
  closeAssistant() {
43793
+ if (!this.canBeToggled)
43794
+ return;
43695
43795
  this.assistant.forcedClosed = true;
43696
43796
  }
43697
43797
  openAssistant() {
43798
+ if (!this.canBeToggled)
43799
+ return;
43698
43800
  this.assistant.forcedClosed = false;
43699
43801
  }
43700
43802
  onWheel(event) {
@@ -43704,6 +43806,9 @@ class Composer extends Component {
43704
43806
  event.stopPropagation();
43705
43807
  }
43706
43808
  }
43809
+ get canBeToggled() {
43810
+ return this.autoCompleteState.provider?.canBeToggled ?? true;
43811
+ }
43707
43812
  // ---------------------------------------------------------------------------
43708
43813
  // Private
43709
43814
  // ---------------------------------------------------------------------------
@@ -43891,7 +43996,7 @@ class Composer extends Component {
43891
43996
  return [...new Set(argsToFocus)];
43892
43997
  }
43893
43998
  autoComplete(value) {
43894
- if (!value || this.assistant.forcedClosed) {
43999
+ if (!value || (this.assistant.forcedClosed && this.canBeToggled)) {
43895
44000
  return;
43896
44001
  }
43897
44002
  this.autoCompleteState.provider?.selectProposal(value);
@@ -49777,10 +49882,7 @@ class SpreadsheetPivot {
49777
49882
  if (finalCell.value === null) {
49778
49883
  return { value: _t("(Undefined)") };
49779
49884
  }
49780
- return {
49781
- value: finalCell.value,
49782
- format: finalCell.format,
49783
- };
49885
+ return finalCell;
49784
49886
  }
49785
49887
  getPivotCellValueAndFormat(measureId, domain) {
49786
49888
  const dataEntries = this.filterDataEntriesFromDomain(this.dataEntries, domain);
@@ -49873,9 +49975,15 @@ class SpreadsheetPivot {
49873
49975
  return domain.reduce((current, acc) => this.filterDataEntriesFromDomainNode(current, acc), dataEntries);
49874
49976
  }
49875
49977
  filterDataEntriesFromDomainNode(dataEntries, domain) {
49876
- const { field, value } = domain;
49978
+ const { field, value, type } = domain;
49877
49979
  const { nameWithGranularity } = this.getDimension(field);
49878
- return dataEntries.filter((entry) => entry[nameWithGranularity]?.value === value);
49980
+ return dataEntries.filter((entry) => {
49981
+ const cellValue = entry[nameWithGranularity]?.value;
49982
+ if (type === "char") {
49983
+ return String(cellValue) === String(value);
49984
+ }
49985
+ return cellValue === value;
49986
+ });
49879
49987
  }
49880
49988
  getDimension(nameWithGranularity) {
49881
49989
  return this.definition.getDimension(nameWithGranularity);
@@ -50009,7 +50117,6 @@ pivotRegistry.add("SPREADSHEET", {
50009
50117
  ui: SpreadsheetPivot,
50010
50118
  definition: SpreadsheetPivotRuntimeDefinition,
50011
50119
  externalData: false,
50012
- onIterationEndEvaluation: (pivot) => pivot.markAsDirtyForEvaluation(),
50013
50120
  dateGranularities: [...dateGranularities],
50014
50121
  datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
50015
50122
  isMeasureCandidate: (field) => field.type !== "boolean",
@@ -52542,6 +52649,11 @@ class GridComposer extends Component {
52542
52649
  rect = this.defaultRect;
52543
52650
  isEditing = false;
52544
52651
  isCellReferenceVisible = false;
52652
+ currentEditedCell = {
52653
+ col: 0,
52654
+ row: 0,
52655
+ sheetId: this.env.model.getters.getActiveSheetId(),
52656
+ };
52545
52657
  composerStore;
52546
52658
  composerFocusStore;
52547
52659
  composerInterface;
@@ -52571,7 +52683,7 @@ class GridComposer extends Component {
52571
52683
  return this.isCellReferenceVisible;
52572
52684
  }
52573
52685
  get cellReference() {
52574
- const { col, row, sheetId } = this.composerStore.currentEditedCell;
52686
+ const { col, row, sheetId } = this.currentEditedCell;
52575
52687
  const prefixSheet = sheetId !== this.env.model.getters.getActiveSheetId();
52576
52688
  return getFullReference(prefixSheet ? this.env.model.getters.getSheetName(sheetId) : undefined, toXC(col, row));
52577
52689
  }
@@ -52663,12 +52775,17 @@ class GridComposer extends Component {
52663
52775
  if (!isEditing && this.composerFocusStore.activeComposer !== this.composerInterface) {
52664
52776
  this.composerFocusStore.focusComposer(this.composerInterface, { focusMode: "inactive" });
52665
52777
  }
52778
+ let shouldRecomputeRect = isEditing && !deepEquals(this.currentEditedCell, this.composerStore.currentEditedCell);
52666
52779
  if (this.isEditing !== isEditing) {
52667
52780
  this.isEditing = isEditing;
52668
52781
  if (!isEditing) {
52669
52782
  this.rect = this.defaultRect;
52670
52783
  return;
52671
52784
  }
52785
+ this.currentEditedCell = this.composerStore.currentEditedCell;
52786
+ shouldRecomputeRect = true;
52787
+ }
52788
+ if (shouldRecomputeRect) {
52672
52789
  const position = this.env.model.getters.getActivePosition();
52673
52790
  const zone = this.env.model.getters.expandZone(position.sheetId, positionToZone(position));
52674
52791
  this.rect = this.env.model.getters.getVisibleRect(zone);
@@ -62963,7 +63080,7 @@ const onIterationEndEvaluationRegistry = new Registry();
62963
63080
  onIterationEndEvaluationRegistry.add("pivots", (getters) => {
62964
63081
  for (const pivotId of getters.getPivotIds()) {
62965
63082
  const pivot = getters.getPivot(pivotId);
62966
- pivotRegistry.get(pivot.type).onIterationEndEvaluation(pivot);
63083
+ pivot.markAsDirtyForEvaluation?.();
62967
63084
  }
62968
63085
  });
62969
63086
 
@@ -65795,6 +65912,23 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
65795
65912
  static getters = ["getRowSize", "getHeaderSize", "getMaxAnchorOffset"];
65796
65913
  tallestCellInRow = {};
65797
65914
  ctx = document.createElement("canvas").getContext("2d");
65915
+ beforeHandle(cmd) {
65916
+ switch (cmd.type) {
65917
+ // Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
65918
+ // "UPDATE_CELL" uses the Sheet core plugin to access row data.
65919
+ // If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
65920
+ // size updates may apply to incorrect (pre-insert) rows.
65921
+ case "ADD_COLUMNS_ROWS":
65922
+ if (cmd.dimension === "COL") {
65923
+ return;
65924
+ }
65925
+ const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
65926
+ const newCells = Array(cmd.quantity).fill(undefined);
65927
+ const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
65928
+ this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
65929
+ break;
65930
+ }
65931
+ }
65798
65932
  handle(cmd) {
65799
65933
  switch (cmd.type) {
65800
65934
  case "START":
@@ -65824,16 +65958,6 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
65824
65958
  this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
65825
65959
  break;
65826
65960
  }
65827
- case "ADD_COLUMNS_ROWS": {
65828
- if (cmd.dimension === "COL") {
65829
- return;
65830
- }
65831
- const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
65832
- const newCells = Array(cmd.quantity).fill(undefined);
65833
- const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
65834
- this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
65835
- break;
65836
- }
65837
65961
  case "RESIZE_COLUMNS_ROWS":
65838
65962
  {
65839
65963
  const sheetId = cmd.sheetId;
@@ -65985,13 +66109,13 @@ function withPivotPresentationLayer (PivotClass) {
65985
66109
  super(custom, params);
65986
66110
  this.getters = params.getters;
65987
66111
  }
65988
- init(params) {
66112
+ markAsDirtyForEvaluation() {
65989
66113
  this.cache = {};
65990
66114
  this.rankAsc = {};
65991
66115
  this.rankDesc = {};
65992
66116
  this.runningTotal = {};
65993
66117
  this.runningTotalInPercent = {};
65994
- super.init(params);
66118
+ super.markAsDirtyForEvaluation?.();
65995
66119
  }
65996
66120
  getPivotCellValueAndFormat(measureName, domain) {
65997
66121
  return this.getMeasureDisplayValue(measureName, domain);
@@ -66116,7 +66240,7 @@ function withPivotPresentationLayer (PivotClass) {
66116
66240
  return this.getSubTreeMatchingDomain(node.children, domain, domainLevel + 1);
66117
66241
  }
66118
66242
  }
66119
- return tree;
66243
+ return [];
66120
66244
  }
66121
66245
  treeToLeafDomains(tree, parentDomain = []) {
66122
66246
  const domains = [];
@@ -71834,6 +71958,14 @@ class GridSelectionPlugin extends UIPlugin {
71834
71958
  const isBasedBefore = cmd.base < start;
71835
71959
  const deltaCol = isBasedBefore && isCol ? thickness : 0;
71836
71960
  const deltaRow = isBasedBefore && !isCol ? thickness : 0;
71961
+ const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
71962
+ const originalSize = Object.fromEntries(toRemove.map((element) => {
71963
+ const size = isCol
71964
+ ? this.getters.getColSize(cmd.sheetId, element)
71965
+ : this.getters.getUserRowSize(cmd.sheetId, element);
71966
+ const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
71967
+ return [element, isDefaultCol ? undefined : size];
71968
+ }));
71837
71969
  const target = [
71838
71970
  {
71839
71971
  left: isCol ? start + deltaCol : 0,
@@ -71864,13 +71996,12 @@ class GridSelectionPlugin extends UIPlugin {
71864
71996
  const col = selection.left;
71865
71997
  const row = selection.top;
71866
71998
  this.setSelectionMixin({ zone: selection, cell: { col, row } }, [selection]);
71867
- const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
71868
71999
  let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
71869
72000
  const resizingGroups = {};
71870
72001
  for (const element of toRemove) {
71871
- const size = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, element);
72002
+ const size = originalSize[element];
71872
72003
  const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
71873
- if (size != currentSize) {
72004
+ if (size && size != currentSize) {
71874
72005
  resizingGroups[size] ??= [];
71875
72006
  resizingGroups[size].push(currentIndex);
71876
72007
  currentIndex += 1;
@@ -73664,14 +73795,12 @@ class BottomBarSheet extends Component {
73664
73795
  this.editionState = "initializing";
73665
73796
  }
73666
73797
  stopEdition() {
73667
- const input = this.sheetNameRef.el;
73668
- if (!this.state.isEditing || !input)
73798
+ if (!this.state.isEditing || !this.sheetNameRef.el)
73669
73799
  return;
73670
73800
  this.state.isEditing = false;
73671
73801
  this.editionState = "initializing";
73672
- input.blur();
73802
+ this.sheetNameRef.el.blur();
73673
73803
  const inputValue = this.getInputContent() || "";
73674
- input.innerText = inputValue;
73675
73804
  interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
73676
73805
  }
73677
73806
  cancelEdition() {
@@ -80723,6 +80852,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
80723
80852
  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, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
80724
80853
 
80725
80854
 
80726
- __info__.version = "18.3.11";
80727
- __info__.date = "2025-06-27T09:13:07.206Z";
80728
- __info__.hash = "460d5d0";
80855
+ __info__.version = "18.3.13";
80856
+ __info__.date = "2025-07-28T13:39:23.645Z";
80857
+ __info__.hash = "d30327c";