@odoo/o-spreadsheet 18.0.36 → 18.0.37

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.0.36
6
- * @date 2025-06-27T09:11:51.920Z
7
- * @hash b8dc998
5
+ * @version 18.0.37
6
+ * @date 2025-07-11T11:11:13.394Z
7
+ * @hash bc6f00d
8
8
  */
9
9
 
10
10
  'use strict';
@@ -819,6 +819,7 @@ const specialWhiteSpaceSpecialCharacters = [
819
819
  ];
820
820
  const specialWhiteSpaceRegexp = new RegExp(specialWhiteSpaceSpecialCharacters.join("|"), "g");
821
821
  const newLineRegexp = /(\r\n|\r)/g;
822
+ const whiteSpaceCharacters = specialWhiteSpaceSpecialCharacters.concat([" "]);
822
823
  /**
823
824
  * Replace all different newlines characters by \n
824
825
  */
@@ -2662,8 +2663,9 @@ const INITIAL_JS_DAY = DateTime.fromTimestamp(0);
2662
2663
  const DATE_JS_1900_OFFSET = INITIAL_JS_DAY.getTime() - INITIAL_1900_DAY.getTime();
2663
2664
  const mdyDateRegexp = /^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/;
2664
2665
  const ymdDateRegexp = /^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/;
