@odoo/o-spreadsheet 17.0.37 → 17.0.39

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 17.0.37
6
- * @date 2024-09-05T09:30:59.083Z
7
- * @hash b1873b5
5
+ * @version 17.0.39
6
+ * @date 2024-11-08T12:12:25.844Z
7
+ * @hash 454752f
8
8
  */
9
9
 
10
10
  'use strict';
@@ -272,7 +272,7 @@ const DEFAULT_STYLE = {
272
272
  underline: false,
273
273
  fontSize: 10,
274
274
  fillColor: "",
275
- textColor: "#000000",
275
+ textColor: "",
276
276
  };
277
277
  const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
278
278
  const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
@@ -35090,7 +35090,10 @@ function parseOperand(tokens) {
35090
35090
  case "STRING":
35091
35091
  return { type: "STRING", value: removeStringQuotes(current.value) };
35092
35092
  case "INVALID_REFERENCE":
35093
- throw new InvalidReferenceError();
35093
+ return {
35094
+ type: "REFERENCE",
35095
+ value: CellErrorType.InvalidReference,
35096
+ };
35094
35097
  case "REFERENCE":
35095
35098
  if (tokens[0]?.value === ":" && tokens[1]?.type === "REFERENCE") {
35096
35099
  tokens.shift();
@@ -44729,6 +44732,7 @@ class Session extends EventBus {
44729
44732
  case "REMOTE_REVISION":
44730
44733
  case "REVISION_REDONE":
44731
44734
  case "REVISION_UNDONE":
44735
+ case "SNAPSHOT_CREATED":
44732
44736
  return this.processedRevisions.has(message.nextRevisionId);
44733
44737
  default:
44734
44738
  return false;
@@ -55814,7 +55818,8 @@ function addFormula(cell) {
55814
55818
  }
55815
55819
  const attrs = [["t", type]];
55816
55820
  const XlsxFormula = adaptFormulaToExcel(formula);
55817
- const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${cell.value}</v>`;
55821
+ const exportedValue = adaptFormulaValueToExcel(cell.value);
55822
+ const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${exportedValue}</v>`;
55818
55823
  return { attrs, node };
55819
55824
  }
55820
55825
  function addContent(content, sharedStrings, forceString = false) {
@@ -55849,8 +55854,14 @@ function adaptFormulaToExcel(formulaText) {
55849
55854
  ast = addMissingRequiredArgs(ast);
55850
55855
  return ast;
55851
55856
  });
55857
+ ast = convertAstNodes(ast, "REFERENCE", (ast) => {
55858
+ return ast.value === CellErrorType.InvalidReference ? { ...ast, value: "#REF!" } : ast;
55859
+ });
55852
55860
  return ast ? astToFormula(ast) : formulaText;
55853
55861
  }
55862
+ function adaptFormulaValueToExcel(formulaValue) {
55863
+ return formulaValue === CellErrorType.InvalidReference ? "#REF!" : formulaValue;
55864
+ }
55854
55865
  /**
55855
55866
  * Some Excel function need required args that might not be mandatory in o-spreadsheet.
55856
55867
  * This adds those missing args.
@@ -57646,6 +57657,6 @@ exports.setTranslationMethod = setTranslationMethod;
57646
57657
  exports.tokenize = tokenize;
57647
57658
 
57648
57659
 
57649
- __info__.version = "17.0.37";
57650
- __info__.date = "2024-09-05T09:30:59.083Z";
57651
- __info__.hash = "b1873b5";
57660
+ __info__.version = "17.0.39";
57661
+ __info__.date = "2024-11-08T12:12:25.844Z";
57662
+ __info__.hash = "454752f";
@@ -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 17.0.37
6
- * @date 2024-09-05T09:30:59.083Z
7
- * @hash b1873b5
5
+ * @version 17.0.39
6
+ * @date 2024-11-08T12:12:25.844Z
7
+ * @hash 454752f
8
8
  */
9
9
 
10
10
  import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
@@ -270,7 +270,7 @@ const DEFAULT_STYLE = {
270
270
  underline: false,
271
271
  fontSize: 10,
272
272
  fillColor: "",
273
- textColor: "#000000",
273
+ textColor: "",
274
274
  };
275
275
  const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
276
276
  const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
@@ -35088,7 +35088,10 @@ function parseOperand(tokens) {
35088
35088
  case "STRING":
35089
35089
  return { type: "STRING", value: removeStringQuotes(current.value) };
35090
35090
  case "INVALID_REFERENCE":
35091
- throw new InvalidReferenceError();
35091
+ return {
35092
+ type: "REFERENCE",
35093
+ value: CellErrorType.InvalidReference,
35094
+ };
35092
35095
  case "REFERENCE":
35093
35096
  if (tokens[0]?.value === ":" && tokens[1]?.type === "REFERENCE") {
35094
35097
  tokens.shift();
@@ -44727,6 +44730,7 @@ class Session extends EventBus {
44727
44730
  case "REMOTE_REVISION":
44728
44731
  case "REVISION_REDONE":
44729
44732
  case "REVISION_UNDONE":
44733
+ case "SNAPSHOT_CREATED":
44730
44734
  return this.processedRevisions.has(message.nextRevisionId);
44731
44735
  default:
44732
44736
  return false;
@@ -55812,7 +55816,8 @@ function addFormula(cell) {
55812
55816
  }
55813
55817
  const attrs = [["t", type]];
55814
55818
  const XlsxFormula = adaptFormulaToExcel(formula);
55815
- const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${cell.value}</v>`;
55819
+ const exportedValue = adaptFormulaValueToExcel(cell.value);
55820
+ const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${exportedValue}</v>`;
55816
55821
  return { attrs, node };
55817
55822
  }
55818
55823
  function addContent(content, sharedStrings, forceString = false) {
@@ -55847,8 +55852,14 @@ function adaptFormulaToExcel(formulaText) {
55847
55852
  ast = addMissingRequiredArgs(ast);
55848
55853
  return ast;
55849
55854
  });
55855
+ ast = convertAstNodes(ast, "REFERENCE", (ast) => {
55856
+ return ast.value === CellErrorType.InvalidReference ? { ...ast, value: "#REF!" } : ast;
55857
+ });
55850
55858
  return ast ? astToFormula(ast) : formulaText;
55851
55859
  }
55860
+ function adaptFormulaValueToExcel(formulaValue) {
55861
+ return formulaValue === CellErrorType.InvalidReference ? "#REF!" : formulaValue;
55862
+ }
55852
55863
  /**
55853
55864
  * Some Excel function need required args that might not be mandatory in o-spreadsheet.
55854
55865
  * This adds those missing args.
@@ -57609,6 +57620,6 @@ const constants = {
57609
57620
  export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
57610
57621
 
57611
57622
 
57612
- __info__.version = "17.0.37";
57613
- __info__.date = "2024-09-05T09:30:59.083Z";
57614
- __info__.hash = "b1873b5";
57623
+ __info__.version = "17.0.39";
57624
+ __info__.date = "2024-11-08T12:12:25.844Z";
57625
+ __info__.hash = "454752f";
@@ -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 17.0.37
6
- * @date 2024-09-05T09:30:59.083Z
7
- * @hash b1873b5
5
+ * @version 17.0.39
6
+ * @date 2024-11-08T12:12:25.844Z
7
+ * @hash 454752f
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -271,7 +271,7 @@
271
271
  underline: false,
272
272
  fontSize: 10,
273
273
  fillColor: "",
274
- textColor: "#000000",
274
+ textColor: "",
275
275
  };
276
276
  const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
277
277
  const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
@@ -35089,7 +35089,10 @@
35089
35089
  case "STRING":
35090
35090
  return { type: "STRING", value: removeStringQuotes(current.value) };
35091
35091
  case "INVALID_REFERENCE":
35092
- throw new InvalidReferenceError();
35092
+ return {
35093
+ type: "REFERENCE",
35094
+ value: CellErrorType.InvalidReference,
35095
+ };
35093
35096
  case "REFERENCE":
35094
35097
  if (tokens[0]?.value === ":" && tokens[1]?.type === "REFERENCE") {
35095
35098
  tokens.shift();
@@ -44728,6 +44731,7 @@
44728
44731
  case "REMOTE_REVISION":
44729
44732
  case "REVISION_REDONE":
44730
44733
  case "REVISION_UNDONE":
44734
+ case "SNAPSHOT_CREATED":
44731
44735
  return this.processedRevisions.has(message.nextRevisionId);
44732
44736
  default:
44733
44737
  return false;
@@ -55813,7 +55817,8 @@
55813
55817
  }
55814
55818
  const attrs = [["t", type]];
55815
55819
  const XlsxFormula = adaptFormulaToExcel(formula);
55816
- const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${cell.value}</v>`;
55820
+ const exportedValue = adaptFormulaValueToExcel(cell.value);
55821
+ const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${exportedValue}</v>`;
55817
55822
  return { attrs, node };
55818
55823
  }
55819
55824
  function addContent(content, sharedStrings, forceString = false) {
@@ -55848,8 +55853,14 @@
55848
55853
  ast = addMissingRequiredArgs(ast);
55849
55854
  return ast;
55850
55855
  });
55856
+ ast = convertAstNodes(ast, "REFERENCE", (ast) => {
55857
+ return ast.value === CellErrorType.InvalidReference ? { ...ast, value: "#REF!" } : ast;
55858
+ });
55851
55859
  return ast ? astToFormula(ast) : formulaText;
55852
55860
  }
55861
+ function adaptFormulaValueToExcel(formulaValue) {
55862
+ return formulaValue === CellErrorType.InvalidReference ? "#REF!" : formulaValue;
55863
+ }
55853
55864
  /**
55854
55865
  * Some Excel function need required args that might not be mandatory in o-spreadsheet.
55855
55866
  * This adds those missing args.
@@ -57645,9 +57656,9 @@
57645
57656
  exports.tokenize = tokenize;
57646
57657
 
57647
57658
 
57648
- __info__.version = "17.0.37";
57649
- __info__.date = "2024-09-05T09:30:59.083Z";
57650
- __info__.hash = "b1873b5";
57659
+ __info__.version = "17.0.39";
57660
+ __info__.date = "2024-11-08T12:12:25.844Z";
57661
+ __info__.hash = "454752f";
57651
57662
 
57652
57663
 
57653
57664
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);