@odoo/o-spreadsheet 19.1.27 → 19.1.28

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.1.27
6
- * @date 2026-07-13T06:25:27.934Z
7
- * @hash 6eb95de
5
+ * @version 19.1.28
6
+ * @date 2026-07-20T11:03:22.820Z
7
+ * @hash 704eb0e
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.1.27
6
- * @date 2026-07-13T06:25:26.922Z
7
- * @hash 6eb95de
5
+ * @version 19.1.28
6
+ * @date 2026-07-20T11:03:20.589Z
7
+ * @hash 704eb0e
8
8
  */
9
9
 
10
10
  import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, whenReady, xml } from "@odoo/owl";
@@ -47072,7 +47072,7 @@ var ScorecardChartConfigPanel = class extends Component {
47072
47072
  return !!this.state.keyValueDispatchResult?.isCancelledBecause("InvalidScorecardKeyValue");
47073
47073
  }
47074
47074
  get isBaselineInvalid() {
47075
- return !!this.state.keyValueDispatchResult?.isCancelledBecause("InvalidScorecardBaseline");
47075
+ return !!this.state.baselineDispatchResult?.isCancelledBecause("InvalidScorecardBaseline");
47076
47076
  }
47077
47077
  onKeyValueRangeChanged(ranges) {
47078
47078
  this.keyValue = ranges[0];
@@ -61242,6 +61242,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
61242
61242
  pivots = {};
61243
61243
  unusedPivotsInFormulas;
61244
61244
  custom;
61245
+ pivotPositionCache = new PositionMap();
61246
+ shouldInvalidateCache = false;
61245
61247
  constructor(config) {
61246
61248
  super(config);
61247
61249
  this.custom = config.custom;
@@ -61252,7 +61254,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
61252
61254
  }
61253
61255
  }
