@odoo/o-spreadsheet 18.3.25 → 18.3.26

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.25
6
- * @date 2025-10-30T12:24:11.774Z
7
- * @hash def7778
5
+ * @version 18.3.26
6
+ * @date 2025-11-12T14:15:33.133Z
7
+ * @hash f31a752
8
8
  */
9
9
 
10
10
  'use strict';
@@ -6286,7 +6286,7 @@ function getRangeString(range, forSheetId, getSheetName, options = { useBoundedR
6286
6286
  let sheetName = "";
6287
6287
  if (prefixSheet) {
6288
6288
  if (range.invalidSheetName) {
6289
- sheetName = range.invalidSheetName;
6289
+ sheetName = getCanonicalSymbolName(range.invalidSheetName);
6290
6290
  }
6291
6291
  else {
6292
6292
  sheetName = getCanonicalSymbolName(getSheetName(range.sheetId));
@@ -17853,28 +17853,38 @@ function getTokenNextReferenceType(xc) {
17853
17853
  return xc;
17854
17854
  }
17855
17855
  /**
17856
- * Returns the given XC with the given reference type. The XC string should not contain a sheet name.
17856
+ * Returns the given XC with the given reference type.
17857
17857
  */
17858
17858
  function setXcToFixedReferenceType(xc, referenceType) {
17859
- if (xc.includes("!")) {
17860
- throw new Error("The given XC should not contain a sheet name");
17861
- }
17859
+ let sheetName;
17860
+ ({ sheetName, xc } = splitReference(xc));
17861
+ sheetName = sheetName ? sheetName + "!" : "";
17862
17862
  xc = xc.replace(/\$/g, "");
17863
- let indexOfNumber;
17863
+ const splitIndex = xc.indexOf(":");
17864
+ if (splitIndex >= 0) {
17865
+ return `${sheetName}${_setXcToFixedReferenceType(xc.slice(0, splitIndex), referenceType)}:${_setXcToFixedReferenceType(xc.slice(splitIndex + 1), referenceType)}`;
17866
+ }
17867
+ else {
17868
+ return sheetName + _setXcToFixedReferenceType(xc, referenceType);
17869
+ }
17870
+ }
17871
+ function _setXcToFixedReferenceType(xc, referenceType) {
17872
+ const indexOfNumber = xc.search(/[0-9]/);
17873
+ const hasCol = indexOfNumber !== 0;
17874
+ const hasRow = indexOfNumber >= 0;
17864
17875
  switch (referenceType) {
17865
17876
  case "col":
17877
+ if (!hasCol)
17878
+ return xc;
17866
17879
  return "$" + xc;
17867
17880
  case "row":
17868
- indexOfNumber = xc.search(/[0-9]/);
17881
+ if (!hasRow)
17882
+ return xc;
17869
17883
  return xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
17870
17884
  case "colrow":
17871
- indexOfNumber = xc.search(/[0-9]/);
17872
- if (indexOfNumber === -1 || indexOfNumber === 0) {
17873
- // no row number (eg. A) or no column (eg. 1)
17885
+ if (!hasRow || !hasCol)
17874
17886
  return "$" + xc;
17875
- }
17876
- xc = xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
17877
- return "$" + xc;
17887
+ return "$" + xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
17878
17888
  case "none":
17879
17889
  return xc;
17880
17890
  }
@@ -22227,7 +22237,7 @@ let ScorecardChart$1 = class ScorecardChart extends AbstractChart {
22227
22237
  return {
22228
22238
  background: context.background,
22229
22239
  type: "scorecard",
22230
- keyValue: context.range ? context.range[0].dataRange : undefined,
22240
+ keyValue: context.range?.[0]?.dataRange,
22231
22241
  title: context.title || { text: "" },
22232
22242
  baselineMode: DEFAULT_SCORECARD_BASELINE_MODE,
22233
22243
  baselineColorUp: DEFAULT_SCORECARD_BASELINE_COLOR_UP,
@@ -22947,6 +22957,7 @@ class AbstractComposerStore extends SpreadsheetStore {
22947
22957
  this.highlightStore.register(this);
22948
22958
  this.onDispose(() => {
22949
22959
  this.highlightStore.unRegister(this);
22960
+ this._cancelEdition();
22950
22961
  });
22951
22962
  }
22952
22963
  handleEvent(event) {
@@ -27578,7 +27589,7 @@ class GaugeChart extends AbstractChart {
27578
27589
  background: context.background,
27579
27590
  title: context.title || { text: "" },
27580
27591
  type: "gauge",
27581
- dataRange: context.range ? context.range[0].dataRange : undefined,
27592
+ dataRange: context.range?.[0]?.dataRange,
27582
27593
  sectionRule: {
27583
27594
  colors: {
27584
27595
  lowerColor: DEFAULT_GAUGE_LOWER_COLOR,
@@ -46970,6 +46981,7 @@ class DataValidationInput extends owl.Component {
46970
46981
  placeholder: this.placeholder,
46971
46982
  class: "o-sidePanel-composer",
46972
46983
  defaultRangeSheetId: this.env.model.getters.getActiveSheetId(),
46984
+ defaultStatic: true,
46973
46985
  };
46974
46986
  }
46975
46987
  get errorMessage() {
@@ -81057,6 +81069,6 @@ exports.tokenColors = tokenColors;
81057
81069
  exports.tokenize = tokenize;
81058
81070
 
81059
81071
 
81060
- __info__.version = "18.3.25";
81061
- __info__.date = "2025-10-30T12:24:11.774Z";
81062
- __info__.hash = "def7778";
81072
+ __info__.version = "18.3.26";
81073
+ __info__.date = "2025-11-12T14:15:33.133Z";
81074
+ __info__.hash = "f31a752";
@@ -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.25
6
- * @date 2025-10-30T12:24:11.774Z
7
- * @hash def7778
5
+ * @version 18.3.26
6
+ * @date 2025-11-12T14:15:33.133Z
7
+ * @hash f31a752
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';
@@ -6284,7 +6284,7 @@ function getRangeString(range, forSheetId, getSheetName, options = { useBoundedR
6284
6284
  let sheetName = "";
6285
6285
  if (prefixSheet) {
6286
6286
  if (range.invalidSheetName) {
6287
- sheetName = range.invalidSheetName;
6287
+ sheetName = getCanonicalSymbolName(range.invalidSheetName);
6288
6288
  }
6289
6289
  else {
6290
6290
  sheetName = getCanonicalSymbolName(getSheetName(range.sheetId));
@@ -17851,28 +17851,38 @@ function getTokenNextReferenceType(xc) {
17851
17851
  return xc;
17852
17852
  }
17853
17853
  /**
17854
- * Returns the given XC with the given reference type. The XC string should not contain a sheet name.
17854
+ * Returns the given XC with the given reference type.
17855
17855
  */
17856
17856
  function setXcToFixedReferenceType(xc, referenceType) {
17857
- if (xc.includes("!")) {
17858
- throw new Error("The given XC should not contain a sheet name");
17859
- }
17857
+ let sheetName;
17858
+ ({ sheetName, xc } = splitReference(xc));
17859
+ sheetName = sheetName ? sheetName + "!" : "";
17860
17860
  xc = xc.replace(/\$/g, "");
17861
- let indexOfNumber;
17861
+ const splitIndex = xc.indexOf(":");
17862
+ if (splitIndex >= 0) {
17863
+ return `${sheetName}${_setXcToFixedReferenceType(xc.slice(0, splitIndex), referenceType)}:${_setXcToFixedReferenceType(xc.slice(splitIndex + 1), referenceType)}`;
17864
+ }
17865
+ else {
17866
+ return sheetName + _setXcToFixedReferenceType(xc, referenceType);
17867
+ }
17868
+ }
17869
+ function _setXcToFixedReferenceType(xc, referenceType) {
17870
+ const indexOfNumber = xc.search(/[0-9]/);
17871
+ const hasCol = indexOfNumber !== 0;
17872
+ const hasRow = indexOfNumber >= 0;
17862
17873
  switch (referenceType) {
17863
17874
  case "col":
17875
+ if (!hasCol)
17876
+ return xc;
17864
17877
  return "$" + xc;
17865
17878
  case "row":
17866
- indexOfNumber = xc.search(/[0-9]/);
17879
+ if (!hasRow)
17880
+ return xc;
17867
17881
  return xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
17868
17882
  case "colrow":
17869
- indexOfNumber = xc.search(/[0-9]/);
17870
- if (indexOfNumber === -1 || indexOfNumber === 0) {
17871
- // no row number (eg. A) or no column (eg. 1)
17883
+ if (!hasRow || !hasCol)
17872
17884
  return "$" + xc;
17873
- }
17874
- xc = xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
17875
- return "$" + xc;
17885
+ return "$" + xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
17876
17886
  case "none":
17877
17887
  return xc;
17878
17888
  }
@@ -22225,7 +22235,7 @@ let ScorecardChart$1 = class ScorecardChart extends AbstractChart {
22225
22235
  return {
22226
22236
  background: context.background,
22227
22237
  type: "scorecard",
22228
- keyValue: context.range ? context.range[0].dataRange : undefined,
22238
+ keyValue: context.range?.[0]?.dataRange,
22229
22239
  title: context.title || { text: "" },
22230
22240
  baselineMode: DEFAULT_SCORECARD_BASELINE_MODE,
22231
22241
  baselineColorUp: DEFAULT_SCORECARD_BASELINE_COLOR_UP,
@@ -22945,6 +22955,7 @@ class AbstractComposerStore extends SpreadsheetStore {
22945
22955
  this.highlightStore.register(this);
22946
22956
  this.onDispose(() => {
22947
22957
  this.highlightStore.unRegister(this);
22958
+ this._cancelEdition();
22948
22959
  });
22949
22960
  }
22950
22961
  handleEvent(event) {
@@ -27576,7 +27587,7 @@ class GaugeChart extends AbstractChart {
27576
27587
  background: context.background,
27577
27588
  title: context.title || { text: "" },
27578
27589
  type: "gauge",
27579
- dataRange: context.range ? context.range[0].dataRange : undefined,
27590
+ dataRange: context.range?.[0]?.dataRange,
27580
27591
  sectionRule: {
27581
27592
  colors: {
27582
27593
  lowerColor: DEFAULT_GAUGE_LOWER_COLOR,
@@ -46968,6 +46979,7 @@ class DataValidationInput extends Component {
46968
46979
  placeholder: this.placeholder,
46969
46980
  class: "o-sidePanel-composer",
46970
46981
  defaultRangeSheetId: this.env.model.getters.getActiveSheetId(),
46982
+ defaultStatic: true,
46971
46983
  };
46972
46984
  }
46973
46985
  get errorMessage() {
@@ -81009,6 +81021,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
81009
81021
  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 };
81010
81022
 
81011
81023
 
81012
- __info__.version = "18.3.25";
81013
- __info__.date = "2025-10-30T12:24:11.774Z";
81014
- __info__.hash = "def7778";
81024
+ __info__.version = "18.3.26";
81025
+ __info__.date = "2025-11-12T14:15:33.133Z";
81026
+ __info__.hash = "f31a752";
@@ -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.25
6
- * @date 2025-10-30T12:24:11.774Z
7
- * @hash def7778
5
+ * @version 18.3.26
6
+ * @date 2025-11-12T14:15:33.133Z
7
+ * @hash f31a752
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -6285,7 +6285,7 @@
6285
6285
  let sheetName = "";
6286
6286
  if (prefixSheet) {
6287
6287
  if (range.invalidSheetName) {
6288
- sheetName = range.invalidSheetName;
6288
+ sheetName = getCanonicalSymbolName(range.invalidSheetName);
6289
6289
  }
6290
6290
  else {
6291
6291
  sheetName = getCanonicalSymbolName(getSheetName(range.sheetId));
@@ -17852,28 +17852,38 @@ stores.inject(MyMetaStore, storeInstance);
17852
17852
  return xc;
17853
17853
  }
17854
17854
  /**
17855
- * Returns the given XC with the given reference type. The XC string should not contain a sheet name.
17855
+ * Returns the given XC with the given reference type.
17856
17856
  */
17857
17857
  function setXcToFixedReferenceType(xc, referenceType) {
17858
- if (xc.includes("!")) {
17859
- throw new Error("The given XC should not contain a sheet name");
17860
- }
17858
+ let sheetName;
17859
+ ({ sheetName, xc } = splitReference(xc));
17860
+ sheetName = sheetName ? sheetName + "!" : "";
17861
17861
  xc = xc.replace(/\$/g, "");
17862
- let indexOfNumber;
17862
+ const splitIndex = xc.indexOf(":");
17863
+ if (splitIndex >= 0) {
17864
+ return `${sheetName}${_setXcToFixedReferenceType(xc.slice(0, splitIndex), referenceType)}:${_setXcToFixedReferenceType(xc.slice(splitIndex + 1), referenceType)}`;
17865
+ }
17866
+ else {
17867
+ return sheetName + _setXcToFixedReferenceType(xc, referenceType);
17868
+ }
17869
+ }
17870
+ function _setXcToFixedReferenceType(xc, referenceType) {
17871
+ const indexOfNumber = xc.search(/[0-9]/);
17872
+ const hasCol = indexOfNumber !== 0;
17873
+ const hasRow = indexOfNumber >= 0;
17863
17874
  switch (referenceType) {
17864
17875
  case "col":
17876
+ if (!hasCol)
17877
+ return xc;
17865
17878
  return "$" + xc;
17866
17879
  case "row":
17867
- indexOfNumber = xc.search(/[0-9]/);
17880
+ if (!hasRow)
17881
+ return xc;
17868
17882
  return xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
17869
17883
  case "colrow":
17870
- indexOfNumber = xc.search(/[0-9]/);
17871
- if (indexOfNumber === -1 || indexOfNumber === 0) {
17872
- // no row number (eg. A) or no column (eg. 1)
17884
+ if (!hasRow || !hasCol)
17873
17885
  return "$" + xc;
17874
- }
17875
- xc = xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
17876
- return "$" + xc;
17886
+ return "$" + xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
17877
17887
  case "none":
17878
17888
  return xc;
17879
17889
  }
@@ -22226,7 +22236,7 @@ stores.inject(MyMetaStore, storeInstance);
22226
22236
  return {
22227
22237
  background: context.background,
22228
22238
  type: "scorecard",
22229
- keyValue: context.range ? context.range[0].dataRange : undefined,
22239
+ keyValue: context.range?.[0]?.dataRange,
22230
22240
  title: context.title || { text: "" },
22231
22241
  baselineMode: DEFAULT_SCORECARD_BASELINE_MODE,
22232
22242
  baselineColorUp: DEFAULT_SCORECARD_BASELINE_COLOR_UP,
@@ -22946,6 +22956,7 @@ stores.inject(MyMetaStore, storeInstance);
22946
22956
  this.highlightStore.register(this);
22947
22957
  this.onDispose(() => {
22948
22958
  this.highlightStore.unRegister(this);
22959
+ this._cancelEdition();
22949
22960
  });
22950
22961
  }
22951
22962
  handleEvent(event) {
@@ -27577,7 +27588,7 @@ stores.inject(MyMetaStore, storeInstance);
27577
27588
  background: context.background,
27578
27589
  title: context.title || { text: "" },
27579
27590
  type: "gauge",
27580
- dataRange: context.range ? context.range[0].dataRange : undefined,
27591
+ dataRange: context.range?.[0]?.dataRange,
27581
27592
  sectionRule: {
27582
27593
  colors: {
27583
27594
  lowerColor: DEFAULT_GAUGE_LOWER_COLOR,
@@ -46969,6 +46980,7 @@ stores.inject(MyMetaStore, storeInstance);
46969
46980
  placeholder: this.placeholder,
46970
46981
  class: "o-sidePanel-composer",
46971
46982
  defaultRangeSheetId: this.env.model.getters.getActiveSheetId(),
46983
+ defaultStatic: true,
46972
46984
  };
46973
46985
  }
46974
46986
  get errorMessage() {
@@ -81056,9 +81068,9 @@ stores.inject(MyMetaStore, storeInstance);
81056
81068
  exports.tokenize = tokenize;
81057
81069
 
81058
81070
 
81059
- __info__.version = "18.3.25";
81060
- __info__.date = "2025-10-30T12:24:11.774Z";
81061
- __info__.hash = "def7778";
81071
+ __info__.version = "18.3.26";
81072
+ __info__.date = "2025-11-12T14:15:33.133Z";
81073
+ __info__.hash = "f31a752";
81062
81074
 
81063
81075
 
81064
81076
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);