@odoo/o-spreadsheet 16.3.0-alpha.7 → 16.3.0-alpha.8

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.
@@ -161,13 +161,13 @@ interface Subscription {
161
161
  }
162
162
 
163
163
  declare class SelectiveHistory<T = unknown> {
164
- private applyOperation;
165
- private revertOperation;
166
- private buildEmpty;
167
- private readonly buildTransformation;
168
164
  private HEAD_BRANCH;
169
165
  private HEAD_OPERATION;
170
166
  private tree;
167
+ private readonly applyOperation;
168
+ private readonly revertOperation;
169
+ private readonly buildEmpty;
170
+ private readonly buildTransformation;
171
171
  /**
172
172
  * The selective history is a data structure used to register changes/updates of a state.
173
173
  * Each change/update is called an "operation".
@@ -188,7 +188,13 @@ declare class SelectiveHistory<T = unknown> {
188
188
  * (used for internal implementation)
189
189
  * @param buildTransformation Factory used to build transformations
190
190
  */
191
- constructor(initialOperationId: UID, applyOperation: (data: T) => void, revertOperation: (data: T) => void, buildEmpty: (id: UID) => T, buildTransformation: TransformationFactory<T>);
191
+ constructor(args: {
192
+ initialOperationId: UID;
193
+ applyOperation: (data: T) => void;
194
+ revertOperation: (data: T) => void;
195
+ buildEmpty: (id: UID) => T;
196
+ buildTransformation: TransformationFactory<T>;
197
+ });
192
198
  /**
193
199
  * Return the operation identified by its id.
194
200
  */
@@ -269,7 +275,6 @@ interface CollaborativeEventReceived {
269
275
  }
270
276
  interface UnexpectedRevisionIdEvent {
271
277
  type: "unexpected-revision-id";
272
- revisionId: UID;
273
278
  }
274
279
  interface NewLocalStateUpdateEvent {
275
280
  type: "new-local-state-update";
@@ -669,6 +674,7 @@ interface RemoteRevisionMessage extends AbstractMessage {
669
674
  commands: readonly CoreCommand[];
670
675
  nextRevisionId: UID;
671
676
  serverRevisionId: UID;
677
+ timestamp?: number;
672
678
  }
673
679
  interface RevisionUndoneMessage extends AbstractMessage {
674
680
  type: "REVISION_UNDONE";
@@ -748,6 +754,7 @@ interface TransportService<T = any> {
748
754
 
749
755
  declare class Revision implements RevisionData {
750
756
  readonly rootCommand?: "SNAPSHOT" | Command | "REMOTE" | undefined;
757
+ readonly timestamp?: number | undefined;
751
758
  readonly id: UID;
752
759
  readonly clientId: ClientId;
753
760
  private _commands;
@@ -761,7 +768,7 @@ declare class Revision implements RevisionData {
761
768
  * - clientId: Client who initiated the action
762
769
  * - changes: List of changes applied on the state.
763
770
  */
764
- constructor(id: UID, clientId: ClientId, commands: readonly CoreCommand[], rootCommand?: "SNAPSHOT" | Command | "REMOTE" | undefined, changes?: readonly HistoryChange[]);
771
+ constructor(id: UID, clientId: ClientId, commands: readonly CoreCommand[], rootCommand?: "SNAPSHOT" | Command | "REMOTE" | undefined, changes?: readonly HistoryChange[], timestamp?: number | undefined);
765
772
  setChanges(changes: readonly HistoryChange[]): void;
766
773
  get commands(): readonly CoreCommand[];
767
774
  get changes(): readonly HistoryChange[];
@@ -854,6 +861,7 @@ declare class Session extends EventBus<CollaborativeEvent> {
854
861
  private sendPendingMessage;
855
862
  private acknowledge;
856
863
  private isAlreadyProcessed;
864
+ isWrongServerRevisionId(message: CollaborationMessage): boolean;
857
865
  private dropPendingHistoryMessages;
858
866
  }
859
867
 
@@ -1662,9 +1670,9 @@ interface PositionDependentCommand {
1662
1670
  col: number;
1663
1671
  row: number;
1664
1672
  }
1665
- 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_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "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" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "PREPARE_SELECTION_INPUT_EXPANSION" | "STOP_SELECTION_INPUT" | "EVALUATE_CELLS" | "CHANGE_HIGHLIGHT" | "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" | "REFRESH_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">;
1666
- 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_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "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" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "PREPARE_SELECTION_INPUT_EXPANSION" | "STOP_SELECTION_INPUT" | "EVALUATE_CELLS" | "CHANGE_HIGHLIGHT" | "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" | "REFRESH_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">;
1667
- 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_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE">;
1673
+ 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" | "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" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "PREPARE_SELECTION_INPUT_EXPANSION" | "STOP_SELECTION_INPUT" | "EVALUATE_CELLS" | "CHANGE_HIGHLIGHT" | "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" | "REFRESH_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">;
1674
+ 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" | "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" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "PREPARE_SELECTION_INPUT_EXPANSION" | "STOP_SELECTION_INPUT" | "EVALUATE_CELLS" | "CHANGE_HIGHLIGHT" | "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" | "REFRESH_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">;
1675
+ 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">;
1668
1676
  interface UpdateCellCommand extends PositionDependentCommand {
1669
1677
  type: "UPDATE_CELL";
1670
1678
  content?: string;
@@ -1849,9 +1857,12 @@ interface UpdateFilterCommand extends PositionDependentCommand {
1849
1857
  interface SetFormattingCommand extends TargetDependentCommand {
1850
1858
  type: "SET_FORMATTING";
1851
1859
  style?: Style;
1852
- border?: BorderCommand;
1853
1860
  format?: Format;
1854
1861
  }
1862
+ interface SetZoneBordersCommand extends TargetDependentCommand {
1863
+ type: "SET_ZONE_BORDERS";
1864
+ border: BorderData;
1865
+ }
1855
1866
  interface SetBorderCommand extends PositionDependentCommand {
1856
1867
  type: "SET_BORDER";
1857
1868
  border: Border$1 | undefined;
@@ -2221,7 +2232,7 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
2221
2232
  /** FIGURES */
2222
2233
  | CreateFigureCommand | DeleteFigureCommand | UpdateFigureCommand
2223
2234
  /** FORMATTING */
2224
- | SetFormattingCommand | ClearFormattingCommand | SetBorderCommand
2235
+ | SetFormattingCommand | ClearFormattingCommand | SetZoneBordersCommand | SetBorderCommand
2225
2236
  /** CHART */
2226
2237
  | CreateChartCommand | UpdateChartCommand
2227
2238
  /** Image */
@@ -2468,8 +2479,20 @@ interface CellPosition {
2468
2479
  row: HeaderIndex;
2469
2480
  sheetId: UID;
2470
2481
  }
2471
- declare type BorderStyle = "thin" | "medium" | "thick" | "dashed" | "dotted" | "double";
2472
- declare type BorderDescr = [BorderStyle, Color];
2482
+ declare const borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
2483
+ declare type BorderStyle = typeof borderStyles[number];
2484
+ declare type BorderDescr = {
2485
+ style: BorderStyle;
2486
+ color: Color;
2487
+ };
2488
+ /**
2489
+ * A complete border(s) data is a set of position-color-style information
2490
+ */
2491
+ declare type BorderData = {
2492
+ position: BorderPosition;
2493
+ color?: Color;
2494
+ style?: BorderStyle;
2495
+ };
2473
2496
  interface Border$1 {
2474
2497
  top?: BorderDescr;
2475
2498
  left?: BorderDescr;
@@ -2536,7 +2559,7 @@ interface PaneDivision {
2536
2559
  /** Represents the number of frozen rows */
2537
2560
  ySplit: number;
2538
2561
  }
2539
- declare type BorderCommand = "all" | "hv" | "h" | "v" | "external" | "left" | "top" | "right" | "bottom" | "clear";
2562
+ declare type BorderPosition = "all" | "hv" | "h" | "v" | "external" | "left" | "top" | "right" | "bottom" | "clear";
2540
2563
  declare type BorderDescription = {
2541
2564
  vertical?: BorderDescr;
2542
2565
  horizontal?: BorderDescr;
@@ -2930,7 +2953,7 @@ interface BordersPluginState {
2930
2953
  * - borders
2931
2954
  */
2932
2955
  declare class BordersPlugin extends CorePlugin<BordersPluginState> implements BordersPluginState {
2933
- static getters: readonly ["getCellBorder"];
2956
+ static getters: readonly ["getCellBorder", "getBordersColors"];
2934
2957
  readonly borders: BordersPluginState["borders"];
2935
2958
  handle(cmd: Command): void;
2936
2959
  /**
@@ -2944,6 +2967,7 @@ declare class BordersPlugin extends CorePlugin<BordersPluginState> implements Bo
2944
2967
  */
2945
2968
  private handleAddRows;
2946
2969
  getCellBorder({ sheetId, col, row }: CellPosition): Border$1 | null;
2970
+ getBordersColors(sheetId: UID): Color[];
2947
2971
  /**
2948
2972
  * Ensure border continuity between two columns.
2949
2973
  * If the two columns have the same borders (at each row respectively),
@@ -4932,7 +4956,7 @@ interface ChartBuilder {
4932
4956
  sequence: number;
4933
4957
  }
4934
4958
 
4935
- interface Props$C {
4959
+ interface Props$D {
4936
4960
  ranges: string[];
4937
4961
  hasSingleRange?: boolean;
4938
4962
  required?: boolean;
@@ -4954,7 +4978,7 @@ interface SelectionRange extends Omit<RangeInputValue, "color"> {
4954
4978
  * onSelectionChanged is called every time the input value
4955
4979
  * changes.
4956
4980
  */
4957
- declare class SelectionInput extends Component<Props$C, SpreadsheetChildEnv> {
4981
+ declare class SelectionInput extends Component<Props$D, SpreadsheetChildEnv> {
4958
4982
  static template: string;
4959
4983
  private id;
4960
4984
  private previousRanges;
@@ -4972,6 +4996,7 @@ declare class SelectionInput extends Component<Props$C, SpreadsheetChildEnv> {
4972
4996
  getColor(range: SelectionRange): string;
4973
4997
  private triggerChange;
4974
4998
  onKeydown(ev: KeyboardEvent): void;
4999
+ private extractRanges;
4975
5000
  focus(rangeId: number): void;
4976
5001
  addEmptyInput(): void;
4977
5002
  removeInput(rangeId: number): void;
@@ -4979,12 +5004,12 @@ declare class SelectionInput extends Component<Props$C, SpreadsheetChildEnv> {
4979
5004
  confirm(): void;
4980
5005
  }
4981
5006
 
4982
- interface Props$B {
5007
+ interface Props$C {
4983
5008
  figureId: UID;
4984
5009
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
4985
5010
  updateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
4986
5011
  }
4987
- declare class LineBarPieConfigPanel extends Component<Props$B, SpreadsheetChildEnv> {
5012
+ declare class LineBarPieConfigPanel extends Component<Props$C, SpreadsheetChildEnv> {
4988
5013
  static template: string;
4989
5014
  static components: {
4990
5015
  SelectionInput: typeof SelectionInput;
@@ -5103,7 +5128,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
5103
5128
  isSameColor(color1: Color, color2: Color): boolean;
5104
5129
  }
5105
5130
 
5106
- interface Props$A {
5131
+ interface Props$B {
5107
5132
  currentColor: string | undefined;
5108
5133
  toggleColorPicker: () => void;
5109
5134
  showColorPicker: boolean;
@@ -5114,7 +5139,7 @@ interface Props$A {
5114
5139
  dropdownMaxHeight?: Pixel;
5115
5140
  class?: string;
5116
5141
  }
5117
- declare class ColorPickerWidget extends Component<Props$A, SpreadsheetChildEnv> {
5142
+ declare class ColorPickerWidget extends Component<Props$B, SpreadsheetChildEnv> {
5118
5143
  static template: string;
5119
5144
  static components: {
5120
5145
  ColorPicker: typeof ColorPicker;
@@ -5126,12 +5151,12 @@ declare class ColorPickerWidget extends Component<Props$A, SpreadsheetChildEnv>
5126
5151
  get colorPickerAnchorRect(): Rect;
5127
5152
  }
5128
5153
 
5129
- interface Props$z {
5154
+ interface Props$A {
5130
5155
  figureId: UID;
5131
5156
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
5132
5157
  updateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => CommandResult | CommandResult[];
5133
5158
  }
5134
- declare class LineBarPieDesignPanel extends Component<Props$z, SpreadsheetChildEnv> {
5159
+ declare class LineBarPieDesignPanel extends Component<Props$A, SpreadsheetChildEnv> {
5135
5160
  static template: string;
5136
5161
  static components: {
5137
5162
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5145,12 +5170,12 @@ declare class LineBarPieDesignPanel extends Component<Props$z, SpreadsheetChildE
5145
5170
  updateSelect(attr: string, ev: any): void;
5146
5171
  }
5147
5172
 
5148
- interface Props$y {
5173
+ interface Props$z {
5149
5174
  figureId: UID;
5150
5175
  definition: GaugeChartDefinition;
5151
5176
  updateChart: (definition: Partial<GaugeChartDefinition>) => DispatchResult;
5152
5177
  }
5153
- declare class GaugeChartConfigPanel extends Component<Props$y, SpreadsheetChildEnv> {
5178
+ declare class GaugeChartConfigPanel extends Component<Props$z, SpreadsheetChildEnv> {
5154
5179
  static template: string;
5155
5180
  static components: {
5156
5181
  SelectionInput: typeof SelectionInput;
@@ -5164,12 +5189,12 @@ declare class GaugeChartConfigPanel extends Component<Props$y, SpreadsheetChildE
5164
5189
  }
5165
5190
 
5166
5191
  declare type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
5167
- interface Props$x {
5192
+ interface Props$y {
5168
5193
  figureId: UID;
5169
5194
  definition: GaugeChartDefinition;
5170
5195
  updateChart: (definition: Partial<GaugeChartDefinition>) => DispatchResult;
5171
5196
  }
5172
- declare class GaugeChartDesignPanel extends Component<Props$x, SpreadsheetChildEnv> {
5197
+ declare class GaugeChartDesignPanel extends Component<Props$y, SpreadsheetChildEnv> {
5173
5198
  static template: string;
5174
5199
  static components: {
5175
5200
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5201,12 +5226,12 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
5201
5226
  onUpdateAggregated(ev: any): void;
5202
5227
  }
5203
5228
 
5204
- interface Props$w {
5229
+ interface Props$x {
5205
5230
  figureId: UID;
5206
5231
  definition: ScorecardChartDefinition;
5207
5232
  updateChart: (definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5208
5233
  }
5209
- declare class ScorecardChartConfigPanel extends Component<Props$w, SpreadsheetChildEnv> {
5234
+ declare class ScorecardChartConfigPanel extends Component<Props$x, SpreadsheetChildEnv> {
5210
5235
  static template: string;
5211
5236
  static components: {
5212
5237
  SelectionInput: typeof SelectionInput;
@@ -5225,12 +5250,12 @@ declare class ScorecardChartConfigPanel extends Component<Props$w, SpreadsheetCh
5225
5250
  }
5226
5251
 
5227
5252
  declare type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
5228
- interface Props$v {
5253
+ interface Props$w {
5229
5254
  figureId: UID;
5230
5255
  definition: ScorecardChartDefinition;
5231
5256
  updateChart: (definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5232
5257
  }
5233
- declare class ScorecardChartDesignPanel extends Component<Props$v, SpreadsheetChildEnv> {
5258
+ declare class ScorecardChartDesignPanel extends Component<Props$w, SpreadsheetChildEnv> {
5234
5259
  static template: string;
5235
5260
  static components: {
5236
5261
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5371,10 +5396,10 @@ interface AutofillRule {
5371
5396
  sequence: number;
5372
5397
  }
5373
5398
 
5374
- interface Props$u {
5399
+ interface Props$v {
5375
5400
  figure: Figure;
5376
5401
  }
5377
- declare class ChartJsComponent extends Component<Props$u, SpreadsheetChildEnv> {
5402
+ declare class ChartJsComponent extends Component<Props$v, SpreadsheetChildEnv> {
5378
5403
  static template: string;
5379
5404
  private canvas;
5380
5405
  private chart?;
@@ -5386,10 +5411,10 @@ declare class ChartJsComponent extends Component<Props$u, SpreadsheetChildEnv> {
5386
5411
  private updateChartJs;
5387
5412
  }
5388
5413
 
5389
- interface Props$t {
5414
+ interface Props$u {
5390
5415
  figure: Figure;
5391
5416
  }
5392
- declare class ScorecardChart extends Component<Props$t, SpreadsheetChildEnv> {
5417
+ declare class ScorecardChart extends Component<Props$u, SpreadsheetChildEnv> {
5393
5418
  static template: string;
5394
5419
  private ctx;
5395
5420
  get runtime(): ScorecardChartRuntime;
@@ -5421,7 +5446,7 @@ declare class ScorecardChart extends Component<Props$t, SpreadsheetChildEnv> {
5421
5446
  }
5422
5447
 
5423
5448
  declare type MenuItemOrSeparator = Action | "separator";
5424
- interface Props$s {
5449
+ interface Props$t {
5425
5450
  position: DOMCoordinates;
5426
5451
  menuItems: Action[];
5427
5452
  depth: number;
@@ -5437,7 +5462,7 @@ interface MenuState {
5437
5462
  scrollOffset?: Pixel;
5438
5463
  menuItems: Action[];
5439
5464
  }
5440
- declare class Menu extends Component<Props$s, SpreadsheetChildEnv> {
5465
+ declare class Menu extends Component<Props$t, SpreadsheetChildEnv> {
5441
5466
  static template: string;
5442
5467
  static components: {
5443
5468
  Menu: typeof Menu;
@@ -5475,14 +5500,14 @@ declare class Menu extends Component<Props$s, SpreadsheetChildEnv> {
5475
5500
  }
5476
5501
 
5477
5502
  declare type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
5478
- interface Props$r {
5503
+ interface Props$s {
5479
5504
  figure: Figure;
5480
5505
  style: string;
5481
5506
  onFigureDeleted: () => void;
5482
5507
  onMouseDown: (ev: MouseEvent) => void;
5483
5508
  onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
5484
5509
  }
5485
- declare class FigureComponent extends Component<Props$r, SpreadsheetChildEnv> {
5510
+ declare class FigureComponent extends Component<Props$s, SpreadsheetChildEnv> {
5486
5511
  static template: string;
5487
5512
  static components: {
5488
5513
  Menu: typeof Menu;
@@ -5512,11 +5537,11 @@ declare class FigureComponent extends Component<Props$r, SpreadsheetChildEnv> {
5512
5537
  private openContextMenu;
5513
5538
  }
5514
5539
 
5515
- interface Props$q {
5540
+ interface Props$r {
5516
5541
  figure: Figure;
5517
5542
  onFigureDeleted: () => void;
5518
5543
  }
5519
- declare class ChartFigure extends Component<Props$q, SpreadsheetChildEnv> {
5544
+ declare class ChartFigure extends Component<Props$r, SpreadsheetChildEnv> {
5520
5545
  static template: string;
5521
5546
  static components: {};
5522
5547
  onDoubleClick(): void;
@@ -5524,7 +5549,7 @@ declare class ChartFigure extends Component<Props$q, SpreadsheetChildEnv> {
5524
5549
  get chartComponent(): new (...args: any) => Component;
5525
5550
  }
5526
5551
 
5527
- interface Props$p {
5552
+ interface Props$q {
5528
5553
  isVisible: boolean;
5529
5554
  position: Position;
5530
5555
  }
@@ -5532,13 +5557,13 @@ interface Position {
5532
5557
  top: HeaderIndex;
5533
5558
  left: HeaderIndex;
5534
5559
  }
5535
- interface State$3 {
5560
+ interface State$5 {
5536
5561
  position: Position;
5537
5562
  handler: boolean;
5538
5563
  }
5539
- declare class Autofill extends Component<Props$p, SpreadsheetChildEnv> {
5564
+ declare class Autofill extends Component<Props$q, SpreadsheetChildEnv> {
5540
5565
  static template: string;
5541
- state: State$3;
5566
+ state: State$5;
5542
5567
  get style(): string;
5543
5568
  get handlerStyle(): string;
5544
5569
  get styleNextValue(): string;
@@ -5610,13 +5635,13 @@ declare class Ripple extends Component<RippleProps, SpreadsheetChildEnv> {
5610
5635
  getRippleEffectProps(id: number): RippleEffectProps;
5611
5636
  }
5612
5637
 
5613
- interface Props$o {
5638
+ interface Props$p {
5614
5639
  sheetId: string;
5615
5640
  openContextMenu: (registry: MenuItemRegistry, ev: MouseEvent) => void;
5616
5641
  style?: string;
5617
5642
  onMouseDown: (ev: MouseEvent) => void;
5618
5643
  }
5619
- declare class BottomBarSheet extends Component<Props$o, SpreadsheetChildEnv> {
5644
+ declare class BottomBarSheet extends Component<Props$p, SpreadsheetChildEnv> {
5620
5645
  static template: string;
5621
5646
  static components: {
5622
5647
  Ripple: typeof Ripple;
@@ -5650,11 +5675,11 @@ declare class BottomBarSheet extends Component<Props$o, SpreadsheetChildEnv> {
5650
5675
  get sheetName(): string;
5651
5676
  }
5652
5677
 
5653
- interface Props$n {
5678
+ interface Props$o {
5654
5679
  openContextMenu: (x: number, y: number, registry: MenuItemRegistry) => void;
5655
5680
  closeContextMenu: () => void;
5656
5681
  }
5657
- declare class BottomBarStatistic extends Component<Props$n, SpreadsheetChildEnv> {
5682
+ declare class BottomBarStatistic extends Component<Props$o, SpreadsheetChildEnv> {
5658
5683
  static template: string;
5659
5684
  static components: {
5660
5685
  Ripple: typeof Ripple;
@@ -5676,13 +5701,13 @@ interface SheetState {
5676
5701
  isDnd: boolean;
5677
5702
  sheetDndPositions: Record<UID, number> | undefined;
5678
5703
  }
5679
- interface Props$m {
5704
+ interface Props$n {
5680
5705
  onClick: () => void;
5681
5706
  }
5682
5707
  interface BottomBarMenuState extends MenuState {
5683
5708
  menuId: UID | undefined;
5684
5709
  }
5685
- declare class BottomBar extends Component<Props$m, SpreadsheetChildEnv> {
5710
+ declare class BottomBar extends Component<Props$n, SpreadsheetChildEnv> {
5686
5711
  static template: string;
5687
5712
  static components: {
5688
5713
  Menu: typeof Menu;
@@ -5725,21 +5750,21 @@ declare class BottomBar extends Component<Props$m, SpreadsheetChildEnv> {
5725
5750
  get sheetListMaxScroll(): number;
5726
5751
  }
5727
5752
 
5728
- interface Props$l {
5753
+ interface Props$m {
5729
5754
  position: DOMCoordinates;
5730
5755
  isActive: boolean;
5731
5756
  onClick: () => void;
5732
5757
  }
5733
- declare class FilterIcon extends Component<Props$l, SpreadsheetEnv> {
5758
+ declare class FilterIcon extends Component<Props$m, SpreadsheetEnv> {
5734
5759
  static style: string;
5735
5760
  static template: string;
5736
5761
  get style(): string;
5737
5762
  }
5738
5763
 
5739
- interface Props$k {
5764
+ interface Props$l {
5740
5765
  gridPosition: DOMCoordinates;
5741
5766
  }
5742
- declare class FilterIconsOverlay extends Component<Props$k, SpreadsheetChildEnv> {
5767
+ declare class FilterIconsOverlay extends Component<Props$l, SpreadsheetChildEnv> {
5743
5768
  static style: string;
5744
5769
  static template: string;
5745
5770
  static components: {
@@ -5769,7 +5794,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
5769
5794
  }
5770
5795
 
5771
5796
  declare type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
5772
- interface Props$j {
5797
+ interface Props$k {
5773
5798
  onFigureDeleted: () => void;
5774
5799
  }
5775
5800
  interface Container {
@@ -5848,7 +5873,7 @@ interface DndState {
5848
5873
  * that occurred during the drag & drop, and to position the figure on the correct pane.
5849
5874
  *
5850
5875
  */
5851
- declare class FiguresContainer extends Component<Props$j, SpreadsheetChildEnv> {
5876
+ declare class FiguresContainer extends Component<Props$k, SpreadsheetChildEnv> {
5852
5877
  static template: string;
5853
5878
  static components: {
5854
5879
  FigureComponent: typeof FigureComponent;
@@ -5880,7 +5905,7 @@ declare class FiguresContainer extends Component<Props$j, SpreadsheetChildEnv> {
5880
5905
  private getSnapLineStyle;
5881
5906
  }
5882
5907
 
5883
- interface Props$i {
5908
+ interface Props$j {
5884
5909
  onCellHovered: (position: Partial<Position$1>) => void;
5885
5910
  onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
5886
5911
  onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
@@ -5893,7 +5918,7 @@ interface Props$i {
5893
5918
  gridOverlayDimensions: string;
5894
5919
  onFigureDeleted: () => void;
5895
5920
  }
5896
- declare class GridOverlay extends Component<Props$i, SpreadsheetChildEnv> {
5921
+ declare class GridOverlay extends Component<Props$j, SpreadsheetChildEnv> {
5897
5922
  static template: string;
5898
5923
  static components: {
5899
5924
  FiguresContainer: typeof FiguresContainer;
@@ -5915,13 +5940,13 @@ declare class GridOverlay extends Component<Props$i, SpreadsheetChildEnv> {
5915
5940
  private getCartesianCoordinates;
5916
5941
  }
5917
5942
 
5918
- interface Props$h {
5943
+ interface Props$i {
5919
5944
  hoveredCell: Partial<Position$1>;
5920
5945
  gridRect: Rect;
5921
5946
  onClosePopover: () => void;
5922
5947
  onMouseWheel: (ev: WheelEvent) => void;
5923
5948
  }
5924
- declare class GridPopover extends Component<Props$h, SpreadsheetChildEnv> {
5949
+ declare class GridPopover extends Component<Props$i, SpreadsheetChildEnv> {
5925
5950
  static template: string;
5926
5951
  static components: {
5927
5952
  Popover: typeof Popover;
@@ -5932,7 +5957,7 @@ declare class GridPopover extends Component<Props$h, SpreadsheetChildEnv> {
5932
5957
 
5933
5958
  declare type ScrollDirection = "horizontal" | "vertical";
5934
5959
 
5935
- interface Props$g {
5960
+ interface Props$h {
5936
5961
  width: Pixel;
5937
5962
  height: Pixel;
5938
5963
  direction: ScrollDirection;
@@ -5940,7 +5965,7 @@ interface Props$g {
5940
5965
  offset: Pixel;
5941
5966
  onScroll: (offset: Pixel) => void;
5942
5967
  }
5943
- declare class ScrollBar extends Component<Props$g> {
5968
+ declare class ScrollBar extends Component<Props$h> {
5944
5969
  static template: string;
5945
5970
  static defaultProps: {
5946
5971
  width: number;
@@ -5954,10 +5979,10 @@ declare class ScrollBar extends Component<Props$g> {
5954
5979
  onScroll(ev: any): void;
5955
5980
  }
5956
5981
 
5957
- interface Props$f {
5982
+ interface Props$g {
5958
5983
  leftOffset: number;
5959
5984
  }
5960
- declare class HorizontalScrollBar extends Component<Props$f, SpreadsheetChildEnv> {
5985
+ declare class HorizontalScrollBar extends Component<Props$g, SpreadsheetChildEnv> {
5961
5986
  static components: {
5962
5987
  ScrollBar: typeof ScrollBar;
5963
5988
  };
@@ -5977,10 +6002,10 @@ declare class HorizontalScrollBar extends Component<Props$f, SpreadsheetChildEnv
5977
6002
  onScroll(offset: any): void;
5978
6003
  }
5979
6004
 
5980
- interface Props$e {
6005
+ interface Props$f {
5981
6006
  topOffset: number;
5982
6007
  }
5983
- declare class VerticalScrollBar extends Component<Props$e, SpreadsheetChildEnv> {
6008
+ declare class VerticalScrollBar extends Component<Props$f, SpreadsheetChildEnv> {
5984
6009
  static components: {
5985
6010
  ScrollBar: typeof ScrollBar;
5986
6011
  };
@@ -6000,7 +6025,7 @@ declare class VerticalScrollBar extends Component<Props$e, SpreadsheetChildEnv>
6000
6025
  onScroll(offset: any): void;
6001
6026
  }
6002
6027
 
6003
- interface Props$d {
6028
+ interface Props$e {
6004
6029
  }
6005
6030
  interface ClickableCell {
6006
6031
  coordinates: Rect;
@@ -6008,7 +6033,7 @@ interface ClickableCell {
6008
6033
  action: (position: CellPosition, env: SpreadsheetChildEnv) => void;
6009
6034
  tKey: string;
6010
6035
  }
6011
- declare class SpreadsheetDashboard extends Component<Props$d, SpreadsheetChildEnv> {
6036
+ declare class SpreadsheetDashboard extends Component<Props$e, SpreadsheetChildEnv> {
6012
6037
  static template: string;
6013
6038
  static components: {
6014
6039
  GridOverlay: typeof GridOverlay;
@@ -6044,17 +6069,17 @@ declare class SpreadsheetDashboard extends Component<Props$d, SpreadsheetChildEn
6044
6069
  private getGridRect;
6045
6070
  }
6046
6071
 
6047
- interface Props$c {
6072
+ interface Props$d {
6048
6073
  component: string;
6049
6074
  panelProps: any;
6050
6075
  onCloseSidePanel: () => void;
6051
6076
  }
6052
- interface State$2 {
6077
+ interface State$4 {
6053
6078
  panel: SidePanelContent;
6054
6079
  }
6055
- declare class SidePanel extends Component<Props$c, SpreadsheetChildEnv> {
6080
+ declare class SidePanel extends Component<Props$d, SpreadsheetChildEnv> {
6056
6081
  static template: string;
6057
- state: State$2;
6082
+ state: State$4;
6058
6083
  setup(): void;
6059
6084
  getTitle(): string;
6060
6085
  }
@@ -6161,17 +6186,6 @@ declare const fillColor: ActionSpec;
6161
6186
  declare const formatCF: ActionSpec;
6162
6187
  declare const paintFormat: ActionSpec;
6163
6188
  declare const clearFormat: ActionSpec;
6164
- declare const borders: ActionSpec;
6165
- declare const bordersAll: ActionSpec;
6166
- declare const bordersInner: ActionSpec;
6167
- declare const bordersHorizontal: ActionSpec;
6168
- declare const bordersVertical: ActionSpec;
6169
- declare const bordersExternal: ActionSpec;
6170
- declare const bordersLeft: ActionSpec;
6171
- declare const bordersTop: ActionSpec;
6172
- declare const bordersRight: ActionSpec;
6173
- declare const bordersBottom: ActionSpec;
6174
- declare const bordersClear: ActionSpec;
6175
6189
 
6176
6190
  declare const ACTION_FORMAT_formatNumberAutomatic: typeof formatNumberAutomatic;
6177
6191
  declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
@@ -6209,17 +6223,6 @@ declare const ACTION_FORMAT_fillColor: typeof fillColor;
6209
6223
  declare const ACTION_FORMAT_formatCF: typeof formatCF;
6210
6224
  declare const ACTION_FORMAT_paintFormat: typeof paintFormat;
6211
6225
  declare const ACTION_FORMAT_clearFormat: typeof clearFormat;
6212
- declare const ACTION_FORMAT_borders: typeof borders;
6213
- declare const ACTION_FORMAT_bordersAll: typeof bordersAll;
6214
- declare const ACTION_FORMAT_bordersInner: typeof bordersInner;
6215
- declare const ACTION_FORMAT_bordersHorizontal: typeof bordersHorizontal;
6216
- declare const ACTION_FORMAT_bordersVertical: typeof bordersVertical;
6217
- declare const ACTION_FORMAT_bordersExternal: typeof bordersExternal;
6218
- declare const ACTION_FORMAT_bordersLeft: typeof bordersLeft;
6219
- declare const ACTION_FORMAT_bordersTop: typeof bordersTop;
6220
- declare const ACTION_FORMAT_bordersRight: typeof bordersRight;
6221
- declare const ACTION_FORMAT_bordersBottom: typeof bordersBottom;
6222
- declare const ACTION_FORMAT_bordersClear: typeof bordersClear;
6223
6226
  declare namespace ACTION_FORMAT {
6224
6227
  export {
6225
6228
  ACTION_FORMAT_formatNumberAutomatic as formatNumberAutomatic,
@@ -6258,17 +6261,6 @@ declare namespace ACTION_FORMAT {
6258
6261
  ACTION_FORMAT_formatCF as formatCF,
6259
6262
  ACTION_FORMAT_paintFormat as paintFormat,
6260
6263
  ACTION_FORMAT_clearFormat as clearFormat,
6261
- ACTION_FORMAT_borders as borders,
6262
- ACTION_FORMAT_bordersAll as bordersAll,
6263
- ACTION_FORMAT_bordersInner as bordersInner,
6264
- ACTION_FORMAT_bordersHorizontal as bordersHorizontal,
6265
- ACTION_FORMAT_bordersVertical as bordersVertical,
6266
- ACTION_FORMAT_bordersExternal as bordersExternal,
6267
- ACTION_FORMAT_bordersLeft as bordersLeft,
6268
- ACTION_FORMAT_bordersTop as bordersTop,
6269
- ACTION_FORMAT_bordersRight as bordersRight,
6270
- ACTION_FORMAT_bordersBottom as bordersBottom,
6271
- ACTION_FORMAT_bordersClear as bordersClear,
6272
6264
  };
6273
6265
  }
6274
6266
 
@@ -6335,14 +6327,14 @@ declare namespace ACTION_VIEW {
6335
6327
  };
6336
6328
  }
6337
6329
 
6338
- interface Props$b {
6330
+ interface Props$c {
6339
6331
  action: ActionSpec;
6340
6332
  hasTriangleDownIcon?: boolean;
6341
6333
  selectedColor?: string;
6342
6334
  class?: string;
6343
6335
  onClick?: (ev: MouseEvent) => void;
6344
6336
  }
6345
- declare class ActionButton extends Component<Props$b, SpreadsheetChildEnv> {
6337
+ declare class ActionButton extends Component<Props$c, SpreadsheetChildEnv> {
6346
6338
  static template: string;
6347
6339
  private actionButton;
6348
6340
  setup(): void;
@@ -6355,6 +6347,71 @@ declare class ActionButton extends Component<Props$b, SpreadsheetChildEnv> {
6355
6347
  get buttonStyle(): string;
6356
6348
  }
6357
6349
 
6350
+ declare type Tool = "borderColorTool" | "borderTypeTool";
6351
+ interface State$3 {
6352
+ activeTool: Tool | undefined;
6353
+ }
6354
+ interface BorderEditorProps {
6355
+ class?: string;
6356
+ currentBorderColor: Color;
6357
+ currentBorderStyle: BorderStyle;
6358
+ currentBorderPosition: BorderPosition | undefined;
6359
+ onBorderColorPicked: (color: Color) => void;
6360
+ onBorderStylePicked: (style: BorderStyle) => void;
6361
+ onBorderPositionPicked: (position: BorderPosition) => void;
6362
+ maxHeight?: Pixel;
6363
+ anchorRect: Rect;
6364
+ }
6365
+ declare class BorderEditor extends Component<BorderEditorProps, SpreadsheetChildEnv> {
6366
+ static template: string;
6367
+ static components: {
6368
+ ColorPickerWidget: typeof ColorPickerWidget;
6369
+ Popover: typeof Popover;
6370
+ };
6371
+ BORDER_POSITIONS: [BorderPosition, string][][];
6372
+ lineStyleButtonRef: {
6373
+ el: HTMLElement | null;
6374
+ };
6375
+ borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
6376
+ state: State$3;
6377
+ toggleDropdownTool(tool: Tool): void;
6378
+ closeDropdown(): void;
6379
+ setBorderPosition(position: BorderPosition): void;
6380
+ setBorderColor(color: Color): void;
6381
+ setBorderStyle(style: BorderStyle): void;
6382
+ get lineStylePickerPopoverProps(): PopoverProps;
6383
+ get popoverProps(): PopoverProps;
6384
+ get lineStylePickerAnchorRect(): Rect;
6385
+ }
6386
+
6387
+ interface Props$b {
6388
+ toggleBorderEditor: () => void;
6389
+ showBorderEditor: boolean;
6390
+ disabled?: boolean;
6391
+ dropdownMaxHeight?: Pixel;
6392
+ class?: string;
6393
+ }
6394
+ interface State$2 {
6395
+ currentColor: Color;
6396
+ currentStyle: BorderStyle;
6397
+ currentPosition: BorderPosition | undefined;
6398
+ }
6399
+ declare class BorderEditorWidget extends Component<Props$b, SpreadsheetChildEnv> {
6400
+ static template: string;
6401
+ static components: {
6402
+ BorderEditor: typeof BorderEditor;
6403
+ };
6404
+ borderEditorButtonRef: {
6405
+ el: HTMLElement | null;
6406
+ };
6407
+ state: State$2;
6408
+ get borderEditorAnchorRect(): Rect;
6409
+ onBorderPositionPicked(position: BorderPosition): void;
6410
+ onBorderColorPicked(color: Color): void;
6411
+ onBorderStylePicked(style: BorderStyle): void;
6412
+ private updateBorder;
6413
+ }
6414
+
6358
6415
  interface Props$a {
6359
6416
  values: AutocompleteValue[];
6360
6417
  selectedIndex: number;
@@ -6396,7 +6453,24 @@ declare class ContentEditableHelper {
6396
6453
  start: number;
6397
6454
  end: number;
6398
6455
  };
6399
- private findSizeBeforeElement;
6456
+ /**
6457
+ * Computes the text 'index' inside this.el based on the currently selected node and its offset.
6458
+ * The selected node is either a Text node or an Element node.
6459
+ *
6460
+ * case 1 -Text node:
6461
+ * the offset is the number of characters from the start of the node. We have to add this offset to the
6462
+ * content length of all previous nodes.
6463
+ *
6464
+ * case 2 - Element node:
6465
+ * the offset is the number of child nodes before the selected node. We have to add the content length of
6466
+ * all the bnodes prior to the selected node as well as the content of the child node before the offset.
6467
+ *
6468
+ * See the MDN documentation for more details.
6469
+ * https://developer.mozilla.org/en-US/docs/Web/API/Range/startOffset
6470
+ * https://developer.mozilla.org/en-US/docs/Web/API/Range/endOffset
6471
+ *
6472
+ */
6473
+ private findSelectionIndex;
6400
6474
  private getStartAndEndSelection;
6401
6475
  getText(): string;
6402
6476
  }
@@ -6573,6 +6647,7 @@ declare class TopBar extends Component<Props$6, SpreadsheetChildEnv> {
6573
6647
  TopBarComposer: typeof TopBarComposer;
6574
6648
  FontSizeEditor: typeof FontSizeEditor;
6575
6649
  ActionButton: typeof ActionButton;
6650
+ BorderEditorWidget: typeof BorderEditorWidget;
6576
6651
  };
6577
6652
  state: State;
6578
6653
  isSelectingMenu: boolean;