@odoo/o-spreadsheet 16.0.52 → 16.0.53

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.
@@ -33954,11 +33954,7 @@ class FindAndReplacePlugin extends UIPlugin {
33954
33954
  }
33955
33955
  if (cell &&
33956
33956
  this.currentSearchRegex &&
33957
- this.currentSearchRegex.test(this.searchOptions.searchFormulas
33958
- ? cell.isFormula()
33959
- ? cell.content
33960
- : String(cell.evaluated.value)
33961
- : String(cell.evaluated.value))) {
33957
+ this.currentSearchRegex.test(this.searchOptions.searchFormulas ? cell.content : String(cell.evaluated.value))) {
33962
33958
  const position = this.getters.getCellPosition(cell.id);
33963
33959
  const match = { col: position.col, row: position.row, selected: false };
33964
33960
  matches.push(match);
@@ -36596,6 +36592,7 @@ class Session extends EventBus {
36596
36592
  case "REMOTE_REVISION":
36597
36593
  case "REVISION_REDONE":
36598
36594
  case "REVISION_UNDONE":
36595
+ case "SNAPSHOT_CREATED":
36599
36596
  return this.processedRevisions.has(message.nextRevisionId);
36600
36597
  default:
36601
36598
  return false;
@@ -43106,6 +43103,9 @@ class Model extends EventBus {
43106
43103
  this.selection.observe(this, {
43107
43104
  handleEvent: () => this.trigger("update"),
43108
43105
  });
43106
+ // move in "Loading" mode where we ignore redundant calls to finalize triggered by the
43107
+ // replay of stateUpdateMessages in the session
43108
+ this.isLoading = true;
43109
43109
  // This should be done after construction of LocalHistory due to order of
43110
43110
  // events
43111
43111
  this.setupSessionEvents();
@@ -43118,6 +43118,9 @@ class Model extends EventBus {
43118
43118
  // mark all models as "raw", so they will not be turned into reactive objects
43119
43119
  // by owl, since we do not rely on reactivity
43120
43120
  owl.markRaw(this);
43121
+ this.isLoading = false;
43122
+ // ensure propre recomputation of plugin states after the message replays
43123
+ this.finalize();
43121
43124
  }
43122
43125
  joinSession() {
43123
43126
  this.session.join(this.config.client);
@@ -43227,6 +43230,9 @@ class Model extends EventBus {
43227
43230
  return DispatchResult.Success;
43228
43231
  }
43229
43232
  finalize() {
43233
+ if (this.isLoading) {
43234
+ return;
43235
+ }
43230
43236
  this.status = 3 /* Status.Finalizing */;
43231
43237
  for (const h of this.handlers) {
43232
43238
  h.finalize();
@@ -43443,6 +43449,6 @@ exports.setTranslationMethod = setTranslationMethod;
43443
43449
  exports.tokenize = tokenize;
43444
43450
 
43445
43451
 
43446
- __info__.version = '16.0.52';
43447
- __info__.date = '2024-09-05T09:28:56.522Z';
43448
- __info__.hash = '2d666d7';
43452
+ __info__.version = '16.0.53';
43453
+ __info__.date = '2024-10-14T07:50:02.583Z';
43454
+ __info__.hash = 'a9ad6d8';
@@ -1078,6 +1078,7 @@ declare class Model extends EventBus<any> implements CommandDispatcher {
1078
1078
  * can just iterate on it
1079
1079
  */
1080
1080
  private renderers;
1081
+ private isLoading;
1081
1082
  /**
1082
1083
  * Internal status of the model. Important for command handling coordination
1083
1084
  */
@@ -33950,11 +33950,7 @@ class FindAndReplacePlugin extends UIPlugin {
33950
33950
  }
33951
33951
  if (cell &&
33952
33952
  this.currentSearchRegex &&
33953
- this.currentSearchRegex.test(this.searchOptions.searchFormulas
33954
- ? cell.isFormula()
33955
- ? cell.content
33956
- : String(cell.evaluated.value)
33957
- : String(cell.evaluated.value))) {
33953
+ this.currentSearchRegex.test(this.searchOptions.searchFormulas ? cell.content : String(cell.evaluated.value))) {
33958
33954
  const position = this.getters.getCellPosition(cell.id);
33959
33955
  const match = { col: position.col, row: position.row, selected: false };
33960
33956
  matches.push(match);
@@ -36592,6 +36588,7 @@ class Session extends EventBus {
36592
36588
  case "REMOTE_REVISION":
36593
36589
  case "REVISION_REDONE":
36594
36590
  case "REVISION_UNDONE":
36591
+ case "SNAPSHOT_CREATED":
36595
36592
  return this.processedRevisions.has(message.nextRevisionId);
36596
36593
  default:
36597
36594
  return false;
@@ -43102,6 +43099,9 @@ class Model extends EventBus {
43102
43099
  this.selection.observe(this, {
43103
43100
  handleEvent: () => this.trigger("update"),
43104
43101
  });
43102
+ // move in "Loading" mode where we ignore redundant calls to finalize triggered by the
43103
+ // replay of stateUpdateMessages in the session
43104
+ this.isLoading = true;
43105
43105
  // This should be done after construction of LocalHistory due to order of
43106
43106
  // events
43107
43107
  this.setupSessionEvents();
@@ -43114,6 +43114,9 @@ class Model extends EventBus {
43114
43114
  // mark all models as "raw", so they will not be turned into reactive objects
43115
43115
  // by owl, since we do not rely on reactivity
43116
43116
  markRaw(this);
43117
+ this.isLoading = false;
43118
+ // ensure propre recomputation of plugin states after the message replays
43119
+ this.finalize();
43117
43120
  }
43118
43121
  joinSession() {
43119
43122
  this.session.join(this.config.client);
@@ -43223,6 +43226,9 @@ class Model extends EventBus {
43223
43226
  return DispatchResult.Success;
43224
43227
  }
43225
43228
  finalize() {
43229
+ if (this.isLoading) {
43230
+ return;
43231
+ }
43226
43232
  this.status = 3 /* Status.Finalizing */;
43227
43233
  for (const h of this.handlers) {
43228
43234
  h.finalize();
@@ -43411,6 +43417,6 @@ function addFunction(functionName, functionDescription) {
43411
43417
  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 };
43412
43418
 
43413
43419
 
43414
- __info__.version = '16.0.52';
43415
- __info__.date = '2024-09-05T09:28:56.522Z';
43416
- __info__.hash = '2d666d7';
43420
+ __info__.version = '16.0.53';
43421
+ __info__.date = '2024-10-14T07:50:02.583Z';
43422
+ __info__.hash = 'a9ad6d8';
@@ -33951,11 +33951,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
33951
33951
  }
33952
33952
  if (cell &&
33953
33953
  this.currentSearchRegex &&
33954
- this.currentSearchRegex.test(this.searchOptions.searchFormulas
33955
- ? cell.isFormula()
33956
- ? cell.content
33957
- : String(cell.evaluated.value)
33958
- : String(cell.evaluated.value))) {
33954
+ this.currentSearchRegex.test(this.searchOptions.searchFormulas ? cell.content : String(cell.evaluated.value))) {
33959
33955
  const position = this.getters.getCellPosition(cell.id);
33960
33956
  const match = { col: position.col, row: position.row, selected: false };
33961
33957
  matches.push(match);
@@ -36593,6 +36589,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
36593
36589
  case "REMOTE_REVISION":
36594
36590
  case "REVISION_REDONE":
36595
36591
  case "REVISION_UNDONE":
36592
+ case "SNAPSHOT_CREATED":
36596
36593
  return this.processedRevisions.has(message.nextRevisionId);
36597
36594
  default:
36598
36595
  return false;
@@ -43103,6 +43100,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
43103
43100
  this.selection.observe(this, {
43104
43101
  handleEvent: () => this.trigger("update"),
43105
43102
  });
43103
+ // move in "Loading" mode where we ignore redundant calls to finalize triggered by the
43104
+ // replay of stateUpdateMessages in the session
43105
+ this.isLoading = true;
43106
43106
  // This should be done after construction of LocalHistory due to order of
43107
43107
  // events
43108
43108
  this.setupSessionEvents();
@@ -43115,6 +43115,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
43115
43115
  // mark all models as "raw", so they will not be turned into reactive objects
43116
43116
  // by owl, since we do not rely on reactivity
43117
43117
  owl.markRaw(this);
43118
+ this.isLoading = false;
43119
+ // ensure propre recomputation of plugin states after the message replays
43120
+ this.finalize();
43118
43121
  }
43119
43122
  joinSession() {
43120
43123
  this.session.join(this.config.client);
@@ -43224,6 +43227,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
43224
43227
  return DispatchResult.Success;
43225
43228
  }
43226
43229
  finalize() {
43230
+ if (this.isLoading) {
43231
+ return;
43232
+ }
43227
43233
  this.status = 3 /* Status.Finalizing */;
43228
43234
  for (const h of this.handlers) {
43229
43235
  h.finalize();
@@ -43442,9 +43448,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
43442
43448
  Object.defineProperty(exports, '__esModule', { value: true });
43443
43449
 
43444
43450
 
43445
- __info__.version = '16.0.52';
43446
- __info__.date = '2024-09-05T09:28:56.522Z';
43447
- __info__.hash = '2d666d7';
43451
+ __info__.version = '16.0.53';
43452
+ __info__.date = '2024-10-14T07:50:02.583Z';
43453
+ __info__.hash = 'a9ad6d8';
43448
43454
 
43449
43455
 
43450
43456
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);