@odoo/o-spreadsheet 18.0.1 → 18.0.2

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.1
6
- * @date 2024-10-14T07:54:24.768Z
7
- * @hash 1771f68
5
+ * @version 18.0.2
6
+ * @date 2024-10-24T08:54:21.934Z
7
+ * @hash 788df92
8
8
  */
9
9
 
10
10
  'use strict';
@@ -376,7 +376,7 @@ const PIVOT_TABLE_CONFIG = {
376
376
  bandedRows: true,
377
377
  bandedColumns: false,
378
378
  styleId: "TableStyleMedium5",
379
- automaticAutofill: true,
379
+ automaticAutofill: false,
380
380
  };
381
381
  const DEFAULT_CURRENCY = {
382
382
  symbol: "$",
@@ -9411,70 +9411,114 @@ const chartShowValuesPlugin = {
9411
9411
  ctx.save();
9412
9412
  ctx.textAlign = "center";
9413
9413
  ctx.textBaseline = "middle";
9414
- ctx.fillStyle = chartFontColor(options.background);
9415
- ctx.strokeStyle = chartFontColor(ctx.fillStyle);
9416
- chart._metasets.forEach(function (dataset) {
9417
- if (dataset.xAxisID === TREND_LINE_XAXIS_ID) {
9418
- return; // ignore trend lines
9419
- }
9420
- switch (dataset.type) {
9421
- case "doughnut":
9422
- case "pie": {
9423
- for (let i = 0; i < dataset._parsed.length; i++) {
9424
- const bar = dataset.data[i];
9425
- const { startAngle, endAngle, innerRadius, outerRadius } = bar;
9426
- const midAngle = (startAngle + endAngle) / 2;
9427
- const midRadius = (innerRadius + outerRadius) / 2;
9428
- const x = bar.x + midRadius * Math.cos(midAngle);
9429
- const y = bar.y + midRadius * Math.sin(midAngle) + 7;
9430
- ctx.fillStyle = chartFontColor(bar.options.backgroundColor);
9431
- ctx.strokeStyle = chartFontColor(ctx.fillStyle);
9432
- const value = options.callback(dataset._parsed[i]);
9433
- ctx.strokeText(value, x, y);
9434
- ctx.fillText(value, x, y);
9435
- }
9436
- break;
9437
- }
9438
- case "bar":
9439
- case "line": {
9440
- const yOffset = dataset.type === "bar" && !options.horizontal ? 0 : 3;
9441
- for (let i = 0; i < dataset._parsed.length; i++) {
9442
- const point = dataset.data[i];
9443
- const value = options.horizontal ? dataset._parsed[i].x : dataset._parsed[i].y;
9444
- const displayedValue = options.callback(value - 0);
9445
- let xPosition = 0, yPosition = 0;
9446
- if (options.horizontal) {
9447
- yPosition = point.y;
9448
- if (value < 0) {
9449
- ctx.textAlign = "right";
9450
- xPosition = point.x - yOffset;
9451
- }
9452
- else {
9453
- ctx.textAlign = "left";
9454
- xPosition = point.x + yOffset;
9455
- }
9456
- }
9457
- else {
9458
- xPosition = point.x;
9459
- if (value < 0) {
9460
- ctx.textBaseline = "top";
9461
- yPosition = point.y + yOffset;
9462
- }
9463
- else {
9464
- ctx.textBaseline = "bottom";
9465
- yPosition = point.y - yOffset;
9466
- }
9467
- }
9468
- ctx.strokeText(displayedValue, xPosition, yPosition);
9469
- ctx.fillText(displayedValue, xPosition, yPosition);
9470
- }
9471
- break;
9472
- }
9473
- }
9474
- });
9414
+ ctx.miterLimit = 1; // Avoid sharp artifacts on strokeText
9415
+ switch (chart.config.type) {
9416
+ case "pie":
9417
+ case "doughnut":
9418
+ drawPieChartValues(chart, options, ctx);
9419
+ break;
9420
+ case "bar":
9421
+ case "line":
9422
+ options.horizontal
9423
+ ? drawHorizontalBarChartValues(chart, options, ctx)
9424
+ : drawLineOrBarChartValues(chart, options, ctx);
9425
+ break;
9426
+ }
9475
9427
  ctx.restore();
9476
9428
  },
9477
9429
  };
