@odoo/o-spreadsheet 18.0.21 → 18.0.22

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 18.0.21
6
- * @date 2025-03-26T12:49:46.872Z
7
- * @hash c687e1c
5
+ * @version 18.0.22
6
+ * @date 2025-04-04T08:42:35.352Z
7
+ * @hash 89a3279
8
8
  */
9
9
 
10
10
  'use strict';
@@ -802,8 +802,7 @@ function removeFalsyAttributes(obj) {
802
802
  *
803
803
  * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes
804
804
  */
805
- const whiteSpaceSpecialCharacters = [
806
- " ",
805
+ const specialWhiteSpaceSpecialCharacters = [
807
806
  "\t",
808
807
  "\f",
809
808
  "\v",
@@ -818,7 +817,7 @@ const whiteSpaceSpecialCharacters = [
818
817
  String.fromCharCode(parseInt("3000", 16)),
819
818
  String.fromCharCode(parseInt("feff", 16)),
820
819
  ];
821
- const whiteSpaceRegexp = new RegExp(whiteSpaceSpecialCharacters.join("|"), "g");
820
+ const specialWhiteSpaceRegexp = new RegExp(specialWhiteSpaceSpecialCharacters.join("|"), "g");
822
821
  const newLineRegexp = /(\r\n|\r)/g;
823
822
  /**
824
823
  * Replace all different newlines characters by \n
@@ -6635,8 +6634,12 @@ function tokenize(str, locale = DEFAULT_LOCALE) {
6635
6634
  str = replaceNewLines(str);
6636
6635
  const chars = new TokenizingChars(str);
6637
6636
  const result = [];
6637
+ const tokenizeSpace = specialWhiteSpaceRegexp.test(str)
6638
+ ? tokenizeSpecialCharacterSpace
6639
+ : tokenizeSimpleSpace;
6638
6640
  while (!chars.isOver()) {
6639
- let token = tokenizeSpace(chars) ||
6641
+ let token = tokenizeNewLine(chars) ||
6642
+ tokenizeSpace(chars) ||
6640
6643
  tokenizeArgsSeparator(chars, locale) ||
6641
6644
  tokenizeParenthesis(chars) ||
6642
6645
  tokenizeOperator(chars) ||
@@ -6770,17 +6773,19 @@ function tokenizeSymbol(chars) {
6770
6773
  }
6771
6774
  return null;
6772
6775
  }
6773
- function tokenizeSpace(chars) {
6774
- let length = 0;
6775
- while (chars.current === NEWLINE) {
6776
- length++;
6777
- chars.shift();
6776
+ function tokenizeSpecialCharacterSpace(chars) {
6777
+ let spaces = "";
6778
+ while (chars.current === " " || (chars.current && chars.current.match(specialWhiteSpaceRegexp))) {
6779
+ spaces += chars.shift();
6778
6780
  }
6779
- if (length) {
6780
- return { type: "SPACE", value: NEWLINE.repeat(length) };
6781
+ if (spaces) {
6782
+ return { type: "SPACE", value: spaces };
6781
6783
  }
6784
+ return null;
6785
+ }
6786
+ function tokenizeSimpleSpace(chars) {
6782
6787
  let spaces = "";
6783
- while (chars.current && chars.current.match(whiteSpaceRegexp)) {
6788
+ while (chars.current === " ") {
6784
6789
  spaces += chars.shift();
6785
6790
  }
6786
6791
  if (spaces) {
@@ -6788,6 +6793,17 @@ function tokenizeSpace(chars) {
6788
6793
  }
6789
6794
  return null;
6790
6795
  }
6796
+ function tokenizeNewLine(chars) {
6797
+ let length = 0;
6798
+ while (chars.current === NEWLINE) {
6799
+ length++;
6800
+ chars.shift();
6801
+ }
6802
+ if (length) {
6803
+ return { type: "SPACE", value: NEWLINE.repeat(length) };
6804
+ }
6805
+ return null;
6806
+ }
6791
6807
  function tokenizeInvalidRange(chars) {
6792
6808
  if (chars.currentStartsWith(CellErrorType.InvalidReference)) {
6793
6809
  chars.advanceBy(CellErrorType.InvalidReference.length);
@@ -42787,7 +42803,8 @@ css /* scss */ `
42787
42803
  &.pivot-dimension-invalid {
42788
42804
  background-color: #ffdddd;
42789
42805
  border-color: red !important;
42790
- select {
42806
+ select,
42807
+ input {
42791
42808
  background-color: #ffdddd;
42792
42809
  }
42793
42810
  }
@@ -44534,7 +44551,7 @@ class PivotSidePanelStore extends SpreadsheetStore {
44534
44551
  this.notification.notifyUser({
44535
44552
  type: "info",
44536
44553
  text: _t("Pivot updates only work with dynamic pivot tables. Use %s or re-insert the static pivot from the Data menu.", pivotExample),
44537
- sticky: false,
44554
+ sticky: true,
44538
44555
  });
44539
44556
  }
44540
44557
  }
@@ -73616,6 +73633,6 @@ exports.tokenColors = tokenColors;
73616
73633
  exports.tokenize = tokenize;
73617
73634
 
73618
73635
 
73619
- __info__.version = "18.0.21";
73620
- __info__.date = "2025-03-26T12:49:46.872Z";
73621
- __info__.hash = "c687e1c";
73636
+ __info__.version = "18.0.22";
73637
+ __info__.date = "2025-04-04T08:42:35.352Z";
73638
+ __info__.hash = "89a3279";
@@ -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 18.0.21
6
- * @date 2025-03-26T12:49:46.872Z
7
- * @hash c687e1c
5
+ * @version 18.0.22
6
+ * @date 2025-04-04T08:42:35.352Z
7
+ * @hash 89a3279
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -800,8 +800,7 @@ function removeFalsyAttributes(obj) {
800
800
  *
801
801
  * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes
802
802
  */
803
- const whiteSpaceSpecialCharacters = [
804
- " ",
803
+ const specialWhiteSpaceSpecialCharacters = [
805
804
  "\t",
806
805
  "\f",
807
806
  "\v",
@@ -816,7 +815,7 @@ const whiteSpaceSpecialCharacters = [
816
815
  String.fromCharCode(parseInt("3000", 16)),
817
816
  String.fromCharCode(parseInt("feff", 16)),
818
817
  ];
819
- const whiteSpaceRegexp = new RegExp(whiteSpaceSpecialCharacters.join("|"), "g");
818
+ const specialWhiteSpaceRegexp = new RegExp(specialWhiteSpaceSpecialCharacters.join("|"), "g");
820
819
  const newLineRegexp = /(\r\n|\r)/g;
821
820
  /**
822
821
  * Replace all different newlines characters by \n
@@ -6633,8 +6632,12 @@ function tokenize(str, locale = DEFAULT_LOCALE) {
6633
6632
  str = replaceNewLines(str);
6634
6633
  const chars = new TokenizingChars(str);
6635
6634
  const result = [];
6635
+ const tokenizeSpace = specialWhiteSpaceRegexp.test(str)
6636
+ ? tokenizeSpecialCharacterSpace
6637
+ : tokenizeSimpleSpace;
6636
6638
  while (!chars.isOver()) {
6637
- let token = tokenizeSpace(chars) ||
6639
+ let token = tokenizeNewLine(chars) ||
6640
+ tokenizeSpace(chars) ||
6638
6641
  tokenizeArgsSeparator(chars, locale) ||
6639
6642
  tokenizeParenthesis(chars) ||
6640
6643
  tokenizeOperator(chars) ||
@@ -6768,17 +6771,19 @@ function tokenizeSymbol(chars) {
6768
6771
  }
6769
6772
  return null;
6770
6773
  }
6771
- function tokenizeSpace(chars) {
6772
- let length = 0;
6773
- while (chars.current === NEWLINE) {
6774
- length++;
6775
- chars.shift();
6774
+ function tokenizeSpecialCharacterSpace(chars) {
6775
+ let spaces = "";
6776
+ while (chars.current === " " || (chars.current && chars.current.match(specialWhiteSpaceRegexp))) {
6777
+ spaces += chars.shift();
6776
6778
  }
6777
- if (length) {
6778
- return { type: "SPACE", value: NEWLINE.repeat(length) };
6779
+ if (spaces) {
6780
+ return { type: "SPACE", value: spaces };
6779
6781
  }
6782
+ return null;
6783
+ }
6784
+ function tokenizeSimpleSpace(chars) {
6780
6785
  let spaces = "";
6781
- while (chars.current && chars.current.match(whiteSpaceRegexp)) {
6786
+ while (chars.current === " ") {
6782
6787
  spaces += chars.shift();
6783
6788
  }
6784
6789
  if (spaces) {
@@ -6786,6 +6791,17 @@ function tokenizeSpace(chars) {
6786
6791
  }
6787
6792
  return null;
6788
6793
  }
6794
+ function tokenizeNewLine(chars) {
6795
+ let length = 0;
6796
+ while (chars.current === NEWLINE) {
6797
+ length++;
6798
+ chars.shift();
6799
+ }
6800
+ if (length) {
6801
+ return { type: "SPACE", value: NEWLINE.repeat(length) };
6802
+ }
6803
+ return null;
6804
+ }
6789
6805
  function tokenizeInvalidRange(chars) {
6790
6806
  if (chars.currentStartsWith(CellErrorType.InvalidReference)) {
6791
6807
  chars.advanceBy(CellErrorType.InvalidReference.length);
@@ -42785,7 +42801,8 @@ css /* scss */ `
42785
42801
  &.pivot-dimension-invalid {
42786
42802
  background-color: #ffdddd;
42787
42803
  border-color: red !important;
42788
- select {
42804
+ select,
42805
+ input {
42789
42806
  background-color: #ffdddd;
42790
42807
  }
42791
42808
  }
@@ -44532,7 +44549,7 @@ class PivotSidePanelStore extends SpreadsheetStore {
44532
44549
  this.notification.notifyUser({
44533
44550
  type: "info",
44534
44551
  text: _t("Pivot updates only work with dynamic pivot tables. Use %s or re-insert the static pivot from the Data menu.", pivotExample),
44535
- sticky: false,
44552
+ sticky: true,
44536
44553
  });
44537
44554
  }
44538
44555
  }
@@ -73571,6 +73588,6 @@ const constants = {
73571
73588
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
73572
73589
 
73573
73590
 
73574
- __info__.version = "18.0.21";
73575
- __info__.date = "2025-03-26T12:49:46.872Z";
73576
- __info__.hash = "c687e1c";
73591
+ __info__.version = "18.0.22";
73592
+ __info__.date = "2025-04-04T08:42:35.352Z";
73593
+ __info__.hash = "89a3279";
@@ -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 18.0.21
6
- * @date 2025-03-26T12:49:46.872Z
7
- * @hash c687e1c
5
+ * @version 18.0.22
6
+ * @date 2025-04-04T08:42:35.352Z
7
+ * @hash 89a3279
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -801,8 +801,7 @@
801
801
  *
802
802
  * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes
803
803
  */
804
- const whiteSpaceSpecialCharacters = [
805
- " ",
804
+ const specialWhiteSpaceSpecialCharacters = [
806
805
  "\t",
807
806
  "\f",
808
807
  "\v",
@@ -817,7 +816,7 @@
817
816
  String.fromCharCode(parseInt("3000", 16)),
818
817
  String.fromCharCode(parseInt("feff", 16)),
819
818
  ];
820
- const whiteSpaceRegexp = new RegExp(whiteSpaceSpecialCharacters.join("|"), "g");
819
+ const specialWhiteSpaceRegexp = new RegExp(specialWhiteSpaceSpecialCharacters.join("|"), "g");
821
820
  const newLineRegexp = /(\r\n|\r)/g;
822
821
  /**
823
822
  * Replace all different newlines characters by \n
@@ -6634,8 +6633,12 @@
6634
6633
  str = replaceNewLines(str);
6635
6634
  const chars = new TokenizingChars(str);
6636
6635
  const result = [];
6636
+ const tokenizeSpace = specialWhiteSpaceRegexp.test(str)
6637
+ ? tokenizeSpecialCharacterSpace
6638
+ : tokenizeSimpleSpace;
6637
6639
  while (!chars.isOver()) {
6638
- let token = tokenizeSpace(chars) ||
6640
+ let token = tokenizeNewLine(chars) ||
6641
+ tokenizeSpace(chars) ||
6639
6642
  tokenizeArgsSeparator(chars, locale) ||
6640
6643
  tokenizeParenthesis(chars) ||
6641
6644
  tokenizeOperator(chars) ||
@@ -6769,17 +6772,19 @@
6769
6772
  }
6770
6773
  return null;
6771
6774
  }
6772
- function tokenizeSpace(chars) {
6773
- let length = 0;
6774
- while (chars.current === NEWLINE) {
6775
- length++;
6776
- chars.shift();
6775
+ function tokenizeSpecialCharacterSpace(chars) {
6776
+ let spaces = "";
6777
+ while (chars.current === " " || (chars.current && chars.current.match(specialWhiteSpaceRegexp))) {
6778
+ spaces += chars.shift();
6777
6779
  }
6778
- if (length) {
6779
- return { type: "SPACE", value: NEWLINE.repeat(length) };
6780
+ if (spaces) {
6781
+ return { type: "SPACE", value: spaces };
6780
6782
  }
6783
+ return null;
6784
+ }
6785
+ function tokenizeSimpleSpace(chars) {
6781
6786
  let spaces = "";
6782
- while (chars.current && chars.current.match(whiteSpaceRegexp)) {
6787
+ while (chars.current === " ") {
6783
6788
  spaces += chars.shift();
6784
6789
  }
6785
6790
  if (spaces) {
@@ -6787,6 +6792,17 @@
6787
6792
  }
6788
6793
  return null;
6789
6794
  }
6795
+ function tokenizeNewLine(chars) {
6796
+ let length = 0;
6797
+ while (chars.current === NEWLINE) {
6798
+ length++;
6799
+ chars.shift();
6800
+ }
6801
+ if (length) {
6802
+ return { type: "SPACE", value: NEWLINE.repeat(length) };
6803
+ }
6804
+ return null;
6805
+ }
6790
6806
  function tokenizeInvalidRange(chars) {
6791
6807
  if (chars.currentStartsWith(CellErrorType.InvalidReference)) {
6792
6808
  chars.advanceBy(CellErrorType.InvalidReference.length);
@@ -42786,7 +42802,8 @@ stores.inject(MyMetaStore, storeInstance);
42786
42802
  &.pivot-dimension-invalid {
42787
42803
  background-color: #ffdddd;
42788
42804
  border-color: red !important;
42789
- select {
42805
+ select,
42806
+ input {
42790
42807
  background-color: #ffdddd;
42791
42808
  }
42792
42809
  }
@@ -44533,7 +44550,7 @@ stores.inject(MyMetaStore, storeInstance);
44533
44550
  this.notification.notifyUser({
44534
44551
  type: "info",
44535
44552
  text: _t("Pivot updates only work with dynamic pivot tables. Use %s or re-insert the static pivot from the Data menu.", pivotExample),
44536
- sticky: false,
44553
+ sticky: true,
44537
44554
  });
44538
44555
  }
44539
44556
  }
@@ -73615,9 +73632,9 @@ stores.inject(MyMetaStore, storeInstance);
73615
73632
  exports.tokenize = tokenize;
73616
73633
 
73617
73634
 
73618
- __info__.version = "18.0.21";
73619
- __info__.date = "2025-03-26T12:49:46.872Z";
73620
- __info__.hash = "c687e1c";
73635
+ __info__.version = "18.0.22";
73636
+ __info__.date = "2025-04-04T08:42:35.352Z";
73637
+ __info__.hash = "89a3279";
73621
73638
 
73622
73639
 
73623
73640
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);