@odoo/o-spreadsheet 18.2.31 → 18.2.32

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.2.31
6
- * @date 2025-09-23T12:31:15.573Z
7
- * @hash 839667e
5
+ * @version 18.2.32
6
+ * @date 2025-10-07T09:59:52.165Z
7
+ * @hash a42c448
8
8
  */
9
9
 
10
10
  'use strict';
@@ -875,9 +875,7 @@ function removeIndexesFromArray(array, indexes) {
875
875
  return newArray;
876
876
  }
877
877
  function insertItemsAtIndex(array, items, index) {
878
- const newArray = [...array];
879
- newArray.splice(index, 0, ...items);
880
- return newArray;
878
+ return array.slice(0, index).concat(items).concat(array.slice(index));
881
879
  }
882
880
  function replaceItemAtIndex(array, newItem, index) {
883
881
  const newArray = [...array];
@@ -5118,7 +5116,7 @@ function tokensToTextInternalFormat(tokens) {
5118
5116
  * Replace in place tokens "mm" and "m" that denote minutes in date format with "MM" to avoid confusion with months.
5119
5117
  *
5120
5118
  * As per OpenXML specification, in date formats if a date token "m" or "mm" is followed by a date token "s" or
5121
- * preceded by a data token "h", then it's not a month but an minute.
5119
+ * preceded by a data token "h", then it's not a month but a minute.
5122
5120
  */
5123
5121
  function convertTokensToMinutesInDateFormat(tokens) {
5124
5122
  const dateParts = tokens.filter((token) => token.type === "DATE_PART");
@@ -5161,6 +5159,9 @@ function internalFormatPartToFormat(internalFormat) {
5161
5159
  case "REPEATED_CHAR":
5162
5160
  format += "*" + token.value;
5163
5161
  break;
5162
+ case "DATE_PART":
5163
+ format += token.value === "MM" ? "mm" : token.value; // Convert "MM" back to "mm" for minutes
5164
+ break;
5164
5165
  default:
5165
5166
  format += token.value;
5166
5167
  }
@@ -45886,7 +45887,7 @@ class PivotMeasureEditor extends owl.Component {
45886
45887
  return undefined;
45887
45888
  }
45888
45889
  get isCalculatedMeasureInvalid() {
45889
- return this.env.model.getters.getMeasureCompiledFormula(this.props.measure).isBadExpression;
45890
+ return compile(this.props.measure.computedBy?.formula ?? "").isBadExpression;
45890
45891
  }
45891
45892
  }
45892
45893
 
@@ -56624,7 +56625,7 @@ class HeaderSizePlugin extends CorePlugin {
56624
56625
  let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
56625
56626
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
56626
56627
  const baseSize = sizes[cmd.base];
56627
- sizes.splice(addIndex, 0, ...Array(cmd.quantity).fill(baseSize));
56628
+ sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
56628
56629
  this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
56629
56630
  break;
56630
56631
  }
@@ -56776,9 +56777,8 @@ class HeaderVisibilityPlugin extends CorePlugin {
56776
56777
  break;
56777
56778
  }
56778
56779
  case "ADD_COLUMNS_ROWS": {
56779
- const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
56780
56780
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
56781
- hiddenHeaders.splice(addIndex, 0, ...Array(cmd.quantity).fill(false));
56781
+ const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
56782
56782
  this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
56783
56783
  break;
56784
56784
  }
@@ -61061,12 +61061,12 @@ class SpreadsheetRTree {
61061
61061
  this.rTrees[sheetId].remove(item, this.rtreeItemComparer);
61062
61062
  }
61063
61063
  rtreeItemComparer(left, right) {
61064
- return (left.data == right.data &&
61065
- left.boundingBox.sheetId === right.boundingBox.sheetId &&
61064
+ return (left.boundingBox.sheetId === right.boundingBox.sheetId &&
61066
61065
  left.boundingBox?.zone.left === right.boundingBox.zone.left &&
61067
61066
  left.boundingBox?.zone.top === right.boundingBox.zone.top &&
61068
61067
  left.boundingBox?.zone.right === right.boundingBox.zone.right &&
61069
- left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom);
61068
+ left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom &&
61069
+ deepEquals(left.data, right.data));
61070
61070
  }
61071
61071
  }
61072
61072
  /**
@@ -77353,6 +77353,6 @@ exports.tokenColors = tokenColors;
77353
77353
  exports.tokenize = tokenize;
77354
77354
 
77355
77355
 
77356
- __info__.version = "18.2.31";
77357
- __info__.date = "2025-09-23T12:31:15.573Z";
77358
- __info__.hash = "839667e";
77356
+ __info__.version = "18.2.32";
77357
+ __info__.date = "2025-10-07T09:59:52.165Z";
77358
+ __info__.hash = "a42c448";
@@ -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.2.31
6
- * @date 2025-09-23T12:31:15.573Z
7
- * @hash 839667e
5
+ * @version 18.2.32
6
+ * @date 2025-10-07T09:59:52.165Z
7
+ * @hash a42c448
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';
@@ -873,9 +873,7 @@ function removeIndexesFromArray(array, indexes) {
873
873
  return newArray;
874
874
  }
875
875
  function insertItemsAtIndex(array, items, index) {
876
- const newArray = [...array];
877
- newArray.splice(index, 0, ...items);
878
- return newArray;
876
+ return array.slice(0, index).concat(items).concat(array.slice(index));
879
877
  }
880
878
  function replaceItemAtIndex(array, newItem, index) {
881
879
  const newArray = [...array];
@@ -5116,7 +5114,7 @@ function tokensToTextInternalFormat(tokens) {
5116
5114
  * Replace in place tokens "mm" and "m" that denote minutes in date format with "MM" to avoid confusion with months.
5117
5115
  *
5118
5116
  * As per OpenXML specification, in date formats if a date token "m" or "mm" is followed by a date token "s" or
5119
- * preceded by a data token "h", then it's not a month but an minute.
5117
+ * preceded by a data token "h", then it's not a month but a minute.
5120
5118
  */
5121
5119
  function convertTokensToMinutesInDateFormat(tokens) {
5122
5120
  const dateParts = tokens.filter((token) => token.type === "DATE_PART");
@@ -5159,6 +5157,9 @@ function internalFormatPartToFormat(internalFormat) {
5159
5157
  case "REPEATED_CHAR":
5160
5158
  format += "*" + token.value;
5161
5159
  break;
5160
+ case "DATE_PART":
5161
+ format += token.value === "MM" ? "mm" : token.value; // Convert "MM" back to "mm" for minutes
5162
+ break;
5162
5163
  default:
5163
5164
  format += token.value;
5164
5165
  }
@@ -45884,7 +45885,7 @@ class PivotMeasureEditor extends Component {
45884
45885
  return undefined;
45885
45886
  }
45886
45887
  get isCalculatedMeasureInvalid() {
45887
- return this.env.model.getters.getMeasureCompiledFormula(this.props.measure).isBadExpression;
45888
+ return compile(this.props.measure.computedBy?.formula ?? "").isBadExpression;
45888
45889
  }
45889
45890
  }
45890
45891
 
@@ -56622,7 +56623,7 @@ class HeaderSizePlugin extends CorePlugin {
56622
56623
  let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
56623
56624
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
56624
56625
  const baseSize = sizes[cmd.base];
56625
- sizes.splice(addIndex, 0, ...Array(cmd.quantity).fill(baseSize));
56626
+ sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
56626
56627
  this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
56627
56628
  break;
56628
56629
  }
@@ -56774,9 +56775,8 @@ class HeaderVisibilityPlugin extends CorePlugin {
56774
56775
  break;
56775
56776
  }
56776
56777
  case "ADD_COLUMNS_ROWS": {
56777
- const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
56778
56778
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
56779
- hiddenHeaders.splice(addIndex, 0, ...Array(cmd.quantity).fill(false));
56779
+ const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
56780
56780
  this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
56781
56781
  break;
56782
56782
  }
@@ -61059,12 +61059,12 @@ class SpreadsheetRTree {
61059
61059
  this.rTrees[sheetId].remove(item, this.rtreeItemComparer);
61060
61060
  }
61061
61061
  rtreeItemComparer(left, right) {
61062
- return (left.data == right.data &&
61063
- left.boundingBox.sheetId === right.boundingBox.sheetId &&
61062
+ return (left.boundingBox.sheetId === right.boundingBox.sheetId &&
61064
61063
  left.boundingBox?.zone.left === right.boundingBox.zone.left &&
61065
61064
  left.boundingBox?.zone.top === right.boundingBox.zone.top &&
61066
61065
  left.boundingBox?.zone.right === right.boundingBox.zone.right &&
61067
- left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom);
61066
+ left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom &&
61067
+ deepEquals(left.data, right.data));
61068
61068
  }
61069
61069
  }