9430
+ function drawTextWithBackground(text, x, y, ctx) {
9431
+ ctx.lineWidth = 3; // Stroke the text with a big lineWidth width to have some kind of background
9432
+ ctx.strokeText(text, x, y);
9433
+ ctx.lineWidth = 1;
9434
+ ctx.fillText(text, x, y);
9435
+ }
9436
+ function drawLineOrBarChartValues(chart, options, ctx) {
9437
+ const yMax = chart.chartArea.bottom;
9438
+ const yMin = chart.chartArea.top;
9439
+ const textsPositions = {};
9440
+ for (const dataset of chart._metasets) {
9441
+ if (dataset.xAxisID === TREND_LINE_XAXIS_ID) {
9442
+ return; // ignore trend lines
9443
+ }
9444
+ for (let i = 0; i < dataset._parsed.length; i++) {
9445
+ const value = dataset._parsed[i].y;
9446
+ const point = dataset.data[i];
9447
+ const xPosition = point.x;
9448
+ let yPosition = 0;
9449
+ if (chart.config.type === "line") {
9450
+ yPosition = point.y - 10;
9451
+ }
9452
+ else {
9453
+ yPosition = value < 0 ? point.y - point.height / 2 : point.y + point.height / 2;
9454
+ }
9455
+ yPosition = Math.min(yPosition, yMax);
9456
+ yPosition = Math.max(yPosition, yMin);
9457
+ // Avoid overlapping texts with same X
9458
+ if (!textsPositions[xPosition]) {
9459
+ textsPositions[xPosition] = [];
9460
+ }
9461
+ for (const otherPosition of textsPositions[xPosition] || []) {
9462
+ if (Math.abs(otherPosition - yPosition) < 13) {
9463
+ yPosition = otherPosition - 13;
9464
+ }
9465
+ }
9466
+ textsPositions[xPosition].push(yPosition);
9467
+ ctx.fillStyle = point.options.backgroundColor;
9468
+ ctx.strokeStyle = options.background || "#ffffff";
9469
+ drawTextWithBackground(options.callback(value - 0), xPosition, yPosition, ctx);
9470
+ }
9471
+ }
9472
+ }
9473
+ function drawHorizontalBarChartValues(chart, options, ctx) {
9474
+ const xMax = chart.chartArea.right;
9475
+ const xMin = chart.chartArea.left;
9476
+ const textsPositions = {};
9477
+ for (const dataset of chart._metasets) {
9478
+ if (dataset.xAxisID === TREND_LINE_XAXIS_ID) {
9479
+ return; // ignore trend lines
9480
+ }
9481
+ for (let i = 0; i < dataset._parsed.length; i++) {
9482
+ const value = dataset._parsed[i].x;
9483
+ const displayValue = options.callback(value - 0);
9484
+ const point = dataset.data[i];
9485
+ const yPosition = point.y;
9486
+ let xPosition = value < 0 ? point.x + point.width / 2 : point.x - point.width / 2;
9487
+ xPosition = Math.min(xPosition, xMax);
9488
+ xPosition = Math.max(xPosition, xMin);
9489
+ // Avoid overlapping texts with same Y
9490
+ if (!textsPositions[yPosition]) {
9491
+ textsPositions[yPosition] = [];
9492
+ }
9493
+ const textWidth = computeTextWidth(ctx, displayValue, { fontSize: 12 }, "px");
9494
+ for (const otherPosition of textsPositions[yPosition]) {
9495
+ if (Math.abs(otherPosition - xPosition) < textWidth) {
9496
+ xPosition = otherPosition + textWidth + 3;
9497
+ }
9498
+ }
9499
+ textsPositions[yPosition].push(xPosition);
9500
+ ctx.fillStyle = point.options.backgroundColor;
9501
+ ctx.strokeStyle = options.background || "#ffffff";
9502
+ drawTextWithBackground(displayValue, xPosition, yPosition, ctx);
9503
+ }
9504
+ }
9505
+ }
9506
+ function drawPieChartValues(chart, options, ctx) {
9507
+ for (const dataset of chart._metasets) {
9508
+ for (let i = 0; i < dataset._parsed.length; i++) {
9509
+ const bar = dataset.data[i];
9510
+ const { startAngle, endAngle, innerRadius, outerRadius } = bar;
9511
+ const midAngle = (startAngle + endAngle) / 2;
9512
+ const midRadius = (innerRadius + outerRadius) / 2;
9513
+ const x = bar.x + midRadius * Math.cos(midAngle);
9514
+ const y = bar.y + midRadius * Math.sin(midAngle) + 7;
9515
+ ctx.fillStyle = chartFontColor(options.background);
9516
+ ctx.strokeStyle = options.background || "#ffffff";
9517
+ const value = options.callback(dataset._parsed[i]);
9518
+ drawTextWithBackground(value, x, y, ctx);
9519
+ }
9520
+ }
9521
+ }
9478
9522
 
