@odoo/o-spreadsheet 17.1.21 → 17.1.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 17.1.21
6
- * @date 2024-07-02T10:35:57.801Z
7
- * @hash ec4c09b
5
+ * @version 17.1.22
6
+ * @date 2024-07-08T05:41:57.737Z
7
+ * @hash da27a94
8
8
  */
9
9
 
10
10
  'use strict';
@@ -1704,7 +1704,7 @@ const getFormulaNumberRegex = memoize(function getFormulaNumberRegex(decimalSepa
1704
1704
  });
1705
1705
  const getNumberRegex = memoize(function getNumberRegex(locale) {
1706
1706
  const decimalSeparator = escapeRegExp(locale.decimalSeparator);
1707
- const thousandsSeparator = escapeRegExp(locale.thousandsSeparator);
1707
+ const thousandsSeparator = escapeRegExp(locale.thousandsSeparator || "");
1708
1708
  const pIntegerAndDecimals = `(\\d+(${thousandsSeparator}\\d{3,})*(${decimalSeparator}\\d*)?)`; // pattern that match integer number with or without decimal digits
1709
1709
  const pOnlyDecimals = `(${decimalSeparator}\\d+)`; // pattern that match only expression with decimal digits
1710
1710
  const pScientificFormat = "(e(\\+|-)?\\d+)?"; // pattern that match scientific format between zero and one time (should be placed before pPercentFormat)
@@ -1731,7 +1731,7 @@ function isNumber(value, locale) {
1731
1731
  return getNumberRegex(locale).test(value.trim());
1732
1732
  }
1733
1733
  const getInvaluableSymbolsRegexp = memoize(function getInvaluableSymbolsRegexp(locale) {
1734
- return new RegExp(`[\$€${escapeRegExp(locale.thousandsSeparator)}]`, "g");
1734
+ return new RegExp(`[\$€${escapeRegExp(locale.thousandsSeparator || "")}]`, "g");
1735
1735
  });
1736
1736
  /**
1737
1737
  * Convert a string into a number. It assumes that the string actually represents
@@ -7718,19 +7718,22 @@ class TokenizingChars {
7718
7718
  }
7719
7719
 
7720
7720
  function isValidLocale(locale) {
7721
- if (!(locale &&
7722
- typeof locale === "object" &&
7723
- typeof locale.name === "string" &&
7724
- typeof locale.code === "string" &&
7725
- typeof locale.thousandsSeparator === "string" &&
7726
- typeof locale.decimalSeparator === "string" &&
7727
- typeof locale.dateFormat === "string" &&
7728
- typeof locale.timeFormat === "string" &&
7729
- typeof locale.formulaArgSeparator === "string")) {
7721
+ if (!locale ||
7722
+ typeof locale !== "object" ||
7723
+ !(!locale.thousandsSeparator || typeof locale.thousandsSeparator === "string")) {
7730
7724
  return false;
7731
7725
  }
7732
- if (!Object.values(locale).every((v) => v)) {
7733
- return false;
7726
+ for (const property of [
7727
+ "code",
7728
+ "name",
7729
+ "decimalSeparator",
7730
+ "dateFormat",
7731
+ "timeFormat",
7732
+ "formulaArgSeparator",
7733
+ ]) {
7734
+ if (!locale[property] || typeof locale[property] !== "string") {
7735
+ return false;
7736
+ }
7734
7737
  }
7735
7738
  if (locale.formulaArgSeparator === locale.decimalSeparator) {
7736
7739
  return false;
@@ -7828,7 +7831,10 @@ function canonicalizeNumberLiteral(content, locale) {
7828
7831
  if (locale.decimalSeparator === "." || !isNumber(content, locale)) {
7829
7832
  return content;
7830
7833
  }
7831
- return content.replace(locale.thousandsSeparator, "").replace(locale.decimalSeparator, ".");
7834
+ if (locale.thousandsSeparator) {
7835
+ content = content.replaceAll(locale.thousandsSeparator, "");
7836
+ }
7837
+ return content.replace(locale.decimalSeparator, ".");
7832
7838
  }
7833
7839
  /**
7834
7840
  * Change a content string from the given locale to its canonical form (en_US locale). Also convert date string.
@@ -9507,15 +9513,6 @@ function createLineChartRuntime(chart, getters) {
9507
9513
  }
9508
9514
  const colors = new ChartColors();
9509
9515
  for (let [index, { label, data }] of dataSetsValues.entries()) {
9510
- if (["linear", "time"].includes(axisType)) {
9511
- // Replace empty string labels by undefined to make sure chartJS doesn't decide that "" is the same as 0
9512
- data = data.map((y, index) => ({ x: labels[index] || undefined, y }));
9513
- }
9514
- const color = colors.next();
9515
- let backgroundRGBA = colorToRGBA(color);
9516
- if (chart.stacked) {
9517
- backgroundRGBA.a = LINE_FILL_TRANSPARENCY;
9518
- }
9519
9516
  if (chart.cumulative) {
9520
9517
  let accumulator = 0;
9521
9518
  data = data.map((value) => {
@@ -9526,6 +9523,15 @@ function createLineChartRuntime(chart, getters) {
9526
9523
  return value;
9527
9524
  });
9528
9525
  }
9526
+ if (["linear", "time"].includes(axisType)) {
9527
+ // Replace empty string labels by undefined to make sure chartJS doesn't decide that "" is the same as 0
9528
+ data = data.map((y, index) => ({ x: labels[index] || undefined, y }));
9529
+ }
9530
+ const color = colors.next();
9531
+ let backgroundRGBA = colorToRGBA(color);
9532
+ if (chart.stacked) {
9533
+ backgroundRGBA.a = LINE_FILL_TRANSPARENCY;
9534
+ }
9529
9535
  const backgroundColor = rgbaToHex(backgroundRGBA);
9530
9536
  const dataset = {
9531
9537
  label,
@@ -24781,7 +24787,13 @@ class SettingsPanel extends owl.Component {
24781
24787
  }
24782
24788
  async loadLocales() {
24783
24789
  this.loadedLocales = (await this.env.loadLocales())
24784
- .filter(isValidLocale)
24790
+ .filter((locale) => {
24791
+ const isValid = isValidLocale(locale);
24792
+ if (!isValid) {
24793
+ console.warn(`Invalid locale: ${locale["code"]} ${locale}`);
24794
+ }
24795
+ return isValid;
24796
+ })
24785
24797
  .sort((a, b) => a.name.localeCompare(b.name));
24786
24798
  }
24787
24799
  get numberFormatPreview() {
@@ -30537,6 +30549,7 @@ class Grid extends owl.Component {
30537
30549
  return;
30538
30550
  }
30539
30551
  if (clipboardData.types.indexOf(ClipboardMIMEType.PlainText) > -1) {
30552
+ ev.preventDefault();
30540
30553
  const content = clipboardData.getData(ClipboardMIMEType.PlainText);
30541
30554
  const target = this.env.model.getters.getSelectedZones();
30542
30555
  const clipboardString = this.env.model.getters.getClipboardTextContent();
@@ -35134,6 +35147,21 @@ class BordersPlugin extends CorePlugin {
35134
35147
  return [];
35135
35148
  return Object.keys(sheetBorders).map((index) => parseInt(index, 10));
35136
35149
  }
35150
+ /**
35151
+ * Get all the rows which contains at least a border
35152
+ */
35153
+ getRowsWithBorders(sheetId) {
35154
+ const sheetBorders = this.borders[sheetId]?.filter(isDefined$1);
35155
+ if (!sheetBorders)
35156
+ return [];
35157
+ const rowsWithBorders = new Set();
35158
+ for (const rowBorders of sheetBorders) {
35159
+ for (const rowBorder in rowBorders) {
35160
+ rowsWithBorders.add(parseInt(rowBorder, 10));
35161
+ }
35162
+ }
35163
+ return Array.from(rowsWithBorders);
35164
+ }
35137
35165
  /**
35138
35166
  * Get the range of all the rows in the sheet
35139
35167
  */
@@ -35183,7 +35211,7 @@ class BordersPlugin extends CorePlugin {
35183
35211
  destructive: false,
35184
35212
  });
35185
35213
  }
