@odoo/o-spreadsheet 19.2.22 → 19.2.24

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.2.22
6
- * @date 2026-07-23T07:41:02.828Z
7
- * @hash 2fb92b4
5
+ * @version 19.2.24
6
+ * @date 2026-08-10T12:32:28.468Z
7
+ * @hash 31fa530
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.2.22
6
- * @date 2026-07-23T07:41:01.568Z
7
- * @hash 2fb92b4
5
+ * @version 19.2.24
6
+ * @date 2026-08-10T12:32:26.974Z
7
+ * @hash 31fa530
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";
@@ -3940,19 +3940,58 @@ function applyVectorization(formula, args, acceptToVectorize = void 0) {
3940
3940
  }
3941
3941
  }
3942
3942
  if (countVectorizedCol === 1 && countVectorizedRow === 1) return formula(...args);
3943
- const getArgOffset = (i, j) => args.map((arg, index) => {
3944
- switch (vectorArgsType?.[index]) {
3945
- case "matrix": return arg[i][j];
3946
- case "horizontal": return arg[i][0];
3947
- case "vertical": return arg[0][j];
3948
- case void 0: return arg;
3943
+ const argsBuffer = new Array(args.length);
3944
+ const argGetters = [];
3945
+ const vectorizedIndices = [];
3946
+ for (let k = 0; k < args.length; k++) {
3947
+ const arg = args[k];
3948
+ switch (vectorArgsType?.[k]) {
3949
+ case "matrix":
3950
+ argGetters.push((i, j) => arg[i][j]);
3951
+ vectorizedIndices.push(k);
3952
+ break;
3953
+ case "horizontal":
3954
+ argGetters.push((i) => arg[i][0]);
3955
+ vectorizedIndices.push(k);
3956
+ break;
3957
+ case "vertical":
3958
+ argGetters.push((_i, j) => arg[0][j]);
3959
+ vectorizedIndices.push(k);
3960
+ break;
3961
+ case void 0:
3962
+ argsBuffer[k] = arg;
3963
+ break;
3949
3964
  }
3950
- });
3951
- return generateMatrix(countVectorizedCol, countVectorizedRow, (col, row) => {
3952
- if (col > vectorizedColLimit - 1 || row > vectorizedRowLimit - 1) return new NotAvailableError(_t("Array arguments to [[FUNCTION_NAME]] are of different size."));
3953
- const singleCellComputeResult = formula(...getArgOffset(col, row));
3954
- return isMatrix(singleCellComputeResult) ? singleCellComputeResult[0][0] : singleCellComputeResult;
3955
- });
3965
+ }
3966
+ const nbVectorized = vectorizedIndices.length;
3967
+ let callFormula;
3968
+ switch (argsBuffer.length) {
3969
+ case 1:
3970
+ callFormula = () => formula(argsBuffer[0]);
3971
+ break;
3972
+ case 2:
3973
+ callFormula = () => formula(argsBuffer[0], argsBuffer[1]);
3974
+ break;
3975
+ case 3:
3976
+ callFormula = () => formula(argsBuffer[0], argsBuffer[1], argsBuffer[2]);
3977
+ break;
3978
+ default: callFormula = () => formula(...argsBuffer);
3979
+ }
3980
+ const result = new Array(countVectorizedCol);
3981
+ for (let col = 0; col < countVectorizedCol; col++) {
3982
+ const column = new Array(countVectorizedRow);
3983
+ result[col] = column;
3984
+ for (let row = 0; row < countVectorizedRow; row++) {
3985
+ if (col > vectorizedColLimit - 1 || row > vectorizedRowLimit - 1) {
3986
+ column[row] = new NotAvailableError(_t("Array arguments to [[FUNCTION_NAME]] are of different size."));
3987
+ continue;
3988
+ }
3989
+ for (let k = 0; k < nbVectorized; k++) argsBuffer[vectorizedIndices[k]] = argGetters[k](col, row);
3990
+ const singleCellComputeResult = callFormula();
3991
+ column[row] = isMatrix(singleCellComputeResult) ? singleCellComputeResult[0][0] : singleCellComputeResult;
3992
+ }
3993
+ }
3994
+ return result;
3956
3995
  }
