@odoo/o-spreadsheet 17.1.22 → 17.1.24

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.22
6
- * @date 2024-07-08T05:41:57.737Z
7
- * @hash da27a94
5
+ * @version 17.1.24
6
+ * @date 2024-07-18T14:21:58.787Z
7
+ * @hash 46a558e
8
8
  */
9
9
 
10
10
  'use strict';
@@ -546,7 +546,7 @@ function getAddHeaderStartIndex(position, base) {
546
546
  /**
547
547
  * Compares two objects.
548
548
  */
549
- function deepEquals(o1, o2, ignoreFunctions) {
549
+ function deepEquals(o1, o2) {
550
550
  if (o1 === o2)
551
551
  return true;
552
552
  if ((o1 && !o2) || (o2 && !o1))
@@ -562,17 +562,13 @@ function deepEquals(o1, o2, ignoreFunctions) {
562
562
  }
563
563
  }
564
564
  for (const key in o1) {
565
- const typeOfO1Key = typeof o1[key];
566
- if (typeOfO1Key !== typeof o2[key])
565
+ if (typeof o1[key] !== typeof o2[key])
567
566
  return false;
568
- if (typeOfO1Key === "object") {
569
- if (!deepEquals(o1[key], o2[key], ignoreFunctions))
567
+ if (typeof o1[key] === "object") {
568
+ if (!deepEquals(o1[key], o2[key]))
570
569
  return false;
571
570
  }
572
571
  else {
573
- if (ignoreFunctions && typeOfO1Key === "function") {
574
- continue;
575
- }
576
572
  if (o1[key] !== o2[key])
577
573
  return false;
578
574
  }
@@ -643,11 +639,9 @@ class JetSet extends Set {
643
639
  return this;
644
640
  }
645
641
  deleteMany(iterable) {
646
- let wasDeleted = false;
647
642
  for (const element of iterable) {
648
- wasDeleted ||= super.delete(element);
643
+ super.delete(element);
649
644
  }
650
- return wasDeleted;
651
645
  }
652
646
  }
653
647
  /**
@@ -2579,7 +2573,7 @@ function getPredicate(descr, isQuery, locale) {
2579
2573
  operand = descr;
2580
2574
  }
2581
2575
  }
2582
- if (isNumber(operand, locale)) {
2576
+ if (isNumber(operand, locale) || isDateTime(operand, locale)) {
2583
2577
  operand = toNumber(operand, locale);
2584
2578
  }
2585
2579
  else if (operand === "TRUE" || operand === "FALSE") {
@@ -2595,6 +2589,9 @@ function getPredicate(descr, isQuery, locale) {
2595
2589
  return result;
2596
2590
  }
2597
2591
  function operandToRegExp(operand) {
2592
+ if (operand === "*") {
2593
+ return /.+/;
2594
+ }
2598
2595
  let exp = "";
2599
2596
  let predecessor = "";
2600
2597
  for (let char of operand) {
@@ -2618,9 +2615,9 @@ function operandToRegExp(operand) {
2618
2615
  }
2619
2616
  return new RegExp("^" + exp + "$", "i");
2620
2617
  }
2621
- function evaluatePredicate(value, criterion) {
2618
+ function evaluatePredicate(value = "", criterion) {
2622
2619
  const { operator, operand } = criterion;
2623
- if (value === undefined || operand === undefined || value === null || operand === null) {
2620
+ if (operand === undefined || value === null || operand === null) {
2624
2621
  return false;
2625
2622
  }
2626
2623
  if (typeof operand === "number" && operator === "=") {
@@ -4854,7 +4851,6 @@ class ChartJsComponent extends owl.Component {
4854
4851
  };
4855
4852
  canvas = owl.useRef("graphContainer");
4856
4853
  chart;
4857
- currentRuntime;
4858
4854
  get background() {
4859
4855
  return this.chartRuntime.background;
4860
4856
  }
@@ -4871,18 +4867,11 @@ class ChartJsComponent extends owl.Component {
4871
4867
  setup() {
4872
4868
  owl.onMounted(() => {
4873
4869
  const runtime = this.chartRuntime;
4874
- this.currentRuntime = runtime;
4875
4870
  // Note: chartJS modify the runtime in place, so it's important to give it a copy
4876
4871
  this.createChart(deepCopy(runtime.chartJsConfig));
4877
4872
  });
4878
4873
  owl.onWillUnmount(() => this.chart?.destroy());
4879
- owl.useEffect(() => {
4880
- const runtime = this.chartRuntime;
4881
- if (!deepEquals(runtime, this.currentRuntime, "ignoreFunctions")) {
4882
- this.currentRuntime = runtime;
4883
- this.updateChartJs(deepCopy(runtime));
4884
- }
4885
- });
4874
+ owl.useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime]);
4886
4875
  }
4887
4876
  createChart(chartData) {
4888
4877
  const canvas = this.canvas.el;
@@ -8480,7 +8469,7 @@ function truncateLabel(label) {
8480
8469
  /**
8481
8470
  * Get a default chart js configuration
8482
8471
  */
8483
- function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels }) {
8472
+ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels = true }) {
8484
8473
  const options = {
8485
8474
  // https://www.chartjs.org/docs/latest/general/responsive.html
8486
8475
  responsive: true,
@@ -42160,6 +42149,7 @@ class Evaluator {
42160
42149
  }
42161
42150
  finally {
42162
42151
  this.cellsBeingComputed.delete(cellId);
42152
+ this.nextPositionsToUpdate.delete(positionId);
42163
42153
  }
42164
42154
  }
42165
42155
  computeAndSave(position) {
@@ -42188,11 +42178,36 @@ class Evaluator {
42188
42178
  forEachSpreadPositionInMatrix(nbColumns, nbRows,
42189
42179
  // thanks to the isMatrix check above, we know that formulaReturn is MatrixFunctionReturn
42190
42180
  this.spreadValues(formulaPosition, formulaReturn));
42181
+ this.invalidatePositionsDependingOnSpread(formulaPosition, nbColumns, nbRows);
42191
42182
  return createEvaluatedCell(formulaReturn[0][0].value, {
42192
42183
  format: cellData.format || formulaReturn[0][0]?.format,
42193
42184
  locale: this.getters.getLocale(),
42194
42185
  }, formulaReturn[0][0].message);
42195
42186
  }
42187
+ invalidatePositionsDependingOnSpread(arrayFormulaPosition, nbColumns, nbRows) {
42188
+ // the result matrix is split in 2 zones to exclude the array formula position
42189
+ const top = arrayFormulaPosition.row;
42190
+ const left = arrayFormulaPosition.col;
42191
+ const bottom = top + nbRows - 1;
42192
+ const leftColumnZone = {
42193
+ top: top + 1,
42194
+ bottom,
42195
+ left,
42196
+ right: left,
42197
+ };
42198
+ const rightPartZone = {
42199
+ top,
42200
+ bottom,
42201
+ left: left + 1,
42202
+ right: left + nbColumns - 1,
42203
+ };
42204
+ const sheetId = arrayFormulaPosition.sheetId;
42205
+ const invalidatedPositions = this.formulaDependencies().getCellsDependingOn([
42206
+ { sheetId, zone: rightPartZone },
42207
+ { sheetId, zone: leftColumnZone },
42208
+ ]);
42209
+ this.nextPositionsToUpdate.addMany(invalidatedPositions);
42210
+ }
42196
42211
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
42197
42212
  const numberOfCols = this.getters.getNumberCols(sheetId);
42198
42213
  const numberOfRows = this.getters.getNumberRows(sheetId);
@@ -42241,9 +42256,6 @@ class Evaluator {
42241
42256
  }, matrixResult[i][j].message);
42242
42257
  const positionId = this.encoder.encode(position);
42243
42258
  this.setEvaluatedCell(positionId, evaluatedCell);
42244
- // check if formula dependencies present in the spread zone
42245
- // if so, they need to be recomputed
42246
- this.nextPositionsToUpdate.addMany(this.getCellsDependingOn([positionId]));
42247
42259
  };
