@odoo/o-spreadsheet 16.5.0-alpha.1 → 16.5.0-alpha.11

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.
@@ -1,6 +1,6 @@
1
1
  import * as _odoo_owl from '@odoo/owl';
2
2
  import { ComponentConstructor, Component } from '@odoo/owl';
3
- import { ChartConfiguration, ChartData, ChartDataSets, ChartOptions } from 'chart.js';
3
+ import { ChartConfiguration, ChartData, ChartDataset, ChartOptions } from 'chart.js';
4
4
 
5
5
  declare enum CellErrorLevel {
6
6
  silent = 0,
@@ -10,6 +10,7 @@ declare class EvaluationError extends Error {
10
10
  readonly errorType: string;
11
11
  readonly logLevel: number;
12
12
  constructor(errorType: string, message: string, logLevel?: number);
13
+ get isVerbose(): boolean;
13
14
  }
14
15
 
15
16
  declare const functionCache: {
@@ -374,7 +375,7 @@ interface SectionThreshold {
374
375
  }
375
376
  interface GaugeChartConfiguration extends Omit<ChartConfiguration, "data" | "options"> {
376
377
  data?: GaugeChartData;
377
- options?: GaugeChartOptions;
378
+ options: GaugeChartOptions;
378
379
  }
379
380
  interface GaugeChartRuntime {
380
381
  chartJsConfig: GaugeChartConfiguration;
@@ -383,32 +384,40 @@ interface GaugeChartRuntime {
383
384
  interface GaugeChartData extends Omit<ChartData, "datasets"> {
384
385
  datasets: GaugeChartDataSets[];
385
386
  }
386
- interface GaugeChartDataSets extends ChartDataSets {
387
+ interface GaugeChartDataSets extends ChartDataset<"doughnut"> {
387
388
  readonly minValue?: number;
388
389
  readonly value?: number | undefined;
389
390
  readonly backgroundColor?: string[];
390
391
  }
391
392
  interface GaugeChartOptions extends ChartOptions {
392
- needle?: {
393
- radiusPercentage: number;
394
- widthPercentage: number;
395
- lengthPercentage: number;
396
- color: Color;
393
+ needle?: NeedleOptions;
394
+ valueLabel?: ValueLabelOptions;
395
+ }
396
+ interface NeedleOptions {
397
+ display?: boolean;
398
+ borderColor?: Color;
399
+ backgroundColor?: Color;
400
+ /**
401
+ * Needle width as the percentage of the chart area width
402
+ */
403
+ width?: number;
404
+ }
405
+ interface ValueLabelOptions {
406
+ display?: boolean;
407
+ formatter?: (value: any) => string;
408
+ font?: {
409
+ size?: number;
410
+ family?: string;
411
+ color?: Color;
397
412
  };
398
- valueLabel?: {
399
- formatter: (() => string) | null;
400
- display: boolean;
401
- color: Color;
402
- backgroundColor: Color;
403
- borderRadius: number;
404
- fontSize: number;
405
- padding: {
406
- top: number;
407
- right: number;
408
- bottom: number;
409
- left: number;
410
- };
411
- bottomMarginPercentage: number;
413
+ backgroundColor?: Color;
414
+ borderColor?: Color;
415
+ borderRadius?: number;
416
+ padding?: {
417
+ left: number;
418
+ right: number;
419
+ top: number;
420
+ bottom: number;
412
421
  };
413
422
  }
414
423
 
@@ -424,6 +433,7 @@ interface LineChartDefinition {
424
433
  readonly labelsAsText: boolean;
425
434
  readonly stacked: boolean;
426
435
  readonly aggregated?: boolean;
436
+ readonly cumulative: boolean;
427
437
  }
428
438
  type LineChartRuntime = {
429
439
  chartJsConfig: ChartConfiguration;
@@ -490,6 +500,7 @@ interface ExcelChartDefinition {
490
500
  readonly verticalAxisPosition: VerticalAxisPosition;
491
501
  readonly legendPosition: LegendPosition;
492
502
  readonly stacked?: boolean;
503
+ readonly cumulative?: boolean;
493
504
  }
494
505
  interface ChartCreationContext {
495
506
  readonly range?: string[];
@@ -575,7 +586,6 @@ interface IconSetRule {
575
586
  lowerInflectionPoint: IconThreshold;
576
587
  }
577
588
  type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";
578
- type UpDown = "up" | "down";
579
589
 
580
590
  interface CellData {
581
591
  content?: string;
@@ -613,10 +623,12 @@ interface SheetData {
613
623
  [key: number]: HeaderData;
614
624
  };
615
625
  conditionalFormats: ConditionalFormat[];
626
+ dataValidationRules?: DataValidationRuleData[];
616
627
  filterTables: FilterTableData[];
617
628
  areGridLinesVisible?: boolean;
618
629
  isVisible: boolean;
619
630
  panes?: PaneDivision;
631
+ headerGroups?: Record<Dimension, HeaderGroup[]>;
620
632
  }
621
633
  interface WorkbookSettings {
622
634
  locale: Locale;
@@ -661,6 +673,9 @@ interface ExcelSheetData extends Omit<SheetData, "figureTables"> {
661
673
  interface FilterTableData {
662
674
  range: string;
663
675
  }
676
+ interface DataValidationRuleData extends Omit<DataValidationRule, "ranges"> {
677
+ ranges: string[];
678
+ }
664
679
  interface ExcelFilterTableData {
665
680
  range: string;
666
681
  filters: ExcelFilterData[];
@@ -892,6 +907,15 @@ declare function colorToRGBA(color: Color): RGBA;
892
907
  * 27 => 'AB'
893
908
  */
894
909
  declare function numberToLetters(n: number): string;
910
+ /**
911
+ * Convert a string (describing a column) to its number value.
912
+ *
913
+ * Examples:
914
+ * 'A' => 0
915
+ * 'Z' => 25
916
+ * 'AA' => 26
917
+ */
918
+ declare function lettersToNumber(letters: string): number;
895
919
  /**
896
920
  * Convert a "XC" coordinate to cartesian coordinates.
897
921
  *
@@ -960,7 +984,7 @@ declare class RangeImpl implements Range {
960
984
  constructor(args: ConstructorArgs, getSheetSize: (sheetId: UID) => ZoneDimension);
961
985
  static fromRange(range: Range, getters: CoreGetters): RangeImpl;
962
986
  get unboundedZone(): UnboundedZone;
963
- get zone(): Zone;
987
+ get zone(): Readonly<Zone>;
964
988
  static getRangeParts(xc: string, zone: UnboundedZone): RangePart[];
965
989
  get isFullCol(): boolean;
966
990
  get isFullRow(): boolean;
@@ -987,6 +1011,21 @@ declare class UuidGenerator {
987
1011
  uuidv4(): string;
988
1012
  }
989
1013
 
1014
+ /**
1015
+ * Convert from a cartesian reference to a (possibly unbounded) Zone
1016
+ *
1017
+ * Examples:
1018
+ * "A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
1019
+ * "B1:B3" ==> Top 0, Bottom 3, Left: 1, Right: 1
1020
+ * "B:B" ==> Top 0, Bottom undefined, Left: 1, Right: 1
1021
+ * "B2:B" ==> Top 1, Bottom undefined, Left: 1, Right: 1, hasHeader: 1
1022
+ * "Sheet1!A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
1023
+ * "Sheet1!B1:B3" ==> Top 0, Bottom 3, Left: 1, Right: 1
1024
+ *
1025
+ * @param xc the string reference to convert
1026
+ *
1027
+ */
1028
+ declare function toUnboundedZone(xc: string): UnboundedZone;
990
1029
  /**
991
1030
  * Convert from a cartesian reference to a Zone.
992
1031
  * Will return throw an error if given a unbounded zone (eg : A:A).
@@ -1046,15 +1085,16 @@ type StatefulStream<Event, State> = {
1046
1085
  interface SelectionProcessor {
1047
1086
  selectZone(anchor: AnchorZone, options?: SelectionEventOptions): DispatchResult;
1048
1087
  selectCell(col: number, row: number): DispatchResult;
1049
- moveAnchorCell(direction: SelectionDirection, step: SelectionStep): DispatchResult;
1088
+ moveAnchorCell(direction: Direction$1, step: SelectionStep): DispatchResult;
1050
1089
  setAnchorCorner(col: number, row: number): DispatchResult;
1051
1090
  addCellToSelection(col: number, row: number): DispatchResult;
1052
- resizeAnchorZone(direction: SelectionDirection, step: SelectionStep): DispatchResult;
1091
+ resizeAnchorZone(direction: Direction$1, step: SelectionStep): DispatchResult;
1053
1092
  selectColumn(index: number, mode: SelectionEvent["mode"]): DispatchResult;
1054
1093
  selectRow(index: number, mode: SelectionEvent["mode"]): DispatchResult;
1055
1094
  selectAll(): DispatchResult;
1056
1095
  loopSelection(): DispatchResult;
1057
1096
  selectTableAroundSelection(): DispatchResult;
1097
+ isListening(owner: unknown): boolean;
1058
1098
  }
1059
1099
  type SelectionStreamProcessor = SelectionProcessor & StatefulStream<SelectionEvent, AnchorZone>;
1060
1100
 
@@ -1083,11 +1123,6 @@ interface ImageProviderInterface {
1083
1123
  getImageOriginalSize(path: string): Promise<FigureSize>;
1084
1124
  }
1085
1125
 
1086
- interface NotifyUIEvent {
1087
- type: "ERROR";
1088
- text: string;
1089
- }
1090
-
1091
1126
  /**
1092
1127
  * Model
1093
1128
  *
@@ -1133,7 +1168,8 @@ interface ModelConfig {
1133
1168
  readonly transportService: TransportService;
1134
1169
  readonly client: Client;
1135
1170
  readonly snapshotRequested: boolean;
1136
- readonly notifyUI: (payload: NotifyUIEvent) => void;
1171
+ readonly notifyUI: (payload: InformationNotification) => void;
1172
+ readonly raiseBlockingErrorUI: (text: string) => void;
1137
1173
  }
1138
1174
  interface ModelExternalConfig {
1139
1175
  readonly fileStore?: FileStore;
@@ -1363,7 +1399,7 @@ declare class BasePlugin<State = any, C = any> implements CommandHandler<C>, Val
1363
1399
  checkValidations<T>(command: T, ...validations: Validation<T>[]): CommandResult | CommandResult[];
1364
1400
  }
1365
1401
 
1366
- type UIActions = Pick<ModelConfig, "notifyUI">;
1402
+ type UIActions = Pick<ModelConfig, "notifyUI" | "raiseBlockingErrorUI">;
1367
1403
  interface UIPluginConfig {
1368
1404
  readonly getters: Getters;
1369
1405
  readonly stateObserver: StateObserver;
@@ -1383,7 +1419,7 @@ interface UIPluginConstructor {
1383
1419
  * UI plugins handle any transient data required to display a spreadsheet.
1384
1420
  * They can draw on the grid canvas.
1385
1421
  */
1386
- declare class UIPlugin<State = any, C = Command> extends BasePlugin<State, C> {
1422
+ declare class UIPlugin<State = any> extends BasePlugin<State, Command> {
1387
1423
  static layers: LAYERS[];
1388
1424
  protected getters: Getters;
1389
1425
  protected ui: UIActions;
@@ -1453,6 +1489,7 @@ declare class FindAndReplacePlugin extends UIPlugin {
1453
1489
  */
1454
1490
  private selectNextCell;
1455
1491
  private clearSearch;
1492
+ private replaceMatch;
1456
1493
  /**
1457
1494
  * Replace the value of the currently selected match
1458
1495
  */
@@ -1471,7 +1508,7 @@ interface ComposerSelection {
1471
1508
  end: number;
1472
1509
  }
1473
1510
  declare class EditionPlugin extends UIPlugin {
1474
- static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell"];
1511
+ static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell", "getCycledReference", "getAutoCompleteDataValidationValues"];
1475
1512
  private col;
1476
1513
  private row;
1477
1514
  private mode;
@@ -1480,10 +1517,7 @@ declare class EditionPlugin extends UIPlugin {
1480
1517
  private currentTokens;
1481
1518
  private selectionStart;
1482
1519
  private selectionEnd;
1483
- private selectionInitialStart;
1484
1520
  private initialContent;
1485
- private previousRef;
1486
- private previousRange;
1487
1521
  private colorIndexByRange;
1488
1522
  allowDispatch(cmd: LocalCommand): CommandResult;
1489
1523
  private handleEvent;
@@ -1499,6 +1533,20 @@ declare class EditionPlugin extends UIPlugin {
1499
1533
  * Return the (enriched) token just before the cursor.
1500
1534
  */
1501
1535
  getTokenAtCursor(): EnrichedToken | undefined;
1536
+ /**
1537
+ * Return the cycled reference if any (A1 -> $A$1 -> A$1 -> $A1 -> A1)
1538
+ */
1539
+ getCycledReference(selection: {
1540
+ start: number;
1541
+ end: number;
1542
+ }, content: string): {
1543
+ content: string;
1544
+ selection: {
1545
+ start: number;
1546
+ end: number;
1547
+ };
1548
+ } | undefined;
1549
+ getInitialComposerContent(): string | undefined;
1502
1550
  private cycleReferences;
1503
1551
  private validateSelection;
1504
1552
  private onColumnsRemoved;
@@ -1516,6 +1564,7 @@ declare class EditionPlugin extends UIPlugin {
1516
1564
  */
1517
1565
  private startEdition;
1518
1566
  private stopEdition;
1567
+ private getCurrentCanonicalContent;
1519
1568
  private cancelEditionAndActivateSheet;
1520
1569
  private getComposerContent;
1521
1570
  private numberComposerContent;
@@ -1529,7 +1578,11 @@ declare class EditionPlugin extends UIPlugin {
1529
1578
  /**
1530
1579
  * Replace the current reference selected by the new one.
1531
1580
  * */
1532
- private replaceSelectedRanges;
1581
+ private replaceSelectedRange;
1582
+ /**
1583
+ * Replace the reference of the old zone by the new one.
1584
+ */
1585
+ private updateComposerRange;
1533
1586
  private getZoneReference;
1534
1587
  private getRangeReference;
1535
1588
  /**
@@ -1552,6 +1605,7 @@ declare class EditionPlugin extends UIPlugin {
1552
1605
  * Return ranges currently referenced in the composer
1553
1606
  */
1554
1607
  getReferencedRanges(): Range[];
1608
+ getAutoCompleteDataValidationValues(): string[];
1555
1609
  /**
1556
1610
  * Function used to determine when composer selection can start.
1557
1611
  * Three conditions are necessary:
@@ -1560,11 +1614,7 @@ declare class EditionPlugin extends UIPlugin {
1560
1614
  * - Previous and next tokens can be separated by spaces
1561
1615
  */
1562
1616
  private canStartComposerRangeSelection;
1563
- /**
1564
- * Return all the tokens between selectionStart and selectionEnd.
1565
- * Includes token that begin right on selectionStart or end right on selectionEnd.
1566
- */
1567
- private getTokensInSelection;
1617
+ private checkDataValidation;
1568
1618
  }
1569
1619
 
1570
1620
  /**
@@ -1663,9 +1713,10 @@ type ClipboardPasteOptions = "onlyFormat" | "onlyValue";
1663
1713
  interface SheetDependentCommand {
1664
1714
  sheetId: UID;
1665
1715
  }
1666
- interface GridDependentCommand {
1716
+ interface HeadersDependentCommand {
1667
1717
  sheetId: UID;
1668
1718
  dimension: Dimension;
1719
+ elements: HeaderIndex[];
1669
1720
  }
1670
1721
  interface TargetDependentCommand {
1671
1722
  sheetId: UID;
@@ -1679,11 +1730,15 @@ interface PositionDependentCommand {
1679
1730
  col: number;
1680
1731
  row: number;
1681
1732
  }
1682
- declare const invalidateEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
1683
- declare const invalidateDependenciesCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "SORT_CELLS" | "SET_DECIMAL" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "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" | "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">;
1684
- declare const invalidateCFEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
1685
- declare const readonlyAllowedCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE" | "SORT_CELLS" | "SET_DECIMAL" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "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" | "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">;
1686
- declare const coreTypes: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "UPDATE_LOCALE">;
1733
+ interface ZoneDependentCommand {
1734
+ sheetId: UID;
1735
+ zone: Zone;
1736
+ }
1737
+ 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" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "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" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
1738
+ declare const invalidateDependenciesCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "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" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "CANCEL_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE">;
1739
+ declare const invalidateCFEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "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" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
1740
+ 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" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "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" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "CANCEL_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE">;
1741
+ 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" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "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" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE">;
1687
1742
  interface UpdateCellCommand extends PositionDependentCommand {
1688
1743
  type: "UPDATE_CELL";
1689
1744
  content?: string;
@@ -1697,31 +1752,32 @@ interface UpdateCellPositionCommand extends PositionDependentCommand {
1697
1752
  type: "UPDATE_CELL_POSITION";
1698
1753
  cellId?: UID;
1699
1754
  }
1700
- interface AddColumnsRowsCommand extends GridDependentCommand {
1755
+ interface AddColumnsRowsCommand extends SheetDependentCommand {
1701
1756
  type: "ADD_COLUMNS_ROWS";
1757
+ dimension: Dimension;
1702
1758
  base: HeaderIndex;
1703
1759
  quantity: number;
1704
1760
  position: "before" | "after";
1705
1761
  }
1706
- interface RemoveColumnsRowsCommand extends GridDependentCommand {
1762
+ interface RemoveColumnsRowsCommand extends HeadersDependentCommand {
1707
1763
  type: "REMOVE_COLUMNS_ROWS";
1708
1764
  elements: HeaderIndex[];
1709
1765
  }
1710
- interface MoveColumnsRowsCommand extends GridDependentCommand {
1766
+ interface MoveColumnsRowsCommand extends HeadersDependentCommand {
1711
1767
  type: "MOVE_COLUMNS_ROWS";
1712
1768
  base: HeaderIndex;
1713
1769
  elements: HeaderIndex[];
1714
1770
  }
1715
- interface ResizeColumnsRowsCommand extends GridDependentCommand {
1771
+ interface ResizeColumnsRowsCommand extends HeadersDependentCommand {
1716
1772
  type: "RESIZE_COLUMNS_ROWS";
1717
1773
  elements: number[];
1718
1774
  size: number | null;
1719
1775
  }
1720
- interface HideColumnsRowsCommand extends GridDependentCommand {
1776
+ interface HideColumnsRowsCommand extends HeadersDependentCommand {
1721
1777
  type: "HIDE_COLUMNS_ROWS";
1722
1778
  elements: HeaderIndex[];
1723
1779
  }
1724
- interface UnhideColumnsRowsCommand extends GridDependentCommand {
1780
+ interface UnhideColumnsRowsCommand extends HeadersDependentCommand {
1725
1781
  type: "UNHIDE_COLUMNS_ROWS";
1726
1782
  elements: HeaderIndex[];
1727
1783
  }
@@ -1814,9 +1870,9 @@ interface RemoveConditionalFormatCommand extends SheetDependentCommand {
1814
1870
  id: string;
1815
1871
  }
1816
1872
  interface MoveConditionalFormatCommand extends SheetDependentCommand {
1817
- type: "MOVE_CONDITIONAL_FORMAT";
1873
+ type: "CHANGE_CONDITIONAL_FORMAT_PRIORITY";
1818
1874
  cfId: UID;
1819
- direction: UpDown;
1875
+ delta: number;
1820
1876
  }
1821
1877
  interface CreateFigureCommand extends SheetDependentCommand {
1822
1878
  type: "CREATE_FIGURE";
@@ -1863,7 +1919,7 @@ interface RemoveFilterTableCommand extends TargetDependentCommand {
1863
1919
  }
1864
1920
  interface UpdateFilterCommand extends PositionDependentCommand {
1865
1921
  type: "UPDATE_FILTER";
1866
- values: string[];
1922
+ hiddenValues: string[];
1867
1923
  }
1868
1924
  interface SetFormattingCommand extends TargetDependentCommand {
1869
1925
  type: "SET_FORMATTING";
@@ -1889,13 +1945,67 @@ interface UpdateLocaleCommand {
1889
1945
  type: "UPDATE_LOCALE";
1890
1946
  locale: Locale;
1891
1947
  }
1948
+ interface RemoveDuplicatesCommand {
1949
+ type: "REMOVE_DUPLICATES";
1950
+ columns: HeaderIndex[];
1951
+ hasHeader: boolean;
1952
+ }
1953
+ interface TrimWhitespaceCommand {
1954
+ type: "TRIM_WHITESPACE";
1955
+ }
1956
+ interface GroupHeadersCommand extends SheetDependentCommand {
1957
+ type: "GROUP_HEADERS";
1958
+ dimension: Dimension;
1959
+ start: HeaderIndex;
1960
+ end: HeaderIndex;
1961
+ }
1962
+ interface UnGroupHeadersCommand extends SheetDependentCommand {
1963
+ type: "UNGROUP_HEADERS";
1964
+ dimension: Dimension;
1965
+ start: HeaderIndex;
1966
+ end: HeaderIndex;
1967
+ }
1968
+ interface FoldHeaderGroupCommand extends SheetDependentCommand {
1969
+ type: "FOLD_HEADER_GROUP";
1970
+ dimension: Dimension;
1971
+ start: HeaderIndex;
1972
+ end: HeaderIndex;
1973
+ }
1974
+ interface UnfoldHeaderGroupCommand extends SheetDependentCommand {
1975
+ type: "UNFOLD_HEADER_GROUP";
1976
+ dimension: Dimension;
1977
+ start: HeaderIndex;
1978
+ end: HeaderIndex;
1979
+ }
1980
+ interface FoldAllHeaderGroupsCommand extends SheetDependentCommand {
1981
+ type: "FOLD_ALL_HEADER_GROUPS";
1982
+ dimension: Dimension;
1983
+ }
1984
+ interface UnfoldAllHeaderGroupsCommand extends SheetDependentCommand {
1985
+ type: "UNFOLD_ALL_HEADER_GROUPS";
1986
+ dimension: Dimension;
1987
+ }
1988
+ interface UnfoldHeaderGroupsInZoneCommand extends ZoneDependentCommand {
1989
+ type: "UNFOLD_HEADER_GROUPS_IN_ZONE";
1990
+ dimension: Dimension;
1991
+ }
1992
+ interface FoldHeaderGroupsInZoneCommand extends ZoneDependentCommand {
1993
+ type: "FOLD_HEADER_GROUPS_IN_ZONE";
1994
+ dimension: Dimension;
1995
+ }
1996
+ interface AddDataValidationCommand extends SheetDependentCommand, RangesDependentCommand {
1997
+ type: "ADD_DATA_VALIDATION_RULE";
1998
+ rule: Omit<DataValidationRule, "ranges">;
1999
+ }
2000
+ interface RemoveDataValidationCommand extends SheetDependentCommand {
2001
+ type: "REMOVE_DATA_VALIDATION_RULE";
2002
+ id: string;
2003
+ }
1892
2004
  interface CopyCommand {
1893
2005
  type: "COPY";
1894
2006
  }
1895
2007
  interface CutCommand {
1896
2008
  type: "CUT";
1897
- /** Zones to cut. If none were given, will copy the zones in the selection*/
1898
- cutTarget?: Zone[];
1899
2009
  }
1900
2010
  interface PasteCommand {
1901
2011
  type: "PASTE";
@@ -1949,22 +2059,6 @@ interface ActivateSheetCommand {
1949
2059
  sheetIdFrom: UID;
1950
2060
  sheetIdTo: UID;
1951
2061
  }
1952
- /**
1953
- * Set the selection mode to `readyToExpand`.
1954
- * The user is ready to expand the selected zones with a new
1955
- * selection (i.e. add an other zone the to currently selected zones).
1956
- * In other words, the next selection will be added to the
1957
- * current selection if this mode is active.
1958
- */
1959
- interface PrepareExpansionCommand {
1960
- type: "PREPARE_SELECTION_INPUT_EXPANSION";
1961
- }
1962
- /**
1963
- * Set the selection mode to `idle`.
1964
- */
1965
- interface StopSelectionCommand {
1966
- type: "STOP_SELECTION_INPUT";
1967
- }
1968
2062
  /**
1969
2063
  * Set a color to be used for the next selection to highlight.
1970
2064
  * The color is only used when selection highlight is enabled.
@@ -1978,11 +2072,7 @@ interface EvaluateCellsCommand {
1978
2072
  }
1979
2073
  interface StartChangeHighlightCommand {
1980
2074
  type: "START_CHANGE_HIGHLIGHT";
1981
- range: RangeData;
1982
- }
1983
- interface ChangeHighlightCommand {
1984
- type: "CHANGE_HIGHLIGHT";
1985
- range: RangeData;
2075
+ zone: Zone;
1986
2076
  }
1987
2077
  interface StopComposerSelectionCommand {
1988
2078
  type: "STOP_COMPOSER_RANGE_SELECTION";
@@ -1994,7 +2084,9 @@ interface StartEditionCommand {
1994
2084
  }
1995
2085
  interface StopEditionCommand {
1996
2086
  type: "STOP_EDITION";
1997
- cancel?: boolean;
2087
+ }
2088
+ interface CancelEditionCommand {
2089
+ type: "CANCEL_EDITION";
1998
2090
  }
1999
2091
  interface SetCurrentContentCommand {
2000
2092
  type: "SET_CURRENT_CONTENT";
@@ -2257,11 +2349,17 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
2257
2349
  | SetFormattingCommand | ClearFormattingCommand | SetZoneBordersCommand | SetBorderCommand
2258
2350
  /** CHART */
2259
2351
  | CreateChartCommand | UpdateChartCommand
2260
- /** Image */
2352
+ /** IMAGE */
2261
2353
  | CreateImageOverCommand
2262
2354
  /** FILTERS */
2263
- | CreateFilterTableCommand | RemoveFilterTableCommand | UpdateLocaleCommand;
2264
- type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | AddRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | CancelPaintFormatCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | PrepareExpansionCommand | StopSelectionCommand | EvaluateCellsCommand | ChangeHighlightCommand | StartChangeHighlightCommand | SetColorCommand | StopComposerSelectionCommand | StartEditionCommand | StopEditionCommand | SetCurrentContentCommand | ChangeComposerSelectionCommand | ReplaceComposerSelectionCommand | CycleEditionReferencesCommand | StartCommand | AutofillCommand | AutofillSelectCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | UpdateSearchCommand | ClearSearchCommand | SelectSearchPreviousCommand | SelectSearchNextCommand | ReplaceSearchCommand | ReplaceAllSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | OpenCellPopoverCommand | CloseCellPopoverCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand;
2355
+ | CreateFilterTableCommand | RemoveFilterTableCommand
2356
+ /** HEADER GROUP */
2357
+ | GroupHeadersCommand | UnGroupHeadersCommand | UnfoldHeaderGroupCommand | FoldHeaderGroupCommand | FoldAllHeaderGroupsCommand | UnfoldAllHeaderGroupsCommand | UnfoldHeaderGroupsInZoneCommand | FoldHeaderGroupsInZoneCommand
2358
+ /** DATA VALIDATION */
2359
+ | AddDataValidationCommand | RemoveDataValidationCommand
2360
+ /** MISC */
2361
+ | UpdateLocaleCommand;
2362
+ type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | AddRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | CancelPaintFormatCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | StartChangeHighlightCommand | SetColorCommand | StopComposerSelectionCommand | StartEditionCommand | StopEditionCommand | CancelEditionCommand | SetCurrentContentCommand | ChangeComposerSelectionCommand | ReplaceComposerSelectionCommand | CycleEditionReferencesCommand | StartCommand | AutofillCommand | AutofillSelectCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | UpdateSearchCommand | ClearSearchCommand | SelectSearchPreviousCommand | SelectSearchNextCommand | ReplaceSearchCommand | ReplaceAllSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | OpenCellPopoverCommand | CloseCellPopoverCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand;
2265
2363
  type Command = CoreCommand | LocalCommand;
2266
2364
  /**
2267
2365
  * Holds the result of a command dispatch.
@@ -2284,102 +2382,114 @@ declare class DispatchResult {
2284
2382
  }
2285
2383
  type CancelledReason = Exclude<CommandResult, CommandResult.Success>;
2286
2384
  declare const enum CommandResult {
2287
- Success = 0,
2288
- CancelledForUnknownReason = 1,
2289
- WillRemoveExistingMerge = 2,
2290
- MergeIsDestructive = 3,
2291
- CellIsMerged = 4,
2292
- InvalidTarget = 5,
2293
- EmptyUndoStack = 6,
2294
- EmptyRedoStack = 7,
2295
- NotEnoughElements = 8,
2296
- NotEnoughSheets = 9,
2297
- MissingSheetName = 10,
2298
- UnchangedSheetName = 11,
2299
- DuplicatedSheetName = 12,
2300
- DuplicatedSheetId = 13,
2301
- ForbiddenCharactersInSheetName = 14,
2302
- WrongSheetMove = 15,
2303
- WrongSheetPosition = 16,
2304
- InvalidAnchorZone = 17,
2305
- SelectionOutOfBound = 18,
2306
- TargetOutOfSheet = 19,
2307
- WrongCutSelection = 20,
2308
- WrongPasteSelection = 21,
2309
- WrongPasteOption = 22,
2310
- WrongFigurePasteOption = 23,
2311
- EmptyClipboard = 24,
2312
- EmptyRange = 25,
2313
- InvalidRange = 26,
2314
- InvalidZones = 27,
2315
- InvalidSheetId = 28,
2316
- InvalidFigureId = 29,
2317
- InputAlreadyFocused = 30,
2318
- MaximumRangesReached = 31,
2319
- InvalidChartDefinition = 32,
2320
- InvalidDataSet = 33,
2321
- InvalidLabelRange = 34,
2322
- InvalidScorecardKeyValue = 35,
2323
- InvalidScorecardBaseline = 36,
2324
- InvalidGaugeDataRange = 37,
2325
- EmptyGaugeRangeMin = 38,
2326
- GaugeRangeMinNaN = 39,
2327
- EmptyGaugeRangeMax = 40,
2328
- GaugeRangeMaxNaN = 41,
2329
- GaugeRangeMinBiggerThanRangeMax = 42,
2330
- GaugeLowerInflectionPointNaN = 43,
2331
- GaugeUpperInflectionPointNaN = 44,
2332
- GaugeLowerBiggerThanUpper = 45,
2333
- InvalidAutofillSelection = 46,
2334
- WrongComposerSelection = 47,
2335
- MinBiggerThanMax = 48,
2336
- LowerBiggerThanUpper = 49,
2337
- MidBiggerThanMax = 50,
2338
- MinBiggerThanMid = 51,
2339
- FirstArgMissing = 52,
2340
- SecondArgMissing = 53,
2341
- MinNaN = 54,
2342
- MidNaN = 55,
2343
- MaxNaN = 56,
2344
- ValueUpperInflectionNaN = 57,
2345
- ValueLowerInflectionNaN = 58,
2346
- MinInvalidFormula = 59,
2347
- MidInvalidFormula = 60,
2348
- MaxInvalidFormula = 61,
2349
- ValueUpperInvalidFormula = 62,
2350
- ValueLowerInvalidFormula = 63,
2351
- InvalidSortZone = 64,
2352
- WaitingSessionConfirmation = 65,
2353
- MergeOverlap = 66,
2354
- TooManyHiddenElements = 67,
2355
- Readonly = 68,
2356
- InvalidViewportSize = 69,
2357
- InvalidScrollingDirection = 70,
2358
- FigureDoesNotExist = 71,
2359
- InvalidConditionalFormatId = 72,
2360
- InvalidCellPopover = 73,
2361
- EmptyTarget = 74,
2362
- InvalidFreezeQuantity = 75,
2363
- FrozenPaneOverlap = 76,
2364
- ValuesNotChanged = 77,
2365
- InvalidFilterZone = 78,
2366
- FilterOverlap = 79,
2367
- FilterNotFound = 80,
2368
- MergeInFilter = 81,
2369
- NonContinuousTargets = 82,
2370
- DuplicatedFigureId = 83,
2371
- InvalidSelectionStep = 84,
2372
- DuplicatedChartId = 85,
2373
- ChartDoesNotExist = 86,
2374
- InvalidHeaderIndex = 87,
2375
- InvalidQuantity = 88,
2376
- MoreThanOneColumnSelected = 89,
2377
- EmptySplitSeparator = 90,
2378
- SplitWillOverwriteContent = 91,
2379
- NoSplitSeparatorInSelection = 92,
2380
- NoActiveSheet = 93,
2381
- InvalidLocale = 94,
2382
- AlreadyInPaintingFormatMode = 95
2385
+ Success = "Success",
2386
+ CancelledForUnknownReason = "CancelledForUnknownReason",
2387
+ WillRemoveExistingMerge = "WillRemoveExistingMerge",
2388
+ MergeIsDestructive = "MergeIsDestructive",
2389
+ CellIsMerged = "CellIsMerged",
2390
+ InvalidTarget = "InvalidTarget",
2391
+ EmptyUndoStack = "EmptyUndoStack",
2392
+ EmptyRedoStack = "EmptyRedoStack",
2393
+ NotEnoughElements = "NotEnoughElements",
2394
+ NotEnoughSheets = "NotEnoughSheets",
2395
+ MissingSheetName = "MissingSheetName",
2396
+ UnchangedSheetName = "UnchangedSheetName",
2397
+ DuplicatedSheetName = "DuplicatedSheetName",
2398
+ DuplicatedSheetId = "DuplicatedSheetId",
2399
+ ForbiddenCharactersInSheetName = "ForbiddenCharactersInSheetName",
2400
+ WrongSheetMove = "WrongSheetMove",
2401
+ WrongSheetPosition = "WrongSheetPosition",
2402
+ InvalidAnchorZone = "InvalidAnchorZone",
2403
+ SelectionOutOfBound = "SelectionOutOfBound",
2404
+ TargetOutOfSheet = "TargetOutOfSheet",
2405
+ WrongCutSelection = "WrongCutSelection",
2406
+ WrongPasteSelection = "WrongPasteSelection",
2407
+ WrongPasteOption = "WrongPasteOption",
2408
+ WrongFigurePasteOption = "WrongFigurePasteOption",
2409
+ EmptyClipboard = "EmptyClipboard",
2410
+ EmptyRange = "EmptyRange",
2411
+ InvalidRange = "InvalidRange",
2412
+ InvalidZones = "InvalidZones",
2413
+ InvalidSheetId = "InvalidSheetId",
2414
+ InvalidFigureId = "InvalidFigureId",
2415
+ InputAlreadyFocused = "InputAlreadyFocused",
2416
+ MaximumRangesReached = "MaximumRangesReached",
2417
+ InvalidChartDefinition = "InvalidChartDefinition",
2418
+ InvalidDataSet = "InvalidDataSet",
2419
+ InvalidLabelRange = "InvalidLabelRange",
2420
+ InvalidScorecardKeyValue = "InvalidScorecardKeyValue",
2421
+ InvalidScorecardBaseline = "InvalidScorecardBaseline",
2422
+ InvalidGaugeDataRange = "InvalidGaugeDataRange",
2423
+ EmptyGaugeRangeMin = "EmptyGaugeRangeMin",
2424
+ GaugeRangeMinNaN = "GaugeRangeMinNaN",
2425
+ EmptyGaugeRangeMax = "EmptyGaugeRangeMax",
2426
+ GaugeRangeMaxNaN = "GaugeRangeMaxNaN",
2427
+ GaugeRangeMinBiggerThanRangeMax = "GaugeRangeMinBiggerThanRangeMax",
2428
+ GaugeLowerInflectionPointNaN = "GaugeLowerInflectionPointNaN",
2429
+ GaugeUpperInflectionPointNaN = "GaugeUpperInflectionPointNaN",
2430
+ GaugeLowerBiggerThanUpper = "GaugeLowerBiggerThanUpper",
2431
+ InvalidAutofillSelection = "InvalidAutofillSelection",
2432
+ WrongComposerSelection = "WrongComposerSelection",
2433
+ MinBiggerThanMax = "MinBiggerThanMax",
2434
+ LowerBiggerThanUpper = "LowerBiggerThanUpper",
2435
+ MidBiggerThanMax = "MidBiggerThanMax",
2436
+ MinBiggerThanMid = "MinBiggerThanMid",
2437
+ FirstArgMissing = "FirstArgMissing",
2438
+ SecondArgMissing = "SecondArgMissing",
2439
+ MinNaN = "MinNaN",
2440
+ MidNaN = "MidNaN",
2441
+ MaxNaN = "MaxNaN",
2442
+ ValueUpperInflectionNaN = "ValueUpperInflectionNaN",
2443
+ ValueLowerInflectionNaN = "ValueLowerInflectionNaN",
2444
+ MinInvalidFormula = "MinInvalidFormula",
2445
+ MidInvalidFormula = "MidInvalidFormula",
2446
+ MaxInvalidFormula = "MaxInvalidFormula",
2447
+ ValueUpperInvalidFormula = "ValueUpperInvalidFormula",
2448
+ ValueLowerInvalidFormula = "ValueLowerInvalidFormula",
2449
+ InvalidSortZone = "InvalidSortZone",
2450
+ WaitingSessionConfirmation = "WaitingSessionConfirmation",
2451
+ MergeOverlap = "MergeOverlap",
2452
+ TooManyHiddenElements = "TooManyHiddenElements",
2453
+ Readonly = "Readonly",
2454
+ InvalidViewportSize = "InvalidViewportSize",
2455
+ InvalidScrollingDirection = "InvalidScrollingDirection",
2456
+ FigureDoesNotExist = "FigureDoesNotExist",
2457
+ InvalidConditionalFormatId = "InvalidConditionalFormatId",
2458
+ InvalidCellPopover = "InvalidCellPopover",
2459
+ EmptyTarget = "EmptyTarget",
2460
+ InvalidFreezeQuantity = "InvalidFreezeQuantity",
2461
+ FrozenPaneOverlap = "FrozenPaneOverlap",
2462
+ ValuesNotChanged = "ValuesNotChanged",
2463
+ InvalidFilterZone = "InvalidFilterZone",
2464
+ FilterOverlap = "FilterOverlap",
2465
+ FilterNotFound = "FilterNotFound",
2466
+ MergeInFilter = "MergeInFilter",
2467
+ NonContinuousTargets = "NonContinuousTargets",
2468
+ DuplicatedFigureId = "DuplicatedFigureId",
2469
+ InvalidSelectionStep = "InvalidSelectionStep",
2470
+ DuplicatedChartId = "DuplicatedChartId",
2471
+ ChartDoesNotExist = "ChartDoesNotExist",
2472
+ InvalidHeaderIndex = "InvalidHeaderIndex",
2473
+ InvalidQuantity = "InvalidQuantity",
2474
+ MoreThanOneColumnSelected = "MoreThanOneColumnSelected",
2475
+ EmptySplitSeparator = "EmptySplitSeparator",
2476
+ SplitWillOverwriteContent = "SplitWillOverwriteContent",
2477
+ NoSplitSeparatorInSelection = "NoSplitSeparatorInSelection",
2478
+ NoActiveSheet = "NoActiveSheet",
2479
+ InvalidLocale = "InvalidLocale",
2480
+ AlreadyInPaintingFormatMode = "AlreadyInPaintingFormatMode",
2481
+ MoreThanOneRangeSelected = "MoreThanOneRangeSelected",
2482
+ NoColumnsProvided = "NoColumnsProvided",
2483
+ ColumnsNotIncludedInZone = "ColumnsNotIncludedInZone",
2484
+ DuplicatesColumnsSelected = "DuplicatesColumnsSelected",
2485
+ InvalidHeaderGroupStartEnd = "InvalidHeaderGroupStartEnd",
2486
+ HeaderGroupAlreadyExists = "HeaderGroupAlreadyExists",
2487
+ UnknownHeaderGroup = "UnknownHeaderGroup",
2488
+ UnknownDataValidationRule = "UnknownDataValidationRule",
2489
+ UnknownDataValidationCriterionType = "UnknownDataValidationCriterionType",
2490
+ InvalidDataValidationCriterionValue = "InvalidDataValidationCriterionValue",
2491
+ InvalidNumberOfCriterionValues = "InvalidNumberOfCriterionValues",
2492
+ BlockingValidationRule = "BlockingValidationRule"
2383
2493
  }
2384
2494
  interface CommandHandler<T> {
2385
2495
  allowDispatch(command: T): CommandResult | CommandResult[];
@@ -2507,7 +2617,7 @@ interface CellPosition {
2507
2617
  sheetId: UID;
2508
2618
  }
2509
2619
  declare const borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
2510
- type BorderStyle = typeof borderStyles[number];
2620
+ type BorderStyle = (typeof borderStyles)[number];
2511
2621
  type BorderDescr = {
2512
2622
  style: BorderStyle;
2513
2623
  color: Color;
@@ -2527,44 +2637,20 @@ interface Border$1 {
2527
2637
  right?: BorderDescr;
2528
2638
  }
2529
2639
  type ReferenceDenormalizer = (range: Range, isMeta: boolean, functionName: string, paramNumber: number) => any | any[][];
2530
- type EnsureRange = (range: Range) => MatrixArg;
2531
- type _CompiledFormula = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => FormulaReturn;
2640
+ type EnsureRange = (range: Range) => Matrix<ValueAndFormat>;
2641
+ type _CompiledFormula = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => Matrix<ValueAndFormat> | ValueAndFormat;
2532
2642
  interface CompiledFormula {
2533
2643
  execute: _CompiledFormula;
2534
2644
  tokens: Token[];
2535
2645
  dependencies: string[];
2536
2646
  }
2537
2647
  type Matrix<T = unknown> = T[][];
2538
- type Arg = MatrixArg | PrimitiveArg;
2539
- type MatrixArg = {
2540
- value: MatrixArgValue;
2541
- format?: MatrixArgFormat;
2542
- };
2543
- type PrimitiveArg = {
2544
- value: PrimitiveArgValue;
2545
- format?: PrimitiveFormat;
2546
- };
2547
- type ArgValue = PrimitiveArgValue | MatrixArgValue;
2548
- type MatrixArgValue = Matrix<CellValue | undefined>;
2549
- type PrimitiveArgValue = CellValue | null;
2550
- type MatrixArgFormat = Matrix<PrimitiveFormat>;
2551
- type PrimitiveFormat = Format | undefined;
2552
- type FunctionReturn = MatrixFunctionReturn | PrimitiveFunctionReturn;
2553
- type FunctionReturnValue = CellValue | Matrix<CellValue>;
2554
- type FunctionReturnFormat = PrimitiveFormat | MatrixArgFormat;
2555
- type MatrixFunctionReturn = {
2556
- value: Matrix<CellValue>;
2557
- format?: FunctionReturnFormat;
2558
- };
2559
- type PrimitiveFunctionReturn = {
2648
+ type ValueAndFormat = {
2560
2649
  value: CellValue;
2561
- format?: PrimitiveFormat;
2562
- };
2563
- type FormulaReturn = MatrixFunctionReturn | PrimitiveFormulaReturn;
2564
- type PrimitiveFormulaReturn = {
2565
- value: CellValue | null;
2566
- format?: PrimitiveFormat;
2650
+ format?: Format;
2567
2651
  };
2652
+ type Arg = Maybe<ValueAndFormat> | Matrix<ValueAndFormat>;
2653
+ type ArgValue = Maybe<CellValue> | Matrix<CellValue>;
2568
2654
  interface HeaderDimensions {
2569
2655
  start: Pixel;
2570
2656
  size: Pixel;
@@ -2647,6 +2733,7 @@ interface Lazy<T> {
2647
2733
  */
2648
2734
  map: <U>(callback: (value: T) => U) => Lazy<U>;
2649
2735
  }
2736
+ type Maybe<T> = T | undefined;
2650
2737
  interface Cloneable<T> {
2651
2738
  clone: (args?: Partial<T>) => T;
2652
2739
  }
@@ -2668,6 +2755,13 @@ type ImmutableSet<T> = ReadonlySet<Immutable<T>>;
2668
2755
  type ImmutableObject<T> = {
2669
2756
  readonly [K in keyof T]: Immutable<T[K]>;
2670
2757
  };
2758
+ interface HeaderGroup {
2759
+ start: HeaderIndex;
2760
+ end: HeaderIndex;
2761
+ isFolded?: boolean;
2762
+ }
2763
+ type Direction$1 = "up" | "down" | "left" | "right";
2764
+ type SelectionStep = number | "end";
2671
2765
 
2672
2766
  type LocaleCode = string & Alias;
2673
2767
  interface Locale {
@@ -2718,7 +2812,7 @@ interface EvaluatedCellProperties {
2718
2812
  readonly isAutoSummable: boolean;
2719
2813
  readonly link?: Link;
2720
2814
  }
2721
- type CellValue = string | number | boolean;
2815
+ type CellValue = string | number | boolean | null;
2722
2816
  type EvaluatedCell = NumberCell | TextCell | BooleanCell | EmptyCell | ErrorCell;
2723
2817
  interface NumberCell extends EvaluatedCellProperties {
2724
2818
  readonly type: CellValueType.number;
@@ -2820,6 +2914,123 @@ interface Currency {
2820
2914
  position: "before" | "after";
2821
2915
  }
2822
2916
 
2917
+ interface DataValidationRule {
2918
+ id: UID;
2919
+ criterion: DataValidationCriterion;
2920
+ ranges: Range[];
2921
+ isBlocking?: boolean;
2922
+ }
2923
+ type TextContainsCriterion = {
2924
+ type: "textContains";
2925
+ values: string[];
2926
+ };
2927
+ type TextNotContainsCriterion = {
2928
+ type: "textNotContains";
2929
+ values: string[];
2930
+ };
2931
+ type TextIsCriterion = {
2932
+ type: "textIs";
2933
+ values: string[];
2934
+ };
2935
+ type TextIsEmailCriterion = {
2936
+ type: "textIsEmail";
2937
+ values: string[];
2938
+ };
2939
+ type TextIsLinkCriterion = {
2940
+ type: "textIsLink";
2941
+ values: string[];
2942
+ };
2943
+ type DateIsCriterion = {
2944
+ type: "dateIs";
2945
+ dateValue: DateCriterionValue;
2946
+ values: string[];
2947
+ };
2948
+ type DateIsBeforeCriterion = {
2949
+ type: "dateIsBefore";
2950
+ dateValue: DateCriterionValue;
2951
+ values: string[];
2952
+ };
2953
+ type DateIsOnOrBeforeCriterion = {
2954
+ type: "dateIsOnOrBefore";
2955
+ dateValue: DateCriterionValue;
2956
+ values: string[];
2957
+ };
2958
+ type DateIsAfterCriterion = {
2959
+ type: "dateIsAfter";
2960
+ dateValue: DateCriterionValue;
2961
+ values: string[];
2962
+ };
2963
+ type DateIsOnOrAfterCriterion = {
2964
+ type: "dateIsOnOrAfter";
2965
+ dateValue: DateCriterionValue;
2966
+ values: string[];
2967
+ };
2968
+ type DateIsBetweenCriterion = {
2969
+ type: "dateIsBetween";
2970
+ values: string[];
2971
+ };
2972
+ type DateIsNotBetweenCriterion = {
2973
+ type: "dateIsNotBetween";
2974
+ values: string[];
2975
+ };
2976
+ type DateIsValidCriterion = {
2977
+ type: "dateIsValid";
2978
+ values: string[];
2979
+ };
2980
+ type IsEqualCriterion = {
2981
+ type: "isEqual";
2982
+ values: string[];
2983
+ };
2984
+ type IsNotEqualCriterion = {
2985
+ type: "isNotEqual";
2986
+ values: string[];
2987
+ };
2988
+ type IsGreaterThanCriterion = {
2989
+ type: "isGreaterThan";
2990
+ values: string[];
2991
+ };
2992
+ type IsGreaterOrEqualToCriterion = {
2993
+ type: "isGreaterOrEqualTo";
2994
+ values: string[];
2995
+ };
2996
+ type IsLessThanCriterion = {
2997
+ type: "isLessThan";
2998
+ values: string[];
2999
+ };
3000
+ type IsLessOrEqualToCriterion = {
3001
+ type: "isLessOrEqualTo";
3002
+ values: string[];
3003
+ };
3004
+ type IsBetweenCriterion = {
3005
+ type: "isBetween";
3006
+ values: string[];
3007
+ };
3008
+ type IsNotBetweenCriterion = {
3009
+ type: "isNotBetween";
3010
+ values: string[];
3011
+ };
3012
+ type IsCheckboxCriterion = {
3013
+ type: "isBoolean";
3014
+ values: string[];
3015
+ };
3016
+ type IsValueInListCriterion = {
3017
+ type: "isValueInList";
3018
+ values: string[];
3019
+ displayStyle: "arrow" | "plainText";
3020
+ };
3021
+ type IsValueInRangeCriterion = {
3022
+ type: "isValueInRange";
3023
+ values: string[];
3024
+ displayStyle: "arrow" | "plainText";
3025
+ };
3026
+ type CustomFormulaCriterion = {
3027
+ type: "customFormula";
3028
+ values: string[];
3029
+ };
3030
+ type DataValidationCriterion = TextContainsCriterion | TextNotContainsCriterion | TextIsCriterion | TextIsEmailCriterion | TextIsLinkCriterion | IsBetweenCriterion | DateIsCriterion | DateIsBeforeCriterion | DateIsOnOrBeforeCriterion | DateIsAfterCriterion | DateIsOnOrAfterCriterion | DateIsBetweenCriterion | DateIsNotBetweenCriterion | DateIsValidCriterion | IsEqualCriterion | IsNotEqualCriterion | IsGreaterThanCriterion | IsGreaterOrEqualToCriterion | IsLessThanCriterion | IsLessOrEqualToCriterion | IsNotBetweenCriterion | IsCheckboxCriterion | IsValueInListCriterion | IsValueInRangeCriterion | CustomFormulaCriterion;
3031
+ type DateCriterionValue = "today" | "tomorrow" | "yesterday" | "lastWeek" | "lastMonth" | "lastYear" | "exactDate";
3032
+ type DataValidationCriterionType = DataValidationCriterion["type"];
3033
+
2823
3034
  type ClipboardReadResult = {
2824
3035
  status: "ok";
2825
3036
  content: string;
@@ -2832,28 +3043,16 @@ interface ClipboardInterface {
2832
3043
  readText(): Promise<ClipboardReadResult>;
2833
3044
  }
2834
3045
 
2835
- type TranslationFunction = (string: string, ...values: string[] | [{
2836
- [key: string]: string;
2837
- }]) => string;
2838
- /***
2839
- * Allow to inject a translation function from outside o-spreadsheet.
2840
- * @param tfn the function that will do the translation
2841
- */
2842
- declare function setTranslationMethod(tfn: TranslationFunction): void;
2843
-
2844
- interface EditTextOptions {
2845
- error?: string;
2846
- placeholder?: string;
2847
- }
3046
+ type NotificationType = "danger" | "info" | "success" | "warning";
2848
3047
  interface InformationNotification {
2849
3048
  text: string;
2850
- tag: string;
3049
+ type: NotificationType;
3050
+ sticky: boolean;
2851
3051
  }
2852
3052
  interface SpreadsheetEnv {
2853
3053
  notifyUser: (notification: InformationNotification) => any;
2854
3054
  raiseError: (text: string, callback?: () => void) => any;
2855
3055
  askConfirmation: (content: string, confirm: () => any, cancel?: () => any) => any;
2856
- editText: (title: string, callback: (text: string | null) => any, options?: EditTextOptions) => any;
2857
3056
  }
2858
3057
  interface SpreadsheetChildEnv extends SpreadsheetEnv {
2859
3058
  model: Model;
@@ -2862,8 +3061,7 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
2862
3061
  openSidePanel: (panel: string, panelProps?: any) => void;
2863
3062
  toggleSidePanel: (panel: string, panelProps?: any) => void;
2864
3063
  clipboard: ClipboardInterface;
2865
- _t: TranslationFunction;
2866
- startCellEdition: (content: string) => void;
3064
+ startCellEdition: (content?: string) => void;
2867
3065
  loadCurrencies?: () => Promise<Currency[]>;
2868
3066
  loadLocales: () => Promise<Locale[]>;
2869
3067
  }
@@ -2879,24 +3077,32 @@ interface ArgDefinition {
2879
3077
  default?: boolean;
2880
3078
  defaultValue?: any;
2881
3079
  }
2882
- type ComputeFunctionArg<T> = T | (() => T) | undefined;
3080
+ type ComputeFunctionArg<T> = T | (() => T);
2883
3081
  type ComputeFunction<T, R> = (this: EvalContext, ...args: ComputeFunctionArg<T>[]) => R;
2884
- interface AddFunctionDescription {
3082
+ interface AddFunctionDescriptionBase {
2885
3083
  description: string;
2886
- compute: ComputeFunction<ArgValue, FunctionReturnValue>;
2887
- computeFormat?: ComputeFunction<Arg, FunctionReturnFormat>;
2888
3084
  category?: string;
2889
3085
  args: ArgDefinition[];
2890
3086
  returns: [ArgType];
2891
3087
  isExported?: boolean;
2892
3088
  hidden?: boolean;
2893
3089
  }
2894
- interface FunctionDescription extends AddFunctionDescription {
3090
+ interface ComputeValue {
3091
+ compute: ComputeFunction<ArgValue, CellValue | Matrix<CellValue>>;
3092
+ }
3093
+ interface ComputeFormat {
3094
+ computeFormat: ComputeFunction<Arg, Format | undefined | Matrix<Format | undefined>>;
3095
+ }
3096
+ interface ComputeValueAndFormat {
3097
+ computeValueAndFormat: ComputeFunction<Arg, Matrix<ValueAndFormat> | ValueAndFormat>;
3098
+ }
3099
+ type AddFunctionDescription = (AddFunctionDescriptionBase & ComputeValue & Partial<ComputeFormat>) | (AddFunctionDescriptionBase & ComputeValueAndFormat);
3100
+ type FunctionDescription = AddFunctionDescription & {
2895
3101
  minArgRequired: number;
2896
3102
  maxArgPossible: number;
2897
3103
  nbrArgRepeating: number;
2898
3104
  getArgToFocus: (argPosition: number) => number;
2899
- }
3105
+ };
2900
3106
  type EvalContext = {
2901
3107
  __lastFnCalled?: string;
2902
3108
  __originCellXC?: () => string;
@@ -2977,7 +3183,7 @@ interface CorePluginConstructor {
2977
3183
  * persisted state.
2978
3184
  * They should not be concerned about UI parts or transient state.
2979
3185
  */
2980
- declare class CorePlugin<State = any, C = CoreCommand> extends BasePlugin<State, C> implements RangeProvider {
3186
+ declare class CorePlugin<State = any> extends BasePlugin<State, CoreCommand> implements RangeProvider {
2981
3187
  protected getters: CoreGetters;
2982
3188
  protected uuidGenerator: UuidGenerator;
2983
3189
  constructor({ getters, stateObserver, range, dispatch, uuidGenerator }: CorePluginConfig);
@@ -3127,7 +3333,7 @@ interface CoreState {
3127
3333
  * cell and sheet content.
3128
3334
  */
3129
3335
  declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
3130
- static getters: readonly ["zoneToXC", "getCells", "getFormulaCellContent", "getCellStyle", "buildFormulaContent", "getCellById"];
3336
+ static getters: readonly ["zoneToXC", "getCells", "getFormulaCellContent", "getTranslatedCellFormula", "getCellStyle", "getCellById"];
3131
3337
  readonly nextId = 1;
3132
3338
  readonly cells: {
3133
3339
  [sheetId: string]: {
@@ -3157,14 +3363,15 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
3157
3363
  [key: number]: Format;
3158
3364
  }): Cell;
3159
3365
  exportForExcel(data: ExcelWorkbookData): void;
3366
+ private removeDefaultStyleValues;
3160
3367
  getCells(sheetId: UID): Record<UID, Cell>;
3161
3368
  /**
3162
3369
  * get a cell by ID. Used in evaluation when evaluating an async cell, we need to be able to find it back after
3163
3370
  * starting an async evaluation even if it has been moved or re-allocated
3164
3371
  */
3165
3372
  getCellById(cellId: UID): Cell | undefined;
3166
- buildFormulaContent(sheetId: UID, cell: Pick<FormulaCell, "dependencies" | "compiledFormula">, dependencies?: Range[]): string;
3167
- getFormulaCellContent(sheetId: UID, cell: FormulaCell): string;
3373
+ getFormulaCellContent(sheetId: UID, cell: Pick<FormulaCell, "dependencies" | "compiledFormula">, dependencies?: Range[]): string;
3374
+ getTranslatedCellFormula(sheetId: UID, offsetX: number, offsetY: number, compiledFormula: CompiledFormula, dependencies: Range[]): string;
3168
3375
  getCellStyle(position: CellPosition): Style;
3169
3376
  /**
3170
3377
  * Converts a zone to a XC coordinate system
@@ -3288,7 +3495,6 @@ declare class ChartPlugin extends CorePlugin<ChartState> implements ChartState {
3288
3495
  getChartDefinition(figureId: UID): ChartDefinition;
3289
3496
  import(data: WorkbookData): void;
3290
3497
  export(data: WorkbookData): void;
3291
- exportForExcel(data: ExcelWorkbookData): void;
3292
3498
  /**
3293
3499
  * Add a figure with tag chart with the given id at the given position
3294
3500
  */
@@ -3336,7 +3542,7 @@ declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState>
3336
3542
  * Add or replace a conditional format rule
3337
3543
  */
3338
3544
  private addConditionalFormatting;
3339
- private checkValidReordering;
3545
+ private checkValidPriorityChange;
3340
3546
  private checkEmptyRange;
3341
3547
  private checkCFRule;
3342
3548
  private checkOperatorArgsNumber;
@@ -3349,7 +3555,36 @@ declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState>
3349
3555
  private checkMidBiggerThanMax;
3350
3556
  private checkMinBiggerThanMid;
3351
3557
  private removeConditionalFormatting;
3352
- private reorderConditionalFormatting;
3558
+ private changeCFPriority;
3559
+ }
3560
+
3561
+ interface DataValidationState {
3562
+ readonly rules: {
3563
+ [sheet: string]: DataValidationRule[];
3564
+ };
3565
+ }
3566
+ declare class DataValidationPlugin extends CorePlugin<DataValidationState> implements DataValidationState {
3567
+ static getters: readonly ["cellHasListDataValidationIcon", "getDataValidationRule", "getDataValidationRules", "getValidationRuleForCell"];
3568
+ readonly rules: {
3569
+ [sheet: string]: DataValidationRule[];
3570
+ };
3571
+ adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
3572
+ private loopThroughRangesOfSheet;
3573
+ allowDispatch(cmd: Command): CommandResult | CommandResult[];
3574
+ handle(cmd: CoreCommand): void;
3575
+ getDataValidationRules(sheetId: UID): DataValidationRule[];
3576
+ getDataValidationRule(sheetId: UID, id: UID): DataValidationRule | undefined;
3577
+ getValidationRuleForCell({ sheetId, col, row }: CellPosition): DataValidationRule | undefined;
3578
+ cellHasListDataValidationIcon(cellPosition: CellPosition): boolean;
3579
+ private addDataValidationRule;
3580
+ private removeRangesFromRules;
3581
+ private removeDataValidationRule;
3582
+ private setCenterStyleToBooleanCells;
3583
+ import(data: WorkbookData): void;
3584
+ export(data: Partial<WorkbookData>): void;
3585
+ private checkCriterionTypeIsValid;
3586
+ private checkCriterionHasValidNumberOfValues;
3587
+ private checkCriterionValuesAreValid;
3353
3588
  }
3354
3589
 
3355
3590
  interface FigureState {
@@ -3440,6 +3675,85 @@ declare class FiltersPlugin extends CorePlugin<FiltersState> implements FiltersS
3440
3675
  exportForExcel(data: ExcelWorkbookData): void;
3441
3676
  }
3442
3677
 
3678
+ interface State$7 {
3679
+ groups: Record<UID, Record<Dimension, HeaderGroup[]>>;
3680
+ }
3681
+ declare class HeaderGroupingPlugin extends CorePlugin<State$7> {
3682
+ static getters: readonly ["getHeaderGroups", "getGroupsLayers", "getVisibleGroupLayers", "getHeaderGroup", "getHeaderGroupsInZone", "isGroupFolded", "isRowFolded", "isColFolded"];
3683
+ private readonly groups;
3684
+ allowDispatch(cmd: CoreCommand): CommandResult;
3685
+ handle(cmd: CoreCommand): void;
3686
+ getHeaderGroups(sheetId: UID, dim: Dimension): HeaderGroup[];
3687
+ getHeaderGroup(sheetId: UID, dim: Dimension, start: number, end: number): HeaderGroup | undefined;
3688
+ getHeaderGroupsInZone(sheetId: UID, dim: Dimension, zone: Zone): HeaderGroup[];
3689
+ /**
3690
+ * Get all the groups of a sheet in a dimension, and return an array of layers of those groups.
3691
+ *
3692
+ * The layering rules are:
3693
+ * 1) A group containing another group should be on a layer above the group it contains
3694
+ * 2) The widest/highest groups should be on the left/top layer compared to the groups it contains
3695
+ * 3) The group should be on the left/top-most layer possible, barring intersections with other groups (see rules 1 and 2)
3696
+ */
3697
+ getGroupsLayers(sheetId: UID, dimension: Dimension): HeaderGroup[][];
3698
+ /**
3699
+ * Get all the groups of a sheet in a dimension, and return an array of layers of those groups,
3700
+ * excluding the groups that are totally hidden.
3701
+ */
3702
+ getVisibleGroupLayers(sheetId: UID, dimension: Dimension): HeaderGroup[][];
3703
+ isGroupFolded(sheetId: UID, dimension: Dimension, start: number, end: number): boolean;
3704
+ isRowFolded(sheetId: UID, row: HeaderIndex): boolean;
3705
+ isColFolded(sheetId: UID, col: HeaderIndex): boolean;
3706
+ private getGroupId;
3707
+ /**
3708
+ * To get layers of groups, and to add/remove headers from groups, we can see each header of a group as a brick. Each
3709
+ * brick falls down in the pile corresponding to its header, until it hits another brick, or the ground.
3710
+ *
3711
+ * With this abstraction, we can very simply group/ungroup headers from groups, and get the layers of groups.
3712
+ * - grouping headers is done by adding a brick to each header pile
3713
+ * - un-grouping headers is done by removing a brick from each header pile
3714
+ * - getting the layers of groups is done by simply letting the brick fall and checking the result
3715
+ *
3716
+ * Example:
3717
+ * We have 2 groups ([A=>E] and [C=>D]), and we want to group headers [C=>F]
3718
+ *
3719
+ * Headers : A B C D E F G A B C D E F G A B C D E F G
3720
+ * Headers to group: [C=>D]: _ _ [C=>F]: _ _ _ _
3721
+ * | | ==> | | | | ==> ==> Result: 3 groups
3722
+ * | | ˅ ˅ | | _ _ - [C=>D]
3723
+ * Groups: ˅ ˅ _ _ ˅ | _ _ _ - [C=>E]
3724
+ * Groups: _ _ _ _ _ _ _ _ _ _ ˅ _ _ _ _ _ _ - [A=>F]
3725
+
3726
+ * @param groups
3727
+ * @param start start of the range where to add/remove headers
3728
+ * @param end end of the range where to add/remove headers
3729
+ * @param delta -1: remove headers, 1: add headers, 0: get layers (don't add/remove anything)
3730
+ */
3731
+ private bricksFallingAlgorithm;
3732
+ private groupHeaders;
3733
+ /**
3734
+ * Ungroup the given headers. The headers will be taken out of the group they are in. This might split a group into two
3735
+ * if the headers were in the middle of a group. If multiple groups contains a header, it will only be taken out of the
3736
+ * lowest group in the layering of the groups.
3737
+ */
3738
+ private unGroupHeaders;
3739
+ private moveGroupsOnHeaderInsertion;
3740
+ private moveGroupsOnHeaderDeletion;
3741
+ private doGroupOverlap;
3742
+ private removeDuplicateGroups;
3743
+ private findGroupWithStartEnd;
3744
+ /**
3745
+ * Fold the given group, and all the groups starting at the same index that are contained inside the given group.
3746
+ */
3747
+ private foldHeaderGroup;
3748
+ /**
3749
+ * Unfold the given group, and all the groups starting at the same index that contain the given group.
3750
+ */
3751
+ private unfoldHeaderGroup;
3752
+ private getGroupIndex;
3753
+ import(data: WorkbookData): void;
3754
+ export(data: WorkbookData): void;
3755
+ }
3756
+
3443
3757
  interface HeaderSizeState$1 {
3444
3758
  sizes: Record<UID, Record<Dimension, Array<Pixel | undefined>>>;
3445
3759
  }
@@ -3461,11 +3775,12 @@ declare class HeaderSizePlugin extends CorePlugin<HeaderSizeState$1> implements
3461
3775
  }
3462
3776
 
3463
3777
  declare class HeaderVisibilityPlugin extends CorePlugin {
3464
- static getters: readonly ["canRemoveHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isRowHiddenByUser", "isColHiddenByUser"];
3778
+ static getters: readonly ["checkElementsIncludeAllVisibleHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isHeaderHiddenByUser", "isRowHiddenByUser", "isColHiddenByUser"];
3465
3779
  private readonly hiddenHeaders;
3466
3780
  allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements | CommandResult.InvalidHeaderIndex;
3467
3781
  handle(cmd: Command): void;
3468
- canRemoveHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
3782
+ checkElementsIncludeAllVisibleHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
3783
+ isHeaderHiddenByUser(sheetId: UID, dimension: Dimension, index: HeaderIndex): boolean;
3469
3784
  isRowHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
3470
3785
  isColHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
3471
3786
  getHiddenColsGroups(sheetId: UID): ConsecutiveIndexes[];
@@ -3511,7 +3826,7 @@ interface MergeState {
3511
3826
  readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
3512
3827
  }
3513
3828
  declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
3514
- static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "getBottomLeftCell", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "getSelectionRangeString"];
3829
+ static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "getBottomLeftCell", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "getSelectionRangeString", "isMainCellPosition"];
3515
3830
  private nextId;
3516
3831
  readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
3517
3832
  readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
@@ -3551,6 +3866,7 @@ declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
3551
3866
  * Check if the zone represents a single cell or a single merge.
3552
3867
  */
3553
3868
  isSingleCellOrMerge(sheetId: UID, zone: Zone): boolean;
3869
+ isMainCellPosition(position: CellPosition): boolean;
3554
3870
  /**
3555
3871
  * Return true if the current selection requires losing state if it is merged.
3556
3872
  * This happens when there is some textual content in other cells than the
@@ -3595,14 +3911,14 @@ declare class SettingsPlugin extends CorePlugin {
3595
3911
  export(data: WorkbookData): void;
3596
3912
  }
3597
3913
 
3598
- interface SheetState$1 {
3914
+ interface SheetState {
3599
3915
  readonly sheets: Record<UID, Sheet | undefined>;
3600
3916
  readonly orderedSheetIds: UID[];
3601
3917
  readonly sheetIdsMapName: Record<string, UID | undefined>;
3602
3918
  readonly cellPosition: Record<UID, CellPosition | undefined>;
3603
3919
  }
3604
- declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState$1 {
3605
- static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "isEmpty", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone"];
3920
+ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
3921
+ static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "isEmpty", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone", "checkElementsIncludeAllNonFrozenHeaders"];
3606
3922
  readonly sheetIdsMapName: Record<string, UID | undefined>;
3607
3923
  readonly orderedSheetIds: UID[];
3608
3924
  readonly sheets: Record<UID, Sheet | undefined>;
@@ -3630,6 +3946,7 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
3630
3946
  getVisibleSheetIds(): UID[];
3631
3947
  getEvaluationSheets(): Record<UID, Sheet | undefined>;
3632
3948
  doesHeaderExist(sheetId: UID, dimension: Dimension, index: number): boolean;
3949
+ doesHeadersExist(sheetId: UID, dimension: Dimension, headerIndexes: HeaderIndex[]): boolean;
3633
3950
  getRow(sheetId: UID, index: HeaderIndex): Row;
3634
3951
  getCell({ sheetId, col, row }: CellPosition): Cell | undefined;
3635
3952
  getColsZone(sheetId: UID, start: HeaderIndex, end: HeaderIndex): Zone;
@@ -3645,6 +3962,11 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
3645
3962
  getUnboundedZone(sheetId: UID, zone: Zone): UnboundedZone;
3646
3963
  getPaneDivisions(sheetId: UID): Readonly<PaneDivision>;
3647
3964
  private setPaneDivisions;
3965
+ /**
3966
+ * Checks if all non-frozen header indices are present in the provided elements of selected rows/columns.
3967
+ * This validation ensures that all rows or columns cannot be deleted when frozen panes exist.
3968
+ */
3969
+ checkElementsIncludeAllNonFrozenHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
3648
3970
  /**
3649
3971
  * Check if a zone only contains empty cells
3650
3972
  */
@@ -3753,7 +4075,7 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
3753
4075
 
3754
4076
  declare class EvaluationPlugin extends UIPlugin {
3755
4077
  private config;
3756
- static getters: readonly ["evaluateFormula", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone"];
4078
+ static getters: readonly ["evaluateFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone"];
3757
4079
  private shouldRebuildDependenciesGraph;
3758
4080
  private evaluator;
3759
4081
  private compilationParams;
@@ -3784,7 +4106,7 @@ declare class EvaluationPlugin extends UIPlugin {
3784
4106
  * It could be the formula present in the cell itself or the
3785
4107
  * formula of the array formula that spreads to the cell
3786
4108
  */
3787
- private getCorrespondingFormulaCell;
4109
+ getCorrespondingFormulaCell(position: CellPosition): FormulaCell | undefined;
3788
4110
  private getCompilationParameters;
3789
4111
  }
3790
4112
 
@@ -3829,6 +4151,7 @@ declare class EvaluationChartPlugin extends UIPlugin<EvaluationChartState> {
3829
4151
  * - the default chart color if no other color is defined
3830
4152
  */
3831
4153
  getBackgroundOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined): Color;
4154
+ exportForExcel(data: ExcelWorkbookData): void;
3832
4155
  }
3833
4156
 
3834
4157
  declare class EvaluationConditionalFormatPlugin extends UIPlugin {
@@ -3866,6 +4189,43 @@ declare class EvaluationConditionalFormatPlugin extends UIPlugin {
3866
4189
  private rulePredicate;
3867
4190
  }
3868
4191
 
4192
+ interface InvalidValidationResult {
4193
+ readonly isValid: false;
4194
+ readonly rule: DataValidationRule;
4195
+ readonly error: string;
4196
+ }
4197
+ interface ValidValidationResult {
4198
+ readonly isValid: true;
4199
+ }
4200
+ type ValidationResult = ValidValidationResult | InvalidValidationResult;
4201
+ type SheetValidationResult = {
4202
+ [col: HeaderIndex]: Array<Lazy<ValidationResult>>;
4203
+ };
4204
+ declare class EvaluationDataValidationPlugin extends UIPlugin {
4205
+ static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getDataValidationCheckBoxCellPositions", "getDataValidationListCellsPositions", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "isCellValidCheckbox", "isDataValidationInvalid"];
4206
+ validationResults: Record<UID, SheetValidationResult>;
4207
+ handle(cmd: CoreViewCommand): void;
4208
+ isDataValidationInvalid(cellPosition: CellPosition): boolean;
4209
+ getInvalidDataValidationMessage(cellPosition: CellPosition): string | undefined;
4210
+ /**
4211
+ * Check if the value is valid for the given criterion, and return an error message if not.
4212
+ *
4213
+ * The value must be canonicalized.
4214
+ */
4215
+ getDataValidationInvalidCriterionValueMessage(criterionType: DataValidationCriterionType, value: string): string | undefined;
4216
+ isCellValidCheckbox(cellPosition: CellPosition): boolean;
4217
+ /** Get the validation result if the cell on the given position had the given value */
4218
+ getValidationResultForCellValue(cellValue: CellValue, cellPosition: CellPosition): ValidationResult;
4219
+ getDataValidationCheckBoxCellPositions(): CellPosition[];
4220
+ getDataValidationListCellsPositions(): CellPosition[];
4221
+ private getValidationResultForCell;
4222
+ private computeSheetValidationResults;
4223
+ private getRuleErrorForCellValue;
4224
+ /** Get the offset of the cell inside the ranges of the rule. Throws an error if the cell isn't inside the rule. */
4225
+ private getCellOffsetInRule;
4226
+ private getEvaluatedCriterionValues;
4227
+ }
4228
+
3869
4229
  interface HeaderSizeState {
3870
4230
  tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
3871
4231
  }
@@ -3943,6 +4303,7 @@ declare class AutofillPlugin extends UIPlugin {
3943
4303
  private getDirection;
3944
4304
  private autoFillMerge;
3945
4305
  private autofillCF;
4306
+ private autofillDV;
3946
4307
  drawGrid(renderingContext: GridRenderingContext): void;
3947
4308
  }
3948
4309
 
@@ -4209,8 +4570,7 @@ declare class SelectionInputPlugin extends UIPlugin implements StreamCallbacks<S
4209
4570
  static getters: never[];
4210
4571
  ranges: RangeInputValue[];
4211
4572
  focusedRangeIndex: number | null;
4212
- private activeSheet;
4213
- private willAddNewRange;
4573
+ private inputSheetId;
4214
4574
  constructor(config: UIPluginConfig, initialRanges: string[], inputHasSingleRange: boolean);
4215
4575
  allowDispatch(cmd: LocalCommand): CommandResult;
4216
4576
  handleEvent(event: SelectionEvent): void;
@@ -4223,7 +4583,6 @@ declare class SelectionInputPlugin extends UIPlugin implements StreamCallbacks<S
4223
4583
  private focus;
4224
4584
  private focusLast;
4225
4585
  private unfocus;
4226
- private add;
4227
4586
  private setContent;
4228
4587
  /**
4229
4588
  * Insert new inputs after the given index.
@@ -4391,7 +4750,7 @@ declare class UIOptionsPlugin extends UIPlugin {
4391
4750
  }
4392
4751
 
4393
4752
  declare class SheetUIPlugin extends UIPlugin {
4394
- static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getColDimensions", "getRowDimensions", "getColRowOffset"];
4753
+ static getters: readonly ["doesCellHaveGridIcon", "getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getColDimensions", "getRowDimensions", "getColRowOffset"];
4395
4754
  private ctx;
4396
4755
  allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
4397
4756
  handle(cmd: Command): void;
@@ -4419,6 +4778,7 @@ declare class SheetUIPlugin extends UIPlugin {
4419
4778
  * i.e. The size from A to B is the distance between A.start and B.end
4420
4779
  */
4421
4780
  getColRowOffset(dimension: Dimension, referenceIndex: HeaderIndex, index: HeaderIndex, sheetId?: UID): Pixel;
4781
+ doesCellHaveGridIcon(position: CellPosition): boolean;
4422
4782
  private getColMaxWidth;
4423
4783
  /**
4424
4784
  * Check that any "sheetId" in the command matches an existing
@@ -4502,7 +4862,7 @@ declare class FilterEvaluationPlugin extends UIPlugin {
4502
4862
  */
4503
4863
  declare class GridSelectionPlugin extends UIPlugin {
4504
4864
  static layers: LAYERS[];
4505
- static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getSelectedCells", "getStatisticFnResults", "getAggregate", "getSelectedFigureId", "getSelection", "getActivePosition", "getSheetPosition", "isSelected", "isSingleColSelected", "getElementsFromSelection", "tryGetActiveSheetId"];
4865
+ static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getSelectedCells", "getStatisticFnResults", "getAggregate", "getSelectedFigureId", "getSelection", "getActivePosition", "getSheetPosition", "isSelected", "isSingleColSelected", "getElementsFromSelection", "tryGetActiveSheetId", "isGridSelectionActive"];
4506
4866
  private gridSelection;
4507
4867
  private selectedFigureId;
4508
4868
  private sheetsData;
@@ -4512,6 +4872,7 @@ declare class GridSelectionPlugin extends UIPlugin {
4512
4872
  allowDispatch(cmd: LocalCommand): CommandResult;
4513
4873
  private handleEvent;
4514
4874
  handle(cmd: Command): void;
4875
+ isGridSelectionActive(): boolean;
4515
4876
  getActiveSheet(): Readonly<Sheet>;
4516
4877
  getActiveSheetId(): UID;
4517
4878
  tryGetActiveSheetId(): UID | undefined;
@@ -4837,48 +5198,34 @@ declare class SheetViewPlugin extends UIPlugin {
4837
5198
  type GetterNames<Plugin extends {
4838
5199
  getters: readonly string[];
4839
5200
  }> = Plugin["getters"][number];
4840
- type SheetGetters = Pick<SheetPlugin, GetterNames<typeof SheetPlugin>>;
4841
- type HeaderSizeGetters = Pick<HeaderSizePlugin, GetterNames<typeof HeaderSizePlugin>>;
4842
- type HeaderVisibilityGetters = Pick<HeaderVisibilityPlugin, GetterNames<typeof HeaderVisibilityPlugin>>;
4843
- type CellGetters = Pick<CellPlugin, GetterNames<typeof CellPlugin>>;
4844
- type MergeGetters = Pick<MergePlugin, GetterNames<typeof MergePlugin>>;
4845
- type BordersGetters = Pick<BordersPlugin, GetterNames<typeof BordersPlugin>>;
4846
- type ChartGetters = Pick<ChartPlugin, GetterNames<typeof ChartPlugin>>;
4847
- type ImageGetters = Pick<ImagePlugin, GetterNames<typeof ImagePlugin>>;
4848
- type FigureGetters = Pick<FigurePlugin, GetterNames<typeof FigurePlugin>>;
5201
+ /**
5202
+ * Extract getter methods from a plugin, based on its `getters` static array.
5203
+ * @example
5204
+ * class MyPlugin {
5205
+ * static getters = [
5206
+ * "getCell",
5207
+ * "getCellValue",
5208
+ * ] as const;
5209
+ * getCell() { ... }
5210
+ * getCellValue() { ... }
5211
+ * }
5212
+ * type MyPluginGetters = PluginGetters<typeof MyPlugin>;
5213
+ * // MyPluginGetters is equivalent to:
5214
+ * // {
5215
+ * // getCell: () => ...,
5216
+ * // getCellValue: () => ...,
5217
+ * // }
5218
+ */
5219
+ type PluginGetters<Plugin extends {
5220
+ new (...args: unknown[]): any;
5221
+ getters: readonly string[];
5222
+ }> = Pick<InstanceType<Plugin>, GetterNames<Plugin>>;
4849
5223
  type RangeAdapterGetters = Pick<RangeAdapter, GetterNames<typeof RangeAdapter>>;
4850
- type ConditionalFormatGetters = Pick<ConditionalFormatPlugin, GetterNames<typeof ConditionalFormatPlugin>>;
4851
- type LocalHistoryGetters = Pick<HistoryPlugin, GetterNames<typeof HistoryPlugin>>;
4852
- type FiltersGetters = Pick<FiltersPlugin, GetterNames<typeof FiltersPlugin>>;
4853
- type SettingsGetters = Pick<SettingsPlugin, GetterNames<typeof SettingsPlugin>>;
4854
- type CoreGetters = SheetGetters & HeaderSizeGetters & HeaderVisibilityGetters & CellGetters & MergeGetters & BordersGetters & ChartGetters & ImageGetters & ConditionalFormatGetters & FigureGetters & RangeAdapterGetters & FiltersGetters & SettingsGetters;
4855
- type AutofillGetters = Pick<AutofillPlugin, GetterNames<typeof AutofillPlugin>>;
4856
- type AutomaticSumGetters = Pick<AutomaticSumPlugin, GetterNames<typeof AutomaticSumPlugin>>;
4857
- type ClipboardGetters = Pick<ClipboardPlugin, GetterNames<typeof ClipboardPlugin>>;
4858
- type EditionGetters = Pick<EditionPlugin, GetterNames<typeof EditionPlugin>>;
4859
- type EvaluationGetters = Pick<EvaluationPlugin, GetterNames<typeof EvaluationPlugin>>;
4860
- type EvaluationChartGetters = Pick<EvaluationChartPlugin, GetterNames<typeof EvaluationChartPlugin>>;
4861
- type EvaluationConditionalFormatGetters = Pick<EvaluationConditionalFormatPlugin, GetterNames<typeof EvaluationConditionalFormatPlugin>>;
4862
- type FindAndReplaceGetters = Pick<FindAndReplacePlugin, GetterNames<typeof FindAndReplacePlugin>>;
4863
- type HeaderVisibilityIUIGetters = Pick<HeaderVisibilityUIPlugin, GetterNames<typeof HeaderVisibilityUIPlugin>>;
4864
- type HighlightGetters = Pick<HighlightPlugin, GetterNames<typeof HighlightPlugin>>;
4865
- type CustomColorsGetters = Pick<CustomColorsPlugin, GetterNames<typeof CustomColorsPlugin>>;
4866
- type RendererGetters = Pick<RendererPlugin, GetterNames<typeof RendererPlugin>>;
4867
- type SelectionGetters = Pick<GridSelectionPlugin, GetterNames<typeof GridSelectionPlugin>>;
4868
- type SelectionInputGetters = Pick<SelectionInputsManagerPlugin, GetterNames<typeof SelectionInputsManagerPlugin>>;
4869
- type CollaborativeGetters = Pick<CollaborativePlugin, GetterNames<typeof CollaborativePlugin>>;
4870
- type SortGetters = Pick<SortPlugin, GetterNames<typeof SortPlugin>>;
4871
- type UIOptionsGetters = Pick<UIOptionsPlugin, GetterNames<typeof UIOptionsPlugin>>;
4872
- type SheetUIGetters = Pick<SheetUIPlugin, GetterNames<typeof SheetUIPlugin>>;
4873
- type ViewportGetters = Pick<SheetViewPlugin, GetterNames<typeof SheetViewPlugin>>;
4874
- type CellPopoverPluginGetters = Pick<CellPopoverPlugin, GetterNames<typeof CellPopoverPlugin>>;
4875
- type FilterEvaluationGetters = Pick<FilterEvaluationPlugin, GetterNames<typeof FilterEvaluationPlugin>>;
4876
- type SplitToColumnsGetters = Pick<SplitToColumnsPlugin, GetterNames<typeof SplitToColumnsPlugin>>;
4877
- type UIRowSizeGetters = Pick<UIRowSizePlugin, GetterNames<typeof UIRowSizePlugin>>;
5224
+ type CoreGetters = PluginGetters<typeof SheetPlugin> & PluginGetters<typeof HeaderSizePlugin> & PluginGetters<typeof HeaderVisibilityPlugin> & PluginGetters<typeof CellPlugin> & PluginGetters<typeof MergePlugin> & PluginGetters<typeof BordersPlugin> & PluginGetters<typeof ChartPlugin> & PluginGetters<typeof ImagePlugin> & PluginGetters<typeof FigurePlugin> & RangeAdapterGetters & PluginGetters<typeof ConditionalFormatPlugin> & PluginGetters<typeof FiltersPlugin> & PluginGetters<typeof SettingsPlugin> & PluginGetters<typeof HeaderGroupingPlugin> & PluginGetters<typeof DataValidationPlugin>;
4878
5225
  type Getters = {
4879
5226
  isReadonly: () => boolean;
4880
5227
  isDashboard: () => boolean;
4881
- } & LocalHistoryGetters & CoreGetters & AutofillGetters & AutomaticSumGetters & ClipboardGetters & EditionGetters & EvaluationGetters & EvaluationChartGetters & EvaluationConditionalFormatGetters & FindAndReplaceGetters & HighlightGetters & CustomColorsGetters & RendererGetters & SelectionGetters & SelectionInputGetters & CollaborativeGetters & SortGetters & UIOptionsGetters & SheetUIGetters & ViewportGetters & CellPopoverPluginGetters & FilterEvaluationGetters & HeaderVisibilityIUIGetters & SplitToColumnsGetters & UIRowSizeGetters;
5228
+ } & CoreGetters & PluginGetters<typeof AutofillPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EditionPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof FindAndReplacePlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof HighlightPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof RendererPlugin> & PluginGetters<typeof GridSelectionPlugin> & PluginGetters<typeof SelectionInputsManagerPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof SheetViewPlugin> & PluginGetters<typeof CellPopoverPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof UIRowSizePlugin> & PluginGetters<typeof EvaluationDataValidationPlugin>;
4882
5229
 
4883
5230
  interface HistoryChange {
4884
5231
  root: any;
@@ -4908,9 +5255,6 @@ interface TransformationFactory<T = unknown> {
4908
5255
  with: (operation: T) => Transformation<T>;
4909
5256
  }
4910
5257
 
4911
- type SelectionDirection = "up" | "down" | "left" | "right";
4912
- type SelectionStep = number | "end";
4913
-
4914
5258
  type CellPopoverType = "ErrorToolTip" | "LinkDisplay" | "FilterMenu" | "LinkEditor";
4915
5259
  type PopoverPropsPosition = "TopRight" | "BottomLeft";
4916
5260
  type MaxSizedComponentConstructor = ComponentConstructor & {
@@ -5060,7 +5404,7 @@ interface ChartBuilder {
5060
5404
  sequence: number;
5061
5405
  }
5062
5406
 
5063
- interface Props$F {
5407
+ interface Props$K {
5064
5408
  ranges: () => string[];
5065
5409
  hasSingleRange?: boolean;
5066
5410
  required?: boolean;
@@ -5082,7 +5426,7 @@ interface SelectionRange extends Omit<RangeInputValue, "color"> {
5082
5426
  * onSelectionChanged is called every time the input value
5083
5427
  * changes.
5084
5428
  */
5085
- declare class SelectionInput extends Component<Props$F, SpreadsheetChildEnv> {
5429
+ declare class SelectionInput extends Component<Props$K, SpreadsheetChildEnv> {
5086
5430
  static template: string;
5087
5431
  private id;
5088
5432
  private previousRanges;
@@ -5111,26 +5455,26 @@ declare class SelectionInput extends Component<Props$F, SpreadsheetChildEnv> {
5111
5455
  confirm(): void;
5112
5456
  }
5113
5457
 
5114
- interface Props$E {
5458
+ interface Props$J {
5115
5459
  messages: string[];
5116
5460
  msgType: "warning" | "error";
5117
5461
  }
5118
- declare class SidePanelErrors extends Component<Props$E, SpreadsheetChildEnv> {
5462
+ declare class ValidationMessages extends Component<Props$J, SpreadsheetChildEnv> {
5119
5463
  static template: string;
5120
- get divClasses(): "o-sidepanel-warning text-warning" | "o-sidepanel-error text-danger";
5464
+ get divClasses(): "o-validation-warning text-warning" | "o-validation-error text-danger";
5121
5465
  }
5122
5466
 
5123
- interface Props$D {
5467
+ interface Props$I {
5124
5468
  figureId: UID;
5125
5469
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
5126
5470
  canUpdateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5127
5471
  updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5128
5472
  }
5129
- declare class LineBarPieConfigPanel extends Component<Props$D, SpreadsheetChildEnv> {
5473
+ declare class LineBarPieConfigPanel extends Component<Props$I, SpreadsheetChildEnv> {
5130
5474
  static template: string;
5131
5475
  static components: {
5132
5476
  SelectionInput: typeof SelectionInput;
5133
- SidePanelErrors: typeof SidePanelErrors;
5477
+ ValidationMessages: typeof ValidationMessages;
5134
5478
  };
5135
5479
  private state;
5136
5480
  private dataSeriesRanges;
@@ -5167,6 +5511,7 @@ declare class BarConfigPanel extends LineBarPieConfigPanel {
5167
5511
  declare enum ComponentsImportance {
5168
5512
  Grid = 0,
5169
5513
  Highlight = 5,
5514
+ HeaderGroupingButton = 6,
5170
5515
  Figure = 10,
5171
5516
  ScrollBar = 15,
5172
5517
  GridPopover = 19,
@@ -5254,7 +5599,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
5254
5599
  isSameColor(color1: Color, color2: Color): boolean;
5255
5600
  }
5256
5601
 
5257
- interface Props$C {
5602
+ interface Props$H {
5258
5603
  currentColor: string | undefined;
5259
5604
  toggleColorPicker: () => void;
5260
5605
  showColorPicker: boolean;
@@ -5265,7 +5610,7 @@ interface Props$C {
5265
5610
  dropdownMaxHeight?: Pixel;
5266
5611
  class?: string;
5267
5612
  }
5268
- declare class ColorPickerWidget extends Component<Props$C, SpreadsheetChildEnv> {
5613
+ declare class ColorPickerWidget extends Component<Props$H, SpreadsheetChildEnv> {
5269
5614
  static template: string;
5270
5615
  static components: {
5271
5616
  ColorPicker: typeof ColorPicker;
@@ -5277,13 +5622,13 @@ declare class ColorPickerWidget extends Component<Props$C, SpreadsheetChildEnv>
5277
5622
  get colorPickerAnchorRect(): Rect;
5278
5623
  }
5279
5624
 
5280
- interface Props$B {
5625
+ interface Props$G {
5281
5626
  figureId: UID;
5282
5627
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
5283
5628
  canUpdateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5284
5629
  updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5285
5630
  }
5286
- declare class LineBarPieDesignPanel extends Component<Props$B, SpreadsheetChildEnv> {
5631
+ declare class LineBarPieDesignPanel extends Component<Props$G, SpreadsheetChildEnv> {
5287
5632
  static template: string;
5288
5633
  static components: {
5289
5634
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5297,17 +5642,17 @@ declare class LineBarPieDesignPanel extends Component<Props$B, SpreadsheetChildE
5297
5642
  updateSelect(attr: string, ev: any): void;
5298
5643
  }
5299
5644
 
5300
- interface Props$A {
5645
+ interface Props$F {
5301
5646
  figureId: UID;
5302
5647
  definition: GaugeChartDefinition;
5303
5648
  canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5304
5649
  updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5305
5650
  }
5306
- declare class GaugeChartConfigPanel extends Component<Props$A, SpreadsheetChildEnv> {
5651
+ declare class GaugeChartConfigPanel extends Component<Props$F, SpreadsheetChildEnv> {
5307
5652
  static template: string;
5308
5653
  static components: {
5309
5654
  SelectionInput: typeof SelectionInput;
5310
- SidePanelErrors: typeof SidePanelErrors;
5655
+ ValidationMessages: typeof ValidationMessages;
5311
5656
  };
5312
5657
  private state;
5313
5658
  private dataRange;
@@ -5319,17 +5664,17 @@ declare class GaugeChartConfigPanel extends Component<Props$A, SpreadsheetChildE
5319
5664
  }
5320
5665
 
5321
5666
  type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
5322
- interface Props$z {
5667
+ interface Props$E {
5323
5668
  figureId: UID;
5324
5669
  definition: GaugeChartDefinition;
5325
5670
  canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5326
5671
  updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5327
5672
  }
5328
- declare class GaugeChartDesignPanel extends Component<Props$z, SpreadsheetChildEnv> {
5673
+ declare class GaugeChartDesignPanel extends Component<Props$E, SpreadsheetChildEnv> {
5329
5674
  static template: string;
5330
5675
  static components: {
5331
5676
  ColorPickerWidget: typeof ColorPickerWidget;
5332
- SidePanelErrors: typeof SidePanelErrors;
5677
+ ValidationMessages: typeof ValidationMessages;
5333
5678
  };
5334
5679
  private state;
5335
5680
  setup(): void;
@@ -5353,19 +5698,20 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
5353
5698
  onUpdateLabelsAsText(ev: any): void;
5354
5699
  onUpdateStacked(ev: any): void;
5355
5700
  onUpdateAggregated(ev: any): void;
5701
+ onUpdateCumulative(ev: any): void;
5356
5702
  }
5357
5703
 
5358
- interface Props$y {
5704
+ interface Props$D {
5359
5705
  figureId: UID;
5360
5706
  definition: ScorecardChartDefinition;
5361
5707
  canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5362
5708
  updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5363
5709
  }
5364
- declare class ScorecardChartConfigPanel extends Component<Props$y, SpreadsheetChildEnv> {
5710
+ declare class ScorecardChartConfigPanel extends Component<Props$D, SpreadsheetChildEnv> {
5365
5711
  static template: string;
5366
5712
  static components: {
5367
5713
  SelectionInput: typeof SelectionInput;
5368
- SidePanelErrors: typeof SidePanelErrors;
5714
+ ValidationMessages: typeof ValidationMessages;
5369
5715
  };
5370
5716
  private state;
5371
5717
  private keyValue;
@@ -5383,13 +5729,13 @@ declare class ScorecardChartConfigPanel extends Component<Props$y, SpreadsheetCh
5383
5729
  }
5384
5730
 
5385
5731
  type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
5386
- interface Props$x {
5732
+ interface Props$C {
5387
5733
  figureId: UID;
5388
5734
  definition: ScorecardChartDefinition;
5389
5735
  canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5390
5736
  updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5391
5737
  }
5392
- declare class ScorecardChartDesignPanel extends Component<Props$x, SpreadsheetChildEnv> {
5738
+ declare class ScorecardChartDesignPanel extends Component<Props$C, SpreadsheetChildEnv> {
5393
5739
  static template: string;
5394
5740
  static components: {
5395
5741
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5397,6 +5743,7 @@ declare class ScorecardChartDesignPanel extends Component<Props$x, SpreadsheetCh
5397
5743
  private state;
5398
5744
  setup(): void;
5399
5745
  updateTitle(): void;
5746
+ translate(term: any): string;
5400
5747
  updateBaselineDescr(ev: any): void;
5401
5748
  toggleColorPicker(colorPickerId: ColorPickerId): void;
5402
5749
  setColor(color: Color, colorPickerId: ColorPickerId): void;
@@ -5477,6 +5824,8 @@ interface Action {
5477
5824
  }
5478
5825
  type ActionBuilder = (env: SpreadsheetChildEnv) => ActionSpec[];
5479
5826
  type ActionChildren = (ActionSpec | ActionBuilder)[];
5827
+ declare function createActions(menuItems: ActionSpec[]): Action[];
5828
+ declare function createAction(item: ActionSpec): Action;
5480
5829
 
5481
5830
  /**
5482
5831
  * This registry is intended to map a type of figure (tag) to a class of
@@ -5530,10 +5879,12 @@ interface AutofillRule {
5530
5879
  sequence: number;
5531
5880
  }
5532
5881
 
5533
- interface Props$w {
5534
- figure: Figure;
5882
+ declare function transformRangeData(range: RangeData, executed: CoreCommand): RangeData | undefined;
5883
+
5884
+ interface Props$B {
5885
+ figureId: UID;
5535
5886
  }
5536
- declare class ChartJsComponent extends Component<Props$w, SpreadsheetChildEnv> {
5887
+ declare class ChartJsComponent extends Component<Props$B, SpreadsheetChildEnv> {
5537
5888
  static template: string;
5538
5889
  private canvas;
5539
5890
  private chart?;
@@ -5545,42 +5896,19 @@ declare class ChartJsComponent extends Component<Props$w, SpreadsheetChildEnv> {
5545
5896
  private updateChartJs;
5546
5897
  }
5547
5898
 
5548
- interface Props$v {
5549
- figure: Figure;
5899
+ interface Props$A {
5900
+ figureId: UID;
5550
5901
  }
5551
- declare class ScorecardChart extends Component<Props$v, SpreadsheetChildEnv> {
5902
+ declare class ScorecardChart extends Component<Props$A, SpreadsheetChildEnv> {
5552
5903
  static template: string;
5553
- private ctx;
5904
+ private canvas;
5554
5905
  get runtime(): ScorecardChartRuntime;
5555
- get title(): string;
5556
- get keyValue(): string;
5557
- get baseline(): string;
5558
- get baselineDescr(): string;
5559
- get baselineArrowDirection(): BaselineArrowDirection;
5560
- get backgroundColor(): Color;
5561
- get primaryFontColor(): Color;
5562
- get secondaryFontColor(): "#525252" | "#C8C8C8";
5563
- get figure(): Figure;
5564
- get chartStyle(): string;
5565
- get chartContentStyle(): string;
5566
- get chartPadding(): number;
5567
- getTextStyles(): {
5568
- titleStyle: string;
5569
- keyStyle: string;
5570
- baselineStyle: string;
5571
- baselineValueStyle: string;
5572
- baselineDescrStyle: string;
5573
- };
5574
- /** Return an CSS style string corresponding to the given arguments */
5575
- private getTextStyle;
5576
- /** Get the height of the chart minus all the vertical paddings */
5577
- private getDrawableHeight;
5578
- /** Return the element with he widest text in the chart */
5579
- private getWidestElement;
5906
+ setup(): void;
5907
+ private createChart;
5580
5908
  }
5581
5909
 
5582
5910
  type MenuItemOrSeparator = Action | "separator";
5583
- interface Props$u {
5911
+ interface Props$z {
5584
5912
  position: DOMCoordinates;
5585
5913
  menuItems: Action[];
5586
5914
  depth: number;
@@ -5596,7 +5924,7 @@ interface MenuState {
5596
5924
  scrollOffset?: Pixel;
5597
5925
  menuItems: Action[];
5598
5926
  }
5599
- declare class Menu extends Component<Props$u, SpreadsheetChildEnv> {
5927
+ declare class Menu extends Component<Props$z, SpreadsheetChildEnv> {
5600
5928
  static template: string;
5601
5929
  static components: {
5602
5930
  Menu: typeof Menu;
@@ -5634,14 +5962,14 @@ declare class Menu extends Component<Props$u, SpreadsheetChildEnv> {
5634
5962
  }
5635
5963
 
5636
5964
  type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
5637
- interface Props$t {
5965
+ interface Props$y {
5638
5966
  figure: Figure;
5639
5967
  style: string;
5640
5968
  onFigureDeleted: () => void;
5641
5969
  onMouseDown: (ev: MouseEvent) => void;
5642
5970
  onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
5643
5971
  }
5644
- declare class FigureComponent extends Component<Props$t, SpreadsheetChildEnv> {
5972
+ declare class FigureComponent extends Component<Props$y, SpreadsheetChildEnv> {
5645
5973
  static template: string;
5646
5974
  static components: {
5647
5975
  Menu: typeof Menu;
@@ -5671,11 +5999,11 @@ declare class FigureComponent extends Component<Props$t, SpreadsheetChildEnv> {
5671
5999
  private openContextMenu;
5672
6000
  }
5673
6001
 
5674
- interface Props$s {
5675
- figure: Figure;
6002
+ interface Props$x {
6003
+ figureId: UID;
5676
6004
  onFigureDeleted: () => void;
5677
6005
  }
5678
- declare class ChartFigure extends Component<Props$s, SpreadsheetChildEnv> {
6006
+ declare class ChartFigure extends Component<Props$x, SpreadsheetChildEnv> {
5679
6007
  static template: string;
5680
6008
  static components: {};
5681
6009
  onDoubleClick(): void;
@@ -5683,7 +6011,7 @@ declare class ChartFigure extends Component<Props$s, SpreadsheetChildEnv> {
5683
6011
  get chartComponent(): new (...args: any) => Component;
5684
6012
  }
5685
6013
 
5686
- interface Props$r {
6014
+ interface Props$w {
5687
6015
  isVisible: boolean;
5688
6016
  position: Position;
5689
6017
  }
@@ -5691,13 +6019,13 @@ interface Position {
5691
6019
  top: HeaderIndex;
5692
6020
  left: HeaderIndex;
5693
6021
  }
5694
- interface State$5 {
6022
+ interface State$6 {
5695
6023
  position: Position;
5696
6024
  handler: boolean;
5697
6025
  }
5698
- declare class Autofill extends Component<Props$r, SpreadsheetChildEnv> {
6026
+ declare class Autofill extends Component<Props$w, SpreadsheetChildEnv> {
5699
6027
  static template: string;
5700
- state: State$5;
6028
+ state: State$6;
5701
6029
  get style(): string;
5702
6030
  get handlerStyle(): string;
5703
6031
  get styleNextValue(): string;
@@ -5769,13 +6097,13 @@ declare class Ripple extends Component<RippleProps, SpreadsheetChildEnv> {
5769
6097
  getRippleEffectProps(id: number): RippleEffectProps;
5770
6098
  }
5771
6099
 
5772
- interface Props$q {
6100
+ interface Props$v {
5773
6101
  sheetId: string;
5774
6102
  openContextMenu: (registry: MenuItemRegistry, ev: MouseEvent) => void;
5775
6103
  style?: string;
5776
6104
  onMouseDown: (ev: MouseEvent) => void;
5777
6105
  }
5778
- declare class BottomBarSheet extends Component<Props$q, SpreadsheetChildEnv> {
6106
+ declare class BottomBarSheet extends Component<Props$v, SpreadsheetChildEnv> {
5779
6107
  static template: string;
5780
6108
  static components: {
5781
6109
  Ripple: typeof Ripple;
@@ -5809,11 +6137,11 @@ declare class BottomBarSheet extends Component<Props$q, SpreadsheetChildEnv> {
5809
6137
  get sheetName(): string;
5810
6138
  }
5811
6139
 
5812
- interface Props$p {
6140
+ interface Props$u {
5813
6141
  openContextMenu: (x: number, y: number, registry: MenuItemRegistry) => void;
5814
6142
  closeContextMenu: () => void;
5815
6143
  }
5816
- declare class BottomBarStatistic extends Component<Props$p, SpreadsheetChildEnv> {
6144
+ declare class BottomBarStatistic extends Component<Props$u, SpreadsheetChildEnv> {
5817
6145
  static template: string;
5818
6146
  static components: {
5819
6147
  Ripple: typeof Ripple;
@@ -5830,18 +6158,13 @@ interface BottomBarSheetItem {
5830
6158
  id: UID;
5831
6159
  name: string;
5832
6160
  }
5833
- interface SheetState {
5834
- sheetList: BottomBarSheetItem[];
5835
- isDnd: boolean;
5836
- sheetDndPositions: Record<UID, number> | undefined;
5837
- }
5838
- interface Props$o {
6161
+ interface Props$t {
5839
6162
  onClick: () => void;
5840
6163
  }
5841
6164
  interface BottomBarMenuState extends MenuState {
5842
6165
  menuId: UID | undefined;
5843
6166
  }
5844
- declare class BottomBar extends Component<Props$o, SpreadsheetChildEnv> {
6167
+ declare class BottomBar extends Component<Props$t, SpreadsheetChildEnv> {
5845
6168
  static template: string;
5846
6169
  static components: {
5847
6170
  Menu: typeof Menu;
@@ -5851,17 +6174,15 @@ declare class BottomBar extends Component<Props$o, SpreadsheetChildEnv> {
5851
6174
  };
5852
6175
  private bottomBarRef;
5853
6176
  private sheetListRef;
5854
- private dndHelper;
6177
+ private dragAndDrop;
5855
6178
  private targetScroll;
5856
6179
  private state;
5857
6180
  menuMaxHeight: number;
5858
6181
  menuState: BottomBarMenuState;
5859
- sheetState: SheetState;
6182
+ sheetList: BottomBarSheetItem[];
5860
6183
  setup(): void;
5861
- isDragged(sheetId: UID): boolean;
5862
6184
  clickAddSheet(ev: MouseEvent): void;
5863
- private getVisibleSheets;
5864
- getSheets(): BottomBarSheetItem[];
6185
+ getVisibleSheets(): BottomBarSheetItem[];
5865
6186
  clickListSheets(ev: MouseEvent): void;
5866
6187
  openContextMenu(x: Pixel, y: Pixel, menuId: UID, registry: MenuItemRegistry): void;
5867
6188
  onSheetContextMenu(sheetId: UID, registry: MenuItemRegistry, ev: MenuMouseEvent): void;
@@ -5876,32 +6197,44 @@ declare class BottomBar extends Component<Props$o, SpreadsheetChildEnv> {
5876
6197
  onSheetMouseDown(sheetId: UID, event: MouseEvent): void;
5877
6198
  private onDragEnd;
5878
6199
  getSheetStyle(sheetId: UID): string;
5879
- private stopDragging;
5880
6200
  private getSheetItemRects;
5881
- getSheetClasses(sheetId: UID): string;
5882
6201
  get sheetListCurrentScroll(): number;
5883
6202
  get sheetListWidth(): number;
5884
6203
  get sheetListMaxScroll(): number;
5885
6204
  }
5886
6205
 
5887
- interface Props$n {
5888
- position: DOMCoordinates;
5889
- isActive: boolean;
5890
- onClick: () => void;
6206
+ interface GridCellIconProps {
6207
+ cellPosition: CellPosition;
6208
+ horizontalAlign?: Align;
6209
+ verticalAlign?: VerticalAlign;
6210
+ offset?: DOMCoordinates;
5891
6211
  }
5892
- declare class FilterIcon extends Component<Props$n, SpreadsheetEnv> {
6212
+ declare class GridCellIcon extends Component<GridCellIconProps, SpreadsheetChildEnv> {
5893
6213
  static style: string;
5894
6214
  static template: string;
5895
- get style(): string;
6215
+ get iconStyle(): string;
6216
+ private getIconVerticalPosition;
6217
+ private getIconHorizontalPosition;
6218
+ isPositionVisible(position: CellPosition): boolean;
5896
6219
  }
5897
6220
 
5898
- interface Props$m {
5899
- gridPosition: DOMCoordinates;
6221
+ interface Props$s {
6222
+ cellPosition: CellPosition;
5900
6223
  }
5901
- declare class FilterIconsOverlay extends Component<Props$m, SpreadsheetChildEnv> {
6224
+ declare class FilterIcon extends Component<Props$s, SpreadsheetChildEnv> {
5902
6225
  static style: string;
6226
+ static template: string;
6227
+ onClick(): void;
6228
+ get isFilterActive(): boolean;
6229
+ }
6230
+
6231
+ interface Props$r {
6232
+ gridPosition: DOMCoordinates;
6233
+ }
6234
+ declare class FilterIconsOverlay extends Component<Props$r, SpreadsheetChildEnv> {
5903
6235
  static template: string;
5904
6236
  static components: {
6237
+ GridCellIcon: typeof GridCellIcon;
5905
6238
  FilterIcon: typeof FilterIcon;
5906
6239
  };
5907
6240
  static defaultProps: {
@@ -5910,12 +6243,36 @@ declare class FilterIconsOverlay extends Component<Props$m, SpreadsheetChildEnv>
5910
6243
  y: number;
5911
6244
  };
5912
6245
  };
5913
- getVisibleFilterHeaders(): Position$1[];
5914
- getFilterHeaderPosition(position: Position$1): DOMCoordinates;
5915
- private getIconVerticalPosition;
5916
- isFilterActive(position: Position$1): boolean;
5917
- toggleFilterMenu(position: Position$1): void;
5918
- private isPositionVisible;
6246
+ getFilterHeadersPositions(): CellPosition[];
6247
+ }
6248
+
6249
+ interface Props$q {
6250
+ cellPosition: CellPosition;
6251
+ }
6252
+ declare class DataValidationCheckbox extends Component<Props$q, SpreadsheetChildEnv> {
6253
+ static template: string;
6254
+ onCheckboxChange(ev: Event): void;
6255
+ get checkBoxValue(): boolean;
6256
+ get isDisabled(): boolean;
6257
+ }
6258
+
6259
+ interface Props$p {
6260
+ cellPosition: CellPosition;
6261
+ }
6262
+ declare class DataValidationListIcon extends Component<Props$p, SpreadsheetChildEnv> {
6263
+ static template: string;
6264
+ onClick(): void;
6265
+ }
6266
+
6267
+ declare class DataValidationOverlay extends Component<{}, SpreadsheetChildEnv> {
6268
+ static template: string;
6269
+ static components: {
6270
+ GridCellIcon: typeof GridCellIcon;
6271
+ DataValidationCheckbox: typeof DataValidationCheckbox;
6272
+ DataValidationListIcon: typeof DataValidationListIcon;
6273
+ };
6274
+ get checkBoxCellPositions(): CellPosition[];
6275
+ get listIconsCellPositions(): CellPosition[];
5919
6276
  }
5920
6277
 
5921
6278
  type HFigureAxisType = "top" | "bottom" | "vCenter";
@@ -5928,7 +6285,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
5928
6285
  }
5929
6286
 
5930
6287
  type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
5931
- interface Props$l {
6288
+ interface Props$o {
5932
6289
  onFigureDeleted: () => void;
5933
6290
  }
5934
6291
  interface Container {
@@ -6007,7 +6364,7 @@ interface DndState {
6007
6364
  * that occurred during the drag & drop, and to position the figure on the correct pane.
6008
6365
  *
6009
6366
  */
6010
- declare class FiguresContainer extends Component<Props$l, SpreadsheetChildEnv> {
6367
+ declare class FiguresContainer extends Component<Props$o, SpreadsheetChildEnv> {
6011
6368
  static template: string;
6012
6369
  static components: {
6013
6370
  FigureComponent: typeof FigureComponent;
@@ -6039,7 +6396,31 @@ declare class FiguresContainer extends Component<Props$l, SpreadsheetChildEnv> {
6039
6396
  private getSnapLineStyle;
6040
6397
  }
6041
6398
 
6042
- interface Props$k {
6399
+ interface Props$n {
6400
+ focusGrid: () => void;
6401
+ }
6402
+ declare class GridAddRowsFooter extends Component<Props$n, SpreadsheetChildEnv> {
6403
+ static template: string;
6404
+ static components: {
6405
+ ValidationMessages: typeof ValidationMessages;
6406
+ };
6407
+ inputRef: {
6408
+ el: HTMLInputElement | null;
6409
+ };
6410
+ state: {
6411
+ inputValue: string;
6412
+ errorFlag: boolean;
6413
+ };
6414
+ setup(): void;
6415
+ get addRowsPosition(): string;
6416
+ get errorMessages(): string[];
6417
+ onKeydown(ev: KeyboardEvent): void;
6418
+ onInput(ev: InputEvent): void;
6419
+ onConfirm(): void;
6420
+ private onExternalClick;
6421
+ }
6422
+
6423
+ interface Props$m {
6043
6424
  onCellHovered: (position: Partial<Position$1>) => void;
6044
6425
  onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
6045
6426
  onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
@@ -6047,15 +6428,17 @@ interface Props$k {
6047
6428
  shiftKey: boolean;
6048
6429
  }) => void;
6049
6430
  onCellRightClicked: (col: HeaderIndex, row: HeaderIndex, coordinates: DOMCoordinates) => void;
6050
- onGridResized: (dimension: DOMDimension) => void;
6431
+ onGridResized: (dimension: Rect) => void;
6051
6432
  onGridMoved: (deltaX: Pixel, deltaY: Pixel) => void;
6052
6433
  gridOverlayDimensions: string;
6053
6434
  onFigureDeleted: () => void;
6054
6435
  }
6055
- declare class GridOverlay extends Component<Props$k, SpreadsheetChildEnv> {
6436
+ declare class GridOverlay extends Component<Props$m, SpreadsheetChildEnv> {
6056
6437
  static template: string;
6057
6438
  static components: {
6058
6439
  FiguresContainer: typeof FiguresContainer;
6440
+ DataValidationOverlay: typeof DataValidationOverlay;
6441
+ GridAddRowsFooter: typeof GridAddRowsFooter;
6059
6442
  };
6060
6443
  static defaultProps: {
6061
6444
  onCellHovered: () => void;
@@ -6066,6 +6449,7 @@ declare class GridOverlay extends Component<Props$k, SpreadsheetChildEnv> {
6066
6449
  onFigureDeleted: () => void;
6067
6450
  };
6068
6451
  private gridOverlay;
6452
+ private gridOverlayRect;
6069
6453
  setup(): void;
6070
6454
  get gridOverlayEl(): HTMLElement;
6071
6455
  get style(): string;
@@ -6076,13 +6460,13 @@ declare class GridOverlay extends Component<Props$k, SpreadsheetChildEnv> {
6076
6460
  private getCartesianCoordinates;
6077
6461
  }
6078
6462
 
6079
- interface Props$j {
6463
+ interface Props$l {
6080
6464
  hoveredCell: Partial<Position$1>;
6081
6465
  gridRect: Rect;
6082
6466
  onClosePopover: () => void;
6083
6467
  onMouseWheel: (ev: WheelEvent) => void;
6084
6468
  }
6085
- declare class GridPopover extends Component<Props$j, SpreadsheetChildEnv> {
6469
+ declare class GridPopover extends Component<Props$l, SpreadsheetChildEnv> {
6086
6470
  static template: string;
6087
6471
  static components: {
6088
6472
  Popover: typeof Popover;
@@ -6093,7 +6477,7 @@ declare class GridPopover extends Component<Props$j, SpreadsheetChildEnv> {
6093
6477
 
6094
6478
  type ScrollDirection = "horizontal" | "vertical";
6095
6479
 
6096
- interface Props$i {
6480
+ interface Props$k {
6097
6481
  width: Pixel;
6098
6482
  height: Pixel;
6099
6483
  direction: ScrollDirection;
@@ -6101,7 +6485,7 @@ interface Props$i {
6101
6485
  offset: Pixel;
6102
6486
  onScroll: (offset: Pixel) => void;
6103
6487
  }
6104
- declare class ScrollBar extends Component<Props$i> {
6488
+ declare class ScrollBar extends Component<Props$k> {
6105
6489
  static template: string;
6106
6490
  static defaultProps: {
6107
6491
  width: number;
@@ -6115,10 +6499,10 @@ declare class ScrollBar extends Component<Props$i> {
6115
6499
  onScroll(ev: any): void;
6116
6500
  }
6117
6501
 
6118
- interface Props$h {
6502
+ interface Props$j {
6119
6503
  leftOffset: number;
6120
6504
  }
6121
- declare class HorizontalScrollBar extends Component<Props$h, SpreadsheetChildEnv> {
6505
+ declare class HorizontalScrollBar extends Component<Props$j, SpreadsheetChildEnv> {
6122
6506
  static components: {
6123
6507
  ScrollBar: typeof ScrollBar;
6124
6508
  };
@@ -6138,10 +6522,10 @@ declare class HorizontalScrollBar extends Component<Props$h, SpreadsheetChildEnv
6138
6522
  onScroll(offset: any): void;
6139
6523
  }
6140
6524
 
6141
- interface Props$g {
6525
+ interface Props$i {
6142
6526
  topOffset: number;
6143
6527
  }
6144
- declare class VerticalScrollBar extends Component<Props$g, SpreadsheetChildEnv> {
6528
+ declare class VerticalScrollBar extends Component<Props$i, SpreadsheetChildEnv> {
6145
6529
  static components: {
6146
6530
  ScrollBar: typeof ScrollBar;
6147
6531
  };
@@ -6161,7 +6545,7 @@ declare class VerticalScrollBar extends Component<Props$g, SpreadsheetChildEnv>
6161
6545
  onScroll(offset: any): void;
6162
6546
  }
6163
6547
 
6164
- interface Props$f {
6548
+ interface Props$h {
6165
6549
  }
6166
6550
  interface ClickableCell {
6167
6551
  coordinates: Rect;
@@ -6169,7 +6553,7 @@ interface ClickableCell {
6169
6553
  action: (position: CellPosition, env: SpreadsheetChildEnv) => void;
6170
6554
  tKey: string;
6171
6555
  }
6172
- declare class SpreadsheetDashboard extends Component<Props$f, SpreadsheetChildEnv> {
6556
+ declare class SpreadsheetDashboard extends Component<Props$h, SpreadsheetChildEnv> {
6173
6557
  static template: string;
6174
6558
  static components: {
6175
6559
  GridOverlay: typeof GridOverlay;
@@ -6205,17 +6589,77 @@ declare class SpreadsheetDashboard extends Component<Props$f, SpreadsheetChildEn
6205
6589
  private getGridRect;
6206
6590
  }
6207
6591
 
6592
+ interface Props$g {
6593
+ group: HeaderGroup;
6594
+ layerOffset: number;
6595
+ openContextMenu(position: DOMCoordinates, menuItems: Action[]): void;
6596
+ }
6597
+ interface GroupBox {
6598
+ groupRect: Rect;
6599
+ headerRect: Rect;
6600
+ isEndHidden: boolean;
6601
+ }
6602
+ declare abstract class AbstractHeaderGroup extends Component<Props$g, SpreadsheetChildEnv> {
6603
+ static template: string;
6604
+ abstract dimension: Dimension;
6605
+ toggleGroup(): void;
6606
+ get groupBoxStyle(): string;
6607
+ abstract get groupBorderStyle(): string;
6608
+ abstract get groupHeaderStyle(): string;
6609
+ get groupButtonStyle(): string;
6610
+ get groupButtonIcon(): string;
6611
+ get isGroupFolded(): boolean;
6612
+ /** The box that will be used to draw the header group. */
6613
+ abstract get groupBox(): GroupBox;
6614
+ onContextMenu(ev: MouseEvent): void;
6615
+ }
6616
+ declare class RowGroup extends AbstractHeaderGroup {
6617
+ dimension: Dimension;
6618
+ get groupBorderStyle(): string;
6619
+ get groupHeaderStyle(): string;
6620
+ get groupBox(): GroupBox;
6621
+ }
6622
+ declare class ColGroup extends AbstractHeaderGroup {
6623
+ dimension: Dimension;
6624
+ get groupBorderStyle(): string;
6625
+ get groupHeaderStyle(): string;
6626
+ get groupBox(): GroupBox;
6627
+ }
6628
+
6629
+ interface Props$f {
6630
+ dimension: Dimension;
6631
+ layers: HeaderGroup[][];
6632
+ }
6633
+ declare class HeaderGroupContainer extends Component<Props$f, SpreadsheetChildEnv> {
6634
+ static template: string;
6635
+ static components: {
6636
+ RowGroup: typeof RowGroup;
6637
+ ColGroup: typeof ColGroup;
6638
+ Menu: typeof Menu;
6639
+ };
6640
+ menu: MenuState;
6641
+ getLayerOffset(layerIndex: number): number;
6642
+ onContextMenu(event: MouseEvent): void;
6643
+ openContextMenu(position: DOMCoordinates, menuItems: Action[]): void;
6644
+ closeMenu(): void;
6645
+ get groupComponent(): typeof RowGroup;
6646
+ get hasFrozenPane(): boolean;
6647
+ get scrollContainerStyle(): string;
6648
+ get frozenPaneContainerStyle(): string;
6649
+ get frozenPaneContainerSize(): Pixel;
6650
+ }
6651
+
6208
6652
  interface Props$e {
6209
6653
  component: string;
6210
6654
  panelProps: any;
6211
6655
  onCloseSidePanel: () => void;
6212
6656
  }
6213
- interface State$4 {
6657
+ interface State$5 {
6214
6658
  panel: SidePanelContent;
6215
6659
  }
6216
6660
  declare class SidePanel extends Component<Props$e, SpreadsheetChildEnv> {
6217
6661
  static template: string;
6218
- state: State$4;
6662
+ state: State$5;
6219
6663
  setup(): void;
6220
6664
  getTitle(): string;
6221
6665
  }
@@ -6241,48 +6685,48 @@ declare const deleteCellShiftUp: ActionSpec;
6241
6685
  declare const deleteCellShiftLeft: ActionSpec;
6242
6686
  declare const mergeCells: ActionSpec;
6243
6687
 
6244
- declare const ACTION_EDIT_undo: typeof undo;
6245
- declare const ACTION_EDIT_redo: typeof redo;
6688
+ declare const ACTION_EDIT_clearCols: typeof clearCols;
6689
+ declare const ACTION_EDIT_clearRows: typeof clearRows;
6246
6690
  declare const ACTION_EDIT_copy: typeof copy;
6247
6691
  declare const ACTION_EDIT_cut: typeof cut;
6692
+ declare const ACTION_EDIT_deleteCellShiftLeft: typeof deleteCellShiftLeft;
6693
+ declare const ACTION_EDIT_deleteCellShiftUp: typeof deleteCellShiftUp;
6694
+ declare const ACTION_EDIT_deleteCells: typeof deleteCells;
6695
+ declare const ACTION_EDIT_deleteCol: typeof deleteCol;
6696
+ declare const ACTION_EDIT_deleteCols: typeof deleteCols;
6697
+ declare const ACTION_EDIT_deleteRow: typeof deleteRow;
6698
+ declare const ACTION_EDIT_deleteRows: typeof deleteRows;
6699
+ declare const ACTION_EDIT_deleteValues: typeof deleteValues;
6700
+ declare const ACTION_EDIT_findAndReplace: typeof findAndReplace;
6701
+ declare const ACTION_EDIT_mergeCells: typeof mergeCells;
6248
6702
  declare const ACTION_EDIT_paste: typeof paste;
6249
6703
  declare const ACTION_EDIT_pasteSpecial: typeof pasteSpecial;
6250
- declare const ACTION_EDIT_pasteSpecialValue: typeof pasteSpecialValue;
6251
6704
  declare const ACTION_EDIT_pasteSpecialFormat: typeof pasteSpecialFormat;
6252
- declare const ACTION_EDIT_findAndReplace: typeof findAndReplace;
6253
- declare const ACTION_EDIT_deleteValues: typeof deleteValues;
6254
- declare const ACTION_EDIT_deleteRows: typeof deleteRows;
6255
- declare const ACTION_EDIT_deleteRow: typeof deleteRow;
6256
- declare const ACTION_EDIT_clearRows: typeof clearRows;
6257
- declare const ACTION_EDIT_deleteCols: typeof deleteCols;
6258
- declare const ACTION_EDIT_deleteCol: typeof deleteCol;
6259
- declare const ACTION_EDIT_clearCols: typeof clearCols;
6260
- declare const ACTION_EDIT_deleteCells: typeof deleteCells;
6261
- declare const ACTION_EDIT_deleteCellShiftUp: typeof deleteCellShiftUp;
6262
- declare const ACTION_EDIT_deleteCellShiftLeft: typeof deleteCellShiftLeft;
6263
- declare const ACTION_EDIT_mergeCells: typeof mergeCells;
6705
+ declare const ACTION_EDIT_pasteSpecialValue: typeof pasteSpecialValue;
6706
+ declare const ACTION_EDIT_redo: typeof redo;
6707
+ declare const ACTION_EDIT_undo: typeof undo;
6264
6708
  declare namespace ACTION_EDIT {
6265
6709
  export {
6266
- ACTION_EDIT_undo as undo,
6267
- ACTION_EDIT_redo as redo,
6710
+ ACTION_EDIT_clearCols as clearCols,
6711
+ ACTION_EDIT_clearRows as clearRows,
6268
6712
  ACTION_EDIT_copy as copy,
6269
6713
  ACTION_EDIT_cut as cut,
6714
+ ACTION_EDIT_deleteCellShiftLeft as deleteCellShiftLeft,
6715
+ ACTION_EDIT_deleteCellShiftUp as deleteCellShiftUp,
6716
+ ACTION_EDIT_deleteCells as deleteCells,
6717
+ ACTION_EDIT_deleteCol as deleteCol,
6718
+ ACTION_EDIT_deleteCols as deleteCols,
6719
+ ACTION_EDIT_deleteRow as deleteRow,
6720
+ ACTION_EDIT_deleteRows as deleteRows,
6721
+ ACTION_EDIT_deleteValues as deleteValues,
6722
+ ACTION_EDIT_findAndReplace as findAndReplace,
6723
+ ACTION_EDIT_mergeCells as mergeCells,
6270
6724
  ACTION_EDIT_paste as paste,
6271
6725
  ACTION_EDIT_pasteSpecial as pasteSpecial,
6272
- ACTION_EDIT_pasteSpecialValue as pasteSpecialValue,
6273
6726
  ACTION_EDIT_pasteSpecialFormat as pasteSpecialFormat,
6274
- ACTION_EDIT_findAndReplace as findAndReplace,
6275
- ACTION_EDIT_deleteValues as deleteValues,
6276
- ACTION_EDIT_deleteRows as deleteRows,
6277
- ACTION_EDIT_deleteRow as deleteRow,
6278
- ACTION_EDIT_clearRows as clearRows,
6279
- ACTION_EDIT_deleteCols as deleteCols,
6280
- ACTION_EDIT_deleteCol as deleteCol,
6281
- ACTION_EDIT_clearCols as clearCols,
6282
- ACTION_EDIT_deleteCells as deleteCells,
6283
- ACTION_EDIT_deleteCellShiftUp as deleteCellShiftUp,
6284
- ACTION_EDIT_deleteCellShiftLeft as deleteCellShiftLeft,
6285
- ACTION_EDIT_mergeCells as mergeCells,
6727
+ ACTION_EDIT_pasteSpecialValue as pasteSpecialValue,
6728
+ ACTION_EDIT_redo as redo,
6729
+ ACTION_EDIT_undo as undo,
6286
6730
  };
6287
6731
  }
6288
6732
 
@@ -6297,6 +6741,14 @@ declare const formatNumberDate: ActionSpec;
6297
6741
  declare const formatNumberTime: ActionSpec;
6298
6742
  declare const formatNumberDateTime: ActionSpec;
6299
6743
  declare const formatNumberDuration: ActionSpec;
6744
+ declare const moreFormats: ActionSpec;
6745
+ declare const formatNumberFullDateTime: ActionSpec;
6746
+ declare const formatNumberFullWeekDayAndMonth: ActionSpec;
6747
+ declare const formatNumberDayAndFullMonth: ActionSpec;
6748
+ declare const formatNumberShortWeekDay: ActionSpec;
6749
+ declare const formatNumberDayAndShortMonth: ActionSpec;
6750
+ declare const formatNumberFullMonth: ActionSpec;
6751
+ declare const formatNumberShortMonth: ActionSpec;
6300
6752
  declare const incraseDecimalPlaces: ActionSpec;
6301
6753
  declare const decraseDecimalPlaces: ActionSpec;
6302
6754
  declare const formatBold: ActionSpec;
@@ -6323,80 +6775,96 @@ declare const fillColor: ActionSpec;
6323
6775
  declare const formatCF: ActionSpec;
6324
6776
  declare const clearFormat: ActionSpec;
6325
6777
 
6778
+ declare const ACTION_FORMAT_clearFormat: typeof clearFormat;
6779
+ declare const ACTION_FORMAT_decraseDecimalPlaces: typeof decraseDecimalPlaces;
6780
+ declare const ACTION_FORMAT_fillColor: typeof fillColor;
6781
+ declare const ACTION_FORMAT_formatAlignment: typeof formatAlignment;
6782
+ declare const ACTION_FORMAT_formatAlignmentBottom: typeof formatAlignmentBottom;
6783
+ declare const ACTION_FORMAT_formatAlignmentCenter: typeof formatAlignmentCenter;
6784
+ declare const ACTION_FORMAT_formatAlignmentHorizontal: typeof formatAlignmentHorizontal;
6785
+ declare const ACTION_FORMAT_formatAlignmentLeft: typeof formatAlignmentLeft;
6786
+ declare const ACTION_FORMAT_formatAlignmentMiddle: typeof formatAlignmentMiddle;
6787
+ declare const ACTION_FORMAT_formatAlignmentRight: typeof formatAlignmentRight;
6788
+ declare const ACTION_FORMAT_formatAlignmentTop: typeof formatAlignmentTop;
6789
+ declare const ACTION_FORMAT_formatAlignmentVertical: typeof formatAlignmentVertical;
6790
+ declare const ACTION_FORMAT_formatBold: typeof formatBold;
6791
+ declare const ACTION_FORMAT_formatCF: typeof formatCF;
6792
+ declare const ACTION_FORMAT_formatCustomCurrency: typeof formatCustomCurrency;
6793
+ declare const ACTION_FORMAT_formatFontSize: typeof formatFontSize;
6794
+ declare const ACTION_FORMAT_formatItalic: typeof formatItalic;
6326
6795
  declare const ACTION_FORMAT_formatNumberAutomatic: typeof formatNumberAutomatic;
6327
- declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
6328
- declare const ACTION_FORMAT_formatPercent: typeof formatPercent;
6329
- declare const ACTION_FORMAT_formatNumberPercent: typeof formatNumberPercent;
6330
6796
  declare const ACTION_FORMAT_formatNumberCurrency: typeof formatNumberCurrency;
6331
6797
  declare const ACTION_FORMAT_formatNumberCurrencyRounded: typeof formatNumberCurrencyRounded;
6332
- declare const ACTION_FORMAT_formatCustomCurrency: typeof formatCustomCurrency;
6333
6798
  declare const ACTION_FORMAT_formatNumberDate: typeof formatNumberDate;
6334
- declare const ACTION_FORMAT_formatNumberTime: typeof formatNumberTime;
6335
6799
  declare const ACTION_FORMAT_formatNumberDateTime: typeof formatNumberDateTime;
6800
+ declare const ACTION_FORMAT_formatNumberDayAndFullMonth: typeof formatNumberDayAndFullMonth;
6801
+ declare const ACTION_FORMAT_formatNumberDayAndShortMonth: typeof formatNumberDayAndShortMonth;
6336
6802
  declare const ACTION_FORMAT_formatNumberDuration: typeof formatNumberDuration;
6337
- declare const ACTION_FORMAT_incraseDecimalPlaces: typeof incraseDecimalPlaces;
6338
- declare const ACTION_FORMAT_decraseDecimalPlaces: typeof decraseDecimalPlaces;
6339
- declare const ACTION_FORMAT_formatBold: typeof formatBold;
6340
- declare const ACTION_FORMAT_formatItalic: typeof formatItalic;
6341
- declare const ACTION_FORMAT_formatUnderline: typeof formatUnderline;
6803
+ declare const ACTION_FORMAT_formatNumberFullDateTime: typeof formatNumberFullDateTime;
6804
+ declare const ACTION_FORMAT_formatNumberFullMonth: typeof formatNumberFullMonth;
6805
+ declare const ACTION_FORMAT_formatNumberFullWeekDayAndMonth: typeof formatNumberFullWeekDayAndMonth;
6806
+ declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
6807
+ declare const ACTION_FORMAT_formatNumberPercent: typeof formatNumberPercent;
6808
+ declare const ACTION_FORMAT_formatNumberShortMonth: typeof formatNumberShortMonth;
6809
+ declare const ACTION_FORMAT_formatNumberShortWeekDay: typeof formatNumberShortWeekDay;
6810
+ declare const ACTION_FORMAT_formatNumberTime: typeof formatNumberTime;
6811
+ declare const ACTION_FORMAT_formatPercent: typeof formatPercent;
6342
6812
  declare const ACTION_FORMAT_formatStrikethrough: typeof formatStrikethrough;
6343
- declare const ACTION_FORMAT_formatFontSize: typeof formatFontSize;
6344
- declare const ACTION_FORMAT_formatAlignment: typeof formatAlignment;
6345
- declare const ACTION_FORMAT_formatAlignmentHorizontal: typeof formatAlignmentHorizontal;
6346
- declare const ACTION_FORMAT_formatAlignmentLeft: typeof formatAlignmentLeft;
6347
- declare const ACTION_FORMAT_formatAlignmentCenter: typeof formatAlignmentCenter;
6348
- declare const ACTION_FORMAT_formatAlignmentRight: typeof formatAlignmentRight;
6349
- declare const ACTION_FORMAT_formatAlignmentVertical: typeof formatAlignmentVertical;
6350
- declare const ACTION_FORMAT_formatAlignmentTop: typeof formatAlignmentTop;
6351
- declare const ACTION_FORMAT_formatAlignmentMiddle: typeof formatAlignmentMiddle;
6352
- declare const ACTION_FORMAT_formatAlignmentBottom: typeof formatAlignmentBottom;
6353
- declare const ACTION_FORMAT_formatWrappingIcon: typeof formatWrappingIcon;
6813
+ declare const ACTION_FORMAT_formatUnderline: typeof formatUnderline;
6354
6814
  declare const ACTION_FORMAT_formatWrapping: typeof formatWrapping;
6815
+ declare const ACTION_FORMAT_formatWrappingClip: typeof formatWrappingClip;
6816
+ declare const ACTION_FORMAT_formatWrappingIcon: typeof formatWrappingIcon;
6355
6817
  declare const ACTION_FORMAT_formatWrappingOverflow: typeof formatWrappingOverflow;
6356
6818
  declare const ACTION_FORMAT_formatWrappingWrap: typeof formatWrappingWrap;
6357
- declare const ACTION_FORMAT_formatWrappingClip: typeof formatWrappingClip;
6819
+ declare const ACTION_FORMAT_incraseDecimalPlaces: typeof incraseDecimalPlaces;
6820
+ declare const ACTION_FORMAT_moreFormats: typeof moreFormats;
6358
6821
  declare const ACTION_FORMAT_textColor: typeof textColor;
6359
- declare const ACTION_FORMAT_fillColor: typeof fillColor;
6360
- declare const ACTION_FORMAT_formatCF: typeof formatCF;
6361
- declare const ACTION_FORMAT_clearFormat: typeof clearFormat;
6362
6822
  declare namespace ACTION_FORMAT {
6363
6823
  export {
6824
+ ACTION_FORMAT_clearFormat as clearFormat,
6825
+ ACTION_FORMAT_decraseDecimalPlaces as decraseDecimalPlaces,
6826
+ ACTION_FORMAT_fillColor as fillColor,
6827
+ ACTION_FORMAT_formatAlignment as formatAlignment,
6828
+ ACTION_FORMAT_formatAlignmentBottom as formatAlignmentBottom,
6829
+ ACTION_FORMAT_formatAlignmentCenter as formatAlignmentCenter,
6830
+ ACTION_FORMAT_formatAlignmentHorizontal as formatAlignmentHorizontal,
6831
+ ACTION_FORMAT_formatAlignmentLeft as formatAlignmentLeft,
6832
+ ACTION_FORMAT_formatAlignmentMiddle as formatAlignmentMiddle,
6833
+ ACTION_FORMAT_formatAlignmentRight as formatAlignmentRight,
6834
+ ACTION_FORMAT_formatAlignmentTop as formatAlignmentTop,
6835
+ ACTION_FORMAT_formatAlignmentVertical as formatAlignmentVertical,
6836
+ ACTION_FORMAT_formatBold as formatBold,
6837
+ ACTION_FORMAT_formatCF as formatCF,
6838
+ ACTION_FORMAT_formatCustomCurrency as formatCustomCurrency,
6839
+ ACTION_FORMAT_formatFontSize as formatFontSize,
6840
+ ACTION_FORMAT_formatItalic as formatItalic,
6364
6841
  ACTION_FORMAT_formatNumberAutomatic as formatNumberAutomatic,
6365
- ACTION_FORMAT_formatNumberNumber as formatNumberNumber,
6366
- ACTION_FORMAT_formatPercent as formatPercent,
6367
- ACTION_FORMAT_formatNumberPercent as formatNumberPercent,
6368
6842
  ACTION_FORMAT_formatNumberCurrency as formatNumberCurrency,
6369
6843
  ACTION_FORMAT_formatNumberCurrencyRounded as formatNumberCurrencyRounded,
6370
- ACTION_FORMAT_formatCustomCurrency as formatCustomCurrency,
6371
6844
  ACTION_FORMAT_formatNumberDate as formatNumberDate,
6372
- ACTION_FORMAT_formatNumberTime as formatNumberTime,
6373
6845
  ACTION_FORMAT_formatNumberDateTime as formatNumberDateTime,
6846
+ ACTION_FORMAT_formatNumberDayAndFullMonth as formatNumberDayAndFullMonth,
6847
+ ACTION_FORMAT_formatNumberDayAndShortMonth as formatNumberDayAndShortMonth,
6374
6848
  ACTION_FORMAT_formatNumberDuration as formatNumberDuration,
6375
- ACTION_FORMAT_incraseDecimalPlaces as incraseDecimalPlaces,
6376
- ACTION_FORMAT_decraseDecimalPlaces as decraseDecimalPlaces,
6377
- ACTION_FORMAT_formatBold as formatBold,
6378
- ACTION_FORMAT_formatItalic as formatItalic,
6379
- ACTION_FORMAT_formatUnderline as formatUnderline,
6849
+ ACTION_FORMAT_formatNumberFullDateTime as formatNumberFullDateTime,
6850
+ ACTION_FORMAT_formatNumberFullMonth as formatNumberFullMonth,
6851
+ ACTION_FORMAT_formatNumberFullWeekDayAndMonth as formatNumberFullWeekDayAndMonth,
6852
+ ACTION_FORMAT_formatNumberNumber as formatNumberNumber,
6853
+ ACTION_FORMAT_formatNumberPercent as formatNumberPercent,
6854
+ ACTION_FORMAT_formatNumberShortMonth as formatNumberShortMonth,
6855
+ ACTION_FORMAT_formatNumberShortWeekDay as formatNumberShortWeekDay,
6856
+ ACTION_FORMAT_formatNumberTime as formatNumberTime,
6857
+ ACTION_FORMAT_formatPercent as formatPercent,
6380
6858
  ACTION_FORMAT_formatStrikethrough as formatStrikethrough,
6381
- ACTION_FORMAT_formatFontSize as formatFontSize,
6382
- ACTION_FORMAT_formatAlignment as formatAlignment,
6383
- ACTION_FORMAT_formatAlignmentHorizontal as formatAlignmentHorizontal,
6384
- ACTION_FORMAT_formatAlignmentLeft as formatAlignmentLeft,
6385
- ACTION_FORMAT_formatAlignmentCenter as formatAlignmentCenter,
6386
- ACTION_FORMAT_formatAlignmentRight as formatAlignmentRight,
6387
- ACTION_FORMAT_formatAlignmentVertical as formatAlignmentVertical,
6388
- ACTION_FORMAT_formatAlignmentTop as formatAlignmentTop,
6389
- ACTION_FORMAT_formatAlignmentMiddle as formatAlignmentMiddle,
6390
- ACTION_FORMAT_formatAlignmentBottom as formatAlignmentBottom,
6391
- ACTION_FORMAT_formatWrappingIcon as formatWrappingIcon,
6859
+ ACTION_FORMAT_formatUnderline as formatUnderline,
6392
6860
  ACTION_FORMAT_formatWrapping as formatWrapping,
6861
+ ACTION_FORMAT_formatWrappingClip as formatWrappingClip,
6862
+ ACTION_FORMAT_formatWrappingIcon as formatWrappingIcon,
6393
6863
  ACTION_FORMAT_formatWrappingOverflow as formatWrappingOverflow,
6394
6864
  ACTION_FORMAT_formatWrappingWrap as formatWrappingWrap,
6395
- ACTION_FORMAT_formatWrappingClip as formatWrappingClip,
6865
+ ACTION_FORMAT_incraseDecimalPlaces as incraseDecimalPlaces,
6866
+ ACTION_FORMAT_moreFormats as moreFormats,
6396
6867
  ACTION_FORMAT_textColor as textColor,
6397
- ACTION_FORMAT_fillColor as fillColor,
6398
- ACTION_FORMAT_formatCF as formatCF,
6399
- ACTION_FORMAT_clearFormat as clearFormat,
6400
6868
  };
6401
6869
  }
6402
6870
 
@@ -6419,47 +6887,62 @@ declare const freezeCurrentCol: ActionSpec;
6419
6887
  declare const viewGridlines: ActionSpec;
6420
6888
  declare const viewFormulas: ActionSpec;
6421
6889
  declare const createRemoveFilter: ActionSpec;
6890
+ declare const groupColumns: ActionSpec;
6891
+ declare const groupRows: ActionSpec;
6892
+ declare const ungroupColumns: ActionSpec;
6893
+ declare const ungroupRows: ActionSpec;
6894
+ declare function canUngroupHeaders(env: SpreadsheetChildEnv, dimension: Dimension): boolean;
6422
6895
 
6896
+ declare const ACTION_VIEW_canUngroupHeaders: typeof canUngroupHeaders;
6897
+ declare const ACTION_VIEW_createRemoveFilter: typeof createRemoveFilter;
6898
+ declare const ACTION_VIEW_freezeCurrentCol: typeof freezeCurrentCol;
6899
+ declare const ACTION_VIEW_freezeCurrentRow: typeof freezeCurrentRow;
6900
+ declare const ACTION_VIEW_freezeFirstCol: typeof freezeFirstCol;
6901
+ declare const ACTION_VIEW_freezeFirstRow: typeof freezeFirstRow;
6902
+ declare const ACTION_VIEW_freezePane: typeof freezePane;
6903
+ declare const ACTION_VIEW_freezeSecondCol: typeof freezeSecondCol;
6904
+ declare const ACTION_VIEW_freezeSecondRow: typeof freezeSecondRow;
6905
+ declare const ACTION_VIEW_groupColumns: typeof groupColumns;
6906
+ declare const ACTION_VIEW_groupRows: typeof groupRows;
6423
6907
  declare const ACTION_VIEW_hideCols: typeof hideCols;
6424
- declare const ACTION_VIEW_unhideCols: typeof unhideCols;
6425
- declare const ACTION_VIEW_unhideAllCols: typeof unhideAllCols;
6426
6908
  declare const ACTION_VIEW_hideRows: typeof hideRows;
6427
- declare const ACTION_VIEW_unhideRows: typeof unhideRows;
6428
- declare const ACTION_VIEW_unhideAllRows: typeof unhideAllRows;
6909
+ declare const ACTION_VIEW_unFreezeCols: typeof unFreezeCols;
6429
6910
  declare const ACTION_VIEW_unFreezePane: typeof unFreezePane;
6430
- declare const ACTION_VIEW_freezePane: typeof freezePane;
6431
6911
  declare const ACTION_VIEW_unFreezeRows: typeof unFreezeRows;
6432
- declare const ACTION_VIEW_freezeFirstRow: typeof freezeFirstRow;
6433
- declare const ACTION_VIEW_freezeSecondRow: typeof freezeSecondRow;
6434
- declare const ACTION_VIEW_freezeCurrentRow: typeof freezeCurrentRow;
6435
- declare const ACTION_VIEW_unFreezeCols: typeof unFreezeCols;
6436
- declare const ACTION_VIEW_freezeFirstCol: typeof freezeFirstCol;
6437
- declare const ACTION_VIEW_freezeSecondCol: typeof freezeSecondCol;
6438
- declare const ACTION_VIEW_freezeCurrentCol: typeof freezeCurrentCol;
6439
- declare const ACTION_VIEW_viewGridlines: typeof viewGridlines;
6912
+ declare const ACTION_VIEW_ungroupColumns: typeof ungroupColumns;
6913
+ declare const ACTION_VIEW_ungroupRows: typeof ungroupRows;
6914
+ declare const ACTION_VIEW_unhideAllCols: typeof unhideAllCols;
6915
+ declare const ACTION_VIEW_unhideAllRows: typeof unhideAllRows;
6916
+ declare const ACTION_VIEW_unhideCols: typeof unhideCols;
6917
+ declare const ACTION_VIEW_unhideRows: typeof unhideRows;
6440
6918
  declare const ACTION_VIEW_viewFormulas: typeof viewFormulas;
6441
- declare const ACTION_VIEW_createRemoveFilter: typeof createRemoveFilter;
6919
+ declare const ACTION_VIEW_viewGridlines: typeof viewGridlines;
6442
6920
  declare namespace ACTION_VIEW {
6443
6921
  export {
6922
+ ACTION_VIEW_canUngroupHeaders as canUngroupHeaders,
6923
+ ACTION_VIEW_createRemoveFilter as createRemoveFilter,
6924
+ ACTION_VIEW_freezeCurrentCol as freezeCurrentCol,
6925
+ ACTION_VIEW_freezeCurrentRow as freezeCurrentRow,
6926
+ ACTION_VIEW_freezeFirstCol as freezeFirstCol,
6927
+ ACTION_VIEW_freezeFirstRow as freezeFirstRow,
6928
+ ACTION_VIEW_freezePane as freezePane,
6929
+ ACTION_VIEW_freezeSecondCol as freezeSecondCol,
6930
+ ACTION_VIEW_freezeSecondRow as freezeSecondRow,
6931
+ ACTION_VIEW_groupColumns as groupColumns,
6932
+ ACTION_VIEW_groupRows as groupRows,
6444
6933
  ACTION_VIEW_hideCols as hideCols,
6445
- ACTION_VIEW_unhideCols as unhideCols,
6446
- ACTION_VIEW_unhideAllCols as unhideAllCols,
6447
6934
  ACTION_VIEW_hideRows as hideRows,
6448
- ACTION_VIEW_unhideRows as unhideRows,
6449
- ACTION_VIEW_unhideAllRows as unhideAllRows,
6935
+ ACTION_VIEW_unFreezeCols as unFreezeCols,
6450
6936
  ACTION_VIEW_unFreezePane as unFreezePane,
6451
- ACTION_VIEW_freezePane as freezePane,
6452
6937
  ACTION_VIEW_unFreezeRows as unFreezeRows,
6453
- ACTION_VIEW_freezeFirstRow as freezeFirstRow,
6454
- ACTION_VIEW_freezeSecondRow as freezeSecondRow,
6455
- ACTION_VIEW_freezeCurrentRow as freezeCurrentRow,
6456
- ACTION_VIEW_unFreezeCols as unFreezeCols,
6457
- ACTION_VIEW_freezeFirstCol as freezeFirstCol,
6458
- ACTION_VIEW_freezeSecondCol as freezeSecondCol,
6459
- ACTION_VIEW_freezeCurrentCol as freezeCurrentCol,
6460
- ACTION_VIEW_viewGridlines as viewGridlines,
6938
+ ACTION_VIEW_ungroupColumns as ungroupColumns,
6939
+ ACTION_VIEW_ungroupRows as ungroupRows,
6940
+ ACTION_VIEW_unhideAllCols as unhideAllCols,
6941
+ ACTION_VIEW_unhideAllRows as unhideAllRows,
6942
+ ACTION_VIEW_unhideCols as unhideCols,
6943
+ ACTION_VIEW_unhideRows as unhideRows,
6461
6944
  ACTION_VIEW_viewFormulas as viewFormulas,
6462
- ACTION_VIEW_createRemoveFilter as createRemoveFilter,
6945
+ ACTION_VIEW_viewGridlines as viewGridlines,
6463
6946
  };
6464
6947
  }
6465
6948
 
@@ -6484,7 +6967,7 @@ declare class ActionButton extends Component<Props$d, SpreadsheetChildEnv> {
6484
6967
  }
6485
6968
 
6486
6969
  type Tool = "borderColorTool" | "borderTypeTool";
6487
- interface State$3 {
6970
+ interface State$4 {
6488
6971
  activeTool: Tool | undefined;
6489
6972
  }
6490
6973
  interface BorderEditorProps {
@@ -6509,7 +6992,7 @@ declare class BorderEditor extends Component<BorderEditorProps, SpreadsheetChild
6509
6992
  el: HTMLElement | null;
6510
6993
  };
6511
6994
  borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
6512
- state: State$3;
6995
+ state: State$4;
6513
6996
  toggleDropdownTool(tool: Tool): void;
6514
6997
  closeDropdown(): void;
6515
6998
  setBorderPosition(position: BorderPosition): void;
@@ -6527,7 +7010,7 @@ interface Props$c {
6527
7010
  dropdownMaxHeight?: Pixel;
6528
7011
  class?: string;
6529
7012
  }
6530
- interface State$2 {
7013
+ interface State$3 {
6531
7014
  currentColor: Color;
6532
7015
  currentStyle: BorderStyle;
6533
7016
  currentPosition: BorderPosition | undefined;
@@ -6540,7 +7023,7 @@ declare class BorderEditorWidget extends Component<Props$c, SpreadsheetChildEnv>
6540
7023
  borderEditorButtonRef: {
6541
7024
  el: HTMLElement | null;
6542
7025
  };
6543
- state: State$2;
7026
+ state: State$3;
6544
7027
  get borderEditorAnchorRect(): Rect;
6545
7028
  onBorderPositionPicked(position: BorderPosition): void;
6546
7029
  onBorderColorPicked(color: Color): void;
@@ -6550,8 +7033,10 @@ declare class BorderEditorWidget extends Component<Props$c, SpreadsheetChildEnv>
6550
7033
 
6551
7034
  interface Props$b {
6552
7035
  values: AutocompleteValue[];
6553
- selectedIndex: number;
7036
+ selectedIndex: number | undefined;
7037
+ getHtmlContent: (value: string) => string;
6554
7038
  onValueSelected: (value: string) => void;
7039
+ onValueHovered: (index: string) => void;
6555
7040
  }
6556
7041
  declare class TextValueProvider extends Component<Props$b> {
6557
7042
  static template: string;
@@ -6657,8 +7142,10 @@ interface ComposerState$1 {
6657
7142
  }
6658
7143
  interface AutoCompleteState {
6659
7144
  showProvider: boolean;
6660
- selectedIndex: number;
7145
+ selectedIndex: number | undefined;
6661
7146
  values: AutocompleteValue[];
7147
+ type: "function" | "dataValidation";
7148
+ getHtmlContent: (text: string) => HtmlContent[];
6662
7149
  }
6663
7150
  interface FunctionDescriptionState {
6664
7151
  showDescription: boolean;
@@ -6705,15 +7192,16 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
6705
7192
  onCompositionEnd(): void;
6706
7193
  onKeydown(ev: KeyboardEvent): void;
6707
7194
  onInput(ev: InputEvent): void;
6708
- onKeyup(): void;
6709
- showAutocomplete(searchTerm: string): void;
7195
+ onKeyup(ev: KeyboardEvent): void;
7196
+ showFunctionAutocomplete(searchTerm: string): void;
7197
+ updateAutoCompleteIndex(index: number): void;
6710
7198
  /**
6711
7199
  * This is required to ensure the content helper selection is
6712
7200
  * properly updated on "onclick" events. Depending on the browser,
6713
7201
  * the callback onClick from the composer will be executed before
6714
7202
  * the selection was updated in the dom, which means we capture an
6715
7203
  * wrong selection which is then forced upon the content helper on
6716
- * patchContent.
7204
+ * processContent.
6717
7205
  */
6718
7206
  onMousedown(ev: MouseEvent): void;
6719
7207
  onClick(): void;
@@ -6738,6 +7226,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
6738
7226
  */
6739
7227
  private processTokenAtCursor;
6740
7228
  private autoComplete;
7229
+ private showDataValidationAutocomplete;
6741
7230
  }
6742
7231
 
6743
7232
  interface Props$9 {
@@ -6753,7 +7242,7 @@ declare class TopBarComposer extends Component<Props$9, SpreadsheetChildEnv> {
6753
7242
  get containerStyle(): string;
6754
7243
  }
6755
7244
 
6756
- interface State$1 {
7245
+ interface State$2 {
6757
7246
  isOpen: boolean;
6758
7247
  }
6759
7248
  interface Props$8 {
@@ -6765,7 +7254,7 @@ declare class FontSizeEditor extends Component<Props$8, SpreadsheetChildEnv> {
6765
7254
  static template: string;
6766
7255
  static components: {};
6767
7256
  fontSizes: number[];
6768
- dropdown: State$1;
7257
+ dropdown: State$2;
6769
7258
  private inputRef;
6770
7259
  private rootEditorRef;
6771
7260
  setup(): void;
@@ -6790,7 +7279,7 @@ declare class PaintFormatButton extends Component<Props$7, SpreadsheetChildEnv>
6790
7279
  togglePaintFormat(): void;
6791
7280
  }
6792
7281
 
6793
- interface State {
7282
+ interface State$1 {
6794
7283
  menuState: MenuState;
6795
7284
  activeTool: string;
6796
7285
  fillColor: string;
@@ -6815,7 +7304,7 @@ declare class TopBar extends Component<Props$6, SpreadsheetChildEnv> {
6815
7304
  PaintFormatButton: typeof PaintFormatButton;
6816
7305
  BorderEditorWidget: typeof BorderEditorWidget;
6817
7306
  };
6818
- state: State;
7307
+ state: State$1;
6819
7308
  isSelectingMenu: boolean;
6820
7309
  openedEl: HTMLElement | null;
6821
7310
  menus: Action[];
@@ -6860,8 +7349,8 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
6860
7349
  BottomBar: typeof BottomBar;
6861
7350
  SidePanel: typeof SidePanel;
6862
7351
  SpreadsheetDashboard: typeof SpreadsheetDashboard;
7352
+ HeaderGroupContainer: typeof HeaderGroupContainer;
6863
7353
  };
6864
- static _t: (s: string) => string;
6865
7354
  sidePanel: SidePanelState;
6866
7355
  composer: ComposerState;
6867
7356
  private _focusGrid?;
@@ -6875,7 +7364,6 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
6875
7364
  private bindModelEvents;
6876
7365
  private unbindModelEvents;
6877
7366
  private checkViewportSize;
6878
- private onNotifyUI;
6879
7367
  openSidePanel(panel: string, panelProps: any): void;
6880
7368
  closeSidePanel(): void;
6881
7369
  toggleSidePanel(panel: string, panelProps: any): void;
@@ -6889,6 +7377,9 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
6889
7377
  */
6890
7378
  private setComposerContent;
6891
7379
  get gridHeight(): Pixel;
7380
+ get gridContainerStyle(): string;
7381
+ get rowLayers(): HeaderGroup[][];
7382
+ get colLayers(): HeaderGroup[][];
6892
7383
  }
6893
7384
 
6894
7385
  interface Props$5 {
@@ -7087,7 +7578,7 @@ declare class Highlight extends Component<Props$2, SpreadsheetChildEnv> {
7087
7578
  * - a horizontal resizer (to resize columns)
7088
7579
  * - a vertical resizer (same, for rows)
7089
7580
  */
7090
- type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER";
7581
+ type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER" | "GROUP_HEADERS" | "UNGROUP_HEADERS";
7091
7582
  interface Props$1 {
7092
7583
  sidePanelIsOpen: boolean;
7093
7584
  exposeFocus: (focus: () => void) => void;
@@ -7157,7 +7648,34 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
7157
7648
  private clearFormatting;
7158
7649
  private setHorizontalAlign;
7159
7650
  closeMenu(): void;
7651
+ private processHeaderGroupingKey;
7652
+ private processHeaderGroupingEventOnHeaders;
7653
+ private processHeaderGroupingEventOnWholeSheet;
7654
+ private processHeaderGroupingEventOnGrid;
7655
+ }
7656
+
7657
+ type Direction = "horizontal" | "vertical";
7658
+ interface DragAndDropItemsPartial {
7659
+ id: UID;
7660
+ size: Pixel;
7661
+ position: Pixel;
7160
7662
  }
7663
+ interface DndPartialArgs {
7664
+ draggedItemId: UID;
7665
+ initialMousePosition: Pixel;
7666
+ items: DragAndDropItemsPartial[];
7667
+ containerEl: HTMLElement;
7668
+ onChange?: () => void;
7669
+ onCancel?: () => void;
7670
+ onDragEnd?: (itemId: UID, indexAtEnd: Pixel) => void;
7671
+ }
7672
+ interface State {
7673
+ itemsStyle: Record<UID, string>;
7674
+ draggedItemId: UID | undefined;
7675
+ start: (direction: Direction, args: DndPartialArgs) => void;
7676
+ cancel: () => void;
7677
+ }
7678
+ declare function useDragAndDropListItems(): State;
7161
7679
 
7162
7680
  interface Props {
7163
7681
  onCloseSidePanel: () => void;
@@ -7196,7 +7714,7 @@ declare function chartFontColor(backgroundColor: Color | undefined): Color;
7196
7714
  /**
7197
7715
  * Get a default chart js configuration
7198
7716
  */
7199
- declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale }: LocaleFormat): ChartConfiguration;
7717
+ declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale }: LocaleFormat): Required<ChartConfiguration>;
7200
7718
  /** See https://www.chartjs.org/docs/latest/charts/area.html#filling-modes */
7201
7719
  declare function getFillingMode(index: number): "origin" | number;
7202
7720
 
@@ -7214,6 +7732,17 @@ declare function createEmptyExcelSheet(sheetId: UID, name: string): ExcelSheetDa
7214
7732
 
7215
7733
  declare function genericRepeat<T extends Command>(getters: Getters, command: T): T;
7216
7734
 
7735
+ type SprintfValues = (string | String | number)[] | [{
7736
+ [key: string]: string | number;
7737
+ }];
7738
+ type TranslationFunction = (string: string, ...values: SprintfValues) => string;
7739
+ /***
7740
+ * Allow to inject a translation function from outside o-spreadsheet.
7741
+ * @param tfn the function that will do the translation
7742
+ * @param loaded a function that returns true when the translation is loaded
7743
+ */
7744
+ declare function setTranslationMethod(tfn: TranslationFunction, loaded?: () => boolean): void;
7745
+
7217
7746
  /**
7218
7747
  * We export here all entities that needs to be accessed publicly by Odoo.
7219
7748
  *
@@ -7241,7 +7770,7 @@ declare const registries: {
7241
7770
  linkMenuRegistry: MenuItemRegistry;
7242
7771
  functionRegistry: {
7243
7772
  mapping: {
7244
- [key: string]: ComputeFunction<Arg, FunctionReturn>;
7773
+ [key: string]: ComputeFunction<Arg, ValueAndFormat | Matrix<ValueAndFormat>>;
7245
7774
  };
7246
7775
  add(name: string, addDescr: AddFunctionDescription): any;
7247
7776
  content: {
@@ -7296,8 +7825,10 @@ declare const helpers: {
7296
7825
  toString: typeof toString;
7297
7826
  toXC: typeof toXC;
7298
7827
  toZone: typeof toZone;
7828
+ toUnboundedZone: typeof toUnboundedZone;
7299
7829
  toCartesian: typeof toCartesian;
7300
7830
  numberToLetters: typeof numberToLetters;
7831
+ lettersToNumber: typeof lettersToNumber;
7301
7832
  UuidGenerator: typeof UuidGenerator;
7302
7833
  formatValue: typeof formatValue;
7303
7834
  createCurrencyFormat: typeof createCurrencyFormat;
@@ -7317,6 +7848,9 @@ declare const helpers: {
7317
7848
  isDefined: typeof isDefined;
7318
7849
  lazy: typeof lazy;
7319
7850
  genericRepeat: typeof genericRepeat;
7851
+ createAction: typeof createAction;
7852
+ createActions: typeof createActions;
7853
+ transformRangeData: typeof transformRangeData;
7320
7854
  };
7321
7855
  declare const links: {
7322
7856
  isMarkdownLink: typeof isMarkdownLink;
@@ -7341,10 +7875,17 @@ declare const components: {
7341
7875
  ScorecardChartConfigPanel: typeof ScorecardChartConfigPanel;
7342
7876
  ScorecardChartDesignPanel: typeof ScorecardChartDesignPanel;
7343
7877
  FigureComponent: typeof FigureComponent;
7878
+ Menu: typeof Menu;
7879
+ SelectionInput: typeof SelectionInput;
7880
+ };
7881
+ declare const hooks: {
7882
+ useDragAndDropListItems: typeof useDragAndDropListItems;
7883
+ };
7884
+ declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
7885
+ addFunction: (fName: string, fDescription: AddFunctionDescription) => any;
7344
7886
  };
7345
- declare function addFunction(functionName: string, functionDescription: FunctionDescription): void;
7346
7887
  declare const constants: {
7347
7888
  DEFAULT_LOCALE: Locale;
7348
7889
  };
7349
7890
 
7350
- export { AbstractChart, CancelledReason, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, TransportService, UIPlugin, __info__, addFunction, astToFormula, compile, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
7891
+ export { AbstractChart, CancelledReason, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, TransportService, UIPlugin, __info__, addFunction, astToFormula, compile, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };