@odoo/o-spreadsheet 18.4.5 → 18.4.6

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.4.5
6
- * @date 2025-08-04T06:54:49.107Z
7
- * @hash 358931f
5
+ * @version 18.4.6
6
+ * @date 2025-08-18T08:16:33.453Z
7
+ * @hash 9c7c143
8
8
  */
9
9
 
10
10
  'use strict';
@@ -19641,7 +19641,7 @@ const OFFSET = {
19641
19641
  right: startingCol + offsetWidth - 1,
19642
19642
  bottom: startingRow + offsetHeight - 1,
19643
19643
  };
19644
- const range = this.getters.getRangeFromZone(this.__originSheetId, dependencyZone);
19644
+ const range = this.getters.getRangeFromZone(sheetId, dependencyZone);
19645
19645
  if (range.invalidXc || range.invalidSheetName) {
19646
19646
  return new InvalidReferenceError();
19647
19647
  }
@@ -43833,7 +43833,7 @@ const insertDropdown = {
43833
43833
  env.openSidePanel("DataValidationEditor", {
43834
43834
  rule: localizeDataValidationRule(rule, env.model.getters.getLocale()),
43835
43835
  onExit: () => {
43836
- env.openSidePanel("DataValidation");
43836
+ env.replaceSidePanel("DataValidation", "DataValidationEditor");
43837
43837
  },
43838
43838
  });
43839
43839
  },
@@ -53653,11 +53653,15 @@ class PivotMeasureDisplayPanel extends owl.Component {
53653
53653
  this.store = useLocalStore(PivotMeasureDisplayPanelStore, this.props.pivotId, this.props.measure);
53654
53654
  }
53655
53655
  onSave() {
53656
- this.env.openSidePanel("PivotSidePanel", { pivotId: this.props.pivotId });
53656
+ this.env.replaceSidePanel("PivotSidePanel", `pivot_measure_display_${this.props.pivotId}_${this.props.measure.id}`, {
53657
+ pivotId: this.props.pivotId,
53658
+ });
53657
53659
  }
53658
53660
  onCancel() {
53659
53661
  this.store.cancelMeasureDisplayEdition();
53660
- this.env.openSidePanel("PivotSidePanel", { pivotId: this.props.pivotId });
53662
+ this.env.replaceSidePanel("PivotSidePanel", `pivot_measure_display_${this.props.pivotId}_${this.props.measure.id}`, {
53663
+ pivotId: this.props.pivotId,
53664
+ });
53661
53665
  }