61254
61256
  handle(cmd) {
61255
- if (invalidateEvaluationCommands.has(cmd.type)) for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
61257
+ if (invalidateEvaluationCommands.has(cmd.type)) {
61258
+ this.shouldInvalidateCache = true;
61259
+ for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
61260
+ }
61261
+ if (cmd.type === "UPDATE_CELL") this.shouldInvalidateCache = true;
61256
61262
  switch (cmd.type) {
61257
61263
  case "REFRESH_PIVOT":
61258
61264
  this.refreshPivot(cmd.id);
@@ -61292,6 +61298,12 @@ var PivotUIPlugin = class extends CoreViewPlugin {
61292
61298
  break;
61293
61299
  }
61294
61300
  }
61301
+ finalize() {
61302
+ if (this.shouldInvalidateCache) {
61303
+ this.pivotPositionCache = new PositionMap();
61304
+ this.shouldInvalidateCache = false;
61305
+ }
61306
+ }
61295
61307
  /**
61296
61308
  * Get the id of the first pivot in the formula at the given position. Returns undefined if there
61297
61309
  * is no pivot at this position
@@ -61303,9 +61315,14 @@ var PivotUIPlugin = class extends CoreViewPlugin {
61303
61315
  * Get all of the ids of the pivot present in the formula at the given position.
61304
61316
  */
61305
61317
  getPivotIdsFromPosition(position) {
61306
- const cell = this.getters.getCorrespondingFormulaCell(position);
61307
- if (cell && cell.isFormula) return this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
61308
- return [];
61318
+ if (!this.pivotPositionCache.has(position)) {
61319
+ const cell = this.getters.getCorrespondingFormulaCell(position);
61320
+ if (cell && cell.isFormula) {
61321
+ const pivotIds = this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
61322
+ this.pivotPositionCache.set(position, pivotIds);
61323
+ }
61324
+ }
61325
+ return this.pivotPositionCache.get(position) || [];
61309
61326
  }
61310
61327
  getPivotIdsFromFormula(sheetId, formula) {
61311
61328
  return this.getPivotFunctions(sheetId, formula.tokens).map((pivotFunction) => {
@@ -78981,7 +78998,8 @@ const helpers = {
78981
78998
  numberToJsDate,
78982
78999
  DateTime,
78983
79000
  parseFormat,
78984
- isFormula
79001
+ isFormula,
79002
+ PositionMap
78985
79003
  };
78986
79004
  const links = {
78987
79005
  isMarkdownLink,
@@ -79099,6 +79117,6 @@ const chartHelpers = {
79099
79117
  //#endregion
79100
79118
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, categories, chartHelpers, components, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
79101
79119
 
79102
- __info__.version = "19.1.27";
79103
- __info__.date = "2026-07-13T06:25:26.922Z";
79104
- __info__.hash = "6eb95de";
79120
+ __info__.version = "19.1.28";
79121
+ __info__.date = "2026-07-20T11:03:20.589Z";
79122
+ __info__.hash = "704eb0e";
@@ -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.1.27
6
- * @date 2026-07-13T06:25:26.922Z
7
- * @hash 6eb95de
5
+ * @version 19.1.28
6
+ * @date 2026-07-20T11:03:20.589Z
7
+ * @hash 704eb0e
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -47074,7 +47074,7 @@ stores.inject(MyMetaStore, storeInstance);
47074
47074
  return !!this.state.keyValueDispatchResult?.isCancelledBecause("InvalidScorecardKeyValue");
47075
47075
  }
47076
47076
  get isBaselineInvalid() {
47077
- return !!this.state.keyValueDispatchResult?.isCancelledBecause("InvalidScorecardBaseline");
47077
+ return !!this.state.baselineDispatchResult?.isCancelledBecause("InvalidScorecardBaseline");
47078
47078
  }
47079
47079
  onKeyValueRangeChanged(ranges) {
47080
47080
  this.keyValue = ranges[0];
@@ -61244,6 +61244,8 @@ stores.inject(MyMetaStore, storeInstance);
61244
61244
  pivots = {};
61245
61245
  unusedPivotsInFormulas;
61246
61246
  custom;
61247
+ pivotPositionCache = new PositionMap();
61248
+ shouldInvalidateCache = false;
61247
61249
  constructor(config) {
61248
61250
  super(config);
61249
61251
  this.custom = config.custom;
@@ -61254,7 +61256,11 @@ stores.inject(MyMetaStore, storeInstance);
61254
61256
  }
61255
61257
  }
61256
61258
  handle(cmd) {
61257
- if (invalidateEvaluationCommands.has(cmd.type)) for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
61259
+ if (invalidateEvaluationCommands.has(cmd.type)) {
61260
+ this.shouldInvalidateCache = true;
61261
+ for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
61262
+ }
61263
+ if (cmd.type === "UPDATE_CELL") this.shouldInvalidateCache = true;
61258
61264
  switch (cmd.type) {
61259
61265
  case "REFRESH_PIVOT":
61260
61266
  this.refreshPivot(cmd.id);
@@ -61294,6 +61300,12 @@ stores.inject(MyMetaStore, storeInstance);
61294
61300
  break;
61295
61301
  }
61296
61302
  }
61303
+ finalize() {
61304
+ if (this.shouldInvalidateCache) {
61305
+ this.pivotPositionCache = new PositionMap();
61306
+ this.shouldInvalidateCache = false;
61307
+ }
61308
+ }
61297
61309
  /**
61298
61310
  * Get the id of the first pivot in the formula at the given position. Returns undefined if there
61299
61311
  * is no pivot at this position
@@ -61305,9 +61317,14 @@ stores.inject(MyMetaStore, storeInstance);
61305
61317
  * Get all of the ids of the pivot present in the formula at the given position.
61306
61318
  */
61307
61319
  getPivotIdsFromPosition(position) {
61308
- const cell = this.getters.getCorrespondingFormulaCell(position);
61309
- if (cell && cell.isFormula) return this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
61310
- return [];
61320
+ if (!this.pivotPositionCache.has(position)) {
61321
+ const cell = this.getters.getCorrespondingFormulaCell(position);
61322
+ if (cell && cell.isFormula) {
61323
+ const pivotIds = this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
61324
+ this.pivotPositionCache.set(position, pivotIds);
61325
+ }
61326
+ }
61327
+ return this.pivotPositionCache.get(position) || [];
61311
61328
  }
61312
61329
  getPivotIdsFromFormula(sheetId, formula) {
61313
61330
  return this.getPivotFunctions(sheetId, formula.tokens).map((pivotFunction) => {
@@ -78983,7 +79000,8 @@ stores.inject(MyMetaStore, storeInstance);
78983
79000
  numberToJsDate,
78984
79001
  DateTime,
78985
79002
  parseFormat,
78986
- isFormula
79003
+ isFormula,
79004
+ PositionMap
78987
79005
  };
78988
79006
  const links = {
78989
79007
  isMarkdownLink,
@@ -79154,8 +79172,8 @@ exports.stores = stores;
79154
79172
  exports.tokenColors = tokenColors;
79155
79173
  exports.tokenize = tokenize;
79156
79174
 
79157
- __info__.version = "19.1.27";
79158
- __info__.date = "2026-07-13T06:25:26.922Z";
79159
- __info__.hash = "6eb95de";
79175
+ __info__.version = "19.1.28";
79176
+ __info__.date = "2026-07-20T11:03:20.589Z";
79177
+ __info__.hash = "704eb0e";
79160
79178
 
79161
79179
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);