@odoo/o-spreadsheet 18.0.45 → 18.0.46

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.45
6
- * @date 2025-09-19T07:24:19.143Z
7
- * @hash 54e799a
5
+ * @version 18.0.46
6
+ * @date 2025-10-07T10:00:44.707Z
7
+ * @hash 67a1b4a
8
8
  */
9
9
 
10
10
  'use strict';
@@ -871,9 +871,7 @@ function removeIndexesFromArray(array, indexes) {
871
871
  return newArray;
872
872
  }
873
873
  function insertItemsAtIndex(array, items, index) {
874
- const newArray = [...array];
875
- newArray.splice(index, 0, ...items);
876
- return newArray;
874
+ return array.slice(0, index).concat(items).concat(array.slice(index));
877
875
  }
878
876
  function replaceItemAtIndex(array, newItem, index) {
879
877
  const newArray = [...array];
@@ -4940,7 +4938,7 @@ function tokensToTextInternalFormat(tokens) {
4940
4938
  * Replace in place tokens "mm" and "m" that denote minutes in date format with "MM" to avoid confusion with months.
4941
4939
  *
4942
4940
  * As per OpenXML specification, in date formats if a date token "m" or "mm" is followed by a date token "s" or
4943
- * preceded by a data token "h", then it's not a month but an minute.
4941
+ * preceded by a data token "h", then it's not a month but a minute.
4944
4942
  */
4945
4943
  function convertTokensToMinutesInDateFormat(tokens) {
4946
4944
  const dateParts = tokens.filter((token) => token.type === "DATE_PART");
@@ -4983,6 +4981,9 @@ function internalFormatPartToFormat(internalFormat) {
4983
4981
  case "REPEATED_CHAR":
4984
4982
  format += "*" + token.value;
4985
4983
  break;
4984
+ case "DATE_PART":
4985
+ format += token.value === "MM" ? "mm" : token.value; // Convert "MM" back to "mm" for minutes
4986
+ break;
4986
4987
  default:
4987
4988
  format += token.value;
4988
4989
  }
@@ -54050,7 +54051,7 @@ class HeaderSizePlugin extends CorePlugin {
54050
54051
  let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
54051
54052
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
54052
54053
  const baseSize = sizes[cmd.base];
54053
- sizes.splice(addIndex, 0, ...Array(cmd.quantity).fill(baseSize));
54054
+ sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
54054
54055
  this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
54055
54056
  break;
54056
54057
  }
@@ -54202,9 +54203,8 @@ class HeaderVisibilityPlugin extends CorePlugin {
54202
54203
  break;
54203
54204
  }
54204
54205
  case "ADD_COLUMNS_ROWS": {
54205
- const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
54206
54206
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
54207
- hiddenHeaders.splice(addIndex, 0, ...Array(cmd.quantity).fill(false));
54207
+ const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
54208
54208
  this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
54209
54209
  break;
54210
54210
  }
@@ -58461,12 +58461,12 @@ class SpreadsheetRTree {
58461
58461
  this.rTrees[sheetId].remove(item, this.rtreeItemComparer);
58462
58462
  }
58463
58463
  rtreeItemComparer(left, right) {
58464
- return (left.data == right.data &&
58465
- left.boundingBox.sheetId === right.boundingBox.sheetId &&
58464
+ return (left.boundingBox.sheetId === right.boundingBox.sheetId &&
58466
58465
  left.boundingBox?.zone.left === right.boundingBox.zone.left &&
58467
58466
  left.boundingBox?.zone.top === right.boundingBox.zone.top &&
58468
58467
  left.boundingBox?.zone.right === right.boundingBox.zone.right &&
58469
- left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom);
58468
+ left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom &&
58469
+ deepEquals(left.data, right.data));
58470
58470
  }
58471
58471
  }
58472
58472
  /**
@@ -74748,6 +74748,6 @@ exports.tokenColors = tokenColors;
74748
74748
  exports.tokenize = tokenize;
74749
74749
 
74750
74750
 
74751
- __info__.version = "18.0.45";
74752
- __info__.date = "2025-09-19T07:24:19.143Z";
74753
- __info__.hash = "54e799a";
74751
+ __info__.version = "18.0.46";
74752
+ __info__.date = "2025-10-07T10:00:44.707Z";
74753
+ __info__.hash = "67a1b4a";
@@ -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.45
6
- * @date 2025-09-19T07:24:19.143Z
7
- * @hash 54e799a
5
+ * @version 18.0.46
6
+ * @date 2025-10-07T10:00:44.707Z
7
+ * @hash 67a1b4a
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';
@@ -869,9 +869,7 @@ function removeIndexesFromArray(array, indexes) {
869
869
  return newArray;
870
870
  }
871
871
  function insertItemsAtIndex(array, items, index) {
872
- const newArray = [...array];
873
- newArray.splice(index, 0, ...items);
874
- return newArray;
872
+ return array.slice(0, index).concat(items).concat(array.slice(index));
875
873
  }
876
874
  function replaceItemAtIndex(array, newItem, index) {
877
875
  const newArray = [...array];
@@ -4938,7 +4936,7 @@ function tokensToTextInternalFormat(tokens) {
4938
4936
  * Replace in place tokens "mm" and "m" that denote minutes in date format with "MM" to avoid confusion with months.
4939
4937
  *
4940
4938
  * As per OpenXML specification, in date formats if a date token "m" or "mm" is followed by a date token "s" or
4941
- * preceded by a data token "h", then it's not a month but an minute.
4939
+ * preceded by a data token "h", then it's not a month but a minute.
4942
4940
  */
4943
4941
  function convertTokensToMinutesInDateFormat(tokens) {
4944
4942
  const dateParts = tokens.filter((token) => token.type === "DATE_PART");
@@ -4981,6 +4979,9 @@ function internalFormatPartToFormat(internalFormat) {
4981
4979
  case "REPEATED_CHAR":
4982
4980
  format += "*" + token.value;
4983
4981
  break;
4982
+ case "DATE_PART":
4983
+ format += token.value === "MM" ? "mm" : token.value; // Convert "MM" back to "mm" for minutes
4984
+ break;
4984
4985
  default:
4985
4986
  format += token.value;
4986
4987
  }
@@ -54048,7 +54049,7 @@ class HeaderSizePlugin extends CorePlugin {
54048
54049
  let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
54049
54050
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
54050
54051
  const baseSize = sizes[cmd.base];
54051
- sizes.splice(addIndex, 0, ...Array(cmd.quantity).fill(baseSize));
54052
+ sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
54052
54053
  this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
54053
54054
  break;
54054
54055
  }
@@ -54200,9 +54201,8 @@ class HeaderVisibilityPlugin extends CorePlugin {
54200
54201
  break;
54201
54202
  }
54202
54203
  case "ADD_COLUMNS_ROWS": {
54203
- const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
54204
54204
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
54205
- hiddenHeaders.splice(addIndex, 0, ...Array(cmd.quantity).fill(false));
54205
+ const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
54206
54206
  this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
54207
54207
  break;
54208
54208
  }
@@ -58459,12 +58459,12 @@ class SpreadsheetRTree {
58459
58459
  this.rTrees[sheetId].remove(item, this.rtreeItemComparer);
58460
58460
  }
58461
58461
  rtreeItemComparer(left, right) {
58462
- return (left.data == right.data &&
58463
- left.boundingBox.sheetId === right.boundingBox.sheetId &&
58462
+ return (left.boundingBox.sheetId === right.boundingBox.sheetId &&
58464
58463
  left.boundingBox?.zone.left === right.boundingBox.zone.left &&
58465
58464
  left.boundingBox?.zone.top === right.boundingBox.zone.top &&
58466
58465
  left.boundingBox?.zone.right === right.boundingBox.zone.right &&
58467
- left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom);
58466
+ left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom &&
58467
+ deepEquals(left.data, right.data));
58468
58468
  }
58469
58469
  }
58470
58470
  /**
@@ -74703,6 +74703,6 @@ const constants = {
74703
74703
  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 };
74704
74704
 
74705
74705
 
74706
- __info__.version = "18.0.45";
74707
- __info__.date = "2025-09-19T07:24:19.143Z";
74708
- __info__.hash = "54e799a";
74706
+ __info__.version = "18.0.46";
74707
+ __info__.date = "2025-10-07T10:00:44.707Z";
74708
+ __info__.hash = "67a1b4a";
@@ -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.45
6
- * @date 2025-09-19T07:24:19.143Z
7
- * @hash 54e799a
5
+ * @version 18.0.46
6
+ * @date 2025-10-07T10:00:44.707Z
7
+ * @hash 67a1b4a
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -870,9 +870,7 @@
870
870
  return newArray;
871
871
  }
872
872
  function insertItemsAtIndex(array, items, index) {
873
- const newArray = [...array];
874
- newArray.splice(index, 0, ...items);
875
- return newArray;
873
+ return array.slice(0, index).concat(items).concat(array.slice(index));
876
874
  }
877
875
  function replaceItemAtIndex(array, newItem, index) {
878
876
  const newArray = [...array];
@@ -4939,7 +4937,7 @@
4939
4937
  * Replace in place tokens "mm" and "m" that denote minutes in date format with "MM" to avoid confusion with months.
4940
4938
  *
4941
4939
  * As per OpenXML specification, in date formats if a date token "m" or "mm" is followed by a date token "s" or
4942
- * preceded by a data token "h", then it's not a month but an minute.
4940
+ * preceded by a data token "h", then it's not a month but a minute.
4943
4941
  */
4944
4942
  function convertTokensToMinutesInDateFormat(tokens) {
4945
4943
  const dateParts = tokens.filter((token) => token.type === "DATE_PART");
@@ -4982,6 +4980,9 @@
4982
4980
  case "REPEATED_CHAR":
4983
4981
  format += "*" + token.value;
4984
4982
  break;
4983
+ case "DATE_PART":
4984
+ format += token.value === "MM" ? "mm" : token.value; // Convert "MM" back to "mm" for minutes
4985
+ break;
4985
4986
  default:
4986
4987
  format += token.value;
4987
4988
  }
@@ -54049,7 +54050,7 @@ stores.inject(MyMetaStore, storeInstance);
54049
54050
  let sizes = [...this.sizes[cmd.sheetId][cmd.dimension]];
54050
54051
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
54051
54052
  const baseSize = sizes[cmd.base];
54052
- sizes.splice(addIndex, 0, ...Array(cmd.quantity).fill(baseSize));
54053
+ sizes = insertItemsAtIndex(sizes, Array(cmd.quantity).fill(baseSize), addIndex);
54053
54054
  this.history.update("sizes", cmd.sheetId, cmd.dimension, sizes);
54054
54055
  break;
54055
54056
  }
@@ -54201,9 +54202,8 @@ stores.inject(MyMetaStore, storeInstance);
54201
54202
  break;
54202
54203
  }
