@odoo/o-spreadsheet 17.0.66 → 17.0.67

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.66
6
- * @date 2025-06-19T18:23:36.231Z
7
- * @hash fbd5c00
5
+ * @version 17.0.67
6
+ * @date 2025-06-23T15:02:54.391Z
7
+ * @hash cb0b6a9
8
8
  */
9
9
 
10
10
  'use strict';
@@ -37654,7 +37654,7 @@ class DataValidationPlugin extends CorePlugin {
37654
37654
  else if (newRule.criterion.type === "isValueInList") {
37655
37655
  newRule.criterion.values = Array.from(new Set(newRule.criterion.values));
37656
37656
  }
37657
- const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules);
37657
+ const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules, newRule.id);
37658
37658
  const ruleIndex = adaptedRules.findIndex((rule) => rule.id === newRule.id);
37659
37659
  if (ruleIndex !== -1) {
37660
37660
  adaptedRules[ruleIndex] = newRule;
@@ -37664,10 +37664,13 @@ class DataValidationPlugin extends CorePlugin {
37664
37664
  this.history.update("rules", sheetId, [...adaptedRules, newRule]);
37665
37665
  }
37666
37666
  }
37667
- removeRangesFromRules(sheetId, ranges, rules) {
37667
+ removeRangesFromRules(sheetId, ranges, rules, editingRuleId) {
37668
37668
  rules = deepCopy(rules);
37669
37669
  const rangesXcs = ranges.map((range) => this.getters.getRangeString(range, sheetId));
37670
37670
  for (const rule of rules) {
37671
+ if (rule.id === editingRuleId) {
37672
+ continue; // Skip the rule being edited to preserve its place in the list
37673
+ }
37671
37674
  const ruleRanges = rule.ranges.map((range) => this.getters.getRangeString(range, sheetId));
37672
37675
  rule.ranges = recomputeZones(ruleRanges, rangesXcs).map((xc) => this.getters.getRangeFromSheetXC(sheetId, xc));
37673
37676
  }
@@ -58350,6 +58353,6 @@ exports.setTranslationMethod = setTranslationMethod;
58350
58353
  exports.tokenize = tokenize;
58351
58354
 
58352
58355
 
58353
- __info__.version = "17.0.66";
58354
- __info__.date = "2025-06-19T18:23:36.231Z";
58355
- __info__.hash = "fbd5c00";
58356
+ __info__.version = "17.0.67";
58357
+ __info__.date = "2025-06-23T15:02:54.391Z";
58358
+ __info__.hash = "cb0b6a9";
@@ -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.66
6
- * @date 2025-06-19T18:23:36.231Z
7
- * @hash fbd5c00
5
+ * @version 17.0.67
6
+ * @date 2025-06-23T15:02:54.391Z
7
+ * @hash cb0b6a9
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';
@@ -37652,7 +37652,7 @@ class DataValidationPlugin extends CorePlugin {
37652
37652
  else if (newRule.criterion.type === "isValueInList") {
37653
37653
  newRule.criterion.values = Array.from(new Set(newRule.criterion.values));
37654
37654
  }
37655
- const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules);
37655
+ const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules, newRule.id);
37656
37656
  const ruleIndex = adaptedRules.findIndex((rule) => rule.id === newRule.id);
37657
37657
  if (ruleIndex !== -1) {
37658
37658
  adaptedRules[ruleIndex] = newRule;
@@ -37662,10 +37662,13 @@ class DataValidationPlugin extends CorePlugin {
37662
37662
  this.history.update("rules", sheetId, [...adaptedRules, newRule]);
37663
37663
  }
37664
37664
  }
37665
- removeRangesFromRules(sheetId, ranges, rules) {
37665
+ removeRangesFromRules(sheetId, ranges, rules, editingRuleId) {
37666
37666
  rules = deepCopy(rules);
37667
37667
  const rangesXcs = ranges.map((range) => this.getters.getRangeString(range, sheetId));
37668
37668
  for (const rule of rules) {
37669
+ if (rule.id === editingRuleId) {
37670
+ continue; // Skip the rule being edited to preserve its place in the list
37671
+ }
37669
37672
  const ruleRanges = rule.ranges.map((range) => this.getters.getRangeString(range, sheetId));
37670
37673
  rule.ranges = recomputeZones(ruleRanges, rangesXcs).map((xc) => this.getters.getRangeFromSheetXC(sheetId, xc));
37671
37674
  }
@@ -58313,6 +58316,6 @@ const constants = {
58313
58316
  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 };
58314
58317
 
58315
58318
 
58316
- __info__.version = "17.0.66";
58317
- __info__.date = "2025-06-19T18:23:36.231Z";
58318
- __info__.hash = "fbd5c00";
58319
+ __info__.version = "17.0.67";
58320
+ __info__.date = "2025-06-23T15:02:54.391Z";
58321
+ __info__.hash = "cb0b6a9";
@@ -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.66
6
- * @date 2025-06-19T18:23:36.231Z
7
- * @hash fbd5c00
5
+ * @version 17.0.67
6
+ * @date 2025-06-23T15:02:54.391Z
7
+ * @hash cb0b6a9
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -37653,7 +37653,7 @@
37653
37653
  else if (newRule.criterion.type === "isValueInList") {
37654
37654
  newRule.criterion.values = Array.from(new Set(newRule.criterion.values));
37655
37655
  }
37656
- const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules);
37656
+ const adaptedRules = this.removeRangesFromRules(sheetId, newRule.ranges, rules, newRule.id);
37657
37657
  const ruleIndex = adaptedRules.findIndex((rule) => rule.id === newRule.id);
37658
37658
  if (ruleIndex !== -1) {
37659
37659
  adaptedRules[ruleIndex] = newRule;
@@ -37663,10 +37663,13 @@
37663
37663
  this.history.update("rules", sheetId, [...adaptedRules, newRule]);
37664
37664
  }
37665
37665
  }
37666
- removeRangesFromRules(sheetId, ranges, rules) {
37666
+ removeRangesFromRules(sheetId, ranges, rules, editingRuleId) {
37667
37667
  rules = deepCopy(rules);
37668
37668
  const rangesXcs = ranges.map((range) => this.getters.getRangeString(range, sheetId));
37669
37669
  for (const rule of rules) {
37670
+ if (rule.id === editingRuleId) {
37671
+ continue; // Skip the rule being edited to preserve its place in the list
37672
+ }
37670
37673
  const ruleRanges = rule.ranges.map((range) => this.getters.getRangeString(range, sheetId));
37671
37674
  rule.ranges = recomputeZones(ruleRanges, rangesXcs).map((xc) => this.getters.getRangeFromSheetXC(sheetId, xc));
37672
37675
  }
@@ -58349,9 +58352,9 @@
58349
58352
  exports.tokenize = tokenize;
58350
58353
 
58351
58354
 
58352
- __info__.version = "17.0.66";
58353
- __info__.date = "2025-06-19T18:23:36.231Z";
58354
- __info__.hash = "fbd5c00";
58355
+ __info__.version = "17.0.67";
58356
+ __info__.date = "2025-06-23T15:02:54.391Z";
58357
+ __info__.hash = "cb0b6a9";
58355
58358
 
58356
58359
 
58357
58360
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);