@odoo/o-spreadsheet 17.1.28 → 17.1.30

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 17.1.28
6
- * @date 2024-08-19T08:08:59.669Z
7
- * @hash 9674f1b
5
+ * @version 17.1.30
6
+ * @date 2024-09-05T09:29:03.585Z
7
+ * @hash 8588bf4
8
8
  */
9
9
 
10
10
  'use strict';
@@ -31885,6 +31885,18 @@ function convertOperator(operator) {
31885
31885
  // -------------------------------------
31886
31886
  // WORKSHEET HELPERS
31887
31887
  // -------------------------------------
31888
+ function getCellType(value) {
31889
+ switch (typeof value) {
31890
+ case "boolean":
31891
+ return "b";
31892
+ case "string":
31893
+ return "str";
31894
+ case "number":
31895
+ return "n";
31896
+ default:
31897
+ return undefined;
31898
+ }
31899
+ }
31888
31900
  function convertHeightToExcel(height) {
31889
31901
  return Math.round(HEIGHT_FACTOR * height * 100) / 100;
31890
31902
  }
@@ -38002,7 +38014,10 @@ class HeaderSizePlugin extends CorePlugin {
38002
38014
  handle(cmd) {
38003
38015
  switch (cmd.type) {
38004
38016
  case "CREATE_SHEET": {
38005
- this.history.update("sizes", cmd.sheetId, { COL: [], ROW: [] });
38017
+ this.history.update("sizes", cmd.sheetId, {
38018
+ COL: Array(this.getters.getNumberCols(cmd.sheetId)).fill(undefined),
38019
+ ROW: Array(this.getters.getNumberRows(cmd.sheetId)).fill(undefined),
38020
+ });
38006
38021
  break;
38007
38022
  }
38008
38023
  case "DUPLICATE_SHEET":
@@ -44937,9 +44952,9 @@ class Session extends EventBus {
44937
44952
  /**
44938
44953
  * Notify the server that the user client left the collaborative session
44939
44954
  */
44940
- leave(data) {
44955
+ async leave(data) {
44941
44956
  if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
44942
- this.snapshot(data());
44957
+ await this.snapshot(data());
44943
44958
  }
44944
44959
  delete this.clients[this.clientId];
44945
44960
  this.transportService.leave(this.clientId);
@@ -44952,12 +44967,12 @@ class Session extends EventBus {
44952
44967
  /**
44953
44968
  * Send a snapshot of the spreadsheet to the collaboration server
44954
44969
  */
44955
- snapshot(data) {
44970
+ async snapshot(data) {
44956
44971
  if (this.pendingMessages.length !== 0) {
44957
44972
  return;
44958
44973
  }
44959
44974
  const snapshotId = this.uuidGenerator.uuidv4();
44960
- this.transportService.sendMessage({
44975
+ await this.transportService.sendMessage({
44961
44976
  type: "SNAPSHOT",
44962
44977
  nextRevisionId: snapshotId,
44963
44978
  serverRevisionId: this.serverRevisionId,
@@ -45665,9 +45680,11 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
45665
45680
  const targetCell = this.getters.getEvaluatedCell(target);
45666
45681
  const originFormat = origin.cell?.format ?? origin.evaluatedCell.format;
45667
45682
  if (clipboardOption?.pasteOption === "asValue") {
45668
- const locale = this.getters.getLocale();
45669
- const content = formatValue(origin.evaluatedCell.value, { locale });
45670
- this.dispatch("UPDATE_CELL", { ...target, content, format: originFormat });
45683
+ this.dispatch("UPDATE_CELL", {
45684
+ ...target,
45685
+ content: origin.evaluatedCell.value.toString(),
45686
+ format: originFormat,
45687
+ });
45671
45688
  return;
45672
45689
  }
45673
45690
  const targetBorders = this.getters.getCellBorder(target);
@@ -50323,6 +50340,8 @@ class GridSelectionPlugin extends UIPlugin {
50323
50340
  this.selectedFigureId = null;
50324
50341
  break;
50325
50342
  }
50343
+ }
50344
+ finalize() {
50326
50345
  /** Any change to the selection has to be reflected in the selection processor. */
50327
50346
  this.selection.resetDefaultAnchor(this, deepCopy(this.gridSelection.anchor));
50328
50347
  }
@@ -51145,7 +51164,6 @@ class SheetViewPlugin extends UIPlugin {
51145
51164
  }
51146
51165
  }
51147
51166
  handle(cmd) {
51148
- this.cleanViewports();
51149
51167
  // changing the evaluation can hide/show rows because of data filters
51150
51168
  if (invalidateEvaluationCommands.has(cmd.type)) {
51151
51169
  for (const sheetId of this.getters.getSheetIds()) {
@@ -51161,6 +51179,7 @@ class SheetViewPlugin extends UIPlugin {
51161
51179
  break;
51162
51180
  case "UNDO":
51163
51181
  case "REDO":
51182
+ this.cleanViewports();
51164
51183
  for (const sheetId of this.getters.getSheetIds()) {
51165
51184
  this.sheetsWithDirtyViewports.add(sheetId);
51166
51185
  }
@@ -51214,6 +51233,9 @@ class SheetViewPlugin extends UIPlugin {
51214
51233
  }
51215
51234
  }
51216
51235
  break;
51236
+ case "DELETE_SHEET":
51237
+ this.cleanViewports();
51238
+ break;
51217
51239
  case "ACTIVATE_SHEET":
51218
51240
  this.sheetsWithDirtyViewports.add(cmd.sheetIdTo);
51219
51241
  break;
@@ -52355,6 +52377,17 @@ css /* scss */ `
52355
52377
  .o-bottom-bar-fade-in {
52356
52378
  background-image: linear-gradient(90deg, #cfcfcf, transparent 1%);
52357
52379
  }
52380
+
52381
+ .o-sheet-list {
52382
+ overflow-y: hidden;
52383
+ overflow-x: auto;
52384
+
52385
+ &::-webkit-scrollbar {
52386
+ display: none; /* Chrome */
52387
+ }
52388
+ -ms-overflow-style: none; /* IE and Edge */
52389
+ scrollbar-width: none; /* Firefox */
52390
+ }
52358
52391
  }
52359
52392
 
52360
52393
  .o-bottom-bar-arrows {
@@ -54244,7 +54277,7 @@ class Spreadsheet extends owl.Component {
54244
54277
 
54245
54278
  class LocalTransportService {
54246
54279
  listeners = [];
54247
- sendMessage(message) {
54280
+ async sendMessage(message) {
54248
54281
  for (const { callback } of this.listeners) {
54249
54282
  callback(message);
54250
54283
  }
@@ -56076,17 +56109,13 @@ function addFormula(cell) {
56076
56109
  if (!formula) {
56077
56110
  return { attrs: [], node: escapeXml `` };
56078
56111
  }
56079
- const attrs = [];
56080
- let node = escapeXml ``;
56081
- let cycle = escapeXml ``;
56082
- const XlsxFormula = adaptFormulaToExcel(formula);
56083
- // hack for cycles : if we don't set a value (be it 0 or #VALUE!), it will appear as invisible on excel,
56084
- // Making it very hard for the client to find where the recursion is.
56085
- if (cell.value === CellErrorType.CircularDependency) {
56086
- attrs.push(["t", "str"]);
56087
- cycle = escapeXml /*xml*/ `<v>${cell.value}</v>`;
56112
+ const type = getCellType(cell.value);
56113
+ if (type === undefined) {
56114
+ return { attrs: [], node: escapeXml `` };
56088
56115
  }
56089
- node = escapeXml /*xml*/ `<f>${XlsxFormula}</f>${cycle}`;
56116
+ const attrs = [["t", type]];
56117
+ const XlsxFormula = adaptFormulaToExcel(formula);
56118
+ const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${cell.value}</v>`;
56090
56119
  return { attrs, node };
56091
56120
  }
56092
56121
  function addContent(content, sharedStrings, forceString = false) {
@@ -57415,8 +57444,8 @@ class Model extends EventBus {
57415
57444
  joinSession() {
57416
57445
  this.session.join(this.config.client);
57417
57446
  }
57418
- leaveSession() {
57419
- this.session.leave(lazy(() => this.exportData()));
57447
+ async leaveSession() {
57448
+ await this.session.leave(lazy(() => this.exportData()));
57420
57449
  }
57421
57450
  setupUiPlugin(Plugin) {
57422
57451
  const plugin = new Plugin(this.uiPluginConfig);
@@ -57928,6 +57957,6 @@ exports.setTranslationMethod = setTranslationMethod;
57928
57957
  exports.tokenize = tokenize;
57929
57958
 
57930
57959
 
57931
- __info__.version = "17.1.28";
57932
- __info__.date = "2024-08-19T08:08:59.669Z";
57933
- __info__.hash = "9674f1b";
57960
+ __info__.version = "17.1.30";
57961
+ __info__.date = "2024-09-05T09:29:03.585Z";
57962
+ __info__.hash = "8588bf4";
@@ -744,7 +744,7 @@ interface TransportService<T = any> {
744
744
  /**
745
745
  * Send a message to all clients
746
746
  */
747
- sendMessage: (message: T) => void;
747
+ sendMessage: (message: T) => Promise<void>;
748
748
  /**
749
749
  * Register a callback function which will be called each time
750
750
  * a new message is received.
@@ -841,11 +841,11 @@ declare class Session extends EventBus<CollaborativeEvent> {
841
841
  /**
842
842
  * Notify the server that the user client left the collaborative session
843
843
  */
844
- leave(data: Lazy<WorkbookData>): void;
844
+ leave(data: Lazy<WorkbookData>): Promise<void>;
845
845
  /**
846
846
  * Send a snapshot of the spreadsheet to the collaboration server
847
847
  */
848
- snapshot(data: WorkbookData): void;
848
+ snapshot(data: WorkbookData): Promise<void>;
849
849
  getClient(): Client;
850
850
  getConnectedClients(): Set<Client>;
851
851
  getRevisionId(): UID;
@@ -1250,7 +1250,7 @@ declare class Model extends EventBus<any> implements CommandDispatcher {
1250
1250
  private readonly coreHandlers;
1251
1251
  constructor(data?: any, config?: Partial<ModelConfig>, stateUpdateMessages?: StateUpdateMessage[], uuidGenerator?: UuidGenerator, verboseImport?: boolean);
1252
1252
  joinSession(): void;
1253
- leaveSession(): void;
1253
+ leaveSession(): Promise<void>;
1254
1254
  private setupUiPlugin;
1255
1255
  /**
1256
1256
  * Initialize and properly configure a plugin.
@@ -4861,6 +4861,7 @@ declare class GridSelectionPlugin extends UIPlugin {
4861
4861
  allowDispatch(cmd: LocalCommand): CommandResult;
4862
4862
  private handleEvent;
4863
4863
  handle(cmd: Command): void;
4864
+ finalize(): void;
4864
4865
  isGridSelectionActive(): boolean;
4865
4866
  getActiveSheet(): Readonly<Sheet>;
4866
4867
  getActiveSheetId(): UID;
@@ -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 17.1.28
6
- * @date 2024-08-19T08:08:59.669Z
7
- * @hash 9674f1b
5
+ * @version 17.1.30
6
+ * @date 2024-09-05T09:29:03.585Z
7
+ * @hash 8588bf4
8
8
  */
9
9
 
10
10
  import { Component, useRef, onMounted, onWillUnmount, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
@@ -31883,6 +31883,18 @@ function convertOperator(operator) {
31883
31883
  // -------------------------------------
31884
31884
  // WORKSHEET HELPERS
31885
31885
  // -------------------------------------
31886
+ function getCellType(value) {
31887
+ switch (typeof value) {
31888
+ case "boolean":
31889
+ return "b";
31890
+ case "string":
31891
+ return "str";
31892
+ case "number":
31893
+ return "n";
31894
+ default:
31895
+ return undefined;
31896
+ }
31897
+ }
31886
31898
  function convertHeightToExcel(height) {
31887
31899
  return Math.round(HEIGHT_FACTOR * height * 100) / 100;
31888
31900
  }
@@ -38000,7 +38012,10 @@ class HeaderSizePlugin extends CorePlugin {
38000
38012
  handle(cmd) {
38001
38013
  switch (cmd.type) {
38002
38014
  case "CREATE_SHEET": {
38003
- this.history.update("sizes", cmd.sheetId, { COL: [], ROW: [] });
38015
+ this.history.update("sizes", cmd.sheetId, {
38016
+ COL: Array(this.getters.getNumberCols(cmd.sheetId)).fill(undefined),
38017
+ ROW: Array(this.getters.getNumberRows(cmd.sheetId)).fill(undefined),
38018
+ });
38004
38019
  break;
38005
38020
  }
38006
38021
  case "DUPLICATE_SHEET":
@@ -44935,9 +44950,9 @@ class Session extends EventBus {
44935
44950
  /**
44936
44951
  * Notify the server that the user client left the collaborative session
44937
44952
  */
44938
- leave(data) {
44953
+ async leave(data) {
44939
44954
  if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
44940
- this.snapshot(data());
44955
+ await this.snapshot(data());
44941
44956
  }
44942
44957
  delete this.clients[this.clientId];
44943
44958
  this.transportService.leave(this.clientId);
@@ -44950,12 +44965,12 @@ class Session extends EventBus {
44950
44965
  /**
44951
44966
  * Send a snapshot of the spreadsheet to the collaboration server
44952
44967
  */
44953
- snapshot(data) {
44968
+ async snapshot(data) {
44954
44969
  if (this.pendingMessages.length !== 0) {
44955
44970
  return;
44956
44971
  }
44957
44972
  const snapshotId = this.uuidGenerator.uuidv4();
44958
- this.transportService.sendMessage({
44973
+ await this.transportService.sendMessage({
44959
44974
  type: "SNAPSHOT",
44960
44975
  nextRevisionId: snapshotId,
44961
44976
  serverRevisionId: this.serverRevisionId,
@@ -45663,9 +45678,11 @@ class ClipboardCellsState extends ClipboardCellsAbstractState {
45663
45678
  const targetCell = this.getters.getEvaluatedCell(target);
45664
45679
  const originFormat = origin.cell?.format ?? origin.evaluatedCell.format;
45665
45680
  if (clipboardOption?.pasteOption === "asValue") {
45666
- const locale = this.getters.getLocale();
45667
- const content = formatValue(origin.evaluatedCell.value, { locale });
45668
- this.dispatch("UPDATE_CELL", { ...target, content, format: originFormat });
45681
+ this.dispatch("UPDATE_CELL", {
45682
+ ...target,
45683
+ content: origin.evaluatedCell.value.toString(),
45684
+ format: originFormat,
45685
+ });
45669
45686
  return;
45670
45687
  }
45671
45688
  const targetBorders = this.getters.getCellBorder(target);
@@ -50321,6 +50338,8 @@ class GridSelectionPlugin extends UIPlugin {
50321
50338
  this.selectedFigureId = null;
50322
50339
  break;
50323
50340
  }
50341
+ }
50342
+ finalize() {
50324
50343
  /** Any change to the selection has to be reflected in the selection processor. */
50325
50344
  this.selection.resetDefaultAnchor(this, deepCopy(this.gridSelection.anchor));
50326
50345
  }
@@ -51143,7 +51162,6 @@ class SheetViewPlugin extends UIPlugin {
51143
51162
  }
51144
51163
  }
51145
51164
  handle(cmd) {
51146
- this.cleanViewports();
51147
51165
  // changing the evaluation can hide/show rows because of data filters
51148
51166
  if (invalidateEvaluationCommands.has(cmd.type)) {
51149
51167
  for (const sheetId of this.getters.getSheetIds()) {
@@ -51159,6 +51177,7 @@ class SheetViewPlugin extends UIPlugin {
51159
51177
  break;
51160
51178
  case "UNDO":
51161
51179
  case "REDO":
51180
+ this.cleanViewports();
51162
51181
  for (const sheetId of this.getters.getSheetIds()) {
51163
51182
  this.sheetsWithDirtyViewports.add(sheetId);
51164
51183
  }
@@ -51212,6 +51231,9 @@ class SheetViewPlugin extends UIPlugin {
51212
51231
  }
51213
51232
  }
51214
51233
  break;
51234
+ case "DELETE_SHEET":
51235
+ this.cleanViewports();
51236
+ break;
51215
51237
  case "ACTIVATE_SHEET":
51216
51238
  this.sheetsWithDirtyViewports.add(cmd.sheetIdTo);
51217
51239
  break;
@@ -52353,6 +52375,17 @@ css /* scss */ `
52353
52375
  .o-bottom-bar-fade-in {
52354
52376
  background-image: linear-gradient(90deg, #cfcfcf, transparent 1%);
52355
52377
  }
52378
+
52379
+ .o-sheet-list {
52380
+ overflow-y: hidden;
52381
+ overflow-x: auto;
52382
+
52383
+ &::-webkit-scrollbar {
52384
+ display: none; /* Chrome */
52385
+ }
52386
+ -ms-overflow-style: none; /* IE and Edge */
52387
+ scrollbar-width: none; /* Firefox */
52388
+ }
52356
52389
  }
52357
52390
 
52358
52391
  .o-bottom-bar-arrows {
@@ -54242,7 +54275,7 @@ class Spreadsheet extends Component {
54242
54275
 
54243
54276
  class LocalTransportService {
54244
54277
  listeners = [];
54245
- sendMessage(message) {
54278
+ async sendMessage(message) {
54246
54279
  for (const { callback } of this.listeners) {
54247
54280
  callback(message);
54248
54281
  }
@@ -56074,17 +56107,13 @@ function addFormula(cell) {
56074
56107
  if (!formula) {
56075
56108
  return { attrs: [], node: escapeXml `` };
56076
56109
  }
56077
- const attrs = [];
56078
- let node = escapeXml ``;
56079
- let cycle = escapeXml ``;
56080
- const XlsxFormula = adaptFormulaToExcel(formula);
56081
- // hack for cycles : if we don't set a value (be it 0 or #VALUE!), it will appear as invisible on excel,
56082
- // Making it very hard for the client to find where the recursion is.
56083
- if (cell.value === CellErrorType.CircularDependency) {
56084
- attrs.push(["t", "str"]);
56085
- cycle = escapeXml /*xml*/ `<v>${cell.value}</v>`;
56110
+ const type = getCellType(cell.value);
56111
+ if (type === undefined) {
56112
+ return { attrs: [], node: escapeXml `` };
56086
56113
  }
56087
- node = escapeXml /*xml*/ `<f>${XlsxFormula}</f>${cycle}`;
56114
+ const attrs = [["t", type]];
56115
+ const XlsxFormula = adaptFormulaToExcel(formula);
56116
+ const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${cell.value}</v>`;
56088
56117
  return { attrs, node };
56089
56118
  }
56090
56119
  function addContent(content, sharedStrings, forceString = false) {
@@ -57413,8 +57442,8 @@ class Model extends EventBus {
57413
57442
  joinSession() {
57414
57443
  this.session.join(this.config.client);
57415
57444
  }
57416
- leaveSession() {
57417
- this.session.leave(lazy(() => this.exportData()));
57445
+ async leaveSession() {
57446
+ await this.session.leave(lazy(() => this.exportData()));
57418
57447
  }
57419
57448
  setupUiPlugin(Plugin) {
57420
57449
  const plugin = new Plugin(this.uiPluginConfig);
@@ -57890,6 +57919,6 @@ const constants = {
57890
57919
  export { AbstractChart, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
57891
57920
 
57892
57921
 
57893
- __info__.version = "17.1.28";
57894
- __info__.date = "2024-08-19T08:08:59.669Z";
57895
- __info__.hash = "9674f1b";
57922
+ __info__.version = "17.1.30";
57923
+ __info__.date = "2024-09-05T09:29:03.585Z";
57924
+ __info__.hash = "8588bf4";
@@ -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 17.1.28
6
- * @date 2024-08-19T08:08:59.669Z
7
- * @hash 9674f1b
5
+ * @version 17.1.30
6
+ * @date 2024-09-05T09:29:03.585Z
7
+ * @hash 8588bf4
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -31884,6 +31884,18 @@
31884
31884
  // -------------------------------------
31885
31885
  // WORKSHEET HELPERS
31886
31886
  // -------------------------------------
31887
+ function getCellType(value) {
31888
+ switch (typeof value) {
31889
+ case "boolean":
31890
+ return "b";
31891
+ case "string":
31892
+ return "str";
31893
+ case "number":
31894
+ return "n";
31895
+ default:
31896
+ return undefined;
31897
+ }
31898
+ }
31887
31899
  function convertHeightToExcel(height) {
31888
31900
  return Math.round(HEIGHT_FACTOR * height * 100) / 100;
31889
31901
  }
@@ -38001,7 +38013,10 @@
38001
38013
  handle(cmd) {
38002
38014
  switch (cmd.type) {
38003
38015
  case "CREATE_SHEET": {
38004
- this.history.update("sizes", cmd.sheetId, { COL: [], ROW: [] });
38016
+ this.history.update("sizes", cmd.sheetId, {
38017
+ COL: Array(this.getters.getNumberCols(cmd.sheetId)).fill(undefined),
38018
+ ROW: Array(this.getters.getNumberRows(cmd.sheetId)).fill(undefined),
38019
+ });
38005
38020
  break;
38006
38021
  }
38007
38022
  case "DUPLICATE_SHEET":
@@ -44936,9 +44951,9 @@
44936
44951
  /**
44937
44952
  * Notify the server that the user client left the collaborative session
44938
44953
  */
44939
- leave(data) {
44954
+ async leave(data) {
44940
44955
  if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
44941
- this.snapshot(data());
44956
+ await this.snapshot(data());
44942
44957
  }
44943
44958
  delete this.clients[this.clientId];
44944
44959
  this.transportService.leave(this.clientId);
@@ -44951,12 +44966,12 @@
44951
44966
  /**
44952
44967
  * Send a snapshot of the spreadsheet to the collaboration server
44953
44968
  */
44954
- snapshot(data) {
44969
+ async snapshot(data) {
44955
44970
  if (this.pendingMessages.length !== 0) {
44956
44971
  return;
44957
44972
  }
44958
44973
  const snapshotId = this.uuidGenerator.uuidv4();
44959
- this.transportService.sendMessage({
44974
+ await this.transportService.sendMessage({
44960
44975
  type: "SNAPSHOT",
44961
44976
  nextRevisionId: snapshotId,
44962
44977
  serverRevisionId: this.serverRevisionId,
@@ -45664,9 +45679,11 @@
45664
45679
  const targetCell = this.getters.getEvaluatedCell(target);
45665
45680
  const originFormat = origin.cell?.format ?? origin.evaluatedCell.format;
45666
45681
  if (clipboardOption?.pasteOption === "asValue") {
45667
- const locale = this.getters.getLocale();
45668
- const content = formatValue(origin.evaluatedCell.value, { locale });
45669
- this.dispatch("UPDATE_CELL", { ...target, content, format: originFormat });
45682
+ this.dispatch("UPDATE_CELL", {
45683
+ ...target,
45684
+ content: origin.evaluatedCell.value.toString(),
45685
+ format: originFormat,
45686
+ });
45670
45687
  return;
45671
45688
  }
45672
45689
  const targetBorders = this.getters.getCellBorder(target);
@@ -50322,6 +50339,8 @@
50322
50339
  this.selectedFigureId = null;
50323
50340
  break;
50324
50341
  }
50342
+ }
50343
+ finalize() {
50325
50344
  /** Any change to the selection has to be reflected in the selection processor. */
50326
50345
  this.selection.resetDefaultAnchor(this, deepCopy(this.gridSelection.anchor));
50327
50346
  }
@@ -51144,7 +51163,6 @@
51144
51163
  }
51145
51164
  }
51146
51165
  handle(cmd) {
51147
- this.cleanViewports();
51148
51166
  // changing the evaluation can hide/show rows because of data filters
51149
51167
  if (invalidateEvaluationCommands.has(cmd.type)) {
51150
51168
  for (const sheetId of this.getters.getSheetIds()) {
@@ -51160,6 +51178,7 @@
51160
51178
  break;
51161
51179
  case "UNDO":
51162
51180
  case "REDO":
51181
+ this.cleanViewports();
51163
51182
  for (const sheetId of this.getters.getSheetIds()) {
51164
51183
  this.sheetsWithDirtyViewports.add(sheetId);
51165
51184
  }
@@ -51213,6 +51232,9 @@
51213
51232
  }
51214
51233
  }
51215
51234
  break;
51235
+ case "DELETE_SHEET":
51236
+ this.cleanViewports();
51237
+ break;
51216
51238
  case "ACTIVATE_SHEET":
51217
51239
  this.sheetsWithDirtyViewports.add(cmd.sheetIdTo);
51218
51240
  break;
@@ -52354,6 +52376,17 @@
52354
52376
  .o-bottom-bar-fade-in {
52355
52377
  background-image: linear-gradient(90deg, #cfcfcf, transparent 1%);
52356
52378
  }
52379
+
52380
+ .o-sheet-list {
52381
+ overflow-y: hidden;
52382
+ overflow-x: auto;
52383
+
52384
+ &::-webkit-scrollbar {
52385
+ display: none; /* Chrome */
52386
+ }
52387
+ -ms-overflow-style: none; /* IE and Edge */
52388
+ scrollbar-width: none; /* Firefox */
52389
+ }
52357
52390
  }
52358
52391
 
52359
52392
  .o-bottom-bar-arrows {
@@ -54243,7 +54276,7 @@
54243
54276
 
54244
54277
  class LocalTransportService {
54245
54278
  listeners = [];
54246
- sendMessage(message) {
54279
+ async sendMessage(message) {
54247
54280
  for (const { callback } of this.listeners) {
54248
54281
  callback(message);
54249
54282
  }
@@ -56075,17 +56108,13 @@
56075
56108
  if (!formula) {
56076
56109
  return { attrs: [], node: escapeXml `` };
56077
56110
  }
56078
- const attrs = [];
56079
- let node = escapeXml ``;
56080
- let cycle = escapeXml ``;
56081
- const XlsxFormula = adaptFormulaToExcel(formula);
56082
- // hack for cycles : if we don't set a value (be it 0 or #VALUE!), it will appear as invisible on excel,
56083
- // Making it very hard for the client to find where the recursion is.
56084
- if (cell.value === CellErrorType.CircularDependency) {
56085
- attrs.push(["t", "str"]);
56086
- cycle = escapeXml /*xml*/ `<v>${cell.value}</v>`;
56111
+ const type = getCellType(cell.value);
56112
+ if (type === undefined) {
56113
+ return { attrs: [], node: escapeXml `` };
56087
56114
  }
56088
- node = escapeXml /*xml*/ `<f>${XlsxFormula}</f>${cycle}`;
56115
+ const attrs = [["t", type]];
56116
+ const XlsxFormula = adaptFormulaToExcel(formula);
56117
+ const node = escapeXml /*xml*/ `<f>${XlsxFormula}</f><v>${cell.value}</v>`;
56089
56118
  return { attrs, node };
56090
56119
  }
56091
56120
  function addContent(content, sharedStrings, forceString = false) {
@@ -57414,8 +57443,8 @@
57414
57443
  joinSession() {
57415
57444
  this.session.join(this.config.client);
57416
57445
  }
57417
- leaveSession() {
57418
- this.session.leave(lazy(() => this.exportData()));
57446
+ async leaveSession() {
57447
+ await this.session.leave(lazy(() => this.exportData()));
57419
57448
  }
57420
57449
  setupUiPlugin(Plugin) {
57421
57450
  const plugin = new Plugin(this.uiPluginConfig);
@@ -57927,9 +57956,9 @@
57927
57956
  exports.tokenize = tokenize;
57928
57957
 
57929
57958
 
57930
- __info__.version = "17.1.28";
57931
- __info__.date = "2024-08-19T08:08:59.669Z";
57932
- __info__.hash = "9674f1b";
57959
+ __info__.version = "17.1.30";
57960
+ __info__.date = "2024-09-05T09:29:03.585Z";
57961
+ __info__.hash = "8588bf4";
57933
57962
 
57934
57963
 
57935
57964
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);