54203
54204
  case "ADD_COLUMNS_ROWS": {
54204
- const hiddenHeaders = [...this.hiddenHeaders[cmd.sheetId][cmd.dimension]];
54205
54205
  const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
54206
- hiddenHeaders.splice(addIndex, 0, ...Array(cmd.quantity).fill(false));
54206
+ const hiddenHeaders = insertItemsAtIndex([...this.hiddenHeaders[cmd.sheetId][cmd.dimension]], Array(cmd.quantity).fill(false), addIndex);
54207
54207
  this.history.update("hiddenHeaders", cmd.sheetId, cmd.dimension, hiddenHeaders);
54208
54208
  break;
54209
54209
  }
@@ -58460,12 +58460,12 @@ stores.inject(MyMetaStore, storeInstance);
58460
58460
  this.rTrees[sheetId].remove(item, this.rtreeItemComparer);
58461
58461
  }
58462
58462
  rtreeItemComparer(left, right) {
58463
- return (left.data == right.data &&
58464
- left.boundingBox.sheetId === right.boundingBox.sheetId &&
58463
+ return (left.boundingBox.sheetId === right.boundingBox.sheetId &&
58465
58464
  left.boundingBox?.zone.left === right.boundingBox.zone.left &&
58466
58465
  left.boundingBox?.zone.top === right.boundingBox.zone.top &&
58467
58466
  left.boundingBox?.zone.right === right.boundingBox.zone.right &&
58468
- left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom);
58467
+ left.boundingBox?.zone.bottom === right.boundingBox.zone.bottom &&
58468
+ deepEquals(left.data, right.data));
58469
58469
  }
58470
58470
  }
58471
58471
  /**
@@ -74747,9 +74747,9 @@ stores.inject(MyMetaStore, storeInstance);
74747
74747
  exports.tokenize = tokenize;
74748
74748
 
74749
74749
 
74750
- __info__.version = "18.0.45";
74751
- __info__.date = "2025-09-19T07:24:19.143Z";
74752
- __info__.hash = "54e799a";
74750
+ __info__.version = "18.0.46";
74751
+ __info__.date = "2025-10-07T10:00:44.707Z";
74752
+ __info__.hash = "67a1b4a";
74753
74753
 
74754
74754
 
74755
74755
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);