3957
3996
  /**
3958
3997
  * This function allows to visit arguments and stop the visit if necessary.
@@ -10552,6 +10591,19 @@ function isOtherMobileOS() {
10552
10591
  function isMobileOS() {
10553
10592
  return isAndroid() || isIOS() || isOtherMobileOS();
10554
10593
  }
10594
+ const INTERACTIVE_ELEMENT_SELECTOR = "select, input, textarea, button, .o-select, .os-input, .o-input, .o-button, .o-button-icon, .o-button-link, .o-composer";
10595
+ /** Check if there is an interactive element (input, select, button, ...) between the event.target and event.currentTarget (inclusive)*/
10596
+ function hasInteractiveElementInEventTree(event) {
10597
+ const target = event.target;
10598
+ const root = event.currentTarget;
10599
+ if (!root || !target || !root.contains(target)) return false;
10600
+ let node = target;
10601
+ while (node && node !== root) {
10602
+ if (node.matches(INTERACTIVE_ELEMENT_SELECTOR)) return true;
10603
+ node = node.parentElement;
10604
+ }
10605
+ return root.matches(INTERACTIVE_ELEMENT_SELECTOR);
10606
+ }
10555
10607
 
10556
10608
  //#endregion
10557
10609
  //#region src/components/helpers/zoom.ts
