@odoo/o-spreadsheet 18.2.19 → 18.2.20

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.19
6
- * @date 2025-06-23T15:07:13.023Z
7
- * @hash 430d931
5
+ * @version 18.2.20
6
+ * @date 2025-06-27T09:11:55.800Z
7
+ * @hash 16dfc38
8
8
  */
9
9
 
10
10
  'use strict';
@@ -21200,7 +21200,7 @@ class AbstractComposerStore extends SpreadsheetStore {
21200
21200
  }
21201
21201
  captureSelection(zone, col, row) {
21202
21202
  this.model.selection.capture(this, {
21203
- cell: { col: col || zone.left, row: row || zone.right },
21203
+ cell: { col: col ?? zone.left, row: row ?? zone.right },
21204
21204
  zone,
21205
21205
  }, {
21206
21206
  handleEvent: this.handleEvent.bind(this),
@@ -43144,6 +43144,9 @@ class ConditionalFormattingPanel extends owl.Component {
43144
43144
  this.switchToList();
43145
43145
  }
43146
43146
  }
43147
+ else if (!this.editedCF) {
43148
+ this.switchToList();
43149
+ }
43147
43150
  });
43148
43151
  }
43149
43152
  get conditionalFormats() {
@@ -73692,26 +73695,28 @@ class SelectionStreamProcessorImpl {
73692
73695
  bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
73693
73696
  };
73694
73697
  };
73695
- const { col: refCol, row: refRow } = this.getReferencePosition();
73698
+ const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
73699
+ const { col: refCol, row: refRow } = refCell;
73696
73700
  // check if we can shrink selection
73697
73701
  let n = 0;