42248
42260
  }
42249
42261
  invalidateSpreading(positionId) {
@@ -57867,6 +57879,6 @@ exports.setTranslationMethod = setTranslationMethod;
57867
57879
  exports.tokenize = tokenize;
57868
57880
 
57869
57881
 
57870
- __info__.version = "17.1.22";
57871
- __info__.date = "2024-07-08T05:41:57.737Z";
57872
- __info__.hash = "da27a94";
57882
+ __info__.version = "17.1.24";
57883
+ __info__.date = "2024-07-18T14:21:58.787Z";
57884
+ __info__.hash = "46a558e";
@@ -985,7 +985,7 @@ declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
985
985
  /**
986
986
  * Compares two objects.
987
987
  */
988
- declare function deepEquals(o1: any, o2: any, ignoreFunctions?: "ignoreFunctions"): boolean;
988
+ declare function deepEquals(o1: any, o2: any): boolean;
989
989
 
990
990
  interface ConstructorArgs {
991
991
  readonly zone: Readonly<Zone | UnboundedZone>;
@@ -6257,7 +6257,6 @@ declare class ChartJsComponent extends Component<Props$B, SpreadsheetChildEnv> {
6257
6257
  };
6258
6258
  private canvas;
6259
6259
  private chart?;
6260
- private currentRuntime;
6261
6260
  get background(): string;
6262
6261
  get canvasStyle(): string;
6263
6262
  get chartRuntime(): ChartJSRuntime;
@@ -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.22
6
- * @date 2024-07-08T05:41:57.737Z
7
- * @hash da27a94
5
+ * @version 17.1.24
6
+ * @date 2024-07-18T14:21:58.787Z
7
+ * @hash 46a558e
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';
@@ -544,7 +544,7 @@ function getAddHeaderStartIndex(position, base) {
544
544
  /**
545
545
  * Compares two objects.
546
546
  */
547
- function deepEquals(o1, o2, ignoreFunctions) {
547
+ function deepEquals(o1, o2) {
548
548
  if (o1 === o2)
549
549
  return true;
550
550
  if ((o1 && !o2) || (o2 && !o1))
@@ -560,17 +560,13 @@ function deepEquals(o1, o2, ignoreFunctions) {
560
560
  }
561
561
  }
562
562
  for (const key in o1) {
563
- const typeOfO1Key = typeof o1[key];
564
- if (typeOfO1Key !== typeof o2[key])
563
+ if (typeof o1[key] !== typeof o2[key])
565
564
  return false;
566
- if (typeOfO1Key === "object") {
567
- if (!deepEquals(o1[key], o2[key], ignoreFunctions))
565
+ if (typeof o1[key] === "object") {
566
+ if (!deepEquals(o1[key], o2[key]))
568
567
  return false;
569
568
  }
570
569
  else {
571
- if (ignoreFunctions && typeOfO1Key === "function") {
572
- continue;
573
- }
574
570
  if (o1[key] !== o2[key])
575
571
  return false;
576
572
  }
@@ -641,11 +637,9 @@ class JetSet extends Set {
641
637
  return this;
642
638
  }
643
639
  deleteMany(iterable) {
644
- let wasDeleted = false;
645
640
  for (const element of iterable) {
646
- wasDeleted ||= super.delete(element);
641
+ super.delete(element);
647
642
  }
648
- return wasDeleted;
649
643
  }
650
644
  }
651
645
  /**
@@ -2577,7 +2571,7 @@ function getPredicate(descr, isQuery, locale) {
2577
2571
  operand = descr;
2578
2572
  }
2579
2573
  }
2580
- if (isNumber(operand, locale)) {
2574
+ if (isNumber(operand, locale) || isDateTime(operand, locale)) {
2581
2575
  operand = toNumber(operand, locale);
2582
2576
  }
2583
2577
  else if (operand === "TRUE" || operand === "FALSE") {
@@ -2593,6 +2587,9 @@ function getPredicate(descr, isQuery, locale) {
2593
2587
  return result;
2594
2588
  }
2595
2589
  function operandToRegExp(operand) {
2590
+ if (operand === "*") {
2591
+ return /.+/;
2592
+ }
2596
2593
  let exp = "";
2597
2594
  let predecessor = "";
2598
2595
  for (let char of operand) {
@@ -2616,9 +2613,9 @@ function operandToRegExp(operand) {
2616
2613
  }
2617
2614
  return new RegExp("^" + exp + "$", "i");
2618
2615
  }
2619
- function evaluatePredicate(value, criterion) {
2616
+ function evaluatePredicate(value = "", criterion) {
2620
2617
  const { operator, operand } = criterion;
2621
- if (value === undefined || operand === undefined || value === null || operand === null) {
2618
+ if (operand === undefined || value === null || operand === null) {
2622
2619
  return false;
2623
2620
  }
2624
2621
  if (typeof operand === "number" && operator === "=") {
@@ -4852,7 +4849,6 @@ class ChartJsComponent extends Component {
4852
4849
  };
4853
4850
  canvas = useRef("graphContainer");
4854
4851
  chart;
4855
- currentRuntime;
4856
4852
  get background() {
4857
4853
  return this.chartRuntime.background;
4858
4854
  }
@@ -4869,18 +4865,11 @@ class ChartJsComponent extends Component {
4869
4865
  setup() {
4870
4866
  onMounted(() => {
4871
4867
  const runtime = this.chartRuntime;
4872
- this.currentRuntime = runtime;
4873
4868
  // Note: chartJS modify the runtime in place, so it's important to give it a copy
4874
4869
  this.createChart(deepCopy(runtime.chartJsConfig));
4875
4870
  });
4876
4871
  onWillUnmount(() => this.chart?.destroy());
4877
- useEffect(() => {
4878
- const runtime = this.chartRuntime;
4879
- if (!deepEquals(runtime, this.currentRuntime, "ignoreFunctions")) {
4880
- this.currentRuntime = runtime;
4881
- this.updateChartJs(deepCopy(runtime));
4882
- }
4883
- });
4872
+ useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime]);
4884
4873
  }
4885
4874
  createChart(chartData) {
4886
4875
  const canvas = this.canvas.el;
@@ -8478,7 +8467,7 @@ function truncateLabel(label) {
8478
8467
  /**
8479
8468
  * Get a default chart js configuration
8480
8469
  */
8481
- function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels }) {
8470
+ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels = true }) {
8482
8471
  const options = {
8483
8472
  // https://www.chartjs.org/docs/latest/general/responsive.html
8484
8473
  responsive: true,
@@ -42158,6 +42147,7 @@ class Evaluator {
42158
42147
  }
42159
42148
  finally {
42160
42149
  this.cellsBeingComputed.delete(cellId);
42150
+ this.nextPositionsToUpdate.delete(positionId);
42161
42151
  }
42162
42152
  }
42163
42153
  computeAndSave(position) {
@@ -42186,11 +42176,36 @@ class Evaluator {
42186
42176
  forEachSpreadPositionInMatrix(nbColumns, nbRows,
42187
42177
  // thanks to the isMatrix check above, we know that formulaReturn is MatrixFunctionReturn
42188
42178
  this.spreadValues(formulaPosition, formulaReturn));
42179
+ this.invalidatePositionsDependingOnSpread(formulaPosition, nbColumns, nbRows);
42189
42180
  return createEvaluatedCell(formulaReturn[0][0].value, {
42190
42181
  format: cellData.format || formulaReturn[0][0]?.format,
42191
42182
  locale: this.getters.getLocale(),
42192
42183
  }, formulaReturn[0][0].message);
42193
42184
  }
42185
+ invalidatePositionsDependingOnSpread(arrayFormulaPosition, nbColumns, nbRows) {
42186
+ // the result matrix is split in 2 zones to exclude the array formula position
42187
+ const top = arrayFormulaPosition.row;
42188
+ const left = arrayFormulaPosition.col;
42189
+ const bottom = top + nbRows - 1;
42190
+ const leftColumnZone = {
42191
+ top: top + 1,
42192
+ bottom,
42193
+ left,
42194
+ right: left,
42195
+ };
42196
+ const rightPartZone = {
42197
+ top,
42198
+ bottom,
42199
+ left: left + 1,
42200
+ right: left + nbColumns - 1,
42201
+ };
42202
+ const sheetId = arrayFormulaPosition.sheetId;
42203
+ const invalidatedPositions = this.formulaDependencies().getCellsDependingOn([
42204
+ { sheetId, zone: rightPartZone },
42205
+ { sheetId, zone: leftColumnZone },
42206
+ ]);
42207
+ this.nextPositionsToUpdate.addMany(invalidatedPositions);
42208
+ }
42194
42209
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
42195
42210
  const numberOfCols = this.getters.getNumberCols(sheetId);
42196
42211
  const numberOfRows = this.getters.getNumberRows(sheetId);
@@ -42239,9 +42254,6 @@ class Evaluator {
42239
42254
  }, matrixResult[i][j].message);
42240
42255
  const positionId = this.encoder.encode(position);
42241
42256
  this.setEvaluatedCell(positionId, evaluatedCell);
42242
- // check if formula dependencies present in the spread zone
42243
- // if so, they need to be recomputed
42244
- this.nextPositionsToUpdate.addMany(this.getCellsDependingOn([positionId]));
42245
42257
  };
42246
42258
  }
42247
42259
  invalidateSpreading(positionId) {
@@ -57829,6 +57841,6 @@ const constants = {
57829
57841
  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 };
57830
57842
 
57831
57843
 
57832
- __info__.version = "17.1.22";
57833
- __info__.date = "2024-07-08T05:41:57.737Z";
57834
- __info__.hash = "da27a94";
57844
+ __info__.version = "17.1.24";
57845
+ __info__.date = "2024-07-18T14:21:58.787Z";
57846
+ __info__.hash = "46a558e";
@@ -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.22
6
- * @date 2024-07-08T05:41:57.737Z
7
- * @hash da27a94
5
+ * @version 17.1.24
6
+ * @date 2024-07-18T14:21:58.787Z
7
+ * @hash 46a558e
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -545,7 +545,7 @@
545
545
  /**
546
546
  * Compares two objects.
547
547
  */
548
- function deepEquals(o1, o2, ignoreFunctions) {
548
+ function deepEquals(o1, o2) {
549
549
  if (o1 === o2)
550
550
  return true;
551
551
  if ((o1 && !o2) || (o2 && !o1))
@@ -561,17 +561,13 @@
561
561
  }
562
562
  }
563
563
  for (const key in o1) {
564
- const typeOfO1Key = typeof o1[key];
565
- if (typeOfO1Key !== typeof o2[key])
564
+ if (typeof o1[key] !== typeof o2[key])
566
565
  return false;
567
- if (typeOfO1Key === "object") {
568
- if (!deepEquals(o1[key], o2[key], ignoreFunctions))
566
+ if (typeof o1[key] === "object") {
567
+ if (!deepEquals(o1[key], o2[key]))
569
568
  return false;
570
569
  }
571
570
  else {
572
- if (ignoreFunctions && typeOfO1Key === "function") {
573
- continue;
574
- }
575
571
  if (o1[key] !== o2[key])
576
572
  return false;
577
573
  }
@@ -642,11 +638,9 @@
642
638
  return this;
643
639
  }
644
640
  deleteMany(iterable) {
645
- let wasDeleted = false;
646
641
  for (const element of iterable) {
647
- wasDeleted ||= super.delete(element);
642
+ super.delete(element);
648
643
  }
649
- return wasDeleted;
650
644
  }
651
645
  }
652
646
  /**
@@ -2578,7 +2572,7 @@
2578
2572
  operand = descr;
2579
2573
  }
2580
2574
  }
2581
- if (isNumber(operand, locale)) {
2575
+ if (isNumber(operand, locale) || isDateTime(operand, locale)) {
2582
2576
  operand = toNumber(operand, locale);
2583
2577
  }
2584
2578
  else if (operand === "TRUE" || operand === "FALSE") {
@@ -2594,6 +2588,9 @@
2594
2588
  return result;
2595
2589
  }
2596
2590
  function operandToRegExp(operand) {
2591
+ if (operand === "*") {
2592
+ return /.+/;
2593
+ }
2597
2594
  let exp = "";
2598
2595
  let predecessor = "";
2599
2596
  for (let char of operand) {
@@ -2617,9 +2614,9 @@
2617
2614
  }
2618
2615
  return new RegExp("^" + exp + "$", "i");
2619
2616
  }
2620
- function evaluatePredicate(value, criterion) {
2617
+ function evaluatePredicate(value = "", criterion) {
2621
2618
  const { operator, operand } = criterion;
2622
- if (value === undefined || operand === undefined || value === null || operand === null) {
2619
+ if (operand === undefined || value === null || operand === null) {
2623
2620
  return false;
2624
2621
  }
2625
2622
  if (typeof operand === "number" && operator === "=") {
@@ -4853,7 +4850,6 @@
4853
4850
  };
4854
4851
  canvas = owl.useRef("graphContainer");
4855
4852
  chart;
4856
- currentRuntime;
4857
4853
  get background() {
4858
4854
  return this.chartRuntime.background;
4859
4855
  }
@@ -4870,18 +4866,11 @@
4870
4866
  setup() {
4871
4867
  owl.onMounted(() => {
4872
4868
  const runtime = this.chartRuntime;
4873
- this.currentRuntime = runtime;
4874
4869
  // Note: chartJS modify the runtime in place, so it's important to give it a copy
4875
4870
  this.createChart(deepCopy(runtime.chartJsConfig));
4876
4871
  });
4877
4872
  owl.onWillUnmount(() => this.chart?.destroy());
4878
- owl.useEffect(() => {
4879
- const runtime = this.chartRuntime;
4880
- if (!deepEquals(runtime, this.currentRuntime, "ignoreFunctions")) {
4881
- this.currentRuntime = runtime;
4882
- this.updateChartJs(deepCopy(runtime));
4883
- }
4884
- });
4873
+ owl.useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime]);
4885
4874
  }
4886
4875
  createChart(chartData) {
4887
4876
  const canvas = this.canvas.el;
@@ -8479,7 +8468,7 @@
8479
8468
  /**
8480
8469
  * Get a default chart js configuration
8481
8470
  */
8482
- function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels }) {
8471
+ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels = true }) {
8483
8472
  const options = {
8484
8473
  // https://www.chartjs.org/docs/latest/general/responsive.html
8485
8474
  responsive: true,
@@ -42159,6 +42148,7 @@
42159
42148
  }
42160
42149
  finally {
42161
42150
  this.cellsBeingComputed.delete(cellId);
42151
+ this.nextPositionsToUpdate.delete(positionId);
42162
42152
  }
42163
42153
  }
