@odoo/o-spreadsheet 16.2.4 → 16.2.6

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.
@@ -704,6 +704,7 @@ interface ExcelWorkbookData extends WorkbookData {
704
704
  interface ExcelCellData extends CellData {
705
705
  value: CellValue;
706
706
  isFormula: Boolean;
707
+ computedFormat?: Format;
707
708
  }
708
709
  interface ExcelSheetData extends Omit<SheetData, "figureTables"> {
709
710
  cells: {
@@ -759,7 +760,6 @@ interface CollaborativeEventReceived {
759
760
  }
760
761
  interface UnexpectedRevisionIdEvent {
761
762
  type: "unexpected-revision-id";
762
- revisionId: UID;
763
763
  }
764
764
  interface NewLocalStateUpdateEvent {
765
765
  type: "new-local-state-update";
@@ -2135,7 +2135,9 @@ declare const enum CommandResult {
2135
2135
  DuplicatedFigureId = 82,
2136
2136
  InvalidSelectionStep = 83,
2137
2137
  DuplicatedChartId = 84,
2138
- ChartDoesNotExist = 85
2138
+ ChartDoesNotExist = 85,
2139
+ InvalidHeaderIndex = 86,
2140
+ InvalidQuantity = 87
2139
2141
  }
2140
2142
  interface CommandHandler<T> {
2141
2143
  allowDispatch(command: T): CommandResult | CommandResult[];
@@ -2779,6 +2781,7 @@ declare class Session extends EventBus<CollaborativeEvent> {
2779
2781
  private sendPendingMessage;
2780
2782
  private acknowledge;
2781
2783
  private isAlreadyProcessed;
2784
+ isWrongServerRevisionId(message: CollaborationMessage): boolean;
2782
2785
  private dropPendingHistoryMessages;
2783
2786
  }
2784
2787
 
@@ -3386,7 +3389,7 @@ declare class HeaderSizePlugin extends CorePlugin<HeaderSizeState> implements He
3386
3389
  declare class HeaderVisibilityPlugin extends CorePlugin {
3387
3390
  static getters: readonly ["canRemoveHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isRowHiddenByUser", "isColHiddenByUser"];
3388
3391
  private readonly hiddenHeaders;
3389
- allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements;
3392
+ allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements | CommandResult.InvalidHeaderIndex;
3390
3393
  handle(cmd: Command): void;
3391
3394
  canRemoveHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
3392
3395
  isRowHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
@@ -4906,6 +4909,7 @@ declare class SelectionInput extends Component<Props$B, SpreadsheetChildEnv> {
4906
4909
  getColor(range: SelectionRange): string;
4907
4910
  private triggerChange;
4908
4911
  onKeydown(ev: KeyboardEvent): void;
4912
+ private extractRanges;
4909
4913
  focus(rangeId: number): void;
4910
4914
  addEmptyInput(): void;
4911
4915
  removeInput(rangeId: number): void;
@@ -5989,7 +5993,24 @@ declare class ContentEditableHelper {
5989
5993
  start: number;
5990
5994
  end: number;
5991
5995
  };
5992
- private findSizeBeforeElement;
5996
+ /**
5997
+ * Computes the text 'index' inside this.el based on the currently selected node and its offset.
5998
+ * The selected node is either a Text node or an Element node.
5999
+ *
6000
+ * case 1 -Text node:
6001
+ * the offset is the number of characters from the start of the node. We have to add this offset to the
6002
+ * content length of all previous nodes.
6003
+ *
6004
+ * case 2 - Element node:
6005
+ * the offset is the number of child nodes before the selected node. We have to add the content length of
6006
+ * all the bnodes prior to the selected node as well as the content of the child node before the offset.
6007
+ *
6008
+ * See the MDN documentation for more details.
6009
+ * https://developer.mozilla.org/en-US/docs/Web/API/Range/startOffset
6010
+ * https://developer.mozilla.org/en-US/docs/Web/API/Range/endOffset
6011
+ *
6012
+ */
6013
+ private findSelectionIndex;
5993
6014
  private getStartAndEndSelection;
5994
6015
  getText(): string;
5995
6016
  }