@odoo/o-spreadsheet 17.0.4 → 17.0.5

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.0.4
6
- * @date 2023-11-24T13:13:42.575Z
7
- * @hash 7346d0a
5
+ * @version 17.0.5
6
+ * @date 2023-12-05T09:51:44.657Z
7
+ * @hash 2480a5d
8
8
  */
9
9
 
10
10
  'use strict';
@@ -3389,8 +3389,10 @@ function convertInternalFormatToFormat(internalFormat) {
3389
3389
  const cellReference = new RegExp(/\$?([A-Z]{1,3})\$?([0-9]{1,7})/, "i");
3390
3390
  // Same as above, but matches the exact string (nothing before or after)
3391
3391
  const singleCellReference = new RegExp(/^\$?([A-Z]{1,3})\$?([0-9]{1,7})$/, "i");
3392
- /** Reference of a column header (eg. A, AB) */
3393
- const colHeader = new RegExp(/^([A-Z]{1,3})+$/, "i");
3392
+ /** Reference of a column header (eg. A, AB, $A) */
3393
+ const colHeader = new RegExp(/^\$?([A-Z]{1,3})+$/, "i");
3394
+ /** Reference of a row header (eg. 1, $1) */
3395
+ const rowHeader = new RegExp(/^\$?([0-9]{1,7})+$/, "i");
3394
3396
  /** Reference of a column (eg. A, $CA, Sheet1!B) */
3395
3397
  const colReference = new RegExp(/^\s*('.+'!|[^']+!)?\$?([A-Z]{1,3})$/, "i");
3396
3398
  /** Reference of a row (eg. 1, 59, Sheet1!9) */
@@ -3420,6 +3422,9 @@ function isRowReference(xc) {
3420
3422
  function isColHeader(str) {
3421
3423
  return colHeader.test(str);
3422
3424
  }
3425
+ function isRowHeader(str) {
3426
+ return rowHeader.test(str);
3427
+ }
3423
3428
  /**
3424
3429
  * Return true if the given xc is the reference of a single cell,
3425
3430
  * without any specified sheet (e.g. A1)
@@ -4103,18 +4108,10 @@ class RangeImpl {
4103
4108
  if (isFullCol) {
4104
4109
  parts[0].rowFixed = parts[0].rowFixed || parts[1].rowFixed;
4105
4110
  parts[1].rowFixed = parts[0].rowFixed || parts[1].rowFixed;
4106
- if (zone.left === zone.right) {
4107
- parts[0].colFixed = parts[0].colFixed || parts[1].colFixed;
4108
- parts[1].colFixed = parts[0].colFixed || parts[1].colFixed;
4109
- }
4110
4111
  }
4111
4112
  if (isFullRow) {
4112
4113
  parts[0].colFixed = parts[0].colFixed || parts[1].colFixed;
4113
4114
  parts[1].colFixed = parts[0].colFixed || parts[1].colFixed;
4114
- if (zone.top === zone.bottom) {
4115
- parts[0].rowFixed = parts[0].rowFixed || parts[1].rowFixed;
4116
- parts[1].rowFixed = parts[0].rowFixed || parts[1].rowFixed;
4117
- }
4118
4115
  }
4119
4116
  return parts;
4120
4117
  }
@@ -4356,7 +4353,7 @@ function computeTextLinesHeight(textLineHeight, numberOfLines = 1) {
4356
4353
  function getDefaultCellHeight(ctx, cell, colSize) {
4357
4354
  if (!cell || !cell.content)
4358
4355
  return DEFAULT_CELL_HEIGHT;
4359
- const maxWidth = cell.style?.wrapping ? colSize - 2 * MIN_CELL_TEXT_MARGIN : undefined;
4356
+ const maxWidth = cell.style?.wrapping === "wrap" ? colSize - 2 * MIN_CELL_TEXT_MARGIN : undefined;
4360
4357
  const numberOfLines = cell.isFormula
4361
4358
  ? 1
4362
4359
  : splitTextToWidth(ctx, cell.content, cell.style, maxWidth).length;
@@ -6251,10 +6248,6 @@ css /* scss */ `
6251
6248
 
6252
6249
  .o-error-tooltip-message {
6253
6250
  overflow: hidden;
6254
- display: -webkit-box; /* Limit to 3 lines */
6255
- -webkit-line-clamp: 3;
6256
- line-clamp: 3;
6257
- -webkit-box-orient: vertical;
6258
6251
  }
6259
6252
  }
6260
6253
  `;
@@ -6637,6 +6630,9 @@ function* iterateChildren(el) {
6637
6630
  function getOpenedMenus() {
6638
6631
  return Array.from(document.querySelectorAll(".o-spreadsheet .o-menu"));
6639
6632
  }
6633
+ function isMacOS() {
6634
+ return navigator.userAgent.toUpperCase().indexOf("MAC") >= 0;
6635
+ }
6640
6636
 
6641
6637
  /**
6642
6638
  * Return the o-spreadsheet element position relative
@@ -28281,6 +28277,7 @@ class AbstractResizer extends owl.Component {
28281
28277
  draggerShadowThickness: 0,
28282
28278
  delta: 0,
28283
28279
  base: 0,
28280
+ position: "before",
28284
28281
  });
28285
28282
  _computeHandleDisplay(ev) {
28286
28283
  const position = this._getEvOffset(ev);
@@ -28405,11 +28402,13 @@ class AbstractResizer extends owl.Component {
28405
28402
  this.state.draggerLinePosition = dimensions.start;
28406
28403
  this.state.draggerShadowPosition = dimensions.start;
28407
28404
  this.state.base = elementIndex;
28405
+ this.state.position = "before";
28408
28406
  }
28409
28407
  else if (this._getSelectedZoneEnd() < elementIndex) {
28410
28408
  this.state.draggerLinePosition = dimensions.end;
28411
28409
  this.state.draggerShadowPosition = dimensions.end - this.state.draggerShadowThickness;
28412
- this.state.base = elementIndex + 1;
28410
+ this.state.base = elementIndex;
28411
+ this.state.position = "after";
28413
28412
  }
28414
28413
  else {
28415
28414
  this.state.draggerLinePosition = startDimensions.start;
@@ -28591,6 +28590,7 @@ class ColResizer extends AbstractResizer {
28591
28590
  dimension: "COL",
28592
28591
  base: this.state.base,
28593
28592
  elements,
28593
+ position: this.state.position,
28594
28594
  });
28595
28595
  if (!result.isSuccessful && result.reasons.includes("WillRemoveExistingMerge" /* CommandResult.WillRemoveExistingMerge */)) {
28596
28596
  this.env.raiseError(MergeErrorMessage);
@@ -28764,6 +28764,7 @@ class RowResizer extends AbstractResizer {
28764
28764
  dimension: "ROW",
28765
28765
  base: this.state.base,
28766
28766
  elements,
28767
+ position: this.state.position,
28767
28768
  });
28768
28769
  if (!result.isSuccessful && result.reasons.includes("WillRemoveExistingMerge" /* CommandResult.WillRemoveExistingMerge */)) {
28769
28770
  this.env.raiseError(MergeErrorMessage);
@@ -28871,8 +28872,8 @@ function useWheelHandler(handler) {
28871
28872
  return val * (deltaMode === 0 ? 1 : DEFAULT_CELL_HEIGHT);
28872
28873
  }
28873
28874
  const onMouseWheel = (ev) => {
28874
- const deltaX = normalize(ev.shiftKey ? ev.deltaY : ev.deltaX, ev.deltaMode);
28875
- const deltaY = normalize(ev.shiftKey ? ev.deltaX : ev.deltaY, ev.deltaMode);
28875
+ const deltaX = normalize(ev.shiftKey && !isMacOS() ? ev.deltaY : ev.deltaX, ev.deltaMode);
28876
+ const deltaY = normalize(ev.shiftKey && !isMacOS() ? ev.deltaX : ev.deltaY, ev.deltaMode);
28876
28877
  handler(deltaX, deltaY);
28877
28878
  };
28878
28879
  return onMouseWheel;
@@ -33326,7 +33327,7 @@ const machine = {
33326
33327
  SPACE: goTo(State.RightRef),
33327
33328
  NUMBER: goTo(State.Found),
33328
33329
  REFERENCE: goTo(State.Found, (token) => isSingleCellReference(token.value)),
33329
- SYMBOL: goTo(State.Found, (token) => isColHeader(token.value)),
33330
+ SYMBOL: goTo(State.Found, (token) => isColHeader(token.value) || isRowHeader(token.value)),
33330
33331
  },
33331
33332
  [State.RightColumnRef]: {
33332
33333
  SPACE: goTo(State.RightColumnRef),
@@ -33337,6 +33338,7 @@ const machine = {
33337
33338
  SPACE: goTo(State.RightRowRef),
33338
33339
  NUMBER: goTo(State.Found),
33339
33340
  REFERENCE: goTo(State.Found, (token) => isSingleCellReference(token.value)),
33341
+ SYMBOL: goTo(State.Found, (token) => isRowHeader(token.value)),
33340
33342
  },
33341
33343
  [State.Found]: {},
33342
33344
  };
@@ -37318,7 +37320,16 @@ class HeaderVisibilityPlugin extends CorePlugin {
37318
37320
  return consecutiveIndexes;
37319
37321
  }
37320
37322
  getAllVisibleHeaders(sheetId, dimension) {
37321
- return range(0, this.hiddenHeaders[sheetId][dimension].length).filter((i) => !this.hiddenHeaders[sheetId][dimension][i]);
37323
+ const headers = range(0, this.getters.getNumberHeaders(sheetId, dimension));
37324
+ const foldedHeaders = [];
37325
+ this.getters.getHeaderGroups(sheetId, dimension).forEach((group) => {
37326
+ if (group.isFolded) {
37327
+ foldedHeaders.push(...range(group.start, group.end + 1));
37328
+ }
37329
+ });
37330
+ return headers.filter((i) => {
37331
+ return !this.hiddenHeaders[sheetId][dimension][i] && !foldedHeaders.includes(i);
37332
+ });
37322
37333
  }
37323
37334
  import(data) {
37324
37335
  for (let sheet of data.sheets) {
@@ -39778,10 +39789,13 @@ class CompilationParametersBuilder {
39778
39789
  if (evaluatedCell === undefined) {
39779
39790
  return { value: null, format: this.getters.getCell(position)?.format };
39780
39791
  }
39792
+ if (evaluatedCell.type === CellValueType.error) {
39793
+ throw evaluatedCell.error;
39794
+ }
39781
39795
  return evaluatedCell;
39782
39796
  }
39783
39797
  getEvaluatedCellIfNotEmpty(position) {
39784
- const evaluatedCell = this.getEvaluatedCell(position);
39798
+ const evaluatedCell = this.computeCell(position);
39785
39799
  if (evaluatedCell.type === CellValueType.empty) {
39786
39800
  const cell = this.getters.getCell(position);
39787
39801
  if (!cell || (!cell.isFormula && cell.content === "")) {
@@ -39790,13 +39804,6 @@ class CompilationParametersBuilder {
39790
39804
  }
39791
39805
  return evaluatedCell;
39792
39806
  }
39793
- getEvaluatedCell(position) {
39794
- const evaluatedCell = this.computeCell(position);
39795
- if (evaluatedCell.type === CellValueType.error) {
39796
- throw evaluatedCell.error;
39797
- }
39798
- return evaluatedCell;
39799
- }
39800
39807
  /**
39801
39808
  * Return the values of the cell(s) used in reference, but always in the format of a range even
39802
39809
  * if a single cell is referenced. It is a list of col values. This is useful for the formulas that describe parameters as
@@ -39819,7 +39826,11 @@ class CompilationParametersBuilder {
39819
39826
  const { top, left, bottom, right } = zone;
39820
39827
  const cacheKey = `${sheetId}-${top}-${left}-${bottom}-${right}`;
39821
39828
  if (cacheKey in this.rangeCache) {
39822
- return this.rangeCache[cacheKey];
39829
+ const result = this.rangeCache[cacheKey];
39830
+ if (result instanceof EvaluationError) {
39831
+ throw result;
39832
+ }
39833
+ return result;
39823
39834
  }
39824
39835
  const height = _zone.bottom - _zone.top + 1;
39825
39836
  const width = _zone.right - _zone.left + 1;
@@ -39829,6 +39840,11 @@ class CompilationParametersBuilder {
39829
39840
  const colIndex = col - _zone.left;
39830
39841
  matrix[colIndex] = new Array(height);
39831
39842
  for (let row = _zone.top; row <= _zone.bottom; row++) {
39843
+ const evaluatedCell = this.getEvaluatedCellIfNotEmpty({ sheetId, col, row });
39844
+ if (evaluatedCell?.type === CellValueType.error) {
39845
+ this.rangeCache[cacheKey] = evaluatedCell.error;
39846
+ throw evaluatedCell.error;
39847
+ }
39832
39848
  const rowIndex = row - _zone.top;
39833
39849
  matrix[colIndex][rowIndex] = this.readCell({ sheetId, col, row });
39834
39850
  }
@@ -41786,19 +41802,21 @@ class AutofillPlugin extends UIPlugin {
41786
41802
  let col = zone.left;
41787
41803
  let row = zone.bottom;
41788
41804
  if (col > 0) {
41789
- let left = this.getters.getEvaluatedCell({ sheetId, col: col - 1, row });
41790
- while (left.type !== CellValueType.empty) {
41805
+ let leftPosition = { sheetId, col: col - 1, row };
41806
+ while (this.getters.getEvaluatedCell(leftPosition).type !== CellValueType.empty ||
41807
+ this.getters.getCell(leftPosition)?.content) {
41791
41808
  row += 1;
41792
- left = this.getters.getEvaluatedCell({ sheetId, col: col - 1, row });
41809
+ leftPosition = { sheetId, col: col - 1, row };
41793
41810
  }
41794
41811
  }
41795
41812
  if (row === zone.bottom) {
41796
41813
  col = zone.right;
41797
41814
  if (col <= this.getters.getNumberCols(sheetId)) {
41798
- let right = this.getters.getEvaluatedCell({ sheetId, col: col + 1, row });
41799
- while (right.type !== CellValueType.empty) {
41815
+ let rightPosition = { sheetId, col: col + 1, row };
41816
+ while (this.getters.getEvaluatedCell(rightPosition).type !== CellValueType.empty ||
41817
+ this.getters.getCell(rightPosition)?.content) {
41800
41818
  row += 1;
41801
- right = this.getters.getEvaluatedCell({ sheetId, col: col + 1, row });
41819
+ rightPosition = { sheetId, col: col + 1, row };
41802
41820
  }
41803
41821
  }
41804
41822
  }
@@ -42790,6 +42808,7 @@ class Session extends EventBus {
42790
42808
  isReplayingInitialRevisions = false;
42791
42809
  processedRevisions = new Set();
42792
42810
  uuidGenerator = new UuidGenerator();
42811
+ lastLocalOperation;
42793
42812
  /**
42794
42813
  * Manages the collaboration between multiple users on the same spreadsheet.
42795
42814
  * It can forward local state changes to other users to ensure they all eventually
@@ -42822,6 +42841,11 @@ class Session extends EventBus {
42822
42841
  return;
42823
42842
  const revision = new Revision(this.uuidGenerator.uuidv4(), this.clientId, commands, rootCommand, changes, Date.now());
42824
42843
  this.revisions.append(revision.id, revision);
42844
+ // REQUEST_REDO just repeats the last operation, the
42845
+ // last operation is still the same and should not change.
42846
+ if (rootCommand.type !== "REQUEST_REDO") {
42847
+ this.lastLocalOperation = revision;
42848
+ }
42825
42849
  this.trigger("new-local-state-update", { id: revision.id });
42826
42850
  this.sendUpdateMessage({
42827
42851
  type: "REMOTE_REVISION",
@@ -42918,19 +42942,10 @@ class Session extends EventBus {
42918
42942
  return this.pendingMessages.length === 0;
42919
42943
  }
42920
42944
  /**
42921
- * Get the last local revision whose root command isn't in the given list of ignored commands
42945
+ * Get the last local revision
42922
42946
  * */
42923
- getLastLocalNonEmptyRevision(ignoredRootCommands) {
42924
- const revisions = this.revisions.getRevertedExecution();
42925
- for (const rev of revisions) {
42926
- if (rev.rootCommand === "SNAPSHOT")
42927
- return undefined;
42928
- if (!rev.rootCommand || rev.rootCommand === "REMOTE")
42929
- continue;
42930
- if (!ignoredRootCommands.includes(rev.rootCommand?.type) && rev.commands.length)
42931
- return rev;
42932
- }
42933
- return undefined;
42947
+ getLastLocalNonEmptyRevision() {
42948
+ return this.lastLocalOperation;
42934
42949
  }
42935
42950
  _move(position) {
42936
42951
  // this method is debounced and might be called after the client
@@ -42990,7 +43005,7 @@ class Session extends EventBus {
42990
43005
  break;
42991
43006
  case "REMOTE_REVISION":
42992
43007
  const { clientId, commands, timestamp } = message;
42993
- const revision = new Revision(message.nextRevisionId, clientId, commands, "REMOTE", undefined, timestamp);
43008
+ const revision = new Revision(message.nextRevisionId, clientId, commands, undefined, undefined, timestamp);
42994
43009
  if (revision.clientId !== this.clientId) {
42995
43010
  this.revisions.insert(revision.id, revision, message.serverRevisionId);
42996
43011
  const pendingCommands = this.pendingMessages
@@ -43003,10 +43018,11 @@ class Session extends EventBus {
43003
43018
  }
43004
43019
  break;
43005
43020
  case "SNAPSHOT_CREATED": {
43006
- const revision = new Revision(message.nextRevisionId, "server", [], "SNAPSHOT", undefined, Date.now());
43021
+ const revision = new Revision(message.nextRevisionId, "server", [], undefined, undefined, Date.now());
43007
43022
  this.revisions.insert(revision.id, revision, message.serverRevisionId);
43008
43023
  this.dropPendingHistoryMessages();
43009
43024
  this.trigger("snapshot");
43025
+ this.lastLocalOperation = undefined;
43010
43026
  break;
43011
43027
  }
43012
43028
  }
@@ -45561,6 +45577,9 @@ class SelectionInputsManagerPlugin extends UIPlugin {
45561
45577
  // Other
45562
45578
  // ---------------------------------------------------------------------------
45563
45579
  initInput(id, initialRanges, inputHasSingleRange = false) {
45580
+ if (this.inputs[id]) {
45581
+ this.unfocus();
45582
+ }
45564
45583
  this.inputs[id] = new SelectionInputPlugin(this.config, initialRanges, inputHasSingleRange);
45565
45584
  if (initialRanges.length === 0) {
45566
45585
  const input = this.inputs[id];
@@ -46359,7 +46378,7 @@ class HistoryPlugin extends UIPlugin {
46359
46378
  * Ignore standard undo/redo revisions (that are empty)
46360
46379
  */
46361
46380
  getPossibleRevisionToRepeat() {
46362
- return this.session.getLastLocalNonEmptyRevision(["REQUEST_REDO"]);
46381
+ return this.session.getLastLocalNonEmptyRevision();
46363
46382
  }
46364
46383
  }
46365
46384
 
@@ -47144,6 +47163,10 @@ function setXcToReferenceType(xc, referenceType) {
47144
47163
  return xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
47145
47164
  case "colrow":
47146
47165
  indexOfNumber = xc.search(/[0-9]/);
47166
+ if (indexOfNumber === -1 || indexOfNumber === 0) {
47167
+ // no row number (eg. A) or no column (eg. 1)
47168
+ return "$" + xc;
47169
+ }
47147
47170
  xc = xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
47148
47171
  return "$" + xc;
47149
47172
  case "none":
@@ -47914,6 +47937,12 @@ class FilterEvaluationPlugin extends UIPlugin {
47914
47937
  break;
47915
47938
  case "HIDE_COLUMNS_ROWS":
47916
47939
  case "UNHIDE_COLUMNS_ROWS":
47940
+ case "GROUP_HEADERS":
47941
+ case "UNGROUP_HEADERS":
47942
+ case "FOLD_HEADER_GROUP":
47943
+ case "UNFOLD_HEADER_GROUP":
47944
+ case "FOLD_ALL_HEADER_GROUPS":
47945
+ case "UNFOLD_ALL_HEADER_GROUPS":
47917
47946
  this.updateHiddenRows();
47918
47947
  break;
47919
47948
  case "UPDATE_FILTER":
@@ -48615,7 +48644,7 @@ class GridSelectionPlugin extends UIPlugin {
48615
48644
  sheetId: cmd.sheetId,
48616
48645
  base: cmd.base,
48617
48646
  quantity: thickness,
48618
- position: "before",
48647
+ position: cmd.position,
48619
48648
  });
48620
48649
  const isCol = cmd.dimension === "COL";
48621
48650
  const start = cmd.elements[0];
@@ -48632,12 +48661,13 @@ class GridSelectionPlugin extends UIPlugin {
48632
48661
  },
48633
48662
  ];
48634
48663
  const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection);
48664
+ const base = isBasedBefore ? cmd.base : cmd.base + 1;
48635
48665
  const pasteTarget = [
48636
48666
  {
48637
- left: isCol ? cmd.base : 0,
48638
- right: isCol ? cmd.base + thickness - 1 : this.getters.getNumberCols(cmd.sheetId) - 1,
48639
- top: !isCol ? cmd.base : 0,
48640
- bottom: !isCol ? cmd.base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
48667
+ left: isCol ? base : 0,
48668
+ right: isCol ? base + thickness - 1 : this.getters.getNumberCols(cmd.sheetId) - 1,
48669
+ top: !isCol ? base : 0,
48670
+ bottom: !isCol ? base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
48641
48671
  },
48642
48672
  ];
48643
48673
  state.paste(pasteTarget, { selectTarget: true });
@@ -48672,6 +48702,11 @@ class GridSelectionPlugin extends UIPlugin {
48672
48702
  doesElementsHaveCommonMerges(id, cmd.base - 1, cmd.base)) {
48673
48703
  return "WillRemoveExistingMerge" /* CommandResult.WillRemoveExistingMerge */;
48674
48704
  }
48705
+ const headers = [cmd.base, ...cmd.elements];
48706
+ const maxHeaderValue = isCol ? this.getters.getNumberCols(id) : this.getters.getNumberRows(id);
48707
+ if (headers.some((h) => h < 0 || h >= maxHeaderValue)) {
48708
+ return "InvalidHeaderIndex" /* CommandResult.InvalidHeaderIndex */;
48709
+ }
48675
48710
  return "Success" /* CommandResult.Success */;
48676
48711
  }
48677
48712
  //-------------------------------------------
@@ -49717,10 +49752,13 @@ class HeaderPositionsUIPlugin extends UIPlugin {
49717
49752
  }
49718
49753
  break;
49719
49754
  case "UPDATE_CELL":
49720
- if ("content" in cmd || "format" in cmd || cmd.style?.fontSize !== undefined) {
49755
+ if ("content" in cmd || "format" in cmd) {
49721
49756
  this.headerPositions = {};
49722
49757
  this.isDirty = true;
49723
49758
  }
49759
+ else {
49760
+ this.headerPositions[cmd.sheetId] = this.computeHeaderPositionsOfSheet(cmd.sheetId);
49761
+ }
49724
49762
  break;
49725
49763
  case "UPDATE_FILTER":
49726
49764
  case "REMOVE_FILTER_TABLE":
@@ -51877,6 +51915,8 @@ css /* scss */ `
51877
51915
  *:before,
51878
51916
  *:after {
51879
51917
  box-sizing: content-box;
51918
+ /** rtl not supported ATM */
51919
+ direction: ltr;
51880
51920
  }
51881
51921
  .o-separator {
51882
51922
  border-bottom: ${MENU_SEPARATOR_BORDER_WIDTH}px solid ${SEPARATOR_COLOR};
@@ -55949,6 +55989,6 @@ exports.setTranslationMethod = setTranslationMethod;
55949
55989
  exports.tokenize = tokenize;
55950
55990
 
55951
55991
 
55952
- __info__.version = "17.0.4";
55953
- __info__.date = "2023-11-24T13:13:42.575Z";
55954
- __info__.hash = "7346d0a";
55992
+ __info__.version = "17.0.5";
55993
+ __info__.date = "2023-12-05T09:51:44.657Z";
55994
+ __info__.hash = "2480a5d";
@@ -776,7 +776,7 @@ interface TransportService<T = any> {
776
776
  }
777
777
 
778
778
  declare class Revision implements RevisionData {
779
- readonly rootCommand?: Command | "SNAPSHOT" | "REMOTE" | undefined;
779
+ readonly rootCommand?: Command | undefined;
780
780
  readonly timestamp?: number | undefined;
781
781
  readonly id: UID;
782
782
  readonly clientId: ClientId;
@@ -791,7 +791,7 @@ declare class Revision implements RevisionData {
791
791
  * - clientId: Client who initiated the action
792
792
  * - changes: List of changes applied on the state.
793
793
  */
794
- constructor(id: UID, clientId: ClientId, commands: readonly CoreCommand[], rootCommand?: Command | "SNAPSHOT" | "REMOTE" | undefined, changes?: readonly HistoryChange[], timestamp?: number | undefined);
794
+ constructor(id: UID, clientId: ClientId, commands: readonly CoreCommand[], rootCommand?: Command | undefined, changes?: readonly HistoryChange[], timestamp?: number | undefined);
795
795
  setChanges(changes: readonly HistoryChange[]): void;
796
796
  get commands(): readonly CoreCommand[];
797
797
  get changes(): readonly HistoryChange[];
@@ -820,6 +820,7 @@ declare class Session extends EventBus<CollaborativeEvent> {
820
820
  private isReplayingInitialRevisions;
821
821
  private processedRevisions;
822
822
  private uuidGenerator;
823
+ private lastLocalOperation;
823
824
  /**
824
825
  * Manages the collaboration between multiple users on the same spreadsheet.
825
826
  * It can forward local state changes to other users to ensure they all eventually
@@ -861,9 +862,9 @@ declare class Session extends EventBus<CollaborativeEvent> {
861
862
  getRevisionId(): UID;
862
863
  isFullySynchronized(): boolean;
863
864
  /**
864
- * Get the last local revision whose root command isn't in the given list of ignored commands
865
+ * Get the last local revision
865
866
  * */
866
- getLastLocalNonEmptyRevision(ignoredRootCommands: CommandTypes[]): Revision | undefined;
867
+ getLastLocalNonEmptyRevision(): Revision | undefined;
867
868
  private _move;
868
869
  /**
869
870
  * Handles messages received from other clients in the collaborative
@@ -1769,6 +1770,7 @@ interface MoveColumnsRowsCommand extends HeadersDependentCommand {
1769
1770
  type: "MOVE_COLUMNS_ROWS";
1770
1771
  base: HeaderIndex;
1771
1772
  elements: HeaderIndex[];
1773
+ position: "before" | "after";
1772
1774
  }
1773
1775
  interface ResizeColumnsRowsCommand extends HeadersDependentCommand {
1774
1776
  type: "RESIZE_COLUMNS_ROWS";
@@ -7440,6 +7442,7 @@ interface ResizerState {
7440
7442
  draggerShadowThickness: number;
7441
7443
  delta: number;
7442
7444
  base: number;
7445
+ position: "before" | "after";
7443
7446
  }
7444
7447
  interface ResizerProps {
7445
7448
  onOpenContextMenu: (type: ContextMenuType, x: Pixel, y: Pixel) => void;