@odoo/o-spreadsheet 18.2.0 → 18.2.1

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.2.0
6
- * @date 2025-02-18T08:27:07.101Z
7
- * @hash d708714
5
+ * @version 18.2.1
6
+ * @date 2025-02-25T06:03:13.262Z
7
+ * @hash 3b4b5c9
8
8
  */
9
9
 
10
10
  'use strict';
@@ -4460,7 +4460,7 @@ function dichotomicSearch(data, target, mode, sortOrder, rangeLength, getValueIn
4460
4460
  * @param reverseSearch if true, search in the array starting from the end.
4461
4461
 
4462
4462
  */
4463
- function linearSearch(data, target, mode, numberOfValues, getValueInData, reverseSearch = false) {
4463
+ function linearSearch(data, target, mode, numberOfValues, getValueInData, lookupCaches, reverseSearch = false) {
4464
4464
  if (target === undefined || target.value === null) {
4465
4465
  return -1;
4466
4466
  }
@@ -4469,17 +4469,48 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
4469
4469
  }
4470
4470
  const _target = normalizeValue(target.value);
4471
4471
  const getValue = reverseSearch
4472
- ? (data, i) => getValueInData(data, numberOfValues - i - 1)
4473
- : getValueInData;
4472
+ ? (data, i) => normalizeValue(getValueInData(data, numberOfValues - i - 1))
4473
+ : (data, i) => normalizeValue(getValueInData(data, i));
4474
+ // first check if the target is in the cache
4475
+ const isNotWildcardTarget = mode !== "wildcard" ||
4476
+ typeof _target !== "string" ||
4477
+ !(_target.includes("*") || _target.includes("?"));
4478
+ if (lookupCaches && isNotWildcardTarget) {
4479
+ const searchMode = reverseSearch ? "reverseSearch" : "forwardSearch";
4480
+ let cache = lookupCaches[searchMode].get(data);
4481
+ if (cache === undefined) {
4482
+ // build the cache for all the values
4483
+ cache = new Map();
4484
+ for (let i = 0; i < numberOfValues; i++) {
4485
+ const value = getValue(data, i) ?? null;
4486
+ if (!cache.has(value)) {
4487
+ cache.set(value, i);
4488
+ }
4489
+ }
4490
+ lookupCaches[searchMode].set(data, cache);
4491
+ }
4492
+ if (cache.has(_target)) {
4493
+ const resultIndex = cache.get(_target);
4494
+ return reverseSearch ? numberOfValues - resultIndex - 1 : resultIndex;
4495
+ }
4496
+ if (mode === "strict") {
4497
+ return -1;
4498
+ }
4499
+ }
4500
+ // else perform the linear search
4501
+ const resultIndex = _linearSearch(data, _target, mode, numberOfValues, getValue);
4502
+ return reverseSearch && resultIndex !== -1 ? numberOfValues - resultIndex - 1 : resultIndex;
4503
+ }
4504
+ function _linearSearch(data, _target, mode, numberOfValues, getNormalizeValue) {
4474
4505
  let indexMatchTarget = (i) => {
4475
- return normalizeValue(getValue(data, i)) === _target;
4506
+ return getNormalizeValue(data, i) === _target;
4476
4507
  };
4477
4508
  if (mode === "wildcard" &&
4478
4509
  typeof _target === "string" &&
4479
4510
  (_target.includes("*") || _target.includes("?"))) {
4480
4511
  const regExp = wildcardToRegExp(_target);
4481
4512
  indexMatchTarget = (i) => {
4482
- const value = normalizeValue(getValue(data, i));
4513
+ const value = getNormalizeValue(data, i);
4483
4514
  if (typeof value === "string") {
4484
4515
  return regExp.test(value);
4485
4516
  }
@@ -4490,7 +4521,7 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
4490
4521
  let closestMatchIndex = -1;
4491
4522
  if (mode === "nextSmaller") {
4492
4523
  indexMatchTarget = (i) => {
4493
- const value = normalizeValue(getValue(data, i));
4524
+ const value = getNormalizeValue(data, i);
4494
4525
  if ((!closestMatch && compareCellValues(_target, value) >= 0) ||
4495
4526
  (compareCellValues(_target, value) >= 0 && compareCellValues(value, closestMatch) > 0)) {
4496
4527
  closestMatch = value;
@@ -4501,7 +4532,7 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
4501
4532
  }
4502
4533
  if (mode === "nextGreater") {
4503
4534
  indexMatchTarget = (i) => {
4504
- const value = normalizeValue(getValue(data, i));
4535
+ const value = getNormalizeValue(data, i);
4505
4536
  if ((!closestMatch && compareCellValues(_target, value) <= 0) ||
4506
4537
  (compareCellValues(_target, value) <= 0 && compareCellValues(value, closestMatch) < 0)) {
4507
4538
  closestMatch = value;
@@ -4512,12 +4543,10 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
4512
4543
  }
4513
4544
  for (let i = 0; i < numberOfValues; i++) {
4514
4545
  if (indexMatchTarget(i)) {
4515
- return reverseSearch ? numberOfValues - i - 1 : i;
4546
+ return i;
4516
4547
  }
4517
4548
  }
4518
- return reverseSearch && closestMatchIndex !== -1
4519
- ? numberOfValues - closestMatchIndex - 1
4520
- : closestMatchIndex;
4549
+ return closestMatchIndex;
4521
4550
  }
4522
4551
  /**
4523
4552
  * Normalize a value.
@@ -6491,10 +6520,11 @@ class UuidGenerator {
6491
6520
  *
6492
6521
  */
6493
6522
  smallUuid() {
6494
- //@ts-ignore
6495
- if (window.crypto && window.crypto.getRandomValues) {
6496
- //@ts-ignore
6497
- return ([1e7] + -1e3).replace(/[018]/g, (c) => (c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16));
6523
+ if (window.crypto) {
6524
+ return "10000000-1000".replace(/[01]/g, (c) => {
6525
+ const n = Number(c);
6526
+ return (n ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (n / 4)))).toString(16);
6527
+ });
6498
6528
  }
6499
6529
  else {
6500
6530
  // mainly for jest and other browsers that do not have the crypto functionality
@@ -6509,10 +6539,11 @@ class UuidGenerator {
6509
6539
  * This method should be used when you need to avoid collisions at all costs, like the id of a revision.
6510
6540
  */
6511
6541
  uuidv4() {
6512
- //@ts-ignore
6513
- if (window.crypto && window.crypto.getRandomValues) {
6514
- //@ts-ignore
6515
- return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) => (c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16));
6542
+ if (window.crypto) {
6543
+ return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
6544
+ const n = Number(c);
6545
+ return (n ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (n / 4)))).toString(16);
6546
+ });
6516
6547
  }
6517
6548
  else {
6518
6549
  // mainly for jest and other browsers that do not have the crypto functionality
@@ -18686,7 +18717,7 @@ const HLOOKUP = {
18686
18717
  const _isSorted = toBoolean(isSorted.value);
18687
18718
  const colIndex = _isSorted
18688
18719
  ? dichotomicSearch(_range, searchKey, "nextSmaller", "asc", _range.length, getValueFromRange)
18689
- : linearSearch(_range, searchKey, "wildcard", _range.length, getValueFromRange);
18720
+ : linearSearch(_range, searchKey, "wildcard", _range.length, getValueFromRange, this.lookupCaches);
18690
18721
  const col = _range[colIndex];
18691
18722
  if (col === undefined) {
18692
18723
  return valueNotAvailable(searchKey);
@@ -18841,7 +18872,7 @@ const MATCH = {
18841
18872
  index = dichotomicSearch(_range, searchKey, "nextSmaller", "asc", rangeLen, getElement);
18842
18873
  break;
18843
18874
  case 0:
18844
- index = linearSearch(_range, searchKey, "wildcard", rangeLen, getElement);
18875
+ index = linearSearch(_range, searchKey, "wildcard", rangeLen, getElement, this.lookupCaches);
18845
18876
  break;
18846
18877
  case -1:
18847
18878
  index = dichotomicSearch(_range, searchKey, "nextGreater", "desc", rangeLen, getElement);
@@ -18909,7 +18940,7 @@ const VLOOKUP = {
18909
18940
  const _isSorted = toBoolean(isSorted.value);
18910
18941
  const rowIndex = _isSorted
18911
18942
  ? dichotomicSearch(_range, searchKey, "nextSmaller", "asc", _range[0].length, getValueFromRange)
18912
- : linearSearch(_range, searchKey, "wildcard", _range[0].length, getValueFromRange);
18943
+ : linearSearch(_range, searchKey, "wildcard", _range[0].length, getValueFromRange, this.lookupCaches);
18913
18944
  const value = _range[_index - 1][rowIndex];
18914
18945
  if (value === undefined) {
18915
18946
  return valueNotAvailable(searchKey);
@@ -18965,7 +18996,7 @@ const XLOOKUP = {
18965
18996
  const reverseSearch = _searchMode === -1;
18966
18997
  const index = _searchMode === 2 || _searchMode === -2
18967
18998
  ? dichotomicSearch(_lookupRange, searchKey, mode, _searchMode === 2 ? "asc" : "desc", rangeLen, getElement)
18968
- : linearSearch(_lookupRange, searchKey, mode, rangeLen, getElement, reverseSearch);
18999
+ : linearSearch(_lookupRange, searchKey, mode, rangeLen, getElement, this.lookupCaches, reverseSearch);
18969
19000
  if (index !== -1) {
18970
19001
  return lookupDirection === "col"
18971
19002
  ? _returnRange.map((col) => [col[index]])
@@ -28304,7 +28335,7 @@ function getBarChartData(definition, dataSets, labelRange, getters) {
28304
28335
  }
28305
28336
  function getPyramidChartData(definition, dataSets, labelRange, getters) {
28306
28337
  const barChartData = getBarChartData(definition, dataSets, labelRange, getters);
28307
- const barDataset = barChartData.dataSetsValues;
28338
+ const barDataset = barChartData.dataSetsValues.filter((ds) => !ds.hidden);
28308
28339
  const pyramidDatasetValues = [];
28309
28340
  if (barDataset[0]) {
28310
28341
  const pyramidData = barDataset[0].data.map((value) => (value > 0 ? value : 0));
@@ -28781,10 +28812,8 @@ function getChartDatasetFormat(getters, allDataSets, axis) {
28781
28812
  function getChartDatasetValues(getters, dataSets) {
28782
28813
  const datasetValues = [];
28783
28814
  for (const [dsIndex, ds] of Object.entries(dataSets)) {
28784
- if (getters.isColHidden(ds.dataRange.sheetId, ds.dataRange.zone.left)) {
28785
- continue;
28786
- }
28787
28815
  let label;
28816
+ let hidden = getters.isColHidden(ds.dataRange.sheetId, ds.dataRange.zone.left);
28788
28817
  if (ds.labelCell) {
28789
28818
  const labelRange = ds.labelCell;
28790
28819
  const cell = labelRange
@@ -28811,9 +28840,9 @@ function getChartDatasetValues(getters, dataSets) {
28811
28840
  data.fill(1);
28812
28841
  }
28813
28842
  else if (data.every((cell) => cell === undefined || cell === null || !isNumber(cell.toString(), DEFAULT_LOCALE))) {
28814
- continue;
28843
+ hidden = true;
28815
28844
  }
28816
- datasetValues.push({ data, label });
28845
+ datasetValues.push({ data, label, hidden });
28817
28846
  }
28818
28847
  return datasetValues;
28819
28848
  }
@@ -28824,12 +28853,13 @@ function getBarChartDatasets(definition, args) {
28824
28853
  const colors = getChartColorsGenerator(definition, dataSetsValues.length);
28825
28854
  const trendDatasets = [];
28826
28855
  for (const index in dataSetsValues) {
28827
- let { label, data } = dataSetsValues[index];
28856
+ let { label, data, hidden } = dataSetsValues[index];
28828
28857
  label = definition.dataSets?.[index].label || label;
28829
28858
  const backgroundColor = colors.next();
28830
28859
  const dataset = {
28831
28860
  label,
28832
28861
  data,
28862
+ hidden,
28833
28863
  borderColor: definition.background || BACKGROUND_CHART_COLOR,
28834
28864
  borderWidth: definition.stacked ? 1 : 0,
28835
28865
  backgroundColor,
@@ -28862,6 +28892,9 @@ function getWaterfallDatasetAndLabels(definition, args) {
28862
28892
  const labelsWithSubTotals = [];
28863
28893
  let lastValue = 0;
28864
28894
  for (const dataSetsValue of dataSetsValues) {
28895
+ if (dataSetsValue.hidden) {
28896
+ continue;
28897
+ }
28865
28898
  for (let i = 0; i < dataSetsValue.data.length; i++) {
28866
28899
  const data = dataSetsValue.data[i];
28867
28900
  labelsWithSubTotals.push(labels[i]);
@@ -28897,7 +28930,7 @@ function getLineChartDatasets(definition, args) {
28897
28930
  const trendDatasets = [];
28898
28931
  const colors = getChartColorsGenerator(definition, dataSetsValues.length);
28899
28932
  for (let index = 0; index < dataSetsValues.length; index++) {
28900
- let { label, data } = dataSetsValues[index];
28933
+ let { label, data, hidden } = dataSetsValues[index];
28901
28934
  label = definition.dataSets?.[index].label || label;
28902
28935
  const color = colors.next();
28903
28936
  if (axisType && ["linear", "time"].includes(axisType)) {
@@ -28907,6 +28940,7 @@ function getLineChartDatasets(definition, args) {
28907
28940
  const dataset = {
28908
28941
  label,
28909
28942
  data,
28943
+ hidden,
28910
28944
  tension: 0, // 0 -> render straight lines, which is much faster
28911
28945
  borderColor: color,
28912
28946
  backgroundColor: areaChart ? setColorAlpha(color, LINE_FILL_TRANSPARENCY) : color,
@@ -28939,7 +28973,9 @@ function getPieChartDatasets(definition, args) {
28939
28973
  const dataSets = [];
28940
28974
  const dataSetsLength = Math.max(0, ...dataSetsValues.map((ds) => ds?.data?.length ?? 0));
28941
28975
  const backgroundColor = getPieColors(new ColorGenerator(dataSetsLength), dataSetsValues);
28942
- for (const { label, data } of dataSetsValues) {
28976
+ for (const { label, data, hidden } of dataSetsValues) {
28977
+ if (hidden)
28978
+ continue;
28943
28979
  const dataset = {
28944
28980
  label,
28945
28981
  data,
@@ -28957,7 +28993,7 @@ function getComboChartDatasets(definition, args) {
28957
28993
  const colors = getChartColorsGenerator(definition, dataSetsValues.length);
28958
28994
  const trendDatasets = [];
28959
28995
  for (let index = 0; index < dataSetsValues.length; index++) {
28960
- let { label, data } = dataSetsValues[index];
28996
+ let { label, data, hidden } = dataSetsValues[index];
28961
28997
  label = definition.dataSets?.[index].label || label;
28962
28998
  const design = definition.dataSets?.[index];
28963
28999
  const color = colors.next();
@@ -28965,6 +29001,7 @@ function getComboChartDatasets(definition, args) {
28965
29001
  const dataset = {
28966
29002
  label: label,
28967
29003
  data,
29004
+ hidden,
28968
29005
  borderColor: color,
28969
29006
  backgroundColor: color,
28970
29007
  yAxisID: definition.dataSets?.[index].yAxisId || "y",
@@ -28989,7 +29026,7 @@ function getRadarChartDatasets(definition, args) {
28989
29026
  const fill = definition.fillArea ?? false;
28990
29027
  const colors = getChartColorsGenerator(definition, dataSetsValues.length);
28991
29028
  for (let i = 0; i < dataSetsValues.length; i++) {
28992
- let { label, data } = dataSetsValues[i];
29029
+ let { label, data, hidden } = dataSetsValues[i];
28993
29030
  if (definition.dataSets?.[i]?.label) {
28994
29031
  label = definition.dataSets[i].label;
28995
29032
  }
@@ -28997,6 +29034,7 @@ function getRadarChartDatasets(definition, args) {
28997
29034
  const dataset = {
28998
29035
  label,
28999
29036
  data,
29037
+ hidden,
29000
29038
  borderColor,
29001
29039
  backgroundColor: borderColor,
29002
29040
  };
@@ -29142,6 +29180,11 @@ function getPieChartLegend(definition, args) {
29142
29180
  hidden: false,
29143
29181
  lineWidth: 2,
29144
29182
  })),
29183
+ filter: (legendItem, data) => {
29184
+ return "datasetIndex" in legendItem
29185
+ ? !data.datasets[legendItem.datasetIndex].hidden
29186
+ : true;
29187
+ },
29145
29188
  },
29146
29189
  };
29147
29190
  }
@@ -29203,6 +29246,11 @@ function getWaterfallChartLegend(definition, args) {
29203
29246
  }
29204
29247
  return legendValues;
29205
29248
  },
29249
+ filter: (legendItem, data) => {
29250
+ return "datasetIndex" in legendItem
29251
+ ? !data.datasets[legendItem.datasetIndex].hidden
29252
+ : true;
29253
+ },
29206
29254
  },
29207
29255
  onClick: () => { }, // Disables click interaction with the waterfall chart legend items
29208
29256
  };
@@ -29286,6 +29334,11 @@ function getCustomLegendLabels(fontColor, legendLabelConfig) {
29286
29334
  ...legendLabelConfig,
29287
29335
  };
29288
29336
  }),
29337
+ filter: (legendItem, data) => {
29338
+ return "datasetIndex" in legendItem
29339
+ ? !data.datasets[legendItem.datasetIndex].hidden
29340
+ : true;
29341
+ },
29289
29342
  },
29290
29343
  };
29291
29344
  }
@@ -29619,7 +29672,7 @@ const templates = /* xml */ `
29619
29672
  <div
29620
29673
  class="o-chart-custom-tooltip border rounded px-2 py-1 pe-none mw-100 position-absolute text-nowrap shadow opacity-100">
29621
29674
  <table class="overflow-hidden m-0">
29622
- <thead>
29675
+ <thead t-if="title">
29623
29676
  <tr>
29624
29677
  <th class="o-tooltip-title align-baseline border-0 text-truncate" t-esc="title" t-attf-style="max-width: {{ labelsMaxWidth }}"/>
29625
29678
  </tr>
@@ -29680,8 +29733,8 @@ function getBarChartTooltip(definition, args) {
29680
29733
  ? undefined
29681
29734
  : "";
29682
29735
  },
29736
+ beforeLabel: (tooltipItem) => tooltipItem.dataset?.label || tooltipItem.label,
29683
29737
  label: function (tooltipItem) {
29684
- const xLabel = tooltipItem.dataset?.label || tooltipItem.label;
29685
29738
  const horizontalChart = definition.horizontal;
29686
29739
  let yLabel = horizontalChart ? tooltipItem.parsed.x : tooltipItem.parsed.y;
29687
29740
  if (yLabel === undefined || yLabel === null) {
@@ -29689,7 +29742,7 @@ function getBarChartTooltip(definition, args) {
29689
29742
  }
29690
29743
  const axisId = horizontalChart ? tooltipItem.dataset.xAxisID : tooltipItem.dataset.yAxisID;
29691
29744
  const yLabelStr = formatChartDatasetValue(args.axisFormats, args.locale)(yLabel, axisId);
29692
- return xLabel ? `${xLabel}: ${yLabelStr}` : yLabelStr;
29745
+ return yLabelStr;
29693
29746
  },
29694
29747
  },
29695
29748
  };
@@ -29714,21 +29767,18 @@ function getLineChartTooltip(definition, args) {
29714
29767
  const formattedX = formatValue(label, { locale, format: labelFormat });
29715
29768
  const axisId = tooltipItem.dataset.yAxisID || "y";
29716
29769
  const formattedY = formatValue(dataSetPoint, { locale, format: axisFormats?.[axisId] });
29717
- const dataSetTitle = tooltipItem.dataset.label;
29718
- return formattedX
29719
- ? `${dataSetTitle}: (${formattedX}, ${formattedY})`
29720
- : `${dataSetTitle}: ${formattedY}`;
29770
+ return formattedX ? `(${formattedX}, ${formattedY})` : `${formattedY}`;
29721
29771
  };
29722
29772
  }
29723
29773
  else {
29724
29774
  tooltip.callbacks.label = function (tooltipItem) {
29725
- const xLabel = tooltipItem.dataset?.label || tooltipItem.label;
29726
29775
  const yLabel = tooltipItem.parsed.y;
29727
29776
  const axisId = tooltipItem.dataset.yAxisID;
29728
29777
  const yLabelStr = formatChartDatasetValue(axisFormats, locale)(yLabel, axisId);
29729
- return xLabel ? `${xLabel}: ${yLabelStr}` : yLabelStr;
29778
+ return yLabelStr;
29730
29779
  };
29731
29780
  }
29781
+ tooltip.callbacks.beforeLabel = (tooltipItem) => tooltipItem.dataset?.label || tooltipItem.label;
29732
29782
  tooltip.callbacks.title = function (tooltipItems) {
29733
29783
  const displayTooltipTitle = axisType !== "linear" &&
29734
29784
  tooltipItems.some((item) => item.dataset.xAxisID !== TREND_LINE_XAXIS_ID);
@@ -29746,17 +29796,15 @@ function getPieChartTooltip(definition, args) {
29746
29796
  title: function (tooltipItems) {
29747
29797
  return tooltipItems[0].dataset.label;
29748
29798
  },
29799
+ beforeLabel: (tooltipItem) => tooltipItem.label || tooltipItem.dataset.label,
29749
29800
  label: function (tooltipItem) {
29750
29801
  const data = tooltipItem.dataset.data;
29751
29802
  const dataIndex = tooltipItem.dataIndex;
29752
29803
  const percentage = calculatePercentage(data, dataIndex);
29753
- const xLabel = tooltipItem.label || tooltipItem.dataset.label;
29754
29804
  const yLabel = tooltipItem.parsed.y ?? tooltipItem.parsed;
29755
29805
  const toolTipFormat = !format && yLabel >= 1000 ? "#,##" : format;
29756
29806
  const yLabelStr = formatValue(yLabel, { format: toolTipFormat, locale });
29757
- return xLabel
29758
- ? `${xLabel}: ${yLabelStr} (${percentage}%)`
29759
- : `${yLabelStr} (${percentage}%)`;
29807
+ return `${yLabelStr} (${percentage}%)`;
29760
29808
  },
29761
29809
  },
29762
29810
  };
@@ -29769,16 +29817,17 @@ function getWaterfallChartTooltip(definition, args) {
29769
29817
  enabled: false,
29770
29818
  external: customTooltipHandler,
29771
29819
  callbacks: {
29772
- label: function (tooltipItem) {
29773
- const [lastValue, currentValue] = tooltipItem.raw;
29774
- const yLabel = currentValue - lastValue;
29820
+ beforeLabel: function (tooltipItem) {
29775
29821
  const dataSeriesIndex = labels.length
29776
29822
  ? Math.floor(tooltipItem.dataIndex / labels.length)
29777
29823
  : 0;
29778
- const dataSeriesLabel = dataSeriesLabels[dataSeriesIndex];
29824
+ return dataSeriesLabels[dataSeriesIndex];
29825
+ },
29826
+ label: function (tooltipItem) {
29827
+ const [lastValue, currentValue] = tooltipItem.raw;
29828
+ const yLabel = currentValue - lastValue;
29779
29829
  const toolTipFormat = !format && Math.abs(yLabel) > 1000 ? "#,##" : format;
29780
- const yLabelStr = formatValue(yLabel, { format: toolTipFormat, locale });
29781
- return dataSeriesLabel ? `${dataSeriesLabel}: ${yLabelStr}` : yLabelStr;
29830
+ return formatValue(yLabel, { format: toolTipFormat, locale });
29782
29831
  },
29783
29832
  },
29784
29833
  };
@@ -29802,11 +29851,10 @@ function getRadarChartTooltip(definition, args) {
29802
29851
  enabled: false,
29803
29852
  external: customTooltipHandler,
29804
29853
  callbacks: {
29854
+ beforeLabel: (tooltipItem) => tooltipItem.dataset?.label || tooltipItem.label,
29805
29855
  label: function (tooltipItem) {
29806
- const xLabel = tooltipItem.dataset?.label || tooltipItem.label;
29807
29856
  const yLabel = tooltipItem.parsed.r;
29808
- const formattedY = formatValue(yLabel, { format: axisFormats?.r, locale });
29809
- return xLabel ? `${xLabel}: ${formattedY}` : formattedY;
29857
+ return formatValue(yLabel, { format: axisFormats?.r, locale });
29810
29858
  },
29811
29859
  },
29812
29860
  };
@@ -29821,13 +29869,12 @@ function getGeoChartTooltip(definition, args) {
29821
29869
  return tooltipItem.raw.value !== undefined;
29822
29870
  },
29823
29871
  callbacks: {
29872
+ beforeLabel: (tooltipItem) => tooltipItem.raw.feature.properties.name,
29824
29873
  label: function (tooltipItem) {
29825
29874
  const rawItem = tooltipItem.raw;
29826
- const xLabel = rawItem.feature.properties.name;
29827
29875
  const yLabel = rawItem.value;
29828
29876
  const toolTipFormat = !format && Math.abs(yLabel) >= 1000 ? "#,##" : format;
29829
- const yLabelStr = formatValue(yLabel, { format: toolTipFormat, locale });
29830
- return xLabel ? `${xLabel}: ${yLabelStr}` : yLabelStr;
29877
+ return formatValue(yLabel, { format: toolTipFormat, locale });
29831
29878
  },
29832
29879
  },
29833
29880
  };
@@ -29847,7 +29894,8 @@ function customTooltipHandler({ chart, tooltip }) {
29847
29894
  return;
29848
29895
  }
29849
29896
  const tooltipItems = tooltip.body.map((body, index) => {
29850
- let [label, value] = body.lines[0].split(":").map((str) => str.trim());
29897
+ let label = body.before[0];
29898
+ let value = body.lines[0];
29851
29899
  if (!value) {
29852
29900
  value = label;
29853
29901
  label = "";
@@ -51639,8 +51687,8 @@ class Border extends owl.Component {
51639
51687
  css /* scss */ `
51640
51688
  .o-corner {
51641
51689
  position: absolute;
51642
- height: 6px;
51643
- width: 6px;
51690
+ height: 8px;
51691
+ width: 8px;
51644
51692
  border: 1px solid white;
51645
51693
  }
51646
51694
  .o-corner-nw,
@@ -60001,6 +60049,10 @@ class Evaluator {
60001
60049
  this.compilationParams = buildCompilationParameters(this.context, this.getters, this.computeAndSave.bind(this));
60002
60050
  this.compilationParams.evalContext.updateDependencies = this.updateDependencies.bind(this);
60003
60051
  this.compilationParams.evalContext.addDependencies = this.addDependencies.bind(this);
60052
+ this.compilationParams.evalContext.lookupCaches = {
60053
+ forwardSearch: new Map(),
60054
+ reverseSearch: new Map(),
60055
+ };
60004
60056
  }
60005
60057
  createEmptyPositionSet() {
60006
60058
  const sheetSizes = {};
@@ -75611,6 +75663,6 @@ exports.tokenColors = tokenColors;
75611
75663
  exports.tokenize = tokenize;
75612
75664
 
75613
75665
 
75614
- __info__.version = "18.2.0";
75615
- __info__.date = "2025-02-18T08:27:07.101Z";
75616
- __info__.hash = "d708714";
75666
+ __info__.version = "18.2.1";
75667
+ __info__.date = "2025-02-25T06:03:13.262Z";
75668
+ __info__.hash = "3b4b5c9";