@odoo/o-spreadsheet 16.5.0-alpha.6 → 16.5.0-alpha.7

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.
@@ -432,6 +432,7 @@ interface LineChartDefinition {
432
432
  readonly labelsAsText: boolean;
433
433
  readonly stacked: boolean;
434
434
  readonly aggregated?: boolean;
435
+ readonly cumulative: boolean;
435
436
  }
436
437
  type LineChartRuntime = {
437
438
  chartJsConfig: ChartConfiguration;
@@ -498,6 +499,7 @@ interface ExcelChartDefinition {
498
499
  readonly verticalAxisPosition: VerticalAxisPosition;
499
500
  readonly legendPosition: LegendPosition;
500
501
  readonly stacked?: boolean;
502
+ readonly cumulative?: boolean;
501
503
  }
502
504
  interface ChartCreationContext {
503
505
  readonly range?: string[];
@@ -625,6 +627,7 @@ interface SheetData {
625
627
  areGridLinesVisible?: boolean;
626
628
  isVisible: boolean;
627
629
  panes?: PaneDivision;
630
+ headerGroups?: Record<Dimension, HeaderGroup[]>;
628
631
  }
629
632
  interface WorkbookSettings {
630
633
  locale: Locale;
@@ -1054,10 +1057,10 @@ type StatefulStream<Event, State> = {
1054
1057
  interface SelectionProcessor {
1055
1058
  selectZone(anchor: AnchorZone, options?: SelectionEventOptions): DispatchResult;
1056
1059
  selectCell(col: number, row: number): DispatchResult;
1057
- moveAnchorCell(direction: SelectionDirection, step: SelectionStep): DispatchResult;
1060
+ moveAnchorCell(direction: Direction, step: SelectionStep): DispatchResult;
1058
1061
  setAnchorCorner(col: number, row: number): DispatchResult;
1059
1062
  addCellToSelection(col: number, row: number): DispatchResult;
1060
- resizeAnchorZone(direction: SelectionDirection, step: SelectionStep): DispatchResult;
1063
+ resizeAnchorZone(direction: Direction, step: SelectionStep): DispatchResult;
1061
1064
  selectColumn(index: number, mode: SelectionEvent["mode"]): DispatchResult;
1062
1065
  selectRow(index: number, mode: SelectionEvent["mode"]): DispatchResult;
1063
1066
  selectAll(): DispatchResult;
@@ -1677,9 +1680,10 @@ type ClipboardPasteOptions = "onlyFormat" | "onlyValue";
1677
1680
  interface SheetDependentCommand {
1678
1681
  sheetId: UID;
1679
1682
  }
1680
- interface GridDependentCommand {
1683
+ interface HeadersDependentCommand {
1681
1684
  sheetId: UID;
1682
1685
  dimension: Dimension;
1686
+ elements: HeaderIndex[];
1683
1687
  }
1684
1688
  interface TargetDependentCommand {
1685
1689
  sheetId: UID;
@@ -1693,11 +1697,15 @@ interface PositionDependentCommand {
1693
1697
  col: number;
1694
1698
  row: number;
1695
1699
  }
1696
- declare const invalidateEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
1697
- declare const invalidateDependenciesCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "SORT_CELLS" | "SET_DECIMAL" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS">;
1698
- declare const invalidateCFEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
1699
- declare const readonlyAllowedCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "SORT_CELLS" | "SET_DECIMAL" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS">;
1700
- declare const coreTypes: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE">;
1700
+ interface ZoneDependentCommand {
1701
+ sheetId: UID;
1702
+ zone: Zone;
1703
+ }
1704
+ declare const invalidateEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
1705
+ declare const invalidateDependenciesCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES">;
1706
+ declare const invalidateCFEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
1707
+ declare const readonlyAllowedCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES">;
1708
+ declare const coreTypes: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE">;
1701
1709
  interface UpdateCellCommand extends PositionDependentCommand {
1702
1710
  type: "UPDATE_CELL";
1703
1711
  content?: string;
@@ -1711,31 +1719,32 @@ interface UpdateCellPositionCommand extends PositionDependentCommand {
1711
1719
  type: "UPDATE_CELL_POSITION";
1712
1720
  cellId?: UID;
1713
1721
  }
1714
- interface AddColumnsRowsCommand extends GridDependentCommand {
1722
+ interface AddColumnsRowsCommand extends SheetDependentCommand {
1715
1723
  type: "ADD_COLUMNS_ROWS";
1724
+ dimension: Dimension;
1716
1725
  base: HeaderIndex;
1717
1726
  quantity: number;
1718
1727
  position: "before" | "after";
1719
1728
  }
1720
- interface RemoveColumnsRowsCommand extends GridDependentCommand {
1729
+ interface RemoveColumnsRowsCommand extends HeadersDependentCommand {
1721
1730
  type: "REMOVE_COLUMNS_ROWS";
1722
1731
  elements: HeaderIndex[];
1723
1732
  }
1724
- interface MoveColumnsRowsCommand extends GridDependentCommand {
1733
+ interface MoveColumnsRowsCommand extends HeadersDependentCommand {
1725
1734
  type: "MOVE_COLUMNS_ROWS";
1726
1735
  base: HeaderIndex;
1727
1736
  elements: HeaderIndex[];
1728
1737
  }
1729
- interface ResizeColumnsRowsCommand extends GridDependentCommand {
1738
+ interface ResizeColumnsRowsCommand extends HeadersDependentCommand {
1730
1739
  type: "RESIZE_COLUMNS_ROWS";
1731
1740
  elements: number[];
1732
1741
  size: number | null;
1733
1742
  }
1734
- interface HideColumnsRowsCommand extends GridDependentCommand {
1743
+ interface HideColumnsRowsCommand extends HeadersDependentCommand {
1735
1744
  type: "HIDE_COLUMNS_ROWS";
1736
1745
  elements: HeaderIndex[];
1737
1746
  }
1738
- interface UnhideColumnsRowsCommand extends GridDependentCommand {
1747
+ interface UnhideColumnsRowsCommand extends HeadersDependentCommand {
1739
1748
  type: "UNHIDE_COLUMNS_ROWS";
1740
1749
  elements: HeaderIndex[];
1741
1750
  }
@@ -1903,6 +1912,51 @@ interface UpdateLocaleCommand {
1903
1912
  type: "UPDATE_LOCALE";
1904
1913
  locale: Locale;
1905
1914
  }
1915
+ interface RemoveDuplicatesCommand {
1916
+ type: "REMOVE_DUPLICATES";
1917
+ columns: HeaderIndex[];
1918
+ hasHeader: boolean;
1919
+ }
1920
+ interface GroupHeadersCommand extends SheetDependentCommand {
1921
+ type: "GROUP_HEADERS";
1922
+ dimension: Dimension;
1923
+ start: HeaderIndex;
1924
+ end: HeaderIndex;
1925
+ }
1926
+ interface UnGroupHeadersCommand extends SheetDependentCommand {
1927
+ type: "UNGROUP_HEADERS";
1928
+ dimension: Dimension;
1929
+ start: HeaderIndex;
1930
+ end: HeaderIndex;
1931
+ }
1932
+ interface FoldHeaderGroupCommand extends SheetDependentCommand {
1933
+ type: "FOLD_HEADER_GROUP";
1934
+ dimension: Dimension;
1935
+ start: HeaderIndex;
1936
+ end: HeaderIndex;
1937
+ }
1938
+ interface UnfoldHeaderGroupCommand extends SheetDependentCommand {
1939
+ type: "UNFOLD_HEADER_GROUP";
1940
+ dimension: Dimension;
1941
+ start: HeaderIndex;
1942
+ end: HeaderIndex;
1943
+ }
1944
+ interface FoldAllHeaderGroupsCommand extends SheetDependentCommand {
1945
+ type: "FOLD_ALL_HEADER_GROUPS";
1946
+ dimension: Dimension;
1947
+ }
1948
+ interface UnfoldAllHeaderGroupsCommand extends SheetDependentCommand {
1949
+ type: "UNFOLD_ALL_HEADER_GROUPS";
1950
+ dimension: Dimension;
1951
+ }
1952
+ interface UnfoldHeaderGroupsInZoneCommand extends ZoneDependentCommand {
1953
+ type: "UNFOLD_HEADER_GROUPS_IN_ZONE";
1954
+ dimension: Dimension;
1955
+ }
1956
+ interface FoldHeaderGroupsInZoneCommand extends ZoneDependentCommand {
1957
+ type: "FOLD_HEADER_GROUPS_IN_ZONE";
1958
+ dimension: Dimension;
1959
+ }
1906
1960
  interface CopyCommand {
1907
1961
  type: "COPY";
1908
1962
  }
@@ -2254,8 +2308,10 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
2254
2308
  /** Image */
2255
2309
  | CreateImageOverCommand
2256
2310
  /** FILTERS */
2257
- | CreateFilterTableCommand | RemoveFilterTableCommand | UpdateLocaleCommand;
2258
- type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | AddRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | CancelPaintFormatCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | StartChangeHighlightCommand | SetColorCommand | StopComposerSelectionCommand | StartEditionCommand | StopEditionCommand | SetCurrentContentCommand | ChangeComposerSelectionCommand | ReplaceComposerSelectionCommand | CycleEditionReferencesCommand | StartCommand | AutofillCommand | AutofillSelectCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | UpdateSearchCommand | ClearSearchCommand | SelectSearchPreviousCommand | SelectSearchNextCommand | ReplaceSearchCommand | ReplaceAllSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | OpenCellPopoverCommand | CloseCellPopoverCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand;
2311
+ | CreateFilterTableCommand | RemoveFilterTableCommand | UpdateLocaleCommand
2312
+ /** Grouping */
2313
+ | GroupHeadersCommand | UnGroupHeadersCommand | UnfoldHeaderGroupCommand | FoldHeaderGroupCommand | FoldAllHeaderGroupsCommand | UnfoldAllHeaderGroupsCommand | UnfoldHeaderGroupsInZoneCommand | FoldHeaderGroupsInZoneCommand;
2314
+ type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | AddRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | CancelPaintFormatCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | StartChangeHighlightCommand | SetColorCommand | StopComposerSelectionCommand | StartEditionCommand | StopEditionCommand | SetCurrentContentCommand | ChangeComposerSelectionCommand | ReplaceComposerSelectionCommand | CycleEditionReferencesCommand | StartCommand | AutofillCommand | AutofillSelectCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | UpdateSearchCommand | ClearSearchCommand | SelectSearchPreviousCommand | SelectSearchNextCommand | ReplaceSearchCommand | ReplaceAllSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | OpenCellPopoverCommand | CloseCellPopoverCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand;
2259
2315
  type Command = CoreCommand | LocalCommand;
2260
2316
  /**
2261
2317
  * Holds the result of a command dispatch.
@@ -2278,102 +2334,109 @@ declare class DispatchResult {
2278
2334
  }
2279
2335
  type CancelledReason = Exclude<CommandResult, CommandResult.Success>;
2280
2336
  declare const enum CommandResult {
2281
- Success = 0,
2282
- CancelledForUnknownReason = 1,
2283
- WillRemoveExistingMerge = 2,
2284
- MergeIsDestructive = 3,
2285
- CellIsMerged = 4,
2286
- InvalidTarget = 5,
2287
- EmptyUndoStack = 6,
2288
- EmptyRedoStack = 7,
2289
- NotEnoughElements = 8,
2290
- NotEnoughSheets = 9,
2291
- MissingSheetName = 10,
2292
- UnchangedSheetName = 11,
2293
- DuplicatedSheetName = 12,
2294
- DuplicatedSheetId = 13,
2295
- ForbiddenCharactersInSheetName = 14,
2296
- WrongSheetMove = 15,
2297
- WrongSheetPosition = 16,
2298
- InvalidAnchorZone = 17,
2299
- SelectionOutOfBound = 18,
2300
- TargetOutOfSheet = 19,
2301
- WrongCutSelection = 20,
2302
- WrongPasteSelection = 21,
2303
- WrongPasteOption = 22,
2304
- WrongFigurePasteOption = 23,
2305
- EmptyClipboard = 24,
2306
- EmptyRange = 25,
2307
- InvalidRange = 26,
2308
- InvalidZones = 27,
2309
- InvalidSheetId = 28,
2310
- InvalidFigureId = 29,
2311
- InputAlreadyFocused = 30,
2312
- MaximumRangesReached = 31,
2313
- InvalidChartDefinition = 32,
2314
- InvalidDataSet = 33,
2315
- InvalidLabelRange = 34,
2316
- InvalidScorecardKeyValue = 35,
2317
- InvalidScorecardBaseline = 36,
2318
- InvalidGaugeDataRange = 37,
2319
- EmptyGaugeRangeMin = 38,
2320
- GaugeRangeMinNaN = 39,
2321
- EmptyGaugeRangeMax = 40,
2322
- GaugeRangeMaxNaN = 41,
2323
- GaugeRangeMinBiggerThanRangeMax = 42,
2324
- GaugeLowerInflectionPointNaN = 43,
2325
- GaugeUpperInflectionPointNaN = 44,
2326
- GaugeLowerBiggerThanUpper = 45,
2327
- InvalidAutofillSelection = 46,
2328
- WrongComposerSelection = 47,
2329
- MinBiggerThanMax = 48,
2330
- LowerBiggerThanUpper = 49,
2331
- MidBiggerThanMax = 50,
2332
- MinBiggerThanMid = 51,
2333
- FirstArgMissing = 52,
2334
- SecondArgMissing = 53,
2335
- MinNaN = 54,
2336
- MidNaN = 55,
2337
- MaxNaN = 56,
2338
- ValueUpperInflectionNaN = 57,
2339
- ValueLowerInflectionNaN = 58,
2340
- MinInvalidFormula = 59,
2341
- MidInvalidFormula = 60,
2342
- MaxInvalidFormula = 61,
2343
- ValueUpperInvalidFormula = 62,
2344
- ValueLowerInvalidFormula = 63,
2345
- InvalidSortZone = 64,
2346
- WaitingSessionConfirmation = 65,
2347
- MergeOverlap = 66,
2348
- TooManyHiddenElements = 67,
2349
- Readonly = 68,
2350
- InvalidViewportSize = 69,
2351
- InvalidScrollingDirection = 70,
2352
- FigureDoesNotExist = 71,
2353
- InvalidConditionalFormatId = 72,
2354
- InvalidCellPopover = 73,
2355
- EmptyTarget = 74,
2356
- InvalidFreezeQuantity = 75,
2357
- FrozenPaneOverlap = 76,
2358
- ValuesNotChanged = 77,
2359
- InvalidFilterZone = 78,
2360
- FilterOverlap = 79,
2361
- FilterNotFound = 80,
2362
- MergeInFilter = 81,
2363
- NonContinuousTargets = 82,
2364
- DuplicatedFigureId = 83,
2365
- InvalidSelectionStep = 84,
2366
- DuplicatedChartId = 85,
2367
- ChartDoesNotExist = 86,
2368
- InvalidHeaderIndex = 87,
2369
- InvalidQuantity = 88,
2370
- MoreThanOneColumnSelected = 89,
2371
- EmptySplitSeparator = 90,
2372
- SplitWillOverwriteContent = 91,
2373
- NoSplitSeparatorInSelection = 92,
2374
- NoActiveSheet = 93,
2375
- InvalidLocale = 94,
2376
- AlreadyInPaintingFormatMode = 95
2337
+ Success = "Success",
2338
+ CancelledForUnknownReason = "CancelledForUnknownReason",
2339
+ WillRemoveExistingMerge = "WillRemoveExistingMerge",
2340
+ MergeIsDestructive = "MergeIsDestructive",
2341
+ CellIsMerged = "CellIsMerged",
2342
+ InvalidTarget = "InvalidTarget",
2343
+ EmptyUndoStack = "EmptyUndoStack",
2344
+ EmptyRedoStack = "EmptyRedoStack",
2345
+ NotEnoughElements = "NotEnoughElements",
2346
+ NotEnoughSheets = "NotEnoughSheets",
2347
+ MissingSheetName = "MissingSheetName",
2348
+ UnchangedSheetName = "UnchangedSheetName",
2349
+ DuplicatedSheetName = "DuplicatedSheetName",
2350
+ DuplicatedSheetId = "DuplicatedSheetId",
2351
+ ForbiddenCharactersInSheetName = "ForbiddenCharactersInSheetName",
2352
+ WrongSheetMove = "WrongSheetMove",
2353
+ WrongSheetPosition = "WrongSheetPosition",
2354
+ InvalidAnchorZone = "InvalidAnchorZone",
2355
+ SelectionOutOfBound = "SelectionOutOfBound",
2356
+ TargetOutOfSheet = "TargetOutOfSheet",
2357
+ WrongCutSelection = "WrongCutSelection",
2358
+ WrongPasteSelection = "WrongPasteSelection",
2359
+ WrongPasteOption = "WrongPasteOption",
2360
+ WrongFigurePasteOption = "WrongFigurePasteOption",
2361
+ EmptyClipboard = "EmptyClipboard",
2362
+ EmptyRange = "EmptyRange",
2363
+ InvalidRange = "InvalidRange",
2364
+ InvalidZones = "InvalidZones",
2365
+ InvalidSheetId = "InvalidSheetId",
2366
+ InvalidFigureId = "InvalidFigureId",
2367
+ InputAlreadyFocused = "InputAlreadyFocused",
2368
+ MaximumRangesReached = "MaximumRangesReached",
2369
+ InvalidChartDefinition = "InvalidChartDefinition",
2370
+ InvalidDataSet = "InvalidDataSet",
2371
+ InvalidLabelRange = "InvalidLabelRange",
2372
+ InvalidScorecardKeyValue = "InvalidScorecardKeyValue",
2373
+ InvalidScorecardBaseline = "InvalidScorecardBaseline",
2374
+ InvalidGaugeDataRange = "InvalidGaugeDataRange",
2375
+ EmptyGaugeRangeMin = "EmptyGaugeRangeMin",
2376
+ GaugeRangeMinNaN = "GaugeRangeMinNaN",
2377
+ EmptyGaugeRangeMax = "EmptyGaugeRangeMax",
2378
+ GaugeRangeMaxNaN = "GaugeRangeMaxNaN",
2379
+ GaugeRangeMinBiggerThanRangeMax = "GaugeRangeMinBiggerThanRangeMax",
2380
+ GaugeLowerInflectionPointNaN = "GaugeLowerInflectionPointNaN",
2381
+ GaugeUpperInflectionPointNaN = "GaugeUpperInflectionPointNaN",
2382
+ GaugeLowerBiggerThanUpper = "GaugeLowerBiggerThanUpper",
2383
+ InvalidAutofillSelection = "InvalidAutofillSelection",
2384
+ WrongComposerSelection = "WrongComposerSelection",
2385
+ MinBiggerThanMax = "MinBiggerThanMax",
2386
+ LowerBiggerThanUpper = "LowerBiggerThanUpper",
2387
+ MidBiggerThanMax = "MidBiggerThanMax",
2388
+ MinBiggerThanMid = "MinBiggerThanMid",
2389
+ FirstArgMissing = "FirstArgMissing",
2390
+ SecondArgMissing = "SecondArgMissing",
2391
+ MinNaN = "MinNaN",
2392
+ MidNaN = "MidNaN",
2393
+ MaxNaN = "MaxNaN",
2394
+ ValueUpperInflectionNaN = "ValueUpperInflectionNaN",
2395
+ ValueLowerInflectionNaN = "ValueLowerInflectionNaN",
2396
+ MinInvalidFormula = "MinInvalidFormula",
2397
+ MidInvalidFormula = "MidInvalidFormula",
2398
+ MaxInvalidFormula = "MaxInvalidFormula",
2399
+ ValueUpperInvalidFormula = "ValueUpperInvalidFormula",
2400
+ ValueLowerInvalidFormula = "ValueLowerInvalidFormula",
2401
+ InvalidSortZone = "InvalidSortZone",
2402
+ WaitingSessionConfirmation = "WaitingSessionConfirmation",
2403
+ MergeOverlap = "MergeOverlap",
2404
+ TooManyHiddenElements = "TooManyHiddenElements",
2405
+ Readonly = "Readonly",
2406
+ InvalidViewportSize = "InvalidViewportSize",
2407
+ InvalidScrollingDirection = "InvalidScrollingDirection",
2408
+ FigureDoesNotExist = "FigureDoesNotExist",
2409
+ InvalidConditionalFormatId = "InvalidConditionalFormatId",
2410
+ InvalidCellPopover = "InvalidCellPopover",
2411
+ EmptyTarget = "EmptyTarget",
2412
+ InvalidFreezeQuantity = "InvalidFreezeQuantity",
2413
+ FrozenPaneOverlap = "FrozenPaneOverlap",
2414
+ ValuesNotChanged = "ValuesNotChanged",
2415
+ InvalidFilterZone = "InvalidFilterZone",
2416
+ FilterOverlap = "FilterOverlap",
2417
+ FilterNotFound = "FilterNotFound",
2418
+ MergeInFilter = "MergeInFilter",
2419
+ NonContinuousTargets = "NonContinuousTargets",
2420
+ DuplicatedFigureId = "DuplicatedFigureId",
2421
+ InvalidSelectionStep = "InvalidSelectionStep",
2422
+ DuplicatedChartId = "DuplicatedChartId",
2423
+ ChartDoesNotExist = "ChartDoesNotExist",
2424
+ InvalidHeaderIndex = "InvalidHeaderIndex",
2425
+ InvalidQuantity = "InvalidQuantity",
2426
+ MoreThanOneColumnSelected = "MoreThanOneColumnSelected",
2427
+ EmptySplitSeparator = "EmptySplitSeparator",
2428
+ SplitWillOverwriteContent = "SplitWillOverwriteContent",
2429
+ NoSplitSeparatorInSelection = "NoSplitSeparatorInSelection",
2430
+ NoActiveSheet = "NoActiveSheet",
2431
+ InvalidLocale = "InvalidLocale",
2432
+ AlreadyInPaintingFormatMode = "AlreadyInPaintingFormatMode",
2433
+ MoreThanOneRangeSelected = "MoreThanOneRangeSelected",
2434
+ NoColumnsProvided = "NoColumnsProvided",
2435
+ ColumnsNotIncludedInZone = "ColumnsNotIncludedInZone",
2436
+ DuplicatesColumnsSelected = "DuplicatesColumnsSelected",
2437
+ InvalidHeaderGroupStartEnd = "InvalidHeaderGroupStartEnd",
2438
+ HeaderGroupAlreadyExists = "HeaderGroupAlreadyExists",
2439
+ UnknownHeaderGroup = "UnknownHeaderGroup"
2377
2440
  }
2378
2441
  interface CommandHandler<T> {
2379
2442
  allowDispatch(command: T): CommandResult | CommandResult[];
@@ -2639,6 +2702,13 @@ type ImmutableSet<T> = ReadonlySet<Immutable<T>>;
2639
2702
  type ImmutableObject<T> = {
2640
2703
  readonly [K in keyof T]: Immutable<T[K]>;
2641
2704
  };
2705
+ interface HeaderGroup {
2706
+ start: HeaderIndex;
2707
+ end: HeaderIndex;
2708
+ isFolded?: boolean;
2709
+ }
2710
+ type Direction = "up" | "down" | "left" | "right";
2711
+ type SelectionStep = number | "end";
2642
2712
 
2643
2713
  type LocaleCode = string & Alias;
2644
2714
  interface Locale {
@@ -3411,6 +3481,85 @@ declare class FiltersPlugin extends CorePlugin<FiltersState> implements FiltersS
3411
3481
  exportForExcel(data: ExcelWorkbookData): void;
3412
3482
  }
3413
3483
 
3484
+ interface State$6 {
3485
+ groups: Record<UID, Record<Dimension, HeaderGroup[]>>;
3486
+ }
3487
+ declare class HeaderGroupingPlugin extends CorePlugin<State$6> {
3488
+ static getters: readonly ["getHeaderGroups", "getGroupsLayers", "getVisibleGroupLayers", "getHeaderGroup", "getHeaderGroupsInZone", "isGroupFolded", "isRowFolded", "isColFolded"];
3489
+ private readonly groups;
3490
+ allowDispatch(cmd: CoreCommand): CommandResult;
3491
+ handle(cmd: CoreCommand): void;
3492
+ getHeaderGroups(sheetId: UID, dim: Dimension): HeaderGroup[];
3493
+ getHeaderGroup(sheetId: UID, dim: Dimension, start: number, end: number): HeaderGroup | undefined;
3494
+ getHeaderGroupsInZone(sheetId: UID, dim: Dimension, zone: Zone): HeaderGroup[];
3495
+ /**
3496
+ * Get all the groups of a sheet in a dimension, and return an array of layers of those groups.
3497
+ *
3498
+ * The layering rules are:
3499
+ * 1) A group containing another group should be on a layer above the group it contains
3500
+ * 2) The widest/highest groups should be on the left/top layer compared to the groups it contains
3501
+ * 3) The group should be on the left/top-most layer possible, barring intersections with other groups (see rules 1 and 2)
3502
+ */
3503
+ getGroupsLayers(sheetId: UID, dimension: Dimension): HeaderGroup[][];
3504
+ /**
3505
+ * Get all the groups of a sheet in a dimension, and return an array of layers of those groups,
3506
+ * excluding the groups that are totally hidden.
3507
+ */
3508
+ getVisibleGroupLayers(sheetId: UID, dimension: Dimension): HeaderGroup[][];
3509
+ isGroupFolded(sheetId: UID, dimension: Dimension, start: number, end: number): boolean;
3510
+ isRowFolded(sheetId: UID, row: HeaderIndex): boolean;
3511
+ isColFolded(sheetId: UID, col: HeaderIndex): boolean;
3512
+ private getGroupId;
3513
+ /**
3514
+ * To get layers of groups, and to add/remove headers from groups, we can see each header of a group as a brick. Each
3515
+ * brick falls down in the pile corresponding to its header, until it hits another brick, or the ground.
3516
+ *
3517
+ * With this abstraction, we can very simply group/ungroup headers from groups, and get the layers of groups.
3518
+ * - grouping headers is done by adding a brick to each header pile
3519
+ * - un-grouping headers is done by removing a brick from each header pile
3520
+ * - getting the layers of groups is done by simply letting the brick fall and checking the result
3521
+ *
3522
+ * Example:
3523
+ * We have 2 groups ([A=>E] and [C=>D]), and we want to group headers [C=>F]
3524
+ *
3525
+ * Headers : A B C D E F G A B C D E F G A B C D E F G
3526
+ * Headers to group: [C=>D]: _ _ [C=>F]: _ _ _ _
3527
+ * | | ==> | | | | ==> ==> Result: 3 groups
3528
+ * | | ˅ ˅ | | _ _ - [C=>D]
3529
+ * Groups: ˅ ˅ _ _ ˅ | _ _ _ - [C=>E]
3530
+ * Groups: _ _ _ _ _ _ _ _ _ _ ˅ _ _ _ _ _ _ - [A=>F]
3531
+
3532
+ * @param groups
3533
+ * @param start start of the range where to add/remove headers
3534
+ * @param end end of the range where to add/remove headers
3535
+ * @param delta -1: remove headers, 1: add headers, 0: get layers (don't add/remove anything)
3536
+ */
3537
+ private bricksFallingAlgorithm;
3538
+ private groupHeaders;
3539
+ /**
3540
+ * Ungroup the given headers. The headers will be taken out of the group they are in. This might split a group into two
3541
+ * if the headers were in the middle of a group. If multiple groups contains a header, it will only be taken out of the
3542
+ * lowest group in the layering of the groups.
3543
+ */
3544
+ private unGroupHeaders;
3545
+ private moveGroupsOnHeaderInsertion;
3546
+ private moveGroupsOnHeaderDeletion;
3547
+ private doGroupOverlap;
3548
+ private removeDuplicateGroups;
3549
+ private findGroupWithStartEnd;
3550
+ /**
3551
+ * Fold the given group, and all the groups starting at the same index that are contained inside the given group.
3552
+ */
3553
+ private foldHeaderGroup;
3554
+ /**
3555
+ * Unfold the given group, and all the groups starting at the same index that contain the given group.
3556
+ */
3557
+ private unfoldHeaderGroup;
3558
+ private getGroupIndex;
3559
+ import(data: WorkbookData): void;
3560
+ export(data: WorkbookData): void;
3561
+ }
3562
+
3414
3563
  interface HeaderSizeState$1 {
3415
3564
  sizes: Record<UID, Record<Dimension, Array<Pixel | undefined>>>;
3416
3565
  }
@@ -3432,11 +3581,12 @@ declare class HeaderSizePlugin extends CorePlugin<HeaderSizeState$1> implements
3432
3581
  }
3433
3582
 
3434
3583
  declare class HeaderVisibilityPlugin extends CorePlugin {
3435
- static getters: readonly ["canRemoveHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isRowHiddenByUser", "isColHiddenByUser"];
3584
+ static getters: readonly ["checkElementsIncludeAllVisibleHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isHeaderHiddenByUser", "isRowHiddenByUser", "isColHiddenByUser"];
3436
3585
  private readonly hiddenHeaders;
3437
3586
  allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements | CommandResult.InvalidHeaderIndex;
3438
3587
  handle(cmd: Command): void;
3439
- canRemoveHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
3588
+ checkElementsIncludeAllVisibleHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
3589
+ isHeaderHiddenByUser(sheetId: UID, dimension: Dimension, index: HeaderIndex): boolean;
3440
3590
  isRowHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
3441
3591
  isColHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
3442
3592
  getHiddenColsGroups(sheetId: UID): ConsecutiveIndexes[];
@@ -3573,7 +3723,7 @@ interface SheetState$1 {
3573
3723
  readonly cellPosition: Record<UID, CellPosition | undefined>;
3574
3724
  }
3575
3725
  declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState$1 {
3576
- static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "isEmpty", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone"];
3726
+ static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "isEmpty", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone", "checkElementsIncludeAllNonFrozenHeaders"];
3577
3727
  readonly sheetIdsMapName: Record<string, UID | undefined>;
3578
3728
  readonly orderedSheetIds: UID[];
3579
3729
  readonly sheets: Record<UID, Sheet | undefined>;
@@ -3601,6 +3751,7 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
3601
3751
  getVisibleSheetIds(): UID[];
3602
3752
  getEvaluationSheets(): Record<UID, Sheet | undefined>;
3603
3753
  doesHeaderExist(sheetId: UID, dimension: Dimension, index: number): boolean;
3754
+ doesHeadersExist(sheetId: UID, dimension: Dimension, headerIndexes: HeaderIndex[]): boolean;
3604
3755
  getRow(sheetId: UID, index: HeaderIndex): Row;
3605
3756
  getCell({ sheetId, col, row }: CellPosition): Cell | undefined;
3606
3757
  getColsZone(sheetId: UID, start: HeaderIndex, end: HeaderIndex): Zone;
@@ -3616,6 +3767,11 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
3616
3767
  getUnboundedZone(sheetId: UID, zone: Zone): UnboundedZone;
3617
3768
  getPaneDivisions(sheetId: UID): Readonly<PaneDivision>;
3618
3769
  private setPaneDivisions;
3770
+ /**
3771
+ * Checks if all non-frozen header indices are present in the provided elements of selected rows/columns.
3772
+ * This validation ensures that all rows or columns cannot be deleted when frozen panes exist.
3773
+ */
3774
+ checkElementsIncludeAllNonFrozenHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
3619
3775
  /**
3620
3776
  * Check if a zone only contains empty cells
3621
3777
  */
@@ -4820,7 +4976,8 @@ type ConditionalFormatGetters = Pick<ConditionalFormatPlugin, GetterNames<typeof
4820
4976
  type LocalHistoryGetters = Pick<HistoryPlugin, GetterNames<typeof HistoryPlugin>>;
4821
4977
  type FiltersGetters = Pick<FiltersPlugin, GetterNames<typeof FiltersPlugin>>;
4822
4978
  type SettingsGetters = Pick<SettingsPlugin, GetterNames<typeof SettingsPlugin>>;
4823
- type CoreGetters = SheetGetters & HeaderSizeGetters & HeaderVisibilityGetters & CellGetters & MergeGetters & BordersGetters & ChartGetters & ImageGetters & ConditionalFormatGetters & FigureGetters & RangeAdapterGetters & FiltersGetters & SettingsGetters;
4979
+ type HeaderGroupingGetters = Pick<HeaderGroupingPlugin, GetterNames<typeof HeaderGroupingPlugin>>;
4980
+ type CoreGetters = SheetGetters & HeaderSizeGetters & HeaderVisibilityGetters & CellGetters & MergeGetters & BordersGetters & ChartGetters & ImageGetters & ConditionalFormatGetters & FigureGetters & RangeAdapterGetters & FiltersGetters & SettingsGetters & HeaderGroupingGetters;
4824
4981
  type AutofillGetters = Pick<AutofillPlugin, GetterNames<typeof AutofillPlugin>>;
4825
4982
  type AutomaticSumGetters = Pick<AutomaticSumPlugin, GetterNames<typeof AutomaticSumPlugin>>;
4826
4983
  type ClipboardGetters = Pick<ClipboardPlugin, GetterNames<typeof ClipboardPlugin>>;
@@ -4877,9 +5034,6 @@ interface TransformationFactory<T = unknown> {
4877
5034
  with: (operation: T) => Transformation<T>;
4878
5035
  }
4879
5036
 
4880
- type SelectionDirection = "up" | "down" | "left" | "right";
4881
- type SelectionStep = number | "end";
4882
-
4883
5037
  type CellPopoverType = "ErrorToolTip" | "LinkDisplay" | "FilterMenu" | "LinkEditor";
4884
5038
  type PopoverPropsPosition = "TopRight" | "BottomLeft";
4885
5039
  type MaxSizedComponentConstructor = ComponentConstructor & {
@@ -5029,7 +5183,7 @@ interface ChartBuilder {
5029
5183
  sequence: number;
5030
5184
  }
5031
5185
 
5032
- interface Props$F {
5186
+ interface Props$H {
5033
5187
  ranges: () => string[];
5034
5188
  hasSingleRange?: boolean;
5035
5189
  required?: boolean;
@@ -5051,7 +5205,7 @@ interface SelectionRange extends Omit<RangeInputValue, "color"> {
5051
5205
  * onSelectionChanged is called every time the input value
5052
5206
  * changes.
5053
5207
  */
5054
- declare class SelectionInput extends Component<Props$F, SpreadsheetChildEnv> {
5208
+ declare class SelectionInput extends Component<Props$H, SpreadsheetChildEnv> {
5055
5209
  static template: string;
5056
5210
  private id;
5057
5211
  private previousRanges;
@@ -5080,22 +5234,22 @@ declare class SelectionInput extends Component<Props$F, SpreadsheetChildEnv> {
5080
5234
  confirm(): void;
5081
5235
  }
5082
5236
 
5083
- interface Props$E {
5237
+ interface Props$G {
5084
5238
  messages: string[];
5085
5239
  msgType: "warning" | "error";
5086
5240
  }
5087
- declare class SidePanelErrors extends Component<Props$E, SpreadsheetChildEnv> {
5241
+ declare class SidePanelErrors extends Component<Props$G, SpreadsheetChildEnv> {
5088
5242
  static template: string;
5089
5243
  get divClasses(): "o-sidepanel-warning text-warning" | "o-sidepanel-error text-danger";
5090
5244
  }
5091
5245
 
5092
- interface Props$D {
5246
+ interface Props$F {
5093
5247
  figureId: UID;
5094
5248
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
5095
5249
  canUpdateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5096
5250
  updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5097
5251
  }
5098
- declare class LineBarPieConfigPanel extends Component<Props$D, SpreadsheetChildEnv> {
5252
+ declare class LineBarPieConfigPanel extends Component<Props$F, SpreadsheetChildEnv> {
5099
5253
  static template: string;
5100
5254
  static components: {
5101
5255
  SelectionInput: typeof SelectionInput;
@@ -5136,6 +5290,7 @@ declare class BarConfigPanel extends LineBarPieConfigPanel {
5136
5290
  declare enum ComponentsImportance {
5137
5291
  Grid = 0,
5138
5292
  Highlight = 5,
5293
+ HeaderGroupingButton = 6,
5139
5294
  Figure = 10,
5140
5295
  ScrollBar = 15,
5141
5296
  GridPopover = 19,
@@ -5223,7 +5378,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
5223
5378
  isSameColor(color1: Color, color2: Color): boolean;
5224
5379
  }
5225
5380
 
5226
- interface Props$C {
5381
+ interface Props$E {
5227
5382
  currentColor: string | undefined;
5228
5383
  toggleColorPicker: () => void;
5229
5384
  showColorPicker: boolean;
@@ -5234,7 +5389,7 @@ interface Props$C {
5234
5389
  dropdownMaxHeight?: Pixel;
5235
5390
  class?: string;
5236
5391
  }
5237
- declare class ColorPickerWidget extends Component<Props$C, SpreadsheetChildEnv> {
5392
+ declare class ColorPickerWidget extends Component<Props$E, SpreadsheetChildEnv> {
5238
5393
  static template: string;
5239
5394
  static components: {
5240
5395
  ColorPicker: typeof ColorPicker;
@@ -5246,13 +5401,13 @@ declare class ColorPickerWidget extends Component<Props$C, SpreadsheetChildEnv>
5246
5401
  get colorPickerAnchorRect(): Rect;
5247
5402
  }
5248
5403
 
5249
- interface Props$B {
5404
+ interface Props$D {
5250
5405
  figureId: UID;
5251
5406
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
5252
5407
  canUpdateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5253
5408
  updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5254
5409
  }
5255
- declare class LineBarPieDesignPanel extends Component<Props$B, SpreadsheetChildEnv> {
5410
+ declare class LineBarPieDesignPanel extends Component<Props$D, SpreadsheetChildEnv> {
5256
5411
  static template: string;
5257
5412
  static components: {
5258
5413
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5266,13 +5421,13 @@ declare class LineBarPieDesignPanel extends Component<Props$B, SpreadsheetChildE
5266
5421
  updateSelect(attr: string, ev: any): void;
5267
5422
  }
5268
5423
 
5269
- interface Props$A {
5424
+ interface Props$C {
5270
5425
  figureId: UID;
5271
5426
  definition: GaugeChartDefinition;
5272
5427
  canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5273
5428
  updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5274
5429
  }
5275
- declare class GaugeChartConfigPanel extends Component<Props$A, SpreadsheetChildEnv> {
5430
+ declare class GaugeChartConfigPanel extends Component<Props$C, SpreadsheetChildEnv> {
5276
5431
  static template: string;
5277
5432
  static components: {
5278
5433
  SelectionInput: typeof SelectionInput;
@@ -5288,13 +5443,13 @@ declare class GaugeChartConfigPanel extends Component<Props$A, SpreadsheetChildE
5288
5443
  }
5289
5444
 
5290
5445
  type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
5291
- interface Props$z {
5446
+ interface Props$B {
5292
5447
  figureId: UID;
5293
5448
  definition: GaugeChartDefinition;
5294
5449
  canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5295
5450
  updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5296
5451
  }
5297
- declare class GaugeChartDesignPanel extends Component<Props$z, SpreadsheetChildEnv> {
5452
+ declare class GaugeChartDesignPanel extends Component<Props$B, SpreadsheetChildEnv> {
5298
5453
  static template: string;
5299
5454
  static components: {
5300
5455
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5322,15 +5477,16 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
5322
5477
  onUpdateLabelsAsText(ev: any): void;
5323
5478
  onUpdateStacked(ev: any): void;
5324
5479
  onUpdateAggregated(ev: any): void;
5480
+ onUpdateCumulative(ev: any): void;
5325
5481
  }
5326
5482
 
5327
- interface Props$y {
5483
+ interface Props$A {
5328
5484
  figureId: UID;
5329
5485
  definition: ScorecardChartDefinition;
5330
5486
  canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5331
5487
  updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5332
5488
  }
5333
- declare class ScorecardChartConfigPanel extends Component<Props$y, SpreadsheetChildEnv> {
5489
+ declare class ScorecardChartConfigPanel extends Component<Props$A, SpreadsheetChildEnv> {
5334
5490
  static template: string;
5335
5491
  static components: {
5336
5492
  SelectionInput: typeof SelectionInput;
@@ -5352,13 +5508,13 @@ declare class ScorecardChartConfigPanel extends Component<Props$y, SpreadsheetCh
5352
5508
  }
5353
5509
 
5354
5510
  type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
5355
- interface Props$x {
5511
+ interface Props$z {
5356
5512
  figureId: UID;
5357
5513
  definition: ScorecardChartDefinition;
5358
5514
  canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5359
5515
  updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5360
5516
  }
5361
- declare class ScorecardChartDesignPanel extends Component<Props$x, SpreadsheetChildEnv> {
5517
+ declare class ScorecardChartDesignPanel extends Component<Props$z, SpreadsheetChildEnv> {
5362
5518
  static template: string;
5363
5519
  static components: {
5364
5520
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5502,10 +5658,10 @@ interface AutofillRule {
5502
5658
  sequence: number;
5503
5659
  }
5504
5660
 
5505
- interface Props$w {
5661
+ interface Props$y {
5506
5662
  figure: Figure;
5507
5663
  }
5508
- declare class ChartJsComponent extends Component<Props$w, SpreadsheetChildEnv> {
5664
+ declare class ChartJsComponent extends Component<Props$y, SpreadsheetChildEnv> {
5509
5665
  static template: string;
5510
5666
  private canvas;
5511
5667
  private chart?;
@@ -5517,10 +5673,10 @@ declare class ChartJsComponent extends Component<Props$w, SpreadsheetChildEnv> {
5517
5673
  private updateChartJs;
5518
5674
  }
5519
5675
 
5520
- interface Props$v {
5676
+ interface Props$x {
5521
5677
  figure: Figure;
5522
5678
  }
5523
- declare class ScorecardChart extends Component<Props$v, SpreadsheetChildEnv> {
5679
+ declare class ScorecardChart extends Component<Props$x, SpreadsheetChildEnv> {
5524
5680
  static template: string;
5525
5681
  private ctx;
5526
5682
  get runtime(): ScorecardChartRuntime;
@@ -5553,7 +5709,7 @@ declare class ScorecardChart extends Component<Props$v, SpreadsheetChildEnv> {
5553
5709
  }
5554
5710
 
5555
5711
  type MenuItemOrSeparator = Action | "separator";
5556
- interface Props$u {
5712
+ interface Props$w {
5557
5713
  position: DOMCoordinates;
5558
5714
  menuItems: Action[];
5559
5715
  depth: number;
@@ -5569,7 +5725,7 @@ interface MenuState {
5569
5725
  scrollOffset?: Pixel;
5570
5726
  menuItems: Action[];
5571
5727
  }
5572
- declare class Menu extends Component<Props$u, SpreadsheetChildEnv> {
5728
+ declare class Menu extends Component<Props$w, SpreadsheetChildEnv> {
5573
5729
  static template: string;
5574
5730
  static components: {
5575
5731
  Menu: typeof Menu;
@@ -5607,14 +5763,14 @@ declare class Menu extends Component<Props$u, SpreadsheetChildEnv> {
5607
5763
  }
5608
5764
 
5609
5765
  type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
5610
- interface Props$t {
5766
+ interface Props$v {
5611
5767
  figure: Figure;
5612
5768
  style: string;
5613
5769
  onFigureDeleted: () => void;
5614
5770
  onMouseDown: (ev: MouseEvent) => void;
5615
5771
  onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
5616
5772
  }
5617
- declare class FigureComponent extends Component<Props$t, SpreadsheetChildEnv> {
5773
+ declare class FigureComponent extends Component<Props$v, SpreadsheetChildEnv> {
5618
5774
  static template: string;
5619
5775
  static components: {
5620
5776
  Menu: typeof Menu;
@@ -5644,11 +5800,11 @@ declare class FigureComponent extends Component<Props$t, SpreadsheetChildEnv> {
5644
5800
  private openContextMenu;
5645
5801
  }
5646
5802
 
5647
- interface Props$s {
5803
+ interface Props$u {
5648
5804
  figure: Figure;
5649
5805
  onFigureDeleted: () => void;
5650
5806
  }
5651
- declare class ChartFigure extends Component<Props$s, SpreadsheetChildEnv> {
5807
+ declare class ChartFigure extends Component<Props$u, SpreadsheetChildEnv> {
5652
5808
  static template: string;
5653
5809
  static components: {};
5654
5810
  onDoubleClick(): void;
@@ -5656,7 +5812,7 @@ declare class ChartFigure extends Component<Props$s, SpreadsheetChildEnv> {
5656
5812
  get chartComponent(): new (...args: any) => Component;
5657
5813
  }
5658
5814
 
5659
- interface Props$r {
5815
+ interface Props$t {
5660
5816
  isVisible: boolean;
5661
5817
  position: Position;
5662
5818
  }
@@ -5668,7 +5824,7 @@ interface State$5 {
5668
5824
  position: Position;
5669
5825
  handler: boolean;
5670
5826
  }
5671
- declare class Autofill extends Component<Props$r, SpreadsheetChildEnv> {
5827
+ declare class Autofill extends Component<Props$t, SpreadsheetChildEnv> {
5672
5828
  static template: string;
5673
5829
  state: State$5;
5674
5830
  get style(): string;
@@ -5742,13 +5898,13 @@ declare class Ripple extends Component<RippleProps, SpreadsheetChildEnv> {
5742
5898
  getRippleEffectProps(id: number): RippleEffectProps;
5743
5899
  }
5744
5900
 
5745
- interface Props$q {
5901
+ interface Props$s {
5746
5902
  sheetId: string;
5747
5903
  openContextMenu: (registry: MenuItemRegistry, ev: MouseEvent) => void;
5748
5904
  style?: string;
5749
5905
  onMouseDown: (ev: MouseEvent) => void;
5750
5906
  }
5751
- declare class BottomBarSheet extends Component<Props$q, SpreadsheetChildEnv> {
5907
+ declare class BottomBarSheet extends Component<Props$s, SpreadsheetChildEnv> {
5752
5908
  static template: string;
5753
5909
  static components: {
5754
5910
  Ripple: typeof Ripple;
@@ -5782,11 +5938,11 @@ declare class BottomBarSheet extends Component<Props$q, SpreadsheetChildEnv> {
5782
5938
  get sheetName(): string;
5783
5939
  }
5784
5940
 
5785
- interface Props$p {
5941
+ interface Props$r {
5786
5942
  openContextMenu: (x: number, y: number, registry: MenuItemRegistry) => void;
5787
5943
  closeContextMenu: () => void;
5788
5944
  }
5789
- declare class BottomBarStatistic extends Component<Props$p, SpreadsheetChildEnv> {
5945
+ declare class BottomBarStatistic extends Component<Props$r, SpreadsheetChildEnv> {
5790
5946
  static template: string;
5791
5947
  static components: {
5792
5948
  Ripple: typeof Ripple;
@@ -5808,13 +5964,13 @@ interface SheetState {
5808
5964
  isDnd: boolean;
5809
5965
  sheetDndPositions: Record<UID, number> | undefined;
5810
5966
  }
5811
- interface Props$o {
5967
+ interface Props$q {
5812
5968
  onClick: () => void;
5813
5969
  }
5814
5970
  interface BottomBarMenuState extends MenuState {
5815
5971
  menuId: UID | undefined;
5816
5972
  }
5817
- declare class BottomBar extends Component<Props$o, SpreadsheetChildEnv> {
5973
+ declare class BottomBar extends Component<Props$q, SpreadsheetChildEnv> {
5818
5974
  static template: string;
5819
5975
  static components: {
5820
5976
  Menu: typeof Menu;
@@ -5857,21 +6013,21 @@ declare class BottomBar extends Component<Props$o, SpreadsheetChildEnv> {
5857
6013
  get sheetListMaxScroll(): number;
5858
6014
  }
5859
6015
 
5860
- interface Props$n {
6016
+ interface Props$p {
5861
6017
  position: DOMCoordinates;
5862
6018
  isActive: boolean;
5863
6019
  onClick: () => void;
5864
6020
  }
5865
- declare class FilterIcon extends Component<Props$n, SpreadsheetEnv> {
6021
+ declare class FilterIcon extends Component<Props$p, SpreadsheetEnv> {
5866
6022
  static style: string;
5867
6023
  static template: string;
5868
6024
  get style(): string;
5869
6025
  }
5870
6026
 
5871
- interface Props$m {
6027
+ interface Props$o {
5872
6028
  gridPosition: DOMCoordinates;
5873
6029
  }
5874
- declare class FilterIconsOverlay extends Component<Props$m, SpreadsheetChildEnv> {
6030
+ declare class FilterIconsOverlay extends Component<Props$o, SpreadsheetChildEnv> {
5875
6031
  static style: string;
5876
6032
  static template: string;
5877
6033
  static components: {
@@ -5901,7 +6057,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
5901
6057
  }
5902
6058
 
5903
6059
  type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
5904
- interface Props$l {
6060
+ interface Props$n {
5905
6061
  onFigureDeleted: () => void;
5906
6062
  }
5907
6063
  interface Container {
@@ -5980,7 +6136,7 @@ interface DndState {
5980
6136
  * that occurred during the drag & drop, and to position the figure on the correct pane.
5981
6137
  *
5982
6138
  */
5983
- declare class FiguresContainer extends Component<Props$l, SpreadsheetChildEnv> {
6139
+ declare class FiguresContainer extends Component<Props$n, SpreadsheetChildEnv> {
5984
6140
  static template: string;
5985
6141
  static components: {
5986
6142
  FigureComponent: typeof FigureComponent;
@@ -6012,7 +6168,7 @@ declare class FiguresContainer extends Component<Props$l, SpreadsheetChildEnv> {
6012
6168
  private getSnapLineStyle;
6013
6169
  }
6014
6170
 
6015
- interface Props$k {
6171
+ interface Props$m {
6016
6172
  onCellHovered: (position: Partial<Position$1>) => void;
6017
6173
  onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
6018
6174
  onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
@@ -6020,12 +6176,12 @@ interface Props$k {
6020
6176
  shiftKey: boolean;
6021
6177
  }) => void;
6022
6178
  onCellRightClicked: (col: HeaderIndex, row: HeaderIndex, coordinates: DOMCoordinates) => void;
6023
- onGridResized: (dimension: DOMDimension) => void;
6179
+ onGridResized: (dimension: Rect) => void;
6024
6180
  onGridMoved: (deltaX: Pixel, deltaY: Pixel) => void;
6025
6181
  gridOverlayDimensions: string;
6026
6182
  onFigureDeleted: () => void;
6027
6183
  }
6028
- declare class GridOverlay extends Component<Props$k, SpreadsheetChildEnv> {
6184
+ declare class GridOverlay extends Component<Props$m, SpreadsheetChildEnv> {
6029
6185
  static template: string;
6030
6186
  static components: {
6031
6187
  FiguresContainer: typeof FiguresContainer;
@@ -6049,13 +6205,13 @@ declare class GridOverlay extends Component<Props$k, SpreadsheetChildEnv> {
6049
6205
  private getCartesianCoordinates;
6050
6206
  }
6051
6207
 
6052
- interface Props$j {
6208
+ interface Props$l {
6053
6209
  hoveredCell: Partial<Position$1>;
6054
6210
  gridRect: Rect;
6055
6211
  onClosePopover: () => void;
6056
6212
  onMouseWheel: (ev: WheelEvent) => void;
6057
6213
  }
6058
- declare class GridPopover extends Component<Props$j, SpreadsheetChildEnv> {
6214
+ declare class GridPopover extends Component<Props$l, SpreadsheetChildEnv> {
6059
6215
  static template: string;
6060
6216
  static components: {
6061
6217
  Popover: typeof Popover;
@@ -6066,7 +6222,7 @@ declare class GridPopover extends Component<Props$j, SpreadsheetChildEnv> {
6066
6222
 
6067
6223
  type ScrollDirection = "horizontal" | "vertical";
6068
6224
 
6069
- interface Props$i {
6225
+ interface Props$k {
6070
6226
  width: Pixel;
6071
6227
  height: Pixel;
6072
6228
  direction: ScrollDirection;
@@ -6074,7 +6230,7 @@ interface Props$i {
6074
6230
  offset: Pixel;
6075
6231
  onScroll: (offset: Pixel) => void;
6076
6232
  }
6077
- declare class ScrollBar extends Component<Props$i> {
6233
+ declare class ScrollBar extends Component<Props$k> {
6078
6234
  static template: string;
6079
6235
  static defaultProps: {
6080
6236
  width: number;
@@ -6088,10 +6244,10 @@ declare class ScrollBar extends Component<Props$i> {
6088
6244
  onScroll(ev: any): void;
6089
6245
  }
6090
6246
 
6091
- interface Props$h {
6247
+ interface Props$j {
6092
6248
  leftOffset: number;
6093
6249
  }
6094
- declare class HorizontalScrollBar extends Component<Props$h, SpreadsheetChildEnv> {
6250
+ declare class HorizontalScrollBar extends Component<Props$j, SpreadsheetChildEnv> {
6095
6251
  static components: {
6096
6252
  ScrollBar: typeof ScrollBar;
6097
6253
  };
@@ -6111,10 +6267,10 @@ declare class HorizontalScrollBar extends Component<Props$h, SpreadsheetChildEnv
6111
6267
  onScroll(offset: any): void;
6112
6268
  }
6113
6269
 
6114
- interface Props$g {
6270
+ interface Props$i {
6115
6271
  topOffset: number;
6116
6272
  }
6117
- declare class VerticalScrollBar extends Component<Props$g, SpreadsheetChildEnv> {
6273
+ declare class VerticalScrollBar extends Component<Props$i, SpreadsheetChildEnv> {
6118
6274
  static components: {
6119
6275
  ScrollBar: typeof ScrollBar;
6120
6276
  };
@@ -6134,7 +6290,7 @@ declare class VerticalScrollBar extends Component<Props$g, SpreadsheetChildEnv>
6134
6290
  onScroll(offset: any): void;
6135
6291
  }
6136
6292
 
6137
- interface Props$f {
6293
+ interface Props$h {
6138
6294
  }
6139
6295
  interface ClickableCell {
6140
6296
  coordinates: Rect;
@@ -6142,7 +6298,7 @@ interface ClickableCell {
6142
6298
  action: (position: CellPosition, env: SpreadsheetChildEnv) => void;
6143
6299
  tKey: string;
6144
6300
  }
6145
- declare class SpreadsheetDashboard extends Component<Props$f, SpreadsheetChildEnv> {
6301
+ declare class SpreadsheetDashboard extends Component<Props$h, SpreadsheetChildEnv> {
6146
6302
  static template: string;
6147
6303
  static components: {
6148
6304
  GridOverlay: typeof GridOverlay;
@@ -6178,6 +6334,66 @@ declare class SpreadsheetDashboard extends Component<Props$f, SpreadsheetChildEn
6178
6334
  private getGridRect;
6179
6335
  }
6180
6336
 
6337
+ interface Props$g {
6338
+ group: HeaderGroup;
6339
+ layerOffset: number;
6340
+ openContextMenu(position: DOMCoordinates, menuItems: Action[]): void;
6341
+ }
6342
+ interface GroupBox {
6343
+ groupRect: Rect;
6344
+ headerRect: Rect;
6345
+ isEndHidden: boolean;
6346
+ }
6347
+ declare abstract class AbstractHeaderGroup extends Component<Props$g, SpreadsheetChildEnv> {
6348
+ static template: string;
6349
+ abstract dimension: Dimension;
6350
+ toggleGroup(): void;
6351
+ get groupBoxStyle(): string;
6352
+ abstract get groupBorderStyle(): string;
6353
+ abstract get groupHeaderStyle(): string;
6354
+ get groupButtonStyle(): string;
6355
+ get groupButtonIcon(): string;
6356
+ get isGroupFolded(): boolean;
6357
+ /** The box that will be used to draw the header group. */
6358
+ abstract get groupBox(): GroupBox;
6359
+ onContextMenu(ev: MouseEvent): void;
6360
+ }
6361
+ declare class RowGroup extends AbstractHeaderGroup {
6362
+ dimension: Dimension;
6363
+ get groupBorderStyle(): string;
6364
+ get groupHeaderStyle(): string;
6365
+ get groupBox(): GroupBox;
6366
+ }
6367
+ declare class ColGroup extends AbstractHeaderGroup {
6368
+ dimension: Dimension;
6369
+ get groupBorderStyle(): string;
6370
+ get groupHeaderStyle(): string;
6371
+ get groupBox(): GroupBox;
6372
+ }
6373
+
6374
+ interface Props$f {
6375
+ dimension: Dimension;
6376
+ layers: HeaderGroup[][];
6377
+ }
6378
+ declare class HeaderGroupContainer extends Component<Props$f, SpreadsheetChildEnv> {
6379
+ static template: string;
6380
+ static components: {
6381
+ RowGroup: typeof RowGroup;
6382
+ ColGroup: typeof ColGroup;
6383
+ Menu: typeof Menu;
6384
+ };
6385
+ menu: MenuState;
6386
+ getLayerOffset(layerIndex: number): number;
6387
+ onContextMenu(event: MouseEvent): void;
6388
+ openContextMenu(position: DOMCoordinates, menuItems: Action[]): void;
6389
+ closeMenu(): void;
6390
+ get groupComponent(): typeof RowGroup;
6391
+ get hasFrozenPane(): boolean;
6392
+ get scrollContainerStyle(): string;
6393
+ get frozenPaneContainerStyle(): string;
6394
+ get frozenPaneContainerSize(): Pixel;
6395
+ }
6396
+
6181
6397
  interface Props$e {
6182
6398
  component: string;
6183
6399
  panelProps: any;
@@ -6392,7 +6608,13 @@ declare const freezeCurrentCol: ActionSpec;
6392
6608
  declare const viewGridlines: ActionSpec;
6393
6609
  declare const viewFormulas: ActionSpec;
6394
6610
  declare const createRemoveFilter: ActionSpec;
6611
+ declare const groupColumns: ActionSpec;
6612
+ declare const groupRows: ActionSpec;
6613
+ declare const ungroupColumns: ActionSpec;
6614
+ declare const ungroupRows: ActionSpec;
6615
+ declare function canUngroupHeaders(env: SpreadsheetChildEnv, dimension: Dimension): boolean;
6395
6616
 
6617
+ declare const ACTION_VIEW_canUngroupHeaders: typeof canUngroupHeaders;
6396
6618
  declare const ACTION_VIEW_createRemoveFilter: typeof createRemoveFilter;
6397
6619
  declare const ACTION_VIEW_freezeCurrentCol: typeof freezeCurrentCol;
6398
6620
  declare const ACTION_VIEW_freezeCurrentRow: typeof freezeCurrentRow;
@@ -6401,11 +6623,15 @@ declare const ACTION_VIEW_freezeFirstRow: typeof freezeFirstRow;
6401
6623
  declare const ACTION_VIEW_freezePane: typeof freezePane;
6402
6624
  declare const ACTION_VIEW_freezeSecondCol: typeof freezeSecondCol;
6403
6625
  declare const ACTION_VIEW_freezeSecondRow: typeof freezeSecondRow;
6626
+ declare const ACTION_VIEW_groupColumns: typeof groupColumns;
6627
+ declare const ACTION_VIEW_groupRows: typeof groupRows;
6404
6628
  declare const ACTION_VIEW_hideCols: typeof hideCols;
6405
6629
  declare const ACTION_VIEW_hideRows: typeof hideRows;
6406
6630
  declare const ACTION_VIEW_unFreezeCols: typeof unFreezeCols;
6407
6631
  declare const ACTION_VIEW_unFreezePane: typeof unFreezePane;
6408
6632
  declare const ACTION_VIEW_unFreezeRows: typeof unFreezeRows;
6633
+ declare const ACTION_VIEW_ungroupColumns: typeof ungroupColumns;
6634
+ declare const ACTION_VIEW_ungroupRows: typeof ungroupRows;
6409
6635
  declare const ACTION_VIEW_unhideAllCols: typeof unhideAllCols;
6410
6636
  declare const ACTION_VIEW_unhideAllRows: typeof unhideAllRows;
6411
6637
  declare const ACTION_VIEW_unhideCols: typeof unhideCols;
@@ -6414,6 +6640,7 @@ declare const ACTION_VIEW_viewFormulas: typeof viewFormulas;
6414
6640
  declare const ACTION_VIEW_viewGridlines: typeof viewGridlines;
6415
6641
  declare namespace ACTION_VIEW {
6416
6642
  export {
6643
+ ACTION_VIEW_canUngroupHeaders as canUngroupHeaders,
6417
6644
  ACTION_VIEW_createRemoveFilter as createRemoveFilter,
6418
6645
  ACTION_VIEW_freezeCurrentCol as freezeCurrentCol,
6419
6646
  ACTION_VIEW_freezeCurrentRow as freezeCurrentRow,
@@ -6422,11 +6649,15 @@ declare namespace ACTION_VIEW {
6422
6649
  ACTION_VIEW_freezePane as freezePane,
6423
6650
  ACTION_VIEW_freezeSecondCol as freezeSecondCol,
6424
6651
  ACTION_VIEW_freezeSecondRow as freezeSecondRow,
6652
+ ACTION_VIEW_groupColumns as groupColumns,
6653
+ ACTION_VIEW_groupRows as groupRows,
6425
6654
  ACTION_VIEW_hideCols as hideCols,
6426
6655
  ACTION_VIEW_hideRows as hideRows,
6427
6656
  ACTION_VIEW_unFreezeCols as unFreezeCols,
6428
6657
  ACTION_VIEW_unFreezePane as unFreezePane,
6429
6658
  ACTION_VIEW_unFreezeRows as unFreezeRows,
6659
+ ACTION_VIEW_ungroupColumns as ungroupColumns,
6660
+ ACTION_VIEW_ungroupRows as ungroupRows,
6430
6661
  ACTION_VIEW_unhideAllCols as unhideAllCols,
6431
6662
  ACTION_VIEW_unhideAllRows as unhideAllRows,
6432
6663
  ACTION_VIEW_unhideCols as unhideCols,
@@ -6833,6 +7064,7 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
6833
7064
  BottomBar: typeof BottomBar;
6834
7065
  SidePanel: typeof SidePanel;
6835
7066
  SpreadsheetDashboard: typeof SpreadsheetDashboard;
7067
+ HeaderGroupContainer: typeof HeaderGroupContainer;
6836
7068
  };
6837
7069
  sidePanel: SidePanelState;
6838
7070
  composer: ComposerState;
@@ -6860,6 +7092,9 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
6860
7092
  */
6861
7093
  private setComposerContent;
6862
7094
  get gridHeight(): Pixel;
7095
+ get gridContainerStyle(): string;
7096
+ get rowLayers(): HeaderGroup[][];
7097
+ get colLayers(): HeaderGroup[][];
6863
7098
  }
6864
7099
 
6865
7100
  interface Props$5 {
@@ -7058,7 +7293,7 @@ declare class Highlight extends Component<Props$2, SpreadsheetChildEnv> {
7058
7293
  * - a horizontal resizer (to resize columns)
7059
7294
  * - a vertical resizer (same, for rows)
7060
7295
  */
7061
- type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER";
7296
+ type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER" | "GROUP_HEADERS" | "UNGROUP_HEADERS";
7062
7297
  interface Props$1 {
7063
7298
  sidePanelIsOpen: boolean;
7064
7299
  exposeFocus: (focus: () => void) => void;
@@ -7128,6 +7363,10 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
7128
7363
  private clearFormatting;
7129
7364
  private setHorizontalAlign;
7130
7365
  closeMenu(): void;
7366
+ private processHeaderGroupingKey;
7367
+ private processHeaderGroupingEventOnHeaders;
7368
+ private processHeaderGroupingEventOnWholeSheet;
7369
+ private processHeaderGroupingEventOnGrid;
7131
7370
  }
7132
7371
 
7133
7372
  interface Props {