@odoo/o-spreadsheet 17.0.63 → 17.0.65

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.63
6
- * @date 2025-05-26T12:30:51.925Z
7
- * @hash 7fab365
5
+ * @version 17.0.65
6
+ * @date 2025-06-12T10:43:02.222Z
7
+ * @hash 5af6ebd
8
8
  */
9
9
 
10
10
  'use strict';
@@ -6668,19 +6668,26 @@ class FilterMenu extends owl.Component {
6668
6668
  .filter(({ row }) => !this.env.model.getters.isRowHidden(sheetId, row))
6669
6669
  .map(({ col, row }) => this.env.model.getters.getEvaluatedCell({ sheetId, col, row }).formattedValue);
6670
6670
  const filterValues = this.env.model.getters.getFilterValues({ sheetId, ...position });
6671
- const strValues = [...cellValues, ...filterValues];
6672
- const normalizedFilteredValues = filterValues.map(toLowerCase);
6673
- // Set with lowercase values to avoid duplicates
6674
- const normalizedValues = [...new Set(strValues.map(toLowerCase))];
6675
- const sortedValues = normalizedValues.sort((val1, val2) => val1.localeCompare(val2, undefined, { numeric: true, sensitivity: "base" }));
6676
- return sortedValues.map((normalizedValue) => {
6677
- const checked = normalizedFilteredValues.findIndex((filteredValue) => filteredValue === normalizedValue) ===
6678
- -1;
6679
- return {
6680
- checked,
6681
- string: strValues.find((val) => toLowerCase(val) === normalizedValue) || "",
6682
- };
6683
- });
6671
+ const normalizedFilteredValues = new Set(filterValues.map(toLowerCase));
6672
+ const set = new Set();
6673
+ const values = [];
6674
+ const addValue = (value) => {
6675
+ const normalizedValue = toLowerCase(value);
6676
+ if (!set.has(normalizedValue)) {
6677
+ values.push({
6678
+ string: value || "",
6679
+ checked: !normalizedFilteredValues.has(normalizedValue),
6680
+ normalizedValue,
6681
+ });
6682
+ set.add(normalizedValue);
6683
+ }
6684
+ };
6685
+ cellValues.forEach(addValue);
6686
+ filterValues.forEach(addValue);
6687
+ return values.sort((val1, val2) => val1.normalizedValue.localeCompare(val2.normalizedValue, undefined, {
6688
+ numeric: true,
6689
+ sensitivity: "base",
6690
+ }));
6684
6691
  }
