@odoo/o-spreadsheet 18.4.1 → 18.4.3

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.4.1
6
- * @date 2025-06-27T09:13:01.303Z
7
- * @hash 5cecc0e
5
+ * @version 18.4.3
6
+ * @date 2025-07-28T13:39:06.036Z
7
+ * @hash 4b596d7
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, useExternalListener, onWillUpdateProps, onWillStart, onWillPatch, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -852,6 +852,7 @@ const specialWhiteSpaceSpecialCharacters = [
852
852
  ];
853
853
  const specialWhiteSpaceRegexp = new RegExp(specialWhiteSpaceSpecialCharacters.join("|"), "g");
854
854
  const newLineRegexp = /(\r\n|\r)/g;
855
+ const whiteSpaceCharacters = specialWhiteSpaceSpecialCharacters.concat([" "]);
855
856
  /**
856
857
  * Replace all different newlines characters by \n
857
858
  */
@@ -1988,8 +1989,9 @@ const INITIAL_JS_DAY = DateTime.fromTimestamp(0);
1988
1989
  const DATE_JS_1900_OFFSET = INITIAL_JS_DAY.getTime() - INITIAL_1900_DAY.getTime();
1989
1990
  const mdyDateRegexp = /^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/;
1990
1991
  const ymdDateRegexp = /^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/;
