@odoo/o-spreadsheet 17.0.77 → 17.0.79

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 17.0.77
6
- * @date 2025-11-12T14:14:11.932Z
7
- * @hash 789de5e
5
+ * @version 17.0.79
6
+ * @date 2025-12-02T05:30:46.853Z
7
+ * @hash ab9f15e
8
8
  */
9
9
 
10
10
  'use strict';
@@ -27210,9 +27210,7 @@ class Composer extends owl.Component {
27210
27210
  return;
27211
27211
  }
27212
27212
  const newSelection = this.contentHelper.getCurrentSelection();
27213
- this.env.model.dispatch("STOP_COMPOSER_RANGE_SELECTION");
27214
27213
  this.props.onComposerContentFocused();
27215
- if (this.props.focus === "inactive") ;
27216
27214
  this.env.model.dispatch("CHANGE_COMPOSER_CURSOR_SELECTION", newSelection);
27217
27215
  this.processTokenAtCursor();
27218
27216
  }
@@ -28779,6 +28777,7 @@ class GridOverlay extends owl.Component {
28779
28777
  // not main button, probably a context menu
28780
28778
  return;
28781
28779
  }
28780
+ ev.preventDefault();
28782
28781
  const [col, row] = this.getCartesianCoordinates(ev);
28783
28782
  this.props.onCellClicked(col, row, {
28784
28783
  expandZone: ev.shiftKey,
@@ -28894,7 +28893,10 @@ class AbstractResizer extends owl.Component {
28894
28893
  this.state.waitingForMove = false;
28895
28894
  }
28896
28895
  onMouseMove(ev) {
28897
- if (this.state.isResizing || this.state.isMoving || this.state.isSelecting) {
28896
+ if (this.env.model.getters.isReadonly() ||
28897
+ this.state.isResizing ||
28898
+ this.state.isMoving ||
28899
+ this.state.isSelecting) {
28898
28900
  return;
28899
28901
  }
28900
28902
  this._computeHandleDisplay(ev);
@@ -28947,6 +28949,10 @@ class AbstractResizer extends owl.Component {
28947
28949
  if (index < 0) {
28948
28950
  return;
28949
28951
  }
28952
+ if (this.env.model.getters.isReadonly()) {
28953
+ this._selectElement(index, false);
28954
+ return;
28955
+ }
28950
28956
  if (this.state.waitingForMove === true) {
28951
28957
  if (!this.env.model.getters.isGridSelectionActive()) {
28952
28958
  this._selectElement(index, false);
@@ -49583,6 +49589,9 @@ class EditionPlugin extends UIPlugin {
49583
49589
  case "CHANGE_COMPOSER_CURSOR_SELECTION":
49584
49590
  this.selectionStart = cmd.start;
49585
49591
  this.selectionEnd = cmd.end;
49592
+ if (this.isSelectingForComposer()) {
49593
+ this.mode = "editing";
49594
+ }
49586
49595
  break;
49587
49596
  case "STOP_COMPOSER_RANGE_SELECTION":
49588
49597
  if (this.isSelectingForComposer()) {
@@ -58511,6 +58520,6 @@ exports.setTranslationMethod = setTranslationMethod;
58511
58520
  exports.tokenize = tokenize;
58512
58521
 
58513
58522
 
58514
- __info__.version = "17.0.77";
58515
- __info__.date = "2025-11-12T14:14:11.932Z";
58516
- __info__.hash = "789de5e";
58523
+ __info__.version = "17.0.79";
58524
+ __info__.date = "2025-12-02T05:30:46.853Z";
58525
+ __info__.hash = "ab9f15e";
@@ -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 17.0.77
6
- * @date 2025-11-12T14:14:11.932Z
7
- * @hash 789de5e
5
+ * @version 17.0.79
6
+ * @date 2025-12-02T05:30:46.853Z
7
+ * @hash ab9f15e
8
8
  */
9
9
 
10
10
  import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
@@ -27208,9 +27208,7 @@ class Composer extends Component {
27208
27208
  return;
27209
27209
  }
27210
27210
  const newSelection = this.contentHelper.getCurrentSelection();
27211
- this.env.model.dispatch("STOP_COMPOSER_RANGE_SELECTION");
27212
27211
  this.props.onComposerContentFocused();
27213
- if (this.props.focus === "inactive") ;
27214
27212
  this.env.model.dispatch("CHANGE_COMPOSER_CURSOR_SELECTION", newSelection);
27215
27213
  this.processTokenAtCursor();
27216
27214
  }
@@ -28777,6 +28775,7 @@ class GridOverlay extends Component {
28777
28775
  // not main button, probably a context menu
28778
28776
  return;
28779
28777
  }
28778
+ ev.preventDefault();
28780
28779
  const [col, row] = this.getCartesianCoordinates(ev);
28781
28780
  this.props.onCellClicked(col, row, {
28782
28781
  expandZone: ev.shiftKey,
@@ -28892,7 +28891,10 @@ class AbstractResizer extends Component {
28892
28891
  this.state.waitingForMove = false;
28893
28892
  }
28894
28893
  onMouseMove(ev) {
28895
- if (this.state.isResizing || this.state.isMoving || this.state.isSelecting) {
28894
+ if (this.env.model.getters.isReadonly() ||
28895
+ this.state.isResizing ||
28896
+ this.state.isMoving ||
28897
+ this.state.isSelecting) {
28896
28898
  return;
28897
28899
  }
28898
28900
  this._computeHandleDisplay(ev);
@@ -28945,6 +28947,10 @@ class AbstractResizer extends Component {
28945
28947
  if (index < 0) {
28946
28948
  return;
28947
28949
  }
28950
+ if (this.env.model.getters.isReadonly()) {
28951
+ this._selectElement(index, false);
28952
+ return;
28953
+ }
28948
28954
  if (this.state.waitingForMove === true) {
28949
28955
  if (!this.env.model.getters.isGridSelectionActive()) {
28950
28956
  this._selectElement(index, false);
@@ -49581,6 +49587,9 @@ class EditionPlugin extends UIPlugin {
49581
49587
  case "CHANGE_COMPOSER_CURSOR_SELECTION":
49582
49588
  this.selectionStart = cmd.start;
49583
49589
  this.selectionEnd = cmd.end;
49590
+ if (this.isSelectingForComposer()) {
49591
+ this.mode = "editing";
49592
+ }
49584
49593
  break;
49585
49594
  case "STOP_COMPOSER_RANGE_SELECTION":
49586
49595
  if (this.isSelectingForComposer()) {
@@ -58474,6 +58483,6 @@ const constants = {
58474
58483
  export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
58475
58484
 
58476
58485
 
58477
- __info__.version = "17.0.77";
58478
- __info__.date = "2025-11-12T14:14:11.932Z";
58479
- __info__.hash = "789de5e";
58486
+ __info__.version = "17.0.79";
58487
+ __info__.date = "2025-12-02T05:30:46.853Z";
58488
+ __info__.hash = "ab9f15e";
@@ -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 17.0.77
6
- * @date 2025-11-12T14:14:11.932Z
7
- * @hash 789de5e
5
+ * @version 17.0.79
6
+ * @date 2025-12-02T05:30:46.853Z
7
+ * @hash ab9f15e
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -27209,9 +27209,7 @@
27209
27209
  return;
27210
27210
  }
27211
27211
  const newSelection = this.contentHelper.getCurrentSelection();
27212
- this.env.model.dispatch("STOP_COMPOSER_RANGE_SELECTION");
27213
27212
  this.props.onComposerContentFocused();
27214
- if (this.props.focus === "inactive") ;
27215
27213
  this.env.model.dispatch("CHANGE_COMPOSER_CURSOR_SELECTION", newSelection);
27216
27214
  this.processTokenAtCursor();
27217
27215
  }
@@ -28778,6 +28776,7 @@
28778
28776
  // not main button, probably a context menu
28779
28777
  return;
28780
28778
  }
28779
+ ev.preventDefault();
28781
28780
  const [col, row] = this.getCartesianCoordinates(ev);
28782
28781
  this.props.onCellClicked(col, row, {
28783
28782
  expandZone: ev.shiftKey,
@@ -28893,7 +28892,10 @@
28893
28892
  this.state.waitingForMove = false;
28894
28893
  }
28895
28894
  onMouseMove(ev) {
28896
- if (this.state.isResizing || this.state.isMoving || this.state.isSelecting) {
28895
+ if (this.env.model.getters.isReadonly() ||
28896
+ this.state.isResizing ||
28897
+ this.state.isMoving ||
28898
+ this.state.isSelecting) {
28897
28899
  return;
28898
28900
  }
28899
28901
  this._computeHandleDisplay(ev);
@@ -28946,6 +28948,10 @@
28946
28948
  if (index < 0) {
28947
28949
  return;
28948
28950
  }
28951
+ if (this.env.model.getters.isReadonly()) {
28952
+ this._selectElement(index, false);
28953
+ return;
28954
+ }
28949
28955
  if (this.state.waitingForMove === true) {
28950
28956
  if (!this.env.model.getters.isGridSelectionActive()) {
28951
28957
  this._selectElement(index, false);
@@ -49582,6 +49588,9 @@
49582
49588
  case "CHANGE_COMPOSER_CURSOR_SELECTION":
49583
49589
  this.selectionStart = cmd.start;
49584
49590
  this.selectionEnd = cmd.end;
49591
+ if (this.isSelectingForComposer()) {
49592
+ this.mode = "editing";
49593
+ }
49585
49594
  break;
49586
49595
  case "STOP_COMPOSER_RANGE_SELECTION":
49587
49596
  if (this.isSelectingForComposer()) {
@@ -58510,9 +58519,9 @@
58510
58519
  exports.tokenize = tokenize;
58511
58520
 
58512
58521
 
58513
- __info__.version = "17.0.77";
58514
- __info__.date = "2025-11-12T14:14:11.932Z";
58515
- __info__.hash = "789de5e";
58522
+ __info__.version = "17.0.79";
58523
+ __info__.date = "2025-12-02T05:30:46.853Z";
58524
+ __info__.hash = "ab9f15e";
58516
58525
 
58517
58526
 
58518
58527
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);