@odoo/o-spreadsheet 16.1.8 → 16.1.9

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.
@@ -1098,9 +1098,9 @@ declare class Model extends EventBus<any> implements CommandDispatcher {
1098
1098
  */
1099
1099
  private coreGetters;
1100
1100
  uuidGenerator: UuidGenerator;
1101
+ private readonly handlers;
1102
+ private readonly coreHandlers;
1101
1103
  constructor(data?: any, config?: Partial<ModelConfig>, stateUpdateMessages?: StateUpdateMessage[], uuidGenerator?: UuidGenerator, verboseImport?: boolean);
1102
- get handlers(): CommandHandler<Command>[];
1103
- get allUIPlugins(): UIPlugin[];
1104
1104
  joinSession(): void;
1105
1105
  leaveSession(): void;
1106
1106
  private setupUiPlugin;
@@ -3494,14 +3494,16 @@ declare class HeaderSizePlugin extends CorePlugin<HeaderSizeState> implements He
3494
3494
  }
3495
3495
 
3496
3496
  declare class HeaderVisibilityPlugin extends CorePlugin {
3497
- static getters: readonly ["getHiddenColsGroups", "getHiddenRowsGroups", "isRowHiddenByUser", "isColHiddenByUser"];
3497
+ static getters: readonly ["canRemoveHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isRowHiddenByUser", "isColHiddenByUser"];
3498
3498
  private readonly hiddenHeaders;
3499
- allowDispatch(cmd: Command): CommandResult.Success | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements;
3499
+ allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements;
3500
3500
  handle(cmd: Command): void;
3501
+ canRemoveHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
3501
3502
  isRowHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
3502
3503
  isColHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
3503
3504
  getHiddenColsGroups(sheetId: UID): ConsecutiveIndexes[];
3504
3505
  getHiddenRowsGroups(sheetId: UID): ConsecutiveIndexes[];
3506
+ private getAllVisibleHeaders;
3505
3507
  import(data: WorkbookData): void;
3506
3508
  exportForExcel(data: ExcelWorkbookData): void;
3507
3509
  export(data: WorkbookData): void;
@@ -4308,7 +4310,12 @@ declare class HeaderVisibilityUIPlugin extends UIPlugin {
4308
4310
  isColHidden(sheetId: UID, index: number): boolean;
4309
4311
  isHeaderHidden(sheetId: UID, dimension: Dimension, index: number): boolean;
4310
4312
  getNextVisibleCellPosition({ sheetId, col, row }: CellPosition): CellPosition;
4311
- findVisibleHeader(sheetId: UID, dimension: Dimension, indexes: number[]): number | undefined;
4313
+ /**
4314
+ * Find the first visible header in the range [`from` => `to`].
4315
+ *
4316
+ * Both `from` and `to` are inclusive.
4317
+ */
4318
+ findVisibleHeader(sheetId: UID, dimension: Dimension, from: number, to: number): number | undefined;
4312
4319
  findLastVisibleColRowIndex(sheetId: UID, dimension: Dimension, { last, first }: {
4313
4320
  first: HeaderIndex;
4314
4321
  last: HeaderIndex;
@@ -5423,6 +5430,7 @@ declare class Menu extends Component<Props$o, SpreadsheetChildEnv> {
5423
5430
  private menuRef;
5424
5431
  private position;
5425
5432
  setup(): void;
5433
+ get visibleMenuItems(): MenuItem[];
5426
5434
  get subMenuPosition(): DOMCoordinates;
5427
5435
  get menuHeight(): Pixel;
5428
5436
  get popoverProps(): PopoverProps;
@@ -5552,7 +5560,24 @@ declare class ContentEditableHelper {
5552
5560
  start: number;
5553
5561
  end: number;
5554
5562
  };
5555
- private findSizeBeforeElement;
5563
+ /**
5564
+ * Computes the text 'index' inside this.el based on the currently selected node and its offset.
5565
+ * The selected node is either a Text node or an Element node.
5566
+ *
5567
+ * case 1 -Text node:
5568
+ * the offset is the number of characters from the start of the node. We have to add this offset to the
5569
+ * content length of all previous nodes.
5570
+ *
5571
+ * case 2 - Element node:
5572
+ * the offset is the number of child nodes before the selected node. We have to add the content length of
5573
+ * all the bnodes prior to the selected node as well as the content of the child node before the offset.
5574
+ *
5575
+ * See the MDN documentation for more details.
5576
+ * https://developer.mozilla.org/en-US/docs/Web/API/Range/startOffset
5577
+ * https://developer.mozilla.org/en-US/docs/Web/API/Range/endOffset
5578
+ *
5579
+ */
5580
+ private findSelectionIndex;
5556
5581
  private getStartAndEndSelection;
5557
5582
  }
5558
5583