73698
73702
  while (result !== null) {
73699
73703
  n++;
73700
73704
  if (deltaCol < 0) {
73701
73705
  const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
73702
- result = refCol <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
73706
+ result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
73703
73707
  }
73704
73708
  if (deltaCol > 0) {
73705
73709
  const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
73706
- result = left + n <= refCol ? expand({ top, left: newLeft, bottom, right }) : null;
73710
+ result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
73707
73711
  }
73708
73712
  if (deltaRow < 0) {
73709
73713
  const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
73710
- result = refRow <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
73714
+ result =
73715
+ refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
73711
73716
  }
73712
73717
  if (deltaRow > 0) {
73713
73718
  const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
73714
- result = top + n <= refRow ? expand({ top: newTop, left, bottom, right }) : null;
73719
+ result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
73715
73720
  }
73716
73721
  result = result ? reorderZone(result) : result;
73717
73722
  if (result && !isEqual(result, anchor.zone)) {
@@ -73941,18 +73946,26 @@ class SelectionStreamProcessorImpl {
73941
73946
  * If the anchor is hidden, browses from left to right and top to bottom to
73942
73947
  * find a visible cell.
73943
73948
  */
73944
- getReferencePosition() {
73949
+ getReferenceAnchor() {
73945
73950
  const sheetId = this.getters.getActiveSheetId();
73946
73951
  const anchor = this.anchor;
73947
73952
  const { left, right, top, bottom } = anchor.zone;
73948
73953
  const { col: anchorCol, row: anchorRow } = anchor.cell;
73954
+ const col = this.getters.isColHidden(sheetId, anchorCol)
73955
+ ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
73956
+ : anchorCol;
73957
+ const row = this.getters.isRowHidden(sheetId, anchorRow)
73958
+ ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
73959
+ : anchorRow;
73960
+ const zone = this.getters.expandZone(sheetId, {
73961
+ left: col,
73962
+ right: col,
73963
+ top: row,
73964
+ bottom: row,
73965
+ });
73949
73966
  return {
73950
- col: this.getters.isColHidden(sheetId, anchorCol)
73951
- ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
73952
- : anchorCol,
73953
- row: this.getters.isRowHidden(sheetId, anchorRow)
73954
- ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
73955
- : anchorRow,
73967
+ cell: { col, row },
73968
+ zone,
73956
73969
  };
73957
73970
  }
73958
73971
  deltaToTarget(position, direction, step) {
@@ -77095,6 +77108,6 @@ exports.tokenColors = tokenColors;
77095
77108
  exports.tokenize = tokenize;
77096
77109
 
77097
77110
 
77098
- __info__.version = "18.2.19";
77099
- __info__.date = "2025-06-23T15:07:13.023Z";
77100
- __info__.hash = "430d931";
77111
+ __info__.version = "18.2.20";
77112
+ __info__.date = "2025-06-27T09:11:55.800Z";
77113
+ __info__.hash = "16dfc38";
@@ -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.19
6
- * @date 2025-06-23T15:07:13.023Z
7
- * @hash 430d931
5
+ * @version 18.2.20
6
+ * @date 2025-06-27T09:11:55.800Z
7
+ * @hash 16dfc38
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';
@@ -21198,7 +21198,7 @@ class AbstractComposerStore extends SpreadsheetStore {
21198
21198
  }
21199
21199
  captureSelection(zone, col, row) {
21200
21200
  this.model.selection.capture(this, {
21201
- cell: { col: col || zone.left, row: row || zone.right },
21201
+ cell: { col: col ?? zone.left, row: row ?? zone.right },
21202
21202
  zone,
21203
21203
  }, {
21204
21204
  handleEvent: this.handleEvent.bind(this),
@@ -43142,6 +43142,9 @@ class ConditionalFormattingPanel extends Component {
43142
43142
  this.switchToList();
43143
43143
  }
43144
43144
  }
43145
+ else if (!this.editedCF) {
43146
+ this.switchToList();
43147
+ }
43145
43148
  });
43146
43149
  }
43147
43150
  get conditionalFormats() {
@@ -73690,26 +73693,28 @@ class SelectionStreamProcessorImpl {
73690
73693
  bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
73691
73694
  };
73692
73695
  };
73693
- const { col: refCol, row: refRow } = this.getReferencePosition();
73696
+ const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
73697
+ const { col: refCol, row: refRow } = refCell;
73694
73698
  // check if we can shrink selection
73695
73699
  let n = 0;
73696
73700
  while (result !== null) {
73697
73701
  n++;
73698
73702
  if (deltaCol < 0) {
73699
73703
  const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
73700
- result = refCol <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
73704
+ result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
73701
73705
  }
73702
73706
  if (deltaCol > 0) {
73703
73707
  const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
73704
- result = left + n <= refCol ? expand({ top, left: newLeft, bottom, right }) : null;
73708
+ result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
73705
73709
  }
73706
73710
  if (deltaRow < 0) {
73707
73711
  const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
73708
- result = refRow <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
73712
+ result =
73713
+ refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
73709
73714
  }
73710
73715
  if (deltaRow > 0) {
73711
73716
  const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
73712
- result = top + n <= refRow ? expand({ top: newTop, left, bottom, right }) : null;
73717
+ result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
73713
73718
  }
73714
73719
  result = result ? reorderZone(result) : result;
73715
73720
  if (result && !isEqual(result, anchor.zone)) {
@@ -73939,18 +73944,26 @@ class SelectionStreamProcessorImpl {
73939
73944
  * If the anchor is hidden, browses from left to right and top to bottom to
73940
73945
  * find a visible cell.
73941
73946
  */
73942
- getReferencePosition() {
73947
+ getReferenceAnchor() {
73943
73948
  const sheetId = this.getters.getActiveSheetId();
73944
73949
  const anchor = this.anchor;
73945
73950
  const { left, right, top, bottom } = anchor.zone;
73946
73951
  const { col: anchorCol, row: anchorRow } = anchor.cell;
73952
+ const col = this.getters.isColHidden(sheetId, anchorCol)
73953
+ ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
73954
+ : anchorCol;
73955
+ const row = this.getters.isRowHidden(sheetId, anchorRow)
73956
+ ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
73957
+ : anchorRow;
73958
+ const zone = this.getters.expandZone(sheetId, {
73959
+ left: col,
73960
+ right: col,
73961
+ top: row,
73962
+ bottom: row,
73963
+ });
73947
73964
  return {
73948
- col: this.getters.isColHidden(sheetId, anchorCol)
73949
- ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
73950
- : anchorCol,
73951
- row: this.getters.isRowHidden(sheetId, anchorRow)
73952
- ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
73953
- : anchorRow,
73965
+ cell: { col, row },
73966
+ zone,
73954
73967
  };
73955
73968
  }
73956
73969
  deltaToTarget(position, direction, step) {
@@ -77048,6 +77061,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
77048
77061
  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 };
77049
77062
 
77050
77063
 
77051
- __info__.version = "18.2.19";
77052
- __info__.date = "2025-06-23T15:07:13.023Z";
77053
- __info__.hash = "430d931";
77064
+ __info__.version = "18.2.20";
77065
+ __info__.date = "2025-06-27T09:11:55.800Z";
77066
+ __info__.hash = "16dfc38";
@@ -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.19
6
- * @date 2025-06-23T15:07:13.023Z
7
- * @hash 430d931
5
+ * @version 18.2.20
6
+ * @date 2025-06-27T09:11:55.800Z
7
+ * @hash 16dfc38
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -21199,7 +21199,7 @@ stores.inject(MyMetaStore, storeInstance);
21199
21199
  }
21200
21200
  captureSelection(zone, col, row) {
21201
21201
  this.model.selection.capture(this, {
21202
- cell: { col: col || zone.left, row: row || zone.right },
21202
+ cell: { col: col ?? zone.left, row: row ?? zone.right },
21203
21203
  zone,
21204
21204
  }, {
21205
21205
  handleEvent: this.handleEvent.bind(this),
@@ -43143,6 +43143,9 @@ stores.inject(MyMetaStore, storeInstance);
43143
43143
  this.switchToList();
43144
43144
  }
43145
43145
  }
43146
+ else if (!this.editedCF) {
43147
+ this.switchToList();
43148
+ }
43146
43149
  });
43147
43150
  }
43148
43151
  get conditionalFormats() {
@@ -73691,26 +73694,28 @@ stores.inject(MyMetaStore, storeInstance);
73691
73694
  bottom: Math.min(this.getters.getNumberRows(sheetId) - 1, bottom),
73692
73695
  };
73693
73696
  };
73694
- const { col: refCol, row: refRow } = this.getReferencePosition();
73697
+ const { cell: refCell, zone: refZone } = this.getReferenceAnchor();
73698
+ const { col: refCol, row: refRow } = refCell;
73695
73699
  // check if we can shrink selection
73696
73700
  let n = 0;
73697
73701
  while (result !== null) {
73698
73702
  n++;
73699
73703
  if (deltaCol < 0) {
73700
73704
  const newRight = this.getNextAvailableCol(deltaCol, right - (n - 1), refRow);
73701
- result = refCol <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
73705
+ result = refZone.right <= right - n ? expand({ top, left, bottom, right: newRight }) : null;
73702
73706
  }
73703
73707
  if (deltaCol > 0) {
73704
73708
  const newLeft = this.getNextAvailableCol(deltaCol, left + (n - 1), refRow);
73705
- result = left + n <= refCol ? expand({ top, left: newLeft, bottom, right }) : null;
73709
+ result = left + n <= refZone.left ? expand({ top, left: newLeft, bottom, right }) : null;
73706
73710
  }
73707
73711
  if (deltaRow < 0) {
73708
73712
  const newBottom = this.getNextAvailableRow(deltaRow, refCol, bottom - (n - 1));
73709
- result = refRow <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
73713
+ result =
73714
+ refZone.bottom <= bottom - n ? expand({ top, left, bottom: newBottom, right }) : null;
73710
73715
  }
73711
73716
  if (deltaRow > 0) {
73712
73717
  const newTop = this.getNextAvailableRow(deltaRow, refCol, top + (n - 1));
73713
- result = top + n <= refRow ? expand({ top: newTop, left, bottom, right }) : null;
73718
+ result = top + n <= refZone.top ? expand({ top: newTop, left, bottom, right }) : null;
73714
73719
  }
73715
73720
  result = result ? reorderZone(result) : result;
73716
73721
  if (result && !isEqual(result, anchor.zone)) {
@@ -73940,18 +73945,26 @@ stores.inject(MyMetaStore, storeInstance);
73940
73945
  * If the anchor is hidden, browses from left to right and top to bottom to
73941
73946
  * find a visible cell.
73942
73947
  */
73943
- getReferencePosition() {
73948
+ getReferenceAnchor() {
73944
73949
  const sheetId = this.getters.getActiveSheetId();
73945
73950
  const anchor = this.anchor;
73946
73951
  const { left, right, top, bottom } = anchor.zone;
73947
73952
  const { col: anchorCol, row: anchorRow } = anchor.cell;
73953
+ const col = this.getters.isColHidden(sheetId, anchorCol)
73954
+ ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
73955
+ : anchorCol;
73956
+ const row = this.getters.isRowHidden(sheetId, anchorRow)
73957
+ ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
73958
+ : anchorRow;
73959
+ const zone = this.getters.expandZone(sheetId, {
73960
+ left: col,
73961
+ right: col,
73962
+ top: row,
73963
+ bottom: row,
73964
+ });
73948
73965
  return {
73949
- col: this.getters.isColHidden(sheetId, anchorCol)
73950
- ? this.getters.findVisibleHeader(sheetId, "COL", left, right) || anchorCol
73951
- : anchorCol,
73952
- row: this.getters.isRowHidden(sheetId, anchorRow)
73953
- ? this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) || anchorRow
73954
- : anchorRow,
73966
+ cell: { col, row },
73967
+ zone,
73955
73968
  };
73956
73969
  }
73957
73970
  deltaToTarget(position, direction, step) {
@@ -77094,9 +77107,9 @@ stores.inject(MyMetaStore, storeInstance);
77094
77107
  exports.tokenize = tokenize;
77095
77108
 
77096
77109
 
77097
- __info__.version = "18.2.19";
77098
- __info__.date = "2025-06-23T15:07:13.023Z";
77099
- __info__.hash = "430d931";
77110
+ __info__.version = "18.2.20";
77111
+ __info__.date = "2025-06-27T09:11:55.800Z";
77112
+ __info__.hash = "16dfc38";
77100
77113
 
77101
77114
 
77102
77115
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);