42164
42154
  computeAndSave(position) {
@@ -42187,11 +42177,36 @@
42187
42177
  forEachSpreadPositionInMatrix(nbColumns, nbRows,
42188
42178
  // thanks to the isMatrix check above, we know that formulaReturn is MatrixFunctionReturn
42189
42179
  this.spreadValues(formulaPosition, formulaReturn));
42180
+ this.invalidatePositionsDependingOnSpread(formulaPosition, nbColumns, nbRows);
42190
42181
  return createEvaluatedCell(formulaReturn[0][0].value, {
42191
42182
  format: cellData.format || formulaReturn[0][0]?.format,
42192
42183
  locale: this.getters.getLocale(),
42193
42184
  }, formulaReturn[0][0].message);
42194
42185
  }
42186
+ invalidatePositionsDependingOnSpread(arrayFormulaPosition, nbColumns, nbRows) {
42187
+ // the result matrix is split in 2 zones to exclude the array formula position
42188
+ const top = arrayFormulaPosition.row;
42189
+ const left = arrayFormulaPosition.col;
42190
+ const bottom = top + nbRows - 1;
42191
+ const leftColumnZone = {
42192
+ top: top + 1,
42193
+ bottom,
42194
+ left,
42195
+ right: left,
42196
+ };
42197
+ const rightPartZone = {
42198
+ top,
42199
+ bottom,
42200
+ left: left + 1,
42201
+ right: left + nbColumns - 1,
42202
+ };
42203
+ const sheetId = arrayFormulaPosition.sheetId;
42204
+ const invalidatedPositions = this.formulaDependencies().getCellsDependingOn([
42205
+ { sheetId, zone: rightPartZone },
42206
+ { sheetId, zone: leftColumnZone },
42207
+ ]);
42208
+ this.nextPositionsToUpdate.addMany(invalidatedPositions);
42209
+ }
42195
42210
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
42196
42211
  const numberOfCols = this.getters.getNumberCols(sheetId);
42197
42212
  const numberOfRows = this.getters.getNumberRows(sheetId);
@@ -42240,9 +42255,6 @@
42240
42255
  }, matrixResult[i][j].message);
42241
42256
  const positionId = this.encoder.encode(position);
42242
42257
  this.setEvaluatedCell(positionId, evaluatedCell);
42243
- // check if formula dependencies present in the spread zone
42244
- // if so, they need to be recomputed
42245
- this.nextPositionsToUpdate.addMany(this.getCellsDependingOn([positionId]));
42246
42258
  };
42247
42259
  }
42248
42260
  invalidateSpreading(positionId) {
@@ -57866,9 +57878,9 @@
57866
57878
  exports.tokenize = tokenize;
57867
57879
 
57868
57880
 
57869
- __info__.version = "17.1.22";
57870
- __info__.date = "2024-07-08T05:41:57.737Z";
57871
- __info__.hash = "da27a94";
57881
+ __info__.version = "17.1.24";
57882
+ __info__.date = "2024-07-18T14:21:58.787Z";
57883
+ __info__.hash = "46a558e";
57872
57884
 
57873
57885
 
57874
57886
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);