@odoo/o-spreadsheet 18.2.34 → 18.2.35

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.34
6
- * @date 2025-11-12T14:15:32.431Z
7
- * @hash 9ca0c4c
5
+ * @version 18.2.35
6
+ * @date 2025-11-24T07:40:00.240Z
7
+ * @hash 2e9a842
8
8
  */
9
9
 
10
10
  'use strict';
@@ -21166,6 +21166,7 @@ class AbstractComposerStore extends SpreadsheetStore {
21166
21166
  }
21167
21167
  this.selectionStart = start;
21168
21168
  this.selectionEnd = end;
21169
+ this.editionMode = "editing";
21169
21170
  this.computeFormulaCursorContext();
21170
21171
  this.computeParenthesisRelatedToCursor();
21171
21172
  }
@@ -22210,7 +22211,6 @@ function insertTokenAfterArgSeparator(tokenAtCursor, value) {
22210
22211
  // replace the whole token
22211
22212
  start = tokenAtCursor.start;
22212
22213
  }
22213
- this.composer.stopComposerRangeSelection();
22214
22214
  this.composer.changeComposerCursorSelection(start, end);
22215
22215
  this.composer.replaceComposerCursorSelection(value);
22216
22216
  }
@@ -22228,7 +22228,6 @@ function insertTokenAfterLeftParenthesis(tokenAtCursor, value) {
22228
22228
  // replace the whole token
22229
22229
  start = tokenAtCursor.start;
22230
22230
  }
22231
- this.composer.stopComposerRangeSelection();
22232
22231
  this.composer.changeComposerCursorSelection(start, end);
22233
22232
  this.composer.replaceComposerCursorSelection(value);
22234
22233
  }
@@ -41385,7 +41384,6 @@ class Composer extends owl.Component {
41385
41384
  return;
41386
41385
  }
41387
41386
  const newSelection = this.contentHelper.getCurrentSelection();
41388
- this.props.composerStore.stopComposerRangeSelection();
41389
41387
  this.props.onComposerContentFocused();
41390
41388
  this.props.composerStore.changeComposerCursorSelection(newSelection.start, newSelection.end);
41391
41389
  this.processTokenAtCursor();
@@ -51374,7 +51372,10 @@ class AbstractResizer extends owl.Component {
51374
51372
  this.state.waitingForMove = false;
51375
51373
  }
