@odoo/o-spreadsheet 16.0.51 → 16.0.52

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.
@@ -35112,6 +35112,8 @@ class GridSelectionPlugin extends UIPlugin {
35112
35112
  this.selectedFigureId = null;
35113
35113
  break;
35114
35114
  }
35115
+ }
35116
+ finalize() {
35115
35117
  /** Any change to the selection has to be reflected in the selection processor. */
35116
35118
  this.selection.resetDefaultAnchor(this, deepCopy(this.gridSelection.anchor));
35117
35119
  }
@@ -37111,7 +37113,6 @@ class SheetViewPlugin extends UIPlugin {
37111
37113
  }
37112
37114
  handle(cmd) {
37113
37115
  var _a;
37114
- this.cleanViewports();
37115
37116
  switch (cmd.type) {
37116
37117
  case "START":
37117
37118
  this.selection.observe(this, {
@@ -37156,6 +37157,9 @@ class SheetViewPlugin extends UIPlugin {
37156
37157
  this.sheetsWithDirtyViewports.add(cmd.sheetId);
37157
37158
  }
37158
37159
  break;
37160
+ case "DELETE_SHEET":
37161
+ this.cleanViewports();
37162
+ break;
37159
37163
  case "ACTIVATE_SHEET":
37160
37164
  this.setViewports();
37161
37165
  this.refreshViewport(cmd.sheetIdTo);
@@ -37472,6 +37476,7 @@ class SheetViewPlugin extends UIPlugin {
37472
37476
  }
37473
37477
  }
37474
37478
  resetSheetViews() {
37479
+ this.cleanViewports();
37475
37480
  for (let sheetId of Object.keys(this.viewports)) {
37476
37481
  const position = this.getters.getSheetPosition(sheetId);
37477
37482
  this.resetViewports(sheetId);
@@ -41857,30 +41862,27 @@ function addFormula(cell) {
41857
41862
  const isExported = tokens
41858
41863
  .filter((tk) => tk.type === "FUNCTION")
41859
41864
  .every((tk) => functions[tk.value.toUpperCase()].isExported);
41865
+ const type = getCellType(cell.value);
41860
41866
  if (isExported) {
41861
- let cycle = escapeXml ``;
41862
41867
  const XlsxFormula = adaptFormulaToExcel(formula);
41863
- // hack for cycles : if we don't set a value (be it 0 or #VALUE!), it will appear as invisible on excel,
41864
- // Making it very hard for the client to find where the recursion is.
41865
- if (cell.value === CellErrorType.CircularDependency) {
41866
- attrs.push(["t", "str"]);
41867
- cycle = escapeXml /*xml*/ `<v>${cell.value}</v>`;
41868
- }
41869
- node = escapeXml /*xml*/ `<f> ${XlsxFormula} </f> ${cycle}`;
41868
+ node = escapeXml /*xml*/ `
41869
+ <f>
41870
+ ${XlsxFormula}
41871
+ </f>
41872
+ ${escapeXml /*xml*/ `<v>${cell.value}</v>`}
41873
+ `;
41874
+ attrs.push(["t", type]);
41870
41875
  return { attrs, node };
41871
41876
  }
41872
41877
  else {
41873
- // Shouldn't we always output the value then ?
41874
- const value = cell.value;
41875
41878
  // If the cell contains a non-exported formula and that is evaluates to
41876
41879
  // nothing* ,we don't export it.
41877
41880
  // * non-falsy value are relevant and so are 0 and FALSE, which only leaves
41878
41881
  // the empty string.
41879
- if (value === "")
41882
+ if (cell.value === "")
41880
41883
  return undefined;
41881
- const type = getCellType(value);
41882
41884
  attrs.push(["t", type]);
41883
- node = escapeXml /*xml*/ `<v>${value}</v>`;
41885
+ node = escapeXml /*xml*/ `<v>${cell.value}</v>`;
41884
41886
  return { attrs, node };
41885
41887
  }
41886
41888
  }
@@ -43441,6 +43443,6 @@ exports.setTranslationMethod = setTranslationMethod;
43441
43443
  exports.tokenize = tokenize;
43442
43444
 
43443
43445
 
43444
- __info__.version = '16.0.51';
43445
- __info__.date = '2024-08-19T08:08:50.605Z';
43446
- __info__.hash = '2b60022';
43446
+ __info__.version = '16.0.52';
43447
+ __info__.date = '2024-09-05T09:28:56.522Z';
43448
+ __info__.hash = '2d666d7';
@@ -4105,6 +4105,7 @@ declare class GridSelectionPlugin extends UIPlugin {
4105
4105
  allowDispatch(cmd: Command): CommandResult;
4106
4106
  private handleEvent;
4107
4107
  handle(cmd: Command): void;
4108
+ finalize(): void;
4108
4109
  isGridSelectionActive(): boolean;
4109
4110
  getActiveSheet(): Readonly<Sheet>;
4110
4111
  getActiveSheetId(): UID;
@@ -35108,6 +35108,8 @@ class GridSelectionPlugin extends UIPlugin {
35108
35108
  this.selectedFigureId = null;
35109
35109
  break;
35110
35110
  }
35111
+ }
35112
+ finalize() {
35111
35113
  /** Any change to the selection has to be reflected in the selection processor. */
35112
35114
  this.selection.resetDefaultAnchor(this, deepCopy(this.gridSelection.anchor));
35113
35115
  }
@@ -37107,7 +37109,6 @@ class SheetViewPlugin extends UIPlugin {
37107
37109
  }
37108
37110
  handle(cmd) {
37109
37111
  var _a;
37110
- this.cleanViewports();
37111
37112
  switch (cmd.type) {
37112
37113
  case "START":
37113
37114
  this.selection.observe(this, {
@@ -37152,6 +37153,9 @@ class SheetViewPlugin extends UIPlugin {
37152
37153
  this.sheetsWithDirtyViewports.add(cmd.sheetId);
37153
37154
  }
37154
37155
  break;
37156
+ case "DELETE_SHEET":
37157
+ this.cleanViewports();
37158
+ break;
37155
37159
  case "ACTIVATE_SHEET":
37156
37160
  this.setViewports();
37157
37161
  this.refreshViewport(cmd.sheetIdTo);
@@ -37468,6 +37472,7 @@ class SheetViewPlugin extends UIPlugin {
37468
37472
  }
37469
37473
  }
37470
37474
  resetSheetViews() {
37475
+ this.cleanViewports();
37471
37476
  for (let sheetId of Object.keys(this.viewports)) {
37472
37477
  const position = this.getters.getSheetPosition(sheetId);
37473
37478
  this.resetViewports(sheetId);
@@ -41853,30 +41858,27 @@ function addFormula(cell) {
41853
41858
  const isExported = tokens
41854
41859
  .filter((tk) => tk.type === "FUNCTION")
41855
41860
  .every((tk) => functions[tk.value.toUpperCase()].isExported);
41861
+ const type = getCellType(cell.value);
41856
41862
  if (isExported) {
41857
- let cycle = escapeXml ``;
41858
41863
  const XlsxFormula = adaptFormulaToExcel(formula);
41859
- // hack for cycles : if we don't set a value (be it 0 or #VALUE!), it will appear as invisible on excel,
41860
- // Making it very hard for the client to find where the recursion is.
41861
- if (cell.value === CellErrorType.CircularDependency) {
41862
- attrs.push(["t", "str"]);
41863
- cycle = escapeXml /*xml*/ `<v>${cell.value}</v>`;
41864
- }
41865
- node = escapeXml /*xml*/ `<f> ${XlsxFormula} </f> ${cycle}`;
41864
+ node = escapeXml /*xml*/ `
41865
+ <f>
41866
+ ${XlsxFormula}
41867
+ </f>
41868
+ ${escapeXml /*xml*/ `<v>${cell.value}</v>`}
41869
+ `;
41870
+ attrs.push(["t", type]);
41866
41871
  return { attrs, node };
41867
41872
  }
41868
41873
  else {
41869
- // Shouldn't we always output the value then ?
41870
- const value = cell.value;
41871
41874
  // If the cell contains a non-exported formula and that is evaluates to
41872
41875
  // nothing* ,we don't export it.
41873
41876
  // * non-falsy value are relevant and so are 0 and FALSE, which only leaves
41874
41877
  // the empty string.
41875
- if (value === "")
41878
+ if (cell.value === "")
41876
41879
  return undefined;
41877
- const type = getCellType(value);
41878
41880
  attrs.push(["t", type]);
41879
- node = escapeXml /*xml*/ `<v>${value}</v>`;
41881
+ node = escapeXml /*xml*/ `<v>${cell.value}</v>`;
41880
41882
  return { attrs, node };
41881
41883
  }
41882
41884
  }
@@ -43409,6 +43411,6 @@ function addFunction(functionName, functionDescription) {
43409
43411
  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 };
43410
43412
 
43411
43413
 
43412
- __info__.version = '16.0.51';
43413
- __info__.date = '2024-08-19T08:08:50.605Z';
43414
- __info__.hash = '2b60022';
43414
+ __info__.version = '16.0.52';
43415
+ __info__.date = '2024-09-05T09:28:56.522Z';
43416
+ __info__.hash = '2d666d7';
@@ -35109,6 +35109,8 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
35109
35109
  this.selectedFigureId = null;
35110
35110
  break;
35111
35111
  }
35112
+ }
35113
+ finalize() {
35112
35114
  /** Any change to the selection has to be reflected in the selection processor. */
35113
35115
  this.selection.resetDefaultAnchor(this, deepCopy(this.gridSelection.anchor));
35114
35116
  }
@@ -37108,7 +37110,6 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
37108
37110
  }
37109
37111
  handle(cmd) {
37110
37112
  var _a;
37111
- this.cleanViewports();
37112
37113
  switch (cmd.type) {
37113
37114
  case "START":
37114
37115
  this.selection.observe(this, {
@@ -37153,6 +37154,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
37153
37154
  this.sheetsWithDirtyViewports.add(cmd.sheetId);
37154
37155
  }
37155
37156
  break;
37157
+ case "DELETE_SHEET":
37158
+ this.cleanViewports();
37159
+ break;
37156
37160
  case "ACTIVATE_SHEET":
37157
37161
  this.setViewports();
37158
37162
  this.refreshViewport(cmd.sheetIdTo);
@@ -37469,6 +37473,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
37469
37473
  }
37470
37474
  }
37471
37475
  resetSheetViews() {
37476
+ this.cleanViewports();
37472
37477
  for (let sheetId of Object.keys(this.viewports)) {
37473
37478
  const position = this.getters.getSheetPosition(sheetId);
37474
37479
  this.resetViewports(sheetId);
@@ -41854,30 +41859,27 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
41854
41859
  const isExported = tokens
41855
41860
  .filter((tk) => tk.type === "FUNCTION")
41856
41861
  .every((tk) => functions[tk.value.toUpperCase()].isExported);
41862
+ const type = getCellType(cell.value);
41857
41863
  if (isExported) {
41858
- let cycle = escapeXml ``;
41859
41864
  const XlsxFormula = adaptFormulaToExcel(formula);
41860
- // hack for cycles : if we don't set a value (be it 0 or #VALUE!), it will appear as invisible on excel,
41861
- // Making it very hard for the client to find where the recursion is.
41862
- if (cell.value === CellErrorType.CircularDependency) {
41863
- attrs.push(["t", "str"]);
41864
- cycle = escapeXml /*xml*/ `<v>${cell.value}</v>`;
41865
- }
41866
- node = escapeXml /*xml*/ `<f> ${XlsxFormula} </f> ${cycle}`;
41865
+ node = escapeXml /*xml*/ `
41866
+ <f>
41867
+ ${XlsxFormula}
41868
+ </f>
41869
+ ${escapeXml /*xml*/ `<v>${cell.value}</v>`}
41870
+ `;
41871
+ attrs.push(["t", type]);
41867
41872
  return { attrs, node };
41868
41873
  }
41869
41874
  else {
41870
- // Shouldn't we always output the value then ?
41871
- const value = cell.value;
41872
41875
  // If the cell contains a non-exported formula and that is evaluates to
41873
41876
  // nothing* ,we don't export it.
41874
41877
  // * non-falsy value are relevant and so are 0 and FALSE, which only leaves
41875
41878
  // the empty string.
41876
- if (value === "")
41879
+ if (cell.value === "")
41877
41880
  return undefined;
41878
- const type = getCellType(value);
41879
41881
  attrs.push(["t", type]);
41880
- node = escapeXml /*xml*/ `<v>${value}</v>`;
41882
+ node = escapeXml /*xml*/ `<v>${cell.value}</v>`;
41881
41883
  return { attrs, node };
41882
41884
  }
41883
41885
  }
@@ -43440,9 +43442,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
43440
43442
  Object.defineProperty(exports, '__esModule', { value: true });
43441
43443
 
43442
43444
 
43443
- __info__.version = '16.0.51';
43444
- __info__.date = '2024-08-19T08:08:50.605Z';
43445
- __info__.hash = '2b60022';
43445
+ __info__.version = '16.0.52';
43446
+ __info__.date = '2024-09-05T09:28:56.522Z';
43447
+ __info__.hash = '2d666d7';
43446
43448
 
43447
43449
 
43448
43450
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);