1991
- const dateSeparatorsRegex = /\/|-|\s/;
1992
- const dateRegexp = /^(\d{1,4})[\/-\s](\d{1,4})([\/-\s](\d{1,4}))?$/;
1992
+ const whiteSpaceChars = whiteSpaceCharacters.join("");
1993
+ const dateSeparatorsRegex = new RegExp(`\/|-|${whiteSpaceCharacters.join("|")}`);
1994
+ const dateRegexp = new RegExp(`^(\\d{1,4})[\/${whiteSpaceChars}\-](\\d{1,4})([\/${whiteSpaceChars}\-](\\d{1,4}))?$`);
1993
1995
  const timeRegexp = /((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/;
1994
1996
  /** Convert a value number representing a date, or return undefined if it isn't possible */
1995
1997
  function valueToDateNumber(value, locale) {
@@ -6924,6 +6926,8 @@ function splitWordToSpecificWidth(ctx, word, width, style) {
6924
6926
  function splitTextToWidth(ctx, text, style, width) {
6925
6927
  if (!style)
6926
6928
  style = {};
6929
+ if (isMarkdownLink(text))
6930
+ text = parseMarkdownLink(text).label;
6927
6931
  const brokenText = [];
6928
6932
  // Checking if text contains NEWLINE before split makes it very slightly slower if text contains it,
6929
6933
  // but 5-10x faster if it doesn't
@@ -8764,6 +8768,10 @@ function toNormalizedPivotValue(dimension, groupValue) {
8764
8768
  if (groupValue === null || groupValue === "null") {
8765
8769
  return null;
8766
8770
  }
8771
+ const extractedGroupValue = typeof groupValue === "object" ? groupValue.value : groupValue;
8772
+ if (isEvaluationError(extractedGroupValue)) {
8773
+ return extractedGroupValue;
8774
+ }
8767
8775
  const groupValueString = typeof groupValue === "boolean"
8768
8776
  ? toString(groupValue).toLocaleLowerCase()
8769
8777
  : toString(groupValue);
@@ -19025,13 +19033,19 @@ const COLUMN = {
19025
19033
  if (isEvaluationError(cellReference?.value)) {
19026
19034
  return cellReference;
19027
19035
  }
19028
- const column = cellReference === undefined
19029
- ? this.__originCellPosition?.col
19030
- : toZone(cellReference.value).left;
19031
- if (column === undefined) {
19032
- return new EvaluationError(_t("In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter."));
19036
+ if (cellReference === undefined) {
19037
+ if (this.__originCellPosition?.col === undefined) {
19038
+ return new EvaluationError(_t("In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter."));
19039
+ }
19040
+ return this.__originCellPosition.col + 1;
19041
+ }
19042
+ const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
19043
+ if (zone.left === zone.right) {
19044
+ return zone.left + 1;
19033
19045
  }
19034
- return column + 1;
19046
+ return generateMatrix(zone.right - zone.left + 1, 1, (col, row) => ({
19047
+ value: zone.left + col + 1,
19048
+ }));
19035
19049
  },
19036
19050
  isExported: true,
19037
19051
  };
@@ -19262,13 +19276,19 @@ const ROW = {
19262
19276
  if (isEvaluationError(cellReference?.value)) {
19263
19277
  return cellReference;
19264
19278
  }
19265
- const row = cellReference === undefined
19266
- ? this.__originCellPosition?.row
19267
- : toZone(cellReference.value).top;
19268
- if (row === undefined) {
19269
- return new EvaluationError(_t("In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter."));
19279
+ if (cellReference === undefined) {
19280
+ if (this.__originCellPosition?.row === undefined) {
19281
+ return new EvaluationError(_t("In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter."));
19282
+ }
19283
+ return this.__originCellPosition.row + 1;
19284
+ }
19285
+ const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
19286
+ if (zone.top === zone.bottom) {
19287
+ return zone.top + 1;
19270
19288
  }
19271
- return row + 1;
19289
+ return generateMatrix(1, zone.bottom - zone.top + 1, (col, row) => ({
19290
+ value: zone.top + row + 1,
19291
+ }));
19272
19292
  },
19273
19293
  isExported: true,
19274
19294
  };
@@ -27446,7 +27466,9 @@ function getSectionThresholdValue(sheetId, threshold, minValue, maxValue, getter
27446
27466
  }
27447
27467
  function getFormulaNumberValue(sheetId, formula, getters) {
27448
27468
  const value = getters.evaluateFormula(sheetId, formula);
27449
- return isMatrix(value) ? undefined : tryToNumber(value, getters.getLocale());
27469
+ return isMultipleElementMatrix(value)
27470
+ ? undefined
27471
+ : tryToNumber(toScalar(value), getters.getLocale());
27450
27472
  }
27451
27473
  function getInvalidGaugeRuntime(chart, getters) {
27452
27474
  return {
@@ -31071,6 +31093,9 @@ class ErrorToolTip extends Component {
31071
31093
  return undefined;
31072
31094
  }
31073
31095
  get errorOriginPositionString() {
31096
+ if (this.env.model.getters.isDashboard()) {
31097
+ return "";
31098
+ }
31074
31099
  const evaluationError = this.evaluationError;
31075
31100
  const position = evaluationError?.errorOriginPosition;
31076
31101
  if (!position || deepEquals(position, this.props.cellPosition)) {
@@ -32593,6 +32618,9 @@ class AbstractComposerStore extends SpreadsheetStore {
32593
32618
  get isAutoCompleteDisplayed() {
32594
32619
  return !!this.autoComplete.provider;
32595
32620
  }
32621
+ get canBeToggled() {
32622
+ return this.autoComplete.provider?.canBeToggled ?? true;
32623
+ }
32596
32624
  cycleReferences() {
32597
32625
  const locale = this.getters.getLocale();
32598
32626
  const updated = cycleFixedReference(this.composerSelection, this._currentContent, locale);
@@ -33122,6 +33150,7 @@ class AbstractComposerStore extends SpreadsheetStore {
33122
33150
  proposals,
33123
33151
  selectProposal: provider.selectProposal,
33124
33152
  autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
33153
+ canBeToggled: provider.canBeToggled,
33125
33154
  };
33126
33155
  }
33127
33156
  if (exactMatch && this._currentContent !== this.initialContent) {
@@ -33144,6 +33173,7 @@ class AbstractComposerStore extends SpreadsheetStore {
33144
33173
  proposals,
33145
33174
  selectProposal: provider.selectProposal,
33146
33175
  autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
33176
+ canBeToggled: provider.canBeToggled,
33147
33177
  };
33148
33178
  }
33149
33179
  }
@@ -33714,9 +33744,13 @@ class Composer extends Component {
33714
33744
  }
33715
33745
  }
33716
33746
  closeAssistant() {
33747
+ if (!this.props.composerStore.canBeToggled)
33748
+ return;
33717
33749
  this.assistant.forcedClosed = true;
33718
33750
  }
33719
33751
  openAssistant() {
33752
+ if (!this.props.composerStore.canBeToggled)
33753
+ return;
33720
33754
  this.assistant.forcedClosed = false;
33721
33755
  }
33722
33756
  onWheel(event) {
@@ -33906,7 +33940,7 @@ class Composer extends Component {
33906
33940
  return [...new Set(argsToFocus)];
33907
33941
  }
33908
33942
  autoComplete(value) {
33909
- if (!value || this.assistant.forcedClosed) {
33943
+ if (!value || (this.assistant.forcedClosed && this.props.composerStore.canBeToggled)) {
33910
33944
  return;
33911
33945
  }
33912
33946
  this.props.composerStore.insertAutoCompleteValue(value);
@@ -39219,40 +39253,112 @@ function convertPivotTableConfig(pivotTable) {
39219
39253
  * In all the sheets, replace the table-only references in the formula cells with standard references.
39220
39254
  */
39221
39255
  function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
39256
+ let deconstructedSheets = null;
39222
39257
  for (const tableSheet of convertedSheets) {
39223
39258
  const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
39259
+ if (!tables || tables.length === 0) {
39260
+ continue;
39261
+ }
39262
+ // Only deconstruct sheets if we are sure there are tables to process
39263
+ if (!deconstructedSheets) {
39264
+ deconstructedSheets = deconstructSheets(convertedSheets);
39265
+ }
39224
39266
  for (const table of tables) {
39225
- const tabRef = table.name + "[";
39226
- for (const sheet of convertedSheets) {
39227
- for (const xc in sheet.cells) {
39228
- const cell = sheet.cells[xc];
39229
- let cellContent = sheet.cells[xc];
39230
- if (cell && cellContent && cellContent.startsWith("=")) {
39231
- let refIndex;
39232
- while ((refIndex = cellContent.indexOf(tabRef)) !== -1) {
39233
- let endIndex = refIndex + tabRef.length;
39234
- let openBrackets = 1;
39235
- while (openBrackets > 0 && endIndex < cellContent.length) {
39236
- if (cellContent[endIndex] === "[") {
39237
- openBrackets++;
39238
- }
39239
- else if (cellContent[endIndex] === "]") {
39240
- openBrackets--;
39241
- }
39242
- endIndex++;
39243
- }
39244
- const reference = cellContent.slice(refIndex + tabRef.length, endIndex - 1);
39245
- const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
39246
- const convertedRef = convertTableReference(sheetPrefix, reference, table, xc);
39247
- cellContent =
39248
- cellContent.slice(0, refIndex) + convertedRef + cellContent.slice(endIndex);
39267
+ for (const sheetId in deconstructedSheets) {
39268
+ const sheet = convertedSheets.find((s) => s.id === sheetId);
39269
+ for (const xc in deconstructedSheets[sheetId]) {
39270
+ const deconstructedCell = deconstructedSheets[sheetId][xc];
39271
+ for (let i = deconstructedCell.length - 3; i >= 0; i -= 2) {
39272
+ const possibleTable = deconstructedSheets[sheetId][xc][i];
39273
+ if (!possibleTable.endsWith(table.name)) {
39274
+ continue;
39249
39275
  }
39276
+ const possibleRef = deconstructedSheets[sheetId][xc][i + 1];
39277
+ const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
39278
+ const convertedRef = convertTableReference(sheetPrefix, possibleRef, table, xc);
39279
+ deconstructedSheets[sheetId][xc][i + 2] =
39280
+ possibleTable.slice(0, possibleTable.indexOf(table.name)) +
39281
+ convertedRef +
39282
+ deconstructedSheets[sheetId][xc][i + 2];
39283
+ deconstructedSheets[sheetId][xc].splice(i, 2);
39250
39284
  }
39251
- sheet.cells[xc] = cellContent;
39285
+ // sheet.cells[xc] = cellContent;
39252
39286
  }
39253
39287
  }
39254
39288
  }
39255
39289
  }
39290
+ if (!deconstructedSheets) {
39291
+ return;
39292
+ }
39293
+ for (const sheetId in deconstructedSheets) {
39294
+ const sheet = convertedSheets.find((s) => s.id === sheetId);
39295
+ for (const xc in deconstructedSheets[sheetId]) {
39296
+ const deconstructedCell = deconstructedSheets[sheetId][xc];
39297
+ if (deconstructedCell.length === 1) {
39298
+ sheet.cells[xc] = deconstructedCell[0];
39299
+ continue;
39300
+ }
39301
+ let newContent = "";
39302
+ for (let i = 0; i < deconstructedCell.length; i += 2) {
39303
+ newContent += deconstructedCell[i] + "[" + deconstructedCell[i + 1] + "]";
39304
+ }
39305
+ newContent += deconstructedCell[deconstructedCell.length - 1];
39306
+ sheet.cells[xc] = newContent;
39307
+ }
39308
+ }
39309
+ }
39310
+ /**
39311
+ * Deconstruct the content of the cells in the sheets to extract possible table references.
39312
+ * Example from "=AVERAGE(Table1[colName1])-AVERAGE(Table2[colName2])":
39313
+ * return --> ["=AVERAGE(Table1", "colName1", ")-AVERAGE(Table2", "colName2", ")"]
39314
+ */
39315
+ function deconstructSheets(convertedSheets) {
39316
+ const deconstructedSheets = {};
39317
+ for (const sheet of convertedSheets) {
39318
+ for (const xc in sheet.cells) {
39319
+ const cellContent = sheet.cells[xc];
39320
+ if (!cellContent || !cellContent.startsWith("=")) {
39321
+ continue;
39322
+ }
39323
+ const startIndex = cellContent.indexOf("[");
39324
+ if (startIndex === -1) {
39325
+ continue;
39326
+ }
39327
+ const deconstructedCell = [];
39328
+ let possibleTable = cellContent.slice(0, startIndex);
39329
+ let possibleRef = "";
39330
+ let openBrackets = 1;
39331
+ let mainPossibleTableIndex = 0;
39332
+ let mainOpenBracketIndex = startIndex;
39333
+ for (let index = startIndex + 1; index < cellContent.length; index++) {
39334
+ if (cellContent[index] === "[") {
39335
+ if (openBrackets === 0) {
39336
+ possibleTable = cellContent.slice(mainPossibleTableIndex, index);
39337
+ mainOpenBracketIndex = index;
39338
+ }
39339
+ openBrackets++;
39340
+ continue;
39341
+ }
39342
+ if (cellContent[index] === "]") {
39343
+ openBrackets--;
39344
+ if (openBrackets === 0) {
39345
+ possibleRef = cellContent.slice(mainOpenBracketIndex + 1, index);
39346
+ deconstructedCell.push(possibleTable);
39347
+ deconstructedCell.push(possibleRef);
39348
+ mainPossibleTableIndex = index + 1;
39349
+ }
39350
+ }
39351
+ }
39352
+ if (deconstructedCell.length) {
39353
+ if (!deconstructedSheets[sheet.id]) {
39354
+ deconstructedSheets[sheet.id] = {};
39355
+ }
39356
+ deconstructedCell.push(cellContent.slice(mainPossibleTableIndex));
39357
+ deconstructedSheets[sheet.id][xc] = [...deconstructedCell];
39358
+ }
39359
+ }
39360
+ }
39361
+ return deconstructedSheets;
39256
39362
  }
39257
39363
  /**
39258
39364
  * Convert table-specific references in formulas into standard references. A table reference is composed of columns names,
@@ -45564,10 +45670,10 @@ class CellComposerStore extends AbstractComposerStore {
45564
45670
  const cellValue = isFormula(content)
45565
45671
  ? this.getters.evaluateFormula(this.sheetId, content)
45566
45672
  : parseLiteral(content, this.getters.getLocale());
45567
- if (isMatrix(cellValue)) {
45673
+ if (isMultipleElementMatrix(cellValue)) {
45568
45674
  return true;
45569
45675
  }
45570
- const validationResult = this.getters.getValidationResultForCellValue(cellValue, cellPosition);
45676
+ const validationResult = this.getters.getValidationResultForCellValue(toScalar(cellValue), cellPosition);
45571
45677
  if (!validationResult.isValid && validationResult.rule.isBlocking) {
45572
45678
  return false;
45573
45679
  }
@@ -50679,10 +50785,10 @@ class GaugeChartDesignPanel extends Component {
50679
50785
  return tryToNumber(value, locale) !== undefined;
50680
50786
  }
50681
50787
  const evaluatedValue = this.env.model.getters.evaluateFormula(this.sheetId, value);
50682
- if (isMatrix(evaluatedValue)) {
50788
+ if (isMultipleElementMatrix(evaluatedValue)) {
50683
50789
  return false;
50684
50790
  }
50685
- return tryToNumber(evaluatedValue, locale) !== undefined;
50791
+ return tryToNumber(toScalar(evaluatedValue), locale) !== undefined;
50686
50792
  }
50687
50793
  get sheetId() {
50688
50794
  const chart = this.env.model.getters.getChart(this.props.figureId);
@@ -55493,10 +55599,7 @@ class SpreadsheetPivot {
55493
55599
  if (finalCell.value === null) {
55494
55600
  return { value: _t("(Undefined)") };
55495
55601
  }
55496
- return {
55497
- value: finalCell.value,
55498
- format: finalCell.format,
55499
- };
55602
+ return finalCell;
55500
55603
  }
55501
55604
  getPivotCellValueAndFormat(measureId, domain) {
55502
55605
  const dataEntries = this.filterDataEntriesFromDomain(this.dataEntries, domain);
@@ -55598,9 +55701,15 @@ class SpreadsheetPivot {
55598
55701
  return domain.reduce((current, acc) => this.filterDataEntriesFromDomainNode(current, acc), dataEntries);
55599
55702
  }
55600
55703
  filterDataEntriesFromDomainNode(dataEntries, domain) {
55601
- const { field, value } = domain;
55704
+ const { field, value, type } = domain;
55602
55705
  const { nameWithGranularity } = this.getDimension(field);
55603
- return dataEntries.filter((entry) => entry[nameWithGranularity]?.value === value);
55706
+ return dataEntries.filter((entry) => {
55707
+ const cellValue = entry[nameWithGranularity]?.value;
55708
+ if (type === "char") {
55709
+ return String(cellValue) === String(value);
55710
+ }
55711
+ return cellValue === value;
55712
+ });
55604
55713
  }
55605
55714
  getDimension(nameWithGranularity) {
55606
55715
  return this.definition.getDimension(nameWithGranularity);
@@ -55734,7 +55843,6 @@ pivotRegistry.add("SPREADSHEET", {
55734
55843
  ui: SpreadsheetPivot,
55735
55844
  definition: SpreadsheetPivotRuntimeDefinition,
55736
55845
  externalData: false,
55737
- onIterationEndEvaluation: (pivot) => pivot.markAsDirtyForEvaluation(),
55738
55846
  dateGranularities: [...dateGranularities],
55739
55847
  datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
55740
55848
  isMeasureCandidate: (field) => field.type !== "boolean",
@@ -64385,7 +64493,7 @@ const onIterationEndEvaluationRegistry = new Registry();
64385
64493
  onIterationEndEvaluationRegistry.add("pivots", (getters) => {
64386
64494
  for (const pivotId of getters.getPivotIds()) {
64387
64495
  const pivot = getters.getPivot(pivotId);
64388
- pivotRegistry.get(pivot.type).onIterationEndEvaluation(pivot);
64496
+ pivot.markAsDirtyForEvaluation?.();
64389
64497
  }
64390
64498
  });
64391
64499
 
@@ -66849,12 +66957,12 @@ class EvaluationConditionalFormatPlugin extends CoreViewPlugin {
66849
66957
  }
66850
66958
  return this.getters.evaluateFormula(sheetId, value) ?? "";
66851
66959
  });
66852
- if (evaluatedCriterionValues.some(isMatrix)) {
66960
+ if (evaluatedCriterionValues.some(isMultipleElementMatrix)) {
66853
66961
  return false;
66854
66962
  }
66855
66963
  const evaluatedCriterion = {
66856
66964
  type: rule.operator,
66857
- values: evaluatedCriterionValues,
66965
+ values: evaluatedCriterionValues.map(toScalar),
66858
66966
  };
66859
66967
  return evaluator.isValueValid(cell.value ?? "", evaluatedCriterion, this.getters, sheetId);
66860
66968
  }
@@ -67014,10 +67122,10 @@ class EvaluationDataValidationPlugin extends CoreViewPlugin {
67014
67122
  const evaluator = criterionEvaluatorRegistry.get(criterion.type);
67015
67123
  const offset = this.getCellOffsetInRule(cellPosition, rule);
67016
67124
  const evaluatedCriterionValues = this.getEvaluatedCriterionValues(sheetId, offset, criterion);
67017
- if (evaluatedCriterionValues.some(isMatrix)) {
67125
+ if (evaluatedCriterionValues.some(isMultipleElementMatrix)) {
67018
67126
  return undefined;
67019
67127
  }
67020
- const evaluatedCriterion = { ...criterion, values: evaluatedCriterionValues };
67128
+ const evaluatedCriterion = { ...criterion, values: evaluatedCriterionValues.map(toScalar) };
67021
67129
  if (evaluator.isValueValid(cellValue, evaluatedCriterion, this.getters, sheetId)) {
67022
67130
  return undefined;
67023
67131
  }
@@ -67470,6 +67578,23 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
67470
67578
  static getters = ["getRowSize", "getHeaderSize", "getMaxAnchorOffset"];
67471
67579
  tallestCellInRow = {};
67472
67580
  ctx = document.createElement("canvas").getContext("2d");
67581
+ beforeHandle(cmd) {
67582
+ switch (cmd.type) {
67583
+ // Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
67584
+ // "UPDATE_CELL" uses the Sheet core plugin to access row data.
67585
+ // If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
67586
+ // size updates may apply to incorrect (pre-insert) rows.
67587
+ case "ADD_COLUMNS_ROWS":
67588
+ if (cmd.dimension === "COL") {
67589
+ return;
67590
+ }
67591
+ const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
67592
+ const newCells = Array(cmd.quantity).fill(undefined);
67593
+ const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
67594
+ this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
67595
+ break;
67596
+ }
67597
+ }
67473
67598
  handle(cmd) {
67474
67599
  switch (cmd.type) {
67475
67600
  case "START":
@@ -67499,16 +67624,6 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
67499
67624
  this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
67500
67625
  break;
67501
67626
  }
67502
- case "ADD_COLUMNS_ROWS": {
67503
- if (cmd.dimension === "COL") {
67504
- return;
67505
- }
67506
- const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
67507
- const newCells = Array(cmd.quantity).fill(undefined);
67508
- const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
67509
- this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
67510
- break;
67511
- }
67512
67627
  case "RESIZE_COLUMNS_ROWS":
67513
67628
  {
67514
67629
  const sheetId = cmd.sheetId;
@@ -67660,13 +67775,13 @@ function withPivotPresentationLayer (PivotClass) {
67660
67775
  super(custom, params);
67661
67776
  this.getters = params.getters;
67662
67777
  }
67663
- init(params) {
67778
+ markAsDirtyForEvaluation() {
67664
67779
  this.cache = {};
67665
67780
  this.rankAsc = {};
67666
67781
  this.rankDesc = {};
67667
67782
  this.runningTotal = {};
67668
67783
  this.runningTotalInPercent = {};
67669
- super.init(params);
67784
+ super.markAsDirtyForEvaluation?.();
67670
67785
  }
67671
67786
  getPivotCellValueAndFormat(measureName, domain) {
67672
67787
  return this.getMeasureDisplayValue(measureName, domain);
@@ -67791,7 +67906,7 @@ function withPivotPresentationLayer (PivotClass) {
67791
67906
  return this.getSubTreeMatchingDomain(node.children, domain, domainLevel + 1);
67792
67907
  }
67793
67908
  }
67794
- return tree;
67909
+ return [];
67795
67910
  }
67796
67911
  treeToLeafDomains(tree, parentDomain = []) {
67797
67912
  const domains = [];
@@ -73523,12 +73638,12 @@ class FilterEvaluationPlugin extends UIPlugin {
73523
73638
  }
73524
73639
  return this.getters.evaluateFormula(sheetId, value) ?? "";
73525
73640
  });
73526
- if (evaluatedCriterionValues.some(isMatrix)) {
73641
+ if (evaluatedCriterionValues.some(isMultipleElementMatrix)) {
73527
73642
  continue;
73528
73643
  }
73529
73644
  const evaluatedCriterion = {
73530
73645
  type: filterValue.type,
73531
- values: evaluatedCriterionValues,
73646
+ values: evaluatedCriterionValues.map(toScalar),
73532
73647
  dateValue: filterValue.dateValue,
73533
73648
  };
73534
73649
  for (let row = filteredZone.top; row <= filteredZone.bottom; row++) {
@@ -74050,6 +74165,14 @@ class GridSelectionPlugin extends UIPlugin {
74050
74165
  const isBasedBefore = cmd.base < start;
74051
74166
  const deltaCol = isBasedBefore && isCol ? thickness : 0;
74052
74167
  const deltaRow = isBasedBefore && !isCol ? thickness : 0;
74168
+ const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
74169
+ const originalSize = Object.fromEntries(toRemove.map((element) => {
74170
+ const size = isCol
74171
+ ? this.getters.getColSize(cmd.sheetId, element)
74172
+ : this.getters.getUserRowSize(cmd.sheetId, element);
74173
+ const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
74174
+ return [element, isDefaultCol ? undefined : size];
74175
+ }));
74053
74176
  const target = [
74054
74177
  {
74055
74178
  left: isCol ? start + deltaCol : 0,
@@ -74080,13 +74203,12 @@ class GridSelectionPlugin extends UIPlugin {
74080
74203
  const col = selection.left;
74081
74204
  const row = selection.top;
74082
74205
  this.setSelectionMixin({ zone: selection, cell: { col, row } }, [selection]);
74083
- const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
74084
74206
  let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
74085
74207
  const resizingGroups = {};
74086
74208
  for (const element of toRemove) {
74087
- const size = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, element);
74209
+ const size = originalSize[element];
74088
74210
  const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
74089
- if (size !== currentSize) {
74211
+ if (size && size !== currentSize) {
74090
74212
  resizingGroups[size] ??= [];
74091
74213
  resizingGroups[size].push(currentIndex);
74092
74214
  currentIndex += 1;
@@ -75512,6 +75634,7 @@ const coreViewsPluginRegistry = new Registry()
75512
75634
 
75513
75635
  autoCompleteProviders.add("dataValidation", {
75514
75636
  displayAllOnInitialContent: true,
75637
+ canBeToggled: false,
75515
75638
  getProposals(tokenAtCursor, content) {
75516
75639
  if (isFormula(content)) {
75517
75640
  return [];
@@ -77077,14 +77200,12 @@ class BottomBarSheet extends Component {
77077
77200
  this.editionState = "initializing";
77078
77201
  }
77079
77202
  stopEdition() {
77080
- const input = this.sheetNameRef.el;
77081
- if (!this.state.isEditing || !input)
77203
+ if (!this.state.isEditing || !this.sheetNameRef.el)
77082
77204
  return;
77083
77205
  this.state.isEditing = false;
77084
77206
  this.editionState = "initializing";
77085
- input.blur();
77207
+ this.sheetNameRef.el.blur();
77086
77208
  const inputValue = this.getInputContent() || "";
77087
- input.innerText = inputValue;
77088
77209
  interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
77089
77210
  }
77090
77211
  cancelEdition() {
@@ -84456,6 +84577,7 @@ const stores = {
84456
84577
  PivotSidePanelStore,
84457
84578
  PivotMeasureDisplayPanelStore,
84458
84579
  ClientFocusStore,
84580
+ GridRenderer,
84459
84581
  };
84460
84582
  function addFunction(functionName, functionDescription) {
84461
84583
  functionRegistry.add(functionName, functionDescription);
@@ -84474,6 +84596,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
84474
84596
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, 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 };
84475
84597
 
84476
84598
 
84477
- __info__.version = "18.4.1";
84478
- __info__.date = "2025-06-27T09:13:01.303Z";
84479
- __info__.hash = "5cecc0e";
84599
+ __info__.version = "18.4.3";
84600
+ __info__.date = "2025-07-28T13:39:06.036Z";
84601
+ __info__.hash = "4b596d7";