51376
51374
  onMouseMove(ev) {
51377
- if (this.state.isResizing || this.state.isMoving || this.state.isSelecting) {
51375
+ if (this.env.model.getters.isReadonly() ||
51376
+ this.state.isResizing ||
51377
+ this.state.isMoving ||
51378
+ this.state.isSelecting) {
51378
51379
  return;
51379
51380
  }
51380
51381
  this._computeHandleDisplay(ev);
@@ -51427,6 +51428,10 @@ class AbstractResizer extends owl.Component {
51427
51428
  if (index < 0) {
51428
51429
  return;
51429
51430
  }
51431
+ if (this.env.model.getters.isReadonly()) {
51432
+ this._selectElement(index, false);
51433
+ return;
51434
+ }
51430
51435
  if (this.state.waitingForMove) {
51431
51436
  if (!this.env.model.getters.isGridSelectionActive()) {
51432
51437
  this._selectElement(index, false);
@@ -53128,24 +53133,24 @@ const DEFAULT_SIDE_PANEL_SIZE = 350;
53128
53133
  const MIN_SHEET_VIEW_WIDTH = 150;
53129
53134
  class SidePanelStore extends SpreadsheetStore {
53130
53135
  mutators = ["open", "toggle", "close", "changePanelSize", "resetPanelSize"];
53131
- initialPanelProps = {};
53136
+ currentPanelProps = {};
53132
53137
  componentTag = "";
53133
53138
  panelSize = DEFAULT_SIDE_PANEL_SIZE;
53134
53139
  get isOpen() {
53135
53140
  if (!this.componentTag) {
53136
53141
  return false;
53137
53142
  }
53138
- return this.computeState(this.componentTag, this.initialPanelProps).isOpen;
53143
+ return this.computeState(this.componentTag, this.currentPanelProps).isOpen;
53139
53144
  }
53140
53145
  get panelProps() {
53141
- const state = this.computeState(this.componentTag, this.initialPanelProps);
53146
+ const state = this.computeState(this.componentTag, this.currentPanelProps);
53142
53147
  if (state.isOpen) {
53143
53148
  return state.props ?? {};
53144
53149
  }
53145
53150
  return {};
53146
53151
  }
53147
53152
  get panelKey() {
53148
- const state = this.computeState(this.componentTag, this.initialPanelProps);
53153
+ const state = this.computeState(this.componentTag, this.currentPanelProps);
53149
53154
  if (state.isOpen) {
53150
53155
  return state.key;
53151
53156
  }
@@ -53157,10 +53162,10 @@ class SidePanelStore extends SpreadsheetStore {
53157
53162
  return;
53158
53163
  }
53159
53164
  if (this.isOpen && componentTag !== this.componentTag) {
53160
- this.initialPanelProps?.onCloseSidePanel?.();
53165
+ this.currentPanelProps?.onCloseSidePanel?.();
53161
53166
  }
53162
53167
  this.componentTag = componentTag;
53163
- this.initialPanelProps = state.props ?? {};
53168
+ this.currentPanelProps = state.props ?? {};
53164
53169
  }
53165
53170
  toggle(componentTag, panelProps) {
53166
53171
  if (this.isOpen && componentTag === this.componentTag) {
@@ -53171,8 +53176,8 @@ class SidePanelStore extends SpreadsheetStore {
53171
53176
  }
53172
53177
  }
53173
53178
  close() {
53174
- this.initialPanelProps.onCloseSidePanel?.();
53175
- this.initialPanelProps = {};
53179
+ this.currentPanelProps.onCloseSidePanel?.();
53180
+ this.currentPanelProps = {};
53176
53181
  this.componentTag = "";
53177
53182
  }
53178
53183
  changePanelSize(size, spreadsheetElWidth) {
@@ -53198,7 +53203,11 @@ class SidePanelStore extends SpreadsheetStore {
53198
53203
  };
53199
53204
  }
53200
53205
  else {
53201
- return customComputeState(this.getters, panelProps);
53206
+ const state = customComputeState(this.getters, panelProps);
53207
+ if (state.isOpen) {
53208
+ this.currentPanelProps = state.props ?? this.currentPanelProps;
53209
+ }
53210
+ return state;
53202
53211
  }
53203
53212
  }
53204
53213
  }
@@ -72680,7 +72689,7 @@ css /* scss */ `
72680
72689
  border-radius: 4px;
72681
72690
  font-weight: 500;
72682
72691
  font-size: 14px;
72683
- height: 32px;
72692
+ min-height: 32px;
72684
72693
  line-height: 16px;
72685
72694
  flex-grow: 1;
72686
72695
  background-color: ${BUTTON_BG};
@@ -77385,6 +77394,6 @@ exports.tokenColors = tokenColors;
77385
77394
  exports.tokenize = tokenize;
77386
77395
 
77387
77396
 
77388
- __info__.version = "18.2.34";
77389
- __info__.date = "2025-11-12T14:15:32.431Z";
77390
- __info__.hash = "9ca0c4c";
77397
+ __info__.version = "18.2.35";
77398
+ __info__.date = "2025-11-24T07:40:00.240Z";
77399
+ __info__.hash = "2e9a842";
@@ -8658,7 +8658,7 @@ interface ClosedSidePanel {
8658
8658
  type SidePanelState = OpenSidePanel | ClosedSidePanel;
8659
8659
  declare class SidePanelStore extends SpreadsheetStore {
8660
8660
  mutators: readonly ["open", "toggle", "close", "changePanelSize", "resetPanelSize"];
8661
- initialPanelProps: SidePanelProps;
8661
+ currentPanelProps: SidePanelProps;
8662
8662
  componentTag: string;
8663
8663
  panelSize: number;
8664
8664
  get isOpen(): boolean;
@@ -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.34
6
- * @date 2025-11-12T14:15:32.431Z
7
- * @hash 9ca0c4c
5
+ * @version 18.2.35
6
+ * @date 2025-11-24T07:40:00.240Z
7
+ * @hash 2e9a842
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -21164,6 +21164,7 @@ class AbstractComposerStore extends SpreadsheetStore {
21164
21164
  }
21165
21165
  this.selectionStart = start;
21166
21166
  this.selectionEnd = end;
21167
+ this.editionMode = "editing";
21167
21168
  this.computeFormulaCursorContext();
21168
21169
  this.computeParenthesisRelatedToCursor();
21169
21170
  }
@@ -22208,7 +22209,6 @@ function insertTokenAfterArgSeparator(tokenAtCursor, value) {
22208
22209
  // replace the whole token
22209
22210
  start = tokenAtCursor.start;
22210
22211
  }
22211
- this.composer.stopComposerRangeSelection();
22212
22212
  this.composer.changeComposerCursorSelection(start, end);
22213
22213
  this.composer.replaceComposerCursorSelection(value);
22214
22214
  }
@@ -22226,7 +22226,6 @@ function insertTokenAfterLeftParenthesis(tokenAtCursor, value) {
22226
22226
  // replace the whole token
22227
22227
  start = tokenAtCursor.start;
22228
22228
  }
22229
- this.composer.stopComposerRangeSelection();
22230
22229
  this.composer.changeComposerCursorSelection(start, end);
22231
22230
  this.composer.replaceComposerCursorSelection(value);
22232
22231
  }
@@ -41383,7 +41382,6 @@ class Composer extends Component {
41383
41382
  return;
41384
41383
  }
41385
41384
  const newSelection = this.contentHelper.getCurrentSelection();
41386
- this.props.composerStore.stopComposerRangeSelection();
41387
41385
  this.props.onComposerContentFocused();
41388
41386
  this.props.composerStore.changeComposerCursorSelection(newSelection.start, newSelection.end);
41389
41387
  this.processTokenAtCursor();
@@ -51372,7 +51370,10 @@ class AbstractResizer extends Component {
51372
51370
  this.state.waitingForMove = false;
51373
51371
  }
51374
51372
  onMouseMove(ev) {
51375
- if (this.state.isResizing || this.state.isMoving || this.state.isSelecting) {
51373
+ if (this.env.model.getters.isReadonly() ||
51374
+ this.state.isResizing ||
51375
+ this.state.isMoving ||
51376
+ this.state.isSelecting) {
51376
51377
  return;
51377
51378
  }
51378
51379
  this._computeHandleDisplay(ev);
@@ -51425,6 +51426,10 @@ class AbstractResizer extends Component {
51425
51426
  if (index < 0) {
51426
51427
  return;
51427
51428
  }
51429
+ if (this.env.model.getters.isReadonly()) {
51430
+ this._selectElement(index, false);
51431
+ return;
51432
+ }
51428
51433
  if (this.state.waitingForMove) {
51429
51434
  if (!this.env.model.getters.isGridSelectionActive()) {
51430
51435
  this._selectElement(index, false);
@@ -53126,24 +53131,24 @@ const DEFAULT_SIDE_PANEL_SIZE = 350;
53126
53131
  const MIN_SHEET_VIEW_WIDTH = 150;
53127
53132
  class SidePanelStore extends SpreadsheetStore {
53128
53133
  mutators = ["open", "toggle", "close", "changePanelSize", "resetPanelSize"];
53129
- initialPanelProps = {};
53134
+ currentPanelProps = {};
53130
53135
  componentTag = "";
53131
53136
  panelSize = DEFAULT_SIDE_PANEL_SIZE;
53132
53137
  get isOpen() {
53133
53138
  if (!this.componentTag) {
53134
53139
  return false;
53135
53140
  }
53136
- return this.computeState(this.componentTag, this.initialPanelProps).isOpen;
53141
+ return this.computeState(this.componentTag, this.currentPanelProps).isOpen;
53137
53142
  }
53138
53143
  get panelProps() {
53139
- const state = this.computeState(this.componentTag, this.initialPanelProps);
53144
+ const state = this.computeState(this.componentTag, this.currentPanelProps);
53140
53145
  if (state.isOpen) {
53141
53146
  return state.props ?? {};
53142
53147
  }
53143
53148
  return {};
53144
53149
  }
53145
53150
  get panelKey() {
53146
- const state = this.computeState(this.componentTag, this.initialPanelProps);
53151
+ const state = this.computeState(this.componentTag, this.currentPanelProps);
53147
53152
  if (state.isOpen) {
53148
53153
  return state.key;
53149
53154
  }
@@ -53155,10 +53160,10 @@ class SidePanelStore extends SpreadsheetStore {
53155
53160
  return;
53156
53161
  }
53157
53162
  if (this.isOpen && componentTag !== this.componentTag) {
53158
- this.initialPanelProps?.onCloseSidePanel?.();
53163
+ this.currentPanelProps?.onCloseSidePanel?.();
53159
53164
  }
53160
53165
  this.componentTag = componentTag;
53161
- this.initialPanelProps = state.props ?? {};
53166
+ this.currentPanelProps = state.props ?? {};
53162
53167
  }
53163
53168
  toggle(componentTag, panelProps) {
53164
53169
  if (this.isOpen && componentTag === this.componentTag) {
@@ -53169,8 +53174,8 @@ class SidePanelStore extends SpreadsheetStore {
53169
53174
  }
53170
53175
  }
53171
53176
  close() {
53172
- this.initialPanelProps.onCloseSidePanel?.();
53173
- this.initialPanelProps = {};
53177
+ this.currentPanelProps.onCloseSidePanel?.();
53178
+ this.currentPanelProps = {};
53174
53179
  this.componentTag = "";
53175
53180
  }
53176
53181
  changePanelSize(size, spreadsheetElWidth) {
@@ -53196,7 +53201,11 @@ class SidePanelStore extends SpreadsheetStore {
53196
53201
  };
53197
53202
  }
53198
53203
  else {
53199
- return customComputeState(this.getters, panelProps);
53204
+ const state = customComputeState(this.getters, panelProps);
53205
+ if (state.isOpen) {
53206
+ this.currentPanelProps = state.props ?? this.currentPanelProps;
53207
+ }
53208
+ return state;
53200
53209
  }
53201
53210
  }
53202
53211
  }
@@ -72678,7 +72687,7 @@ css /* scss */ `
72678
72687
  border-radius: 4px;
72679
72688
  font-weight: 500;
72680
72689
  font-size: 14px;
72681
- height: 32px;
72690
+ min-height: 32px;
72682
72691
  line-height: 16px;
72683
72692
  flex-grow: 1;
72684
72693
  background-color: ${BUTTON_BG};
@@ -77338,6 +77347,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
77338
77347
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, 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, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
77339
77348
 
77340
77349
 
77341
- __info__.version = "18.2.34";
77342
- __info__.date = "2025-11-12T14:15:32.431Z";
77343
- __info__.hash = "9ca0c4c";
77350
+ __info__.version = "18.2.35";
77351
+ __info__.date = "2025-11-24T07:40:00.240Z";
77352
+ __info__.hash = "2e9a842";
@@ -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.34
6
- * @date 2025-11-12T14:15:32.431Z
7
- * @hash 9ca0c4c
5
+ * @version 18.2.35
6
+ * @date 2025-11-24T07:40:00.240Z
7
+ * @hash 2e9a842
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -21165,6 +21165,7 @@ stores.inject(MyMetaStore, storeInstance);
21165
21165
  }
21166
21166
  this.selectionStart = start;
21167
21167
  this.selectionEnd = end;
21168
+ this.editionMode = "editing";
21168
21169
  this.computeFormulaCursorContext();
21169
21170
  this.computeParenthesisRelatedToCursor();
21170
21171
  }
@@ -22209,7 +22210,6 @@ stores.inject(MyMetaStore, storeInstance);
22209
22210
  // replace the whole token
22210
22211
  start = tokenAtCursor.start;
22211
22212
  }
22212
- this.composer.stopComposerRangeSelection();
22213
22213
  this.composer.changeComposerCursorSelection(start, end);
22214
22214
  this.composer.replaceComposerCursorSelection(value);
22215
22215
  }
@@ -22227,7 +22227,6 @@ stores.inject(MyMetaStore, storeInstance);
22227
22227
  // replace the whole token
22228
22228
  start = tokenAtCursor.start;
22229
22229
  }