6685
6692
  checkValue(value) {
6686
6693
  this.state.selectedValue = value.string;
@@ -32827,7 +32834,7 @@ class XlsxBaseExtractor {
32827
32834
  */
32828
32835
  handleMissingValue(parentElement, missingElementName, optionalArgs) {
32829
32836
  if (optionalArgs?.required) {
32830
- if (optionalArgs?.default) {
32837
+ if (optionalArgs?.default !== undefined) {
32831
32838
  this.warningManager.addParsingWarning(`Missing required ${missingElementName} in element <${parentElement.tagName}> of ${this.currentFile}, replacing it by the default value ${optionalArgs.default}`);
32832
32839
  }
32833
32840
  else {
@@ -46389,7 +46396,6 @@ class FindAndReplacePlugin extends UIPlugin {
46389
46396
  }
46390
46397
  const selectedMatch = this.searchMatches[this.selectedMatchIndex];
46391
46398
  this.replaceMatch(selectedMatch, replaceWith);
46392
- this.selectNextCell(Direction.next);
46393
46399
  }
46394
46400
  /**
46395
46401
  * Apply the replace function to all the matches one time.
@@ -50174,9 +50180,10 @@ class FilterEvaluationPlugin extends UIPlugin {
50174
50180
  const filteredValues = this.filterValues[sheetId]?.[filter.id]?.map(toLowerCase);
50175
50181
  if (!filteredValues || !filter.filteredZone)
50176
50182
  continue;
50183
+ const filteredValuesSet = new Set(filteredValues);
50177
50184
  for (let row = filter.filteredZone.top; row <= filter.filteredZone.bottom; row++) {
50178
50185
  const value = this.getCellValueAsString(sheetId, filter.col, row);
50179
- if (filteredValues.includes(value)) {
50186
+ if (filteredValuesSet.has(value)) {
50180
50187
  hiddenRows.add(row);
50181
50188
  }
50182
50189
  }
@@ -58329,6 +58336,6 @@ exports.setTranslationMethod = setTranslationMethod;
58329
58336
  exports.tokenize = tokenize;
58330
58337
 
58331
58338
 
58332
- __info__.version = "17.0.63";
58333
- __info__.date = "2025-05-26T12:30:51.925Z";
58334
- __info__.hash = "7fab365";
58339
+ __info__.version = "17.0.65";
58340
+ __info__.date = "2025-06-12T10:43:02.222Z";
58341
+ __info__.hash = "5af6ebd";
@@ -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.63
6
- * @date 2025-05-26T12:30:51.925Z
7
- * @hash 7fab365
5
+ * @version 17.0.65
6
+ * @date 2025-06-12T10:43:02.222Z
7
+ * @hash 5af6ebd
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';
@@ -6666,19 +6666,26 @@ class FilterMenu extends Component {
6666
6666
  .filter(({ row }) => !this.env.model.getters.isRowHidden(sheetId, row))
6667
6667
  .map(({ col, row }) => this.env.model.getters.getEvaluatedCell({ sheetId, col, row }).formattedValue);
6668
6668
  const filterValues = this.env.model.getters.getFilterValues({ sheetId, ...position });
6669
- const strValues = [...cellValues, ...filterValues];
6670
- const normalizedFilteredValues = filterValues.map(toLowerCase);
6671
- // Set with lowercase values to avoid duplicates
6672
- const normalizedValues = [...new Set(strValues.map(toLowerCase))];
6673
- const sortedValues = normalizedValues.sort((val1, val2) => val1.localeCompare(val2, undefined, { numeric: true, sensitivity: "base" }));
6674
- return sortedValues.map((normalizedValue) => {
6675
- const checked = normalizedFilteredValues.findIndex((filteredValue) => filteredValue === normalizedValue) ===
6676
- -1;
6677
- return {
6678
- checked,
6679
- string: strValues.find((val) => toLowerCase(val) === normalizedValue) || "",
6680
- };
6681
- });
6669
+ const normalizedFilteredValues = new Set(filterValues.map(toLowerCase));
6670
+ const set = new Set();
6671
+ const values = [];
6672
+ const addValue = (value) => {
6673
+ const normalizedValue = toLowerCase(value);
6674
+ if (!set.has(normalizedValue)) {
6675
+ values.push({
6676
+ string: value || "",
6677
+ checked: !normalizedFilteredValues.has(normalizedValue),
6678
+ normalizedValue,
6679
+ });
6680
+ set.add(normalizedValue);
6681
+ }
6682
+ };
6683
+ cellValues.forEach(addValue);
6684
+ filterValues.forEach(addValue);
6685
+ return values.sort((val1, val2) => val1.normalizedValue.localeCompare(val2.normalizedValue, undefined, {
6686
+ numeric: true,
6687
+ sensitivity: "base",
6688
+ }));
6682
6689
  }
6683
6690
  checkValue(value) {
6684
6691
  this.state.selectedValue = value.string;
@@ -32825,7 +32832,7 @@ class XlsxBaseExtractor {
32825
32832
  */
32826
32833
  handleMissingValue(parentElement, missingElementName, optionalArgs) {
32827
32834
  if (optionalArgs?.required) {
32828
- if (optionalArgs?.default) {
32835
+ if (optionalArgs?.default !== undefined) {
32829
32836
  this.warningManager.addParsingWarning(`Missing required ${missingElementName} in element <${parentElement.tagName}> of ${this.currentFile}, replacing it by the default value ${optionalArgs.default}`);
32830
32837
  }
32831
32838
  else {
@@ -46387,7 +46394,6 @@ class FindAndReplacePlugin extends UIPlugin {
46387
46394
  }
46388
46395
  const selectedMatch = this.searchMatches[this.selectedMatchIndex];
46389
46396
  this.replaceMatch(selectedMatch, replaceWith);
46390
- this.selectNextCell(Direction.next);
46391
46397
  }
46392
46398
  /**
46393
46399
  * Apply the replace function to all the matches one time.
@@ -50172,9 +50178,10 @@ class FilterEvaluationPlugin extends UIPlugin {
50172
50178
  const filteredValues = this.filterValues[sheetId]?.[filter.id]?.map(toLowerCase);
50173
50179
  if (!filteredValues || !filter.filteredZone)
50174
50180
  continue;
50181
+ const filteredValuesSet = new Set(filteredValues);
50175
50182
  for (let row = filter.filteredZone.top; row <= filter.filteredZone.bottom; row++) {
50176
50183
  const value = this.getCellValueAsString(sheetId, filter.col, row);
50177
- if (filteredValues.includes(value)) {
50184
+ if (filteredValuesSet.has(value)) {
50178
50185
  hiddenRows.add(row);
50179
50186
  }
50180
50187
  }
@@ -58292,6 +58299,6 @@ const constants = {
58292
58299
  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 };
58293
58300
 
58294
58301
 
58295
- __info__.version = "17.0.63";
58296
- __info__.date = "2025-05-26T12:30:51.925Z";
58297
- __info__.hash = "7fab365";
58302
+ __info__.version = "17.0.65";
58303
+ __info__.date = "2025-06-12T10:43:02.222Z";
58304
+ __info__.hash = "5af6ebd";
@@ -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.63
6
- * @date 2025-05-26T12:30:51.925Z
7
- * @hash 7fab365
5
+ * @version 17.0.65
6
+ * @date 2025-06-12T10:43:02.222Z
7
+ * @hash 5af6ebd
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -6667,19 +6667,26 @@
6667
6667
  .filter(({ row }) => !this.env.model.getters.isRowHidden(sheetId, row))
6668
6668
  .map(({ col, row }) => this.env.model.getters.getEvaluatedCell({ sheetId, col, row }).formattedValue);
6669
6669
  const filterValues = this.env.model.getters.getFilterValues({ sheetId, ...position });
6670
- const strValues = [...cellValues, ...filterValues];
6671
- const normalizedFilteredValues = filterValues.map(toLowerCase);
6672
- // Set with lowercase values to avoid duplicates
6673
- const normalizedValues = [...new Set(strValues.map(toLowerCase))];
6674
- const sortedValues = normalizedValues.sort((val1, val2) => val1.localeCompare(val2, undefined, { numeric: true, sensitivity: "base" }));
6675
- return sortedValues.map((normalizedValue) => {
6676
- const checked = normalizedFilteredValues.findIndex((filteredValue) => filteredValue === normalizedValue) ===
6677
- -1;
6678
- return {
6679
- checked,
6680
- string: strValues.find((val) => toLowerCase(val) === normalizedValue) || "",
6681
- };
6682
- });
6670
+ const normalizedFilteredValues = new Set(filterValues.map(toLowerCase));
6671
+ const set = new Set();
6672
+ const values = [];
6673
+ const addValue = (value) => {
6674
+ const normalizedValue = toLowerCase(value);
6675
+ if (!set.has(normalizedValue)) {
6676
+ values.push({
6677
+ string: value || "",
6678
+ checked: !normalizedFilteredValues.has(normalizedValue),
6679
+ normalizedValue,
6680
+ });
6681
+ set.add(normalizedValue);
6682
+ }
6683
+ };
6684
+ cellValues.forEach(addValue);
6685
+ filterValues.forEach(addValue);
6686
+ return values.sort((val1, val2) => val1.normalizedValue.localeCompare(val2.normalizedValue, undefined, {
6687
+ numeric: true,
6688
+ sensitivity: "base",
6689
+ }));
6683
6690
  }
6684
6691
  checkValue(value) {
6685
6692
  this.state.selectedValue = value.string;
@@ -32826,7 +32833,7 @@
32826
32833
  */
32827
32834
  handleMissingValue(parentElement, missingElementName, optionalArgs) {
32828
32835
  if (optionalArgs?.required) {
32829
- if (optionalArgs?.default) {
32836
+ if (optionalArgs?.default !== undefined) {
32830
32837
  this.warningManager.addParsingWarning(`Missing required ${missingElementName} in element <${parentElement.tagName}> of ${this.currentFile}, replacing it by the default value ${optionalArgs.default}`);
32831
32838
  }
32832
32839
  else {
@@ -46388,7 +46395,6 @@
46388
46395
  }
46389
46396
  const selectedMatch = this.searchMatches[this.selectedMatchIndex];
46390
46397
  this.replaceMatch(selectedMatch, replaceWith);
46391
- this.selectNextCell(Direction.next);
46392
46398
  }
46393
46399
  /**
46394
46400
  * Apply the replace function to all the matches one time.
@@ -50173,9 +50179,10 @@
50173
50179
  const filteredValues = this.filterValues[sheetId]?.[filter.id]?.map(toLowerCase);
50174
50180
  if (!filteredValues || !filter.filteredZone)
50175
50181
  continue;
50182
+ const filteredValuesSet = new Set(filteredValues);
50176
50183
  for (let row = filter.filteredZone.top; row <= filter.filteredZone.bottom; row++) {
50177
50184
  const value = this.getCellValueAsString(sheetId, filter.col, row);
50178
- if (filteredValues.includes(value)) {
50185
+ if (filteredValuesSet.has(value)) {
50179
50186
  hiddenRows.add(row);
50180
50187
  }
50181
50188
  }
@@ -58328,9 +58335,9 @@
58328
58335
  exports.tokenize = tokenize;
58329
58336
 
58330
58337
 
58331
- __info__.version = "17.0.63";
58332
- __info__.date = "2025-05-26T12:30:51.925Z";
58333
- __info__.hash = "7fab365";
58338
+ __info__.version = "17.0.65";
58339
+ __info__.date = "2025-06-12T10:43:02.222Z";
58340
+ __info__.hash = "5af6ebd";
58334
58341
 
58335
58342
 
58336
58343
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);