53662
53666
  get fieldChoices() {
53663
53667
  return this.store.fields.map((field) => ({
@@ -54119,7 +54123,7 @@ class PivotMeasureEditor extends owl.Component {
54119
54123
  });
54120
54124
  }
54121
54125
  openShowValuesAs() {
54122
- this.env.openSidePanel("PivotMeasureDisplayPanel", {
54126
+ this.env.replaceSidePanel("PivotMeasureDisplayPanel", `pivot_key_${this.props.pivotId}`, {
54123
54127
  pivotId: this.props.pivotId,
54124
54128
  measure: this.props.measure,
54125
54129
  });
@@ -54379,7 +54383,7 @@ class PivotLayoutConfigurator extends owl.Component {
54379
54383
  this.props.onDimensionsUpdated(update);
54380
54384
  }
54381
54385
  getMeasureId(fieldName, aggregator) {
54382
- const baseId = fieldName + (aggregator ? `:${aggregator}` : "");
54386
+ const baseId = fieldName.replaceAll("'", "") + (aggregator ? `:${aggregator}` : "");
54383
54387
  let id = baseId;
54384
54388
  let i = 2;
54385
54389
  while (this.props.definition.measures.some((m) => m.id === id)) {
@@ -57218,7 +57222,11 @@ sidePanelRegistry.add("PivotMeasureDisplayPanel", {
57218
57222
  try {
57219
57223
  // This will throw if the pivot or measure does not exist
57220
57224
  getters.getPivot(props.pivotId).getMeasure(props.measure.id);
57221
- return { isOpen: true, props, key: "pivot_measure_display" };
57225
+ return {
57226
+ isOpen: true,
57227
+ props,
57228
+ key: `pivot_measure_display_${props.pivotId}_${props.measure.id}`,
57229
+ };
57222
57230
  }
57223
57231
  catch (e) {
57224
57232
  return { isOpen: false };
@@ -57243,6 +57251,7 @@ const MIN_SHEET_VIEW_WIDTH = 150;
57243
57251
  class SidePanelStore extends SpreadsheetStore {
57244
57252
  mutators = [
57245
57253
  "open",
57254
+ "replace",
57246
57255
  "toggle",
57247
57256
  "close",
57248
57257
  "changePanelSize",
@@ -57304,8 +57313,7 @@ class SidePanelStore extends SpreadsheetStore {
57304
57313
  if (!state.isOpen) {
57305
57314
  return;
57306
57315
  }
57307
- const mainPanelKey = this.mainPanel ? this.getPanelKey(this.mainPanel) : undefined;
57308
- if (!this.mainPanel || !this.mainPanel.isPinned || mainPanelKey === state.key) {
57316
+ if (!this.mainPanel || !this.mainPanel.isPinned || this.mainPanelKey === state.key) {
57309
57317
  this._openPanel("mainPanel", newPanelInfo, state);
57310
57318
  return;
57311
57319
  }
@@ -57324,6 +57332,34 @@ class SidePanelStore extends SpreadsheetStore {
57324
57332
  }
57325
57333
  this._openPanel("secondaryPanel", newPanelInfo, state);
57326
57334
  }
57335
+ replace(componentTag, currentPanelKey, initialPanelProps = {}) {
57336
+ const newPanelInfo = { initialPanelProps, componentTag, size: DEFAULT_SIDE_PANEL_SIZE };
57337
+ const state = this.computeState(newPanelInfo);
57338
+ if (!state.isOpen) {
57339
+ return;
57340
+ }
57341
+ const ensureMainPanelExpanded = () => {
57342
+ if (this.mainPanel?.isCollapsed) {
57343
+ this.toggleCollapsePanel("mainPanel");
57344
+ }
57345
+ };
57346
+ // Close the current panel if the target panel is already open
57347
+ const isMainPanel = this.mainPanelKey === state.key;
57348
+ const isSecondaryPanel = this.secondaryPanelKey === state.key;
57349
+ if (isMainPanel && this.secondaryPanel) {
57350
+ this.close();
57351
+ ensureMainPanelExpanded();
57352
+ return;
57353
+ }
57354
+ if (isSecondaryPanel) {
57355
+ this.closeMainPanel();
57356
+ this.togglePinPanel();
57357
+ ensureMainPanelExpanded();
57358
+ return;
57359
+ }
57360
+ const targetPanel = this.mainPanelKey === currentPanelKey ? "mainPanel" : "secondaryPanel";
57361
+ this._openPanel(targetPanel, newPanelInfo, state);
57362
+ }
57327
57363
  _openPanel(panel, newPanel, state) {
57328
57364
  const currentPanel = this[panel];
57329
57365
  if (currentPanel && newPanel.componentTag !== currentPanel.componentTag) {
@@ -57383,11 +57419,9 @@ class SidePanelStore extends SpreadsheetStore {
57383
57419
  panelInfo.size = size;
57384
57420
  }
57385
57421
  resetPanelSize(panel) {
57386
- const panelInfo = this[panel];
57387
- if (!panelInfo) {
57388
- return;
57422
+ if (this[panel]) {
57423
+ this[panel].size = DEFAULT_SIDE_PANEL_SIZE;
57389
57424
  }
57390
- panelInfo.size = DEFAULT_SIDE_PANEL_SIZE;
57391
57425
  }
57392
57426
  togglePinPanel() {
57393
57427
  if (!this.mainPanel) {
@@ -77781,9 +77815,7 @@ class ClickableCellsStore extends SpreadsheetStore {
77781
77815
  }
77782
77816
  if (!(xc in clickableCells[sheetId])) {
77783
77817
  const clickableCell = this.findClickableItem(position);
77784
- if (clickableCell) {
77785
- clickableCells[sheetId][xc] = clickableCell;
77786
- }
77818
+ clickableCells[sheetId][xc] = clickableCell;
77787
77819
  }
77788
77820
  return clickableCells[sheetId][xc];
77789
77821
  }
@@ -80025,6 +80057,7 @@ class Spreadsheet extends owl.Component {
80025
80057
  loadLocales: this.model.config.external.loadLocales,
80026
80058
  isDashboard: () => this.model.getters.isDashboard(),
80027
80059
  openSidePanel: this.sidePanel.open.bind(this.sidePanel),
80060
+ replaceSidePanel: this.sidePanel.replace.bind(this.sidePanel),
80028
80061
  toggleSidePanel: this.sidePanel.toggle.bind(this.sidePanel),
80029
80062
  clipboard: this.env.clipboard || instantiateClipboard(),
80030
80063
  startCellEdition: (content) => this.composerFocusStore.focusActiveComposer({ content }),
@@ -84686,6 +84719,6 @@ exports.tokenColors = tokenColors;
84686
84719
  exports.tokenize = tokenize;
84687
84720
 
84688
84721
 
84689
- __info__.version = "18.4.5";
84690
- __info__.date = "2025-08-04T06:54:49.107Z";
84691
- __info__.hash = "358931f";
84722
+ __info__.version = "18.4.6";
84723
+ __info__.date = "2025-08-18T08:16:33.453Z";
84724
+ __info__.hash = "9c7c143";
@@ -4294,6 +4294,7 @@ interface SpreadsheetChildEnv extends NotificationStoreMethods {
4294
4294
  imageProvider?: ImageProviderInterface;
4295
4295
  isDashboard: () => boolean;
4296
4296
  openSidePanel: (panel: string, panelProps?: any) => void;
4297
+ replaceSidePanel: (panel: string, currentPanel: string, panelProps?: any) => void;
4297
4298
  toggleSidePanel: (panel: string, panelProps?: any) => void;
4298
4299
  clipboard: ClipboardInterface;
4299
4300
  startCellEdition: (content?: string) => void;
@@ -9139,7 +9140,7 @@ interface PanelInfo {
9139
9140
  isCollapsed?: boolean;
9140
9141
  }
9141
9142
  declare class SidePanelStore extends SpreadsheetStore {
9142
- mutators: readonly ["open", "toggle", "close", "changePanelSize", "resetPanelSize", "togglePinPanel", "closeMainPanel", "changeSpreadsheetWidth", "toggleCollapsePanel"];
9143
+ mutators: readonly ["open", "replace", "toggle", "close", "changePanelSize", "resetPanelSize", "togglePinPanel", "closeMainPanel", "changeSpreadsheetWidth", "toggleCollapsePanel"];
9143
9144
  mainPanel: (PanelInfo & {
9144
9145
  isCollapsed?: boolean;
9145
9146
  isPinned?: boolean;
@@ -9161,6 +9162,7 @@ declare class SidePanelStore extends SpreadsheetStore {
9161
9162
  private getPanelProps;
9162
9163
  private getPanelKey;
9163
9164
  open(componentTag: string, initialPanelProps?: SidePanelComponentProps): void;
9165
+ replace(componentTag: string, currentPanelKey: string, initialPanelProps?: SidePanelComponentProps): void;
9164
9166
  private _openPanel;
9165
9167
  toggle(componentTag: string, panelProps: SidePanelComponentProps): void;
9166
9168
  close(): void;
@@ -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.4.5
6
- * @date 2025-08-04T06:54:49.107Z
7
- * @hash 358931f
5
+ * @version 18.4.6
6
+ * @date 2025-08-18T08:16:33.453Z
7
+ * @hash 9c7c143
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, useExternalListener, onWillUpdateProps, onWillStart, onWillPatch, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -19639,7 +19639,7 @@ const OFFSET = {
19639
19639
  right: startingCol + offsetWidth - 1,
19640
19640
  bottom: startingRow + offsetHeight - 1,
19641
19641
  };
19642
- const range = this.getters.getRangeFromZone(this.__originSheetId, dependencyZone);
19642
+ const range = this.getters.getRangeFromZone(sheetId, dependencyZone);
19643
19643
  if (range.invalidXc || range.invalidSheetName) {
19644
19644
  return new InvalidReferenceError();
19645
19645
  }
@@ -43831,7 +43831,7 @@ const insertDropdown = {
43831
43831
  env.openSidePanel("DataValidationEditor", {
43832
43832
  rule: localizeDataValidationRule(rule, env.model.getters.getLocale()),
43833
43833
  onExit: () => {
43834
- env.openSidePanel("DataValidation");
43834
+ env.replaceSidePanel("DataValidation", "DataValidationEditor");
43835
43835
  },
43836
43836
  });
43837
43837
  },
@@ -53651,11 +53651,15 @@ class PivotMeasureDisplayPanel extends Component {
53651
53651
  this.store = useLocalStore(PivotMeasureDisplayPanelStore, this.props.pivotId, this.props.measure);
53652
53652
  }
53653
53653
  onSave() {
53654
- this.env.openSidePanel("PivotSidePanel", { pivotId: this.props.pivotId });
53654
+ this.env.replaceSidePanel("PivotSidePanel", `pivot_measure_display_${this.props.pivotId}_${this.props.measure.id}`, {
53655
+ pivotId: this.props.pivotId,
53656
+ });
53655
53657
  }
53656
53658
  onCancel() {
53657
53659
  this.store.cancelMeasureDisplayEdition();
53658
- this.env.openSidePanel("PivotSidePanel", { pivotId: this.props.pivotId });
53660
+ this.env.replaceSidePanel("PivotSidePanel", `pivot_measure_display_${this.props.pivotId}_${this.props.measure.id}`, {
53661
+ pivotId: this.props.pivotId,
53662
+ });
53659
53663
  }
53660
53664
  get fieldChoices() {
53661
53665
  return this.store.fields.map((field) => ({
@@ -54117,7 +54121,7 @@ class PivotMeasureEditor extends Component {
54117
54121
  });
54118
54122
  }
54119
54123
  openShowValuesAs() {
54120
- this.env.openSidePanel("PivotMeasureDisplayPanel", {
54124
+ this.env.replaceSidePanel("PivotMeasureDisplayPanel", `pivot_key_${this.props.pivotId}`, {
54121
54125
  pivotId: this.props.pivotId,
54122
54126
  measure: this.props.measure,
54123
54127
  });
@@ -54377,7 +54381,7 @@ class PivotLayoutConfigurator extends Component {
54377
54381
  this.props.onDimensionsUpdated(update);
54378
54382
  }
54379
54383
  getMeasureId(fieldName, aggregator) {
54380
- const baseId = fieldName + (aggregator ? `:${aggregator}` : "");
54384
+ const baseId = fieldName.replaceAll("'", "") + (aggregator ? `:${aggregator}` : "");
54381
54385
  let id = baseId;
54382
54386
  let i = 2;
54383
54387
  while (this.props.definition.measures.some((m) => m.id === id)) {
@@ -57216,7 +57220,11 @@ sidePanelRegistry.add("PivotMeasureDisplayPanel", {
57216
57220
  try {
57217
57221
  // This will throw if the pivot or measure does not exist
57218
57222
  getters.getPivot(props.pivotId).getMeasure(props.measure.id);
57219
- return { isOpen: true, props, key: "pivot_measure_display" };
57223
+ return {
57224
+ isOpen: true,
57225
+ props,
57226
+ key: `pivot_measure_display_${props.pivotId}_${props.measure.id}`,
57227
+ };
57220
57228
  }
57221
57229
  catch (e) {
57222
57230
  return { isOpen: false };
@@ -57241,6 +57249,7 @@ const MIN_SHEET_VIEW_WIDTH = 150;
57241
57249
  class SidePanelStore extends SpreadsheetStore {
57242
57250
  mutators = [
57243
57251
  "open",
57252
+ "replace",
57244
57253
  "toggle",
57245
57254
  "close",
57246
57255
  "changePanelSize",
@@ -57302,8 +57311,7 @@ class SidePanelStore extends SpreadsheetStore {
57302
57311
  if (!state.isOpen) {
57303
57312
  return;
57304
57313
  }
57305
- const mainPanelKey = this.mainPanel ? this.getPanelKey(this.mainPanel) : undefined;
57306
- if (!this.mainPanel || !this.mainPanel.isPinned || mainPanelKey === state.key) {
57314
+ if (!this.mainPanel || !this.mainPanel.isPinned || this.mainPanelKey === state.key) {
57307
57315
  this._openPanel("mainPanel", newPanelInfo, state);
57308
57316
  return;
57309
57317
  }
@@ -57322,6 +57330,34 @@ class SidePanelStore extends SpreadsheetStore {
57322
57330
  }
57323
57331
  this._openPanel("secondaryPanel", newPanelInfo, state);
57324
57332
  }
57333
+ replace(componentTag, currentPanelKey, initialPanelProps = {}) {
57334
+ const newPanelInfo = { initialPanelProps, componentTag, size: DEFAULT_SIDE_PANEL_SIZE };
57335
+ const state = this.computeState(newPanelInfo);
57336
+ if (!state.isOpen) {
57337
+ return;
57338
+ }
57339
+ const ensureMainPanelExpanded = () => {
57340
+ if (this.mainPanel?.isCollapsed) {
57341
+ this.toggleCollapsePanel("mainPanel");
57342
+ }
57343
+ };
57344
+ // Close the current panel if the target panel is already open
57345
+ const isMainPanel = this.mainPanelKey === state.key;
57346
+ const isSecondaryPanel = this.secondaryPanelKey === state.key;
57347
+ if (isMainPanel && this.secondaryPanel) {
57348
+ this.close();
57349
+ ensureMainPanelExpanded();
57350
+ return;
57351
+ }
57352
+ if (isSecondaryPanel) {
57353
+ this.closeMainPanel();
57354
+ this.togglePinPanel();
57355
+ ensureMainPanelExpanded();
57356
+ return;
57357
+ }
57358
+ const targetPanel = this.mainPanelKey === currentPanelKey ? "mainPanel" : "secondaryPanel";
57359
+ this._openPanel(targetPanel, newPanelInfo, state);
57360
+ }
57325
57361
  _openPanel(panel, newPanel, state) {
57326
57362
  const currentPanel = this[panel];
57327
57363
  if (currentPanel && newPanel.componentTag !== currentPanel.componentTag) {
@@ -57381,11 +57417,9 @@ class SidePanelStore extends SpreadsheetStore {
57381
57417
  panelInfo.size = size;
57382
57418
  }
57383
57419
  resetPanelSize(panel) {
57384
- const panelInfo = this[panel];
57385
- if (!panelInfo) {
57386
- return;
57420
+ if (this[panel]) {
57421
+ this[panel].size = DEFAULT_SIDE_PANEL_SIZE;
57387
57422
  }
57388
- panelInfo.size = DEFAULT_SIDE_PANEL_SIZE;
57389
57423
  }
57390
57424
  togglePinPanel() {
57391
57425
  if (!this.mainPanel) {
@@ -77779,9 +77813,7 @@ class ClickableCellsStore extends SpreadsheetStore {
77779
77813
  }
77780
77814
  if (!(xc in clickableCells[sheetId])) {
77781
77815
  const clickableCell = this.findClickableItem(position);
77782
- if (clickableCell) {
77783
- clickableCells[sheetId][xc] = clickableCell;
77784
- }
77816
+ clickableCells[sheetId][xc] = clickableCell;
77785
77817
  }
77786
77818
  return clickableCells[sheetId][xc];
77787
77819
  }
@@ -80023,6 +80055,7 @@ class Spreadsheet extends Component {
80023
80055
  loadLocales: this.model.config.external.loadLocales,
80024
80056
  isDashboard: () => this.model.getters.isDashboard(),
80025
80057
  openSidePanel: this.sidePanel.open.bind(this.sidePanel),
80058
+ replaceSidePanel: this.sidePanel.replace.bind(this.sidePanel),
80026
80059
  toggleSidePanel: this.sidePanel.toggle.bind(this.sidePanel),
80027
80060
  clipboard: this.env.clipboard || instantiateClipboard(),
80028
80061
  startCellEdition: (content) => this.composerFocusStore.focusActiveComposer({ content }),
@@ -84636,6 +84669,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
84636
84669
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
84637
84670
 
84638
84671
 
84639
- __info__.version = "18.4.5";
84640
- __info__.date = "2025-08-04T06:54:49.107Z";
84641
- __info__.hash = "358931f";
84672
+ __info__.version = "18.4.6";
84673
+ __info__.date = "2025-08-18T08:16:33.453Z";
84674
+ __info__.hash = "9c7c143";
@@ -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.4.5
6
- * @date 2025-08-04T06:54:49.107Z
7
- * @hash 358931f
5
+ * @version 18.4.6
6
+ * @date 2025-08-18T08:16:33.453Z
7
+ * @hash 9c7c143
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -19640,7 +19640,7 @@ stores.inject(MyMetaStore, storeInstance);
19640
19640
  right: startingCol + offsetWidth - 1,
19641
19641
  bottom: startingRow + offsetHeight - 1,
19642
19642
  };
19643
- const range = this.getters.getRangeFromZone(this.__originSheetId, dependencyZone);
19643
+ const range = this.getters.getRangeFromZone(sheetId, dependencyZone);
19644
19644
  if (range.invalidXc || range.invalidSheetName) {
19645
19645
  return new InvalidReferenceError();
19646
19646
  }
@@ -43832,7 +43832,7 @@ stores.inject(MyMetaStore, storeInstance);
43832
43832
  env.openSidePanel("DataValidationEditor", {
43833
43833
  rule: localizeDataValidationRule(rule, env.model.getters.getLocale()),
43834
43834
  onExit: () => {
43835
- env.openSidePanel("DataValidation");
43835
+ env.replaceSidePanel("DataValidation", "DataValidationEditor");
43836
43836
  },
43837
43837
  });
43838
43838
  },
@@ -53652,11 +53652,15 @@ stores.inject(MyMetaStore, storeInstance);
53652
53652
  this.store = useLocalStore(PivotMeasureDisplayPanelStore, this.props.pivotId, this.props.measure);
53653
53653
  }
53654
53654
  onSave() {
53655
- this.env.openSidePanel("PivotSidePanel", { pivotId: this.props.pivotId });
53655
+ this.env.replaceSidePanel("PivotSidePanel", `pivot_measure_display_${this.props.pivotId}_${this.props.measure.id}`, {
53656
+ pivotId: this.props.pivotId,
53657
+ });
53656
53658
  }
53657
53659
  onCancel() {
53658
53660
  this.store.cancelMeasureDisplayEdition();
53659
- this.env.openSidePanel("PivotSidePanel", { pivotId: this.props.pivotId });
53661
+ this.env.replaceSidePanel("PivotSidePanel", `pivot_measure_display_${this.props.pivotId}_${this.props.measure.id}`, {
53662
+ pivotId: this.props.pivotId,
53663
+ });
53660
53664
  }
53661
53665
  get fieldChoices() {
53662
53666
  return this.store.fields.map((field) => ({
@@ -54118,7 +54122,7 @@ stores.inject(MyMetaStore, storeInstance);
54118
54122
  });
54119
54123
  }
54120
54124
  openShowValuesAs() {
54121
- this.env.openSidePanel("PivotMeasureDisplayPanel", {
54125
+ this.env.replaceSidePanel("PivotMeasureDisplayPanel", `pivot_key_${this.props.pivotId}`, {
54122
54126
  pivotId: this.props.pivotId,
54123
54127
  measure: this.props.measure,
54124
54128
  });
@@ -54378,7 +54382,7 @@ stores.inject(MyMetaStore, storeInstance);
54378
54382
  this.props.onDimensionsUpdated(update);
54379
54383
  }
54380
54384
  getMeasureId(fieldName, aggregator) {
54381
- const baseId = fieldName + (aggregator ? `:${aggregator}` : "");
54385
+ const baseId = fieldName.replaceAll("'", "") + (aggregator ? `:${aggregator}` : "");
54382
54386
  let id = baseId;
54383
54387
  let i = 2;
54384
54388
  while (this.props.definition.measures.some((m) => m.id === id)) {
@@ -57217,7 +57221,11 @@ stores.inject(MyMetaStore, storeInstance);
57217
57221
  try {
57218
57222
  // This will throw if the pivot or measure does not exist
57219
57223
  getters.getPivot(props.pivotId).getMeasure(props.measure.id);
57220
- return { isOpen: true, props, key: "pivot_measure_display" };
57224
+ return {
57225
+ isOpen: true,
57226
+ props,
57227
+ key: `pivot_measure_display_${props.pivotId}_${props.measure.id}`,
57228
+ };
57221
57229
  }
57222
57230
  catch (e) {
57223
57231
  return { isOpen: false };
@@ -57242,6 +57250,7 @@ stores.inject(MyMetaStore, storeInstance);
57242
57250
  class SidePanelStore extends SpreadsheetStore {
57243
57251
  mutators = [
57244
57252
  "open",
57253
+ "replace",
57245
57254
  "toggle",
57246
57255
  "close",
57247
57256
  "changePanelSize",
@@ -57303,8 +57312,7 @@ stores.inject(MyMetaStore, storeInstance);
57303
57312
  if (!state.isOpen) {
57304
57313
  return;
57305
57314
  }
57306
- const mainPanelKey = this.mainPanel ? this.getPanelKey(this.mainPanel) : undefined;
57307
- if (!this.mainPanel || !this.mainPanel.isPinned || mainPanelKey === state.key) {
57315
+ if (!this.mainPanel || !this.mainPanel.isPinned || this.mainPanelKey === state.key) {
57308
57316
  this._openPanel("mainPanel", newPanelInfo, state);
57309
57317
  return;
57310
57318
  }
@@ -57323,6 +57331,34 @@ stores.inject(MyMetaStore, storeInstance);
57323
57331
  }
57324
57332
  this._openPanel("secondaryPanel", newPanelInfo, state);
57325
57333
  }
57334
+ replace(componentTag, currentPanelKey, initialPanelProps = {}) {
57335
+ const newPanelInfo = { initialPanelProps, componentTag, size: DEFAULT_SIDE_PANEL_SIZE };
57336
+ const state = this.computeState(newPanelInfo);
57337
+ if (!state.isOpen) {
57338
+ return;
57339
+ }
57340
+ const ensureMainPanelExpanded = () => {
57341
+ if (this.mainPanel?.isCollapsed) {
57342
+ this.toggleCollapsePanel("mainPanel");
57343
+ }
57344
+ };
57345
+ // Close the current panel if the target panel is already open
57346
+ const isMainPanel = this.mainPanelKey === state.key;
57347
+ const isSecondaryPanel = this.secondaryPanelKey === state.key;
57348
+ if (isMainPanel && this.secondaryPanel) {
57349
+ this.close();
57350
+ ensureMainPanelExpanded();
57351
+ return;
57352
+ }
57353
+ if (isSecondaryPanel) {
57354
+ this.closeMainPanel();
57355
+ this.togglePinPanel();
57356
+ ensureMainPanelExpanded();
57357
+ return;
57358
+ }
57359
+ const targetPanel = this.mainPanelKey === currentPanelKey ? "mainPanel" : "secondaryPanel";
57360
+ this._openPanel(targetPanel, newPanelInfo, state);
57361
+ }
57326
57362
  _openPanel(panel, newPanel, state) {
57327
57363
  const currentPanel = this[panel];
57328
57364
  if (currentPanel && newPanel.componentTag !== currentPanel.componentTag) {
@@ -57382,11 +57418,9 @@ stores.inject(MyMetaStore, storeInstance);
57382
57418
  panelInfo.size = size;
57383
57419
  }
57384
57420
  resetPanelSize(panel) {
57385
- const panelInfo = this[panel];
57386
- if (!panelInfo) {
57387
- return;
57421
+ if (this[panel]) {
57422
+ this[panel].size = DEFAULT_SIDE_PANEL_SIZE;
57388
57423
  }
57389
- panelInfo.size = DEFAULT_SIDE_PANEL_SIZE;
57390
57424
  }
57391
57425
  togglePinPanel() {
57392
57426
  if (!this.mainPanel) {
@@ -77780,9 +77814,7 @@ stores.inject(MyMetaStore, storeInstance);
77780
77814
  }
77781
77815
  if (!(xc in clickableCells[sheetId])) {
77782
77816
  const clickableCell = this.findClickableItem(position);
77783
- if (clickableCell) {
77784
- clickableCells[sheetId][xc] = clickableCell;
77785
- }
77817
+ clickableCells[sheetId][xc] = clickableCell;
77786
77818
  }
77787
77819
  return clickableCells[sheetId][xc];
77788
77820
  }
@@ -80024,6 +80056,7 @@ stores.inject(MyMetaStore, storeInstance);
80024
80056
  loadLocales: this.model.config.external.loadLocales,
80025
80057
  isDashboard: () => this.model.getters.isDashboard(),
80026
80058
  openSidePanel: this.sidePanel.open.bind(this.sidePanel),
80059
+ replaceSidePanel: this.sidePanel.replace.bind(this.sidePanel),
80027
80060
  toggleSidePanel: this.sidePanel.toggle.bind(this.sidePanel),
80028
80061
  clipboard: this.env.clipboard || instantiateClipboard(),
80029
80062
  startCellEdition: (content) => this.composerFocusStore.focusActiveComposer({ content }),
@@ -84685,9 +84718,9 @@ stores.inject(MyMetaStore, storeInstance);
84685
84718
  exports.tokenize = tokenize;
84686
84719
 
84687
84720
 
84688
- __info__.version = "18.4.5";
84689
- __info__.date = "2025-08-04T06:54:49.107Z";
84690
- __info__.hash = "358931f";
84721
+ __info__.version = "18.4.6";
84722
+ __info__.date = "2025-08-18T08:16:33.453Z";
84723
+ __info__.hash = "9c7c143";
84691
84724
 
84692
84725
 
84693
84726
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);