@odoo/o-spreadsheet 18.0.24 → 18.0.25

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 18.0.24
6
- * @date 2025-04-18T16:23:09.320Z
7
- * @hash aa18758
5
+ * @version 18.0.25
6
+ * @date 2025-04-25T08:08:43.377Z
7
+ * @hash 24aac2c
8
8
  */
9
9
 
10
10
  'use strict';
@@ -3665,11 +3665,13 @@ const CellErrorType = {
3665
3665
  NullError: "#NULL!",
3666
3666
  };
3667
3667
  const errorTypes = new Set(Object.values(CellErrorType));
3668
- class EvaluationError extends Error {
3668
+ class EvaluationError {
3669
+ message;
3669
3670
  value;
3670
3671
  constructor(message = _t("Error"), value = CellErrorType.GenericError) {
3671
- super(message);
3672
+ this.message = message;
3672
3673
  this.value = value;
3674
+ this.message = message.toString();
3673
3675
  }
3674
3676
  }
3675
3677
  class BadExpressionError extends EvaluationError {
@@ -15668,9 +15670,11 @@ const GAUGE_TITLE_PADDING_LEFT = SCORECARD_GAUGE_CHART_PADDING;
15668
15670
  const GAUGE_TITLE_PADDING_TOP = SCORECARD_GAUGE_CHART_PADDING;
15669
15671
  function drawGaugeChart(canvas, runtime) {
15670
15672
  const canvasBoundingRect = canvas.getBoundingClientRect();
15671
- canvas.width = canvasBoundingRect.width;
15672
- canvas.height = canvasBoundingRect.height;
15673
+ const dpr = window.devicePixelRatio || 1;
15674
+ canvas.width = dpr * canvasBoundingRect.width;
15675
+ canvas.height = dpr * canvasBoundingRect.height;
15673
15676
  const ctx = canvas.getContext("2d");
15677
+ ctx.scale(dpr, dpr);
15674
15678
  const config = getGaugeRenderingConfig(canvasBoundingRect, runtime, ctx);
15675
15679
  drawBackground(ctx, config);
15676
15680
  drawGauge(ctx, config);
@@ -16232,9 +16236,11 @@ let ScorecardChart$1 = class ScorecardChart extends AbstractChart {
16232
16236
  };
16233
16237
  function drawScoreChart(structure, canvas) {
16234
16238
  const ctx = canvas.getContext("2d");
16235
- canvas.width = structure.canvas.width;
16236
- const availableWidth = canvas.width - DEFAULT_CHART_PADDING;
16237
- canvas.height = structure.canvas.height;
16239
+ const dpr = window.devicePixelRatio || 1;
16240
+ canvas.width = dpr * structure.canvas.width;
16241
+ canvas.height = dpr * structure.canvas.height;
16242
+ ctx.scale(dpr, dpr);
16243
+ const availableWidth = structure.canvas.width - DEFAULT_CHART_PADDING;
16238
16244
  ctx.fillStyle = structure.canvas.backgroundColor;
16239
16245
  ctx.fillRect(0, 0, structure.canvas.width, structure.canvas.height);
16240
16246
  if (structure.title) {
@@ -16945,6 +16951,10 @@ class ChartJsComponent extends owl.Component {
16945
16951
  this.currentRuntime = runtime;
16946
16952
  }
16947
16953
  });
16954
+ owl.useEffect(() => {
16955
+ this.currentRuntime = this.chartRuntime;
16956
+ this.updateChartJs(deepCopy(this.currentRuntime));
16957
+ }, () => [window.devicePixelRatio]);
16948
16958
  }
16949
16959
  createChart(chartData) {
16950
16960
  const canvas = this.canvas.el;
@@ -16986,7 +16996,7 @@ class ScorecardChart extends owl.Component {
16986
16996
  owl.useEffect(this.createChart.bind(this), () => {
16987
16997
  const canvas = this.canvas.el;
16988
16998
  const rect = canvas.getBoundingClientRect();
16989
- return [rect.width, rect.height, this.runtime, this.canvas.el];
16999
+ return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
16990
17000
  });
16991
17001
  }
16992
17002
  createChart() {
@@ -17454,7 +17464,7 @@ const MINVERSE = {
17454
17464
  assertSquareMatrix(_t("The argument square_matrix must have the same number of columns and rows."), _matrix);
17455
17465
  const { inverted } = invertMatrix(_matrix);
17456
17466
  if (!inverted) {
17457
- throw new EvaluationError(_t("The matrix is not invertible."));
17467
+ return new EvaluationError(_t("The matrix is not invertible."));
17458
17468
  }
17459
17469
  return inverted;
17460
17470
  },
@@ -17614,7 +17624,7 @@ const TOCOL = {
17614
17624
  .flat()
17615
17625
  .filter(shouldKeepValue(_ignore));
17616
17626
  if (result.length === 0) {
17617
- throw new NotAvailableError(_t("No results for the given arguments of TOCOL."));
17627
+ return new NotAvailableError(_t("No results for the given arguments of TOCOL."));
17618
17628
  }
17619
17629
  return [result];
17620
17630
  },
@@ -17635,7 +17645,7 @@ const TOROW = {
17635
17645
  .filter(shouldKeepValue(_ignore))
17636
17646
  .map((item) => [item]);
17637
17647
  if (result.length === 0 || result[0].length === 0) {
17638
- throw new NotAvailableError(_t("No results for the given arguments of TOROW."));
17648
+ return new NotAvailableError(_t("No results for the given arguments of TOROW."));
17639
17649
  }
17640
17650
  return result;
17641
17651
  },
@@ -18482,7 +18492,7 @@ const PRODUCT = {
18482
18492
  count += 1;
18483
18493
  }
18484
18494
  if (isEvaluationError(f)) {
18485
- throw j;
18495
+ return j;
18486
18496
  }
18487
18497
  }
18488
18498
  }
@@ -19385,7 +19395,7 @@ const MATTHEWS = {
19385
19395
  const flatY = dataY.flat();
19386
19396
  assertSameNumberOfElements(flatX, flatY);
19387
19397
  if (flatX.length === 0) {
19388
- throw new EvaluationError(_t("[[FUNCTION_NAME]] expects non-empty ranges for both parameters."));
19398
+ return new EvaluationError(_t("[[FUNCTION_NAME]] expects non-empty ranges for both parameters."));
19389
19399
  }
19390
19400
  const n = flatX.length;
19391
19401
  let trueN = 0, trueP = 0, falseP = 0, falseN = 0;
@@ -19748,7 +19758,7 @@ const RANK = {
19748
19758
  }
19749
19759
  }
19750
19760
  if (!found) {
19751
- throw new NotAvailableError(_t("Value not found in the given data."));
19761
+ return new NotAvailableError(_t("Value not found in the given data."));
19752
19762
  }
19753
19763
  return rank;
19754
19764
  },
@@ -21373,7 +21383,7 @@ const FILTER = {
21373
21383
  }
21374
21384
  }
