@odoo/o-spreadsheet 17.0.39 → 17.0.41

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.39
6
- * @date 2024-11-08T12:12:25.844Z
7
- * @hash 454752f
5
+ * @version 17.0.41
6
+ * @date 2024-11-22T14:15:39.629Z
7
+ * @hash 23f8fc3
8
8
  */
9
9
 
10
10
  'use strict';
@@ -2797,7 +2797,9 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
2797
2797
  }
2798
2798
  }
2799
2799
  }
2800
- return reverseSearch ? numberOfValues - closestMatchIndex - 1 : closestMatchIndex;
2800
+ return reverseSearch && closestMatchIndex !== -1
2801
+ ? numberOfValues - closestMatchIndex - 1
2802
+ : closestMatchIndex;
2801
2803
  }
2802
2804
  /**
2803
2805
  * Normalize a value.
@@ -8490,11 +8492,14 @@ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, tr
8490
8492
  function getChartLabelFormat(getters, range) {
8491
8493
  if (!range)
8492
8494
  return undefined;
8493
- return getters.getEvaluatedCell({
8494
- sheetId: range.sheetId,
8495
- col: range.zone.left,
8496
- row: range.zone.top,
8497
- }).format;
8495
+ const { sheetId, zone: { left, top, bottom }, } = range;
8496
+ for (let row = top; row <= bottom; row++) {
8497
+ const format = getters.getEvaluatedCell({ sheetId, col: left, row }).format;
8498
+ if (format) {
8499
+ return format;
8500
+ }
8501
+ }
8502
+ return undefined;
8498
8503
  }
8499
8504
  function getChartLabelValues(getters, dataSets, labelRange) {
8500
8505
  let labels = { values: [], formattedValues: [] };
@@ -9343,11 +9348,7 @@ function canBeDateChart(labelRange, getters) {
9343
9348
  if (!labelRange || !canBeLinearChart(labelRange, getters)) {
9344
9349
  return false;
9345
9350
  }
9346
- const labelFormat = getters.getEvaluatedCell({
9347
- sheetId: labelRange.sheetId,
9348
- col: labelRange.zone.left,
9349
- row: labelRange.zone.top,
9350
- }).format;
9351
+ const labelFormat = getChartLabelFormat(getters, labelRange);
9351
9352
  return Boolean(labelFormat && timeFormatLuxonCompatible.test(labelFormat));
9352
9353
  }
9353
9354
  function canBeLinearChart(labelRange, getters) {
@@ -18733,7 +18734,7 @@ const VLOOKUP = {
18733
18734
  ? dichotomicSearch(range, searchKey?.value, "nextSmaller", "asc", range[0].length, getValueFromRange)
18734
18735
  : linearSearch(range, searchKey?.value, "strict", range[0].length, getValueFromRange);
18735
18736
  const value = range[_index - 1][rowIndex];
18736
- assertAvailable(value, searchKey);
18737
+ assertAvailable(value, searchKey?.value);
18737
18738
  return value;
18738
18739
  },
18739
18740
  isExported: true,
@@ -18781,7 +18782,7 @@ const XLOOKUP = {
18781
18782
  : [returnRange[index]];
18782
18783
  }
18783
18784
  const _defaultValue = defaultValue?.();
18784
- assertAvailable(_defaultValue, searchKey);
18785
+ assertAvailable(_defaultValue, searchKey?.value);
18785
18786
  return [[_defaultValue]];
18786
18787
  },
18787
18788
  isExported: true,
@@ -22269,6 +22270,7 @@ ColorPicker.props = {
22269
22270
  currentColor: { type: String, optional: true },
22270
22271
  maxHeight: { type: Number, optional: true },
22271
22272
  anchorRect: Object,
22273
+ disableNoColor: { type: Boolean, optional: true },
22272
22274
  };
22273
22275
 
22274
22276
  css /* scss */ `
@@ -22335,6 +22337,7 @@ ColorPickerWidget.props = {
22335
22337
  disabled: { type: Boolean, optional: true },
22336
22338
  dropdownMaxHeight: { type: Number, optional: true },
22337
22339
  class: { type: String, optional: true },
22340
+ disableNoColor: { type: Boolean, optional: true },
22338
22341
  };
22339
22342
 
22340
22343
  class LineBarPieDesignPanel extends owl.Component {
@@ -23745,6 +23748,9 @@ class ConditionalFormattingEditor extends owl.Component {
23745
23748
  }
23746
23749
  }
23747
23750
  setColorScaleColor(target, color) {
23751
+ if (!isColorValid(color)) {
23752
+ return;
23753
+ }
23748
23754
  const point = this.state.rules.colorScale[target];
23749
23755
  if (point) {
23750
23756
  point.color = Number.parseInt(color.substr(1), 16);
@@ -41679,7 +41685,7 @@ class Evaluator {
41679
41685
  const arrayFormulas = this.spreadingRelations.getFormulaPositionsSpreadingOn(positionId);
41680
41686
  const cells = new JetSet(arrayFormulas);
41681
41687
  const arrayFormulaPositionId = this.getArrayFormulaSpreadingOnId(positionId);
41682
- if (arrayFormulaPositionId) {
41688
+ if (arrayFormulaPositionId !== undefined) {
41683
41689
  // ignore the formula spreading on the position. Keep only the blocked ones
41684
41690
  cells.delete(arrayFormulaPositionId);
41685
41691
  }
@@ -41702,9 +41708,15 @@ class Evaluator {
41702
41708
  }
41703
41709
  for (let i = 0; i < positionIds.length; ++i) {
41704
41710
  const cell = positionIds[i];
41711
+ if (this.nextPositionsToUpdate.has(cell)) {
41712
+ continue;
41713
+ }
41705
41714
  this.setEvaluatedCell(cell, this.computeCell(cell));
41706
41715
  }
41707
41716
  }
41717
+ if (currentIteration >= MAX_ITERATION) {
41718
+ console.warn("Maximum iteration reached while evaluating cells");
41719
+ }
41708
41720
  }
41709
41721
  setEvaluatedCell(positionId, evaluatedCell) {
41710
41722
  this.evaluatedCells.set(positionId, evaluatedCell);
@@ -41736,7 +41748,6 @@ class Evaluator {
41736
41748
  }
41737
41749
  finally {
41738
41750
  this.cellsBeingComputed.delete(cellId);
41739
- this.nextPositionsToUpdate.delete(positionId);
41740
41751
  }
41741
41752
  }
41742
41753
  computeAndSave(position) {
@@ -41806,6 +41817,7 @@ class Evaluator {
41806
41817
  { sheetId, zone: rightPartZone },
41807
41818
  { sheetId, zone: leftColumnZone },
41808
41819
  ]);
41820
+ invalidatedPositions.delete(this.encoder.encode(arrayFormulaPosition));
41809
41821
  this.nextPositionsToUpdate.addMany(invalidatedPositions);
41810
41822
  }
41811
41823
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
@@ -44499,7 +44511,7 @@ class Session extends EventBus {
44499
44511
  * Notify the server that the user client left the collaborative session
44500
44512
  */
44501
44513
  async leave(data) {
44502
- if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
44514
+ if (data && Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
44503
44515
  await this.snapshot(data());
44504
44516
  }
44505
44517
  delete this.clients[this.clientId];
@@ -57154,7 +57166,8 @@ class Model extends EventBus {
57154
57166
  this.session.join(this.config.client);
57155
57167
  }
57156
57168
  async leaveSession() {
57157
- await this.session.leave(lazy(() => this.exportData()));
57169
+ const snapshot = this.getters.isReadonly() ? undefined : lazy(() => this.exportData());
57170
+ await this.session.leave(snapshot);
57158
57171
  }
57159
57172
  setupUiPlugin(Plugin) {
57160
57173
  const plugin = new Plugin(this.uiPluginConfig);
@@ -57657,6 +57670,6 @@ exports.setTranslationMethod = setTranslationMethod;
57657
57670
  exports.tokenize = tokenize;
57658
57671
 
57659
57672
 
57660
- __info__.version = "17.0.39";
57661
- __info__.date = "2024-11-08T12:12:25.844Z";
57662
- __info__.hash = "454752f";
57673
+ __info__.version = "17.0.41";
57674
+ __info__.date = "2024-11-22T14:15:39.629Z";
57675
+ __info__.hash = "23f8fc3";
@@ -852,7 +852,7 @@ declare class Session extends EventBus<CollaborativeEvent> {
852
852
  /**
853
853
  * Notify the server that the user client left the collaborative session
854
854
  */
855
- leave(data: Lazy<WorkbookData>): Promise<void>;
855
+ leave(data?: Lazy<WorkbookData>): Promise<void>;
856
856
  /**
857
857
  * Send a snapshot of the spreadsheet to the collaboration server
858
858
  */
@@ -5648,6 +5648,7 @@ interface ColorPickerProps {
5648
5648
  maxHeight?: Pixel;
5649
5649
  onColorPicked: (color: Color) => void;
5650
5650
  currentColor: Color;
5651
+ disableNoColor?: boolean;
5651
5652
  }
5652
5653
  declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEnv> {
5653
5654
  static template: string;
@@ -5690,6 +5691,7 @@ interface Props$H {
5690
5691
  disabled?: boolean;
5691
5692
  dropdownMaxHeight?: Pixel;
5692
5693
  class?: string;
5694
+ disableNoColor?: boolean;
5693
5695
  }
5694
5696
  declare class ColorPickerWidget extends Component<Props$H, SpreadsheetChildEnv> {
5695
5697
  static template: string;
@@ -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.39
6
- * @date 2024-11-08T12:12:25.844Z
7
- * @hash 454752f
5
+ * @version 17.0.41
6
+ * @date 2024-11-22T14:15:39.629Z
7
+ * @hash 23f8fc3
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';
@@ -2795,7 +2795,9 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
2795
2795
  }
2796
2796
  }
2797
2797
  }
2798
- return reverseSearch ? numberOfValues - closestMatchIndex - 1 : closestMatchIndex;
2798
+ return reverseSearch && closestMatchIndex !== -1
2799
+ ? numberOfValues - closestMatchIndex - 1
2800
+ : closestMatchIndex;
2799
2801
  }
2800
2802
  /**
2801
2803
  * Normalize a value.
@@ -8488,11 +8490,14 @@ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, tr
8488
8490
  function getChartLabelFormat(getters, range) {
8489
8491
  if (!range)
8490
8492
  return undefined;
8491
- return getters.getEvaluatedCell({
8492
- sheetId: range.sheetId,
8493
- col: range.zone.left,
8494
- row: range.zone.top,
8495
- }).format;
8493
+ const { sheetId, zone: { left, top, bottom }, } = range;
8494
+ for (let row = top; row <= bottom; row++) {
8495
+ const format = getters.getEvaluatedCell({ sheetId, col: left, row }).format;
8496
+ if (format) {
8497
+ return format;
8498
+ }
8499
+ }
8500
+ return undefined;
8496
8501
  }
8497
8502
  function getChartLabelValues(getters, dataSets, labelRange) {
8498
8503
  let labels = { values: [], formattedValues: [] };
@@ -9341,11 +9346,7 @@ function canBeDateChart(labelRange, getters) {
9341
9346
  if (!labelRange || !canBeLinearChart(labelRange, getters)) {
9342
9347
  return false;
9343
9348
  }
9344
- const labelFormat = getters.getEvaluatedCell({
9345
- sheetId: labelRange.sheetId,
9346
- col: labelRange.zone.left,
9347
- row: labelRange.zone.top,
9348
- }).format;
9349
+ const labelFormat = getChartLabelFormat(getters, labelRange);
9349
9350
  return Boolean(labelFormat && timeFormatLuxonCompatible.test(labelFormat));
9350
9351
  }
9351
9352
  function canBeLinearChart(labelRange, getters) {
@@ -18731,7 +18732,7 @@ const VLOOKUP = {
18731
18732
  ? dichotomicSearch(range, searchKey?.value, "nextSmaller", "asc", range[0].length, getValueFromRange)
18732
18733
  : linearSearch(range, searchKey?.value, "strict", range[0].length, getValueFromRange);
18733
18734
  const value = range[_index - 1][rowIndex];
18734
- assertAvailable(value, searchKey);
18735
+ assertAvailable(value, searchKey?.value);
18735
18736
  return value;
18736
18737
  },
18737
18738
  isExported: true,
@@ -18779,7 +18780,7 @@ const XLOOKUP = {
18779
18780
  : [returnRange[index]];
18780
18781
  }
18781
18782
  const _defaultValue = defaultValue?.();
18782
- assertAvailable(_defaultValue, searchKey);
18783
+ assertAvailable(_defaultValue, searchKey?.value);
18783
18784
  return [[_defaultValue]];
18784
18785
  },
18785
18786
  isExported: true,
@@ -22267,6 +22268,7 @@ ColorPicker.props = {
22267
22268
  currentColor: { type: String, optional: true },
22268
22269
  maxHeight: { type: Number, optional: true },
22269
22270
  anchorRect: Object,
22271
+ disableNoColor: { type: Boolean, optional: true },
22270
22272
  };
22271
22273
 
22272
22274
  css /* scss */ `
