@odoo/o-spreadsheet 17.2.15 → 17.2.16

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.
@@ -3,9 +3,9 @@
3
3
  /**
4
4
  * This file is generated by o-spreadsheet build tools. Do not edit it.
5
5
  * @see https://github.com/odoo/o-spreadsheet
6
- * @version 17.2.15
7
- * @date 2024-07-08T05:41:55.356Z
8
- * @hash acfb3e7
6
+ * @version 17.2.16
7
+ * @date 2024-07-11T06:38:53.101Z
8
+ * @hash 9f20685
9
9
  */
10
10
 
11
11
  'use strict';
@@ -577,7 +577,7 @@ function getAddHeaderStartIndex(position, base) {
577
577
  /**
578
578
  * Compares two objects.
579
579
  */
580
- function deepEquals(o1, o2, ignoreFunctions) {
580
+ function deepEquals(o1, o2) {
581
581
  if (o1 === o2)
582
582
  return true;
583
583
  if ((o1 && !o2) || (o2 && !o1))
@@ -593,17 +593,13 @@ function deepEquals(o1, o2, ignoreFunctions) {
593
593
  }
594
594
  }
595
595
  for (const key in o1) {
596
- const typeOfO1Key = typeof o1[key];
597
- if (typeOfO1Key !== typeof o2[key])
596
+ if (typeof o1[key] !== typeof o2[key])
598
597
  return false;
599
- if (typeOfO1Key === "object") {
600
- if (!deepEquals(o1[key], o2[key], ignoreFunctions))
598
+ if (typeof o1[key] === "object") {
599
+ if (!deepEquals(o1[key], o2[key]))
601
600
  return false;
602
601
  }
603
602
  else {
604
- if (ignoreFunctions && typeOfO1Key === "function") {
605
- continue;
606
- }
607
603
  if (o1[key] !== o2[key])
608
604
  return false;
609
605
  }
@@ -2648,6 +2644,9 @@ function getPredicate(descr, locale) {
2648
2644
  * If the character is a special regular expression character, it is escaped with "\\".
2649
2645
  */
2650
2646
  const wildcardToRegExp = memoize(function wildcardToRegExp(operand) {
2647
+ if (operand === "*") {
2648
+ return /.+/;
2649
+ }
2651
2650
  let exp = "";
2652
2651
  let predecessor = "";
2653
2652
  for (let char of operand) {
@@ -2671,9 +2670,9 @@ const wildcardToRegExp = memoize(function wildcardToRegExp(operand) {
2671
2670
  }
2672
2671
  return new RegExp("^" + exp + "$", "i");
2673
2672
  });
2674
- function evaluatePredicate(value, criterion) {
2673
+ function evaluatePredicate(value = "", criterion) {
2675
2674
  const { operator, operand } = criterion;
2676
- if (value === undefined || operand === undefined || value === null || operand === null) {
2675
+ if (operand === undefined || value === null || operand === null) {
2677
2676
  return false;
2678
2677
  }
2679
2678
  if (typeof operand === "number" && operator === "=") {
@@ -9206,7 +9205,6 @@ class ChartJsComponent extends owl.Component {
9206
9205
  };
9207
9206
  canvas = owl.useRef("graphContainer");
9208
9207
  chart;
9209
- currentRuntime;
9210
9208
  get background() {
9211
9209
  return this.chartRuntime.background;
9212
9210
  }
@@ -9223,18 +9221,11 @@ class ChartJsComponent extends owl.Component {
9223
9221
  setup() {
9224
9222
  owl.onMounted(() => {
9225
9223
  const runtime = this.chartRuntime;
9226
- this.currentRuntime = runtime;
9227
9224
  // Note: chartJS modify the runtime in place, so it's important to give it a copy
9228
9225
  this.createChart(deepCopy(runtime.chartJsConfig));
9229
9226
  });
9230
9227
  owl.onWillUnmount(() => this.chart?.destroy());
9231
- owl.useEffect(() => {
9232
- const runtime = this.chartRuntime;
9233
- if (!deepEquals(runtime, this.currentRuntime, "ignoreFunctions")) {
9234
- this.currentRuntime = runtime;
9235
- this.updateChartJs(deepCopy(runtime));
9236
- }
9237
- });
9228
+ owl.useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime]);
9238
9229
  }
9239
9230
  createChart(chartData) {
9240
9231
  const canvas = this.canvas.el;
@@ -19636,7 +19627,7 @@ function truncateLabel(label) {
19636
19627
  /**
19637
19628
  * Get a default chart js configuration
19638
19629
  */
19639
- function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels }) {
19630
+ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels = true }) {
19640
19631
  const options = {
19641
19632
  // https://www.chartjs.org/docs/latest/general/responsive.html
19642
19633
  responsive: true,
@@ -47508,7 +47499,7 @@ class PositionSet {
47508
47499
  return this.sheets[position.sheetId].getValue(position) === 1;
47509
47500
  }
47510
47501
  clear() {
47511
- const insertions = this.insertions;
47502
+ const insertions = [...this];
47512
47503
  this.insertions = [];
47513
47504
  for (const sheetId in this.sheets) {
47514
47505
  this.sheets[sheetId].clear();
@@ -47826,6 +47817,7 @@ class Evaluator {
47826
47817
  }
47827
47818
  finally {
47828
47819
  this.cellsBeingComputed.delete(cellId);
47820
+ this.nextPositionsToUpdate.delete(position);
47829
47821
  }
47830
47822
  }
47831
47823
  computeAndSave(position) {
@@ -47850,8 +47842,33 @@ class Evaluator {
47850
47842
  forEachSpreadPositionInMatrix(nbColumns, nbRows,
47851
47843
  // thanks to the isMatrix check above, we know that formulaReturn is MatrixFunctionReturn
47852
47844
  this.spreadValues(formulaPosition, formulaReturn));
47845
+ this.invalidatePositionsDependingOnSpread(formulaPosition, nbColumns, nbRows);
47853
47846
  return createEvaluatedCell(nullValueToZeroValue(formulaReturn[0][0]), this.getters.getLocale(), cellData);
47854
47847
  }
47848
+ invalidatePositionsDependingOnSpread(arrayFormulaPosition, nbColumns, nbRows) {
47849
+ // the result matrix is split in 2 zones to exclude the array formula position
47850
+ const top = arrayFormulaPosition.row;
47851
+ const left = arrayFormulaPosition.col;
47852
+ const bottom = top + nbRows - 1;
47853
+ const leftColumnZone = {
47854
+ top: top + 1,
47855
+ bottom,
47856
+ left,
47857
+ right: left,
47858
+ };
47859
+ const rightPartZone = {
47860
+ top,
47861
+ bottom,
47862
+ left: left + 1,
47863
+ right: left + nbColumns - 1,
47864
+ };
47865
+ const sheetId = arrayFormulaPosition.sheetId;
47866
+ const invalidatedPositions = this.formulaDependencies().getCellsDependingOn([
47867
+ { sheetId, zone: rightPartZone },
47868
+ { sheetId, zone: leftColumnZone },
47869
+ ]);
47870
+ this.nextPositionsToUpdate.addMany(invalidatedPositions);
47871
+ }
47855
47872
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
47856
47873
  const numberOfCols = this.getters.getNumberCols(sheetId);
47857
47874
  const numberOfRows = this.getters.getNumberRows(sheetId);
@@ -47894,9 +47911,6 @@ class Evaluator {
47894
47911
  const cell = this.getters.getCell(position);
47895
47912
  const evaluatedCell = createEvaluatedCell(nullValueToZeroValue(matrixResult[i][j]), this.getters.getLocale(), cell);
47896
47913
  this.evaluatedCells.set(position, evaluatedCell);
47897
- // check if formula dependencies present in the spread zone
47898
- // if so, they need to be recomputed
47899
- this.nextPositionsToUpdate.addMany(this.getCellsDependingOn([position]));
47900
47914
  };
47901
47915
  }
47902
47916
  invalidateSpreading(position) {
@@ -60869,6 +60883,6 @@ exports.tokenColors = tokenColors;
60869
60883
  exports.tokenize = tokenize;
60870
60884
 
60871
60885
 
60872
- __info__.version = "17.2.15";
60873
- __info__.date = "2024-07-08T05:41:55.356Z";
60874
- __info__.hash = "acfb3e7";
60886
+ __info__.version = "17.2.16";
60887
+ __info__.date = "2024-07-11T06:38:53.101Z";
60888
+ __info__.hash = "9f20685";
@@ -4945,7 +4945,7 @@ declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
4945
4945
  /**
4946
4946
  * Compares two objects.
4947
4947
  */
4948
- declare function deepEquals(o1: any, o2: any, ignoreFunctions?: "ignoreFunctions"): boolean;
4948
+ declare function deepEquals(o1: any, o2: any): boolean;
4949
4949
 
4950
4950
  interface ConstructorArgs {
4951
4951
  readonly zone: Readonly<Zone | UnboundedZone>;
@@ -6870,7 +6870,6 @@ declare class ChartJsComponent extends Component<Props$y, SpreadsheetChildEnv> {
6870
6870
  };
6871
6871
  private canvas;
6872
6872
  private chart?;
6873
- private currentRuntime;
6874
6873
  get background(): string;
6875
6874
  get canvasStyle(): string;
6876
6875
  get chartRuntime(): ChartJSRuntime;
@@ -3,9 +3,9 @@
3
3
  /**
4
4
  * This file is generated by o-spreadsheet build tools. Do not edit it.
5
5
  * @see https://github.com/odoo/o-spreadsheet
6
- * @version 17.2.15
7
- * @date 2024-07-08T05:41:55.356Z
8
- * @hash acfb3e7
6
+ * @version 17.2.16
7
+ * @date 2024-07-11T06:38:53.101Z
8
+ * @hash 9f20685
9
9
  */
10
10
 
11
11
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw } from '@odoo/owl';
@@ -575,7 +575,7 @@ function getAddHeaderStartIndex(position, base) {
575
575
  /**
576
576
  * Compares two objects.
577
577
  */
578
- function deepEquals(o1, o2, ignoreFunctions) {
578
+ function deepEquals(o1, o2) {
579
579
  if (o1 === o2)
580
580
  return true;
581
581
  if ((o1 && !o2) || (o2 && !o1))
@@ -591,17 +591,13 @@ function deepEquals(o1, o2, ignoreFunctions) {
591
591
  }
592
592
  }
593
593
  for (const key in o1) {
594
- const typeOfO1Key = typeof o1[key];
595
- if (typeOfO1Key !== typeof o2[key])
594
+ if (typeof o1[key] !== typeof o2[key])
596
595
  return false;
597
- if (typeOfO1Key === "object") {
598
- if (!deepEquals(o1[key], o2[key], ignoreFunctions))
596
+ if (typeof o1[key] === "object") {
597
+ if (!deepEquals(o1[key], o2[key]))
599
598
  return false;
600
599
  }
601
600
  else {
602
- if (ignoreFunctions && typeOfO1Key === "function") {
603
- continue;
604
- }
605
601
  if (o1[key] !== o2[key])
606
602
  return false;
607
603
  }
@@ -2646,6 +2642,9 @@ function getPredicate(descr, locale) {
2646
2642
  * If the character is a special regular expression character, it is escaped with "\\".
2647
2643
  */
2648
2644
  const wildcardToRegExp = memoize(function wildcardToRegExp(operand) {
2645
+ if (operand === "*") {
2646
+ return /.+/;
2647
+ }
2649
2648
  let exp = "";
2650
2649
  let predecessor = "";
2651
2650
  for (let char of operand) {
@@ -2669,9 +2668,9 @@ const wildcardToRegExp = memoize(function wildcardToRegExp(operand) {
2669
2668
  }
2670
2669
  return new RegExp("^" + exp + "$", "i");
2671
2670
  });
2672
- function evaluatePredicate(value, criterion) {
2671
+ function evaluatePredicate(value = "", criterion) {
2673
2672
  const { operator, operand } = criterion;
2674
- if (value === undefined || operand === undefined || value === null || operand === null) {
2673
+ if (operand === undefined || value === null || operand === null) {
2675
2674
  return false;
2676
2675
  }
2677
2676
  if (typeof operand === "number" && operator === "=") {
@@ -9204,7 +9203,6 @@ class ChartJsComponent extends Component {
9204
9203
  };
9205
9204
  canvas = useRef("graphContainer");
9206
9205
  chart;
9207
- currentRuntime;
9208
9206
  get background() {
9209
9207
  return this.chartRuntime.background;
9210
9208
  }
@@ -9221,18 +9219,11 @@ class ChartJsComponent extends Component {
9221
9219
  setup() {
9222
9220
  onMounted(() => {
9223
9221
  const runtime = this.chartRuntime;
9224
- this.currentRuntime = runtime;
9225
9222
  // Note: chartJS modify the runtime in place, so it's important to give it a copy
9226
9223
  this.createChart(deepCopy(runtime.chartJsConfig));
9227
9224
  });
9228
9225
  onWillUnmount(() => this.chart?.destroy());
9229
- useEffect(() => {
9230
- const runtime = this.chartRuntime;
9231
- if (!deepEquals(runtime, this.currentRuntime, "ignoreFunctions")) {
9232
- this.currentRuntime = runtime;
9233
- this.updateChartJs(deepCopy(runtime));
9234
- }
9235
- });
9226
+ useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime]);
9236
9227
  }
9237
9228
  createChart(chartData) {
9238
9229
  const canvas = this.canvas.el;
@@ -19634,7 +19625,7 @@ function truncateLabel(label) {
19634
19625
  /**
19635
19626
  * Get a default chart js configuration
19636
19627
  */
19637
- function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels }) {
19628
+ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels = true }) {
19638
19629
  const options = {
19639
19630
  // https://www.chartjs.org/docs/latest/general/responsive.html
19640
19631
  responsive: true,
@@ -47506,7 +47497,7 @@ class PositionSet {
47506
47497
  return this.sheets[position.sheetId].getValue(position) === 1;
47507
47498
  }
47508
47499
  clear() {
47509
- const insertions = this.insertions;
47500
+ const insertions = [...this];
47510
47501
  this.insertions = [];
47511
47502
  for (const sheetId in this.sheets) {
47512
47503
  this.sheets[sheetId].clear();
@@ -47824,6 +47815,7 @@ class Evaluator {
47824
47815
  }
47825
47816
  finally {
47826
47817
  this.cellsBeingComputed.delete(cellId);
47818
+ this.nextPositionsToUpdate.delete(position);
47827
47819
  }
47828
47820
  }
47829
47821
  computeAndSave(position) {
@@ -47848,8 +47840,33 @@ class Evaluator {
47848
47840
  forEachSpreadPositionInMatrix(nbColumns, nbRows,
47849
47841
  // thanks to the isMatrix check above, we know that formulaReturn is MatrixFunctionReturn
47850
47842
  this.spreadValues(formulaPosition, formulaReturn));
47843
+ this.invalidatePositionsDependingOnSpread(formulaPosition, nbColumns, nbRows);
47851
47844
  return createEvaluatedCell(nullValueToZeroValue(formulaReturn[0][0]), this.getters.getLocale(), cellData);
47852
47845
  }
47846
+ invalidatePositionsDependingOnSpread(arrayFormulaPosition, nbColumns, nbRows) {
47847
+ // the result matrix is split in 2 zones to exclude the array formula position
47848
+ const top = arrayFormulaPosition.row;
47849
+ const left = arrayFormulaPosition.col;
47850
+ const bottom = top + nbRows - 1;
47851
+ const leftColumnZone = {
47852
+ top: top + 1,
47853
+ bottom,
47854
+ left,
47855
+ right: left,
47856
+ };
47857
+ const rightPartZone = {
47858
+ top,
47859
+ bottom,
47860
+ left: left + 1,
47861
+ right: left + nbColumns - 1,
47862
+ };
47863
+ const sheetId = arrayFormulaPosition.sheetId;
47864
+ const invalidatedPositions = this.formulaDependencies().getCellsDependingOn([
47865
+ { sheetId, zone: rightPartZone },
47866
+ { sheetId, zone: leftColumnZone },
47867
+ ]);
47868
+ this.nextPositionsToUpdate.addMany(invalidatedPositions);
47869
+ }
47853
47870
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
47854
47871
  const numberOfCols = this.getters.getNumberCols(sheetId);
47855
47872
  const numberOfRows = this.getters.getNumberRows(sheetId);
@@ -47892,9 +47909,6 @@ class Evaluator {
47892
47909
  const cell = this.getters.getCell(position);
47893
47910
  const evaluatedCell = createEvaluatedCell(nullValueToZeroValue(matrixResult[i][j]), this.getters.getLocale(), cell);
47894
47911
  this.evaluatedCells.set(position, evaluatedCell);
47895
- // check if formula dependencies present in the spread zone
47896
- // if so, they need to be recomputed
47897
- this.nextPositionsToUpdate.addMany(this.getCellsDependingOn([position]));
47898
47912
  };
47899
47913
  }
47900
47914
  invalidateSpreading(position) {
@@ -60826,6 +60840,6 @@ const constants = {
60826
60840
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
60827
60841
 
60828
60842
 
60829
- __info__.version = "17.2.15";
60830
- __info__.date = "2024-07-08T05:41:55.356Z";
60831
- __info__.hash = "acfb3e7";
60843
+ __info__.version = "17.2.16";
60844
+ __info__.date = "2024-07-11T06:38:53.101Z";
60845
+ __info__.hash = "9f20685";
@@ -3,9 +3,9 @@
3
3
  /**
4
4
  * This file is generated by o-spreadsheet build tools. Do not edit it.
5
5
  * @see https://github.com/odoo/o-spreadsheet
6
- * @version 17.2.15
7
- * @date 2024-07-08T05:41:55.356Z
8
- * @hash acfb3e7
6
+ * @version 17.2.16
7
+ * @date 2024-07-11T06:38:53.101Z
8
+ * @hash 9f20685
9
9
  */
10
10
 
11
11
  (function (exports, owl) {
@@ -576,7 +576,7 @@
576
576
  /**
577
577
  * Compares two objects.
578
578
  */
579
- function deepEquals(o1, o2, ignoreFunctions) {
579
+ function deepEquals(o1, o2) {
580
580
  if (o1 === o2)
581
581
  return true;
582
582
  if ((o1 && !o2) || (o2 && !o1))
@@ -592,17 +592,13 @@
592
592
  }
593
593
  }
594
594
  for (const key in o1) {
595
- const typeOfO1Key = typeof o1[key];
596
- if (typeOfO1Key !== typeof o2[key])
595
+ if (typeof o1[key] !== typeof o2[key])
597
596
  return false;
598
- if (typeOfO1Key === "object") {
599
- if (!deepEquals(o1[key], o2[key], ignoreFunctions))
597
+ if (typeof o1[key] === "object") {
598
+ if (!deepEquals(o1[key], o2[key]))
600
599
  return false;
601
600
  }
602
601
  else {
603
- if (ignoreFunctions && typeOfO1Key === "function") {
604
- continue;
605
- }
606
602
  if (o1[key] !== o2[key])
607
603
  return false;
608
604
  }
@@ -2647,6 +2643,9 @@
2647
2643
  * If the character is a special regular expression character, it is escaped with "\\".
2648
2644
  */
2649
2645
  const wildcardToRegExp = memoize(function wildcardToRegExp(operand) {
2646
+ if (operand === "*") {
2647
+ return /.+/;
2648
+ }
2650
2649
  let exp = "";
2651
2650
  let predecessor = "";
2652
2651
  for (let char of operand) {
@@ -2670,9 +2669,9 @@
2670
2669
  }
2671
2670
  return new RegExp("^" + exp + "$", "i");
2672
2671
  });
2673
- function evaluatePredicate(value, criterion) {
2672
+ function evaluatePredicate(value = "", criterion) {
2674
2673
  const { operator, operand } = criterion;
2675
- if (value === undefined || operand === undefined || value === null || operand === null) {
2674
+ if (operand === undefined || value === null || operand === null) {
2676
2675
  return false;
2677
2676
  }
2678
2677
  if (typeof operand === "number" && operator === "=") {
@@ -9205,7 +9204,6 @@ stores.inject(MyMetaStore, storeInstance);
9205
9204
  };
9206
9205
  canvas = owl.useRef("graphContainer");
9207
9206
  chart;
9208
- currentRuntime;
9209
9207
  get background() {
9210
9208
  return this.chartRuntime.background;
9211
9209
  }
@@ -9222,18 +9220,11 @@ stores.inject(MyMetaStore, storeInstance);
9222
9220
  setup() {
9223
9221
  owl.onMounted(() => {
9224
9222
  const runtime = this.chartRuntime;
9225
- this.currentRuntime = runtime;
9226
9223
  // Note: chartJS modify the runtime in place, so it's important to give it a copy
9227
9224
  this.createChart(deepCopy(runtime.chartJsConfig));
9228
9225
  });
9229
9226
  owl.onWillUnmount(() => this.chart?.destroy());
9230
- owl.useEffect(() => {
9231
- const runtime = this.chartRuntime;
9232
- if (!deepEquals(runtime, this.currentRuntime, "ignoreFunctions")) {
9233
- this.currentRuntime = runtime;
9234
- this.updateChartJs(deepCopy(runtime));
9235
- }
9236
- });
9227
+ owl.useEffect(() => this.updateChartJs(deepCopy(this.chartRuntime)), () => [this.chartRuntime]);
9237
9228
  }
9238
9229
  createChart(chartData) {
9239
9230
  const canvas = this.canvas.el;
@@ -19635,7 +19626,7 @@ stores.inject(MyMetaStore, storeInstance);
19635
19626
  /**
19636
19627
  * Get a default chart js configuration
19637
19628
  */
19638
- function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels }) {
19629
+ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, truncateLabels = true }) {
19639
19630
  const options = {
19640
19631
  // https://www.chartjs.org/docs/latest/general/responsive.html
19641
19632
  responsive: true,
@@ -47507,7 +47498,7 @@ stores.inject(MyMetaStore, storeInstance);
47507
47498
  return this.sheets[position.sheetId].getValue(position) === 1;
47508
47499
  }
47509
47500
  clear() {
47510
- const insertions = this.insertions;
47501
+ const insertions = [...this];
47511
47502
  this.insertions = [];
47512
47503
  for (const sheetId in this.sheets) {
47513
47504
  this.sheets[sheetId].clear();
@@ -47825,6 +47816,7 @@ stores.inject(MyMetaStore, storeInstance);
47825
47816
  }
47826
47817
  finally {
47827
47818
  this.cellsBeingComputed.delete(cellId);
47819
+ this.nextPositionsToUpdate.delete(position);
47828
47820
  }
47829
47821
  }
47830
47822
  computeAndSave(position) {
@@ -47849,8 +47841,33 @@ stores.inject(MyMetaStore, storeInstance);
47849
47841
  forEachSpreadPositionInMatrix(nbColumns, nbRows,
47850
47842
  // thanks to the isMatrix check above, we know that formulaReturn is MatrixFunctionReturn
47851
47843
  this.spreadValues(formulaPosition, formulaReturn));
47844
+ this.invalidatePositionsDependingOnSpread(formulaPosition, nbColumns, nbRows);
47852
47845
  return createEvaluatedCell(nullValueToZeroValue(formulaReturn[0][0]), this.getters.getLocale(), cellData);
47853
47846
  }
47847
+ invalidatePositionsDependingOnSpread(arrayFormulaPosition, nbColumns, nbRows) {
47848
+ // the result matrix is split in 2 zones to exclude the array formula position
47849
+ const top = arrayFormulaPosition.row;
47850
+ const left = arrayFormulaPosition.col;
47851
+ const bottom = top + nbRows - 1;
47852
+ const leftColumnZone = {
47853
+ top: top + 1,
47854
+ bottom,
47855
+ left,
47856
+ right: left,
47857
+ };
47858
+ const rightPartZone = {
47859
+ top,
47860
+ bottom,
47861
+ left: left + 1,
47862
+ right: left + nbColumns - 1,
47863
+ };
47864
+ const sheetId = arrayFormulaPosition.sheetId;
47865
+ const invalidatedPositions = this.formulaDependencies().getCellsDependingOn([
47866
+ { sheetId, zone: rightPartZone },
47867
+ { sheetId, zone: leftColumnZone },
47868
+ ]);
47869
+ this.nextPositionsToUpdate.addMany(invalidatedPositions);
47870
+ }
47854
47871
  assertSheetHasEnoughSpaceToSpreadFormulaResult({ sheetId, col, row }, matrixResult) {
47855
47872
  const numberOfCols = this.getters.getNumberCols(sheetId);
47856
47873
  const numberOfRows = this.getters.getNumberRows(sheetId);
@@ -47893,9 +47910,6 @@ stores.inject(MyMetaStore, storeInstance);
47893
47910
  const cell = this.getters.getCell(position);
47894
47911
  const evaluatedCell = createEvaluatedCell(nullValueToZeroValue(matrixResult[i][j]), this.getters.getLocale(), cell);
47895
47912
  this.evaluatedCells.set(position, evaluatedCell);
47896
- // check if formula dependencies present in the spread zone
47897
- // if so, they need to be recomputed
47898
- this.nextPositionsToUpdate.addMany(this.getCellsDependingOn([position]));
47899
47913
  };
47900
47914
  }
47901
47915
  invalidateSpreading(position) {
@@ -60868,9 +60882,9 @@ stores.inject(MyMetaStore, storeInstance);
60868
60882
  exports.tokenize = tokenize;
60869
60883
 
60870
60884
 
60871
- __info__.version = "17.2.15";
60872
- __info__.date = "2024-07-08T05:41:55.356Z";
60873
- __info__.hash = "acfb3e7";
60885
+ __info__.version = "17.2.16";
60886
+ __info__.date = "2024-07-11T06:38:53.101Z";
60887
+ __info__.hash = "9f20685";
60874
60888
 
60875
60889
 
60876
60890
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);