@odoo/o-spreadsheet 15.0.1 → 15.0.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.
@@ -2974,6 +2974,9 @@ function isZoneValid(zone) {
2974
2974
  if (isNaN(zone.bottom) || isNaN(zone.top) || isNaN(zone.left) || isNaN(zone.right)) {
2975
2975
  return false;
2976
2976
  }
2977
+ if (zone.top < 0 || zone.left < 0 || zone.right < 0 || zone.bottom < 0) {
2978
+ return false;
2979
+ }
2977
2980
  return zone.bottom >= zone.top && zone.right >= zone.left;
2978
2981
  }
2979
2982
  /**
@@ -23598,6 +23601,7 @@ class RangeAdapter {
23598
23601
  }
23599
23602
  else if (range.zone[start] >= min && range.zone[end] <= max) {
23600
23603
  changeType = "REMOVE";
23604
+ newRange = this.buildInvalidRange(INCORRECT_RANGE_STRING);
23601
23605
  }
23602
23606
  else if (range.zone[start] <= max && range.zone[end] >= max) {
23603
23607
  const toRemove = max - range.zone[start] + 1;
@@ -23663,10 +23667,8 @@ class RangeAdapter {
23663
23667
  return { changeType: "NONE" };
23664
23668
  }
23665
23669
  range = {
23666
- ...range,
23667
- zone: { ...range.zone },
23670
+ ...this.buildInvalidRange(INCORRECT_RANGE_STRING),
23668
23671
  invalidSheetName: this.getters.getSheetName(cmd.sheetId),
23669
- sheetId: "",
23670
23672
  };
23671
23673
  return { changeType: "REMOVE", range };
23672
23674
  }, cmd.sheetId);
@@ -26135,7 +26137,7 @@ const { Portal } = owl.misc;
26135
26137
  const { xml: xml$l } = owl.tags;
26136
26138
  const TEMPLATE$j = xml$l /* xml */ `
26137
26139
  <Portal target="'.o-spreadsheet'">
26138
- <div t-att-style="style">
26140
+ <div class="o-popover" t-att-style="style">
26139
26141
  <t t-slot="default"/>
26140
26142
  </div>
26141
26143
  </Portal>
@@ -27317,7 +27319,7 @@ const CSS$b = css$d /* scss */ `
27317
27319
  padding: 0;
27318
27320
  margin: 0;
27319
27321
  border: 0;
27320
- z-index: 5;
27322
+ z-index: 6;
27321
27323
  flex-grow: 1;
27322
27324
  max-height: inherit;