@@ -22333,6 +22335,7 @@ ColorPickerWidget.props = {
22333
22335
  disabled: { type: Boolean, optional: true },
22334
22336
  dropdownMaxHeight: { type: Number, optional: true },
22335
22337
  class: { type: String, optional: true },
22338
+ disableNoColor: { type: Boolean, optional: true },
22336
22339
  };
22337
22340
 
22338
22341
  class LineBarPieDesignPanel extends Component {
@@ -23743,6 +23746,9 @@ class ConditionalFormattingEditor extends Component {
23743
23746
  }
23744
23747
  }
23745
23748
  setColorScaleColor(target, color) {
23749
+ if (!isColorValid(color)) {
23750
+ return;
23751
+ }
23746
23752
  const point = this.state.rules.colorScale[target];
23747
23753
  if (point) {
23748
23754
  point.color = Number.parseInt(color.substr(1), 16);
@@ -41677,7 +41683,7 @@ class Evaluator {
41677
41683
  const arrayFormulas = this.spreadingRelations.getFormulaPositionsSpreadingOn(positionId);
41678
41684
  const cells = new JetSet(arrayFormulas);
41679
41685
  const arrayFormulaPositionId = this.getArrayFormulaSpreadingOnId(positionId);
41680
- if (arrayFormulaPositionId) {
41686
+ if (arrayFormulaPositionId !== undefined) {
41681
41687
  // ignore the formula spreading on the position. Keep only the blocked ones
41682
41688
  cells.delete(arrayFormulaPositionId);
41683
41689
  }
@@ -41700,9 +41706,15 @@ class Evaluator {
41700
41706
  }
41701
41707
  for (let i = 0; i < positionIds.length; ++i) {
41702
41708
  const cell = positionIds[i];
41709
+ if (this.nextPositionsToUpdate.has(cell)) {
41710
+ continue;
41711
+ }
41703
41712
  this.setEvaluatedCell(cell, this.computeCell(cell));
41704
41713
  }
41705
41714
  }
41715
+ if (currentIteration >= MAX_ITERATION) {
41716
+ console.warn("Maximum iteration reached while evaluating cells");
41717
+ }
41706
41718
  }
41707
41719
  setEvaluatedCell(positionId, evaluatedCell) {
41708
41720
  this.evaluatedCells.set(positionId, evaluatedCell);
@@ -41734,7 +41746,6 @@ class Evaluator {
41734
41746
  }
41735
41747
  finally {
41736
41748
  this.cellsBeingComputed.delete(cellId);
41737
- this.nextPositionsToUpdate.delete(positionId);
41738
41749
  }
41739
41750
  }
41740
41751
  computeAndSave(position) {
@@ -41804,6 +41815,7 @@ class Evaluator {
41804
41815
  { sheetId, zone: rightPartZone },
41805
41816
  { sheetId, zone: leftColumnZone },
41806
41817
  ]);
41818
+ invalidatedPositions.delete(this.encoder.encode(arrayFormulaPosition));
41807
41819
  this.nextPositionsToUpdate.addMany(invalidatedPositions);
41808
41820
  }
41809
41821
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
@@ -44497,7 +44509,7 @@ class Session extends EventBus {
44497
44509
  * Notify the server that the user client left the collaborative session
44498
44510
  */
44499
44511
  async leave(data) {
44500
- if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
44512
+ if (data && Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
44501
44513
  await this.snapshot(data());
44502
44514
  }
44503
44515
  delete this.clients[this.clientId];
@@ -57152,7 +57164,8 @@ class Model extends EventBus {
57152
57164
  this.session.join(this.config.client);
57153
57165
  }
57154
57166
  async leaveSession() {
57155
- await this.session.leave(lazy(() => this.exportData()));
57167
+ const snapshot = this.getters.isReadonly() ? undefined : lazy(() => this.exportData());
57168
+ await this.session.leave(snapshot);
57156
57169
  }
57157
57170
  setupUiPlugin(Plugin) {
57158
57171
  const plugin = new Plugin(this.uiPluginConfig);
@@ -57620,6 +57633,6 @@ const constants = {
57620
57633
  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 };
57621
57634
 
57622
57635
 
57623
- __info__.version = "17.0.39";
57624
- __info__.date = "2024-11-08T12:12:25.844Z";
57625
- __info__.hash = "454752f";
57636
+ __info__.version = "17.0.41";
57637
+ __info__.date = "2024-11-22T14:15:39.629Z";
57638
+ __info__.hash = "23f8fc3";
@@ -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.39
6
- * @date 2024-11-08T12:12:25.844Z
7
- * @hash 454752f
5
+ * @version 17.0.41
6
+ * @date 2024-11-22T14:15:39.629Z
7
+ * @hash 23f8fc3
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -2796,7 +2796,9 @@
2796
2796
  }
2797
2797
  }
2798
2798
  }
2799
- return reverseSearch ? numberOfValues - closestMatchIndex - 1 : closestMatchIndex;
2799
+ return reverseSearch && closestMatchIndex !== -1
2800
+ ? numberOfValues - closestMatchIndex - 1
2801
+ : closestMatchIndex;
2800
2802
  }
