@odoo/o-spreadsheet 16.0.64 → 16.0.65

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.
@@ -19591,8 +19591,8 @@ class EditionPlugin extends UIPlugin {
19591
19591
  break;
19592
19592
  case "STOP_EDITION":
19593
19593
  if (cmd.cancel) {
19594
- this.cancelEditionAndActivateSheet();
19595
19594
  this.resetContent();
19595
+ this.cancelEditionAndActivateSheet();
19596
19596
  }
19597
19597
  else {
19598
19598
  this.stopEdition();
@@ -19607,8 +19607,8 @@ class EditionPlugin extends UIPlugin {
19607
19607
  this.replaceSelection(cmd.text);
19608
19608
  break;
19609
19609
  case "SELECT_FIGURE":
19610
- this.cancelEditionAndActivateSheet();
19611
19610
  this.resetContent();
19611
+ this.cancelEditionAndActivateSheet();
19612
19612
  break;
19613
19613
  case "ADD_COLUMNS_ROWS":
19614
19614
  this.onAddElements(cmd);
@@ -19667,8 +19667,8 @@ class EditionPlugin extends UIPlugin {
19667
19667
  const sheetIdExists = !!this.getters.tryGetSheet(this.sheetId);
19668
19668
  if (!sheetIdExists && this.mode !== "inactive") {
19669
19669
  this.sheetId = this.getters.getActiveSheetId();
19670
- this.cancelEditionAndActivateSheet();
19671
19670
  this.resetContent();
19671
+ this.cancelEditionAndActivateSheet();
19672
19672
  this.ui.notifyUI({
19673
19673
  type: "ERROR",
19674
19674
  text: CELL_DELETED_MESSAGE,
@@ -32449,12 +32449,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
32449
32449
  for (let c = 0; c < width; c++) {
32450
32450
  const origin = rowCells[c];
32451
32451
  const position = { col: col + c, row: row + r, sheetId: sheetId };
32452
- // TODO: refactor this part. the "Paste merge" action is also executed with
32453
- // MOVE_RANGES in pasteFromCut. Adding a condition on the operation type here
32454
- // is not appropriate
32455
- if (this.operation !== "CUT") {
32456
- this.pasteMergeIfExist(origin.position, position);
32457
- }
32452
+ this.pasteMergeIfExist(origin.position, position, this.operation);
32458
32453
  this.pasteCell(origin, position, this.operation, clipboardOptions);
32459
32454
  if (shouldPasteCF) {
32460
32455
  this.dispatch("PASTE_CONDITIONAL_FORMAT", {
@@ -32533,7 +32528,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
32533
32528
  * If the origin position given is the top left of a merge, merge the target
32534
32529
  * position.
32535
32530
  */
32536
- pasteMergeIfExist(origin, target) {
32531
+ pasteMergeIfExist(origin, target, operation) {
32537
32532
  let { sheetId, col, row } = origin;
32538
32533
  const { col: mainCellColOrigin, row: mainCellRowOrigin } = this.getters.getMainCellPosition(sheetId, col, row);
32539
32534
  if (mainCellColOrigin === col && mainCellRowOrigin === row) {
@@ -32541,6 +32536,9 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
32541
32536
  if (!merge) {
32542
32537
  return;
32543
32538
  }
32539
+ if (operation === "CUT") {
32540
+ this.dispatch("REMOVE_MERGE", { sheetId, target: [merge] });
32541
+ }
32544
32542
  ({ sheetId, col, row } = target);
32545
32543
  this.dispatch("ADD_MERGE", {
32546
32544
  sheetId,
@@ -43762,6 +43760,6 @@ exports.setTranslationMethod = setTranslationMethod;
43762
43760
  exports.tokenize = tokenize;
43763
43761
 
43764
43762
 
43765
- __info__.version = '16.0.64';
43766
- __info__.date = '2025-03-07T10:29:50.957Z';
43767
- __info__.hash = '20def15';
43763
+ __info__.version = '16.0.65';
43764
+ __info__.date = '2025-03-19T08:14:11.320Z';
43765
+ __info__.hash = '4e495e9';
@@ -19587,8 +19587,8 @@ class EditionPlugin extends UIPlugin {
19587
19587
  break;
19588
19588
  case "STOP_EDITION":
19589
19589
  if (cmd.cancel) {
19590
- this.cancelEditionAndActivateSheet();
19591
19590
  this.resetContent();
19591
+ this.cancelEditionAndActivateSheet();
19592
19592
  }
19593
19593
  else {
19594
19594
  this.stopEdition();
@@ -19603,8 +19603,8 @@ class EditionPlugin extends UIPlugin {
19603
19603
  this.replaceSelection(cmd.text);
19604
19604
  break;
19605
19605
  case "SELECT_FIGURE":
19606
- this.cancelEditionAndActivateSheet();
19607
19606
  this.resetContent();
19607
+ this.cancelEditionAndActivateSheet();
19608
19608
  break;
19609
19609
  case "ADD_COLUMNS_ROWS":
19610
19610
  this.onAddElements(cmd);
@@ -19663,8 +19663,8 @@ class EditionPlugin extends UIPlugin {
19663
19663
  const sheetIdExists = !!this.getters.tryGetSheet(this.sheetId);
19664
19664
  if (!sheetIdExists && this.mode !== "inactive") {
19665
19665
  this.sheetId = this.getters.getActiveSheetId();
19666
- this.cancelEditionAndActivateSheet();
19667
19666
  this.resetContent();
19667
+ this.cancelEditionAndActivateSheet();
19668
19668
  this.ui.notifyUI({
19669
19669
  type: "ERROR",
19670
19670
  text: CELL_DELETED_MESSAGE,
@@ -32445,12 +32445,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
32445
32445
  for (let c = 0; c < width; c++) {
32446
32446
  const origin = rowCells[c];
32447
32447
  const position = { col: col + c, row: row + r, sheetId: sheetId };
32448
- // TODO: refactor this part. the "Paste merge" action is also executed with
32449
- // MOVE_RANGES in pasteFromCut. Adding a condition on the operation type here
32450
- // is not appropriate
32451
- if (this.operation !== "CUT") {
32452
- this.pasteMergeIfExist(origin.position, position);
32453
- }
32448
+ this.pasteMergeIfExist(origin.position, position, this.operation);
32454
32449
  this.pasteCell(origin, position, this.operation, clipboardOptions);
32455
32450
  if (shouldPasteCF) {
32456
32451
  this.dispatch("PASTE_CONDITIONAL_FORMAT", {
@@ -32529,7 +32524,7 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
32529
32524
  * If the origin position given is the top left of a merge, merge the target
32530
32525
  * position.
32531
32526
  */
32532
- pasteMergeIfExist(origin, target) {
32527
+ pasteMergeIfExist(origin, target, operation) {
32533
32528
  let { sheetId, col, row } = origin;
32534
32529
  const { col: mainCellColOrigin, row: mainCellRowOrigin } = this.getters.getMainCellPosition(sheetId, col, row);
32535
32530
  if (mainCellColOrigin === col && mainCellRowOrigin === row) {
@@ -32537,6 +32532,9 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
32537
32532
  if (!merge) {
32538
32533
  return;
32539
32534
  }
32535
+ if (operation === "CUT") {
32536
+ this.dispatch("REMOVE_MERGE", { sheetId, target: [merge] });
32537
+ }
32540
32538
  ({ sheetId, col, row } = target);
32541
32539
  this.dispatch("ADD_MERGE", {
32542
32540
  sheetId,
@@ -43730,6 +43728,6 @@ function addFunction(functionName, functionDescription) {
43730
43728
  export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, cellTypes, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
43731
43729
 
43732
43730
 
43733
- __info__.version = '16.0.64';
43734
- __info__.date = '2025-03-07T10:29:50.957Z';
43735
- __info__.hash = '20def15';
43731
+ __info__.version = '16.0.65';
43732
+ __info__.date = '2025-03-19T08:14:11.320Z';
43733
+ __info__.hash = '4e495e9';
@@ -19588,8 +19588,8 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
19588
19588
  break;
19589
19589
  case "STOP_EDITION":
19590
19590
  if (cmd.cancel) {
19591
- this.cancelEditionAndActivateSheet();
19592
19591
  this.resetContent();
19592
+ this.cancelEditionAndActivateSheet();
19593
19593
  }
19594
19594
  else {
19595
19595
  this.stopEdition();
@@ -19604,8 +19604,8 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
19604
19604
  this.replaceSelection(cmd.text);
19605
19605
  break;
19606
19606
  case "SELECT_FIGURE":
19607
- this.cancelEditionAndActivateSheet();
19608
19607
  this.resetContent();
19608
+ this.cancelEditionAndActivateSheet();
19609
19609
  break;
19610
19610
  case "ADD_COLUMNS_ROWS":
19611
19611
  this.onAddElements(cmd);
@@ -19664,8 +19664,8 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
19664
19664
  const sheetIdExists = !!this.getters.tryGetSheet(this.sheetId);
19665
19665
  if (!sheetIdExists && this.mode !== "inactive") {
19666
19666
  this.sheetId = this.getters.getActiveSheetId();
19667
- this.cancelEditionAndActivateSheet();
19668
19667
  this.resetContent();
19668
+ this.cancelEditionAndActivateSheet();
19669
19669
  this.ui.notifyUI({
19670
19670
  type: "ERROR",
19671
19671
  text: CELL_DELETED_MESSAGE,
@@ -32446,12 +32446,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
32446
32446
  for (let c = 0; c < width; c++) {
32447
32447
  const origin = rowCells[c];
32448
32448
  const position = { col: col + c, row: row + r, sheetId: sheetId };
32449
- // TODO: refactor this part. the "Paste merge" action is also executed with
32450
- // MOVE_RANGES in pasteFromCut. Adding a condition on the operation type here
32451
- // is not appropriate
32452
- if (this.operation !== "CUT") {
32453
- this.pasteMergeIfExist(origin.position, position);
32454
- }
32449
+ this.pasteMergeIfExist(origin.position, position, this.operation);
32455
32450
  this.pasteCell(origin, position, this.operation, clipboardOptions);
32456
32451
  if (shouldPasteCF) {
32457
32452
  this.dispatch("PASTE_CONDITIONAL_FORMAT", {
@@ -32530,7 +32525,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
32530
32525
  * If the origin position given is the top left of a merge, merge the target
32531
32526
  * position.
32532
32527
  */
32533
- pasteMergeIfExist(origin, target) {
32528
+ pasteMergeIfExist(origin, target, operation) {
32534
32529
  let { sheetId, col, row } = origin;
32535
32530
  const { col: mainCellColOrigin, row: mainCellRowOrigin } = this.getters.getMainCellPosition(sheetId, col, row);
32536
32531
  if (mainCellColOrigin === col && mainCellRowOrigin === row) {
@@ -32538,6 +32533,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
32538
32533
  if (!merge) {
32539
32534
  return;
32540
32535
  }
32536
+ if (operation === "CUT") {
32537
+ this.dispatch("REMOVE_MERGE", { sheetId, target: [merge] });
32538
+ }
32541
32539
  ({ sheetId, col, row } = target);
32542
32540
  this.dispatch("ADD_MERGE", {
32543
32541
  sheetId,
@@ -43761,9 +43759,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
43761
43759
  Object.defineProperty(exports, '__esModule', { value: true });
43762
43760
 
43763
43761
 
43764
- __info__.version = '16.0.64';
43765
- __info__.date = '2025-03-07T10:29:50.957Z';
43766
- __info__.hash = '20def15';
43762
+ __info__.version = '16.0.65';
43763
+ __info__.date = '2025-03-19T08:14:11.320Z';
43764
+ __info__.hash = '4e495e9';
43767
43765
 
43768
43766
 
43769
43767
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);