61070
61070
  /**
@@ -77306,6 +77306,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
77306
77306
  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, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
77307
77307
 
77308
77308
 
77309
- __info__.version = "18.2.31";
77310
- __info__.date = "2025-09-23T12:31:15.573Z";
77311
- __info__.hash = "839667e";
77309
+ __info__.version = "18.2.32";
77310
+ __info__.date = "2025-10-07T09:59:52.165Z";
77311
+ __info__.hash = "a42c448";
@@ -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.2.31
6
- * @date 2025-09-23T12:31:15.573Z
7
- * @hash 839667e
5
+ * @version 18.2.32
6
+ * @date 2025-10-07T09:59:52.165Z
7
+ * @hash a42c448
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -874,9 +874,7 @@
874
874
  return newArray;
875
875
  }
876
876
  function insertItemsAtIndex(array, items, index) {
877
- const newArray = [...array];
878
- newArray.splice(index, 0, ...items);
879
- return newArray;
877
+ return array.slice(0, index).concat(items).concat(array.slice(index));
880
878
  }
881
879
  function replaceItemAtIndex(array, newItem, index) {
882
880
  const newArray = [...array];
@@ -5117,7 +5115,7 @@
5117
5115
  * Replace in place tokens "mm" and "m" that denote minutes in date format with "MM" to avoid confusion with months.
5118
5116
  *
5119
5117
  * As per OpenXML specification, in date formats if a date token "m" or "mm" is followed by a date token "s" or
5120
- * preceded by a data token "h", then it's not a month but an minute.
5118
+ * preceded by a data token "h", then it's not a month but a minute.
5121
5119
  */