22230
- this.composer.stopComposerRangeSelection();
22231
22230
  this.composer.changeComposerCursorSelection(start, end);
22232
22231
  this.composer.replaceComposerCursorSelection(value);
22233
22232
  }
@@ -41384,7 +41383,6 @@ stores.inject(MyMetaStore, storeInstance);
41384
41383
  return;
41385
41384
  }
41386
41385
  const newSelection = this.contentHelper.getCurrentSelection();
41387
- this.props.composerStore.stopComposerRangeSelection();
41388
41386
  this.props.onComposerContentFocused();
41389
41387
  this.props.composerStore.changeComposerCursorSelection(newSelection.start, newSelection.end);
41390
41388
  this.processTokenAtCursor();
@@ -51373,7 +51371,10 @@ stores.inject(MyMetaStore, storeInstance);
51373
51371
  this.state.waitingForMove = false;
51374
51372
  }
51375
51373
  onMouseMove(ev) {
51376
- if (this.state.isResizing || this.state.isMoving || this.state.isSelecting) {
51374
+ if (this.env.model.getters.isReadonly() ||
51375
+ this.state.isResizing ||
51376
+ this.state.isMoving ||
51377
+ this.state.isSelecting) {
51377
51378
  return;
51378
51379
  }
51379
51380
  this._computeHandleDisplay(ev);
@@ -51426,6 +51427,10 @@ stores.inject(MyMetaStore, storeInstance);
51426
51427
  if (index < 0) {
51427
51428
  return;
51428
51429
  }
51430
+ if (this.env.model.getters.isReadonly()) {
51431
+ this._selectElement(index, false);
51432
+ return;
51433
+ }
51429
51434
  if (this.state.waitingForMove) {
51430
51435
  if (!this.env.model.getters.isGridSelectionActive()) {
51431
51436
  this._selectElement(index, false);
@@ -53127,24 +53132,24 @@ stores.inject(MyMetaStore, storeInstance);
53127
53132
  const MIN_SHEET_VIEW_WIDTH = 150;
53128
53133
  class SidePanelStore extends SpreadsheetStore {
53129
53134
  mutators = ["open", "toggle", "close", "changePanelSize", "resetPanelSize"];
53130
- initialPanelProps = {};
53135
+ currentPanelProps = {};
53131
53136
  componentTag = "";
53132
53137
  panelSize = DEFAULT_SIDE_PANEL_SIZE;
53133
53138
  get isOpen() {
53134
53139
  if (!this.componentTag) {
53135
53140
  return false;
53136
53141
  }
53137
- return this.computeState(this.componentTag, this.initialPanelProps).isOpen;
53142
+ return this.computeState(this.componentTag, this.currentPanelProps).isOpen;
53138
53143
  }
53139
53144
  get panelProps() {
53140
- const state = this.computeState(this.componentTag, this.initialPanelProps);
53145
+ const state = this.computeState(this.componentTag, this.currentPanelProps);
53141
53146
  if (state.isOpen) {
53142
53147
  return state.props ?? {};
53143
53148
  }
53144
53149
  return {};
53145
53150
  }
53146
53151
  get panelKey() {
53147
- const state = this.computeState(this.componentTag, this.initialPanelProps);
53152
+ const state = this.computeState(this.componentTag, this.currentPanelProps);
53148
53153
  if (state.isOpen) {
53149
53154
  return state.key;
53150
53155
  }
@@ -53156,10 +53161,10 @@ stores.inject(MyMetaStore, storeInstance);
53156
53161
  return;
53157
53162
  }
53158
53163
  if (this.isOpen && componentTag !== this.componentTag) {
53159
- this.initialPanelProps?.onCloseSidePanel?.();
53164
+ this.currentPanelProps?.onCloseSidePanel?.();
53160
53165
  }
53161
53166
  this.componentTag = componentTag;
53162
- this.initialPanelProps = state.props ?? {};
53167
+ this.currentPanelProps = state.props ?? {};
53163
53168
  }
53164
53169
  toggle(componentTag, panelProps) {
53165
53170
  if (this.isOpen && componentTag === this.componentTag) {
@@ -53170,8 +53175,8 @@ stores.inject(MyMetaStore, storeInstance);
53170
53175
  }
53171
53176
  }
53172
53177
  close() {
53173
- this.initialPanelProps.onCloseSidePanel?.();
53174
- this.initialPanelProps = {};
53178
+ this.currentPanelProps.onCloseSidePanel?.();
53179
+ this.currentPanelProps = {};
53175
53180
  this.componentTag = "";
53176
53181
  }
53177
53182
  changePanelSize(size, spreadsheetElWidth) {
@@ -53197,7 +53202,11 @@ stores.inject(MyMetaStore, storeInstance);
53197
53202
  };
53198
53203
  }
53199
53204
  else {
53200
- return customComputeState(this.getters, panelProps);
53205
+ const state = customComputeState(this.getters, panelProps);
53206
+ if (state.isOpen) {
53207
+ this.currentPanelProps = state.props ?? this.currentPanelProps;
53208
+ }
53209
+ return state;
53201
53210
  }
53202
53211
  }
53203
53212
  }
@@ -72679,7 +72688,7 @@ stores.inject(MyMetaStore, storeInstance);
72679
72688
  border-radius: 4px;
72680
72689
  font-weight: 500;
72681
72690
  font-size: 14px;
72682
- height: 32px;
72691
+ min-height: 32px;
72683
72692
  line-height: 16px;
72684
72693
  flex-grow: 1;
72685
72694
  background-color: ${BUTTON_BG};
@@ -77384,9 +77393,9 @@ stores.inject(MyMetaStore, storeInstance);
77384
77393
  exports.tokenize = tokenize;
77385
77394
 
77386
77395
 
77387
- __info__.version = "18.2.34";
77388
- __info__.date = "2025-11-12T14:15:32.431Z";
77389
- __info__.hash = "9ca0c4c";
77396
+ __info__.version = "18.2.35";
77397
+ __info__.date = "2025-11-24T07:40:00.240Z";
77398
+ __info__.hash = "2e9a842";
77390
77399
 
77391
77400
 
77392
77401
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);