@odoo/o-spreadsheet 16.1.23 → 16.1.24

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.
@@ -26079,12 +26079,15 @@ function createXMLFile(doc, path, contentType) {
26079
26079
  };
26080
26080
  }
26081
26081
  function xmlEscape(str) {
26082
- return String(str)
26082
+ return (String(str)
26083
26083
  .replace(/\&/g, "&")
26084
26084
  .replace(/\</g, "&lt;")
26085
26085
  .replace(/\>/g, "&gt;")
26086
26086
  .replace(/\"/g, "&quot;")
26087
- .replace(/\'/g, "&apos;");
26087
+ .replace(/\'/g, "&apos;")
26088
+ // Delete all ASCII control characters except for TAB (\x09), LF (\x0A) and CR (\x0D)
26089
+ // They are not valid at all in XML 1.0 (even escaped)
26090
+ .replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g, ""));
26088
26091
  }
26089
26092
  function formatAttributes(attrs) {
26090
26093
  return new XMLString(attrs.map(([key, val]) => `${key}="${xmlEscape(val)}"`).join(" "));
@@ -33020,6 +33023,10 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
33020
33023
  }
33021
33024
  currentRanges = currentRanges.concat(toAdd);
33022
33025
  const newRangesXC = recomputeZones(currentRanges, toRemove);
33026
+ if (newRangesXC.length === 0) {
33027
+ this.dispatch("REMOVE_CONDITIONAL_FORMAT", { id: cf.id, sheetId });
33028
+ return;
33029
+ }
33023
33030
  this.dispatch("ADD_CONDITIONAL_FORMAT", {
33024
33031
  cf: {
33025
33032
  id: cf.id,
@@ -44420,6 +44427,6 @@ exports.setTranslationMethod = setTranslationMethod;
44420
44427
  exports.tokenize = tokenize;
44421
44428
 
44422
44429
 
44423
- __info__.version = '16.1.23';
44424
- __info__.date = '2023-10-10T07:27:03.376Z';
44425
- __info__.hash = '13bfa8f';
44430
+ __info__.version = '16.1.24';
44431
+ __info__.date = '2023-10-19T14:21:55.097Z';
44432
+ __info__.hash = '1b9e9d0';
@@ -26075,12 +26075,15 @@ function createXMLFile(doc, path, contentType) {
26075
26075
  };
26076
26076
  }
26077
26077
  function xmlEscape(str) {
26078
- return String(str)
26078
+ return (String(str)
26079
26079
  .replace(/\&/g, "&amp;")
26080
26080
  .replace(/\</g, "&lt;")
26081
26081
  .replace(/\>/g, "&gt;")
26082
26082
  .replace(/\"/g, "&quot;")
26083
- .replace(/\'/g, "&apos;");
26083
+ .replace(/\'/g, "&apos;")
26084
+ // Delete all ASCII control characters except for TAB (\x09), LF (\x0A) and CR (\x0D)
26085
+ // They are not valid at all in XML 1.0 (even escaped)
26086
+ .replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g, ""));
26084
26087
  }
26085
26088
  function formatAttributes(attrs) {
26086
26089
  return new XMLString(attrs.map(([key, val]) => `${key}="${xmlEscape(val)}"`).join(" "));
@@ -33016,6 +33019,10 @@ class EvaluationConditionalFormatPlugin extends UIPlugin {
33016
33019
  }
33017
33020
  currentRanges = currentRanges.concat(toAdd);
33018
33021
  const newRangesXC = recomputeZones(currentRanges, toRemove);
33022
+ if (newRangesXC.length === 0) {
33023
+ this.dispatch("REMOVE_CONDITIONAL_FORMAT", { id: cf.id, sheetId });
33024
+ return;
33025
+ }
33019
33026
  this.dispatch("ADD_CONDITIONAL_FORMAT", {
33020
33027
  cf: {
33021
33028
  id: cf.id,
@@ -44388,6 +44395,6 @@ function addFunction(functionName, functionDescription) {
44388
44395
  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 };
44389
44396
 
44390
44397
 
44391
- __info__.version = '16.1.23';
44392
- __info__.date = '2023-10-10T07:27:03.376Z';
44393
- __info__.hash = '13bfa8f';
44398
+ __info__.version = '16.1.24';
44399
+ __info__.date = '2023-10-19T14:21:55.097Z';
44400
+ __info__.hash = '1b9e9d0';
@@ -26076,12 +26076,15 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
26076
26076
  };
26077
26077
  }
26078
26078
  function xmlEscape(str) {
26079
- return String(str)
26079
+ return (String(str)
26080
26080
  .replace(/\&/g, "&amp;")
26081
26081
  .replace(/\</g, "&lt;")
26082
26082
  .replace(/\>/g, "&gt;")
26083
26083
  .replace(/\"/g, "&quot;")
26084
- .replace(/\'/g, "&apos;");
26084
+ .replace(/\'/g, "&apos;")
26085
+ // Delete all ASCII control characters except for TAB (\x09), LF (\x0A) and CR (\x0D)
26086
+ // They are not valid at all in XML 1.0 (even escaped)
26087
+ .replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g, ""));
26085
26088
  }
26086
26089
  function formatAttributes(attrs) {
26087
26090
  return new XMLString(attrs.map(([key, val]) => `${key}="${xmlEscape(val)}"`).join(" "));
@@ -33017,6 +33020,10 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
33017
33020
  }
33018
33021
  currentRanges = currentRanges.concat(toAdd);
33019
33022
  const newRangesXC = recomputeZones(currentRanges, toRemove);
33023
+ if (newRangesXC.length === 0) {
33024
+ this.dispatch("REMOVE_CONDITIONAL_FORMAT", { id: cf.id, sheetId });
33025
+ return;
33026
+ }
33020
33027
  this.dispatch("ADD_CONDITIONAL_FORMAT", {
33021
33028
  cf: {
33022
33029
  id: cf.id,
@@ -44419,9 +44426,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
44419
44426
  Object.defineProperty(exports, '__esModule', { value: true });
44420
44427
 
44421
44428
 
44422
- __info__.version = '16.1.23';
44423
- __info__.date = '2023-10-10T07:27:03.376Z';
44424
- __info__.hash = '13bfa8f';
44429
+ __info__.version = '16.1.24';
44430
+ __info__.date = '2023-10-19T14:21:55.097Z';
44431
+ __info__.hash = '1b9e9d0';
44425
44432
 
44426
44433
 
44427
44434
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);