@odoo/o-spreadsheet 16.2.0 → 16.2.1

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.
@@ -20734,6 +20734,9 @@ class GridOverlay extends owl.Component {
20734
20734
  owl.onMounted(() => {
20735
20735
  resizeObserver.observe(this.gridOverlayEl);
20736
20736
  });
20737
+ owl.onWillUnmount(() => {
20738
+ resizeObserver.disconnect();
20739
+ });
20737
20740
  useTouchMove(this.gridOverlay, this.props.onGridMoved, () => {
20738
20741
  const { scrollY } = this.env.model.getters.getActiveSheetDOMScrollInfo();
20739
20742
  return scrollY > 0;
@@ -30090,6 +30093,7 @@ class RangeAdapter {
30090
30093
  }
30091
30094
  else if (range.zone[start] >= min && range.zone[end] <= max) {
30092
30095
  changeType = "REMOVE";
30096
+ newRange = range.clone({ ...this.getInvalidRange() });
30093
30097
  }
30094
30098
  else if (range.zone[start] <= max && range.zone[end] >= max) {
30095
30099
  const toRemove = max - range.zone[start] + 1;
@@ -30155,8 +30159,10 @@ class RangeAdapter {
30155
30159
  return { changeType: "NONE" };
30156
30160
  }
30157
30161
  const invalidSheetName = this.getters.getSheetName(cmd.sheetId);
30158
- const sheetId = "";
30159
- range = range.clone({ sheetId, invalidSheetName });
30162
+ range = range.clone({
30163
+ ...this.getInvalidRange(),
30164
+ invalidSheetName,
30165
+ });
30160
30166
  return { changeType: "REMOVE", range };
30161
30167
  }, cmd.sheetId);
30162
30168
  break;
@@ -30416,6 +30422,15 @@ class RangeAdapter {
30416
30422
  }
30417
30423
  return str;
30418
30424
  }
30425
+ getInvalidRange() {
30426
+ return {
30427
+ parts: [],
30428
+ prefixSheet: false,
30429
+ zone: { left: -1, top: -1, right: -1, bottom: -1 },
30430
+ sheetId: "",
30431
+ invalidXc: INCORRECT_RANGE_STRING,
30432
+ };
30433
+ }
30419
30434
  }
30420
30435
  RangeAdapter.getters = [
30421
30436
  "getRangeString",
@@ -40896,6 +40911,7 @@ class TopBar extends owl.Component {
40896
40911
  this.state.menuState.parentMenu = menu;
40897
40912
  this.isSelectingMenu = true;
40898
40913
  this.openedEl = ev.target;
40914
+ this.env.model.dispatch("STOP_EDITION");
40899
40915
  }
40900
40916
  closeMenus() {
40901
40917
  this.state.activeTool = "";
@@ -44977,6 +44993,6 @@ exports.setTranslationMethod = setTranslationMethod;
44977
44993
  exports.tokenize = tokenize;
44978
44994
 
44979
44995
 
44980
- __info__.version = '16.2.0';
44981
- __info__.date = '2023-03-15T15:03:34.107Z';
44982
- __info__.hash = 'c74b1d1';
44996
+ __info__.version = '16.2.1';
44997
+ __info__.date = '2023-03-23T11:35:41.982Z';
44998
+ __info__.hash = 'd1e5470';
@@ -2868,6 +2868,7 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
2868
2868
  * Get a Xc string that represent a part of a range
2869
2869
  */
2870
2870
  private getRangePartString;
2871
+ private getInvalidRange;
2871
2872
  }
2872
2873
 
2873
2874
  interface CorePluginConfig {
@@ -20730,6 +20730,9 @@ class GridOverlay extends Component {
20730
20730
  onMounted(() => {
20731
20731
  resizeObserver.observe(this.gridOverlayEl);
20732
20732
  });
20733
+ onWillUnmount(() => {
20734
+ resizeObserver.disconnect();
20735
+ });
20733
20736
  useTouchMove(this.gridOverlay, this.props.onGridMoved, () => {
20734
20737
  const { scrollY } = this.env.model.getters.getActiveSheetDOMScrollInfo();
20735
20738
  return scrollY > 0;
@@ -30086,6 +30089,7 @@ class RangeAdapter {
30086
30089
  }
30087
30090
  else if (range.zone[start] >= min && range.zone[end] <= max) {
30088
30091
  changeType = "REMOVE";
30092
+ newRange = range.clone({ ...this.getInvalidRange() });
30089
30093
  }
30090
30094
  else if (range.zone[start] <= max && range.zone[end] >= max) {
30091
30095
  const toRemove = max - range.zone[start] + 1;
@@ -30151,8 +30155,10 @@ class RangeAdapter {
30151
30155
  return { changeType: "NONE" };
30152
30156
  }
30153
30157
  const invalidSheetName = this.getters.getSheetName(cmd.sheetId);
30154
- const sheetId = "";
30155
- range = range.clone({ sheetId, invalidSheetName });
30158
+ range = range.clone({
30159
+ ...this.getInvalidRange(),
30160
+ invalidSheetName,
30161
+ });
30156
30162
  return { changeType: "REMOVE", range };
30157
30163
  }, cmd.sheetId);
30158
30164
  break;
@@ -30412,6 +30418,15 @@ class RangeAdapter {
30412
30418
  }
30413
30419
  return str;
30414
30420
  }
30421
+ getInvalidRange() {
30422
+ return {
30423
+ parts: [],
30424
+ prefixSheet: false,
30425
+ zone: { left: -1, top: -1, right: -1, bottom: -1 },
30426
+ sheetId: "",
30427
+ invalidXc: INCORRECT_RANGE_STRING,
30428
+ };
30429
+ }
30415
30430
  }
30416
30431
  RangeAdapter.getters = [
30417
30432
  "getRangeString",
@@ -40892,6 +40907,7 @@ class TopBar extends Component {
40892
40907
  this.state.menuState.parentMenu = menu;
40893
40908
  this.isSelectingMenu = true;
40894
40909
  this.openedEl = ev.target;
40910
+ this.env.model.dispatch("STOP_EDITION");
40895
40911
  }
40896
40912
  closeMenus() {
40897
40913
  this.state.activeTool = "";
@@ -44945,6 +44961,6 @@ function addFunction(functionName, functionDescription) {
44945
44961
  export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
44946
44962
 
44947
44963
 
44948
- __info__.version = '16.2.0';
44949
- __info__.date = '2023-03-15T15:03:34.107Z';
44950
- __info__.hash = 'c74b1d1';
44964
+ __info__.version = '16.2.1';
44965
+ __info__.date = '2023-03-23T11:35:41.982Z';
44966
+ __info__.hash = 'd1e5470';
@@ -20731,6 +20731,9 @@
20731
20731
  owl.onMounted(() => {
20732
20732
  resizeObserver.observe(this.gridOverlayEl);
20733
20733
  });
20734
+ owl.onWillUnmount(() => {
20735
+ resizeObserver.disconnect();
20736
+ });
20734
20737
  useTouchMove(this.gridOverlay, this.props.onGridMoved, () => {
20735
20738
  const { scrollY } = this.env.model.getters.getActiveSheetDOMScrollInfo();
20736
20739
  return scrollY > 0;
@@ -30087,6 +30090,7 @@
30087
30090
  }
30088
30091
  else if (range.zone[start] >= min && range.zone[end] <= max) {
30089
30092
  changeType = "REMOVE";
30093
+ newRange = range.clone({ ...this.getInvalidRange() });
30090
30094
  }
30091
30095
  else if (range.zone[start] <= max && range.zone[end] >= max) {
30092
30096
  const toRemove = max - range.zone[start] + 1;
@@ -30152,8 +30156,10 @@
30152
30156
  return { changeType: "NONE" };
30153
30157
  }
30154
30158
  const invalidSheetName = this.getters.getSheetName(cmd.sheetId);
30155
- const sheetId = "";
30156
- range = range.clone({ sheetId, invalidSheetName });
30159
+ range = range.clone({
30160
+ ...this.getInvalidRange(),
30161
+ invalidSheetName,
30162
+ });
30157
30163
  return { changeType: "REMOVE", range };
30158
30164
  }, cmd.sheetId);
30159
30165
  break;
@@ -30413,6 +30419,15 @@
30413
30419
  }
30414
30420
  return str;
30415
30421
  }
30422
+ getInvalidRange() {
30423
+ return {
30424
+ parts: [],
30425
+ prefixSheet: false,
30426
+ zone: { left: -1, top: -1, right: -1, bottom: -1 },
30427
+ sheetId: "",
30428
+ invalidXc: INCORRECT_RANGE_STRING,
30429
+ };
30430
+ }
30416
30431
  }
30417
30432
  RangeAdapter.getters = [
30418
30433
  "getRangeString",
@@ -40893,6 +40908,7 @@
40893
40908
  this.state.menuState.parentMenu = menu;
40894
40909
  this.isSelectingMenu = true;
40895
40910
  this.openedEl = ev.target;
40911
+ this.env.model.dispatch("STOP_EDITION");
40896
40912
  }
40897
40913
  closeMenus() {
40898
40914
  this.state.activeTool = "";
@@ -44976,9 +44992,9 @@
44976
44992
  Object.defineProperty(exports, '__esModule', { value: true });
44977
44993
 
44978
44994
 
44979
- __info__.version = '16.2.0';
44980
- __info__.date = '2023-03-15T15:03:34.107Z';
44981
- __info__.hash = 'c74b1d1';
44995
+ __info__.version = '16.2.1';
44996
+ __info__.date = '2023-03-23T11:35:41.982Z';
44997
+ __info__.hash = 'd1e5470';
44982
44998
 
44983
44999
 
44984
45000
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);