@odoo/o-spreadsheet 19.0.8 → 19.0.9

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 19.0.8
6
- * @date 2025-10-30T12:25:04.355Z
7
- * @hash 559e4e5
5
+ * @version 19.0.9
6
+ * @date 2025-11-03T12:32:15.473Z
7
+ * @hash 10359f4
8
8
  */
9
9
 
10
10
  'use strict';
@@ -34133,7 +34133,7 @@ class ContentEditableHelper {
34133
34133
  else {
34134
34134
  text += NEWLINE;
34135
34135
  }
34136
- emptyParagraph = ["<br>", "<span><br></span>"].includes(current.value.innerHTML);
34136
+ emptyParagraph = isEmptyParagraph(current.value);
34137
34137
  continue;
34138
34138
  }
34139
34139
  if (!current.value.hasChildNodes()) {
@@ -34154,6 +34154,21 @@ function compareContentToSpanElement(content, node) {
34154
34154
  const sameContent = node.innerText === content.value;
34155
34155
  return sameColor && sameClass && sameContent;
34156
34156
  }
34157
+ const doc = new DOMParser();
34158
+ const brNode = doc.parseFromString("<br>", "text/html").body.firstChild;
34159
+ const spanBrNode = doc.parseFromString("<span><br></span>", "text/html").body.firstChild;
34160
+ function isEmptyParagraph(node) {
34161
+ if (node.childNodes.length > 1)
34162
+ return false;
34163
+ const node2 = node.firstChild?.cloneNode(true);
34164
+ if (!node2)
34165
+ return true;
34166
+ if (!(node2 instanceof Element))
34167
+ return false;
34168
+ node2.removeAttribute("class");
34169
+ node2.removeAttribute("style");
34170
+ return node2.isEqualNode(brNode) || node2.isEqualNode(spanBrNode) || false;
34171
+ }
34157
34172
 
34158
34173
  class FunctionDescriptionProvider extends owl.Component {
34159
34174
  static template = "o-spreadsheet-FunctionDescriptionProvider";
@@ -88954,6 +88969,6 @@ exports.tokenColors = tokenColors;
88954
88969
  exports.tokenize = tokenize;
88955
88970
 
88956
88971
 
88957
- __info__.version = "19.0.8";
88958
- __info__.date = "2025-10-30T12:25:04.355Z";
88959
- __info__.hash = "559e4e5";
88972
+ __info__.version = "19.0.9";
88973
+ __info__.date = "2025-11-03T12:32:15.473Z";
88974
+ __info__.hash = "10359f4";
@@ -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 19.0.8
6
- * @date 2025-10-30T12:25:04.355Z
7
- * @hash 559e4e5
5
+ * @version 19.0.9
6
+ * @date 2025-11-03T12:32:15.473Z
7
+ * @hash 10359f4
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, useExternalListener, onWillUpdateProps, onWillStart, onWillPatch, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -34131,7 +34131,7 @@ class ContentEditableHelper {
34131
34131
  else {
34132
34132
  text += NEWLINE;
34133
34133
  }
34134
- emptyParagraph = ["<br>", "<span><br></span>"].includes(current.value.innerHTML);
34134
+ emptyParagraph = isEmptyParagraph(current.value);
34135
34135
  continue;
34136
34136
  }
34137
34137
  if (!current.value.hasChildNodes()) {
@@ -34152,6 +34152,21 @@ function compareContentToSpanElement(content, node) {
34152
34152
  const sameContent = node.innerText === content.value;
34153
34153
  return sameColor && sameClass && sameContent;
34154
34154
  }
34155
+ const doc = new DOMParser();
34156
+ const brNode = doc.parseFromString("<br>", "text/html").body.firstChild;
34157
+ const spanBrNode = doc.parseFromString("<span><br></span>", "text/html").body.firstChild;
34158
+ function isEmptyParagraph(node) {
34159
+ if (node.childNodes.length > 1)
34160
+ return false;
34161
+ const node2 = node.firstChild?.cloneNode(true);
34162
+ if (!node2)
34163
+ return true;
34164
+ if (!(node2 instanceof Element))
34165
+ return false;
34166
+ node2.removeAttribute("class");
34167
+ node2.removeAttribute("style");
34168
+ return node2.isEqualNode(brNode) || node2.isEqualNode(spanBrNode) || false;
34169
+ }
34155
34170
 
34156
34171
  class FunctionDescriptionProvider extends Component {
34157
34172
  static template = "o-spreadsheet-FunctionDescriptionProvider";
@@ -88902,6 +88917,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
88902
88917
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
88903
88918
 
88904
88919
 
88905
- __info__.version = "19.0.8";
88906
- __info__.date = "2025-10-30T12:25:04.355Z";
88907
- __info__.hash = "559e4e5";
88920
+ __info__.version = "19.0.9";
88921
+ __info__.date = "2025-11-03T12:32:15.473Z";
88922
+ __info__.hash = "10359f4";
@@ -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 19.0.8
6
- * @date 2025-10-30T12:25:04.355Z
7
- * @hash 559e4e5
5
+ * @version 19.0.9
6
+ * @date 2025-11-03T12:32:15.473Z
7
+ * @hash 10359f4
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -34132,7 +34132,7 @@ stores.inject(MyMetaStore, storeInstance);
34132
34132
  else {
34133
34133
  text += NEWLINE;
34134
34134
  }
34135
- emptyParagraph = ["<br>", "<span><br></span>"].includes(current.value.innerHTML);
34135
+ emptyParagraph = isEmptyParagraph(current.value);
34136
34136
  continue;
34137
34137
  }
34138
34138
  if (!current.value.hasChildNodes()) {
@@ -34153,6 +34153,21 @@ stores.inject(MyMetaStore, storeInstance);
34153
34153
  const sameContent = node.innerText === content.value;
34154
34154
  return sameColor && sameClass && sameContent;
34155
34155
  }
34156
+ const doc = new DOMParser();
34157
+ const brNode = doc.parseFromString("<br>", "text/html").body.firstChild;
34158
+ const spanBrNode = doc.parseFromString("<span><br></span>", "text/html").body.firstChild;
34159
+ function isEmptyParagraph(node) {
34160
+ if (node.childNodes.length > 1)
34161
+ return false;
34162
+ const node2 = node.firstChild?.cloneNode(true);
34163
+ if (!node2)
34164
+ return true;
34165
+ if (!(node2 instanceof Element))
34166
+ return false;
34167
+ node2.removeAttribute("class");
34168
+ node2.removeAttribute("style");
34169
+ return node2.isEqualNode(brNode) || node2.isEqualNode(spanBrNode) || false;
34170
+ }
34156
34171
 
34157
34172
  class FunctionDescriptionProvider extends owl.Component {
34158
34173
  static template = "o-spreadsheet-FunctionDescriptionProvider";
@@ -88953,9 +88968,9 @@ stores.inject(MyMetaStore, storeInstance);
88953
88968
  exports.tokenize = tokenize;
88954
88969
 
88955
88970
 
88956
- __info__.version = "19.0.8";
88957
- __info__.date = "2025-10-30T12:25:04.355Z";
88958
- __info__.hash = "559e4e5";
88971
+ __info__.version = "19.0.9";
88972
+ __info__.date = "2025-11-03T12:32:15.473Z";
88973
+ __info__.hash = "10359f4";
88959
88974
 
88960
88975
 
88961
88976
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);