@@ -17376,7 +17428,7 @@ var FigureComponent = class extends Component {
17376
17428
  case "ArrowLeft":
17377
17429
  case "ArrowRight":
17378
17430
  case "ArrowUp":
17379
- const { col, row, offset } = this.postionInBoundary(this.props.figureUI, ev.key);
17431
+ const { col, row, offset } = this.postionInBoundary(this.env.model.getters.getActiveSheetId(), this.props.figureUI, ev.key);
17380
17432
  this.env.model.dispatch("UPDATE_FIGURE", {
17381
17433
  sheetId: this.env.model.getters.getActiveSheetId(),
17382
17434
  figureId: this.props.figureUI.id,
@@ -17400,34 +17452,52 @@ var FigureComponent = class extends Component {
17400
17452
  break;
17401
17453
  }
17402
17454
  }
17403
- postionInBoundary(position, key) {
17404
- const sheetId = this.env.model.getters.getActiveSheetId();
17405
- let { col, row, offset } = position;
17455
+ postionInBoundary(sheetId, figure, key) {
17456
+ let { col, row, offset } = figure;
17406
17457
  offset = { ...offset };
17458
+ const maxAnchor = this.env.model.getters.getMaxAnchorOffset(sheetId, figure.height, figure.width);
17407
17459
  switch (key) {
17408
17460
  case "ArrowUp":
17409
17461
  if (offset.y === 0) {
17410
17462
  row--;
17463
+ while (row > 0 && this.env.model.getters.isRowHiddenByUser(sheetId, row)) row--;
17411
17464
  offset.y = this.env.model.getters.getRowSize(sheetId, row) - 1;
17412
17465
  } else offset.y--;
17413
17466
  break;
17414
17467
  case "ArrowLeft":
17415
17468
  if (offset.x === 0) {
17416
17469
  col--;
17470
+ while (col > 0 && this.env.model.getters.isColHiddenByUser(sheetId, col)) col--;
17417
17471
  offset.x = this.env.model.getters.getColSize(sheetId, col) - 1;
17418
17472
  } else offset.x--;
17419
17473
  break;
17420
17474
  case "ArrowDown":
17421
17475
  if (offset.y === this.env.model.getters.getRowSize(sheetId, row)) {
17422
17476
  row++;
17477
+ while (row <= maxAnchor.row && this.env.model.getters.isRowHiddenByUser(sheetId, row)) row++;
17423
17478
  offset.y = 0;
17424
17479
  } else offset.y++;
17425
17480
  break;
17426
17481
  case "ArrowRight": if (offset.x === this.env.model.getters.getColSize(sheetId, row)) {
17427
17482
  col++;
17483
+ while (col <= maxAnchor.col && this.env.model.getters.isColHiddenByUser(sheetId, col)) col++;
17428
17484
  offset.x = 0;
17429
17485
  } else offset.x++;
17430
17486
  }
17487
+ if (col < 0) {
17488
+ col = 0;
17489
+ offset.x = 0;
17490
+ } else if (col > maxAnchor.col || col === maxAnchor.col && offset.x > maxAnchor.offset.x) {
17491
+ col = maxAnchor.col;
17492
+ offset.x = maxAnchor.offset.x;
17493
+ }
17494
+ if (row < 0) {
17495
+ row = 0;
17496
+ offset.y = 0;
17497
+ } else if (row > maxAnchor.row || row === maxAnchor.row && offset.y > maxAnchor.offset.y) {
17498
+ row = maxAnchor.row;
17499
+ offset.y = maxAnchor.offset.y;
17500
+ }
17431
17501
  return {
17432
17502
  col,
17433
17503
  row,
@@ -17698,12 +17768,15 @@ function validateArguments(descr) {
17698
17768
  //#endregion
17699
17769
  //#region src/functions/create_compute_function.ts
17700
17770
  function createComputeFunction(descr) {
17771
+ let currentArgDefinitions = [];
17701
17772
  function vectorizedCompute(...args) {
17702
17773
  const acceptToVectorize = [];
17774
+ currentArgDefinitions = new Array(args.length);
17703
17775
  const getArgToFocus = argTargeting(descr, args.length);
17704
17776
  for (let i = 0; i < args.length; i++) {
17705
17777
  const argIndex = getArgToFocus(i).index ?? -1;
17706
17778
  const argDefinition = descr.args[argIndex];
17779
+ currentArgDefinitions[i] = argDefinition;
17707
17780
  const arg = args[i];
17708
17781
  if (!isMatrix(arg) && argDefinition.acceptMatrixOnly) throw new BadExpressionError(_t("Function %s expects the parameter '%s' to be reference to a cell or range.", descr.name, (i + 1).toString()));
17709
17782
  acceptToVectorize.push(!argDefinition.acceptMatrix);
@@ -17718,8 +17791,7 @@ function createComputeFunction(descr) {
17718
17791
  function errorHandlingCompute(...args) {
17719
17792
  for (let i = 0; i < args.length; i++) {
17720
17793
  const arg = args[i];
17721
- const getArgToFocus = argTargeting(descr, args.length);
17722
- if (!descr.args[getArgToFocus(i).index ?? i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
17794
+ if (!currentArgDefinitions[i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
17723
17795
  }
17724
17796
  try {
17725
17797
  return computeFunctionToObject.apply(this, args);
@@ -44251,13 +44323,9 @@ var PivotLayoutConfigurator = class extends Component {
44251
44323
  dimensionsRef = useRef("pivot-dimensions");
44252
44324
  dragAndDrop = useDragAndDropListItems();
44253
44325
  AGGREGATORS = AGGREGATORS;
44254
- composerFocus;
44255
44326
  isDateOrDatetimeField = isDateOrDatetimeField;
44256
- setup() {
44257
- this.composerFocus = useStore(ComposerFocusStore);
44258
- }
44259
44327
  startDragAndDrop(dimension, event) {
44260
- if (event.button !== 0 || event.target.tagName === "SELECT") return;
44328
+ if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
44261
44329
  const rects = this.getDimensionElementsRects();
44262
44330
  const { columns, rows } = this.props.definition;
44263
44331
  const draggableIds = [
@@ -44297,7 +44365,7 @@ var PivotLayoutConfigurator = class extends Component {
44297
44365
  return field.type === "date" ? this.props.dateGranularities : this.props.datetimeGranularities;
44298
44366
  }
44299
44367
  startDragAndDropMeasures(measure, event) {
44300
- if (event.button !== 0 || event.target.tagName === "SELECT" || event.target.tagName === "INPUT" || this.composerFocus.focusMode !== "inactive") return;
44368
+ if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
44301
44369
  const rects = this.getDimensionElementsRects();
44302
44370
  const { measures, columns, rows } = this.props.definition;
44303
44371
  const draggableIds = measures.map((m) => m.id);
@@ -50748,7 +50816,13 @@ var CellComposerStore = class extends AbstractComposerStore {
50748
50816
  const cell = this.getters.getEvaluatedCell(position);
50749
50817
  if (cell.link && !isFormula(content)) content = markdownLink(content, cell.link.url);
50750
50818
  const currentFormat = this.getters.getCell(position)?.format;
50751
- const afterFormat = currentFormat === "@" || currentFormat && isDateTimeFormat(currentFormat) ? void 0 : detectDateFormat(content, this.getters.getLocale());
50819
+ const isCurrentFormatDate = currentFormat && isDateTimeFormat(currentFormat);
50820
+ const contentDateFormat = detectDateFormat(content, this.getters.getLocale());
50821
+ let afterFormat;
50822
+ if (currentFormat !== "@") {
50823
+ if (contentDateFormat && !isCurrentFormatDate) afterFormat = contentDateFormat;
50824
+ else if (isCurrentFormatDate && isNumber(content, this.getters.getLocale())) afterFormat = "";
50825
+ }
50752
50826
  this.addHeadersForSpreadingFormula(content);
50753
50827
  result = this.model.dispatch("UPDATE_CELL", {
50754
50828
  ...this.currentEditedCell,
@@ -67830,7 +67904,7 @@ var SheetUIPlugin = class extends UIPlugin {
67830
67904
  if (contentWidth === 0) return 0;
67831
67905
  contentWidth += 2 * 4;
67832
67906
  if (style.wrapping === "wrap") {
67833
- const colWidth = this.getters.getColSize(this.getters.getActiveSheetId(), position.col);
67907
+ const colWidth = this.getters.getColSize(position.sheetId, position.col);
67834
67908
  return Math.min(colWidth, contentWidth);
67835
67909
  }
67836
67910
  return contentWidth;
@@ -71421,6 +71495,10 @@ function inverseCreateFigure(cmd) {
71421
71495
  }
71422
71496
  function inverseCreateChart(cmd) {
71423
71497
  return [{
71498
+ type: "DELETE_CHART",
71499
+ chartId: cmd.chartId,
71500
+ sheetId: cmd.sheetId
71501
+ }, {
71424
71502
  type: "DELETE_FIGURE",
71425
71503
  figureId: cmd.figureId,
71426
71504
  sheetId: cmd.sheetId
@@ -73149,6 +73227,7 @@ var SpreadsheetDashboard = class extends Component {
73149
73227
  return toRaw(this.clickableCellsStore.clickableCells);
73150
73228
  }
73151
73229
  selectClickableCell(ev, clickableCell) {
73230
+ if (![0, 1].includes(ev.button)) return;
73152
73231
  const { position, action } = clickableCell;
73153
73232
  action(position, this.env, isMiddleClickOrCtrlClick(ev));
73154
73233
  }
@@ -81723,6 +81802,6 @@ const chartHelpers = {
81723
81802
  //#endregion
81724
81803
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, canExecuteInReadonly, categories, chartHelpers, components, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isSheetDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
81725
81804
 
81726
- __info__.version = "19.2.22";
81727
- __info__.date = "2026-07-23T07:41:01.568Z";
81728
- __info__.hash = "2fb92b4";
81805
+ __info__.version = "19.2.24";
81806
+ __info__.date = "2026-08-10T12:32:26.974Z";
81807
+ __info__.hash = "31fa530";
@@ -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.2.22
6
- * @date 2026-07-23T07:41:01.568Z
7
- * @hash 2fb92b4
5
+ * @version 19.2.24
6
+ * @date 2026-08-10T12:32:26.974Z
7
+ * @hash 31fa530
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -3942,19 +3942,58 @@ stores.inject(MyMetaStore, storeInstance);
3942
3942
  }
3943
3943
  }
3944
3944
  if (countVectorizedCol === 1 && countVectorizedRow === 1) return formula(...args);
3945
- const getArgOffset = (i, j) => args.map((arg, index) => {
3946
- switch (vectorArgsType?.[index]) {
3947
- case "matrix": return arg[i][j];
3948
- case "horizontal": return arg[i][0];
3949
- case "vertical": return arg[0][j];
3950
- case void 0: return arg;
3945
+ const argsBuffer = new Array(args.length);
3946
+ const argGetters = [];
3947
+ const vectorizedIndices = [];
3948
+ for (let k = 0; k < args.length; k++) {
3949
+ const arg = args[k];
3950
+ switch (vectorArgsType?.[k]) {
3951
+ case "matrix":
3952
+ argGetters.push((i, j) => arg[i][j]);
3953
+ vectorizedIndices.push(k);
3954
+ break;
3955
+ case "horizontal":
3956
+ argGetters.push((i) => arg[i][0]);
3957
+ vectorizedIndices.push(k);
3958
+ break;
3959
+ case "vertical":
3960
+ argGetters.push((_i, j) => arg[0][j]);
3961
+ vectorizedIndices.push(k);
3962
+ break;
3963
+ case void 0:
3964
+ argsBuffer[k] = arg;
3965
+ break;
3951
3966
  }
3952
- });
3953
- return generateMatrix(countVectorizedCol, countVectorizedRow, (col, row) => {
3954
- if (col > vectorizedColLimit - 1 || row > vectorizedRowLimit - 1) return new NotAvailableError(_t("Array arguments to [[FUNCTION_NAME]] are of different size."));
3955
- const singleCellComputeResult = formula(...getArgOffset(col, row));
3956
- return isMatrix(singleCellComputeResult) ? singleCellComputeResult[0][0] : singleCellComputeResult;
3957
- });
3967
+ }
3968
+ const nbVectorized = vectorizedIndices.length;
3969
+ let callFormula;
3970
+ switch (argsBuffer.length) {
3971
+ case 1:
3972
+ callFormula = () => formula(argsBuffer[0]);
3973
+ break;
3974
+ case 2:
3975
+ callFormula = () => formula(argsBuffer[0], argsBuffer[1]);
3976
+ break;
3977
+ case 3:
3978
+ callFormula = () => formula(argsBuffer[0], argsBuffer[1], argsBuffer[2]);
3979
+ break;
3980
+ default: callFormula = () => formula(...argsBuffer);
3981
+ }
3982
+ const result = new Array(countVectorizedCol);
3983
+ for (let col = 0; col < countVectorizedCol; col++) {
3984
+ const column = new Array(countVectorizedRow);
3985
+ result[col] = column;
3986
+ for (let row = 0; row < countVectorizedRow; row++) {
3987
+ if (col > vectorizedColLimit - 1 || row > vectorizedRowLimit - 1) {
3988
+ column[row] = new NotAvailableError(_t("Array arguments to [[FUNCTION_NAME]] are of different size."));
3989
+ continue;
3990
+ }
3991
+ for (let k = 0; k < nbVectorized; k++) argsBuffer[vectorizedIndices[k]] = argGetters[k](col, row);
3992
+ const singleCellComputeResult = callFormula();
3993
+ column[row] = isMatrix(singleCellComputeResult) ? singleCellComputeResult[0][0] : singleCellComputeResult;
3994
+ }
3995
+ }
3996
+ return result;
3958
3997
  }
3959
3998
  /**
3960
3999
  * This function allows to visit arguments and stop the visit if necessary.
@@ -10554,6 +10593,19 @@ stores.inject(MyMetaStore, storeInstance);
10554
10593
  function isMobileOS() {
10555
10594
  return isAndroid() || isIOS() || isOtherMobileOS();
10556
10595
  }
10596
+ const INTERACTIVE_ELEMENT_SELECTOR = "select, input, textarea, button, .o-select, .os-input, .o-input, .o-button, .o-button-icon, .o-button-link, .o-composer";
10597
+ /** Check if there is an interactive element (input, select, button, ...) between the event.target and event.currentTarget (inclusive)*/
10598
+ function hasInteractiveElementInEventTree(event) {
10599
+ const target = event.target;
10600
+ const root = event.currentTarget;
10601
+ if (!root || !target || !root.contains(target)) return false;
10602
+ let node = target;
10603
+ while (node && node !== root) {
10604
+ if (node.matches(INTERACTIVE_ELEMENT_SELECTOR)) return true;
10605
+ node = node.parentElement;
10606
+ }
10607
+ return root.matches(INTERACTIVE_ELEMENT_SELECTOR);
10608
+ }
10557
10609
 
10558
10610
  //#endregion
10559
10611
  //#region src/components/helpers/zoom.ts
@@ -17378,7 +17430,7 @@ stores.inject(MyMetaStore, storeInstance);
17378
17430
  case "ArrowLeft":
17379
17431
  case "ArrowRight":
17380
17432
  case "ArrowUp":
17381
- const { col, row, offset } = this.postionInBoundary(this.props.figureUI, ev.key);
17433
+ const { col, row, offset } = this.postionInBoundary(this.env.model.getters.getActiveSheetId(), this.props.figureUI, ev.key);
17382
17434
  this.env.model.dispatch("UPDATE_FIGURE", {
17383
17435
  sheetId: this.env.model.getters.getActiveSheetId(),
17384
17436
  figureId: this.props.figureUI.id,
@@ -17402,34 +17454,52 @@ stores.inject(MyMetaStore, storeInstance);
17402
17454
  break;
17403
17455
  }
17404
17456
  }
17405
- postionInBoundary(position, key) {
17406
- const sheetId = this.env.model.getters.getActiveSheetId();
17407
- let { col, row, offset } = position;
17457
+ postionInBoundary(sheetId, figure, key) {
17458
+ let { col, row, offset } = figure;
17408
17459
  offset = { ...offset };
17460
+ const maxAnchor = this.env.model.getters.getMaxAnchorOffset(sheetId, figure.height, figure.width);
17409
17461
  switch (key) {
17410
17462
  case "ArrowUp":
17411
17463
  if (offset.y === 0) {
17412
17464
  row--;
17465
+ while (row > 0 && this.env.model.getters.isRowHiddenByUser(sheetId, row)) row--;
17413
17466
  offset.y = this.env.model.getters.getRowSize(sheetId, row) - 1;
17414
17467
  } else offset.y--;
17415
17468
  break;
17416
17469
  case "ArrowLeft":
17417
17470
  if (offset.x === 0) {
17418
17471
  col--;
17472
+ while (col > 0 && this.env.model.getters.isColHiddenByUser(sheetId, col)) col--;
17419
17473
  offset.x = this.env.model.getters.getColSize(sheetId, col) - 1;
17420
17474
  } else offset.x--;
17421
17475
  break;
17422
17476
  case "ArrowDown":
17423
17477
  if (offset.y === this.env.model.getters.getRowSize(sheetId, row)) {
17424
17478
  row++;
17479
+ while (row <= maxAnchor.row && this.env.model.getters.isRowHiddenByUser(sheetId, row)) row++;
17425
17480
  offset.y = 0;
17426
17481
  } else offset.y++;
17427
17482
  break;
17428
17483
  case "ArrowRight": if (offset.x === this.env.model.getters.getColSize(sheetId, row)) {
17429
17484
  col++;
17485
+ while (col <= maxAnchor.col && this.env.model.getters.isColHiddenByUser(sheetId, col)) col++;
17430
17486
  offset.x = 0;
17431
17487
  } else offset.x++;
17432
17488
  }
17489
+ if (col < 0) {
17490
+ col = 0;
17491
+ offset.x = 0;
17492
+ } else if (col > maxAnchor.col || col === maxAnchor.col && offset.x > maxAnchor.offset.x) {
17493
+ col = maxAnchor.col;
17494
+ offset.x = maxAnchor.offset.x;
17495
+ }
17496
+ if (row < 0) {
17497
+ row = 0;
17498
+ offset.y = 0;
17499
+ } else if (row > maxAnchor.row || row === maxAnchor.row && offset.y > maxAnchor.offset.y) {
17500
+ row = maxAnchor.row;
17501
+ offset.y = maxAnchor.offset.y;
17502
+ }
17433
17503
  return {
17434
17504
  col,
17435
17505
  row,
@@ -17700,12 +17770,15 @@ stores.inject(MyMetaStore, storeInstance);
17700
17770
  //#endregion
17701
17771
  //#region src/functions/create_compute_function.ts
17702
17772
  function createComputeFunction(descr) {
17773
+ let currentArgDefinitions = [];
17703
17774
  function vectorizedCompute(...args) {
17704
17775
  const acceptToVectorize = [];
17776
+ currentArgDefinitions = new Array(args.length);
17705
17777
  const getArgToFocus = argTargeting(descr, args.length);
17706
17778
  for (let i = 0; i < args.length; i++) {
17707
17779
  const argIndex = getArgToFocus(i).index ?? -1;
17708
17780
  const argDefinition = descr.args[argIndex];
17781
+ currentArgDefinitions[i] = argDefinition;
17709
17782
  const arg = args[i];
17710
17783
  if (!isMatrix(arg) && argDefinition.acceptMatrixOnly) throw new BadExpressionError(_t("Function %s expects the parameter '%s' to be reference to a cell or range.", descr.name, (i + 1).toString()));
17711
17784
  acceptToVectorize.push(!argDefinition.acceptMatrix);
@@ -17720,8 +17793,7 @@ stores.inject(MyMetaStore, storeInstance);
17720
17793
  function errorHandlingCompute(...args) {
17721
17794
  for (let i = 0; i < args.length; i++) {
17722
17795
  const arg = args[i];
17723
- const getArgToFocus = argTargeting(descr, args.length);
17724
- if (!descr.args[getArgToFocus(i).index ?? i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
17796
+ if (!currentArgDefinitions[i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
17725
17797
  }
17726
17798
  try {
17727
17799
  return computeFunctionToObject.apply(this, args);
@@ -44253,13 +44325,9 @@ stores.inject(MyMetaStore, storeInstance);
44253
44325
  dimensionsRef = (0, _odoo_owl.useRef)("pivot-dimensions");
44254
44326
  dragAndDrop = useDragAndDropListItems();
44255
44327
  AGGREGATORS = AGGREGATORS;
44256
- composerFocus;
44257
44328
  isDateOrDatetimeField = isDateOrDatetimeField;
44258
- setup() {
44259
- this.composerFocus = useStore(ComposerFocusStore);
44260
- }
44261
44329
  startDragAndDrop(dimension, event) {
44262
- if (event.button !== 0 || event.target.tagName === "SELECT") return;
44330
+ if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
44263
44331
  const rects = this.getDimensionElementsRects();
44264
44332
  const { columns, rows } = this.props.definition;
44265
44333
  const draggableIds = [
@@ -44299,7 +44367,7 @@ stores.inject(MyMetaStore, storeInstance);
44299
44367
  return field.type === "date" ? this.props.dateGranularities : this.props.datetimeGranularities;
44300
44368
  }
44301
44369
  startDragAndDropMeasures(measure, event) {
44302
- if (event.button !== 0 || event.target.tagName === "SELECT" || event.target.tagName === "INPUT" || this.composerFocus.focusMode !== "inactive") return;
44370
+ if (event.button !== 0 || hasInteractiveElementInEventTree(event)) return;
44303
44371
  const rects = this.getDimensionElementsRects();
44304
44372
  const { measures, columns, rows } = this.props.definition;
44305
44373
  const draggableIds = measures.map((m) => m.id);
@@ -50750,7 +50818,13 @@ stores.inject(MyMetaStore, storeInstance);
50750
50818
  const cell = this.getters.getEvaluatedCell(position);
50751
50819
  if (cell.link && !isFormula(content)) content = markdownLink(content, cell.link.url);
50752
50820
  const currentFormat = this.getters.getCell(position)?.format;
50753
- const afterFormat = currentFormat === "@" || currentFormat && isDateTimeFormat(currentFormat) ? void 0 : detectDateFormat(content, this.getters.getLocale());
50821
+ const isCurrentFormatDate = currentFormat && isDateTimeFormat(currentFormat);
50822
+ const contentDateFormat = detectDateFormat(content, this.getters.getLocale());
50823
+ let afterFormat;
50824
+ if (currentFormat !== "@") {
50825
+ if (contentDateFormat && !isCurrentFormatDate) afterFormat = contentDateFormat;
50826
+ else if (isCurrentFormatDate && isNumber(content, this.getters.getLocale())) afterFormat = "";
50827
+ }
50754
50828
  this.addHeadersForSpreadingFormula(content);
50755
50829
  result = this.model.dispatch("UPDATE_CELL", {
50756
50830
  ...this.currentEditedCell,
@@ -67832,7 +67906,7 @@ stores.inject(MyMetaStore, storeInstance);
67832
67906
  if (contentWidth === 0) return 0;
67833
67907
  contentWidth += 2 * 4;
67834
67908
  if (style.wrapping === "wrap") {
67835
- const colWidth = this.getters.getColSize(this.getters.getActiveSheetId(), position.col);
67909
+ const colWidth = this.getters.getColSize(position.sheetId, position.col);
67836
67910
  return Math.min(colWidth, contentWidth);
67837
67911
  }
67838
67912
  return contentWidth;
@@ -71423,6 +71497,10 @@ stores.inject(MyMetaStore, storeInstance);
71423
71497
  }
71424
71498
  function inverseCreateChart(cmd) {
71425
71499
  return [{
71500
+ type: "DELETE_CHART",
71501
+ chartId: cmd.chartId,
71502
+ sheetId: cmd.sheetId
71503
+ }, {
71426
71504
  type: "DELETE_FIGURE",
71427
71505
  figureId: cmd.figureId,
71428
71506
  sheetId: cmd.sheetId
@@ -73151,6 +73229,7 @@ stores.inject(MyMetaStore, storeInstance);
73151
73229
  return (0, _odoo_owl.toRaw)(this.clickableCellsStore.clickableCells);
73152
73230
  }
73153
73231
  selectClickableCell(ev, clickableCell) {
73232
+ if (![0, 1].includes(ev.button)) return;
73154
73233
  const { position, action } = clickableCell;
73155
73234
  action(position, this.env, isMiddleClickOrCtrlClick(ev));
73156
73235
  }
@@ -81783,8 +81862,8 @@ exports.stores = stores;
81783
81862
  exports.tokenColors = tokenColors;
81784
81863
  exports.tokenize = tokenize;
81785
81864
 
81786
- __info__.version = "19.2.22";
81787
- __info__.date = "2026-07-23T07:41:01.568Z";
81788
- __info__.hash = "2fb92b4";
81865
+ __info__.version = "19.2.24";
81866
+ __info__.date = "2026-08-10T12:32:26.974Z";
81867
+ __info__.hash = "31fa530";
81789
81868
 
81790
81869
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);