2801
2803
  /**
2802
2804
  * Normalize a value.
@@ -8489,11 +8491,14 @@
8489
8491
  function getChartLabelFormat(getters, range) {
8490
8492
  if (!range)
8491
8493
  return undefined;
8492
- return getters.getEvaluatedCell({
8493
- sheetId: range.sheetId,
8494
- col: range.zone.left,
8495
- row: range.zone.top,
8496
- }).format;
8494
+ const { sheetId, zone: { left, top, bottom }, } = range;
8495
+ for (let row = top; row <= bottom; row++) {
8496
+ const format = getters.getEvaluatedCell({ sheetId, col: left, row }).format;
8497
+ if (format) {
8498
+ return format;
8499
+ }
8500
+ }
8501
+ return undefined;
8497
8502
  }
8498
8503
  function getChartLabelValues(getters, dataSets, labelRange) {
8499
8504
  let labels = { values: [], formattedValues: [] };
@@ -9342,11 +9347,7 @@
9342
9347
  if (!labelRange || !canBeLinearChart(labelRange, getters)) {
9343
9348
  return false;
9344
9349
  }
9345
- const labelFormat = getters.getEvaluatedCell({
9346
- sheetId: labelRange.sheetId,
9347
- col: labelRange.zone.left,
9348
- row: labelRange.zone.top,
9349
- }).format;
9350
+ const labelFormat = getChartLabelFormat(getters, labelRange);
9350
9351
  return Boolean(labelFormat && timeFormatLuxonCompatible.test(labelFormat));
9351
9352
  }
9352
9353
  function canBeLinearChart(labelRange, getters) {
@@ -18732,7 +18733,7 @@
18732
18733
  ? dichotomicSearch(range, searchKey?.value, "nextSmaller", "asc", range[0].length, getValueFromRange)
18733
18734
  : linearSearch(range, searchKey?.value, "strict", range[0].length, getValueFromRange);
18734
18735
  const value = range[_index - 1][rowIndex];
18735
- assertAvailable(value, searchKey);
18736
+ assertAvailable(value, searchKey?.value);
18736
18737
  return value;
18737
18738
  },
18738
18739
  isExported: true,
@@ -18780,7 +18781,7 @@
18780
18781
  : [returnRange[index]];
18781
18782
  }
18782
18783
  const _defaultValue = defaultValue?.();
18783
- assertAvailable(_defaultValue, searchKey);
18784
+ assertAvailable(_defaultValue, searchKey?.value);
18784
18785
  return [[_defaultValue]];
18785
18786
  },
18786
18787
  isExported: true,
@@ -22268,6 +22269,7 @@
22268
22269
  currentColor: { type: String, optional: true },
22269
22270
  maxHeight: { type: Number, optional: true },
22270
22271
  anchorRect: Object,
22272
+ disableNoColor: { type: Boolean, optional: true },
22271
22273
  };
22272
22274
 
22273
22275
  css /* scss */ `
@@ -22334,6 +22336,7 @@
22334
22336
  disabled: { type: Boolean, optional: true },
22335
22337
  dropdownMaxHeight: { type: Number, optional: true },
22336
22338
  class: { type: String, optional: true },
22339
+ disableNoColor: { type: Boolean, optional: true },
22337
22340
  };
22338
22341
 
22339
22342
  class LineBarPieDesignPanel extends owl.Component {
@@ -23744,6 +23747,9 @@
23744
23747
  }
23745
23748
  }
23746
23749
  setColorScaleColor(target, color) {
23750
+ if (!isColorValid(color)) {
23751
+ return;
23752
+ }
23747
23753
  const point = this.state.rules.colorScale[target];
23748
23754
  if (point) {
23749
23755
  point.color = Number.parseInt(color.substr(1), 16);
@@ -41678,7 +41684,7 @@
41678
41684
  const arrayFormulas = this.spreadingRelations.getFormulaPositionsSpreadingOn(positionId);
41679
41685
  const cells = new JetSet(arrayFormulas);
41680
41686
  const arrayFormulaPositionId = this.getArrayFormulaSpreadingOnId(positionId);
41681
- if (arrayFormulaPositionId) {
41687
+ if (arrayFormulaPositionId !== undefined) {
41682
41688
  // ignore the formula spreading on the position. Keep only the blocked ones
41683
41689
  cells.delete(arrayFormulaPositionId);
41684
41690
  }
@@ -41701,9 +41707,15 @@
41701
41707
  }
41702
41708
  for (let i = 0; i < positionIds.length; ++i) {
41703
41709
  const cell = positionIds[i];
41710
+ if (this.nextPositionsToUpdate.has(cell)) {
41711
+ continue;
41712
+ }
41704
41713
  this.setEvaluatedCell(cell, this.computeCell(cell));
41705
41714
  }
41706
41715
  }
41716
+ if (currentIteration >= MAX_ITERATION) {
41717
+ console.warn("Maximum iteration reached while evaluating cells");
41718
+ }
41707
41719
  }
41708
41720
  setEvaluatedCell(positionId, evaluatedCell) {
41709
41721
  this.evaluatedCells.set(positionId, evaluatedCell);
@@ -41735,7 +41747,6 @@
41735
41747
  }
41736
41748
  finally {
41737
41749
  this.cellsBeingComputed.delete(cellId);
41738
- this.nextPositionsToUpdate.delete(positionId);
41739
41750
  }
41740
41751
  }
41741
41752
  computeAndSave(position) {
@@ -41805,6 +41816,7 @@
41805
41816
  { sheetId, zone: rightPartZone },
41806
41817
  { sheetId, zone: leftColumnZone },
41807
41818
  ]);
41819
+ invalidatedPositions.delete(this.encoder.encode(arrayFormulaPosition));
41808
41820
  this.nextPositionsToUpdate.addMany(invalidatedPositions);
41809
41821
  }
41810
41822
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
@@ -44498,7 +44510,7 @@
44498
44510
  * Notify the server that the user client left the collaborative session
44499
44511
  */
44500
44512
  async leave(data) {
44501
- if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
44513
+ if (data && Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
44502
44514
  await this.snapshot(data());
44503
44515
  }
44504
44516
  delete this.clients[this.clientId];
@@ -57153,7 +57165,8 @@
57153
57165
  this.session.join(this.config.client);
57154
57166
  }
57155
57167
  async leaveSession() {
57156
- await this.session.leave(lazy(() => this.exportData()));
57168
+ const snapshot = this.getters.isReadonly() ? undefined : lazy(() => this.exportData());
57169
+ await this.session.leave(snapshot);
57157
57170
  }
57158
57171
  setupUiPlugin(Plugin) {
57159
57172
  const plugin = new Plugin(this.uiPluginConfig);
@@ -57656,9 +57669,9 @@
57656
57669
  exports.tokenize = tokenize;
57657
57670
 
57658
57671
 
57659
- __info__.version = "17.0.39";
57660
- __info__.date = "2024-11-08T12:12:25.844Z";
57661
- __info__.hash = "454752f";
57672
+ __info__.version = "17.0.41";
57673
+ __info__.date = "2024-11-22T14:15:39.629Z";
57674
+ __info__.hash = "23f8fc3";
57662
57675
 
57663
57676
 
57664
57677
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);