5122
5120
  function convertTokensToMinutesInDateFormat(tokens) {
5123
5121
  const dateParts = tokens.filter((token) => token.type === "DATE_PART");
@@ -5160,6 +5158,9 @@
5160
5158
  case "REPEATED_CHAR":
5161
5159
  format += "*" + token.value;
5162
5160
  break;
5161
+ case "DATE_PART":
5162
+ format += token.value === "MM" ? "mm" : token.value; // Convert "MM" back to "mm" for minutes
5163
+ break;
5163
5164
  default:
5164
5165
  format += token.value;
5165
5166
  }
@@ -45885,7 +45886,7 @@ stores.inject(MyMetaStore, storeInstance);
45885
45886
  return undefined;
45886
45887
  }
45887
45888
  get isCalculatedMeasureInvalid() {
45888
- return this.env.model.getters.getMeasureCompiledFormula(this.props.measure).isBadExpression;
45889
+ return compile(this.props.measure.computedBy?.formula ?? "").isBadExpression;
45889
45890
  }
45890
45891
  }
45891
45892
 
@@ -56623,7 +56624,7 @@ stores.inject(MyMetaStore, storeInstance);
56623
56624
  let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
56624
56625
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
56625
56626
  const baseSize = sizes[cmd.base];
56626
- sizes.splice(addIndex, 0, ...Array(cmd.quantity).fill(baseSize));
56627
+ sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
56627
56628
  this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
56628
56629
  break;
56629
56630
  }
@@ -56775,9 +56776,8 @@ stores.inject(MyMetaStore, storeInstance);
56775
56776
  break;
56776
56777
  }
56777
56778
  case "ADD_COLUMNS_ROWS": {
56778
- const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
56779
56779
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
56780
- hiddenHeaders.splice(addIndex, 0, ...Array(cmd.quantity).fill(false));
56780
+ const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
56781
56781
  this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
56782
56782
  break;
56783
56783
  }
@@ -61060,12 +61060,12 @@ stores.inject(MyMetaStore, storeInstance);
61060
61060
  this.rTrees[sheetId].remove(item, this.rtreeItemComparer);
61061
61061
  }
61062
61062
  rtreeItemComparer(left, right) {
61063
- return (left.data == right.data &&
61064
- left.boundingBox.sheetId === right.boundingBox.sheetId &&
61063
+ return (left.boundingBox.sheetId === right.boundingBox.sheetId &&
61065
61064
  left.boundingBox?.zone.left === right.boundingBox.zone.left &&
61066
61065
  left.boundingBox?.zone.top === right.boundingBox.zone.top &&
61067
61066
  left.boundingBox?.zone.right === right.boundingBox.zone.right &&
61068
- left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom);
61067
+ left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom &&
61068
+ deepEquals(left.data, right.data));
61069
61069
  }
61070
61070
  }
61071
61071
  /**
@@ -77352,9 +77352,9 @@ stores.inject(MyMetaStore, storeInstance);
77352
77352
  exports.tokenize = tokenize;
77353
77353
 
77354
77354
 
77355
- __info__.version = "18.2.31";
77356
- __info__.date = "2025-09-23T12:31:15.573Z";
77357
- __info__.hash = "839667e";
77355
+ __info__.version = "18.2.32";
77356
+ __info__.date = "2025-10-07T09:59:52.165Z";
77357
+ __info__.hash = "a42c448";
77358
77358
 
77359
77359
 
77360
77360
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);