21375
21385
  if (!result.length) {
21376
- throw new NotAvailableError(_t("No match found in FILTER evaluation"));
21386
+ return new NotAvailableError(_t("No match found in FILTER evaluation"));
21377
21387
  }
21378
21388
  return mode === "row" ? transposeMatrix(result) : result;
21379
21389
  },
@@ -21502,7 +21512,7 @@ const UNIQUE = {
21502
21512
  result.push(row.data);
21503
21513
  }
21504
21514
  if (!result.length)
21505
- throw new EvaluationError(_t("No unique values found"));
21515
+ return new EvaluationError(_t("No unique values found"));
21506
21516
  return _byColumn ? result : transposeMatrix(result);
21507
21517
  },
21508
21518
  isExported: true,
@@ -24428,7 +24438,7 @@ const IFS = {
24428
24438
  return result;
24429
24439
  }
24430
24440
  }
24431
- throw new EvaluationError(_t("No match."));
24441
+ return new EvaluationError(_t("No match."));
24432
24442
  },
24433
24443
  isExported: true,
24434
24444
  };
@@ -24619,7 +24629,7 @@ const COLUMN = {
24619
24629
  ],
24620
24630
  compute: function (cellReference) {
24621
24631
  if (isEvaluationError(cellReference?.value)) {
24622
- throw cellReference;
24632
+ return cellReference;
24623
24633
  }
24624
24634
  const column = cellReference === undefined
24625
24635
  ? this.__originCellPosition?.col
@@ -24637,7 +24647,7 @@ const COLUMNS = {
24637
24647
  args: [arg("range (meta)", _t("The range whose column count will be returned."))],
24638
24648
  compute: function (range) {
24639
24649
  if (isEvaluationError(range?.value)) {
24640
- throw range;
24650
+ return range;
24641
24651
  }
24642
24652
  const zone = toZone(range.value);
24643
24653
  return zone.right - zone.left + 1;
@@ -24715,11 +24725,11 @@ const INDIRECT = {
24715
24725
  compute: function (reference, useA1Notation = { value: true }) {
24716
24726
  let _reference = reference?.value?.toString();
24717
24727
  if (!_reference) {
24718
- throw new InvalidReferenceError(_t("Reference should be defined."));
24728
+ return new InvalidReferenceError(_t("Reference should be defined."));
24719
24729
  }
24720
24730
  const _useA1Notation = toBoolean(useA1Notation);
24721
24731
  if (!_useA1Notation) {
24722
- throw new EvaluationError(_t("R1C1 notation is not supported."));
24732
+ return new EvaluationError(_t("R1C1 notation is not supported."));
24723
24733
  }
24724
24734
  const sheetId = this.__originSheetId;
24725
24735
  const originPosition = this.__originCellPosition;
@@ -24731,7 +24741,7 @@ const INDIRECT = {
24731
24741
  }
24732
24742
  const range = this.getters.getRangeFromSheetXC(sheetId, _reference);
24733
24743
  if (range === undefined || range.invalidXc || range.invalidSheetName) {
24734
- throw new InvalidReferenceError();
24744
+ return new InvalidReferenceError();
24735
24745
  }
24736
24746
  if (originPosition) {
24737
24747
  this.addDependencies?.(originPosition, [range]);
@@ -24842,7 +24852,7 @@ const ROW = {
24842
24852
  ],
24843
24853
  compute: function (cellReference) {
24844
24854
  if (isEvaluationError(cellReference?.value)) {
24845
- throw cellReference;
24855
+ return cellReference;
24846
24856
  }
24847
24857
  const row = cellReference === undefined
24848
24858
  ? this.__originCellPosition?.row
@@ -24860,7 +24870,7 @@ const ROWS = {
24860
24870
  args: [arg("range (meta)", _t("The range whose row count will be returned."))],
24861
24871
  compute: function (range) {
24862
24872
  if (isEvaluationError(range?.value)) {
24863
- throw range;
24873
+ return range;
24864
24874
  }
24865
24875
  const zone = toZone(range.value);
24866
24876
  return zone.bottom - zone.top + 1;
@@ -25046,11 +25056,11 @@ const PIVOT = {
25046
25056
  const _pivotFormulaId = toString(pivotFormulaId);
25047
25057
  const _rowCount = toNumber(rowCount, this.locale);
25048
25058
  if (_rowCount < 0) {
25049
- throw new EvaluationError(_t("The number of rows must be positive."));
25059
+ return new EvaluationError(_t("The number of rows must be positive."));
25050
25060
  }
25051
25061
  const _columnCount = toNumber(columnCount, this.locale);
25052
25062
  if (_columnCount < 0) {
25053
- throw new EvaluationError(_t("The number of columns must be positive."));
25063
+ return new EvaluationError(_t("The number of columns must be positive."));
25054
25064
  }
25055
25065
  const _includeColumnHeaders = toBoolean(includeColumnHeaders);
25056
25066
  const _includedTotal = toBoolean(includeTotal);
@@ -25118,7 +25128,7 @@ const OFFSET = {
25118
25128
  }
25119
25129
  const _cellReference = cellReference?.value;
25120
25130
  if (!_cellReference) {
25121
- throw new Error("In this context, the function OFFSET needs to have a cell or range in parameter.");
25131
+ return new EvaluationError("In this context, the function OFFSET needs to have a cell or range in parameter.");
25122
25132
  }
25123
25133
  const zone = toZone(_cellReference);
25124
25134
  let offsetHeight = zone.bottom - zone.top + 1;
@@ -28924,7 +28934,7 @@ class GaugeChartComponent extends owl.Component {
28924
28934
  owl.useEffect(() => drawGaugeChart(this.canvas.el, this.runtime), () => {
28925
28935
  const canvas = this.canvas.el;
28926
28936
  const rect = canvas.getBoundingClientRect();
28927
- return [rect.width, rect.height, this.runtime, this.canvas.el];
28937
+ return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
28928
28938
  });
28929
28939
  }
28930
28940
  }
@@ -37482,7 +37492,7 @@ class ColorPicker extends owl.Component {
37482
37492
  }
37483
37493
  setHexColor(ev) {
37484
37494
  // only support HEX code input
37485
- const val = ev.target.value.slice(0, 7);
37495
+ const val = ev.target.value.replace("##", "#").slice(0, 7);
37486
37496
  this.state.customHexColor = val;
37487
37497
  if (!isColorValid(val)) ;
37488
37498
  else {
@@ -59898,6 +59908,16 @@ function withPivotPresentationLayer (PivotClass) {
59898
59908
  }
59899
59909
  return values;
59900
59910
  }
59911
+ else if (rowDomain.length === this.definition.rows.length &&
59912
+ colDomain.length &&
59913
+ colDomain.length < this.definition.columns.length) {
59914
+ const colSubTree = this.getSubTreeMatchingDomain(table.getColTree(), colDomain);
59915
+ const domains = this.treeToLeafDomains(colSubTree, colDomain);
59916
+ for (const domain of domains) {
59917
+ values.push(this._getPivotCellValueAndFormat(measure.id, rowDomain.concat(domain)));
59918
+ }
59919
+ return values;
59920
+ }
59901
59921
  else {
59902
59922
  const tree = table.getRowTree();
59903
59923
  const subTree = this.getSubTreeMatchingDomain(tree, rowDomain);
@@ -73757,6 +73777,6 @@ exports.tokenColors = tokenColors;
73757
73777
  exports.tokenize = tokenize;
73758
73778
 
73759
73779
 
73760
- __info__.version = "18.0.24";
73761
- __info__.date = "2025-04-18T16:23:09.320Z";
73762
- __info__.hash = "aa18758";
73780
+ __info__.version = "18.0.25";
73781
+ __info__.date = "2025-04-25T08:08:43.377Z";
73782
+ __info__.hash = "24aac2c";
@@ -11111,7 +11111,8 @@ declare const CellErrorType: {
11111
11111
  readonly GenericError: "#ERROR";
11112
11112
  readonly NullError: "#NULL!";
11113
11113
  };
11114
- declare class EvaluationError extends Error {
11114
+ declare class EvaluationError {
11115
+ readonly message: string;
11115
11116
  readonly value: string;
11116
11117
  constructor(message?: string, value?: string);
11117
11118
  }
@@ -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 18.0.24
6
- * @date 2025-04-18T16:23:09.320Z
7
- * @hash aa18758
5
+ * @version 18.0.25
6
+ * @date 2025-04-25T08:08:43.377Z
7
+ * @hash 24aac2c
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -3663,11 +3663,13 @@ const CellErrorType = {
3663
3663
  NullError: "#NULL!",
3664
3664
  };
3665
3665
  const errorTypes = new Set(Object.values(CellErrorType));
3666
- class EvaluationError extends Error {
3666
+ class EvaluationError {
3667
+ message;
3667
3668
  value;
3668
3669
  constructor(message = _t("Error"), value = CellErrorType.GenericError) {
3669
- super(message);
3670
+ this.message = message;
3670
3671
  this.value = value;
3672
+ this.message = message.toString();
3671
3673
  }
3672
3674
  }
3673
3675
  class BadExpressionError extends EvaluationError {
@@ -15666,9 +15668,11 @@ const GAUGE_TITLE_PADDING_LEFT = SCORECARD_GAUGE_CHART_PADDING;
15666
15668
  const GAUGE_TITLE_PADDING_TOP = SCORECARD_GAUGE_CHART_PADDING;
15667
15669
  function drawGaugeChart(canvas, runtime) {
15668
15670
  const canvasBoundingRect = canvas.getBoundingClientRect();
15669
- canvas.width = canvasBoundingRect.width;
15670
- canvas.height = canvasBoundingRect.height;
15671
+ const dpr = window.devicePixelRatio || 1;
15672
+ canvas.width = dpr * canvasBoundingRect.width;
15673
+ canvas.height = dpr * canvasBoundingRect.height;
15671
15674
  const ctx = canvas.getContext("2d");
15675
+ ctx.scale(dpr, dpr);
15672
15676
  const config = getGaugeRenderingConfig(canvasBoundingRect, runtime, ctx);
15673
15677
  drawBackground(ctx, config);
15674
15678
  drawGauge(ctx, config);
@@ -16230,9 +16234,11 @@ let ScorecardChart$1 = class ScorecardChart extends AbstractChart {
16230
16234
  };
16231
16235
  function drawScoreChart(structure, canvas) {
16232
16236
  const ctx = canvas.getContext("2d");
16233
- canvas.width = structure.canvas.width;
16234
- const availableWidth = canvas.width - DEFAULT_CHART_PADDING;
16235
- canvas.height = structure.canvas.height;
16237
+ const dpr = window.devicePixelRatio || 1;
16238
+ canvas.width = dpr * structure.canvas.width;
16239
+ canvas.height = dpr * structure.canvas.height;
16240
+ ctx.scale(dpr, dpr);
16241
+ const availableWidth = structure.canvas.width - DEFAULT_CHART_PADDING;
16236
16242
  ctx.fillStyle = structure.canvas.backgroundColor;
16237
16243
  ctx.fillRect(0, 0, structure.canvas.width, structure.canvas.height);
16238
16244
  if (structure.title) {
@@ -16943,6 +16949,10 @@ class ChartJsComponent extends Component {
16943
16949
  this.currentRuntime = runtime;
16944
16950
  }
16945
16951
  });
16952
+ useEffect(() => {
16953
+ this.currentRuntime = this.chartRuntime;
16954
+ this.updateChartJs(deepCopy(this.currentRuntime));
16955
+ }, () => [window.devicePixelRatio]);
16946
16956
  }
16947
16957
  createChart(chartData) {
16948
16958
  const canvas = this.canvas.el;
@@ -16984,7 +16994,7 @@ class ScorecardChart extends Component {
16984
16994
  useEffect(this.createChart.bind(this), () => {
16985
16995
  const canvas = this.canvas.el;
16986
16996
  const rect = canvas.getBoundingClientRect();
16987
- return [rect.width, rect.height, this.runtime, this.canvas.el];
16997
+ return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
16988
16998
  });
16989
16999
  }
16990
17000
  createChart() {
@@ -17452,7 +17462,7 @@ const MINVERSE = {
17452
17462
  assertSquareMatrix(_t("The argument square_matrix must have the same number of columns and rows."), _matrix);
17453
17463
  const { inverted } = invertMatrix(_matrix);
17454
17464
  if (!inverted) {
17455
- throw new EvaluationError(_t("The matrix is not invertible."));
17465
+ return new EvaluationError(_t("The matrix is not invertible."));
17456
17466
  }
17457
17467
  return inverted;
17458
17468
  },
@@ -17612,7 +17622,7 @@ const TOCOL = {
17612
17622
  .flat()
17613
17623
  .filter(shouldKeepValue(_ignore));
17614
17624
  if (result.length === 0) {
17615
- throw new NotAvailableError(_t("No results for the given arguments of TOCOL."));
17625
+ return new NotAvailableError(_t("No results for the given arguments of TOCOL."));
17616
17626
  }
17617
17627
  return [result];
17618
17628
  },
@@ -17633,7 +17643,7 @@ const TOROW = {
17633
17643
  .filter(shouldKeepValue(_ignore))
17634
17644
  .map((item) => [item]);
17635
17645
  if (result.length === 0 || result[0].length === 0) {
17636
- throw new NotAvailableError(_t("No results for the given arguments of TOROW."));
17646
+ return new NotAvailableError(_t("No results for the given arguments of TOROW."));
17637
17647
  }
17638
17648
  return result;
17639
17649
  },
@@ -18480,7 +18490,7 @@ const PRODUCT = {
18480
18490
  count += 1;
18481
18491
  }
18482
18492
  if (isEvaluationError(f)) {
18483
- throw j;
18493
+ return j;
18484
18494
  }
18485
18495
  }
18486
18496
  }
@@ -19383,7 +19393,7 @@ const MATTHEWS = {
19383
19393
  const flatY = dataY.flat();
19384
19394
  assertSameNumberOfElements(flatX, flatY);
19385
19395
  if (flatX.length === 0) {
19386
- throw new EvaluationError(_t("[[FUNCTION_NAME]] expects non-empty ranges for both parameters."));
19396
+ return new EvaluationError(_t("[[FUNCTION_NAME]] expects non-empty ranges for both parameters."));
19387
19397
  }
19388
19398
  const n = flatX.length;
19389
19399
  let trueN = 0, trueP = 0, falseP = 0, falseN = 0;
@@ -19746,7 +19756,7 @@ const RANK = {
19746
19756
  }
19747
19757
  }
19748
19758
  if (!found) {
19749
- throw new NotAvailableError(_t("Value not found in the given data."));
19759
+ return new NotAvailableError(_t("Value not found in the given data."));
19750
19760
  }
19751
19761
  return rank;
19752
19762
  },
@@ -21371,7 +21381,7 @@ const FILTER = {
21371
21381
  }
21372
21382
  }
21373
21383
  if (!result.length) {
21374
- throw new NotAvailableError(_t("No match found in FILTER evaluation"));
21384
+ return new NotAvailableError(_t("No match found in FILTER evaluation"));
21375
21385
  }
21376
21386
  return mode === "row" ? transposeMatrix(result) : result;
21377
21387
  },
@@ -21500,7 +21510,7 @@ const UNIQUE = {
21500
21510
  result.push(row.data);
21501
21511
  }
21502
21512
  if (!result.length)
21503
- throw new EvaluationError(_t("No unique values found"));
21513
+ return new EvaluationError(_t("No unique values found"));
21504
21514
  return _byColumn ? result : transposeMatrix(result);
21505
21515
  },
21506
21516
  isExported: true,
@@ -24426,7 +24436,7 @@ const IFS = {
24426
24436
  return result;
24427
24437
  }
24428
24438
  }
24429
- throw new EvaluationError(_t("No match."));
24439
+ return new EvaluationError(_t("No match."));
24430
24440
  },
24431
24441
  isExported: true,
24432
24442
  };
@@ -24617,7 +24627,7 @@ const COLUMN = {
24617
24627
  ],
24618
24628
  compute: function (cellReference) {
24619
24629
  if (isEvaluationError(cellReference?.value)) {
24620
- throw cellReference;
24630
+ return cellReference;
24621
24631
  }
24622
24632
  const column = cellReference === undefined
24623
24633
  ? this.__originCellPosition?.col
@@ -24635,7 +24645,7 @@ const COLUMNS = {
24635
24645
  args: [arg("range (meta)", _t("The range whose column count will be returned."))],
24636
24646
  compute: function (range) {
24637
24647
  if (isEvaluationError(range?.value)) {
24638
- throw range;
24648
+ return range;
24639
24649
  }
24640
24650
  const zone = toZone(range.value);
24641
24651
  return zone.right - zone.left + 1;
@@ -24713,11 +24723,11 @@ const INDIRECT = {
24713
24723
  compute: function (reference, useA1Notation = { value: true }) {
24714
24724
  let _reference = reference?.value?.toString();
24715
24725
  if (!_reference) {
24716
- throw new InvalidReferenceError(_t("Reference should be defined."));
24726
+ return new InvalidReferenceError(_t("Reference should be defined."));
24717
24727
  }
24718
24728
  const _useA1Notation = toBoolean(useA1Notation);
24719
24729
  if (!_useA1Notation) {
24720
- throw new EvaluationError(_t("R1C1 notation is not supported."));
24730
+ return new EvaluationError(_t("R1C1 notation is not supported."));
24721
24731
  }
24722
24732
  const sheetId = this.__originSheetId;
24723
24733
  const originPosition = this.__originCellPosition;
@@ -24729,7 +24739,7 @@ const INDIRECT = {
24729
24739
  }
24730
24740
  const range = this.getters.getRangeFromSheetXC(sheetId, _reference);
24731
24741
  if (range === undefined || range.invalidXc || range.invalidSheetName) {
24732
- throw new InvalidReferenceError();
24742
+ return new InvalidReferenceError();
24733
24743
  }
24734
24744
  if (originPosition) {
24735
24745
  this.addDependencies?.(originPosition, [range]);
@@ -24840,7 +24850,7 @@ const ROW = {
24840
24850
  ],
24841
24851
  compute: function (cellReference) {
24842
24852
  if (isEvaluationError(cellReference?.value)) {
24843
- throw cellReference;
24853
+ return cellReference;
24844
24854
  }
24845
24855
  const row = cellReference === undefined
24846
24856
  ? this.__originCellPosition?.row
@@ -24858,7 +24868,7 @@ const ROWS = {
24858
24868
  args: [arg("range (meta)", _t("The range whose row count will be returned."))],
24859
24869
  compute: function (range) {
24860
24870
  if (isEvaluationError(range?.value)) {
24861
- throw range;
24871
+ return range;
24862
24872
  }
24863
24873
  const zone = toZone(range.value);
24864
24874
  return zone.bottom - zone.top + 1;
@@ -25044,11 +25054,11 @@ const PIVOT = {
25044
25054
  const _pivotFormulaId = toString(pivotFormulaId);
25045
25055
  const _rowCount = toNumber(rowCount, this.locale);
25046
25056
  if (_rowCount < 0) {
25047
- throw new EvaluationError(_t("The number of rows must be positive."));
25057
+ return new EvaluationError(_t("The number of rows must be positive."));
25048
25058
  }
25049
25059
  const _columnCount = toNumber(columnCount, this.locale);
25050
25060
  if (_columnCount < 0) {
25051
- throw new EvaluationError(_t("The number of columns must be positive."));
25061
+ return new EvaluationError(_t("The number of columns must be positive."));
25052
25062
  }
25053
25063
  const _includeColumnHeaders = toBoolean(includeColumnHeaders);
25054
25064
  const _includedTotal = toBoolean(includeTotal);
@@ -25116,7 +25126,7 @@ const OFFSET = {
25116
25126
  }
25117
25127
  const _cellReference = cellReference?.value;
25118
25128
  if (!_cellReference) {
25119
- throw new Error("In this context, the function OFFSET needs to have a cell or range in parameter.");
25129
+ return new EvaluationError("In this context, the function OFFSET needs to have a cell or range in parameter.");
25120
25130
  }
25121
25131
  const zone = toZone(_cellReference);
25122
25132
  let offsetHeight = zone.bottom - zone.top + 1;
@@ -28922,7 +28932,7 @@ class GaugeChartComponent extends Component {
28922
28932
  useEffect(() => drawGaugeChart(this.canvas.el, this.runtime), () => {
28923
28933
  const canvas = this.canvas.el;
28924
28934
  const rect = canvas.getBoundingClientRect();
28925
- return [rect.width, rect.height, this.runtime, this.canvas.el];
28935
+ return [rect.width, rect.height, this.runtime, this.canvas.el, window.devicePixelRatio];
28926
28936
  });
28927
28937
  }
28928
28938
  }
@@ -37480,7 +37490,7 @@ class ColorPicker extends Component {
37480
37490
  }
37481
37491
  setHexColor(ev) {
37482
37492
  // only support HEX code input
37483
- const val = ev.target.value.slice(0, 7);
37493
+ const val = ev.target.value.replace("##", "#").slice(0, 7);
37484
37494
  this.state.customHexColor = val;
37485
37495
  if (!isColorValid(val)) ;
37486
37496
  else {
@@ -59896,6 +59906,16 @@ function withPivotPresentationLayer (PivotClass) {
59896
59906
  }
59897
59907
  return values;
59898
59908
  }
59909
+ else if (rowDomain.length === this.definition.rows.length &&
59910
+ colDomain.length &&
59911
+ colDomain.length < this.definition.columns.length) {
59912
+ const colSubTree = this.getSubTreeMatchingDomain(table.getColTree(), colDomain);
59913
+ const domains = this.treeToLeafDomains(colSubTree, colDomain);
59914
+ for (const domain of domains) {
59915
+ values.push(this._getPivotCellValueAndFormat(measure.id, rowDomain.concat(domain)));
59916
+ }
59917
+ return values;
59918
+ }
59899
59919
  else {
59900
59920
  const tree = table.getRowTree();
59901
59921
  const subTree = this.getSubTreeMatchingDomain(tree, rowDomain);
@@ -73712,6 +73732,6 @@ const constants = {
73712
73732
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, 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 };
73713
73733
 
73714
73734
 
73715
- __info__.version = "18.0.24";
73716
- __info__.date = "2025-04-18T16:23:09.320Z";
73717
- __info__.hash = "aa18758";
73735
+ __info__.version = "18.0.25";
73736
+ __info__.date = "2025-04-25T08:08:43.377Z";
73737
+ __info__.hash = "24aac2c";