27323
27325
  .o-composer {
@@ -27888,6 +27890,10 @@ const CSS$9 = css$b /* scss */ `
27888
27890
  border-left: 3px solid red;
27889
27891
  padding: 10px;
27890
27892
  }
27893
+
27894
+ .o-popover:has(.o-error-tooltip) {
27895
+ z-index: 4 !important;
27896
+ }
27891
27897
  `;
27892
27898
  class ErrorToolTip extends owl.Component {
27893
27899
  }
@@ -31356,6 +31362,6 @@ exports.registries = registries;
31356
31362
  exports.setTranslationMethod = setTranslationMethod;
31357
31363
 
31358
31364
 
31359
- __info__.version = '15.0.1';
31360
- __info__.date = '2023-03-06T07:16:47.732Z';
31361
- __info__.hash = 'de03e1c';
31365
+ __info__.version = '15.0.2';
31366
+ __info__.date = '2023-03-14T09:19:34.555Z';
31367
+ __info__.hash = 'c0a25a0';
@@ -2951,6 +2951,9 @@ function isZoneValid(zone) {
2951
2951
  if (isNaN(zone.bottom) || isNaN(zone.top) || isNaN(zone.left) || isNaN(zone.right)) {
2952
2952
  return false;
2953
2953
  }
2954
+ if (zone.top < 0 || zone.left < 0 || zone.right < 0 || zone.bottom < 0) {
2955
+ return false;
2956
+ }
2954
2957
  return zone.bottom >= zone.top && zone.right >= zone.left;
2955
2958
  }
2956
2959
  /**
@@ -23575,6 +23578,7 @@ class RangeAdapter {
23575
23578
  }
23576
23579
  else if (range.zone[start] >= min && range.zone[end] <= max) {
23577
23580
  changeType = "REMOVE";
23581
+ newRange = this.buildInvalidRange(INCORRECT_RANGE_STRING);
23578
23582
  }
23579
23583
  else if (range.zone[start] <= max && range.zone[end] >= max) {
23580
23584
  const toRemove = max - range.zone[start] + 1;
@@ -23640,10 +23644,8 @@ class RangeAdapter {
23640
23644
  return { changeType: "NONE" };
23641
23645
  }
23642
23646
  range = {
23643
- ...range,
23644
- zone: { ...range.zone },
23647
+ ...this.buildInvalidRange(INCORRECT_RANGE_STRING),
23645
23648
  invalidSheetName: this.getters.getSheetName(cmd.sheetId),
23646
- sheetId: "",
23647
23649
  };
23648
23650
  return { changeType: "REMOVE", range };
23649
23651
  }, cmd.sheetId);
@@ -26112,7 +26114,7 @@ const { Portal } = misc$1;
26112
26114
  const { xml: xml$l } = tags;
26113
26115
  const TEMPLATE$j = xml$l /* xml */ `
26114
26116
  <Portal target="'.o-spreadsheet'">
26115
- <div t-att-style="style">
26117
+ <div class="o-popover" t-att-style="style">
26116
26118
  <t t-slot="default"/>
26117
26119
  </div>
26118
26120
  </Portal>
@@ -27294,7 +27296,7 @@ const CSS$b = css$d /* scss */ `
27294
27296
  padding: 0;
27295
27297
  margin: 0;
27296
27298
  border: 0;
27297
- z-index: 5;
27299
+ z-index: 6;
27298
27300
  flex-grow: 1;
27299
27301
  max-height: inherit;
27300
27302
  .o-composer {
@@ -27865,6 +27867,10 @@ const CSS$9 = css$b /* scss */ `
27865
27867
  border-left: 3px solid red;
27866
27868
  padding: 10px;
27867
27869
  }
27870
+
27871
+ .o-popover:has(.o-error-tooltip) {
27872
+ z-index: 4 !important;
27873
+ }
27868
27874
  `;
27869
27875
  class ErrorToolTip extends Component {
27870
27876
  }
@@ -31311,6 +31317,6 @@ const helpers = {
31311
31317
  export { CommandResult, CorePlugin, DATETIME_FORMAT, DataSource, DispatchResult, Model, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, DEBUG as __DEBUG__, __info__, astToFormula, cellTypes, convertAstNodes, coreTypes, functionCache, helpers, invalidateEvaluationCommands, normalize, parse, readonlyAllowedCommands, registries, setTranslationMethod };
31312
31318
 
31313
31319
 
31314
- __info__.version = '15.0.1';
31315
- __info__.date = '2023-03-06T07:16:47.732Z';
31316
- __info__.hash = 'de03e1c';
31320
+ __info__.version = '15.0.2';
31321
+ __info__.date = '2023-03-14T09:19:34.555Z';
31322
+ __info__.hash = 'c0a25a0';
@@ -2971,6 +2971,9 @@
2971
2971
  if (isNaN(zone.bottom) || isNaN(zone.top) || isNaN(zone.left) || isNaN(zone.right)) {
2972
2972
  return false;
2973
2973
  }
2974
+ if (zone.top < 0 || zone.left < 0 || zone.right < 0 || zone.bottom < 0) {
2975
+ return false;
2976
+ }
2974
2977
  return zone.bottom >= zone.top && zone.right >= zone.left;
2975
2978
  }
2976
2979
  /**
@@ -23595,6 +23598,7 @@
23595
23598
  }
23596
23599
  else if (range.zone[start] >= min && range.zone[end] <= max) {
23597
23600
  changeType = "REMOVE";
23601
+ newRange = this.buildInvalidRange(INCORRECT_RANGE_STRING);
23598
23602
  }
23599
23603
  else if (range.zone[start] <= max && range.zone[end] >= max) {
23600
23604
  const toRemove = max - range.zone[start] + 1;
@@ -23660,10 +23664,8 @@
23660
23664
  return { changeType: "NONE" };
23661
23665
  }
23662
23666
  range = {
23663
- ...range,
23664
- zone: { ...range.zone },
23667
+ ...this.buildInvalidRange(INCORRECT_RANGE_STRING),
23665
23668
  invalidSheetName: this.getters.getSheetName(cmd.sheetId),
23666
- sheetId: "",
23667
23669
  };
23668
23670
  return { changeType: "REMOVE", range };
23669
23671
  }, cmd.sheetId);
@@ -26132,7 +26134,7 @@
26132
26134
  const { xml: xml$l } = owl.tags;
26133
26135
  const TEMPLATE$j = xml$l /* xml */ `
26134
26136
  <Portal target="'.o-spreadsheet'">
26135
- <div t-att-style="style">
26137
+ <div class="o-popover" t-att-style="style">
26136
26138
  <t t-slot="default"/>
26137
26139
  </div>
26138
26140
  </Portal>
@@ -27314,7 +27316,7 @@
27314
27316
  padding: 0;
27315
27317
  margin: 0;
27316
27318
  border: 0;
27317
- z-index: 5;
27319
+ z-index: 6;
27318
27320
  flex-grow: 1;
27319
27321
  max-height: inherit;
27320
27322
  .o-composer {
@@ -27885,6 +27887,10 @@
27885
27887
  border-left: 3px solid red;
27886
27888
  padding: 10px;
27887
27889
  }
27890
+
27891
+ .o-popover:has(.o-error-tooltip) {
27892
+ z-index: 4 !important;
27893
+ }
27888
27894
  `;
27889
27895
  class ErrorToolTip extends owl.Component {
27890
27896
  }
@@ -31355,9 +31361,9 @@
31355
31361
  Object.defineProperty(exports, '__esModule', { value: true });
31356
31362
 
31357
31363
 
31358
- __info__.version = '15.0.1';
31359
- __info__.date = '2023-03-06T07:16:47.732Z';
31360
- __info__.hash = 'de03e1c';
31364
+ __info__.version = '15.0.2';
31365
+ __info__.date = '2023-03-14T09:19:34.555Z';
31366
+ __info__.hash = 'c0a25a0';
31361
31367
 
31362
31368
 
31363
31369
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);