35186
- this.getRowsRange(sheetId)
35214
+ this.getRowsWithBorders(sheetId)
35187
35215
  .filter((row) => row >= start)
35188
35216
  .sort((a, b) => (delta < 0 ? a - b : b - a)) // start by the end when moving up
35189
35217
  .forEach((row) => {
@@ -35638,7 +35666,7 @@ function parseExpression(tokens, parent_priority = 0) {
35638
35666
  * Parse an expression (as a string) into an AST.
35639
35667
  */
35640
35668
  function parse(str) {
35641
- return parseTokens(tokenize(str));
35669
+ return parseTokens(rangeTokenize(str));
35642
35670
  }
35643
35671
  function parseTokens(tokens) {
35644
35672
  tokens = tokens.filter((x) => x.type !== "SPACE");
@@ -57839,6 +57867,6 @@ exports.setTranslationMethod = setTranslationMethod;
57839
57867
  exports.tokenize = tokenize;
57840
57868
 
57841
57869
 
57842
- __info__.version = "17.1.21";
57843
- __info__.date = "2024-07-02T10:35:57.801Z";
57844
- __info__.hash = "ec4c09b";
57870
+ __info__.version = "17.1.22";
57871
+ __info__.date = "2024-07-08T05:41:57.737Z";
57872
+ __info__.hash = "da27a94";
@@ -2736,7 +2736,7 @@ type LocaleCode = string & Alias;
2736
2736
  interface Locale {
2737
2737
  name: string;
2738
2738
  code: LocaleCode;
2739
- thousandsSeparator: string;
2739
+ thousandsSeparator?: string;
2740
2740
  decimalSeparator: string;
2741
2741
  dateFormat: string;
2742
2742
  timeFormat: string;
@@ -3189,6 +3189,10 @@ declare class BordersPlugin extends CorePlugin<BordersPluginState> implements Bo
3189
3189
  * Get all the columns which contains at least a border
3190
3190
  */
3191
3191
  private getColumnsWithBorders;
3192
+ /**
3193
+ * Get all the rows which contains at least a border
3194
+ */
3195
+ private getRowsWithBorders;
3192
3196
  /**
3193
3197
  * Get the range of all the rows in the sheet
3194
3198
  */
@@ -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.1.21
6
- * @date 2024-07-02T10:35:57.801Z
7
- * @hash ec4c09b
5
+ * @version 17.1.22
6
+ * @date 2024-07-08T05:41:57.737Z
7
+ * @hash da27a94
8
8
  */
9
9
 
10
10
  import { Component, useRef, onMounted, onWillUnmount, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
@@ -1702,7 +1702,7 @@ const getFormulaNumberRegex = memoize(function getFormulaNumberRegex(decimalSepa
1702
1702
  });
1703
1703
  const getNumberRegex = memoize(function getNumberRegex(locale) {
1704
1704
  const decimalSeparator = escapeRegExp(locale.decimalSeparator);
1705
- const thousandsSeparator = escapeRegExp(locale.thousandsSeparator);
1705
+ const thousandsSeparator = escapeRegExp(locale.thousandsSeparator || "");
1706
1706
  const pIntegerAndDecimals = `(\\d+(${thousandsSeparator}\\d{3,})*(${decimalSeparator}\\d*)?)`; // pattern that match integer number with or without decimal digits
1707
1707
  const pOnlyDecimals = `(${decimalSeparator}\\d+)`; // pattern that match only expression with decimal digits
1708
1708
  const pScientificFormat = "(e(\\+|-)?\\d+)?"; // pattern that match scientific format between zero and one time (should be placed before pPercentFormat)
@@ -1729,7 +1729,7 @@ function isNumber(value, locale) {
1729
1729
  return getNumberRegex(locale).test(value.trim());
1730
1730
  }
1731
1731
  const getInvaluableSymbolsRegexp = memoize(function getInvaluableSymbolsRegexp(locale) {
1732
- return new RegExp(`[\$€${escapeRegExp(locale.thousandsSeparator)}]`, "g");
1732
+ return new RegExp(`[\$€${escapeRegExp(locale.thousandsSeparator || "")}]`, "g");
1733
1733
  });
1734
1734
  /**
1735
1735
  * Convert a string into a number. It assumes that the string actually represents
@@ -7716,19 +7716,22 @@ class TokenizingChars {
7716
7716
  }
7717
7717
 
7718
7718
  function isValidLocale(locale) {
7719
- if (!(locale &&
7720
- typeof locale === "object" &&
7721
- typeof locale.name === "string" &&
7722
- typeof locale.code === "string" &&
7723
- typeof locale.thousandsSeparator === "string" &&
7724
- typeof locale.decimalSeparator === "string" &&
7725
- typeof locale.dateFormat === "string" &&
7726
- typeof locale.timeFormat === "string" &&
7727
- typeof locale.formulaArgSeparator === "string")) {
7719
+ if (!locale ||
7720
+ typeof locale !== "object" ||
7721
+ !(!locale.thousandsSeparator || typeof locale.thousandsSeparator === "string")) {
7728
7722
  return false;
7729
7723
  }
7730
- if (!Object.values(locale).every((v) => v)) {
7731
- return false;
7724
+ for (const property of [
7725
+ "code",
7726
+ "name",
7727
+ "decimalSeparator",
7728
+ "dateFormat",
7729
+ "timeFormat",
7730
+ "formulaArgSeparator",
7731
+ ]) {
7732
+ if (!locale[property] || typeof locale[property] !== "string") {
7733
+ return false;
7734
+ }
7732
7735
  }
7733
7736
  if (locale.formulaArgSeparator === locale.decimalSeparator) {
7734
7737
  return false;
@@ -7826,7 +7829,10 @@ function canonicalizeNumberLiteral(content, locale) {
7826
7829
  if (locale.decimalSeparator === "." || !isNumber(content, locale)) {
7827
7830
  return content;
7828
7831
  }
7829
- return content.replace(locale.thousandsSeparator, "").replace(locale.decimalSeparator, ".");
7832
+ if (locale.thousandsSeparator) {
7833
+ content = content.replaceAll(locale.thousandsSeparator, "");
7834
+ }
7835
+ return content.replace(locale.decimalSeparator, ".");
7830
7836
  }
7831
7837
  /**
7832
7838
  * Change a content string from the given locale to its canonical form (en_US locale). Also convert date string.
@@ -9505,15 +9511,6 @@ function createLineChartRuntime(chart, getters) {
9505
9511
  }
9506
9512
  const colors = new ChartColors();
9507
9513
  for (let [index, { label, data }] of dataSetsValues.entries()) {
9508
- if (["linear", "time"].includes(axisType)) {
9509
- // Replace empty string labels by undefined to make sure chartJS doesn't decide that "" is the same as 0
9510
- data = data.map((y, index) => ({ x: labels[index] || undefined, y }));
9511
- }
9512
- const color = colors.next();
9513
- let backgroundRGBA = colorToRGBA(color);
9514
- if (chart.stacked) {
9515
- backgroundRGBA.a = LINE_FILL_TRANSPARENCY;
9516
- }
9517
9514
  if (chart.cumulative) {
9518
9515
  let accumulator = 0;
9519
9516
  data = data.map((value) => {
@@ -9524,6 +9521,15 @@ function createLineChartRuntime(chart, getters) {
9524
9521
  return value;
9525
9522
  });
9526
9523
  }
9524
+ if (["linear", "time"].includes(axisType)) {
9525
+ // Replace empty string labels by undefined to make sure chartJS doesn't decide that "" is the same as 0
9526
+ data = data.map((y, index) => ({ x: labels[index] || undefined, y }));
9527
+ }
9528
+ const color = colors.next();
9529
+ let backgroundRGBA = colorToRGBA(color);
9530
+ if (chart.stacked) {
9531
+ backgroundRGBA.a = LINE_FILL_TRANSPARENCY;
9532
+ }
9527
9533
  const backgroundColor = rgbaToHex(backgroundRGBA);
9528
9534
  const dataset = {
9529
9535
  label,
@@ -24779,7 +24785,13 @@ class SettingsPanel extends Component {
24779
24785
  }
24780
24786
  async loadLocales() {
24781
24787
  this.loadedLocales = (await this.env.loadLocales())
24782
- .filter(isValidLocale)
24788
+ .filter((locale) => {
24789
+ const isValid = isValidLocale(locale);
24790
+ if (!isValid) {
24791
+ console.warn(`Invalid locale: ${locale["code"]} ${locale}`);
24792
+ }
24793
+ return isValid;
24794
+ })
24783
24795
  .sort((a, b) => a.name.localeCompare(b.name));
24784
24796
  }
24785
24797
  get numberFormatPreview() {
@@ -30535,6 +30547,7 @@ class Grid extends Component {
30535
30547
  return;
30536
30548
  }
30537
30549
  if (clipboardData.types.indexOf(ClipboardMIMEType.PlainText) > -1) {
30550
+ ev.preventDefault();
30538
30551
  const content = clipboardData.getData(ClipboardMIMEType.PlainText);
30539
30552
  const target = this.env.model.getters.getSelectedZones();
30540
30553
  const clipboardString = this.env.model.getters.getClipboardTextContent();
@@ -35132,6 +35145,21 @@ class BordersPlugin extends CorePlugin {
35132
35145
  return [];
35133
35146
  return Object.keys(sheetBorders).map((index) => parseInt(index, 10));
35134
35147
  }
35148
+ /**
35149
+ * Get all the rows which contains at least a border
35150
+ */
35151
+ getRowsWithBorders(sheetId) {
35152
+ const sheetBorders = this.borders[sheetId]?.filter(isDefined$1);
35153
+ if (!sheetBorders)
35154
+ return [];
35155
+ const rowsWithBorders = new Set();
35156
+ for (const rowBorders of sheetBorders) {
35157
+ for (const rowBorder in rowBorders) {
35158
+ rowsWithBorders.add(parseInt(rowBorder, 10));
35159
+ }
35160
+ }
35161
+ return Array.from(rowsWithBorders);
35162
+ }
35135
35163
  /**
35136
35164
  * Get the range of all the rows in the sheet
35137
35165
  */
@@ -35181,7 +35209,7 @@ class BordersPlugin extends CorePlugin {
35181
35209
  destructive: false,
35182
35210
  });
35183
35211
  }
35184
- this.getRowsRange(sheetId)
35212
+ this.getRowsWithBorders(sheetId)
35185
35213
  .filter((row) => row >= start)
35186
35214
  .sort((a, b) => (delta < 0 ? a - b : b - a)) // start by the end when moving up
35187
35215
  .forEach((row) => {
@@ -35636,7 +35664,7 @@ function parseExpression(tokens, parent_priority = 0) {
35636
35664
  * Parse an expression (as a string) into an AST.
35637
35665
  */
35638
35666
  function parse(str) {
35639
- return parseTokens(tokenize(str));
35667
+ return parseTokens(rangeTokenize(str));
35640
35668
  }
35641
35669
  function parseTokens(tokens) {
35642
35670
  tokens = tokens.filter((x) => x.type !== "SPACE");
@@ -57801,6 +57829,6 @@ const constants = {
57801
57829
  export { AbstractChart, CellErrorType, 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 };
57802
57830
 
57803
57831
 
57804
- __info__.version = "17.1.21";
57805
- __info__.date = "2024-07-02T10:35:57.801Z";
57806
- __info__.hash = "ec4c09b";
57832
+ __info__.version = "17.1.22";
57833
+ __info__.date = "2024-07-08T05:41:57.737Z";
57834
+ __info__.hash = "da27a94";
@@ -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.1.21
6
- * @date 2024-07-02T10:35:57.801Z
7
- * @hash ec4c09b
5
+ * @version 17.1.22
6
+ * @date 2024-07-08T05:41:57.737Z
7
+ * @hash da27a94
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -1703,7 +1703,7 @@
1703
1703
  });
1704
1704
  const getNumberRegex = memoize(function getNumberRegex(locale) {
1705
1705
  const decimalSeparator = escapeRegExp(locale.decimalSeparator);
1706
- const thousandsSeparator = escapeRegExp(locale.thousandsSeparator);
1706
+ const thousandsSeparator = escapeRegExp(locale.thousandsSeparator || "");
1707
1707
  const pIntegerAndDecimals = `(\\d+(${thousandsSeparator}\\d{3,})*(${decimalSeparator}\\d*)?)`; // pattern that match integer number with or without decimal digits
1708
1708
  const pOnlyDecimals = `(${decimalSeparator}\\d+)`; // pattern that match only expression with decimal digits
1709
1709
  const pScientificFormat = "(e(\\+|-)?\\d+)?"; // pattern that match scientific format between zero and one time (should be placed before pPercentFormat)
@@ -1730,7 +1730,7 @@
1730
1730
  return getNumberRegex(locale).test(value.trim());
1731
1731
  }
1732
1732
  const getInvaluableSymbolsRegexp = memoize(function getInvaluableSymbolsRegexp(locale) {
1733
- return new RegExp(`[\$€${escapeRegExp(locale.thousandsSeparator)}]`, "g");
1733
+ return new RegExp(`[\$€${escapeRegExp(locale.thousandsSeparator || "")}]`, "g");
1734
1734
  });
1735
1735
  /**
1736
1736
  * Convert a string into a number. It assumes that the string actually represents
@@ -7717,19 +7717,22 @@
7717
7717
  }
7718
7718
 
7719
7719
  function isValidLocale(locale) {
7720
- if (!(locale &&
7721
- typeof locale === "object" &&
7722
- typeof locale.name === "string" &&
7723
- typeof locale.code === "string" &&
7724
- typeof locale.thousandsSeparator === "string" &&
7725
- typeof locale.decimalSeparator === "string" &&
7726
- typeof locale.dateFormat === "string" &&
7727
- typeof locale.timeFormat === "string" &&
7728
- typeof locale.formulaArgSeparator === "string")) {
7720
+ if (!locale ||
7721
+ typeof locale !== "object" ||
7722
+ !(!locale.thousandsSeparator || typeof locale.thousandsSeparator === "string")) {
7729
7723
  return false;
7730
7724
  }
7731
- if (!Object.values(locale).every((v) => v)) {
7732
- return false;
7725
+ for (const property of [
7726
+ "code",
7727
+ "name",
7728
+ "decimalSeparator",
7729
+ "dateFormat",
7730
+ "timeFormat",
7731
+ "formulaArgSeparator",
7732
+ ]) {
7733
+ if (!locale[property] || typeof locale[property] !== "string") {
7734
+ return false;
7735
+ }
7733
7736
  }
7734
7737
  if (locale.formulaArgSeparator === locale.decimalSeparator) {
7735
7738
  return false;
@@ -7827,7 +7830,10 @@
7827
7830
  if (locale.decimalSeparator === "." || !isNumber(content, locale)) {
7828
7831
  return content;
7829
7832
  }
7830
- return content.replace(locale.thousandsSeparator, "").replace(locale.decimalSeparator, ".");
7833
+ if (locale.thousandsSeparator) {
7834
+ content = content.replaceAll(locale.thousandsSeparator, "");
7835
+ }
7836
+ return content.replace(locale.decimalSeparator, ".");
7831
7837
  }
7832
7838
  /**
7833
7839
  * Change a content string from the given locale to its canonical form (en_US locale). Also convert date string.
@@ -9506,15 +9512,6 @@
9506
9512
  }
9507
9513
  const colors = new ChartColors();
9508
9514
  for (let [index, { label, data }] of dataSetsValues.entries()) {
9509
- if (["linear", "time"].includes(axisType)) {
9510
- // Replace empty string labels by undefined to make sure chartJS doesn't decide that "" is the same as 0
9511
- data = data.map((y, index) => ({ x: labels[index] || undefined, y }));
9512
- }
9513
- const color = colors.next();
9514
- let backgroundRGBA = colorToRGBA(color);
9515
- if (chart.stacked) {
9516
- backgroundRGBA.a = LINE_FILL_TRANSPARENCY;
9517
- }
9518
9515
  if (chart.cumulative) {
9519
9516
  let accumulator = 0;
9520
9517
  data = data.map((value) => {
@@ -9525,6 +9522,15 @@
9525
9522
  return value;
9526
9523
  });
9527
9524
  }
9525
+ if (["linear", "time"].includes(axisType)) {
9526
+ // Replace empty string labels by undefined to make sure chartJS doesn't decide that "" is the same as 0
9527
+ data = data.map((y, index) => ({ x: labels[index] || undefined, y }));
9528
+ }
9529
+ const color = colors.next();
9530
+ let backgroundRGBA = colorToRGBA(color);
9531
+ if (chart.stacked) {
9532
+ backgroundRGBA.a = LINE_FILL_TRANSPARENCY;
9533
+ }
9528
9534
  const backgroundColor = rgbaToHex(backgroundRGBA);
9529
9535
  const dataset = {
9530
9536
  label,
@@ -24780,7 +24786,13 @@
24780
24786
  }
24781
24787
  async loadLocales() {
24782
24788
  this.loadedLocales = (await this.env.loadLocales())
24783
- .filter(isValidLocale)
24789
+ .filter((locale) => {
24790
+ const isValid = isValidLocale(locale);
24791
+ if (!isValid) {
24792
+ console.warn(`Invalid locale: ${locale["code"]} ${locale}`);
24793
+ }
24794
+ return isValid;
24795
+ })
24784
24796
  .sort((a, b) => a.name.localeCompare(b.name));
24785
24797
  }
24786
24798
  get numberFormatPreview() {
@@ -30536,6 +30548,7 @@
30536
30548
  return;
30537
30549
  }
30538
30550
  if (clipboardData.types.indexOf(ClipboardMIMEType.PlainText) > -1) {
30551
+ ev.preventDefault();
30539
30552
  const content = clipboardData.getData(ClipboardMIMEType.PlainText);
30540
30553
  const target = this.env.model.getters.getSelectedZones();
30541
30554
  const clipboardString = this.env.model.getters.getClipboardTextContent();
@@ -35133,6 +35146,21 @@
35133
35146
  return [];
35134
35147
  return Object.keys(sheetBorders).map((index) => parseInt(index, 10));
35135
35148
  }
35149
+ /**
35150
+ * Get all the rows which contains at least a border
35151
+ */
35152
+ getRowsWithBorders(sheetId) {
35153
+ const sheetBorders = this.borders[sheetId]?.filter(isDefined$1);
35154
+ if (!sheetBorders)
35155
+ return [];
35156
+ const rowsWithBorders = new Set();
35157
+ for (const rowBorders of sheetBorders) {
35158
+ for (const rowBorder in rowBorders) {
35159
+ rowsWithBorders.add(parseInt(rowBorder, 10));
35160
+ }
35161
+ }
35162
+ return Array.from(rowsWithBorders);
35163
+ }
35136
35164
  /**
35137
35165
  * Get the range of all the rows in the sheet
35138
35166
  */
@@ -35182,7 +35210,7 @@
35182
35210
  destructive: false,
35183
35211
  });
35184
35212
  }
35185
- this.getRowsRange(sheetId)
35213
+ this.getRowsWithBorders(sheetId)
35186
35214
  .filter((row) => row >= start)
35187
35215
  .sort((a, b) => (delta < 0 ? a - b : b - a)) // start by the end when moving up
35188
35216
  .forEach((row) => {
@@ -35637,7 +35665,7 @@
35637
35665
  * Parse an expression (as a string) into an AST.
35638
35666
  */
35639
35667
  function parse(str) {
35640
- return parseTokens(tokenize(str));
35668
+ return parseTokens(rangeTokenize(str));
35641
35669
  }
35642
35670
  function parseTokens(tokens) {
35643
35671
  tokens = tokens.filter((x) => x.type !== "SPACE");
@@ -57838,9 +57866,9 @@
57838
57866
  exports.tokenize = tokenize;
57839
57867
 
57840
57868
 
57841
- __info__.version = "17.1.21";
57842
- __info__.date = "2024-07-02T10:35:57.801Z";
57843
- __info__.hash = "ec4c09b";
57869
+ __info__.version = "17.1.22";
57870
+ __info__.date = "2024-07-08T05:41:57.737Z";
57871
+ __info__.hash = "da27a94";
57844
57872
 
57845
57873
 
57846
57874
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);