2665
- const dateSeparatorsRegex = /\/|-|\s/;
2666
- const dateRegexp = /^(\d{1,4})[\/-\s](\d{1,4})([\/-\s](\d{1,4}))?$/;
2666
+ const whiteSpaceChars = whiteSpaceCharacters.join("");
2667
+ const dateSeparatorsRegex = new RegExp(`\/|-|${whiteSpaceCharacters.join("|")}`);
2668
+ const dateRegexp = new RegExp(`^(\\d{1,4})[\/${whiteSpaceChars}\-](\\d{1,4})([\/${whiteSpaceChars}\-](\\d{1,4}))?$`);
2667
2669
  const timeRegexp = /((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/;
2668
2670
  /** Convert a value number representing a date, or return undefined if it isn't possible */
2669
2671
  function valueToDateNumber(value, locale) {
@@ -6366,6 +6368,8 @@ function splitWordToSpecificWidth(ctx, word, width, style) {
6366
6368
  function splitTextToWidth(ctx, text, style, width) {
6367
6369
  if (!style)
6368
6370
  style = {};
6371
+ if (isMarkdownLink(text))
6372
+ text = parseMarkdownLink(text).label;
6369
6373
  const brokenText = [];
6370
6374
  // Checking if text contains NEWLINE before split makes it very slightly slower if text contains it,
6371
6375
  // but 5-10x faster if it doesn't
@@ -8319,6 +8323,10 @@ function toNormalizedPivotValue(dimension, groupValue) {
8319
8323
  if (groupValue === null || groupValue === "null") {
8320
8324
  return null;
8321
8325
  }
8326
+ const extractedGroupValue = typeof groupValue === "object" ? groupValue.value : groupValue;
8327
+ if (isEvaluationError(extractedGroupValue)) {
8328
+ return extractedGroupValue;
8329
+ }
8322
8330
  const groupValueString = typeof groupValue === "boolean"
8323
8331
  ? toString(groupValue).toLocaleLowerCase()
8324
8332
  : toString(groupValue);
@@ -12966,38 +12974,111 @@ function convertPivotTableConfig(pivotTable) {
12966
12974
  * In all the sheets, replace the table-only references in the formula cells with standard references.
12967
12975
  */
12968
12976
  function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
12977
+ let deconstructedSheets = null;
12969
12978
  for (let tableSheet of convertedSheets) {
12970
12979
  const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
12980
+ if (!tables || tables.length === 0) {
12981
+ continue;
12982
+ }
12983
+ // Only deconstruct sheets if we are sure there are tables to process
12984
+ if (!deconstructedSheets) {
12985
+ deconstructedSheets = deconstructSheets(convertedSheets);
12986
+ }
12971
12987
  for (let table of tables) {
12972
- const tabRef = table.name + "[";
12973
- for (let sheet of convertedSheets) {
12974
- for (let xc in sheet.cells) {
12975
- const cell = sheet.cells[xc];
12976
- if (cell && cell.content && cell.content.startsWith("=")) {
12977
- let refIndex;
12978
- while ((refIndex = cell.content.indexOf(tabRef)) !== -1) {
12979
- let endIndex = refIndex + tabRef.length;
12980
- let openBrackets = 1;
12981
- while (openBrackets > 0 && endIndex < cell.content.length) {
12982
- if (cell.content[endIndex] === "[") {
12983
- openBrackets++;
12984
- }
12985
- else if (cell.content[endIndex] === "]") {
12986
- openBrackets--;
12987
- }
12988
- endIndex++;
12989
- }
12990
- let reference = cell.content.slice(refIndex + tabRef.length, endIndex - 1);
12991
- const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
12992
- const convertedRef = convertTableReference(sheetPrefix, reference, table, xc);
12993
- cell.content =
12994
- cell.content.slice(0, refIndex) + convertedRef + cell.content.slice(endIndex);
12988
+ for (let sheetId in deconstructedSheets) {
12989
+ const sheet = convertedSheets.find((s) => s.id === sheetId);
12990
+ for (let xc in deconstructedSheets[sheetId]) {
12991
+ const deconstructedCell = deconstructedSheets[sheetId][xc];
12992
+ for (let i = deconstructedCell.length - 3; i >= 0; i -= 2) {
12993
+ const possibleTable = deconstructedSheets[sheetId][xc][i];
12994
+ if (!possibleTable.endsWith(table.name)) {
12995
+ continue;
12995
12996
  }
12997
+ const possibleRef = deconstructedSheets[sheetId][xc][i + 1];
12998
+ const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
12999
+ const convertedRef = convertTableReference(sheetPrefix, possibleRef, table, xc);
13000
+ deconstructedSheets[sheetId][xc][i + 2] =
13001
+ possibleTable.slice(0, possibleTable.indexOf(table.name)) +
13002
+ convertedRef +
13003
+ deconstructedSheets[sheetId][xc][i + 2];
13004
+ deconstructedSheets[sheetId][xc].splice(i, 2);
13005
+ }
13006
+ }
13007
+ }
13008
+ }
13009
+ }
13010
+ if (!deconstructedSheets) {
13011
+ return;
13012
+ }
13013
+ for (let sheetId in deconstructedSheets) {
13014
+ const sheet = convertedSheets.find((s) => s.id === sheetId);
13015
+ for (let xc in deconstructedSheets[sheetId]) {
13016
+ const deconstructedCell = deconstructedSheets[sheetId][xc];
13017
+ if (deconstructedCell.length === 1) {
13018
+ sheet.cells[xc].content = deconstructedCell[0];
13019
+ continue;
13020
+ }
13021
+ let newContent = "";
13022
+ for (let i = 0; i < deconstructedCell.length; i += 2) {
13023
+ newContent += deconstructedCell[i] + "[" + deconstructedCell[i + 1] + "]";
13024
+ }
13025
+ newContent += deconstructedCell[deconstructedCell.length - 1];
13026
+ sheet.cells[xc].content = newContent;
13027
+ }
13028
+ }
13029
+ }
13030
+ /**
13031
+ * Deconstruct the content of the cells in the sheets to extract possible table references.
13032
+ * Example from "=AVERAGE(Table1[colName1])-AVERAGE(Table2[colName2])":
13033
+ * return --> ["=AVERAGE(Table1", "colName1", ")-AVERAGE(Table2", "colName2", ")"]
13034
+ */
13035
+ function deconstructSheets(convertedSheets) {
13036
+ const deconstructedSheets = {};
13037
+ for (let sheet of convertedSheets) {
13038
+ for (let xc in sheet.cells) {
13039
+ const cellContent = sheet.cells[xc]?.content;
13040
+ if (!cellContent || !cellContent.startsWith("=")) {
13041
+ continue;
13042
+ }
13043
+ const startIndex = cellContent.indexOf("[");
13044
+ if (startIndex === -1) {
13045
+ continue;
13046
+ }
13047
+ const deconstructedCell = [];
13048
+ let possibleTable = cellContent.slice(0, startIndex);
13049
+ let possibleRef = "";
13050
+ let openBrackets = 1;
13051
+ let mainPossibleTableIndex = 0;
13052
+ let mainOpenBracketIndex = startIndex;
13053
+ for (let index = startIndex + 1; index < cellContent.length; index++) {
13054
+ if (cellContent[index] === "[") {
13055
+ if (openBrackets === 0) {
13056
+ possibleTable = cellContent.slice(mainPossibleTableIndex, index);
13057
+ mainOpenBracketIndex = index;
13058
+ }
13059
+ openBrackets++;
13060
+ continue;
13061
+ }
13062
+ if (cellContent[index] === "]") {
13063
+ openBrackets--;
13064
+ if (openBrackets === 0) {
13065
+ possibleRef = cellContent.slice(mainOpenBracketIndex + 1, index);
13066
+ deconstructedCell.push(possibleTable);
13067
+ deconstructedCell.push(possibleRef);
13068
+ mainPossibleTableIndex = index + 1;
12996
13069
  }
12997
13070
  }
12998
13071
  }
13072
+ if (deconstructedCell.length) {
13073
+ if (!deconstructedSheets[sheet.id]) {
13074
+ deconstructedSheets[sheet.id] = {};
13075
+ }
13076
+ deconstructedCell.push(cellContent.slice(mainPossibleTableIndex));
13077
+ deconstructedSheets[sheet.id][xc] = [...deconstructedCell];
13078
+ }
12999
13079
  }
13000
13080
  }
13081
+ return deconstructedSheets;
13001
13082
  }
13002
13083
  /**
13003
13084
  * Convert table-specific references in formulas into standard references. A table reference is composed of columns names,
@@ -44568,10 +44649,7 @@ class SpreadsheetPivot {
44568
44649
  if (finalCell.value === null) {
44569
44650
  return { value: _t("(Undefined)") };
44570
44651
  }
44571
- return {
44572
- value: finalCell.value,
44573
- format: finalCell.format,
44574
- };
44652
+ return finalCell;
44575
44653
  }
44576
44654
  getPivotCellValueAndFormat(measureId, domain) {
44577
44655
  const dataEntries = this.filterDataEntriesFromDomain(this.dataEntries, domain);
@@ -44802,7 +44880,6 @@ pivotRegistry.add("SPREADSHEET", {
44802
44880
  ui: SpreadsheetPivot,
44803
44881
  definition: SpreadsheetPivotRuntimeDefinition,
44804
44882
  externalData: false,
44805
- onIterationEndEvaluation: (pivot) => pivot.markAsDirtyForEvaluation(),
44806
44883
  dateGranularities: [...dateGranularities],
44807
44884
  datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
44808
44885
  isMeasureCandidate: (field) => !["datetime", "boolean"].includes(field.type),
@@ -57473,7 +57550,7 @@ const onIterationEndEvaluationRegistry = new Registry();
57473
57550
  onIterationEndEvaluationRegistry.add("pivots", (getters) => {
57474
57551
  for (const pivotId of getters.getPivotIds()) {
57475
57552
  const pivot = getters.getPivot(pivotId);
57476
- pivotRegistry.get(pivot.type).onIterationEndEvaluation(pivot);
57553
+ pivot.markAsDirtyForEvaluation?.();
57477
57554
  }
57478
57555
  });
57479
57556
 
@@ -60510,13 +60587,13 @@ function withPivotPresentationLayer (PivotClass) {
60510
60587
  super(custom, params);
60511
60588
  this.getters = params.getters;
60512
60589
  }
60513
- init(params) {
60590
+ markAsDirtyForEvaluation() {
60514
60591
  this.cache = {};
60515
60592
  this.rankAsc = {};
60516
60593
  this.rankDesc = {};
60517
60594
  this.runningTotal = {};
60518
60595
  this.runningTotalInPercent = {};
60519
- super.init(params);
60596
+ super.markAsDirtyForEvaluation?.();
60520
60597
  }
60521
60598
  getPivotCellValueAndFormat(measureName, domain) {
60522
60599
  return this.getMeasureDisplayValue(measureName, domain);
@@ -60641,7 +60718,7 @@ function withPivotPresentationLayer (PivotClass) {
60641
60718
  return this.getSubTreeMatchingDomain(node.children, domain, domainLevel + 1);
60642
60719
  }
60643
60720
  }
60644
- return tree;
60721
+ return [];
60645
60722
  }
60646
60723
  treeToLeafDomains(tree, parentDomain = []) {
60647
60724
  const domains = [];
@@ -74514,6 +74591,6 @@ exports.tokenColors = tokenColors;
74514
74591
  exports.tokenize = tokenize;
74515
74592
 
74516
74593
 
74517
- __info__.version = "18.0.36";
74518
- __info__.date = "2025-06-27T09:11:51.920Z";
74519
- __info__.hash = "b8dc998";
74594
+ __info__.version = "18.0.37";
74595
+ __info__.date = "2025-07-11T11:11:13.394Z";
74596
+ __info__.hash = "bc6f00d";
@@ -4883,6 +4883,7 @@ interface Pivot<T = PivotRuntimeDefinition> {
4883
4883
  label: string;
4884
4884
  }[];
4885
4885
  needsReevaluation: boolean;
4886
+ markAsDirtyForEvaluation?(): void;
4886
4887
  }
4887
4888
 
4888
4889
  declare class PivotUIPlugin extends UIPlugin {
@@ -6185,7 +6186,6 @@ interface PivotRegistryItem {
6185
6186
  ui: PivotUIConstructor;
6186
6187
  definition: PivotDefinitionConstructor;
6187
6188
  externalData: boolean;
6188
- onIterationEndEvaluation: (pivot: Pivot) => void;
6189
6189
  dateGranularities: string[];
6190
6190
  datetimeGranularities: string[];
6191
6191
  isMeasureCandidate: (field: PivotField) => boolean;
@@ -9761,7 +9761,7 @@ declare function createPivotFormula(formulaId: string, cell: PivotTableCell): st
9761
9761
  * e.g. given the following formula PIVOT.VALUE("1", "stage_id", "42", "status", "won"),
9762
9762
  * the two group values are "42" and "won".
9763
9763
  */
9764
- declare function toNormalizedPivotValue(dimension: Pick<PivotDimension$1, "type" | "displayName" | "granularity">, groupValue: any): CellValue;
9764
+ declare function toNormalizedPivotValue(dimension: Pick<PivotDimension$1, "type" | "displayName" | "granularity">, groupValue: Maybe<CellValue | FunctionResultObject>): CellValue;
9765
9765
 
9766
9766
  interface Props$g {
9767
9767
  onConfirm: (content: string) => void;
@@ -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.0.36
6
- * @date 2025-06-27T09:11:51.920Z
7
- * @hash b8dc998
5
+ * @version 18.0.37
6
+ * @date 2025-07-11T11:11:13.394Z
7
+ * @hash bc6f00d
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -817,6 +817,7 @@ const specialWhiteSpaceSpecialCharacters = [
817
817
  ];
818
818
  const specialWhiteSpaceRegexp = new RegExp(specialWhiteSpaceSpecialCharacters.join("|"), "g");
819
819
  const newLineRegexp = /(\r\n|\r)/g;
820
+ const whiteSpaceCharacters = specialWhiteSpaceSpecialCharacters.concat([" "]);
820
821
  /**
821
822
  * Replace all different newlines characters by \n
822
823
  */
@@ -2660,8 +2661,9 @@ const INITIAL_JS_DAY = DateTime.fromTimestamp(0);
2660
2661
  const DATE_JS_1900_OFFSET = INITIAL_JS_DAY.getTime() - INITIAL_1900_DAY.getTime();
2661
2662
  const mdyDateRegexp = /^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/;
2662
2663
  const ymdDateRegexp = /^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/;
2663
- const dateSeparatorsRegex = /\/|-|\s/;
2664
- const dateRegexp = /^(\d{1,4})[\/-\s](\d{1,4})([\/-\s](\d{1,4}))?$/;
2664
+ const whiteSpaceChars = whiteSpaceCharacters.join("");
2665
+ const dateSeparatorsRegex = new RegExp(`\/|-|${whiteSpaceCharacters.join("|")}`);
2666
+ const dateRegexp = new RegExp(`^(\\d{1,4})[\/${whiteSpaceChars}\-](\\d{1,4})([\/${whiteSpaceChars}\-](\\d{1,4}))?$`);
2665
2667
  const timeRegexp = /((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/;
2666
2668
  /** Convert a value number representing a date, or return undefined if it isn't possible */
2667
2669
  function valueToDateNumber(value, locale) {
@@ -6364,6 +6366,8 @@ function splitWordToSpecificWidth(ctx, word, width, style) {
6364
6366
  function splitTextToWidth(ctx, text, style, width) {
6365
6367
  if (!style)
6366
6368
  style = {};
6369
+ if (isMarkdownLink(text))
6370
+ text = parseMarkdownLink(text).label;
6367
6371
  const brokenText = [];
6368
6372
  // Checking if text contains NEWLINE before split makes it very slightly slower if text contains it,
6369
6373
  // but 5-10x faster if it doesn't
@@ -8317,6 +8321,10 @@ function toNormalizedPivotValue(dimension, groupValue) {
8317
8321
  if (groupValue === null || groupValue === "null") {
8318
8322
  return null;
8319
8323
  }
8324
+ const extractedGroupValue = typeof groupValue === "object" ? groupValue.value : groupValue;
8325
+ if (isEvaluationError(extractedGroupValue)) {
8326
+ return extractedGroupValue;
8327
+ }
8320
8328
  const groupValueString = typeof groupValue === "boolean"
8321
8329
  ? toString(groupValue).toLocaleLowerCase()
8322
8330
  : toString(groupValue);
@@ -12964,38 +12972,111 @@ function convertPivotTableConfig(pivotTable) {
12964
12972
  * In all the sheets, replace the table-only references in the formula cells with standard references.
12965
12973
  */
12966
12974
  function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
12975
+ let deconstructedSheets = null;
12967
12976
  for (let tableSheet of convertedSheets) {
12968
12977
  const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
12978
+ if (!tables || tables.length === 0) {
12979
+ continue;
12980
+ }
12981
+ // Only deconstruct sheets if we are sure there are tables to process
12982
+ if (!deconstructedSheets) {
12983
+ deconstructedSheets = deconstructSheets(convertedSheets);
12984
+ }
12969
12985
  for (let table of tables) {
12970
- const tabRef = table.name + "[";
12971
- for (let sheet of convertedSheets) {
12972
- for (let xc in sheet.cells) {
12973
- const cell = sheet.cells[xc];
12974
- if (cell && cell.content && cell.content.startsWith("=")) {
12975
- let refIndex;
12976
- while ((refIndex = cell.content.indexOf(tabRef)) !== -1) {
12977
- let endIndex = refIndex + tabRef.length;
12978
- let openBrackets = 1;
12979
- while (openBrackets > 0 && endIndex < cell.content.length) {
12980
- if (cell.content[endIndex] === "[") {
12981
- openBrackets++;
12982
- }
12983
- else if (cell.content[endIndex] === "]") {
12984
- openBrackets--;
12985
- }
12986
- endIndex++;
12987
- }
12988
- let reference = cell.content.slice(refIndex + tabRef.length, endIndex - 1);
12989
- const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
12990
- const convertedRef = convertTableReference(sheetPrefix, reference, table, xc);
12991
- cell.content =
12992
- cell.content.slice(0, refIndex) + convertedRef + cell.content.slice(endIndex);
12986
+ for (let sheetId in deconstructedSheets) {
12987
+ const sheet = convertedSheets.find((s) => s.id === sheetId);
12988
+ for (let xc in deconstructedSheets[sheetId]) {
12989
+ const deconstructedCell = deconstructedSheets[sheetId][xc];
12990
+ for (let i = deconstructedCell.length - 3; i >= 0; i -= 2) {
12991
+ const possibleTable = deconstructedSheets[sheetId][xc][i];
12992
+ if (!possibleTable.endsWith(table.name)) {
12993
+ continue;
12993
12994
  }
12995
+ const possibleRef = deconstructedSheets[sheetId][xc][i + 1];
12996
+ const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
12997
+ const convertedRef = convertTableReference(sheetPrefix, possibleRef, table, xc);
12998
+ deconstructedSheets[sheetId][xc][i + 2] =
12999
+ possibleTable.slice(0, possibleTable.indexOf(table.name)) +
13000
+ convertedRef +
13001
+ deconstructedSheets[sheetId][xc][i + 2];
13002
+ deconstructedSheets[sheetId][xc].splice(i, 2);
13003
+ }
13004
+ }
13005
+ }
13006
+ }
13007
+ }
13008
+ if (!deconstructedSheets) {
13009
+ return;
13010
+ }
13011
+ for (let sheetId in deconstructedSheets) {
13012
+ const sheet = convertedSheets.find((s) => s.id === sheetId);
13013
+ for (let xc in deconstructedSheets[sheetId]) {
13014
+ const deconstructedCell = deconstructedSheets[sheetId][xc];
13015
+ if (deconstructedCell.length === 1) {
13016
+ sheet.cells[xc].content = deconstructedCell[0];
13017
+ continue;
13018
+ }
13019
+ let newContent = "";
13020
+ for (let i = 0; i < deconstructedCell.length; i += 2) {
13021
+ newContent += deconstructedCell[i] + "[" + deconstructedCell[i + 1] + "]";
13022
+ }
13023
+ newContent += deconstructedCell[deconstructedCell.length - 1];
13024
+ sheet.cells[xc].content = newContent;
13025
+ }
13026
+ }
13027
+ }
13028
+ /**
13029
+ * Deconstruct the content of the cells in the sheets to extract possible table references.
13030
+ * Example from "=AVERAGE(Table1[colName1])-AVERAGE(Table2[colName2])":
13031
+ * return --> ["=AVERAGE(Table1", "colName1", ")-AVERAGE(Table2", "colName2", ")"]
13032
+ */
13033
+ function deconstructSheets(convertedSheets) {
13034
+ const deconstructedSheets = {};
13035
+ for (let sheet of convertedSheets) {
13036
+ for (let xc in sheet.cells) {
13037
+ const cellContent = sheet.cells[xc]?.content;
13038
+ if (!cellContent || !cellContent.startsWith("=")) {
13039
+ continue;
13040
+ }
13041
+ const startIndex = cellContent.indexOf("[");
13042
+ if (startIndex === -1) {
13043
+ continue;
13044
+ }
13045
+ const deconstructedCell = [];
13046
+ let possibleTable = cellContent.slice(0, startIndex);
13047
+ let possibleRef = "";
13048
+ let openBrackets = 1;
13049
+ let mainPossibleTableIndex = 0;
13050
+ let mainOpenBracketIndex = startIndex;
13051
+ for (let index = startIndex + 1; index < cellContent.length; index++) {
13052
+ if (cellContent[index] === "[") {
13053
+ if (openBrackets === 0) {
13054
+ possibleTable = cellContent.slice(mainPossibleTableIndex, index);
13055
+ mainOpenBracketIndex = index;
13056
+ }
13057
+ openBrackets++;
13058
+ continue;
13059
+ }
13060
+ if (cellContent[index] === "]") {
13061
+ openBrackets--;
13062
+ if (openBrackets === 0) {
13063
+ possibleRef = cellContent.slice(mainOpenBracketIndex + 1, index);
13064
+ deconstructedCell.push(possibleTable);
13065
+ deconstructedCell.push(possibleRef);
13066
+ mainPossibleTableIndex = index + 1;
12994
13067
  }
12995
13068
  }
12996
13069
  }
13070
+ if (deconstructedCell.length) {
13071
+ if (!deconstructedSheets[sheet.id]) {
13072
+ deconstructedSheets[sheet.id] = {};
13073
+ }
13074
+ deconstructedCell.push(cellContent.slice(mainPossibleTableIndex));
13075
+ deconstructedSheets[sheet.id][xc] = [...deconstructedCell];
13076
+ }
12997
13077
  }
12998
13078
  }
13079
+ return deconstructedSheets;
12999
13080
  }
13000
13081
  /**
13001
13082
  * Convert table-specific references in formulas into standard references. A table reference is composed of columns names,
@@ -44566,10 +44647,7 @@ class SpreadsheetPivot {
44566
44647
  if (finalCell.value === null) {
44567
44648
  return { value: _t("(Undefined)") };
44568
44649
  }
44569
- return {
44570
- value: finalCell.value,
44571
- format: finalCell.format,
44572
- };
44650
+ return finalCell;
44573
44651
  }
44574
44652
  getPivotCellValueAndFormat(measureId, domain) {
44575
44653
  const dataEntries = this.filterDataEntriesFromDomain(this.dataEntries, domain);
@@ -44800,7 +44878,6 @@ pivotRegistry.add("SPREADSHEET", {
44800
44878
  ui: SpreadsheetPivot,
44801
44879
  definition: SpreadsheetPivotRuntimeDefinition,
44802
44880
  externalData: false,
44803
- onIterationEndEvaluation: (pivot) => pivot.markAsDirtyForEvaluation(),
44804
44881
  dateGranularities: [...dateGranularities],
44805
44882
  datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
44806
44883
  isMeasureCandidate: (field) => !["datetime", "boolean"].includes(field.type),
@@ -57471,7 +57548,7 @@ const onIterationEndEvaluationRegistry = new Registry();
57471
57548
  onIterationEndEvaluationRegistry.add("pivots", (getters) => {
57472
57549
  for (const pivotId of getters.getPivotIds()) {
57473
57550
  const pivot = getters.getPivot(pivotId);
57474
- pivotRegistry.get(pivot.type).onIterationEndEvaluation(pivot);
57551
+ pivot.markAsDirtyForEvaluation?.();
57475
57552
  }
57476
57553
  });
57477
57554
 
@@ -60508,13 +60585,13 @@ function withPivotPresentationLayer (PivotClass) {
60508
60585
  super(custom, params);
60509
60586
  this.getters = params.getters;
60510
60587
  }
60511
- init(params) {
60588
+ markAsDirtyForEvaluation() {
60512
60589
  this.cache = {};
60513
60590
  this.rankAsc = {};
60514
60591
  this.rankDesc = {};
60515
60592
  this.runningTotal = {};
60516
60593
  this.runningTotalInPercent = {};
60517
- super.init(params);
60594
+ super.markAsDirtyForEvaluation?.();
60518
60595
  }
60519
60596
  getPivotCellValueAndFormat(measureName, domain) {
60520
60597
  return this.getMeasureDisplayValue(measureName, domain);
@@ -60639,7 +60716,7 @@ function withPivotPresentationLayer (PivotClass) {
60639
60716
  return this.getSubTreeMatchingDomain(node.children, domain, domainLevel + 1);
60640
60717
  }
60641
60718
  }
60642
- return tree;
60719
+ return [];
60643
60720
  }
60644
60721
  treeToLeafDomains(tree, parentDomain = []) {
60645
60722
  const domains = [];
@@ -74469,6 +74546,6 @@ const constants = {
74469
74546
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, 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 };
74470
74547
 
74471
74548
 
74472
- __info__.version = "18.0.36";
74473
- __info__.date = "2025-06-27T09:11:51.920Z";
74474
- __info__.hash = "b8dc998";
74549
+ __info__.version = "18.0.37";
74550
+ __info__.date = "2025-07-11T11:11:13.394Z";
74551
+ __info__.hash = "bc6f00d";