@odoo/o-spreadsheet 16.3.0-alpha.2 → 16.3.0-alpha.4

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.
@@ -294,10 +294,10 @@ declare function toZone(xc: string): Zone;
294
294
  */
295
295
  declare function findCellInNewZone(oldZone: Zone, currentZone: Zone): Position$1;
296
296
  declare function positionToZone(position: Position$1): {
297
- left: number;
298
- right: number;
299
- top: number;
300
- bottom: number;
297
+ left: HeaderIndex;
298
+ right: HeaderIndex;
299
+ top: HeaderIndex;
300
+ bottom: HeaderIndex;
301
301
  };
302
302
 
303
303
  interface SelectionEventPayload {
@@ -406,9 +406,9 @@ interface SectionRule {
406
406
  readonly upperInflectionPoint: SectionThreshold;
407
407
  }
408
408
  interface ColorSet {
409
- readonly lowerColor: string;
410
- readonly middleColor: string;
411
- readonly upperColor: string;
409
+ readonly lowerColor: Color;
410
+ readonly middleColor: Color;
411
+ readonly upperColor: Color;
412
412
  }
413
413
  interface SectionThreshold {
414
414
  readonly type: "number" | "percentage";
@@ -435,13 +435,13 @@ interface GaugeChartOptions extends ChartOptions {
435
435
  radiusPercentage: number;
436
436
  widthPercentage: number;
437
437
  lengthPercentage: number;
438
- color: string;
438
+ color: Color;
439
439
  };
440
440
  valueLabel?: {
441
441
  formatter: (() => string) | null;
442
442
  display: boolean;
443
- color: string;
444
- backgroundColor: string;
443
+ color: Color;
444
+ backgroundColor: Color;
445
445
  borderRadius: number;
446
446
  fontSize: number;
447
447
  padding: {
@@ -986,6 +986,7 @@ declare class Model extends EventBus<any> implements CommandDispatcher {
986
986
  uuidGenerator: UuidGenerator;
987
987
  constructor(data?: any, config?: Partial<ModelConfig>, stateUpdateMessages?: StateUpdateMessage[], uuidGenerator?: UuidGenerator, verboseImport?: boolean);
988
988
  get handlers(): CommandHandler<Command>[];
989
+ get coreHandlers(): CommandHandler<Command>[];
989
990
  get allUIPlugins(): UIPlugin[];
990
991
  joinSession(): void;
991
992
  leaveSession(): void;
@@ -1007,7 +1008,14 @@ declare class Model extends EventBus<any> implements CommandDispatcher {
1007
1008
  * Check if the given command is allowed by all the plugins and the history.
1008
1009
  */
1009
1010
  private checkDispatchAllowed;
1011
+ private checkDispatchAllowedCoreCommand;
1012
+ private checkDispatchAllowedLocalCommand;
1010
1013
  private finalize;
1014
+ /**
1015
+ * Check if a command can be dispatched, and returns a DispatchResult object with the possible
1016
+ * reasons the dispatch failed.
1017
+ */
1018
+ canDispatch: CommandDispatcher["canDispatch"];
1011
1019
  /**
1012
1020
  * The dispatch method is the only entry point to manipulate data in the model.
1013
1021
  * This is through this method that commands are dispatched most of the time
@@ -1260,7 +1268,7 @@ interface ComposerSelection {
1260
1268
  end: number;
1261
1269
  }
1262
1270
  declare class EditionPlugin extends UIPlugin {
1263
- static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getEditionSheet", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell"];
1271
+ static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell"];
1264
1272
  private col;
1265
1273
  private row;
1266
1274
  private mode;
@@ -1274,12 +1282,11 @@ declare class EditionPlugin extends UIPlugin {
1274
1282
  private previousRef;
1275
1283
  private previousRange;
1276
1284
  private colorIndexByRange;
1277
- allowDispatch(cmd: Command): CommandResult;
1285
+ allowDispatch(cmd: LocalCommand): CommandResult;
1278
1286
  private handleEvent;
1279
1287
  handle(cmd: Command): void;
1280
1288
  getEditionMode(): EditionMode;
1281
1289
  getCurrentContent(): string;
1282
- getEditionSheet(): string;
1283
1290
  getComposerSelection(): ComposerSelection;
1284
1291
  getCurrentEditedCell(): CellPosition;
1285
1292
  isSelectingForComposer(): boolean;
@@ -1622,8 +1629,8 @@ interface CreateChartCommand extends SheetDependentCommand {
1622
1629
  type: "CREATE_CHART";
1623
1630
  id: UID;
1624
1631
  position?: {
1625
- x: number;
1626
- y: number;
1632
+ x: Pixel;
1633
+ y: Pixel;
1627
1634
  };
1628
1635
  size?: FigureSize;
1629
1636
  definition: ChartDefinition;
@@ -1637,8 +1644,8 @@ interface CreateImageOverCommand extends SheetDependentCommand {
1637
1644
  type: "CREATE_IMAGE";
1638
1645
  figureId: UID;
1639
1646
  position: {
1640
- x: number;
1641
- y: number;
1647
+ x: Pixel;
1648
+ y: Pixel;
1642
1649
  };
1643
1650
  size: FigureSize;
1644
1651
  definition: Image;
@@ -1742,7 +1749,7 @@ interface StopSelectionCommand {
1742
1749
  */
1743
1750
  interface SetColorCommand {
1744
1751
  type: "SET_HIGHLIGHT_COLOR";
1745
- color: string;
1752
+ color: Color;
1746
1753
  }
1747
1754
  interface EvaluateCellsCommand {
1748
1755
  type: "EVALUATE_CELLS";
@@ -2150,6 +2157,9 @@ interface CommandDispatcher {
2150
2157
  dispatch<T extends CommandTypes, C extends Extract<Command, {
2151
2158
  type: T;
2152
2159
  }>>(type: T, r: Omit<C, "type">): DispatchResult;
2160
+ canDispatch<T extends CommandTypes, C extends Extract<Command, {
2161
+ type: T;
2162
+ }>>(type: T, r: Omit<C, "type">): DispatchResult;
2153
2163
  }
2154
2164
  interface CoreCommandDispatcher {
2155
2165
  dispatch<T extends CoreCommandTypes, C extends Extract<CoreCommand, {
@@ -2158,6 +2168,9 @@ interface CoreCommandDispatcher {
2158
2168
  dispatch<T extends CoreCommandTypes, C extends Extract<CoreCommand, {
2159
2169
  type: T;
2160
2170
  }>>(type: T, r: Omit<C, "type">): DispatchResult;
2171
+ canDispatch<T extends CoreCommandTypes, C extends Extract<CoreCommand, {
2172
+ type: T;
2173
+ }>>(type: T, r: Omit<C, "type">): DispatchResult;
2161
2174
  }
2162
2175
  declare type CommandTypes = Command["type"];
2163
2176
  declare type CoreCommandTypes = CoreCommand["type"];
@@ -2167,7 +2180,7 @@ declare type CoreCommandTypes = CoreCommand["type"];
2167
2180
  * Intellisense from resolving it.
2168
2181
  * See https://github.com/microsoft/TypeScript/issues/31940#issuecomment-841712377
2169
2182
  */
2170
- declare type Alias = {};
2183
+ declare type Alias = {} & {};
2171
2184
  declare type HeaderIndex = number & Alias;
2172
2185
  declare type Pixel = number & Alias;
2173
2186
  declare type UID = string & Alias;
@@ -2231,8 +2244,8 @@ interface Style {
2231
2244
  align?: Align;
2232
2245
  wrapping?: Wrapping;
2233
2246
  verticalAlign?: VerticalAlign;
2234
- fillColor?: string;
2235
- textColor?: string;
2247
+ fillColor?: Color;
2248
+ textColor?: Color;
2236
2249
  fontSize?: number;
2237
2250
  }
2238
2251
  interface UpdateCellData {
@@ -2315,7 +2328,7 @@ interface Merge extends Zone {
2315
2328
  interface Highlight$1 {
2316
2329
  zone: Zone;
2317
2330
  sheetId: UID;
2318
- color: string | null;
2331
+ color: Color | null;
2319
2332
  }
2320
2333
  interface PaneDivision {
2321
2334
  /** Represents the number of frozen columns */
@@ -3277,6 +3290,9 @@ declare class FigurePlugin extends CorePlugin<FigureState> implements FigureStat
3277
3290
  };
3278
3291
  allowDispatch(cmd: CoreCommand): CommandResult;
3279
3292
  handle(cmd: CoreCommand): void;
3293
+ private onRowColDelete;
3294
+ private onRowDeletion;
3295
+ private onColDeletion;
3280
3296
  private updateFigure;
3281
3297
  private addFigure;
3282
3298
  private deleteSheet;
@@ -3305,7 +3321,7 @@ declare class Filter {
3305
3321
  readonly id: UID;
3306
3322
  readonly zoneWithHeaders: Zone;
3307
3323
  constructor(id: UID, zone: Zone);
3308
- get col(): number;
3324
+ get col(): HeaderIndex;
3309
3325
  /** Filtered zone, ie. zone of the filter without the header */
3310
3326
  get filteredZone(): Zone | undefined;
3311
3327
  }
@@ -3776,7 +3792,7 @@ declare class FilterEvaluationPlugin extends UIPlugin {
3776
3792
  private filterValues;
3777
3793
  hiddenRows: Set<number>;
3778
3794
  isEvaluationDirty: boolean;
3779
- allowDispatch(cmd: Command): CommandResult.Success | CommandResult.FilterNotFound;
3795
+ allowDispatch(cmd: LocalCommand): CommandResult;
3780
3796
  handle(cmd: Command): void;
3781
3797
  finalize(): void;
3782
3798
  isRowFiltered(sheetId: UID, row: number): boolean;
@@ -3811,8 +3827,8 @@ declare class InternalViewport {
3811
3827
  offsetScrollbarY: Pixel;
3812
3828
  canScrollVertically: boolean;
3813
3829
  canScrollHorizontally: boolean;
3814
- width: Pixel;
3815
- height: Pixel;
3830
+ viewportWidth: Pixel;
3831
+ viewportHeight: Pixel;
3816
3832
  offsetCorrectionX: Pixel;
3817
3833
  offsetCorrectionY: Pixel;
3818
3834
  constructor(getters: Getters, sheetId: UID, boundaries: Zone, sizeInGrid: {
@@ -3825,6 +3841,10 @@ declare class InternalViewport {
3825
3841
  x: Pixel;
3826
3842
  y: Pixel;
3827
3843
  });
3844
+ /** Returns the maximum size (in Pixels) of the viewport relative to its allocated client size
3845
+ * When the viewport grid size is smaller than its client width (resp. height), it will return
3846
+ * the client width (resp. height).
3847
+ */
3828
3848
  getMaxSize(): DOMDimension;
3829
3849
  /**
3830
3850
  * Return the index of a column given an offset x, based on the pane left
@@ -3844,8 +3864,8 @@ declare class InternalViewport {
3844
3864
  * until it contains the cell completely.
3845
3865
  */
3846
3866
  adjustPosition(position?: Position$1): void;
3847
- adjustPositionX(col: HeaderIndex): void;
3848
- adjustPositionY(row: HeaderIndex): void;
3867
+ adjustPositionX(targetCol: HeaderIndex): void;
3868
+ adjustPositionY(targetRow: HeaderIndex): void;
3849
3869
  setViewportOffset(offsetX: Pixel, offsetY: Pixel): void;
3850
3870
  adjustViewportZone(): void;
3851
3871
  /**
@@ -3936,7 +3956,7 @@ declare class SheetViewPlugin extends UIPlugin {
3936
3956
  private gridOffsetX;
3937
3957
  private gridOffsetY;
3938
3958
  private sheetsWithDirtyViewports;
3939
- allowDispatch(cmd: Command): CommandResult | CommandResult[];
3959
+ allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
3940
3960
  private handleEvent;
3941
3961
  handle(cmd: Command): void;
3942
3962
  finalize(): void;
@@ -3970,8 +3990,7 @@ declare class SheetViewPlugin extends UIPlugin {
3970
3990
  getSheetViewVisibleCols(): HeaderIndex[];
3971
3991
  getSheetViewVisibleRows(): HeaderIndex[];
3972
3992
  /**
3973
- * Return the main viewport maximum size. That is the zone dimension
3974
- * with some bottom and right padding.
3993
+ * Return the main viewport maximum size relative to the client size.
3975
3994
  */
3976
3995
  getMainViewportRect(): Rect;
3977
3996
  private getMaximumSheetOffset;
@@ -4042,7 +4061,7 @@ declare class AutofillPlugin extends UIPlugin {
4042
4061
  private lastCellSelected;
4043
4062
  private direction;
4044
4063
  private tooltip;
4045
- allowDispatch(cmd: Command): CommandResult;
4064
+ allowDispatch(cmd: LocalCommand): CommandResult;
4046
4065
  handle(cmd: Command): void;
4047
4066
  getAutofillTooltip(): Tooltip | undefined;
4048
4067
  /**
@@ -4187,7 +4206,7 @@ declare class AutomaticSumPlugin extends UIPlugin {
4187
4206
  declare class CellPopoverPlugin extends UIPlugin {
4188
4207
  static getters: readonly ["getCellPopover", "getPersistentPopoverTypeAtPosition", "hasOpenedPopover"];
4189
4208
  private persistentPopover?;
4190
- allowDispatch(cmd: Command): CommandResult.Success | CommandResult.InvalidCellPopover;
4209
+ allowDispatch(cmd: LocalCommand): CommandResult;
4191
4210
  handle(cmd: Command): void;
4192
4211
  getCellPopover({ col, row }: Partial<Position$1>): ClosedCellPopover | PositionedCellPopover;
4193
4212
  hasOpenedPopover(): boolean;
@@ -4266,7 +4285,7 @@ declare class RendererPlugin extends UIPlugin {
4266
4285
  interface RangeInputValue {
4267
4286
  id: number;
4268
4287
  xc: string;
4269
- color: string;
4288
+ color: Color;
4270
4289
  }
4271
4290
  /**
4272
4291
  * Selection input Plugin
@@ -4284,7 +4303,7 @@ declare class SelectionInputPlugin extends UIPlugin implements StreamCallbacks<S
4284
4303
  private activeSheet;
4285
4304
  private willAddNewRange;
4286
4305
  constructor(config: UIPluginConfig, initialRanges: string[], inputHasSingleRange: boolean);
4287
- allowDispatch(cmd: Command): CommandResult;
4306
+ allowDispatch(cmd: LocalCommand): CommandResult;
4288
4307
  handleEvent(event: SelectionEvent): void;
4289
4308
  handle(cmd: Command): void;
4290
4309
  getSelectionInputValue(): string[];
@@ -4345,7 +4364,7 @@ declare class SelectionInputsManagerPlugin extends UIPlugin {
4345
4364
  private focusedInputId;
4346
4365
  get currentInput(): SelectionInputPlugin | null;
4347
4366
  constructor(config: UIPluginConfig);
4348
- allowDispatch(cmd: Command): CommandResult;
4367
+ allowDispatch(cmd: LocalCommand): CommandResult;
4349
4368
  handle(cmd: Command): void;
4350
4369
  /**
4351
4370
  * Return a list of all valid XCs.
@@ -4362,7 +4381,7 @@ declare class SelectionInputsManagerPlugin extends UIPlugin {
4362
4381
  }
4363
4382
 
4364
4383
  interface ClientToDisplay extends Required<Client> {
4365
- color: string;
4384
+ color: Color;
4366
4385
  }
4367
4386
  declare class SelectionMultiUserPlugin extends UIPlugin {
4368
4387
  static getters: readonly ["getClientsToDisplay"];
@@ -4381,7 +4400,7 @@ declare class SelectionMultiUserPlugin extends UIPlugin {
4381
4400
 
4382
4401
  declare class SortPlugin extends UIPlugin {
4383
4402
  static getters: readonly ["getContiguousZone"];
4384
- allowDispatch(cmd: Command): CommandResult | CommandResult[];
4403
+ allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
4385
4404
  handle(cmd: Command): void;
4386
4405
  private checkMerge;
4387
4406
  private checkMergeSizes;
@@ -4463,7 +4482,7 @@ declare class UIOptionsPlugin extends UIPlugin {
4463
4482
  declare class SheetUIPlugin extends UIPlugin {
4464
4483
  static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getColDimensions", "getRowDimensions", "getColRowOffset"];
4465
4484
  private ctx;
4466
- allowDispatch(cmd: Command): CommandResult;
4485
+ allowDispatch(cmd: LocalCommand): CommandResult;
4467
4486
  handle(cmd: Command): void;
4468
4487
  getCellWidth(position: CellPosition): number;
4469
4488
  getTextWidth(text: string, style: Style): Pixel;
@@ -4505,7 +4524,7 @@ declare class ClipboardPlugin extends UIPlugin {
4505
4524
  private status;
4506
4525
  private state?;
4507
4526
  private _isPaintingFormat;
4508
- allowDispatch(cmd: Command): CommandResult;
4527
+ allowDispatch(cmd: LocalCommand): CommandResult;
4509
4528
  handle(cmd: Command): void;
4510
4529
  /**
4511
4530
  * Format the current clipboard to a string suitable for being pasted in other
@@ -4544,7 +4563,7 @@ declare class GridSelectionPlugin extends UIPlugin {
4544
4563
  private moveClient;
4545
4564
  activeSheet: Sheet;
4546
4565
  constructor(config: UIPluginConfig);
4547
- allowDispatch(cmd: Command): CommandResult;
4566
+ allowDispatch(cmd: LocalCommand): CommandResult;
4548
4567
  private handleEvent;
4549
4568
  handle(cmd: Command): void;
4550
4569
  getActiveSheet(): Readonly<Sheet>;
@@ -4834,7 +4853,7 @@ declare class OTRegistry extends Registry<Map<CoreCommandTypes, TransformationFu
4834
4853
 
4835
4854
  interface CellClickableItem {
4836
4855
  condition: (position: CellPosition, env: SpreadsheetChildEnv) => boolean;
4837
- action: (position: CellPosition, env: SpreadsheetChildEnv) => void;
4856
+ execute: (position: CellPosition, env: SpreadsheetChildEnv) => void;
4838
4857
  sequence: number;
4839
4858
  }
4840
4859
 
@@ -4861,7 +4880,7 @@ interface ChartBuilder {
4861
4880
  sequence: number;
4862
4881
  }
4863
4882
 
4864
- interface Props$B {
4883
+ interface Props$C {
4865
4884
  ranges: string[];
4866
4885
  hasSingleRange?: boolean;
4867
4886
  required?: boolean;
@@ -4873,7 +4892,7 @@ interface Props$B {
4873
4892
  interface SelectionRange extends Omit<RangeInputValue, "color"> {
4874
4893
  isFocused: boolean;
4875
4894
  isValidRange: boolean;
4876
- color?: string;
4895
+ color?: Color;
4877
4896
  }
4878
4897
  /**
4879
4898
  * This component can be used when the user needs to input some
@@ -4883,7 +4902,7 @@ interface SelectionRange extends Omit<RangeInputValue, "color"> {
4883
4902
  * onSelectionChanged is called every time the input value
4884
4903
  * changes.
4885
4904
  */
4886
- declare class SelectionInput extends Component<Props$B, SpreadsheetChildEnv> {
4905
+ declare class SelectionInput extends Component<Props$C, SpreadsheetChildEnv> {
4887
4906
  static template: string;
4888
4907
  private id;
4889
4908
  private previousRanges;
@@ -4908,12 +4927,12 @@ declare class SelectionInput extends Component<Props$B, SpreadsheetChildEnv> {
4908
4927
  confirm(): void;
4909
4928
  }
4910
4929
 
4911
- interface Props$A {
4930
+ interface Props$B {
4912
4931
  figureId: UID;
4913
4932
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
4914
4933
  updateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
4915
4934
  }
4916
- declare class LineBarPieConfigPanel extends Component<Props$A, SpreadsheetChildEnv> {
4935
+ declare class LineBarPieConfigPanel extends Component<Props$B, SpreadsheetChildEnv> {
4917
4936
  static template: string;
4918
4937
  static components: {
4919
4938
  SelectionInput: typeof SelectionInput;
@@ -4939,6 +4958,7 @@ declare class LineBarPieConfigPanel extends Component<Props$A, SpreadsheetChildE
4939
4958
  onLabelRangeChanged(ranges: string[]): void;
4940
4959
  onLabelRangeConfirmed(): void;
4941
4960
  onUpdateAggregated(ev: any): void;
4961
+ calculateHeaderPosition(): number | undefined;
4942
4962
  }
4943
4963
 
4944
4964
  declare class BarConfigPanel extends LineBarPieConfigPanel {
@@ -4947,6 +4967,23 @@ declare class BarConfigPanel extends LineBarPieConfigPanel {
4947
4967
  onUpdateAggregated(ev: any): void;
4948
4968
  }
4949
4969
 
4970
+ declare const DATETIME_FORMAT: RegExp;
4971
+ declare enum ComponentsImportance {
4972
+ Grid = 0,
4973
+ Highlight = 5,
4974
+ Figure = 10,
4975
+ ScrollBar = 15,
4976
+ GridPopover = 19,
4977
+ GridComposer = 20,
4978
+ Dropdown = 21,
4979
+ IconPicker = 25,
4980
+ TopBarComposer = 30,
4981
+ Popover = 35,
4982
+ FigureAnchor = 1000,
4983
+ FigureSnapLine = 1001
4984
+ }
4985
+ declare function setDefaultSheetViewSize(size: number): void;
4986
+
4950
4987
  interface PopoverProps {
4951
4988
  /**
4952
4989
  * Rectangle around which the popover is displayed.
@@ -4962,6 +4999,8 @@ interface PopoverProps {
4962
4999
  onMouseWheel?: () => void;
4963
5000
  onPopoverMoved?: () => void;
4964
5001
  onPopoverHidden?: () => void;
5002
+ /** Setting popover to allow dynamic zIndex */
5003
+ zIndex?: Number;
4965
5004
  }
4966
5005
  declare class Popover extends Component<PopoverProps, SpreadsheetChildEnv> {
4967
5006
  static template: string;
@@ -4971,6 +5010,7 @@ declare class Popover extends Component<PopoverProps, SpreadsheetChildEnv> {
4971
5010
  onMouseWheel: () => void;
4972
5011
  onPopoverMoved: () => void;
4973
5012
  onPopoverHidden: () => void;
5013
+ zIndex: ComponentsImportance;
4974
5014
  };
4975
5015
  private popoverRef;
4976
5016
  private currentPosition;
@@ -4978,6 +5018,7 @@ declare class Popover extends Component<PopoverProps, SpreadsheetChildEnv> {
4978
5018
  private spreadsheetRect;
4979
5019
  private containerRect;
4980
5020
  setup(): void;
5021
+ get popoverStyle(): string;
4981
5022
  }
4982
5023
 
4983
5024
  interface ColorPickerProps {
@@ -4994,7 +5035,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
4994
5035
  static components: {
4995
5036
  Popover: typeof Popover;
4996
5037
  };
4997
- COLORS: string[];
5038
+ COLORS: Color[];
4998
5039
  private state;
4999
5040
  get colorPickerStyle(): string;
5000
5041
  get popoverProps(): PopoverProps;
@@ -5008,9 +5049,10 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
5008
5049
  showMagnifier(_ev: MouseEvent): void;
5009
5050
  moveMagnifier(ev: MouseEvent): void;
5010
5051
  get magnifyingGlassStyle(): string;
5052
+ isSameColor(color1: Color, color2: Color): boolean;
5011
5053
  }
5012
5054
 
5013
- interface Props$z {
5055
+ interface Props$A {
5014
5056
  currentColor: string | undefined;
5015
5057
  toggleColorPicker: () => void;
5016
5058
  showColorPicker: boolean;
@@ -5021,7 +5063,7 @@ interface Props$z {
5021
5063
  dropdownMaxHeight?: Pixel;
5022
5064
  class?: string;
5023
5065
  }
5024
- declare class ColorPickerWidget extends Component<Props$z, SpreadsheetChildEnv> {
5066
+ declare class ColorPickerWidget extends Component<Props$A, SpreadsheetChildEnv> {
5025
5067
  static template: string;
5026
5068
  static components: {
5027
5069
  ColorPicker: typeof ColorPicker;
@@ -5033,12 +5075,12 @@ declare class ColorPickerWidget extends Component<Props$z, SpreadsheetChildEnv>
5033
5075
  get colorPickerAnchorRect(): Rect;
5034
5076
  }
5035
5077
 
5036
- interface Props$y {
5078
+ interface Props$z {
5037
5079
  figureId: UID;
5038
5080
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
5039
5081
  updateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => CommandResult | CommandResult[];
5040
5082
  }
5041
- declare class LineBarPieDesignPanel extends Component<Props$y, SpreadsheetChildEnv> {
5083
+ declare class LineBarPieDesignPanel extends Component<Props$z, SpreadsheetChildEnv> {
5042
5084
  static template: string;
5043
5085
  static components: {
5044
5086
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5047,17 +5089,17 @@ declare class LineBarPieDesignPanel extends Component<Props$y, SpreadsheetChildE
5047
5089
  onClick(ev: MouseEvent): void;
5048
5090
  setup(): void;
5049
5091
  toggleColorPicker(): void;
5050
- updateBackgroundColor(color: string): void;
5092
+ updateBackgroundColor(color: Color): void;
5051
5093
  updateTitle(ev: any): void;
5052
5094
  updateSelect(attr: string, ev: any): void;
5053
5095
  }
5054
5096
 
5055
- interface Props$x {
5097
+ interface Props$y {
5056
5098
  figureId: UID;
5057
5099
  definition: GaugeChartDefinition;
5058
5100
  updateChart: (definition: Partial<GaugeChartDefinition>) => DispatchResult;
5059
5101
  }
5060
- declare class GaugeChartConfigPanel extends Component<Props$x, SpreadsheetChildEnv> {
5102
+ declare class GaugeChartConfigPanel extends Component<Props$y, SpreadsheetChildEnv> {
5061
5103
  static template: string;
5062
5104
  static components: {
5063
5105
  SelectionInput: typeof SelectionInput;
@@ -5071,12 +5113,12 @@ declare class GaugeChartConfigPanel extends Component<Props$x, SpreadsheetChildE
5071
5113
  }
5072
5114
 
5073
5115
  declare type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
5074
- interface Props$w {
5116
+ interface Props$x {
5075
5117
  figureId: UID;
5076
5118
  definition: GaugeChartDefinition;
5077
5119
  updateChart: (definition: Partial<GaugeChartDefinition>) => DispatchResult;
5078
5120
  }
5079
- declare class GaugeChartDesignPanel extends Component<Props$w, SpreadsheetChildEnv> {
5121
+ declare class GaugeChartDesignPanel extends Component<Props$x, SpreadsheetChildEnv> {
5080
5122
  static template: string;
5081
5123
  static components: {
5082
5124
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5084,7 +5126,7 @@ declare class GaugeChartDesignPanel extends Component<Props$w, SpreadsheetChildE
5084
5126
  private state;
5085
5127
  setup(): void;
5086
5128
  get designErrorMessages(): string[];
5087
- updateBackgroundColor(color: string): void;
5129
+ updateBackgroundColor(color: Color): void;
5088
5130
  updateTitle(ev: any): void;
5089
5131
  isRangeMinInvalid(): boolean;
5090
5132
  isRangeMaxInvalid(): boolean;
@@ -5092,7 +5134,7 @@ declare class GaugeChartDesignPanel extends Component<Props$w, SpreadsheetChildE
5092
5134
  get isUpperInflectionPointInvalid(): boolean;
5093
5135
  updateInflectionPointValue(attr: string, ev: any): void;
5094
5136
  updateInflectionPointType(attr: string, ev: any): void;
5095
- updateSectionColor(target: string, color: string): void;
5137
+ updateSectionColor(target: string, color: Color): void;
5096
5138
  updateRangeMin(ev: any): void;
5097
5139
  updateRangeMax(ev: any): void;
5098
5140
  toggleMenu(menu: GaugeMenu): void;
@@ -5108,12 +5150,12 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
5108
5150
  onUpdateAggregated(ev: any): void;
5109
5151
  }
5110
5152
 
5111
- interface Props$v {
5153
+ interface Props$w {
5112
5154
  figureId: UID;
5113
5155
  definition: ScorecardChartDefinition;
5114
5156
  updateChart: (definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5115
5157
  }
5116
- declare class ScorecardChartConfigPanel extends Component<Props$v, SpreadsheetChildEnv> {
5158
+ declare class ScorecardChartConfigPanel extends Component<Props$w, SpreadsheetChildEnv> {
5117
5159
  static template: string;
5118
5160
  static components: {
5119
5161
  SelectionInput: typeof SelectionInput;
@@ -5132,12 +5174,12 @@ declare class ScorecardChartConfigPanel extends Component<Props$v, SpreadsheetCh
5132
5174
  }
5133
5175
 
5134
5176
  declare type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
5135
- interface Props$u {
5177
+ interface Props$v {
5136
5178
  figureId: UID;
5137
5179
  definition: ScorecardChartDefinition;
5138
5180
  updateChart: (definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5139
5181
  }
5140
- declare class ScorecardChartDesignPanel extends Component<Props$u, SpreadsheetChildEnv> {
5182
+ declare class ScorecardChartDesignPanel extends Component<Props$v, SpreadsheetChildEnv> {
5141
5183
  static template: string;
5142
5184
  static components: {
5143
5185
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5147,7 +5189,7 @@ declare class ScorecardChartDesignPanel extends Component<Props$u, SpreadsheetCh
5147
5189
  updateTitle(ev: any): void;
5148
5190
  updateBaselineDescr(ev: any): void;
5149
5191
  toggleColorPicker(colorPickerId: ColorPickerId): void;
5150
- setColor(color: string, colorPickerId: ColorPickerId): void;
5192
+ setColor(color: Color, colorPickerId: ColorPickerId): void;
5151
5193
  private closeMenus;
5152
5194
  }
5153
5195
 
@@ -5156,72 +5198,75 @@ interface ChartSidePanel {
5156
5198
  design: new (...args: any) => Component;
5157
5199
  }
5158
5200
 
5159
- /**
5160
- * An ActionMenuItem represent a menu item for the menus of the topbar.
5161
- * and the context menu in the grid.
5162
- *
5163
- * An ActionMenuItem has:
5164
- * - id, used for example to add child
5165
- * - name, which can be a string or a function to compute it
5166
- * - sequence, which represents its position inside the
5167
- * menus (the lower sequence it has, the upper it is in the menu)
5168
- * - isVisible, which can be defined to compute the visibility of the item
5169
- * - isReadonlyAllowed: is the action allowed when running spreadsheet in readonly mode
5170
- * - action, the action associated to this item. The action can return a result.
5171
- * The result will be carried by a `menu-clicked` event to the menu parent component.
5172
- * - children, subitems associated to this item
5173
- * NB: an item without action or children is not displayed !
5174
- * - separator, whether it should add a separator below the item
5175
- * NB: a separator defined on the last item is not displayed !
5176
- *
5177
- */
5178
- interface MenuItemSpec {
5201
+ interface ActionSpec {
5202
+ /**
5203
+ * String or a function to compute the name
5204
+ */
5179
5205
  name: string | ((env: SpreadsheetChildEnv) => string);
5180
5206
  description?: string;
5207
+ /**
5208
+ * which represents its position inside the
5209
+ * menus (the lower sequence it has, the upper it is in the menu)
5210
+ */
5181
5211
  sequence?: number;
5212
+ /**
5213
+ * used for example to add child
5214
+ */
5182
5215
  id?: string;
5216
+ /**
5217
+ * Can be defined to compute the visibility of the item
5218
+ */
5183
5219
  isVisible?: (env: SpreadsheetChildEnv) => boolean;
5220
+ /**
5221
+ * Can be defined to compute if the user can click on the action
5222
+ */
5184
5223
  isEnabled?: (env: SpreadsheetChildEnv) => boolean;
5224
+ /**
5225
+ * Can be defined to compute if the action is active
5226
+ */
5227
+ isActive?: (env: SpreadsheetChildEnv) => boolean;
5228
+ /**
5229
+ * Can be defined to display an icon
5230
+ */
5231
+ icon?: string;
5232
+ /**
5233
+ * is the action allowed when running spreadsheet in readonly mode
5234
+ */
5185
5235
  isReadonlyAllowed?: boolean;
5186
- action?: (env: SpreadsheetChildEnv) => unknown;
5187
- children?: MenuChildren;
5236
+ /**
5237
+ * Execute the action. The action can return a result.
5238
+ * The result will be carried by a `menu-clicked` event to the menu parent component.
5239
+ */
5240
+ execute?: (env: SpreadsheetChildEnv) => unknown;
5241
+ /**
5242
+ * subitems associated to this item
5243
+ * NB: an action without an execute function or children is not displayed !
5244
+ */
5245
+ children?: ActionChildren;
5246
+ /**
5247
+ * whether it should add a separator below the item in menus
5248
+ * NB: a separator defined on the last item is not displayed !
5249
+ */
5188
5250
  separator?: boolean;
5189
- icon?: string;
5190
- textColor?: string;
5251
+ textColor?: Color;
5191
5252
  }
5192
- interface MenuItem {
5193
- id: string;
5194
- sequence: number;
5253
+ interface Action {
5195
5254
  name: (env: SpreadsheetChildEnv) => string;
5255
+ description: string;
5256
+ sequence: number;
5257
+ id: string;
5196
5258
  isVisible: (env: SpreadsheetChildEnv) => boolean;
5197
5259
  isEnabled: (env: SpreadsheetChildEnv) => boolean;
5260
+ isActive?: (env: SpreadsheetChildEnv) => boolean;
5261
+ icon: string;
5198
5262
  isReadonlyAllowed: boolean;
5199
- action?: (env: SpreadsheetChildEnv) => unknown;
5200
- children: (env: SpreadsheetChildEnv) => MenuItem[];
5263
+ execute?: (env: SpreadsheetChildEnv) => unknown;
5264
+ children: (env: SpreadsheetChildEnv) => Action[];
5201
5265
  separator: boolean;
5202
- description: string;
5203
- textColor?: string;
5204
- icon?: string;
5205
- }
5206
- declare type MenuItemsBuilder = (env: SpreadsheetChildEnv) => MenuItemSpec[];
5207
- declare type MenuChildren = (MenuItemSpec | MenuItemsBuilder)[];
5208
- /**
5209
- * The class Registry is extended in order to add the function addChild
5210
- *
5211
- */
5212
- declare class MenuItemRegistry extends Registry<MenuItemSpec> {
5213
- /**
5214
- * @override
5215
- */
5216
- add(key: string, value: MenuItemSpec): MenuItemRegistry;
5217
- /**
5218
- * Add a subitem to an existing item
5219
- * @param path Path of items to add this subitem
5220
- * @param value Subitem to add
5221
- */
5222
- addChild(key: string, path: string[], value: MenuItemSpec | MenuItemsBuilder): MenuItemRegistry;
5223
- getMenuItems(): MenuItem[];
5266
+ textColor?: Color;
5224
5267
  }
5268
+ declare type ActionBuilder = (env: SpreadsheetChildEnv) => ActionSpec[];
5269
+ declare type ActionChildren = (ActionSpec | ActionBuilder)[];
5225
5270
 
5226
5271
  /**
5227
5272
  * This registry is intended to map a type of figure (tag) to a class of
@@ -5231,7 +5276,7 @@ declare class MenuItemRegistry extends Registry<MenuItemSpec> {
5231
5276
  */
5232
5277
  interface FigureContent {
5233
5278
  Component: any;
5234
- menuBuilder: (figureId: UID, onFigureDeleted: () => void, env: SpreadsheetChildEnv) => MenuItem[];
5279
+ menuBuilder: (figureId: UID, onFigureDeleted: () => void, env: SpreadsheetChildEnv) => Action[];
5235
5280
  SidePanelComponent?: string;
5236
5281
  keepRatio?: boolean;
5237
5282
  minFigSize?: number;
@@ -5244,6 +5289,24 @@ interface SidePanelContent {
5244
5289
  Footer?: any;
5245
5290
  }
5246
5291
 
5292
+ /**
5293
+ * The class Registry is extended in order to add the function addChild
5294
+ *
5295
+ */
5296
+ declare class MenuItemRegistry extends Registry<ActionSpec> {
5297
+ /**
5298
+ * @override
5299
+ */
5300
+ add(key: string, value: ActionSpec): MenuItemRegistry;
5301
+ /**
5302
+ * Add a subitem to an existing item
5303
+ * @param path Path of items to add this subitem
5304
+ * @param value Subitem to add
5305
+ */
5306
+ addChild(key: string, path: string[], value: ActionSpec | ActionBuilder): MenuItemRegistry;
5307
+ getMenuItems(): Action[];
5308
+ }
5309
+
5247
5310
  /**
5248
5311
  * An AutofillRule is used to generate what to do when we need to autofill
5249
5312
  * a cell. (In a AutofillGenerator, see plugins/autofill.ts)
@@ -5257,10 +5320,10 @@ interface AutofillRule {
5257
5320
  sequence: number;
5258
5321
  }
5259
5322
 
5260
- interface Props$t {
5323
+ interface Props$u {
5261
5324
  figure: Figure;
5262
5325
  }
5263
- declare class ChartJsComponent extends Component<Props$t, SpreadsheetChildEnv> {
5326
+ declare class ChartJsComponent extends Component<Props$u, SpreadsheetChildEnv> {
5264
5327
  static template: string;
5265
5328
  private canvas;
5266
5329
  private chart?;
@@ -5272,10 +5335,10 @@ declare class ChartJsComponent extends Component<Props$t, SpreadsheetChildEnv> {
5272
5335
  private updateChartJs;
5273
5336
  }
5274
5337
 
5275
- interface Props$s {
5338
+ interface Props$t {
5276
5339
  figure: Figure;
5277
5340
  }
5278
- declare class ScorecardChart extends Component<Props$s, SpreadsheetChildEnv> {
5341
+ declare class ScorecardChart extends Component<Props$t, SpreadsheetChildEnv> {
5279
5342
  static template: string;
5280
5343
  private ctx;
5281
5344
  get runtime(): ScorecardChartRuntime;
@@ -5284,8 +5347,8 @@ declare class ScorecardChart extends Component<Props$s, SpreadsheetChildEnv> {
5284
5347
  get baseline(): string;
5285
5348
  get baselineDescr(): string;
5286
5349
  get baselineArrowDirection(): BaselineArrowDirection;
5287
- get backgroundColor(): string;
5288
- get primaryFontColor(): string;
5350
+ get backgroundColor(): Color;
5351
+ get primaryFontColor(): Color;
5289
5352
  get secondaryFontColor(): "#525252" | "#C8C8C8";
5290
5353
  get figure(): Figure;
5291
5354
  get chartStyle(): string;
@@ -5306,9 +5369,10 @@ declare class ScorecardChart extends Component<Props$s, SpreadsheetChildEnv> {
5306
5369
  private getWidestElement;
5307
5370
  }
5308
5371
 
5309
- interface Props$r {
5372
+ declare type MenuItemOrSeparator = Action | "separator";
5373
+ interface Props$s {
5310
5374
  position: DOMCoordinates;
5311
- menuItems: MenuItem[];
5375
+ menuItems: Action[];
5312
5376
  depth: number;
5313
5377
  maxHeight?: Pixel;
5314
5378
  onClose: () => void;
@@ -5317,12 +5381,12 @@ interface Props$r {
5317
5381
  }
5318
5382
  interface MenuState {
5319
5383
  isOpen: boolean;
5320
- parentMenu?: MenuItem;
5384
+ parentMenu?: Action;
5321
5385
  position: null | DOMCoordinates;
5322
5386
  scrollOffset?: Pixel;
5323
- menuItems: MenuItem[];
5387
+ menuItems: Action[];
5324
5388
  }
5325
- declare class Menu extends Component<Props$r, SpreadsheetChildEnv> {
5389
+ declare class Menu extends Component<Props$s, SpreadsheetChildEnv> {
5326
5390
  static template: string;
5327
5391
  static components: {
5328
5392
  Menu: typeof Menu;
@@ -5335,44 +5399,39 @@ declare class Menu extends Component<Props$r, SpreadsheetChildEnv> {
5335
5399
  private menuRef;
5336
5400
  private position;
5337
5401
  setup(): void;
5338
- get visibleMenuItems(): MenuItem[];
5402
+ get menuItemsAndSeparators(): MenuItemOrSeparator[];
5339
5403
  get subMenuPosition(): DOMCoordinates;
5340
- get menuHeight(): Pixel;
5341
5404
  get popoverProps(): PopoverProps;
5342
- getColor(menu: MenuItem): string | undefined;
5343
- activateMenu(menu: MenuItem): Promise<void>;
5405
+ get childrenHaveIcon(): boolean;
5406
+ getIconName(menu: Action): "" | "o-spreadsheet-Icon.CHECK";
5407
+ getColor(menu: Action): string | undefined;
5408
+ activateMenu(menu: Action): Promise<void>;
5344
5409
  private close;
5345
- /**
5346
- * Return the number of pixels between the top of the menu
5347
- * and the menu item at a given index.
5348
- */
5349
- private subMenuVerticalPosition;
5350
5410
  private onExternalClick;
5351
- private getMenuItemsHeight;
5352
- getName(menu: MenuItem): string;
5353
- isRoot(menu: MenuItem): boolean;
5354
- isEnabled(menu: MenuItem): boolean;
5411
+ getName(menu: Action): string;
5412
+ isRoot(menu: Action): boolean;
5413
+ isEnabled(menu: Action): boolean;
5355
5414
  onScroll(ev: any): void;
5356
5415
  /**
5357
5416
  * If the given menu is not disabled, open it's submenu at the
5358
5417
  * correct position according to available surrounding space.
5359
5418
  */
5360
- openSubMenu(menu: MenuItem, menuIndex: number): void;
5361
- isParentMenu(subMenu: MenuState, menuItem: MenuItem): boolean;
5419
+ openSubMenu(menu: Action, menuIndex: number, ev: MouseEvent): void;
5420
+ isParentMenu(subMenu: MenuState, menuItem: Action): boolean;
5362
5421
  closeSubMenu(): void;
5363
- onClickMenu(menu: MenuItem, menuIndex: number): void;
5364
- onMouseOver(menu: MenuItem, position: Pixel): void;
5422
+ onClickMenu(menu: Action, menuIndex: number, ev: MouseEvent): void;
5423
+ onMouseOver(menu: Action, position: Pixel, ev: MouseEvent): void;
5365
5424
  }
5366
5425
 
5367
5426
  declare type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
5368
- interface Props$q {
5427
+ interface Props$r {
5369
5428
  figure: Figure;
5370
5429
  style: string;
5371
5430
  onFigureDeleted: () => void;
5372
5431
  onMouseDown: (ev: MouseEvent) => void;
5373
5432
  onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
5374
5433
  }
5375
- declare class FigureComponent extends Component<Props$q, SpreadsheetChildEnv> {
5434
+ declare class FigureComponent extends Component<Props$r, SpreadsheetChildEnv> {
5376
5435
  static template: string;
5377
5436
  static components: {
5378
5437
  Menu: typeof Menu;
@@ -5402,11 +5461,11 @@ declare class FigureComponent extends Component<Props$q, SpreadsheetChildEnv> {
5402
5461
  private openContextMenu;
5403
5462
  }
5404
5463
 
5405
- interface Props$p {
5464
+ interface Props$q {
5406
5465
  figure: Figure;
5407
5466
  onFigureDeleted: () => void;
5408
5467
  }
5409
- declare class ChartFigure extends Component<Props$p, SpreadsheetChildEnv> {
5468
+ declare class ChartFigure extends Component<Props$q, SpreadsheetChildEnv> {
5410
5469
  static template: string;
5411
5470
  static components: {};
5412
5471
  onDoubleClick(): void;
@@ -5414,7 +5473,7 @@ declare class ChartFigure extends Component<Props$p, SpreadsheetChildEnv> {
5414
5473
  get chartComponent(): new (...args: any) => Component;
5415
5474
  }
5416
5475
 
5417
- interface Props$o {
5476
+ interface Props$p {
5418
5477
  isVisible: boolean;
5419
5478
  position: Position;
5420
5479
  }
@@ -5426,7 +5485,7 @@ interface State$3 {
5426
5485
  position: Position;
5427
5486
  handler: boolean;
5428
5487
  }
5429
- declare class Autofill extends Component<Props$o, SpreadsheetChildEnv> {
5488
+ declare class Autofill extends Component<Props$p, SpreadsheetChildEnv> {
5430
5489
  static template: string;
5431
5490
  state: State$3;
5432
5491
  get style(): string;
@@ -5440,7 +5499,7 @@ declare class Autofill extends Component<Props$o, SpreadsheetChildEnv> {
5440
5499
  interface ClientTagProps {
5441
5500
  active: boolean;
5442
5501
  name: string;
5443
- color: string;
5502
+ color: Color;
5444
5503
  col: HeaderIndex;
5445
5504
  row: HeaderIndex;
5446
5505
  }
@@ -5500,13 +5559,13 @@ declare class Ripple extends Component<RippleProps, SpreadsheetChildEnv> {
5500
5559
  getRippleEffectProps(id: number): RippleEffectProps;
5501
5560
  }
5502
5561
 
5503
- interface Props$n {
5562
+ interface Props$o {
5504
5563
  sheetId: string;
5505
5564
  openContextMenu: (registry: MenuItemRegistry, ev: MouseEvent) => void;
5506
5565
  style?: string;
5507
5566
  onMouseDown: (ev: MouseEvent) => void;
5508
5567
  }
5509
- declare class BottomBarSheet extends Component<Props$n, SpreadsheetChildEnv> {
5568
+ declare class BottomBarSheet extends Component<Props$o, SpreadsheetChildEnv> {
5510
5569
  static template: string;
5511
5570
  static components: {
5512
5571
  Ripple: typeof Ripple;
@@ -5540,11 +5599,11 @@ declare class BottomBarSheet extends Component<Props$n, SpreadsheetChildEnv> {
5540
5599
  get sheetName(): string;
5541
5600
  }
5542
5601
 
5543
- interface Props$m {
5602
+ interface Props$n {
5544
5603
  openContextMenu: (x: number, y: number, registry: MenuItemRegistry) => void;
5545
5604
  closeContextMenu: () => void;
5546
5605
  }
5547
- declare class BottomBarStatistic extends Component<Props$m, SpreadsheetChildEnv> {
5606
+ declare class BottomBarStatistic extends Component<Props$n, SpreadsheetChildEnv> {
5548
5607
  static template: string;
5549
5608
  static components: {
5550
5609
  Ripple: typeof Ripple;
@@ -5566,13 +5625,13 @@ interface SheetState {
5566
5625
  isDnd: boolean;
5567
5626
  sheetDndPositions: Record<UID, number> | undefined;
5568
5627
  }
5569
- interface Props$l {
5628
+ interface Props$m {
5570
5629
  onClick: () => void;
5571
5630
  }
5572
5631
  interface BottomBarMenuState extends MenuState {
5573
5632
  menuId: UID | undefined;
5574
5633
  }
5575
- declare class BottomBar extends Component<Props$l, SpreadsheetChildEnv> {
5634
+ declare class BottomBar extends Component<Props$m, SpreadsheetChildEnv> {
5576
5635
  static template: string;
5577
5636
  static components: {
5578
5637
  Menu: typeof Menu;
@@ -5615,6 +5674,39 @@ declare class BottomBar extends Component<Props$l, SpreadsheetChildEnv> {
5615
5674
  get sheetListMaxScroll(): number;
5616
5675
  }
5617
5676
 
5677
+ interface Props$l {
5678
+ position: DOMCoordinates;
5679
+ isActive: boolean;
5680
+ onClick: () => void;
5681
+ }
5682
+ declare class FilterIcon extends Component<Props$l, SpreadsheetEnv> {
5683
+ static style: string;
5684
+ static template: string;
5685
+ get style(): string;
5686
+ }
5687
+
5688
+ interface Props$k {
5689
+ gridPosition: DOMCoordinates;
5690
+ }
5691
+ declare class FilterIconsOverlay extends Component<Props$k, SpreadsheetChildEnv> {
5692
+ static style: string;
5693
+ static template: string;
5694
+ static components: {
5695
+ FilterIcon: typeof FilterIcon;
5696
+ };
5697
+ static defaultProps: {
5698
+ gridPosition: {
5699
+ x: number;
5700
+ y: number;
5701
+ };
5702
+ };
5703
+ getVisibleFilterHeaders(): Position$1[];
5704
+ getFilterHeaderPosition(position: Position$1): DOMCoordinates;
5705
+ isFilterActive(position: Position$1): boolean;
5706
+ toggleFilterMenu(position: Position$1): void;
5707
+ private isPositionVisible;
5708
+ }
5709
+
5618
5710
  declare type HFigureAxisType = "top" | "bottom" | "vCenter";
5619
5711
  declare type VFigureAxisType = "right" | "left" | "hCenter";
5620
5712
  interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
@@ -5625,7 +5717,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
5625
5717
  }
5626
5718
 
5627
5719
  declare type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
5628
- interface Props$k {
5720
+ interface Props$j {
5629
5721
  onFigureDeleted: () => void;
5630
5722
  }
5631
5723
  interface Container {
@@ -5704,7 +5796,7 @@ interface DndState {
5704
5796
  * that occurred during the drag & drop, and to position the figure on the correct pane.
5705
5797
  *
5706
5798
  */
5707
- declare class FiguresContainer extends Component<Props$k, SpreadsheetChildEnv> {
5799
+ declare class FiguresContainer extends Component<Props$j, SpreadsheetChildEnv> {
5708
5800
  static template: string;
5709
5801
  static components: {
5710
5802
  FigureComponent: typeof FigureComponent;
@@ -5736,7 +5828,7 @@ declare class FiguresContainer extends Component<Props$k, SpreadsheetChildEnv> {
5736
5828
  private getSnapLineStyle;
5737
5829
  }
5738
5830
 
5739
- interface Props$j {
5831
+ interface Props$i {
5740
5832
  onCellHovered: (position: Partial<Position$1>) => void;
5741
5833
  onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
5742
5834
  onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
@@ -5749,7 +5841,7 @@ interface Props$j {
5749
5841
  gridOverlayDimensions: string;
5750
5842
  onFigureDeleted: () => void;
5751
5843
  }
5752
- declare class GridOverlay extends Component<Props$j, SpreadsheetChildEnv> {
5844
+ declare class GridOverlay extends Component<Props$i, SpreadsheetChildEnv> {
5753
5845
  static template: string;
5754
5846
  static components: {
5755
5847
  FiguresContainer: typeof FiguresContainer;
@@ -5771,23 +5863,24 @@ declare class GridOverlay extends Component<Props$j, SpreadsheetChildEnv> {
5771
5863
  private getCartesianCoordinates;
5772
5864
  }
5773
5865
 
5774
- interface Props$i {
5866
+ interface Props$h {
5775
5867
  hoveredCell: Partial<Position$1>;
5776
5868
  gridRect: Rect;
5777
5869
  onClosePopover: () => void;
5778
5870
  onMouseWheel: (ev: WheelEvent) => void;
5779
5871
  }
5780
- declare class GridPopover extends Component<Props$i, SpreadsheetChildEnv> {
5872
+ declare class GridPopover extends Component<Props$h, SpreadsheetChildEnv> {
5781
5873
  static template: string;
5782
5874
  static components: {
5783
5875
  Popover: typeof Popover;
5784
5876
  };
5877
+ zIndex: ComponentsImportance;
5785
5878
  get cellPopover(): PositionedCellPopover | ClosedCellPopover;
5786
5879
  }
5787
5880
 
5788
5881
  declare type ScrollDirection = "horizontal" | "vertical";
5789
5882
 
5790
- interface Props$h {
5883
+ interface Props$g {
5791
5884
  width: Pixel;
5792
5885
  height: Pixel;
5793
5886
  direction: ScrollDirection;
@@ -5795,7 +5888,7 @@ interface Props$h {
5795
5888
  offset: Pixel;
5796
5889
  onScroll: (offset: Pixel) => void;
5797
5890
  }
5798
- declare class ScrollBar extends Component<Props$h> {
5891
+ declare class ScrollBar extends Component<Props$g> {
5799
5892
  static template: string;
5800
5893
  static defaultProps: {
5801
5894
  width: number;
@@ -5809,10 +5902,10 @@ declare class ScrollBar extends Component<Props$h> {
5809
5902
  onScroll(ev: any): void;
5810
5903
  }
5811
5904
 
5812
- interface Props$g {
5905
+ interface Props$f {
5813
5906
  leftOffset: number;
5814
5907
  }
5815
- declare class HorizontalScrollBar extends Component<Props$g, SpreadsheetChildEnv> {
5908
+ declare class HorizontalScrollBar extends Component<Props$f, SpreadsheetChildEnv> {
5816
5909
  static components: {
5817
5910
  ScrollBar: typeof ScrollBar;
5818
5911
  };
@@ -5820,8 +5913,8 @@ declare class HorizontalScrollBar extends Component<Props$g, SpreadsheetChildEnv
5820
5913
  static defaultProps: {
5821
5914
  leftOffset: number;
5822
5915
  };
5823
- get offset(): number;
5824
- get width(): number;
5916
+ get offset(): Pixel;
5917
+ get width(): Pixel;
5825
5918
  get isDisplayed(): boolean;
5826
5919
  get position(): {
5827
5920
  left: string;
@@ -5832,10 +5925,10 @@ declare class HorizontalScrollBar extends Component<Props$g, SpreadsheetChildEnv
5832
5925
  onScroll(offset: any): void;
5833
5926
  }
5834
5927
 
5835
- interface Props$f {
5928
+ interface Props$e {
5836
5929
  topOffset: number;
5837
5930
  }
5838
- declare class VerticalScrollBar extends Component<Props$f, SpreadsheetChildEnv> {
5931
+ declare class VerticalScrollBar extends Component<Props$e, SpreadsheetChildEnv> {
5839
5932
  static components: {
5840
5933
  ScrollBar: typeof ScrollBar;
5841
5934
  };
@@ -5843,8 +5936,8 @@ declare class VerticalScrollBar extends Component<Props$f, SpreadsheetChildEnv>
5843
5936
  static defaultProps: {
5844
5937
  topOffset: number;
5845
5938
  };
5846
- get offset(): number;
5847
- get height(): number;
5939
+ get offset(): Pixel;
5940
+ get height(): Pixel;
5848
5941
  get isDisplayed(): boolean;
5849
5942
  get position(): {
5850
5943
  top: string;
@@ -5855,40 +5948,7 @@ declare class VerticalScrollBar extends Component<Props$f, SpreadsheetChildEnv>
5855
5948
  onScroll(offset: any): void;
5856
5949
  }
5857
5950
 
5858
- interface Props$e {
5859
- position: DOMCoordinates;
5860
- isActive: boolean;
5861
- onClick: () => void;
5862
- }
5863
- declare class FilterIcon extends Component<Props$e, SpreadsheetEnv> {
5864
- static style: string;
5865
- static template: string;
5866
- get style(): string;
5867
- }
5868
-
5869
5951
  interface Props$d {
5870
- gridPosition: DOMCoordinates;
5871
- }
5872
- declare class FilterIconsOverlay extends Component<Props$d, SpreadsheetChildEnv> {
5873
- static style: string;
5874
- static template: string;
5875
- static components: {
5876
- FilterIcon: typeof FilterIcon;
5877
- };
5878
- static defaultProps: {
5879
- gridPosition: {
5880
- x: number;
5881
- y: number;
5882
- };
5883
- };
5884
- getVisibleFilterHeaders(): Position$1[];
5885
- getFilterHeaderPosition(position: Position$1): DOMCoordinates;
5886
- isFilterActive(position: Position$1): boolean;
5887
- toggleFilterMenu(position: Position$1): void;
5888
- private isPositionVisible;
5889
- }
5890
-
5891
- interface Props$c {
5892
5952
  }
5893
5953
  interface ClickableCell {
5894
5954
  coordinates: Rect;
@@ -5896,7 +5956,7 @@ interface ClickableCell {
5896
5956
  action: (position: CellPosition, env: SpreadsheetChildEnv) => void;
5897
5957
  tKey: string;
5898
5958
  }
5899
- declare class SpreadsheetDashboard extends Component<Props$c, SpreadsheetChildEnv> {
5959
+ declare class SpreadsheetDashboard extends Component<Props$d, SpreadsheetChildEnv> {
5900
5960
  static template: string;
5901
5961
  static components: {
5902
5962
  GridOverlay: typeof GridOverlay;
@@ -5932,7 +5992,7 @@ declare class SpreadsheetDashboard extends Component<Props$c, SpreadsheetChildEn
5932
5992
  private getGridRect;
5933
5993
  }
5934
5994
 
5935
- interface Props$b {
5995
+ interface Props$c {
5936
5996
  component: string;
5937
5997
  panelProps: any;
5938
5998
  onCloseSidePanel: () => void;
@@ -5940,13 +6000,309 @@ interface Props$b {
5940
6000
  interface State$2 {
5941
6001
  panel: SidePanelContent;
5942
6002
  }
5943
- declare class SidePanel extends Component<Props$b, SpreadsheetChildEnv> {
6003
+ declare class SidePanel extends Component<Props$c, SpreadsheetChildEnv> {
5944
6004
  static template: string;
5945
6005
  state: State$2;
5946
6006
  setup(): void;
5947
6007
  getTitle(): string;
5948
6008
  }
5949
6009
 
6010
+ declare const undo: ActionSpec;
6011
+ declare const redo: ActionSpec;
6012
+ declare const copy: ActionSpec;
6013
+ declare const cut: ActionSpec;
6014
+ declare const paste: ActionSpec;
6015
+ declare const pasteSpecial: ActionSpec;
6016
+ declare const pasteSpecialValue: ActionSpec;
6017
+ declare const pasteSpecialFormat: ActionSpec;
6018
+ declare const findAndReplace: ActionSpec;
6019
+ declare const deleteValues: ActionSpec;
6020
+ declare const deleteRows: ActionSpec;
6021
+ declare const deleteRow: ActionSpec;
6022
+ declare const clearRows: ActionSpec;
6023
+ declare const deleteCols: ActionSpec;
6024
+ declare const deleteCol: ActionSpec;
6025
+ declare const clearCols: ActionSpec;
6026
+ declare const deleteCells: ActionSpec;
6027
+ declare const deleteCellShiftUp: ActionSpec;
6028
+ declare const deleteCellShiftLeft: ActionSpec;
6029
+ declare const mergeCells: ActionSpec;
6030
+
6031
+ declare const ACTION_EDIT_undo: typeof undo;
6032
+ declare const ACTION_EDIT_redo: typeof redo;
6033
+ declare const ACTION_EDIT_copy: typeof copy;
6034
+ declare const ACTION_EDIT_cut: typeof cut;
6035
+ declare const ACTION_EDIT_paste: typeof paste;
6036
+ declare const ACTION_EDIT_pasteSpecial: typeof pasteSpecial;
6037
+ declare const ACTION_EDIT_pasteSpecialValue: typeof pasteSpecialValue;
6038
+ declare const ACTION_EDIT_pasteSpecialFormat: typeof pasteSpecialFormat;
6039
+ declare const ACTION_EDIT_findAndReplace: typeof findAndReplace;
6040
+ declare const ACTION_EDIT_deleteValues: typeof deleteValues;
6041
+ declare const ACTION_EDIT_deleteRows: typeof deleteRows;
6042
+ declare const ACTION_EDIT_deleteRow: typeof deleteRow;
6043
+ declare const ACTION_EDIT_clearRows: typeof clearRows;
6044
+ declare const ACTION_EDIT_deleteCols: typeof deleteCols;
6045
+ declare const ACTION_EDIT_deleteCol: typeof deleteCol;
6046
+ declare const ACTION_EDIT_clearCols: typeof clearCols;
6047
+ declare const ACTION_EDIT_deleteCells: typeof deleteCells;
6048
+ declare const ACTION_EDIT_deleteCellShiftUp: typeof deleteCellShiftUp;
6049
+ declare const ACTION_EDIT_deleteCellShiftLeft: typeof deleteCellShiftLeft;
6050
+ declare const ACTION_EDIT_mergeCells: typeof mergeCells;
6051
+ declare namespace ACTION_EDIT {
6052
+ export {
6053
+ ACTION_EDIT_undo as undo,
6054
+ ACTION_EDIT_redo as redo,
6055
+ ACTION_EDIT_copy as copy,
6056
+ ACTION_EDIT_cut as cut,
6057
+ ACTION_EDIT_paste as paste,
6058
+ ACTION_EDIT_pasteSpecial as pasteSpecial,
6059
+ ACTION_EDIT_pasteSpecialValue as pasteSpecialValue,
6060
+ ACTION_EDIT_pasteSpecialFormat as pasteSpecialFormat,
6061
+ ACTION_EDIT_findAndReplace as findAndReplace,
6062
+ ACTION_EDIT_deleteValues as deleteValues,
6063
+ ACTION_EDIT_deleteRows as deleteRows,
6064
+ ACTION_EDIT_deleteRow as deleteRow,
6065
+ ACTION_EDIT_clearRows as clearRows,
6066
+ ACTION_EDIT_deleteCols as deleteCols,
6067
+ ACTION_EDIT_deleteCol as deleteCol,
6068
+ ACTION_EDIT_clearCols as clearCols,
6069
+ ACTION_EDIT_deleteCells as deleteCells,
6070
+ ACTION_EDIT_deleteCellShiftUp as deleteCellShiftUp,
6071
+ ACTION_EDIT_deleteCellShiftLeft as deleteCellShiftLeft,
6072
+ ACTION_EDIT_mergeCells as mergeCells,
6073
+ };
6074
+ }
6075
+
6076
+ declare const formatNumberAutomatic: ActionSpec;
6077
+ declare const formatNumberNumber: ActionSpec;
6078
+ declare const formatPercent: ActionSpec;
6079
+ declare const formatNumberPercent: ActionSpec;
6080
+ declare const formatNumberCurrency: ActionSpec;
6081
+ declare const formatNumberCurrencyRounded: ActionSpec;
6082
+ declare const formatCustomCurrency: ActionSpec;
6083
+ declare const formatNumberDate: ActionSpec;
6084
+ declare const formatNumberTime: ActionSpec;
6085
+ declare const formatNumberDateTime: ActionSpec;
6086
+ declare const formatNumberDuration: ActionSpec;
6087
+ declare const incraseDecimalPlaces: ActionSpec;
6088
+ declare const decraseDecimalPlaces: ActionSpec;
6089
+ declare const formatBold: ActionSpec;
6090
+ declare const formatItalic: ActionSpec;
6091
+ declare const formatUnderline: ActionSpec;
6092
+ declare const formatStrikethrough: ActionSpec;
6093
+ declare const formatFontSize: ActionSpec;
6094
+ declare const formatAlignment: ActionSpec;
6095
+ declare const formatAlignmentHorizontal: ActionSpec;
6096
+ declare const formatAlignmentLeft: ActionSpec;
6097
+ declare const formatAlignmentCenter: ActionSpec;
6098
+ declare const formatAlignmentRight: ActionSpec;
6099
+ declare const formatAlignmentVertical: ActionSpec;
6100
+ declare const formatAlignmentTop: ActionSpec;
6101
+ declare const formatAlignmentMiddle: ActionSpec;
6102
+ declare const formatAlignmentBottom: ActionSpec;
6103
+ declare const formatWrapping: ActionSpec;
6104
+ declare const formatWrappingOverflow: ActionSpec;
6105
+ declare const formatWrappingWrap: ActionSpec;
6106
+ declare const formatWrappingClip: ActionSpec;
6107
+ declare const textColor: ActionSpec;
6108
+ declare const fillColor: ActionSpec;
6109
+ declare const formatCF: ActionSpec;
6110
+ declare const paintFormat: ActionSpec;
6111
+ declare const clearFormat: ActionSpec;
6112
+ declare const borders: ActionSpec;
6113
+ declare const bordersAll: ActionSpec;
6114
+ declare const bordersInner: ActionSpec;
6115
+ declare const bordersHorizontal: ActionSpec;
6116
+ declare const bordersVertical: ActionSpec;
6117
+ declare const bordersExternal: ActionSpec;
6118
+ declare const bordersLeft: ActionSpec;
6119
+ declare const bordersTop: ActionSpec;
6120
+ declare const bordersRight: ActionSpec;
6121
+ declare const bordersBottom: ActionSpec;
6122
+ declare const bordersClear: ActionSpec;
6123
+
6124
+ declare const ACTION_FORMAT_formatNumberAutomatic: typeof formatNumberAutomatic;
6125
+ declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
6126
+ declare const ACTION_FORMAT_formatPercent: typeof formatPercent;
6127
+ declare const ACTION_FORMAT_formatNumberPercent: typeof formatNumberPercent;
6128
+ declare const ACTION_FORMAT_formatNumberCurrency: typeof formatNumberCurrency;
6129
+ declare const ACTION_FORMAT_formatNumberCurrencyRounded: typeof formatNumberCurrencyRounded;
6130
+ declare const ACTION_FORMAT_formatCustomCurrency: typeof formatCustomCurrency;
6131
+ declare const ACTION_FORMAT_formatNumberDate: typeof formatNumberDate;
6132
+ declare const ACTION_FORMAT_formatNumberTime: typeof formatNumberTime;
6133
+ declare const ACTION_FORMAT_formatNumberDateTime: typeof formatNumberDateTime;
6134
+ declare const ACTION_FORMAT_formatNumberDuration: typeof formatNumberDuration;
6135
+ declare const ACTION_FORMAT_incraseDecimalPlaces: typeof incraseDecimalPlaces;
6136
+ declare const ACTION_FORMAT_decraseDecimalPlaces: typeof decraseDecimalPlaces;
6137
+ declare const ACTION_FORMAT_formatBold: typeof formatBold;
6138
+ declare const ACTION_FORMAT_formatItalic: typeof formatItalic;
6139
+ declare const ACTION_FORMAT_formatUnderline: typeof formatUnderline;
6140
+ declare const ACTION_FORMAT_formatStrikethrough: typeof formatStrikethrough;
6141
+ declare const ACTION_FORMAT_formatFontSize: typeof formatFontSize;
6142
+ declare const ACTION_FORMAT_formatAlignment: typeof formatAlignment;
6143
+ declare const ACTION_FORMAT_formatAlignmentHorizontal: typeof formatAlignmentHorizontal;
6144
+ declare const ACTION_FORMAT_formatAlignmentLeft: typeof formatAlignmentLeft;
6145
+ declare const ACTION_FORMAT_formatAlignmentCenter: typeof formatAlignmentCenter;
6146
+ declare const ACTION_FORMAT_formatAlignmentRight: typeof formatAlignmentRight;
6147
+ declare const ACTION_FORMAT_formatAlignmentVertical: typeof formatAlignmentVertical;
6148
+ declare const ACTION_FORMAT_formatAlignmentTop: typeof formatAlignmentTop;
6149
+ declare const ACTION_FORMAT_formatAlignmentMiddle: typeof formatAlignmentMiddle;
6150
+ declare const ACTION_FORMAT_formatAlignmentBottom: typeof formatAlignmentBottom;
6151
+ declare const ACTION_FORMAT_formatWrapping: typeof formatWrapping;
6152
+ declare const ACTION_FORMAT_formatWrappingOverflow: typeof formatWrappingOverflow;
6153
+ declare const ACTION_FORMAT_formatWrappingWrap: typeof formatWrappingWrap;
6154
+ declare const ACTION_FORMAT_formatWrappingClip: typeof formatWrappingClip;
6155
+ declare const ACTION_FORMAT_textColor: typeof textColor;
6156
+ declare const ACTION_FORMAT_fillColor: typeof fillColor;
6157
+ declare const ACTION_FORMAT_formatCF: typeof formatCF;
6158
+ declare const ACTION_FORMAT_paintFormat: typeof paintFormat;
6159
+ declare const ACTION_FORMAT_clearFormat: typeof clearFormat;
6160
+ declare const ACTION_FORMAT_borders: typeof borders;
6161
+ declare const ACTION_FORMAT_bordersAll: typeof bordersAll;
6162
+ declare const ACTION_FORMAT_bordersInner: typeof bordersInner;
6163
+ declare const ACTION_FORMAT_bordersHorizontal: typeof bordersHorizontal;
6164
+ declare const ACTION_FORMAT_bordersVertical: typeof bordersVertical;
6165
+ declare const ACTION_FORMAT_bordersExternal: typeof bordersExternal;
6166
+ declare const ACTION_FORMAT_bordersLeft: typeof bordersLeft;
6167
+ declare const ACTION_FORMAT_bordersTop: typeof bordersTop;
6168
+ declare const ACTION_FORMAT_bordersRight: typeof bordersRight;
6169
+ declare const ACTION_FORMAT_bordersBottom: typeof bordersBottom;
6170
+ declare const ACTION_FORMAT_bordersClear: typeof bordersClear;
6171
+ declare namespace ACTION_FORMAT {
6172
+ export {
6173
+ ACTION_FORMAT_formatNumberAutomatic as formatNumberAutomatic,
6174
+ ACTION_FORMAT_formatNumberNumber as formatNumberNumber,
6175
+ ACTION_FORMAT_formatPercent as formatPercent,
6176
+ ACTION_FORMAT_formatNumberPercent as formatNumberPercent,
6177
+ ACTION_FORMAT_formatNumberCurrency as formatNumberCurrency,
6178
+ ACTION_FORMAT_formatNumberCurrencyRounded as formatNumberCurrencyRounded,
6179
+ ACTION_FORMAT_formatCustomCurrency as formatCustomCurrency,
6180
+ ACTION_FORMAT_formatNumberDate as formatNumberDate,
6181
+ ACTION_FORMAT_formatNumberTime as formatNumberTime,
6182
+ ACTION_FORMAT_formatNumberDateTime as formatNumberDateTime,
6183
+ ACTION_FORMAT_formatNumberDuration as formatNumberDuration,
6184
+ ACTION_FORMAT_incraseDecimalPlaces as incraseDecimalPlaces,
6185
+ ACTION_FORMAT_decraseDecimalPlaces as decraseDecimalPlaces,
6186
+ ACTION_FORMAT_formatBold as formatBold,
6187
+ ACTION_FORMAT_formatItalic as formatItalic,
6188
+ ACTION_FORMAT_formatUnderline as formatUnderline,
6189
+ ACTION_FORMAT_formatStrikethrough as formatStrikethrough,
6190
+ ACTION_FORMAT_formatFontSize as formatFontSize,
6191
+ ACTION_FORMAT_formatAlignment as formatAlignment,
6192
+ ACTION_FORMAT_formatAlignmentHorizontal as formatAlignmentHorizontal,
6193
+ ACTION_FORMAT_formatAlignmentLeft as formatAlignmentLeft,
6194
+ ACTION_FORMAT_formatAlignmentCenter as formatAlignmentCenter,
6195
+ ACTION_FORMAT_formatAlignmentRight as formatAlignmentRight,
6196
+ ACTION_FORMAT_formatAlignmentVertical as formatAlignmentVertical,
6197
+ ACTION_FORMAT_formatAlignmentTop as formatAlignmentTop,
6198
+ ACTION_FORMAT_formatAlignmentMiddle as formatAlignmentMiddle,
6199
+ ACTION_FORMAT_formatAlignmentBottom as formatAlignmentBottom,
6200
+ ACTION_FORMAT_formatWrapping as formatWrapping,
6201
+ ACTION_FORMAT_formatWrappingOverflow as formatWrappingOverflow,
6202
+ ACTION_FORMAT_formatWrappingWrap as formatWrappingWrap,
6203
+ ACTION_FORMAT_formatWrappingClip as formatWrappingClip,
6204
+ ACTION_FORMAT_textColor as textColor,
6205
+ ACTION_FORMAT_fillColor as fillColor,
6206
+ ACTION_FORMAT_formatCF as formatCF,
6207
+ ACTION_FORMAT_paintFormat as paintFormat,
6208
+ ACTION_FORMAT_clearFormat as clearFormat,
6209
+ ACTION_FORMAT_borders as borders,
6210
+ ACTION_FORMAT_bordersAll as bordersAll,
6211
+ ACTION_FORMAT_bordersInner as bordersInner,
6212
+ ACTION_FORMAT_bordersHorizontal as bordersHorizontal,
6213
+ ACTION_FORMAT_bordersVertical as bordersVertical,
6214
+ ACTION_FORMAT_bordersExternal as bordersExternal,
6215
+ ACTION_FORMAT_bordersLeft as bordersLeft,
6216
+ ACTION_FORMAT_bordersTop as bordersTop,
6217
+ ACTION_FORMAT_bordersRight as bordersRight,
6218
+ ACTION_FORMAT_bordersBottom as bordersBottom,
6219
+ ACTION_FORMAT_bordersClear as bordersClear,
6220
+ };
6221
+ }
6222
+
6223
+ declare const hideCols: ActionSpec;
6224
+ declare const unhideCols: ActionSpec;
6225
+ declare const unhideAllCols: ActionSpec;
6226
+ declare const hideRows: ActionSpec;
6227
+ declare const unhideRows: ActionSpec;
6228
+ declare const unhideAllRows: ActionSpec;
6229
+ declare const unFreezePane: ActionSpec;
6230
+ declare const freezePane: ActionSpec;
6231
+ declare const unFreezeRows: ActionSpec;
6232
+ declare const freezeFirstRow: ActionSpec;
6233
+ declare const freezeSecondRow: ActionSpec;
6234
+ declare const freezeCurrentRow: ActionSpec;
6235
+ declare const unFreezeCols: ActionSpec;
6236
+ declare const freezeFirstCol: ActionSpec;
6237
+ declare const freezeSecondCol: ActionSpec;
6238
+ declare const freezeCurrentCol: ActionSpec;
6239
+ declare const viewGridlines: ActionSpec;
6240
+ declare const viewFormulas: ActionSpec;
6241
+ declare const createRemoveFilter: ActionSpec;
6242
+
6243
+ declare const ACTION_VIEW_hideCols: typeof hideCols;
6244
+ declare const ACTION_VIEW_unhideCols: typeof unhideCols;
6245
+ declare const ACTION_VIEW_unhideAllCols: typeof unhideAllCols;
6246
+ declare const ACTION_VIEW_hideRows: typeof hideRows;
6247
+ declare const ACTION_VIEW_unhideRows: typeof unhideRows;
6248
+ declare const ACTION_VIEW_unhideAllRows: typeof unhideAllRows;
6249
+ declare const ACTION_VIEW_unFreezePane: typeof unFreezePane;
6250
+ declare const ACTION_VIEW_freezePane: typeof freezePane;
6251
+ declare const ACTION_VIEW_unFreezeRows: typeof unFreezeRows;
6252
+ declare const ACTION_VIEW_freezeFirstRow: typeof freezeFirstRow;
6253
+ declare const ACTION_VIEW_freezeSecondRow: typeof freezeSecondRow;
6254
+ declare const ACTION_VIEW_freezeCurrentRow: typeof freezeCurrentRow;
6255
+ declare const ACTION_VIEW_unFreezeCols: typeof unFreezeCols;
6256
+ declare const ACTION_VIEW_freezeFirstCol: typeof freezeFirstCol;
6257
+ declare const ACTION_VIEW_freezeSecondCol: typeof freezeSecondCol;
6258
+ declare const ACTION_VIEW_freezeCurrentCol: typeof freezeCurrentCol;
6259
+ declare const ACTION_VIEW_viewGridlines: typeof viewGridlines;
6260
+ declare const ACTION_VIEW_viewFormulas: typeof viewFormulas;
6261
+ declare const ACTION_VIEW_createRemoveFilter: typeof createRemoveFilter;
6262
+ declare namespace ACTION_VIEW {
6263
+ export {
6264
+ ACTION_VIEW_hideCols as hideCols,
6265
+ ACTION_VIEW_unhideCols as unhideCols,
6266
+ ACTION_VIEW_unhideAllCols as unhideAllCols,
6267
+ ACTION_VIEW_hideRows as hideRows,
6268
+ ACTION_VIEW_unhideRows as unhideRows,
6269
+ ACTION_VIEW_unhideAllRows as unhideAllRows,
6270
+ ACTION_VIEW_unFreezePane as unFreezePane,
6271
+ ACTION_VIEW_freezePane as freezePane,
6272
+ ACTION_VIEW_unFreezeRows as unFreezeRows,
6273
+ ACTION_VIEW_freezeFirstRow as freezeFirstRow,
6274
+ ACTION_VIEW_freezeSecondRow as freezeSecondRow,
6275
+ ACTION_VIEW_freezeCurrentRow as freezeCurrentRow,
6276
+ ACTION_VIEW_unFreezeCols as unFreezeCols,
6277
+ ACTION_VIEW_freezeFirstCol as freezeFirstCol,
6278
+ ACTION_VIEW_freezeSecondCol as freezeSecondCol,
6279
+ ACTION_VIEW_freezeCurrentCol as freezeCurrentCol,
6280
+ ACTION_VIEW_viewGridlines as viewGridlines,
6281
+ ACTION_VIEW_viewFormulas as viewFormulas,
6282
+ ACTION_VIEW_createRemoveFilter as createRemoveFilter,
6283
+ };
6284
+ }
6285
+
6286
+ interface Props$b {
6287
+ action: ActionSpec;
6288
+ hasTriangleDownIcon?: boolean;
6289
+ selectedColor?: string;
6290
+ class?: string;
6291
+ onClick?: (ev: MouseEvent) => void;
6292
+ }
6293
+ declare class ActionButton extends Component<Props$b, SpreadsheetChildEnv> {
6294
+ static template: string;
6295
+ private actionButton;
6296
+ setup(): void;
6297
+ get isVisible(): boolean;
6298
+ get isEnabled(): boolean;
6299
+ get isActive(): boolean | undefined;
6300
+ get title(): string;
6301
+ get iconTitle(): string;
6302
+ onClick(ev: MouseEvent): void;
6303
+ get buttonStyle(): string;
6304
+ }
6305
+
5950
6306
  interface Props$a {
5951
6307
  values: AutocompleteValue[];
5952
6308
  selectedIndex: number;
@@ -6012,7 +6368,7 @@ declare class FunctionDescriptionProvider extends Component<Props$9> {
6012
6368
 
6013
6369
  declare type HtmlContent = {
6014
6370
  value: string;
6015
- color?: string;
6371
+ color?: Color;
6016
6372
  class?: string;
6017
6373
  };
6018
6374
  interface AutocompleteValue {
@@ -6143,10 +6499,11 @@ declare class FontSizeEditor extends Component<Props$7, SpreadsheetChildEnv> {
6143
6499
  onInputKeydown(ev: KeyboardEvent): void;
6144
6500
  }
6145
6501
 
6146
- declare type Tool = "" | "formatTool" | "alignTool" | "textColorTool" | "fillColorTool" | "borderTool";
6147
6502
  interface State {
6148
6503
  menuState: MenuState;
6149
- activeTool: Tool;
6504
+ activeTool: string;
6505
+ fillColor: string;
6506
+ textColor: string;
6150
6507
  }
6151
6508
  interface Props$6 {
6152
6509
  onClick: () => void;
@@ -6156,73 +6513,37 @@ interface Props$6 {
6156
6513
  }
6157
6514
  declare class TopBar extends Component<Props$6, SpreadsheetChildEnv> {
6158
6515
  static template: string;
6516
+ get dropdownStyle(): string;
6159
6517
  static components: {
6160
6518
  ColorPickerWidget: typeof ColorPickerWidget;
6519
+ ColorPicker: typeof ColorPicker;
6161
6520
  Menu: typeof Menu;
6162
6521
  TopBarComposer: typeof TopBarComposer;
6163
6522
  FontSizeEditor: typeof FontSizeEditor;
6523
+ ActionButton: typeof ActionButton;
6164
6524
  };
6165
- commonFormats: ({
6166
- name: string;
6167
- text: string;
6168
- description?: undefined;
6169
- value?: undefined;
6170
- } | {
6171
- name: string;
6172
- text: string;
6173
- description: string;
6174
- value: string;
6175
- })[];
6176
- customFormats: {
6177
- name: string;
6178
- text: string;
6179
- sidePanel: string;
6180
- }[];
6181
- currentFormatName: string;
6182
- get dropdownStyle(): string;
6183
- style: Style;
6184
6525
  state: State;
6185
6526
  isSelectingMenu: boolean;
6186
6527
  openedEl: HTMLElement | null;
6187
- inMerge: boolean;
6188
- cannotMerge: boolean;
6189
- undoTool: boolean;
6190
- redoTool: boolean;
6191
- paintFormatTool: boolean;
6192
- fillColor: string;
6193
- textColor: string;
6194
- menus: MenuItem[];
6528
+ menus: Action[];
6529
+ EDIT: typeof ACTION_EDIT;
6530
+ FORMAT: typeof ACTION_FORMAT;
6531
+ VIEW: typeof ACTION_VIEW;
6532
+ formatNumberMenuItemSpec: ActionSpec;
6533
+ isntToolbarMenu: boolean;
6195
6534
  setup(): void;
6196
6535
  get topbarComponents(): TopbarComponent[];
6197
6536
  onExternalClick(ev: MouseEvent): void;
6198
6537
  onClick(): void;
6199
- toggleStyle(style: string): void;
6200
- toggleFormat(formatName: string): void;
6201
- toggleHorizontalAlign(align: Align): void;
6202
- toggleVerticalAlign(verticalAlign: VerticalAlign): void;
6203
- toggleTextWrapping(wrapping: Wrapping): void;
6204
- onMenuMouseOver(menu: MenuItem, ev: MouseEvent): void;
6205
- toggleDropdownTool(tool: Tool, ev: MouseEvent): void;
6206
- toggleContextMenu(menu: MenuItem, ev: MouseEvent): void;
6538
+ onMenuMouseOver(menu: Action, ev: MouseEvent): void;
6539
+ toggleDropdownTool(tool: string, ev: MouseEvent): void;
6540
+ toggleContextMenu(menu: Action, ev: MouseEvent): void;
6541
+ toggleToolbarContextMenu(menuSpec: ActionSpec, ev: MouseEvent): void;
6207
6542
  private openMenu;
6208
6543
  closeMenus(): void;
6209
6544
  updateCellState(): void;
6210
- getMenuName(menu: MenuItem): string;
6211
- toggleMerge(): void;
6212
- setColor(target: string, color: string): void;
6213
- setBorder(command: BorderCommand): void;
6214
- setFormat(format: Format, custom: boolean): void;
6215
- openCustomFormatSidePanel(custom: string): void;
6216
- setDecimal(step: SetDecimalStep): void;
6217
- paintFormat(): void;
6218
- clearFormatting(): void;
6219
- doAction(action: (env: SpreadsheetChildEnv) => void): void;
6220
- undo(): void;
6221
- redo(): void;
6222
- get selectionContainsFilter(): boolean;
6223
- get cannotCreateFilter(): boolean;
6224
- createFilter(): void;
6225
- removeFilter(): void;
6545
+ getMenuName(menu: Action): string;
6546
+ setColor(target: string, color: Color): void;
6226
6547
  }
6227
6548
 
6228
6549
  declare type ComposerFocusType = "inactive" | "cellFocus" | "contentFocus";
@@ -6432,7 +6753,7 @@ declare class Border extends Component<Props$4, SpreadsheetChildEnv> {
6432
6753
  declare type Orientation = "nw" | "ne" | "sw" | "se";
6433
6754
  interface Props$3 {
6434
6755
  zone: Zone;
6435
- color: string;
6756
+ color: Color;
6436
6757
  orientation: Orientation;
6437
6758
  isResizing: boolean;
6438
6759
  onResizeHighlight: (isLeft: boolean, isRight: boolean) => void;
@@ -6447,7 +6768,7 @@ declare class Corner extends Component<Props$3, SpreadsheetChildEnv> {
6447
6768
 
6448
6769
  interface Props$2 {
6449
6770
  zone: Zone;
6450
- color: string;
6771
+ color: Color;
6451
6772
  }
6452
6773
  interface HighlightState {
6453
6774
  shiftingMode: "isMoving" | "isResizing" | "none";
@@ -6597,8 +6918,6 @@ declare function createEmptySheet(sheetId: UID, name: string): SheetData;
6597
6918
  declare function createEmptyWorkbookData(sheetName?: string): WorkbookData;
6598
6919
  declare function createEmptyExcelSheet(sheetId: UID, name: string): ExcelSheetData;
6599
6920
 
6600
- declare const DATETIME_FORMAT: RegExp;
6601
-
6602
6921
  /**
6603
6922
  * We export here all entities that needs to be accessed publicly by Odoo.
6604
6923
  *
@@ -6669,6 +6988,7 @@ declare const registries: {
6669
6988
  inverseCommandRegistry: Registry<(cmd: CoreCommand) => CoreCommand[]>;
6670
6989
  urlRegistry: Registry<LinkSpec>;
6671
6990
  cellPopoverRegistry: Registry<PopoverBuilders>;
6991
+ numberFormatMenuRegistry: MenuItemRegistry;
6672
6992
  };
6673
6993
  declare const helpers: {
6674
6994
  arg: typeof arg;
@@ -6724,4 +7044,4 @@ declare const components: {
6724
7044
  };
6725
7045
  declare function addFunction(functionName: string, functionDescription: FunctionDescription): void;
6726
7046
 
6727
- export { AbstractChart, CancelledReason, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, TransportService, UIPlugin, __info__, addFunction, astToFormula, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
7047
+ export { AbstractChart, CancelledReason, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, TransportService, UIPlugin, __info__, addFunction, astToFormula, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };