@odoo/o-spreadsheet 15.2.1 → 15.2.2

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.
@@ -3183,6 +3183,9 @@ function isZoneValid(zone) {
3183
3183
  if (isNaN(zone.bottom) || isNaN(zone.top) || isNaN(zone.left) || isNaN(zone.right)) {
3184
3184
  return false;
3185
3185
  }
3186
+ if (zone.top < 0 || zone.left < 0 || zone.right < 0 || zone.bottom < 0) {
3187
+ return false;
3188
+ }
3186
3189
  return zone.bottom >= zone.top && zone.right >= zone.left;
3187
3190
  }
3188
3191
  /**
@@ -23509,6 +23512,7 @@ class RangeAdapter {
23509
23512
  }
23510
23513
  else if (range.zone[start] >= min && range.zone[end] <= max) {
23511
23514
  changeType = "REMOVE";
23515
+ newRange = this.buildInvalidRange(INCORRECT_RANGE_STRING);
23512
23516
  }
23513
23517
  else if (range.zone[start] <= max && range.zone[end] >= max) {
23514
23518
  const toRemove = max - range.zone[start] + 1;
@@ -23574,10 +23578,8 @@ class RangeAdapter {
23574
23578
  return { changeType: "NONE" };
23575
23579
  }
23576
23580
  range = {
23577
- ...range,
23578
- zone: { ...range.zone },
23581
+ ...this.buildInvalidRange(INCORRECT_RANGE_STRING),
23579
23582
  invalidSheetName: this.getters.getSheetName(cmd.sheetId),
23580
- sheetId: "",
23581
23583
  };
23582
23584
  return { changeType: "REMOVE", range };
23583
23585
  }, cmd.sheetId);
@@ -31289,6 +31291,6 @@ exports.registries = registries;
31289
31291
  exports.setTranslationMethod = setTranslationMethod;
31290
31292
 
31291
31293
 
31292
- __info__.version = '15.2.1';
31293
- __info__.date = '2023-03-06T07:16:45.196Z';
31294
- __info__.hash = 'baeea23';
31294
+ __info__.version = '15.2.2';
31295
+ __info__.date = '2023-03-14T09:19:31.079Z';
31296
+ __info__.hash = 'a3fcdb7';
@@ -3160,6 +3160,9 @@ function isZoneValid(zone) {
3160
3160
  if (isNaN(zone.bottom) || isNaN(zone.top) || isNaN(zone.left) || isNaN(zone.right)) {
3161
3161
  return false;
3162
3162
  }
3163
+ if (zone.top < 0 || zone.left < 0 || zone.right < 0 || zone.bottom < 0) {
3164
+ return false;
3165
+ }
3163
3166
  return zone.bottom >= zone.top && zone.right >= zone.left;
3164
3167
  }
3165
3168
  /**
@@ -23486,6 +23489,7 @@ class RangeAdapter {
23486
23489
  }
23487
23490
  else if (range.zone[start] >= min && range.zone[end] <= max) {
23488
23491
  changeType = "REMOVE";
23492
+ newRange = this.buildInvalidRange(INCORRECT_RANGE_STRING);
23489
23493
  }
23490
23494
  else if (range.zone[start] <= max && range.zone[end] >= max) {
23491
23495
  const toRemove = max - range.zone[start] + 1;
@@ -23551,10 +23555,8 @@ class RangeAdapter {
23551
23555
  return { changeType: "NONE" };
23552
23556
  }
23553
23557
  range = {
23554
- ...range,
23555
- zone: { ...range.zone },
23558
+ ...this.buildInvalidRange(INCORRECT_RANGE_STRING),
23556
23559
  invalidSheetName: this.getters.getSheetName(cmd.sheetId),
23557
- sheetId: "",
23558
23560
  };
23559
23561
  return { changeType: "REMOVE", range };
23560
23562
  }, cmd.sheetId);
@@ -31243,6 +31245,6 @@ const helpers = {
31243
31245
  export { CommandResult, CorePlugin, DATETIME_FORMAT, DataSource, DispatchResult, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, DEBUG as __DEBUG__, __info__, astToFormula, cellTypes, compile, convertAstNodes, coreTypes, functionCache, helpers, invalidateEvaluationCommands, parse, readonlyAllowedCommands, registries, setTranslationMethod };
31244
31246
 
31245
31247
 
31246
- __info__.version = '15.2.1';
31247
- __info__.date = '2023-03-06T07:16:45.196Z';
31248
- __info__.hash = 'baeea23';
31248
+ __info__.version = '15.2.2';
31249
+ __info__.date = '2023-03-14T09:19:31.079Z';
31250
+ __info__.hash = 'a3fcdb7';
@@ -3180,6 +3180,9 @@
3180
3180
  if (isNaN(zone.bottom) || isNaN(zone.top) || isNaN(zone.left) || isNaN(zone.right)) {
3181
3181
  return false;
3182
3182
  }
3183
+ if (zone.top < 0 || zone.left < 0 || zone.right < 0 || zone.bottom < 0) {
3184
+ return false;
3185
+ }
3183
3186
  return zone.bottom >= zone.top && zone.right >= zone.left;
3184
3187
  }
3185
3188
  /**
@@ -23506,6 +23509,7 @@
23506
23509
  }
23507
23510
  else if (range.zone[start] >= min && range.zone[end] <= max) {
23508
23511
  changeType = "REMOVE";
23512
+ newRange = this.buildInvalidRange(INCORRECT_RANGE_STRING);
23509
23513
  }
23510
23514
  else if (range.zone[start] <= max && range.zone[end] >= max) {
23511
23515
  const toRemove = max - range.zone[start] + 1;
@@ -23571,10 +23575,8 @@
23571
23575
  return { changeType: "NONE" };
23572
23576
  }
23573
23577
  range = {
23574
- ...range,
23575
- zone: { ...range.zone },
23578
+ ...this.buildInvalidRange(INCORRECT_RANGE_STRING),
23576
23579
  invalidSheetName: this.getters.getSheetName(cmd.sheetId),
23577
- sheetId: "",
23578
23580
  };
23579
23581
  return { changeType: "REMOVE", range };
23580
23582
  }, cmd.sheetId);
@@ -31288,9 +31290,9 @@
31288
31290
  Object.defineProperty(exports, '__esModule', { value: true });
31289
31291
 
31290
31292
 
31291
- __info__.version = '15.2.1';
31292
- __info__.date = '2023-03-06T07:16:45.196Z';
31293
- __info__.hash = 'baeea23';
31293
+ __info__.version = '15.2.2';
31294
+ __info__.date = '2023-03-14T09:19:31.079Z';
31295
+ __info__.hash = 'a3fcdb7';
31294
31296
 
31295
31297
 
31296
31298
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);