@odoo/o-spreadsheet 19.4.3 → 19.4.4

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 19.4.3
6
- * @date 2026-07-20T11:02:36.941Z
7
- * @hash d32e61b
5
+ * @version 19.4.4
6
+ * @date 2026-07-23T07:49:22.265Z
7
+ * @hash 6b3c312
8
8
  */
9
9
 
10
10
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
@@ -45494,7 +45494,8 @@ var Autofill = class extends Component {
45494
45494
  const { x, y } = this.state.handler ? this.state.position : this.props.position;
45495
45495
  return cssPropertiesToCss({
45496
45496
  top: `${y}px`,
45497
- left: `${x}px`
45497
+ left: `${x}px`,
45498
+ visibility: this.props.isVisible ? "visible" : "hidden"
45498
45499
  });
45499
45500
  }
45500
45501
  get styleNextValue() {
@@ -45915,7 +45916,7 @@ var CellComposerStore = class extends AbstractComposerStore {
45915
45916
  this._cancelEdition();
45916
45917
  this.resetContent();
45917
45918
  }
45918
- if (cmd.sheetIdFrom !== cmd.sheetIdTo) {
45919
+ if (this.model.selection.isListening(this) && cmd.sheetIdFrom !== cmd.sheetIdTo) {
45919
45920
  const activePosition = this.getters.getActivePosition();
45920
45921
  const { col, row } = this.getters.getNextVisibleCellPosition({
45921
45922
  sheetId: cmd.sheetIdTo,
@@ -50086,6 +50087,10 @@ var Grid = class extends Component {
50086
50087
  get displaySelectionHandler() {
50087
50088
  return this.env.isMobile() && this.composerFocusStore.activeComposer.editionMode === "inactive";
50088
50089
  }
50090
+ get clientsToDisplay() {
50091
+ const sheetId = this.env.model.getters.getActiveSheetId();
50092
+ return this.env.model.getters.getClientsToDisplay(sheetId);
50093
+ }
50089
50094
  };
50090
50095
 
50091
50096
  //#endregion
@@ -59858,6 +59863,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59858
59863
  pivots = {};
59859
59864
  unusedPivotsInFormulas;
59860
59865
  custom;
59866
+ pivotPositionCache = new PositionMap();
59867
+ shouldInvalidateCache = false;
59861
59868
  constructor(config) {
59862
59869
  super(config);
59863
59870
  this.custom = config.custom;
@@ -59868,7 +59875,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59868
59875
  }
59869
59876
  }
59870
59877
  handle(cmd) {
59871
- if (invalidateEvaluationCommands.has(cmd.type)) for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
59878
+ if (invalidateEvaluationCommands.has(cmd.type)) {
59879
+ this.shouldInvalidateCache = true;
59880
+ for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
59881
+ }
59882
+ if (cmd.type === "UPDATE_CELL") this.shouldInvalidateCache = true;
59872
59883
  switch (cmd.type) {
59873
59884
  case "REFRESH_PIVOT":
59874
59885
  this.refreshPivot(cmd.id);
@@ -59908,6 +59919,12 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59908
59919
  break;
59909
59920
  }
59910
59921
  }
59922
+ finalize() {
59923
+ if (this.shouldInvalidateCache) {
59924
+ this.pivotPositionCache = new PositionMap();
59925
+ this.shouldInvalidateCache = false;
59926
+ }
59927
+ }
59911
59928
  /**
59912
59929
  * Get the id of the first pivot in the formula at the given position. Returns undefined if there
59913
59930
  * is no pivot at this position
@@ -59919,9 +59936,14 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59919
59936
  * Get all of the ids of the pivot present in the formula at the given position.
59920
59937
  */
59921
59938
  getPivotIdsFromPosition(position) {
59922
- const cell = this.getters.getCorrespondingFormulaCell(position);
59923
- if (cell && cell.isFormula) return this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
59924
- return [];
59939
+ if (!this.pivotPositionCache.has(position)) {
59940
+ const cell = this.getters.getCorrespondingFormulaCell(position);
59941
+ if (cell && cell.isFormula) {
59942
+ const pivotIds = this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
59943
+ this.pivotPositionCache.set(position, pivotIds);
59944
+ }
59945
+ }
59946
+ return this.pivotPositionCache.get(position) || [];
59925
59947
  }
59926
59948
  getPivotIdsFromFormula(sheetId, formula) {
59927
59949
  return this.getPivotFunctions(sheetId, formula).map((pivotFunction) => {
@@ -61286,12 +61308,22 @@ var TableComputedStylePlugin = class extends UIPlugin {
61286
61308
  getCellTableStyle(position) {
61287
61309
  const table = this.getters.getTable(position);
61288
61310
  if (!table) return;
61289
- return this.tableStyles[position.sheetId][table.id]().styles[position.col]?.[position.row];
61311
+ try {
61312
+ return this.tableStyles[position.sheetId][table.id]().styles[position.col]?.[position.row];
61313
+ } catch (e) {
61314
+ if (isEvaluationError(e) || e instanceof EvaluationError) return;
61315
+ throw e;
61316
+ }
61290
61317
  }
61291
61318
  getCellTableBorder(position) {
61292
61319
  const table = this.getters.getTable(position);
61293
61320
  if (!table) return;
61294
- return this.tableStyles[position.sheetId][table.id]().borders[position.col]?.[position.row];
61321
+ try {
61322
+ return this.tableStyles[position.sheetId][table.id]().borders[position.col]?.[position.row];
61323
+ } catch (e) {
61324
+ if (isEvaluationError(e) || e instanceof EvaluationError) return;
61325
+ throw e;
61326
+ }
61295
61327
  }
61296
61328
  computeTableStyle(sheetId, table) {
61297
61329
  return lazy(() => {
@@ -62634,14 +62666,13 @@ var CollaborativePlugin = class extends UIPlugin {
62634
62666
  * Get the list of others connected clients which are present in the same sheet
62635
62667
  * and with a valid position
62636
62668
  */
62637
- getClientsToDisplay() {
62669
+ getClientsToDisplay(sheetId) {
62638
62670
  try {
62639
62671
  this.getters.getCurrentClient();
62640
62672
  } catch (e) {
62641
62673
  if (e instanceof ClientDisconnectedError) return [];
62642
62674
  else throw e;
62643
62675
  }
62644
- const sheetId = this.getters.getActiveSheetId();
62645
62676
  const clients = [];
62646
62677
  for (const client of this.getters.getConnectedClients()) if (client.id !== this.getters.getCurrentClient().id && client.position && client.position.sheetId === sheetId && this.isPositionValid(client.position)) clients.push({
62647
62678
  ...client,
@@ -62652,7 +62683,7 @@ var CollaborativePlugin = class extends UIPlugin {
62652
62683
  drawLayer(renderingContext) {
62653
62684
  if (this.getters.isDashboard()) return;
62654
62685
  const { ctx, thinLineWidth, viewports, sheetId } = renderingContext;
62655
- for (const client of this.getClientsToDisplay()) {
62686
+ for (const client of this.getClientsToDisplay(sheetId)) {
62656
62687
  const { row, col } = client.position;
62657
62688
  const zone = this.getters.expandZone(sheetId, {
62658
62689
  top: row,
@@ -63460,8 +63491,8 @@ var HeaderVisibilityUIPlugin = class extends UIPlugin {
63460
63491
  getNextVisibleCellPosition({ sheetId, col, row }) {
63461
63492
  return {
63462
63493
  sheetId,
63463
- col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1),
63464
- row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1)
63494
+ col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1) || this.findVisibleHeader(sheetId, "COL", col, 0) || 0,
63495
+ row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1) || this.findVisibleHeader(sheetId, "ROW", row, 0) || 0
63465
63496
  };
63466
63497
  }
63467
63498
  /**
@@ -87603,6 +87634,7 @@ const helpers = {
87603
87634
  collapseHierarchicalDisplayName,
87604
87635
  getCanonicalSymbolName,
87605
87636
  fuzzyLookup,
87637
+ PositionMap,
87606
87638
  replaceSymbolInFormula
87607
87639
  };
87608
87640
  const links = {
@@ -87827,6 +87859,6 @@ exports.stores = stores;
87827
87859
  exports.tokenColors = tokenColors;
87828
87860
  exports.tokenize = tokenize;
87829
87861
 
87830
- __info__.version = "19.4.3";
87831
- __info__.date = "2026-07-20T11:02:36.941Z";
87832
- __info__.hash = "d32e61b";
87862
+ __info__.version = "19.4.4";
87863
+ __info__.date = "2026-07-23T07:49:22.265Z";
87864
+ __info__.hash = "6b3c312";
@@ -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 19.4.3
6
- * @date 2026-07-20T11:02:38.582Z
7
- * @hash d32e61b
5
+ * @version 19.4.4
6
+ * @date 2026-07-23T07:49:24.023Z
7
+ * @hash 6b3c312
8
8
  */
9
9
  :root {
10
10
  --os-gray-100: light-dark(#f9fafb, #1b1d26);
@@ -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 19.4.3
6
- * @date 2026-07-20T11:02:36.941Z
7
- * @hash d32e61b
5
+ * @version 19.4.4
6
+ * @date 2026-07-23T07:49:22.265Z
7
+ * @hash 6b3c312
8
8
  */
9
9
 
10
10
  import * as owl from "@odoo/owl";
@@ -45493,7 +45493,8 @@ var Autofill = class extends Component {
45493
45493
  const { x, y } = this.state.handler ? this.state.position : this.props.position;
45494
45494
  return cssPropertiesToCss({
45495
45495
  top: `${y}px`,
45496
- left: `${x}px`
45496
+ left: `${x}px`,
45497
+ visibility: this.props.isVisible ? "visible" : "hidden"
45497
45498
  });
45498
45499
  }
45499
45500
  get styleNextValue() {
@@ -45914,7 +45915,7 @@ var CellComposerStore = class extends AbstractComposerStore {
45914
45915
  this._cancelEdition();
45915
45916
  this.resetContent();
45916
45917
  }
45917
- if (cmd.sheetIdFrom !== cmd.sheetIdTo) {
45918
+ if (this.model.selection.isListening(this) && cmd.sheetIdFrom !== cmd.sheetIdTo) {
45918
45919
  const activePosition = this.getters.getActivePosition();
45919
45920
  const { col, row } = this.getters.getNextVisibleCellPosition({
45920
45921
  sheetId: cmd.sheetIdTo,
@@ -50085,6 +50086,10 @@ var Grid = class extends Component {
50085
50086
  get displaySelectionHandler() {
50086
50087
  return this.env.isMobile() && this.composerFocusStore.activeComposer.editionMode === "inactive";
50087
50088
  }
50089
+ get clientsToDisplay() {
50090
+ const sheetId = this.env.model.getters.getActiveSheetId();
50091
+ return this.env.model.getters.getClientsToDisplay(sheetId);
50092
+ }
50088
50093
  };
50089
50094
 
50090
50095
  //#endregion
@@ -59673,6 +59678,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59673
59678
  pivots = {};
59674
59679
  unusedPivotsInFormulas;
59675
59680
  custom;
59681
+ pivotPositionCache = new PositionMap();
59682
+ shouldInvalidateCache = false;
59676
59683
  constructor(config) {
59677
59684
  super(config);
59678
59685
  this.custom = config.custom;
@@ -59683,7 +59690,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59683
59690
  }
59684
59691
  }
59685
59692
  handle(cmd) {
59686
- if (invalidateEvaluationCommands.has(cmd.type)) for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
59693
+ if (invalidateEvaluationCommands.has(cmd.type)) {
59694
+ this.shouldInvalidateCache = true;
59695
+ for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
59696
+ }
59697
+ if (cmd.type === "UPDATE_CELL") this.shouldInvalidateCache = true;
59687
59698
  switch (cmd.type) {
59688
59699
  case "REFRESH_PIVOT":
59689
59700
  this.refreshPivot(cmd.id);
@@ -59723,6 +59734,12 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59723
59734
  break;
59724
59735
  }
59725
59736
  }
59737
+ finalize() {
59738
+ if (this.shouldInvalidateCache) {
59739
+ this.pivotPositionCache = new PositionMap();
59740
+ this.shouldInvalidateCache = false;
59741
+ }
59742
+ }
59726
59743
  /**
59727
59744
  * Get the id of the first pivot in the formula at the given position. Returns undefined if there
59728
59745
  * is no pivot at this position
@@ -59734,9 +59751,14 @@ var PivotUIPlugin = class extends CoreViewPlugin {
59734
59751
  * Get all of the ids of the pivot present in the formula at the given position.
59735
59752
  */
59736
59753
  getPivotIdsFromPosition(position) {
59737
- const cell = this.getters.getCorrespondingFormulaCell(position);
59738
- if (cell && cell.isFormula) return this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
59739
- return [];
59754
+ if (!this.pivotPositionCache.has(position)) {
59755
+ const cell = this.getters.getCorrespondingFormulaCell(position);
59756
+ if (cell && cell.isFormula) {
59757
+ const pivotIds = this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
59758
+ this.pivotPositionCache.set(position, pivotIds);
59759
+ }
59760
+ }
59761
+ return this.pivotPositionCache.get(position) || [];
59740
59762
  }
59741
59763
  getPivotIdsFromFormula(sheetId, formula) {
59742
59764
  return this.getPivotFunctions(sheetId, formula).map((pivotFunction) => {
@@ -61101,12 +61123,22 @@ var TableComputedStylePlugin = class extends UIPlugin {
61101
61123
  getCellTableStyle(position) {
61102
61124
  const table = this.getters.getTable(position);
61103
61125
  if (!table) return;
61104
- return this.tableStyles[position.sheetId][table.id]().styles[position.col]?.[position.row];
61126
+ try {
61127
+ return this.tableStyles[position.sheetId][table.id]().styles[position.col]?.[position.row];
61128
+ } catch (e) {
61129
+ if (isEvaluationError(e) || e instanceof EvaluationError) return;
61130
+ throw e;
61131
+ }
61105
61132
  }
61106
61133
  getCellTableBorder(position) {
61107
61134
  const table = this.getters.getTable(position);
61108
61135
  if (!table) return;
61109
- return this.tableStyles[position.sheetId][table.id]().borders[position.col]?.[position.row];
61136
+ try {
61137
+ return this.tableStyles[position.sheetId][table.id]().borders[position.col]?.[position.row];
61138
+ } catch (e) {
61139
+ if (isEvaluationError(e) || e instanceof EvaluationError) return;
61140
+ throw e;
61141
+ }
61110
61142
  }
61111
61143
  computeTableStyle(sheetId, table) {
61112
61144
  return lazy(() => {
@@ -62449,14 +62481,13 @@ var CollaborativePlugin = class extends UIPlugin {
62449
62481
  * Get the list of others connected clients which are present in the same sheet
62450
62482
  * and with a valid position
62451
62483
  */
62452
- getClientsToDisplay() {
62484
+ getClientsToDisplay(sheetId) {
62453
62485
  try {
62454
62486
  this.getters.getCurrentClient();
62455
62487
  } catch (e) {
62456
62488
  if (e instanceof ClientDisconnectedError) return [];
62457
62489
  else throw e;
62458
62490
  }
62459
- const sheetId = this.getters.getActiveSheetId();
62460
62491
  const clients = [];
62461
62492
  for (const client of this.getters.getConnectedClients()) if (client.id !== this.getters.getCurrentClient().id && client.position && client.position.sheetId === sheetId && this.isPositionValid(client.position)) clients.push({
62462
62493
  ...client,
@@ -62467,7 +62498,7 @@ var CollaborativePlugin = class extends UIPlugin {
62467
62498
  drawLayer(renderingContext) {
62468
62499
  if (this.getters.isDashboard()) return;
62469
62500
  const { ctx, thinLineWidth, viewports, sheetId } = renderingContext;
62470
- for (const client of this.getClientsToDisplay()) {
62501
+ for (const client of this.getClientsToDisplay(sheetId)) {
62471
62502
  const { row, col } = client.position;
62472
62503
  const zone = this.getters.expandZone(sheetId, {
62473
62504
  top: row,
@@ -63275,8 +63306,8 @@ var HeaderVisibilityUIPlugin = class extends UIPlugin {
63275
63306
  getNextVisibleCellPosition({ sheetId, col, row }) {
63276
63307
  return {
63277
63308
  sheetId,
63278
- col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1),
63279
- row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1)
63309
+ col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1) || this.findVisibleHeader(sheetId, "COL", col, 0) || 0,
63310
+ row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1) || this.findVisibleHeader(sheetId, "ROW", row, 0) || 0
63280
63311
  };
63281
63312
  }
63282
63313
  /**
@@ -87418,6 +87449,7 @@ const helpers = {
87418
87449
  collapseHierarchicalDisplayName,
87419
87450
  getCanonicalSymbolName,
87420
87451
  fuzzyLookup,
87452
+ PositionMap,
87421
87453
  replaceSymbolInFormula
87422
87454
  };
87423
87455
  const links = {
@@ -87548,6 +87580,6 @@ const chartHelpers = {
87548
87580
  //#endregion
87549
87581
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, BadExpressionError, CHART_TYPES, CellErrorType, CellValueType, CircularDependencyError, ClientDisconnectedError, ClipboardMIMEType, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DEFAULT_LOCALE_DIGIT_GROUPING, DIRECTION, DispatchResult, DivisionByZeroError, EvaluationError, InvalidReferenceError, LocalTransportService, Model, NEXT_VALUE, NotAvailableError, NumberTooLargeError, OrderedLayers, PREVIOUS_VALUE, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, SplillBlockedError, Spreadsheet, SpreadsheetPivotTable, UIPlugin, UnknownFunctionError, __info__, addFunction, addRenderingLayer, astToFormula, availableConditionalFormatOperators, availableDataValidationOperators, availableFiltersOperators, borderPositions, borderStyles, canExecuteInReadonly, categories, chartHelpers, compatibility, components, composerFocusTypes, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, errorTypes, filterDateCriterionOperators, filterNumberCriterionOperators, filterTextCriterionOperators, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidSubtotalFormulasCommands, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, schemeToColorScale, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
87550
87582
 
87551
- __info__.version = "19.4.3";
87552
- __info__.date = "2026-07-20T11:02:36.941Z";
87553
- __info__.hash = "d32e61b";
87583
+ __info__.version = "19.4.4";
87584
+ __info__.date = "2026-07-23T07:49:22.265Z";
87585
+ __info__.hash = "6b3c312";
@@ -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 19.4.3
6
- * @date 2026-07-20T11:02:36.941Z
7
- * @hash d32e61b
5
+ * @version 19.4.4
6
+ * @date 2026-07-23T07:49:22.265Z
7
+ * @hash 6b3c312
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -45495,7 +45495,8 @@ set(value) {
45495
45495
  const { x, y } = this.state.handler ? this.state.position : this.props.position;
45496
45496
  return cssPropertiesToCss({
45497
45497
  top: `${y}px`,
45498
- left: `${x}px`
45498
+ left: `${x}px`,
45499
+ visibility: this.props.isVisible ? "visible" : "hidden"
45499
45500
  });
45500
45501
  }
45501
45502
  get styleNextValue() {
@@ -45916,7 +45917,7 @@ set(value) {
45916
45917
  this._cancelEdition();
45917
45918
  this.resetContent();
45918
45919
  }
45919
- if (cmd.sheetIdFrom !== cmd.sheetIdTo) {
45920
+ if (this.model.selection.isListening(this) && cmd.sheetIdFrom !== cmd.sheetIdTo) {
45920
45921
  const activePosition = this.getters.getActivePosition();
45921
45922
  const { col, row } = this.getters.getNextVisibleCellPosition({
45922
45923
  sheetId: cmd.sheetIdTo,
@@ -50087,6 +50088,10 @@ set(value) {
50087
50088
  get displaySelectionHandler() {
50088
50089
  return this.env.isMobile() && this.composerFocusStore.activeComposer.editionMode === "inactive";
50089
50090
  }
50091
+ get clientsToDisplay() {
50092
+ const sheetId = this.env.model.getters.getActiveSheetId();
50093
+ return this.env.model.getters.getClientsToDisplay(sheetId);
50094
+ }
50090
50095
  };
50091
50096
 
50092
50097
  //#endregion
@@ -59675,6 +59680,8 @@ set(value) {
59675
59680
  pivots = {};
59676
59681
  unusedPivotsInFormulas;
59677
59682
  custom;
59683
+ pivotPositionCache = new PositionMap();
59684
+ shouldInvalidateCache = false;
59678
59685
  constructor(config) {
59679
59686
  super(config);
59680
59687
  this.custom = config.custom;
@@ -59685,7 +59692,11 @@ set(value) {
59685
59692
  }
59686
59693
  }
59687
59694
  handle(cmd) {
59688
- if (invalidateEvaluationCommands.has(cmd.type)) for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
59695
+ if (invalidateEvaluationCommands.has(cmd.type)) {
59696
+ this.shouldInvalidateCache = true;
59697
+ for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
59698
+ }
59699
+ if (cmd.type === "UPDATE_CELL") this.shouldInvalidateCache = true;
59689
59700
  switch (cmd.type) {
59690
59701
  case "REFRESH_PIVOT":
59691
59702
  this.refreshPivot(cmd.id);
@@ -59725,6 +59736,12 @@ set(value) {
59725
59736
  break;
59726
59737
  }
59727
59738
  }
59739
+ finalize() {
59740
+ if (this.shouldInvalidateCache) {
59741
+ this.pivotPositionCache = new PositionMap();
59742
+ this.shouldInvalidateCache = false;
59743
+ }
59744
+ }
59728
59745
  /**
59729
59746
  * Get the id of the first pivot in the formula at the given position. Returns undefined if there
59730
59747
  * is no pivot at this position
@@ -59736,9 +59753,14 @@ set(value) {
59736
59753
  * Get all of the ids of the pivot present in the formula at the given position.
59737
59754
  */
59738
59755
  getPivotIdsFromPosition(position) {
59739
- const cell = this.getters.getCorrespondingFormulaCell(position);
59740
- if (cell && cell.isFormula) return this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
59741
- return [];
59756
+ if (!this.pivotPositionCache.has(position)) {
59757
+ const cell = this.getters.getCorrespondingFormulaCell(position);
59758
+ if (cell && cell.isFormula) {
59759
+ const pivotIds = this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
59760
+ this.pivotPositionCache.set(position, pivotIds);
59761
+ }
59762
+ }
59763
+ return this.pivotPositionCache.get(position) || [];
59742
59764
  }
59743
59765
  getPivotIdsFromFormula(sheetId, formula) {
59744
59766
  return this.getPivotFunctions(sheetId, formula).map((pivotFunction) => {
@@ -61103,12 +61125,22 @@ set(value) {
61103
61125
  getCellTableStyle(position) {
61104
61126
  const table = this.getters.getTable(position);
61105
61127
  if (!table) return;
61106
- return this.tableStyles[position.sheetId][table.id]().styles[position.col]?.[position.row];
61128
+ try {
61129
+ return this.tableStyles[position.sheetId][table.id]().styles[position.col]?.[position.row];
61130
+ } catch (e) {
61131
+ if (isEvaluationError(e) || e instanceof EvaluationError) return;
61132
+ throw e;
61133
+ }
61107
61134
  }
61108
61135
  getCellTableBorder(position) {
61109
61136
  const table = this.getters.getTable(position);
61110
61137
  if (!table) return;
61111
- return this.tableStyles[position.sheetId][table.id]().borders[position.col]?.[position.row];
61138
+ try {
61139
+ return this.tableStyles[position.sheetId][table.id]().borders[position.col]?.[position.row];
61140
+ } catch (e) {
61141
+ if (isEvaluationError(e) || e instanceof EvaluationError) return;
61142
+ throw e;
61143
+ }
61112
61144
  }
61113
61145
  computeTableStyle(sheetId, table) {
61114
61146
  return lazy(() => {
@@ -62451,14 +62483,13 @@ set(value) {
62451
62483
  * Get the list of others connected clients which are present in the same sheet
62452
62484
  * and with a valid position
62453
62485
  */
62454
- getClientsToDisplay() {
62486
+ getClientsToDisplay(sheetId) {
62455
62487
  try {
62456
62488
  this.getters.getCurrentClient();
62457
62489
  } catch (e) {
62458
62490
  if (e instanceof ClientDisconnectedError) return [];
62459
62491
  else throw e;
62460
62492
  }
62461
- const sheetId = this.getters.getActiveSheetId();
62462
62493
  const clients = [];
62463
62494
  for (const client of this.getters.getConnectedClients()) if (client.id !== this.getters.getCurrentClient().id && client.position && client.position.sheetId === sheetId && this.isPositionValid(client.position)) clients.push({
62464
62495
  ...client,
@@ -62469,7 +62500,7 @@ set(value) {
62469
62500
  drawLayer(renderingContext) {
62470
62501
  if (this.getters.isDashboard()) return;
62471
62502
  const { ctx, thinLineWidth, viewports, sheetId } = renderingContext;
62472
- for (const client of this.getClientsToDisplay()) {
62503
+ for (const client of this.getClientsToDisplay(sheetId)) {
62473
62504
  const { row, col } = client.position;
62474
62505
  const zone = this.getters.expandZone(sheetId, {
62475
62506
  top: row,
@@ -63277,8 +63308,8 @@ set(value) {
63277
63308
  getNextVisibleCellPosition({ sheetId, col, row }) {
63278
63309
  return {
63279
63310
  sheetId,
63280
- col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1),
63281
- row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1)
63311
+ col: this.findVisibleHeader(sheetId, "COL", col, this.getters.getNumberCols(sheetId) - 1) || this.findVisibleHeader(sheetId, "COL", col, 0) || 0,
63312
+ row: this.findVisibleHeader(sheetId, "ROW", row, this.getters.getNumberRows(sheetId) - 1) || this.findVisibleHeader(sheetId, "ROW", row, 0) || 0
63282
63313
  };
63283
63314
  }
63284
63315
  /**
@@ -87420,6 +87451,7 @@ set(value) {
87420
87451
  collapseHierarchicalDisplayName,
87421
87452
  getCanonicalSymbolName,
87422
87453
  fuzzyLookup,
87454
+ PositionMap,
87423
87455
  replaceSymbolInFormula
87424
87456
  };
87425
87457
  const links = {
@@ -87644,8 +87676,8 @@ exports.stores = stores;
87644
87676
  exports.tokenColors = tokenColors;
87645
87677
  exports.tokenize = tokenize;
87646
87678
 
87647
- __info__.version = "19.4.3";
87648
- __info__.date = "2026-07-20T11:02:36.941Z";
87649
- __info__.hash = "d32e61b";
87679
+ __info__.version = "19.4.4";
87680
+ __info__.date = "2026-07-23T07:49:22.265Z";
87681
+ __info__.hash = "6b3c312";
87650
87682
 
87651
87683
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);