9479
9523
  /** This is a chartJS plugin that will draw connector lines between the bars of a Waterfall chart */
9480
9524
  const waterfallLinesPlugin = {
@@ -21737,9 +21781,13 @@ autoCompleteProviders.add("pivot_group_fields", {
21737
21781
  const colFields = columns.map((groupBy) => groupBy.nameWithGranularity);
21738
21782
  const rowFields = rows.map((groupBy) => groupBy.nameWithGranularity);
21739
21783
  const proposals = [];
21740
- const previousGroupBy = ["ARG_SEPARATOR", "SPACE"].includes(tokenAtCursor.type)
21784
+ let previousGroupBy = ["ARG_SEPARATOR", "SPACE"].includes(tokenAtCursor.type)
21741
21785
  ? argGroupBys.at(-1)
21742
21786
  : argGroupBys.at(-2);
21787
+ const isPositionalSupported = supportedPivotPositionalFormulaRegistry.get(pivot.type);
21788
+ if (isPositionalSupported && previousGroupBy?.startsWith("#")) {
21789
+ previousGroupBy = previousGroupBy.slice(1);
21790
+ }
21743
21791
  if (previousGroupBy === undefined) {
21744
21792
  proposals.push(colFields[0]);
21745
21793
  proposals.push(rowFields[0]);
@@ -21761,7 +21809,7 @@ autoCompleteProviders.add("pivot_group_fields", {
21761
21809
  return field ? makeFieldProposal(field, granularity) : undefined;
21762
21810
  })
21763
21811
  .concat(groupBys.map((groupBy) => {
21764
- if (!supportedPivotPositionalFormulaRegistry.get(pivot.type)) {
21812
+ if (!isPositionalSupported) {
21765
21813
  return undefined;
21766
21814
  }
21767
21815
  const fieldName = groupBy.split(":")[0];
@@ -27457,7 +27505,7 @@ function load(data, verboseImport) {
27457
27505
  if (!data) {
27458
27506
  return createEmptyWorkbookData();
27459
27507
  }
27460
- console.group("Loading data");
27508
+ console.debug("### Loading data ###");
27461
27509
  const start = performance.now();
27462
27510
  if (data["[Content_Types].xml"]) {
27463
27511
  const reader = new XlsxReader(data);
@@ -27471,13 +27519,13 @@ function load(data, verboseImport) {
27471
27519
  // apply migrations, if needed
27472
27520
  if ("version" in data) {
27473
27521
  if (data.version < CURRENT_VERSION) {
27474
- console.info("Migrating data from version", data.version);
27522
+ console.debug("Migrating data from version", data.version);
27475
27523
  data = migrate(data);
27476
27524
  }
27477
27525
  }
27478
27526
  data = repairData(data);
27479
- console.info("Data loaded in", performance.now() - start, "ms");
27480
- console.groupEnd();
27527
+ console.debug("Data loaded in", performance.now() - start, "ms");
27528
+ console.debug("###");
27481
27529
  return data;
27482
27530
  }
27483
27531
  // -----------------------------------------------------------------------------
@@ -27507,7 +27555,7 @@ function migrate(data) {
27507
27555
  for (let i = index; i < steps.length; i++) {
27508
27556
  data = steps[i].migrate(data);
27509
27557
  }
27510
- console.info("Data migrated in", performance.now() - start, "ms");
27558
+ console.debug("Data migrated in", performance.now() - start, "ms");
27511
27559
  return data;
27512
27560
  }
27513
27561
  /**
@@ -28086,7 +28134,7 @@ function getDefaultChartJsRuntime(chart, labels, fontColor, { format, locale, tr
28086
28134
  const xLabel = tooltipItem.dataset?.label || tooltipItem.label;
28087
28135
  // tooltipItem.parsed can be an object or a number for pie charts
28088
28136
  let yLabel = horizontalChart ? tooltipItem.parsed.x : tooltipItem.parsed.y;
28089
- if (!yLabel) {
28137
+ if (yLabel === undefined || yLabel === null) {
28090
28138
  yLabel = tooltipItem.parsed;
28091
28139
  }
28092
28140
  const toolTipFormat = !format && Math.abs(yLabel) >= 1000 ? "#,##" : format;
@@ -28527,13 +28575,10 @@ function createBarChartRuntime(chart, getters) {
28527
28575
  * datasets to ensure the way we distinguish the originals and trendLine datasets after
28528
28576
  */
28529
28577
  trendDatasets.forEach((x) => config.data.datasets.push(x));
28530
- const originalTooltipTitle = config.options.plugins.tooltip.callbacks.title;
28531
28578
  config.options.plugins.tooltip.callbacks.title = function (tooltipItems) {
28532
- if (tooltipItems.some((item) => item.dataset.xAxisID !== TREND_LINE_XAXIS_ID)) {
28533
- // @ts-expect-error
28534
- return originalTooltipTitle?.(tooltipItems);
28535
- }
28536
- return "";
28579
+ return tooltipItems.some((item) => item.dataset.xAxisID !== TREND_LINE_XAXIS_ID)
28580
+ ? undefined
28581
+ : "";
28537
28582
  };
28538
28583
  }
28539
28584
  return { chartJsConfig: config, background: chart.background || BACKGROUND_CHART_COLOR };
@@ -28903,7 +28948,6 @@ function createLineOrScatterChartRuntime(chart, getters) {
28903
28948
  else if (axisType === "linear") {
28904
28949
  config.options.scales.x.type = "linear";
28905
28950
  config.options.scales.x.ticks.callback = (value) => formatValue(value, { format: labelFormat, locale });
28906
- config.options.plugins.tooltip.callbacks.title = () => "";
28907
28951
  config.options.plugins.tooltip.callbacks.label = (tooltipItem) => {
28908
28952
  const dataSetPoint = dataSetsValues[tooltipItem.datasetIndex].data[tooltipItem.dataIndex];
28909
28953
  let label = tooltipItem.label || labelValues.values[tooltipItem.dataIndex];
@@ -28991,15 +29035,12 @@ function createLineOrScatterChartRuntime(chart, getters) {
28991
29035
  * distinguish the originals and trendLine datasets after
28992
29036
  */
28993
29037
  trendDatasets.forEach((x) => config.data.datasets.push(x));
28994
- const originalTooltipTitle = config.options.plugins.tooltip.callbacks.title;
28995
- config.options.plugins.tooltip.callbacks.title = function (tooltipItems) {
28996
- if (tooltipItems.some((item) => item.dataset.xAxisID !== TREND_LINE_XAXIS_ID)) {
28997
- // @ts-expect-error
28998
- return originalTooltipTitle?.(tooltipItems);
28999
- }
29000
- return "";
29001
- };
29002
29038
  }
29039
+ config.options.plugins.tooltip.callbacks.title = function (tooltipItems) {
29040
+ const displayTooltipTitle = axisType !== "linear" &&
29041
+ tooltipItems.some((item) => item.dataset.xAxisID !== TREND_LINE_XAXIS_ID);
29042
+ return displayTooltipTitle ? undefined : "";
29043
+ };
29003
29044
  return {
29004
29045
  chartJsConfig: config,
29005
29046
  background: chart.background || BACKGROUND_CHART_COLOR,
@@ -29263,13 +29304,10 @@ function createComboChartRuntime(chart, getters) {
29263
29304
  * distinguish the originals and trendLine datasets after
29264
29305
  */
29265
29306
  trendDatasets.forEach((x) => config.data.datasets.push(x));
29266
- const originalTooltipTitle = config.options.plugins.tooltip.callbacks.title;
29267
29307
  config.options.plugins.tooltip.callbacks.title = function (tooltipItems) {
29268
- if (tooltipItems.some((item) => item.dataset.xAxisID !== TREND_LINE_XAXIS_ID)) {
29269
- // @ts-expect-error
29270
- return originalTooltipTitle?.(tooltipItems);
29271
- }
29272
- return "";
29308
+ return tooltipItems.some((item) => item.dataset.xAxisID !== TREND_LINE_XAXIS_ID)
29309
+ ? undefined
29310
+ : "";
29273
29311
  };
29274
29312
  }
29275
29313
  return { chartJsConfig: config, background: chart.background || BACKGROUND_CHART_COLOR };
@@ -36259,7 +36297,6 @@ class BarConfigPanel extends GenericChartConfigPanel {
36259
36297
  css /* scss */ `
36260
36298
  .o_side_panel_collapsible_title {
36261
36299
  font-size: 16px;
36262
- font-weight: bold;
36263
36300
  cursor: pointer;
36264
36301
  padding: 6px 0px 6px 6px !important;
36265
36302
 
@@ -37239,6 +37276,9 @@ class ChartWithAxisDesignPanel extends owl.Component {
37239
37276
  getDataSeries() {
37240
37277
  return this.props.definition.dataSets.map((d, i) => d.label ?? `${ChartTerms.Series} ${i + 1}`);
37241
37278
  }
37279
+ getPolynomialDegrees() {
37280
+ return range(1, this.getMaxPolynomialDegree() + 1);
37281
+ }
37242
37282
  updateSerieEditor(ev) {
37243
37283
  const chartId = this.props.figureId;
37244
37284
  const selectedIndex = ev.target.selectedIndex;
@@ -37355,12 +37395,7 @@ class ChartWithAxisDesignPanel extends owl.Component {
37355
37395
  }
37356
37396
  onChangePolynomialDegree(ev) {
37357
37397
  const element = ev.target;
37358
- const order = parseInt(element.value || "1");
37359
- if (order < 2) {
37360
- element.value = `${this.getTrendLineConfiguration()?.order ?? 2}`;
37361
- return;
37362
- }
37363
- this.updateTrendLineValue({ order });
37398
+ this.updateTrendLineValue({ order: parseInt(element.value) });
37364
37399
  }
37365
37400
  getTrendLineColor() {
37366
37401
  return this.getTrendLineConfiguration()?.color ?? setColorAlpha(this.getDataSerieColor(), 0.5);
@@ -37382,6 +37417,10 @@ class ChartWithAxisDesignPanel extends owl.Component {
37382
37417
  };
37383
37418
  this.props.updateChart(this.props.figureId, { dataSets });
37384
37419
  }
37420
+ getMaxPolynomialDegree() {
37421
+ const runtime = this.env.model.getters.getChartRuntime(this.props.figureId);
37422
+ return Math.min(10, runtime.chartJsConfig.data.datasets[this.state.index].data.length - 1);
37423
+ }
37385
37424
  }
37386
37425
 
37387
37426
  class ComboChartDesignPanel extends ChartWithAxisDesignPanel {
@@ -39210,7 +39249,6 @@ css /* scss */ `
39210
39249
  width: 142px;
39211
39250
  .o-cf-preview-description-rule {
39212
39251
  margin-bottom: 4px;
39213
- font-weight: 600;
39214
39252
  max-height: 2.8em;
39215
39253
  line-height: 1.4em;
39216
39254
  }
@@ -42212,7 +42250,6 @@ function createMeasureAutoComplete(pivot, forComputedMeasure) {
42212
42250
  sequence: 0,
42213
42251
  autoSelectFirstProposal: true,
42214
42252
  getProposals(tokenAtCursor) {
42215
- // return []
42216
42253
  const measureProposals = pivot.measures
42217
42254
  .filter((m) => m !== forComputedMeasure)
42218
42255
  .map((measure) => {
@@ -47153,6 +47190,7 @@ class PaintFormatStore extends SpreadsheetStore {
47153
47190
  new CellClipboardHandler(this.getters, this.model.dispatch),
47154
47191
  new BorderClipboardHandler(this.getters, this.model.dispatch),
47155
47192
  new TableClipboardHandler(this.getters, this.model.dispatch),
47193
+ new ConditionalFormatClipboardHandler(this.getters, this.model.dispatch),
47156
47194
  ];
47157
47195
  status = "inactive";
47158
47196
  copiedData;
@@ -47163,6 +47201,13 @@ class PaintFormatStore extends SpreadsheetStore {
47163
47201
  this.highlightStore.unRegister(this);
47164
47202
  });
47165
47203
  }
47204
+ handle(cmd) {
47205
+ switch (cmd.type) {
47206
+ case "PAINT_FORMAT":
47207
+ this.paintFormat(cmd.sheetId, cmd.target);
47208
+ break;
47209
+ }
47210
+ }
47166
47211
  activate(args) {
47167
47212
  this.copiedData = this.copyFormats();
47168
47213
  this.status = args.persistent ? "persistent" : "oneOff";
@@ -47172,18 +47217,7 @@ class PaintFormatStore extends SpreadsheetStore {
47172
47217
  this.copiedData = undefined;
47173
47218
  }
47174
47219
  pasteFormat(target) {
47175
- if (this.copiedData) {
47176
- const sheetId = this.getters.getActiveSheetId();
47177
- for (const handler of this.clipboardHandlers) {
47178
- handler.paste({ zones: target, sheetId }, this.copiedData, {
47179
- isCutOperation: false,
47180
- pasteOption: "onlyFormat",
47181
- });
47182
- }
47183
- }
47184
- if (this.status === "oneOff") {
47185
- this.cancel();
47186
- }
47220
+ this.model.dispatch("PAINT_FORMAT", { target, sheetId: this.getters.getActiveSheetId() });
47187
47221
  }
47188
47222
  get isActive() {
47189
47223
  return this.status !== "inactive";
@@ -47197,6 +47231,19 @@ class PaintFormatStore extends SpreadsheetStore {
47197
47231
  }
47198
47232
  return copiedData;
47199
47233
  }
47234
+ paintFormat(sheetId, target) {
47235
+ if (this.copiedData) {
47236
+ for (const handler of this.clipboardHandlers) {
47237
+ handler.paste({ zones: target, sheetId }, this.copiedData, {
47238
+ isCutOperation: false,
47239
+ pasteOption: "onlyFormat",
47240
+ });
47241
+ }
47242
+ }
47243
+ if (this.status === "oneOff") {
47244
+ this.cancel();
47245
+ }
47246
+ }
47200
47247
  get highlights() {
47201
47248
  const data = this.copiedData;
47202
47249
  if (!data) {
@@ -55440,7 +55487,7 @@ class PivotCorePlugin extends CorePlugin {
55440
55487
  case "DUPLICATE_PIVOT": {
55441
55488
  const { pivotId, newPivotId } = cmd;
55442
55489
  const pivot = deepCopy(this.getPivotCore(pivotId).definition);
55443
- pivot.name = _t("%s (copy)", pivot.name);
55490
+ pivot.name = cmd.duplicatedPivotName ?? pivot.name + " (copy)";
55444
55491
  this.addPivot(newPivotId, pivot);
55445
55492
  break;
55446
55493
  }
@@ -55480,7 +55527,7 @@ class PivotCorePlugin extends CorePlugin {
55480
55527
  return `(#${formulaId}) ${this.getPivotName(pivotId)}`;
55481
55528
  }
55482
55529
  getPivotName(pivotId) {
55483
- return _t(this.getPivotCore(pivotId).definition.name);
55530
+ return this.getPivotCore(pivotId).definition.name;
55484
55531
  }
55485
55532
  /**
55486
55533
  * Returns the pivot core definition of the pivot with the given id.
@@ -57122,7 +57169,7 @@ class Evaluator {
57122
57169
  cellsToCompute.addMany(arrayFormulasPositions);
57123
57170
  cellsToCompute.addMany(this.getCellsDependingOn(arrayFormulasPositions));
57124
57171
  this.evaluate(cellsToCompute);
57125
- console.info("evaluate Cells", performance.now() - start, "ms");
57172
+ console.debug("evaluate Cells", performance.now() - start, "ms");
57126
57173
  }
57127
57174
  getArrayFormulasImpactedByChangesOf(positions) {
57128
57175
  const impactedPositions = this.createEmptyPositionSet();
@@ -57166,7 +57213,7 @@ class Evaluator {
57166
57213
  const start = performance.now();
57167
57214
  this.evaluatedCells = new PositionMap();
57168
57215
  this.evaluate(this.getAllCells());
57169
- console.info("evaluate all cells", performance.now() - start, "ms");
57216
+ console.debug("evaluate all cells", performance.now() - start, "ms");
57170
57217
  }
57171
57218
  evaluateFormulaResult(sheetId, formulaString) {
57172
57219
  const compiledFormula = compile(formulaString);
@@ -60912,7 +60959,7 @@ class Session extends EventBus {
60912
60959
  this.onMessageReceived(message);
60913
60960
  }
60914
60961
  this.isReplayingInitialRevisions = false;
60915
- console.info("Replayed", numberOfCommands, "commands in", performance.now() - start, "ms");
60962
+ console.debug("Replayed", numberOfCommands, "commands in", performance.now() - start, "ms");
60916
60963
  }
60917
60964
  /**
60918
60965
  * Notify the server that the user client left the collaborative session
@@ -61709,6 +61756,7 @@ class InsertPivotPlugin extends UIPlugin {
61709
61756
  this.dispatch("DUPLICATE_PIVOT", {
61710
61757
  pivotId,
61711
61758
  newPivotId,
61759
+ duplicatedPivotName: _t("%s (copy)", this.getters.getPivotCoreDefinition(pivotId).name),
61712
61760
  });
61713
61761
  const activeSheetId = this.getters.getActiveSheetId();
61714
61762
  const position = this.getters.getSheetIds().indexOf(activeSheetId) + 1;
@@ -66842,10 +66890,9 @@ css /* scss */ `
66842
66890
  user-select: none;
66843
66891
  color: ${TEXT_BODY};
66844
66892
 
66845
- .o-heading-3 {
66893
+ .o-sidePanelTitle {
66846
66894
  line-height: 20px;
66847
66895
  font-size: 16px;
66848
- font-weight: 600;
66849
66896
  }
66850
66897
 
66851
66898
  .o-sidePanelHeader {
@@ -66930,6 +66977,10 @@ css /* scss */ `
66930
66977
  }
66931
66978
  }
66932
66979
  }
66980
+
66981
+ .o-fw-bold {
66982
+ font-weight: 500;
66983
+ }
66933
66984
  `;
66934
66985
  class SidePanel extends owl.Component {
66935
66986
  static template = "o-spreadsheet-SidePanel";
@@ -71699,7 +71750,7 @@ class Model extends EventBus {
71699
71750
  coreHandlers = [];
71700
71751
  constructor(data = {}, config = {}, stateUpdateMessages = [], uuidGenerator = new UuidGenerator(), verboseImport = false) {
71701
71752
  const start = performance.now();
71702
- console.group("Model creation");
71753
+ console.debug("##### Model creation #####");
71703
71754
  super();
71704
71755
  setDefaultTranslationMethod();
71705
71756
  stateUpdateMessages = repairInitialMessages(data, stateUpdateMessages);
@@ -71771,16 +71822,16 @@ class Model extends EventBus {
71771
71822
  this.joinSession();
71772
71823
  if (config.snapshotRequested) {
71773
71824
  const startSnapshot = performance.now();
71774
- console.info("Snapshot requested");
71825
+ console.debug("Snapshot requested");
71775
71826
  this.session.snapshot(this.exportData());
71776
71827
  this.garbageCollectExternalResources();
71777
- console.info("Snapshot taken in", performance.now() - startSnapshot, "ms");
71828
+ console.debug("Snapshot taken in", performance.now() - startSnapshot, "ms");
71778
71829
  }
71779
71830
  // mark all models as "raw", so they will not be turned into reactive objects
71780
71831
  // by owl, since we do not rely on reactivity
71781
71832
  owl.markRaw(this);
71782
- console.info("Model created in", performance.now() - start, "ms");
71783
- console.groupEnd();
71833
+ console.debug("Model created in", performance.now() - start, "ms");
71834
+ console.debug("######");
71784
71835
  }
71785
71836
  joinSession() {
71786
71837
  this.session.join(this.config.client);
@@ -72004,7 +72055,7 @@ class Model extends EventBus {
72004
72055
  this.finalize();
72005
72056
  const time = performance.now() - start;
72006
72057
  if (time > 5) {
72007
- console.info(type, time, "ms");
72058
+ console.debug(type, time, "ms");
72008
72059
  }
72009
72060
  });
72010
72061
  this.session.save(command, commands, changes);
@@ -72399,6 +72450,6 @@ exports.tokenColors = tokenColors;
72399
72450
  exports.tokenize = tokenize;
72400
72451
 
72401
72452
 
72402
- __info__.version = "18.0.1";
72403
- __info__.date = "2024-10-14T07:54:24.768Z";
72404
- __info__.hash = "1771f68";
72453
+ __info__.version = "18.0.2";
72454
+ __info__.date = "2024-10-24T08:54:21.934Z";
72455
+ __info__.hash = "788df92";