@odoo/o-spreadsheet 15.0.0 → 15.2.0

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.
@@ -120,8 +120,9 @@ declare type TranslationFunction = (string: string, ...values: string[] | [{
120
120
  declare function setTranslationMethod(tfn: TranslationFunction): void;
121
121
 
122
122
  declare const functionCache: {
123
- [key: string]: CompiledFormula;
123
+ [key: string]: Omit<CompiledFormula, "dependencies" | "tokens">;
124
124
  };
125
+ declare function compile(formula: string): CompiledFormula;
125
126
 
126
127
  interface FunctionContext {
127
128
  parent: string;
@@ -146,22 +147,11 @@ interface EnrichedToken extends Token {
146
147
  functionContext?: FunctionContext;
147
148
  }
148
149
 
149
- /**
150
- * parses a formula (as a string) into the same formula,
151
- * but with the references to other cells as well as strings and numbers extracted
152
- *
153
- * =sum(a3:b1) + c3 --> =sum(|0|) + |1|
154
- *
155
- * = sum(a3, 5) --> =sum(|0|, |N1|)
156
- *
157
- * =CONCAT(CONCAT(1, "beta"), A1) --> =CONCAT(CONCAT(|N0|, |S1|), |2|)
158
- *
159
- * Strings and Numbers are marked with a prefix of their type (S and N) to be detected
160
- * as their normalized form by the parser as they won't be processed like the references by the compiler.
161
- *
162
- * @param formula
163
- */
164
- declare function normalize(formula: string): NormalizedFormula;
150
+ declare type TokenType = "OPERATOR" | "NUMBER" | "STRING" | "BOOLEAN" | "FUNCTION" | "SYMBOL" | "SPACE" | "DEBUGGER" | "COMMA" | "LEFT_PAREN" | "RIGHT_PAREN" | "REFERENCE" | "INVALID_REFERENCE" | "UNKNOWN";
151
+ interface Token {
152
+ type: TokenType;
153
+ value: string;
154
+ }
165
155
 
166
156
  interface ASTBase {
167
157
  debug?: boolean;
@@ -170,26 +160,14 @@ interface ASTNumber extends ASTBase {
170
160
  type: "NUMBER";
171
161
  value: number;
172
162
  }
173
- interface ASTNormalizedNumber extends ASTBase {
174
- type: "NORMALIZED_NUMBER";
175
- value: number;
176
- }
177
163
  interface ASTReference extends ASTBase {
178
164
  type: "REFERENCE";
179
165
  value: string;
180
166
  }
181
- interface ASTNormalizedReference extends ASTBase {
182
- type: "NORMALIZED_REFERENCE";
183
- value: number;
184
- }
185
167
  interface ASTString extends ASTBase {
186
168
  type: "STRING";
187
169
  value: string;
188
170
  }
189
- interface ASTNormalizedString extends ASTBase {
190
- type: "NORMALIZED_STRING";
191
- value: number;
192
- }
193
171
  interface ASTBoolean extends ASTBase {
194
172
  type: "BOOLEAN";
195
173
  value: boolean;
@@ -214,11 +192,11 @@ interface ASTUnknown extends ASTBase {
214
192
  type: "UNKNOWN";
215
193
  value: string;
216
194
  }
217
- declare type AST = ASTOperation | ASTUnaryOperation | ASTFuncall | ASTNumber | ASTBoolean | ASTString | ASTReference | ASTNormalizedReference | ASTNormalizedNumber | ASTNormalizedString | ASTUnknown;
195
+ declare type AST = ASTOperation | ASTUnaryOperation | ASTFuncall | ASTNumber | ASTBoolean | ASTString | ASTReference | ASTUnknown;
218
196
  /**
219
197
  * Parse an expression (as a string) into an AST.
220
198
  */
221
- declare function parse(str: NormalizedFormulaString): AST;
199
+ declare function parse(str: string): AST;
222
200
  /**
223
201
  * Allows to visit all nodes of an AST and apply a mapping function
224
202
  * to nodes of a specific type.
@@ -240,13 +218,7 @@ declare function convertAstNodes<T extends AST["type"]>(ast: AST, type: T, fn: (
240
218
  /**
241
219
  * Converts an ast formula to the corresponding string
242
220
  */
243
- declare function astToFormula(ast: AST, dependencies?: Dependencies): string;
244
-
245
- declare type TokenType = "OPERATOR" | "NUMBER" | "STRING" | "BOOLEAN" | "FUNCTION" | "SYMBOL" | "SPACE" | "DEBUGGER" | "COMMA" | "LEFT_PAREN" | "RIGHT_PAREN" | "REFERENCE" | "INVALID_REFERENCE" | "NORMALIZED_NUMBER" | "NORMALIZED_STRING" | "UNKNOWN";
246
- interface Token {
247
- type: TokenType;
248
- value: string;
249
- }
221
+ declare function astToFormula(ast: AST): string;
250
222
 
251
223
  interface FetchParams {
252
224
  forceFetch?: boolean;
@@ -333,146 +305,6 @@ declare abstract class DataSource<M, D> extends owl.core.EventBus {
333
305
  getLastUpdate(): number | undefined;
334
306
  }
335
307
 
336
- /**
337
- * https://docs.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/025ea6e4-ad42-43ea-a016-16f4e4688ac8
338
- */
339
- interface ConditionalFormat {
340
- id: UID;
341
- rule: ConditionalFormatRule;
342
- stopIfTrue?: boolean;
343
- ranges: string[];
344
- }
345
- interface ConditionalFormatInternal extends Omit<ConditionalFormat, "ranges"> {
346
- ranges: Range[];
347
- }
348
- declare type ConditionalFormatRule = SingleColorRules | ColorScaleRule | IconSetRule;
349
- declare type SingleColorRules = CellIsRule;
350
- interface SingleColorRule {
351
- style: Style;
352
- }
353
- interface CellIsRule extends SingleColorRule {
354
- type: "CellIsRule";
355
- operator: ConditionalFormattingOperatorValues;
356
- values: string[];
357
- }
358
- declare type ThresholdType = "value" | "number" | "percentage" | "percentile" | "formula";
359
- declare type ColorScaleThreshold = {
360
- color: number;
361
- type: ThresholdType;
362
- value?: string;
363
- };
364
- declare type ColorScaleMidPointThreshold = {
365
- color: number;
366
- type: Exclude<ThresholdType, "value">;
367
- value: string;
368
- };
369
- declare type IconThreshold = {
370
- type: Exclude<ThresholdType, "value">;
371
- operator: "gt" | "ge";
372
- value: string;
373
- };
374
- interface ColorScaleRule {
375
- type: "ColorScaleRule";
376
- minimum: ColorScaleThreshold;
377
- maximum: ColorScaleThreshold;
378
- midpoint?: ColorScaleMidPointThreshold;
379
- }
380
- interface IconSet {
381
- upper: string;
382
- middle: string;
383
- lower: string;
384
- }
385
- interface IconSetRule {
386
- type: "IconSetRule";
387
- icons: IconSet;
388
- upperInflectionPoint: IconThreshold;
389
- lowerInflectionPoint: IconThreshold;
390
- }
391
- declare type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";
392
-
393
- interface Dependencies {
394
- references: string[];
395
- numbers: number[];
396
- strings: string[];
397
- }
398
- /**
399
- * Represents a string in which all range references, strings and numbers are
400
- * replaced by dependencies references.
401
- */
402
- declare type NormalizedFormulaString = string;
403
- declare type NormalizedFormula = {
404
- text: NormalizedFormulaString;
405
- dependencies: Dependencies;
406
- value?: any;
407
- };
408
- interface CellData {
409
- content?: string;
410
- style?: number;
411
- border?: number;
412
- format?: string;
413
- }
414
- interface HeaderData {
415
- size?: number;
416
- isHidden?: boolean;
417
- }
418
- interface FigureData<T> {
419
- id: UID;
420
- x: number;
421
- y: number;
422
- width: number;
423
- height: number;
424
- tag: string;
425
- data: T;
426
- }
427
- interface SheetData {
428
- id: string;
429
- name: string;
430
- colNumber: number;
431
- rowNumber: number;
432
- cells: {
433
- [key: string]: CellData | undefined;
434
- };
435
- merges: string[];
436
- figures: FigureData<any>[];
437
- cols: {
438
- [key: number]: HeaderData;
439
- };
440
- rows: {
441
- [key: number]: HeaderData;
442
- };
443
- conditionalFormats: ConditionalFormat[];
444
- areGridLinesVisible?: boolean;
445
- }
446
- interface WorkbookData {
447
- version: number;
448
- sheets: SheetData[];
449
- styles: {
450
- [key: number]: Style;
451
- };
452
- borders: {
453
- [key: number]: Border$1;
454
- };
455
- entities: {
456
- [key: string]: {
457
- [key: string]: any;
458
- };
459
- };
460
- revisionId: UID;
461
- }
462
- interface ExcelWorkbookData extends WorkbookData {
463
- sheets: ExcelSheetData[];
464
- }
465
- interface ExcelCellData extends CellData {
466
- value: CellValue;
467
- isFormula: Boolean;
468
- }
469
- interface ExcelSheetData extends SheetData {
470
- cells: {
471
- [key: string]: ExcelCellData | undefined;
472
- };
473
- charts: FigureData<ExcelChartDefinition>[];
474
- }
475
-
476
308
  declare type UID = string;
477
309
  interface Link {
478
310
  label: string;
@@ -506,7 +338,7 @@ interface Style {
506
338
  }
507
339
  interface UpdateCellData {
508
340
  content?: string;
509
- formula?: NormalizedFormula;
341
+ formula?: string;
510
342
  style?: Style | null;
511
343
  format?: string;
512
344
  }
@@ -546,9 +378,12 @@ declare type Range = {
546
378
  };
547
379
  declare type ReferenceDenormalizer = (position: number, references: Range[], sheetId: UID, isMeta: boolean, functionName: string, paramNumber: number) => any | any[][];
548
380
  declare type EnsureRange = (position: number, references: Range[], sheetId: UID) => any[][];
549
- declare type _CompiledFormula = (deps: CellDependencies, sheetId: UID, refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => any;
550
- interface CompiledFormula extends _CompiledFormula {
381
+ declare type _CompiledFormula = (deps: Range[], sheetId: UID, refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => any;
382
+ interface CompiledFormula {
383
+ execute: _CompiledFormula;
384
+ tokens: Token[];
551
385
  dependenciesFormat: (string | number)[];
386
+ dependencies: string[];
552
387
  }
553
388
  declare type ArgValue = CellValue | undefined;
554
389
  declare type ArgRange = ArgValue[][];
@@ -561,7 +396,7 @@ interface Header {
561
396
  isHidden?: boolean;
562
397
  }
563
398
  interface Row extends Header {
564
- cells: Record<number, Cell | undefined>;
399
+ cells: Record<number, UID | undefined>;
565
400
  }
566
401
  declare type Col = Header;
567
402
  interface Position$1 {
@@ -605,6 +440,134 @@ declare type Validation<T> = (toValidate: T) => CommandResult | CommandResult[];
605
440
  declare type ClipboardOptions = "onlyFormat" | "onlyValue";
606
441
  declare type Increment = 1 | -1 | 0;
607
442
 
443
+ /**
444
+ * https://docs.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/025ea6e4-ad42-43ea-a016-16f4e4688ac8
445
+ */
446
+ interface ConditionalFormat {
447
+ id: UID;
448
+ rule: ConditionalFormatRule;
449
+ stopIfTrue?: boolean;
450
+ ranges: string[];
451
+ }
452
+ interface ConditionalFormatInternal extends Omit<ConditionalFormat, "ranges"> {
453
+ ranges: Range[];
454
+ }
455
+ declare type ConditionalFormatRule = SingleColorRules | ColorScaleRule | IconSetRule;
456
+ declare type SingleColorRules = CellIsRule;
457
+ interface SingleColorRule {
458
+ style: Style;
459
+ }
460
+ interface CellIsRule extends SingleColorRule {
461
+ type: "CellIsRule";
462
+ operator: ConditionalFormattingOperatorValues;
463
+ values: string[];
464
+ }
465
+ declare type ThresholdType = "value" | "number" | "percentage" | "percentile" | "formula";
466
+ declare type ColorScaleThreshold = {
467
+ color: number;
468
+ type: ThresholdType;
469
+ value?: string;
470
+ };
471
+ declare type ColorScaleMidPointThreshold = {
472
+ color: number;
473
+ type: Exclude<ThresholdType, "value">;
474
+ value: string;
475
+ };
476
+ declare type IconThreshold = {
477
+ type: Exclude<ThresholdType, "value">;
478
+ operator: "gt" | "ge";
479
+ value: string;
480
+ };
481
+ interface ColorScaleRule {
482
+ type: "ColorScaleRule";
483
+ minimum: ColorScaleThreshold;
484
+ maximum: ColorScaleThreshold;
485
+ midpoint?: ColorScaleMidPointThreshold;
486
+ }
487
+ interface IconSet {
488
+ upper: string;
489
+ middle: string;
490
+ lower: string;
491
+ }
492
+ interface IconSetRule {
493
+ type: "IconSetRule";
494
+ icons: IconSet;
495
+ upperInflectionPoint: IconThreshold;
496
+ lowerInflectionPoint: IconThreshold;
497
+ }
498
+ declare type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";
499
+
500
+ interface CellData {
501
+ content?: string;
502
+ style?: number;
503
+ border?: number;
504
+ format?: number;
505
+ }
506
+ interface HeaderData {
507
+ size?: number;
508
+ isHidden?: boolean;
509
+ }
510
+ interface FigureData<T> {
511
+ id: UID;
512
+ x: number;
513
+ y: number;
514
+ width: number;
515
+ height: number;
516
+ tag: string;
517
+ data: T;
518
+ }
519
+ interface SheetData {
520
+ id: string;
521
+ name: string;
522
+ colNumber: number;
523
+ rowNumber: number;
524
+ cells: {
525
+ [key: string]: CellData | undefined;
526
+ };
527
+ merges: string[];
528
+ figures: FigureData<any>[];
529
+ cols: {
530
+ [key: number]: HeaderData;
531
+ };
532
+ rows: {
533
+ [key: number]: HeaderData;
534
+ };
535
+ conditionalFormats: ConditionalFormat[];
536
+ areGridLinesVisible?: boolean;
537
+ }
538
+ interface WorkbookData {
539
+ version: number;
540
+ sheets: SheetData[];
541
+ styles: {
542
+ [key: number]: Style;
543
+ };
544
+ formats: {
545
+ [key: number]: string;
546
+ };
547
+ borders: {
548
+ [key: number]: Border$1;
549
+ };
550
+ entities: {
551
+ [key: string]: {
552
+ [key: string]: any;
553
+ };
554
+ };
555
+ revisionId: UID;
556
+ }
557
+ interface ExcelWorkbookData extends WorkbookData {
558
+ sheets: ExcelSheetData[];
559
+ }
560
+ interface ExcelCellData extends CellData {
561
+ value: CellValue;
562
+ isFormula: Boolean;
563
+ }
564
+ interface ExcelSheetData extends SheetData {
565
+ cells: {
566
+ [key: string]: ExcelCellData | undefined;
567
+ };
568
+ charts: FigureData<ExcelChartDefinition>[];
569
+ }
570
+
608
571
  declare type ClientId = string;
609
572
  interface Client {
610
573
  id: ClientId;
@@ -740,6 +703,12 @@ interface TransportService<T = any> {
740
703
  leave: (id: UID) => void;
741
704
  }
742
705
 
706
+ interface NotificationUIEvent {
707
+ type: "NOTIFICATION";
708
+ text: string;
709
+ }
710
+ declare type NotifyUIEvent = NotificationUIEvent;
711
+
743
712
  interface XLSXExportFile {
744
713
  path: string;
745
714
  content: string;
@@ -777,10 +746,6 @@ interface XLSXExport {
777
746
  declare type Mode = "normal" | "headless";
778
747
  interface ModelConfig {
779
748
  mode: Mode;
780
- openSidePanel: (panel: string, panelProps?: any) => void;
781
- notifyUser: (content: string) => any;
782
- askConfirmation: (content: string, confirm: () => any, cancel?: () => any) => any;
783
- editText: (title: string, placeholder: string, callback: (text: string | null) => any) => any;
784
749
  evalContext: EvalContext;
785
750
  moveClient: (position: ClientPosition) => void;
786
751
  dataSources: DataSourceRegistry<any, any>;
@@ -789,6 +754,7 @@ interface ModelConfig {
789
754
  isHeadless: boolean;
790
755
  isReadonly: boolean;
791
756
  snapshotRequested: boolean;
757
+ notifyUI: (payload: NotifyUIEvent) => void;
792
758
  }
793
759
  declare class Model extends owl.core.EventBus implements CommandDispatcher {
794
760
  private corePlugins;
@@ -937,7 +903,7 @@ declare class StateObserver {
937
903
  * and UI plugins handling transient data.
938
904
  */
939
905
  declare class BasePlugin<State = any, C = any> implements CommandHandler<C> {
940
- static getters: string[];
906
+ static getters: readonly string[];
941
907
  static modes: Mode[];
942
908
  protected history: WorkbookHistory<State>;
943
909
  protected dispatch: CommandDispatcher["dispatch"];
@@ -982,11 +948,11 @@ declare class BasePlugin<State = any, C = any> implements CommandHandler<C> {
982
948
  checkValidations<T>(command: T, ...validations: Validation<T>[]): CommandResult | CommandResult[];
983
949
  }
984
950
 
985
- declare type UIActions = Pick<ModelConfig, "askConfirmation" | "notifyUser" | "openSidePanel" | "editText">;
951
+ declare type UIActions = Pick<ModelConfig, "notifyUI">;
986
952
  interface UIPluginConstructor {
987
953
  new (getters: Getters, state: StateObserver, dispatch: CommandDispatcher["dispatch"], config: ModelConfig): UIPlugin;
988
954
  layers: LAYERS[];
989
- getters: string[];
955
+ getters: readonly string[];
990
956
  modes: Mode[];
991
957
  }
992
958
  /**
@@ -1007,7 +973,7 @@ interface ComposerSelection {
1007
973
  end: number;
1008
974
  }
1009
975
  declare class EditionPlugin extends UIPlugin {
1010
- static getters: string[];
976
+ static getters: readonly ["getEditionMode", "isSelectingForComposer", "getCurrentContent", "getEditionSheet", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights"];
1011
977
  static modes: Mode[];
1012
978
  private col;
1013
979
  private row;
@@ -1123,7 +1089,7 @@ interface SearchMatch {
1123
1089
  */
1124
1090
  declare class FindAndReplacePlugin extends UIPlugin {
1125
1091
  static layers: LAYERS[];
1126
- static getters: string[];
1092
+ static getters: readonly ["getSearchMatches", "getCurrentSelectedMatchIndex"];
1127
1093
  private searchMatches;
1128
1094
  private selectedMatchIndex;
1129
1095
  private currentSearchRegex;
@@ -1200,9 +1166,6 @@ declare class FindAndReplacePlugin extends UIPlugin {
1200
1166
  * can use inferred information from the local internal state, such as the
1201
1167
  * active sheet.
1202
1168
  */
1203
- interface BaseCommand {
1204
- interactive?: boolean;
1205
- }
1206
1169
  interface SheetDependentCommand {
1207
1170
  sheetId: UID;
1208
1171
  }
@@ -1216,78 +1179,80 @@ interface PositionDependentCommand {
1216
1179
  col: number;
1217
1180
  row: number;
1218
1181
  }
1219
- 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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "DELETE_SHEET_CONFIRMATION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET">;
1220
- 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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "DELETE_SHEET_CONFIRMATION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET">;
1182
+ 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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET">;
1183
+ 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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET">;
1221
1184
  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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART">;
1222
- interface UpdateCellCommand extends BaseCommand, SheetDependentCommand, PositionDependentCommand {
1185
+ interface UpdateCellCommand extends SheetDependentCommand, PositionDependentCommand {
1223
1186
  type: "UPDATE_CELL";
1224
1187
  content?: string;
1225
1188
  style?: Style | null;
1226
1189
  format?: string;
1227
1190
  }
1228
- interface UpdateCellPositionCommand extends BaseCommand, SheetDependentCommand, PositionDependentCommand {
1191
+ /**
1192
+ * Move a cell to a given position or clear the position.
1193
+ */
1194
+ interface UpdateCellPositionCommand extends SheetDependentCommand, PositionDependentCommand {
1229
1195
  type: "UPDATE_CELL_POSITION";
1230
- cell?: Cell;
1231
- cellId: UID;
1196
+ cellId?: UID;
1232
1197
  }
1233
- interface AddColumnsRowsCommand extends BaseCommand, SheetDependentCommand, GridDependentCommand {
1198
+ interface AddColumnsRowsCommand extends SheetDependentCommand, GridDependentCommand {
1234
1199
  type: "ADD_COLUMNS_ROWS";
1235
1200
  base: number;
1236
1201
  quantity: number;
1237
1202
  position: "before" | "after";
1238
1203
  }
1239
- interface RemoveColumnsRowsCommand extends BaseCommand, SheetDependentCommand, GridDependentCommand {
1204
+ interface RemoveColumnsRowsCommand extends SheetDependentCommand, GridDependentCommand {
1240
1205
  type: "REMOVE_COLUMNS_ROWS";
1241
1206
  elements: number[];
1242
1207
  }
1243
- interface MoveColumnsRowsCommand extends BaseCommand, SheetDependentCommand, GridDependentCommand {
1208
+ interface MoveColumnsRowsCommand extends SheetDependentCommand, GridDependentCommand {
1244
1209
  type: "MOVE_COLUMNS_ROWS";
1245
1210
  base: number;
1246
1211
  elements: number[];
1247
1212
  }
1248
- interface ResizeColumnsRowsCommand extends BaseCommand, SheetDependentCommand, GridDependentCommand {
1213
+ interface ResizeColumnsRowsCommand extends SheetDependentCommand, GridDependentCommand {
1249
1214
  type: "RESIZE_COLUMNS_ROWS";
1250
1215
  elements: number[];
1251
1216
  size: number;
1252
1217
  }
1253
- interface HideColumnsRowsCommand extends BaseCommand, SheetDependentCommand, GridDependentCommand {
1218
+ interface HideColumnsRowsCommand extends SheetDependentCommand, GridDependentCommand {
1254
1219
  type: "HIDE_COLUMNS_ROWS";
1255
1220
  elements: number[];
1256
1221
  }
1257
- interface UnhideColumnsRowsCommand extends BaseCommand, SheetDependentCommand, GridDependentCommand {
1222
+ interface UnhideColumnsRowsCommand extends SheetDependentCommand, GridDependentCommand {
1258
1223
  type: "UNHIDE_COLUMNS_ROWS";
1259
1224
  elements: number[];
1260
1225
  }
1261
- interface SetGridLinesVisibilityCommand extends BaseCommand, SheetDependentCommand {
1226
+ interface SetGridLinesVisibilityCommand extends SheetDependentCommand {
1262
1227
  type: "SET_GRID_LINES_VISIBILITY";
1263
1228
  areGridLinesVisible: boolean;
1264
1229
  }
1265
- interface AddMergeCommand extends BaseCommand, SheetDependentCommand, TargetDependentCommand {
1230
+ interface AddMergeCommand extends SheetDependentCommand, TargetDependentCommand {
1266
1231
  type: "ADD_MERGE";
1267
1232
  force?: boolean;
1268
1233
  }
1269
- interface RemoveMergeCommand extends BaseCommand, SheetDependentCommand, TargetDependentCommand {
1234
+ interface RemoveMergeCommand extends SheetDependentCommand, TargetDependentCommand {
1270
1235
  type: "REMOVE_MERGE";
1271
1236
  }
1272
- interface CreateSheetCommand extends BaseCommand, SheetDependentCommand {
1237
+ interface CreateSheetCommand extends SheetDependentCommand {
1273
1238
  type: "CREATE_SHEET";
1274
1239
  position: number;
1275
1240
  name?: string;
1276
1241
  cols?: number;
1277
1242
  rows?: number;
1278
1243
  }
1279
- interface DeleteSheetCommand extends BaseCommand, SheetDependentCommand {
1244
+ interface DeleteSheetCommand extends SheetDependentCommand {
1280
1245
  type: "DELETE_SHEET";
1281
1246
  }
1282
- interface DuplicateSheetCommand extends BaseCommand, SheetDependentCommand {
1247
+ interface DuplicateSheetCommand extends SheetDependentCommand {
1283
1248
  type: "DUPLICATE_SHEET";
1284
1249
  sheetIdTo: UID;
1285
1250
  }
1286
- interface MoveSheetCommand extends BaseCommand, SheetDependentCommand {
1251
+ interface MoveSheetCommand extends SheetDependentCommand {
1287
1252
  type: "MOVE_SHEET";
1288
1253
  direction: "left" | "right";
1289
1254
  }
1290
- interface RenameSheetCommand extends BaseCommand, SheetDependentCommand {
1255
+ interface RenameSheetCommand extends SheetDependentCommand {
1291
1256
  type: "RENAME_SHEET";
1292
1257
  name?: string;
1293
1258
  }
@@ -1295,27 +1260,27 @@ interface RenameSheetCommand extends BaseCommand, SheetDependentCommand {
1295
1260
  * todo: use id instead of a list. this is not safe to serialize and send to
1296
1261
  * another user
1297
1262
  */
1298
- interface AddConditionalFormatCommand extends BaseCommand, SheetDependentCommand, TargetDependentCommand {
1263
+ interface AddConditionalFormatCommand extends SheetDependentCommand, TargetDependentCommand {
1299
1264
  type: "ADD_CONDITIONAL_FORMAT";
1300
1265
  cf: Omit<ConditionalFormat, "ranges">;
1301
1266
  }
1302
- interface RemoveConditionalFormatCommand extends BaseCommand, SheetDependentCommand {
1267
+ interface RemoveConditionalFormatCommand extends SheetDependentCommand {
1303
1268
  type: "REMOVE_CONDITIONAL_FORMAT";
1304
1269
  id: string;
1305
1270
  }
1306
- interface CreateFigureCommand extends BaseCommand, SheetDependentCommand {
1271
+ interface CreateFigureCommand extends SheetDependentCommand {
1307
1272
  type: "CREATE_FIGURE";
1308
1273
  figure: Figure;
1309
1274
  }
1310
- interface UpdateFigureCommand extends BaseCommand, Partial<Figure>, SheetDependentCommand {
1275
+ interface UpdateFigureCommand extends Partial<Figure>, SheetDependentCommand {
1311
1276
  type: "UPDATE_FIGURE";
1312
1277
  id: UID;
1313
1278
  }
1314
- interface DeleteFigureCommand extends BaseCommand, SheetDependentCommand {
1279
+ interface DeleteFigureCommand extends SheetDependentCommand {
1315
1280
  type: "DELETE_FIGURE";
1316
1281
  id: UID;
1317
1282
  }
1318
- interface CreateChartCommand extends BaseCommand, SheetDependentCommand {
1283
+ interface CreateChartCommand extends SheetDependentCommand {
1319
1284
  type: "CREATE_CHART";
1320
1285
  id: UID;
1321
1286
  position?: {
@@ -1324,56 +1289,52 @@ interface CreateChartCommand extends BaseCommand, SheetDependentCommand {
1324
1289
  };
1325
1290
  definition: ChartUIDefinition;
1326
1291
  }
1327
- interface UpdateChartCommand extends BaseCommand, SheetDependentCommand {
1292
+ interface UpdateChartCommand extends SheetDependentCommand {
1328
1293
  type: "UPDATE_CHART";
1329
1294
  id: UID;
1330
1295
  definition: ChartUIDefinitionUpdate;
1331
1296
  }
1332
- interface RefreshChartCommand extends BaseCommand, SheetDependentCommand {
1297
+ interface RefreshChartCommand extends SheetDependentCommand {
1333
1298
  type: "REFRESH_CHART";
1334
1299
  id: UID;
1335
1300
  }
1336
- interface SetFormattingCommand extends BaseCommand, SheetDependentCommand, TargetDependentCommand {
1301
+ interface SetFormattingCommand extends SheetDependentCommand, TargetDependentCommand {
1337
1302
  type: "SET_FORMATTING";
1338
1303
  style?: Style;
1339
1304
  border?: BorderCommand;
1340
1305
  format?: string;
1341
1306
  }
1342
- interface SetBorderCommand extends BaseCommand, SheetDependentCommand, PositionDependentCommand {
1307
+ interface SetBorderCommand extends SheetDependentCommand, PositionDependentCommand {
1343
1308
  type: "SET_BORDER";
1344
1309
  border: Border$1 | undefined;
1345
1310
  }
1346
- interface ClearFormattingCommand extends BaseCommand, SheetDependentCommand, TargetDependentCommand {
1311
+ interface ClearFormattingCommand extends SheetDependentCommand, TargetDependentCommand {
1347
1312
  type: "CLEAR_FORMATTING";
1348
1313
  }
1349
- interface SetDecimalCommand extends BaseCommand, SheetDependentCommand, TargetDependentCommand {
1314
+ interface SetDecimalCommand extends SheetDependentCommand, TargetDependentCommand {
1350
1315
  type: "SET_DECIMAL";
1351
1316
  step: number;
1352
1317
  }
1353
- interface DeleteSheetConfirmationCommand extends BaseCommand {
1354
- type: "DELETE_SHEET_CONFIRMATION";
1355
- sheetId: UID;
1356
- }
1357
- interface CopyCommand extends BaseCommand {
1318
+ interface CopyCommand {
1358
1319
  type: "COPY";
1359
1320
  target: Zone[];
1360
1321
  }
1361
- interface CutCommand extends BaseCommand {
1322
+ interface CutCommand {
1362
1323
  type: "CUT";
1363
1324
  target: Zone[];
1364
1325
  }
1365
- interface PasteCommand extends BaseCommand {
1326
+ interface PasteCommand {
1366
1327
  type: "PASTE";
1367
1328
  target: Zone[];
1368
1329
  pasteOption?: ClipboardOptions;
1369
1330
  force?: boolean;
1370
1331
  }
1371
- interface CutAndPasteCommand extends BaseCommand {
1332
+ interface CutAndPasteCommand {
1372
1333
  type: "CUT_AND_PASTE";
1373
1334
  source: Zone;
1374
1335
  target: Zone;
1375
1336
  }
1376
- interface AutoFillCellCommand extends BaseCommand {
1337
+ interface AutoFillCellCommand {
1377
1338
  type: "AUTOFILL_CELL";
1378
1339
  originCol: number;
1379
1340
  originRow: number;
@@ -1384,41 +1345,41 @@ interface AutoFillCellCommand extends BaseCommand {
1384
1345
  border?: Border$1;
1385
1346
  format?: string;
1386
1347
  }
1387
- interface ActivatePaintFormatCommand extends BaseCommand {
1348
+ interface ActivatePaintFormatCommand {
1388
1349
  type: "ACTIVATE_PAINT_FORMAT";
1389
1350
  target: Zone[];
1390
1351
  }
1391
- interface PasteFromOSClipboardCommand extends BaseCommand {
1352
+ interface PasteFromOSClipboardCommand {
1392
1353
  type: "PASTE_FROM_OS_CLIPBOARD";
1393
1354
  target: Zone[];
1394
1355
  text: string;
1395
1356
  }
1396
- interface AutoresizeColumnsCommand extends BaseCommand {
1357
+ interface AutoresizeColumnsCommand {
1397
1358
  type: "AUTORESIZE_COLUMNS";
1398
1359
  sheetId: UID;
1399
1360
  cols: number[];
1400
1361
  }
1401
- interface AutoresizeRowsCommand extends BaseCommand {
1362
+ interface AutoresizeRowsCommand {
1402
1363
  type: "AUTORESIZE_ROWS";
1403
1364
  sheetId: UID;
1404
1365
  rows: number[];
1405
1366
  }
1406
- interface MovePositionCommand extends BaseCommand {
1367
+ interface MovePositionCommand {
1407
1368
  type: "MOVE_POSITION";
1408
1369
  deltaX: Increment;
1409
1370
  deltaY: Increment;
1410
1371
  }
1411
- interface ActivateSheetCommand extends BaseCommand {
1372
+ interface ActivateSheetCommand {
1412
1373
  type: "ACTIVATE_SHEET";
1413
1374
  sheetIdFrom: UID;
1414
1375
  sheetIdTo: UID;
1415
1376
  }
1416
- interface SelectCellCommand extends BaseCommand {
1377
+ interface SelectCellCommand {
1417
1378
  type: "SELECT_CELL";
1418
1379
  col: number;
1419
1380
  row: number;
1420
1381
  }
1421
- interface SetSelectionCommand extends BaseCommand {
1382
+ interface SetSelectionCommand {
1422
1383
  type: "SET_SELECTION";
1423
1384
  anchor: [number, number];
1424
1385
  zones: Zone[];
@@ -1429,7 +1390,7 @@ interface SetSelectionCommand extends BaseCommand {
1429
1390
  * Set the selection mode to `selecting`.
1430
1391
  * The user is currently selecting some cells.
1431
1392
  */
1432
- interface StartSelectionCommand extends BaseCommand {
1393
+ interface StartSelectionCommand {
1433
1394
  type: "START_SELECTION";
1434
1395
  }
1435
1396
  /**
@@ -1439,7 +1400,7 @@ interface StartSelectionCommand extends BaseCommand {
1439
1400
  * In other words, the next selection will be added to the
1440
1401
  * current selection if this mode is active.
1441
1402
  */
1442
- interface PrepareExpansionCommand extends BaseCommand {
1403
+ interface PrepareExpansionCommand {
1443
1404
  type: "PREPARE_SELECTION_EXPANSION";
1444
1405
  }
1445
1406
  /**
@@ -1447,129 +1408,129 @@ interface PrepareExpansionCommand extends BaseCommand {
1447
1408
  * This mode means that the user is currently selecting
1448
1409
  * a new zone which will be added to the current selection.
1449
1410
  */
1450
- interface StartExpansionCommand extends BaseCommand {
1411
+ interface StartExpansionCommand {
1451
1412
  type: "START_SELECTION_EXPANSION";
1452
1413
  }
1453
1414
  /**
1454
1415
  * Set the selection mode to `idle`.
1455
1416
  */
1456
- interface StopSelectionCommand extends BaseCommand {
1417
+ interface StopSelectionCommand {
1457
1418
  type: "STOP_SELECTION";
1458
1419
  }
1459
1420
  /**
1460
1421
  * Set a color to be used for the next selection to highlight.
1461
1422
  * The color is only used when selection highlight is enabled.
1462
1423
  */
1463
- interface SetColorCommand extends BaseCommand {
1424
+ interface SetColorCommand {
1464
1425
  type: "SET_HIGHLIGHT_COLOR";
1465
1426
  color: string;
1466
1427
  }
1467
- interface SelectColumnCommand extends BaseCommand {
1428
+ interface SelectColumnCommand {
1468
1429
  type: "SELECT_COLUMN";
1469
1430
  index: number;
1470
1431
  createRange?: boolean;
1471
1432
  updateRange?: boolean;
1472
1433
  }
1473
- interface SelectRowCommand extends BaseCommand {
1434
+ interface SelectRowCommand {
1474
1435
  type: "SELECT_ROW";
1475
1436
  index: number;
1476
1437
  createRange?: boolean;
1477
1438
  updateRange?: boolean;
1478
1439
  }
1479
- interface SelectAllCommand extends BaseCommand {
1440
+ interface SelectAllCommand {
1480
1441
  type: "SELECT_ALL";
1481
1442
  }
1482
- interface AlterSelectionCommand extends BaseCommand {
1443
+ interface AlterSelectionCommand {
1483
1444
  type: "ALTER_SELECTION";
1484
1445
  delta?: [Increment, Increment];
1485
1446
  cell?: [number, number];
1486
1447
  }
1487
- interface EvaluateCellsCommand extends BaseCommand {
1448
+ interface EvaluateCellsCommand {
1488
1449
  type: "EVALUATE_CELLS";
1489
1450
  sheetId: UID;
1490
1451
  onlyWaiting?: boolean;
1491
1452
  }
1492
- interface StartChangeHighlightCommand extends BaseCommand {
1453
+ interface StartChangeHighlightCommand {
1493
1454
  type: "START_CHANGE_HIGHLIGHT";
1494
1455
  zone: Zone;
1495
1456
  }
1496
- interface ChangeHighlightCommand extends BaseCommand {
1457
+ interface ChangeHighlightCommand {
1497
1458
  type: "CHANGE_HIGHLIGHT";
1498
1459
  zone: Zone;
1499
1460
  }
1500
- interface StopComposerSelectionCommand extends BaseCommand {
1461
+ interface StopComposerSelectionCommand {
1501
1462
  type: "STOP_COMPOSER_RANGE_SELECTION";
1502
1463
  }
1503
- interface StartEditionCommand extends BaseCommand {
1464
+ interface StartEditionCommand {
1504
1465
  type: "START_EDITION";
1505
1466
  text?: string;
1506
1467
  selection?: ComposerSelection;
1507
1468
  }
1508
- interface StopEditionCommand extends BaseCommand {
1469
+ interface StopEditionCommand {
1509
1470
  type: "STOP_EDITION";
1510
1471
  cancel?: boolean;
1511
1472
  }
1512
- interface SetCurrentContentCommand extends BaseCommand {
1473
+ interface SetCurrentContentCommand {
1513
1474
  type: "SET_CURRENT_CONTENT";
1514
1475
  content: string;
1515
1476
  selection?: ComposerSelection;
1516
1477
  }
1517
- interface ChangeComposerSelectionCommand extends BaseCommand {
1478
+ interface ChangeComposerSelectionCommand {
1518
1479
  type: "CHANGE_COMPOSER_CURSOR_SELECTION";
1519
1480
  start: number;
1520
1481
  end: number;
1521
1482
  }
1522
- interface ReplaceComposerSelectionCommand extends BaseCommand {
1483
+ interface ReplaceComposerSelectionCommand {
1523
1484
  type: "REPLACE_COMPOSER_CURSOR_SELECTION";
1524
1485
  text: string;
1525
1486
  }
1526
- interface ShowFormulaCommand extends BaseCommand {
1487
+ interface ShowFormulaCommand {
1527
1488
  type: "SET_FORMULA_VISIBILITY";
1528
1489
  show: boolean;
1529
1490
  }
1530
- interface DeleteContentCommand extends BaseCommand {
1491
+ interface DeleteContentCommand {
1531
1492
  type: "DELETE_CONTENT";
1532
1493
  sheetId: UID;
1533
1494
  target: Zone[];
1534
1495
  }
1535
- interface ClearCellCommand extends BaseCommand {
1496
+ interface ClearCellCommand {
1536
1497
  type: "CLEAR_CELL";
1537
1498
  sheetId: UID;
1538
1499
  col: number;
1539
1500
  row: number;
1540
1501
  }
1541
- interface UndoCommand extends BaseCommand {
1502
+ interface UndoCommand {
1542
1503
  type: "UNDO";
1543
1504
  commands: readonly CoreCommand[];
1544
1505
  }
1545
- interface RedoCommand extends BaseCommand {
1506
+ interface RedoCommand {
1546
1507
  type: "REDO";
1547
1508
  commands: readonly CoreCommand[];
1548
1509
  }
1549
- interface RequestUndoCommand extends BaseCommand {
1510
+ interface RequestUndoCommand {
1550
1511
  type: "REQUEST_UNDO";
1551
1512
  }
1552
- interface RequestRedoCommand extends BaseCommand {
1513
+ interface RequestRedoCommand {
1553
1514
  type: "REQUEST_REDO";
1554
1515
  }
1555
- interface StartCommand extends BaseCommand {
1516
+ interface StartCommand {
1556
1517
  type: "START";
1557
1518
  }
1558
- interface AutofillCommand extends BaseCommand {
1519
+ interface AutofillCommand {
1559
1520
  type: "AUTOFILL";
1560
1521
  }
1561
- interface AutofillSelectCommand extends BaseCommand {
1522
+ interface AutofillSelectCommand {
1562
1523
  type: "AUTOFILL_SELECT";
1563
1524
  col: number;
1564
1525
  row: number;
1565
1526
  }
1566
- interface AutofillAutoCommand extends BaseCommand {
1527
+ interface AutofillAutoCommand {
1567
1528
  type: "AUTOFILL_AUTO";
1568
1529
  }
1569
1530
  /**
1570
1531
  * Create a new state for a SelectionInput component
1571
1532
  */
1572
- interface NewInputCommand extends BaseCommand {
1533
+ interface NewInputCommand {
1573
1534
  type: "ENABLE_NEW_SELECTION_INPUT";
1574
1535
  /**
1575
1536
  * Identifier to use to reference this state.
@@ -1588,18 +1549,18 @@ interface NewInputCommand extends BaseCommand {
1588
1549
  /**
1589
1550
  * Delete an identified SelectionInput state.
1590
1551
  */
1591
- interface RemoveInputCommand extends BaseCommand {
1552
+ interface RemoveInputCommand {
1592
1553
  type: "DISABLE_SELECTION_INPUT";
1593
1554
  /** SelectionComponent id */
1594
1555
  id: string;
1595
1556
  }
1596
- interface UnfocusInputCommand extends BaseCommand {
1557
+ interface UnfocusInputCommand {
1597
1558
  type: "UNFOCUS_SELECTION_INPUT";
1598
1559
  }
1599
1560
  /**
1600
1561
  * Set the focus on a given range of a SelectionComponent state.
1601
1562
  */
1602
- interface FocusInputCommand extends BaseCommand {
1563
+ interface FocusInputCommand {
1603
1564
  type: "FOCUS_RANGE";
1604
1565
  /** SelectionComponent id */
1605
1566
  id: string;
@@ -1612,7 +1573,7 @@ interface FocusInputCommand extends BaseCommand {
1612
1573
  * Add an empty range at the end of a SelectionComponent state
1613
1574
  * and focus it.
1614
1575
  */
1615
- interface AddEmptyRangeCommand extends BaseCommand {
1576
+ interface AddEmptyRangeCommand {
1616
1577
  type: "ADD_EMPTY_RANGE";
1617
1578
  /** SelectionComponent id */
1618
1579
  id: string;
@@ -1620,7 +1581,7 @@ interface AddEmptyRangeCommand extends BaseCommand {
1620
1581
  /**
1621
1582
  * Remove a given range in a SelectionComponent state
1622
1583
  */
1623
- interface RemoveRangeCommand extends BaseCommand {
1584
+ interface RemoveRangeCommand {
1624
1585
  type: "REMOVE_RANGE";
1625
1586
  /** SelectionComponent id */
1626
1587
  id: string;
@@ -1630,7 +1591,7 @@ interface RemoveRangeCommand extends BaseCommand {
1630
1591
  /**
1631
1592
  * Set a new value for a given range of a SelectionComponent state.
1632
1593
  */
1633
- interface ChangeRangeCommand extends BaseCommand {
1594
+ interface ChangeRangeCommand {
1634
1595
  type: "CHANGE_RANGE";
1635
1596
  /** SelectionComponent id */
1636
1597
  id: string;
@@ -1642,85 +1603,98 @@ interface ChangeRangeCommand extends BaseCommand {
1642
1603
  */
1643
1604
  value: string;
1644
1605
  }
1645
- interface SelectFigureCommand extends BaseCommand {
1606
+ interface SelectFigureCommand {
1646
1607
  type: "SELECT_FIGURE";
1647
1608
  id: UID;
1648
1609
  }
1649
- interface UpdateSearchCommand extends BaseCommand {
1610
+ interface UpdateSearchCommand {
1650
1611
  type: "UPDATE_SEARCH";
1651
1612
  toSearch: string;
1652
1613
  searchOptions: SearchOptions;
1653
1614
  }
1654
- interface ClearSearchCommand extends BaseCommand {
1615
+ interface ClearSearchCommand {
1655
1616
  type: "CLEAR_SEARCH";
1656
1617
  }
1657
- interface RefreshSearchCommand extends BaseCommand {
1618
+ interface RefreshSearchCommand {
1658
1619
  type: "REFRESH_SEARCH";
1659
1620
  }
1660
- interface SelectSearchPreviousCommand extends BaseCommand {
1621
+ interface SelectSearchPreviousCommand {
1661
1622
  type: "SELECT_SEARCH_PREVIOUS_MATCH";
1662
1623
  }
1663
- interface SelectSearchNextCommand extends BaseCommand {
1624
+ interface SelectSearchNextCommand {
1664
1625
  type: "SELECT_SEARCH_NEXT_MATCH";
1665
1626
  }
1666
- interface ReplaceSearchCommand extends BaseCommand {
1627
+ interface ReplaceSearchCommand {
1667
1628
  type: "REPLACE_SEARCH";
1668
1629
  replaceWith: string;
1669
1630
  replaceOptions: ReplaceOptions;
1670
1631
  }
1671
- interface ReplaceAllSearchCommand extends BaseCommand {
1632
+ interface ReplaceAllSearchCommand {
1672
1633
  type: "REPLACE_ALL_SEARCH";
1673
1634
  replaceWith: string;
1674
1635
  replaceOptions: ReplaceOptions;
1675
1636
  }
1676
- interface SortCommand extends BaseCommand {
1637
+ interface SortCommand {
1677
1638
  type: "SORT_CELLS";
1678
1639
  sheetId: UID;
1679
- anchor: [number, number];
1640
+ col: number;
1641
+ row: number;
1680
1642
  zone: Zone;
1681
1643
  sortDirection: SortDirection;
1682
1644
  }
1683
1645
  declare type SortDirection = "ascending" | "descending";
1684
- interface ResizeViewportCommand extends BaseCommand {
1646
+ interface ResizeViewportCommand {
1685
1647
  type: "RESIZE_VIEWPORT";
1686
1648
  width: number;
1687
1649
  height: number;
1688
1650
  }
1689
- interface SetViewportOffsetCommand extends BaseCommand {
1651
+ interface SetViewportOffsetCommand {
1690
1652
  type: "SET_VIEWPORT_OFFSET";
1691
1653
  offsetX: number;
1692
1654
  offsetY: number;
1693
1655
  }
1656
+ /**
1657
+ * Shift the viewport down by the viewport height
1658
+ */
1659
+ interface MoveViewportDownCommand {
1660
+ type: "SHIFT_VIEWPORT_DOWN";
1661
+ }
1662
+ /**
1663
+ * Shift the viewport up by the viewport height
1664
+ */
1665
+ interface MoveViewportUpCommand {
1666
+ type: "SHIFT_VIEWPORT_UP";
1667
+ }
1694
1668
  /**
1695
1669
  * Sum data according to the selected zone(s) in the appropriated
1696
1670
  * cells.
1697
1671
  */
1698
- interface SumSelectionCommand extends BaseCommand {
1672
+ interface SumSelectionCommand {
1699
1673
  type: "SUM_SELECTION";
1700
1674
  }
1701
- interface DeleteCellCommand extends BaseCommand {
1675
+ interface DeleteCellCommand {
1702
1676
  type: "DELETE_CELL";
1703
1677
  shiftDimension: Dimension$1;
1704
1678
  zone: Zone;
1705
1679
  }
1706
- interface InsertCellCommand extends BaseCommand {
1680
+ interface InsertCellCommand {
1707
1681
  type: "INSERT_CELL";
1708
1682
  shiftDimension: Dimension$1;
1709
1683
  zone: Zone;
1710
1684
  }
1711
- interface PasteCFCommand extends BaseCommand {
1685
+ interface PasteCFCommand {
1712
1686
  type: "PASTE_CONDITIONAL_FORMAT";
1713
1687
  origin: CellPosition;
1714
1688
  target: CellPosition;
1715
1689
  operation: "CUT" | "COPY";
1716
1690
  }
1717
- interface EvaluateAllSheetsCommand extends BaseCommand {
1691
+ interface EvaluateAllSheetsCommand {
1718
1692
  type: "EVALUATE_ALL_SHEETS";
1719
1693
  }
1720
- interface ActivateNextSheetCommand extends BaseCommand {
1694
+ interface ActivateNextSheetCommand {
1721
1695
  type: "ACTIVATE_NEXT_SHEET";
1722
1696
  }
1723
- interface ActivatePreviousSheetCommand extends BaseCommand {
1697
+ interface ActivatePreviousSheetCommand {
1724
1698
  type: "ACTIVATE_PREVIOUS_SHEET";
1725
1699
  }
1726
1700
  declare type CoreCommand =
@@ -1740,7 +1714,7 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
1740
1714
  | SetFormattingCommand | ClearFormattingCommand | SetBorderCommand
1741
1715
  /** CHART */
1742
1716
  | CreateChartCommand | UpdateChartCommand;
1743
- declare type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | CutAndPasteCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | PasteCFCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | MovePositionCommand | DeleteSheetConfirmationCommand | ActivateSheetCommand | StartSelectionCommand | StartExpansionCommand | PrepareExpansionCommand | StopSelectionCommand | SelectCellCommand | SetSelectionCommand | SelectColumnCommand | SelectRowCommand | SelectAllCommand | AlterSelectionCommand | EvaluateCellsCommand | ChangeHighlightCommand | StartChangeHighlightCommand | SetColorCommand | StopComposerSelectionCommand | StartEditionCommand | StopEditionCommand | SetCurrentContentCommand | ChangeComposerSelectionCommand | ReplaceComposerSelectionCommand | StartCommand | AutofillCommand | AutofillSelectCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | UpdateSearchCommand | RefreshSearchCommand | ClearSearchCommand | SelectSearchPreviousCommand | SelectSearchNextCommand | ReplaceSearchCommand | ReplaceAllSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | RefreshChartCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | EvaluateAllSheetsCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand;
1717
+ declare type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | CutAndPasteCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | PasteCFCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | MovePositionCommand | ActivateSheetCommand | StartSelectionCommand | StartExpansionCommand | PrepareExpansionCommand | StopSelectionCommand | SelectCellCommand | SetSelectionCommand | SelectColumnCommand | SelectRowCommand | SelectAllCommand | AlterSelectionCommand | EvaluateCellsCommand | ChangeHighlightCommand | StartChangeHighlightCommand | SetColorCommand | StopComposerSelectionCommand | StartEditionCommand | StopEditionCommand | SetCurrentContentCommand | ChangeComposerSelectionCommand | ReplaceComposerSelectionCommand | StartCommand | AutofillCommand | AutofillSelectCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | UpdateSearchCommand | RefreshSearchCommand | ClearSearchCommand | SelectSearchPreviousCommand | SelectSearchNextCommand | ReplaceSearchCommand | ReplaceAllSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | RefreshChartCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | EvaluateAllSheetsCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand;
1744
1718
  declare type Command = CoreCommand | LocalCommand;
1745
1719
  /**
1746
1720
  * Holds the result of a command dispatch.
@@ -2081,7 +2055,7 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
2081
2055
  private getters;
2082
2056
  private providers;
2083
2057
  constructor(getters: Getters);
2084
- static getters: string[];
2058
+ static getters: readonly ["getRangeString", "getRangeFromSheetXC", "createAdaptedRanges"];
2085
2059
  allowDispatch(command: Command): CommandResult;
2086
2060
  beforeHandle(command: Command): void;
2087
2061
  handle(cmd: Command): void;
@@ -2132,7 +2106,7 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
2132
2106
 
2133
2107
  interface CorePluginConstructor {
2134
2108
  new (getters: CoreGetters, stateObserver: StateObserver, range: RangeAdapter, dispatch: CoreCommandDispatcher["dispatch"], config: ModelConfig, uuidGenerator: UuidGenerator): CorePlugin;
2135
- getters: string[];
2109
+ getters: readonly string[];
2136
2110
  modes: Mode[];
2137
2111
  }
2138
2112
  /**
@@ -2173,7 +2147,7 @@ interface BordersPluginState {
2173
2147
  * - borders
2174
2148
  */
2175
2149
  declare class BordersPlugin extends CorePlugin<BordersPluginState> implements BordersPluginState {
2176
- static getters: string[];
2150
+ static getters: readonly ["getCellBorder"];
2177
2151
  readonly borders: BordersPluginState["borders"];
2178
2152
  handle(cmd: Command): void;
2179
2153
  /**
@@ -2277,55 +2251,6 @@ declare class BordersPlugin extends CorePlugin<BordersPluginState> implements Bo
2277
2251
  exportForExcel(data: ExcelWorkbookData): void;
2278
2252
  }
2279
2253
 
2280
- /**
2281
- * Abstract base implementation of a cell.
2282
- * Concrete cell classes are responsible to build the raw cell `content` based on
2283
- * whatever data they have (formula, string, ...).
2284
- */
2285
- declare abstract class AbstractCell<T extends CellEvaluation = CellEvaluation> implements ICell {
2286
- readonly id: UID;
2287
- evaluated: T;
2288
- readonly style?: Style;
2289
- readonly format?: string;
2290
- abstract content: string;
2291
- constructor(id: UID, evaluated: T, properties: CellDisplayProperties);
2292
- isFormula(): this is FormulaCell;
2293
- isLink(): this is LinkCell;
2294
- isEmpty(): boolean;
2295
- get formattedValue(): string;
2296
- get composerContent(): string;
2297
- get defaultAlign(): "center" | "left" | "right";
2298
- /**
2299
- * Only empty cells, text cells and numbers are valid
2300
- */
2301
- get isAutoSummable(): boolean;
2302
- }
2303
- declare abstract class LinkCell$1 extends AbstractCell<TextEvaluation> implements LinkCell {
2304
- readonly link: Link;
2305
- readonly content: string;
2306
- abstract isUrlEditable: boolean;
2307
- abstract urlRepresentation: string;
2308
- constructor(id: UID, content: string, properties?: CellDisplayProperties);
2309
- abstract action(env: SpreadsheetEnv): void;
2310
- isLink(): boolean;
2311
- get composerContent(): string;
2312
- }
2313
- declare class FormulaCell$1 extends AbstractCell implements FormulaCell {
2314
- private buildFormulaString;
2315
- readonly normalizedText: string;
2316
- readonly compiledFormula: CompiledFormula;
2317
- readonly dependencies: CellDependencies;
2318
- /**
2319
- * Evaluation error
2320
- */
2321
- readonly error?: string;
2322
- constructor(buildFormulaString: (normalizedText: string, dependencies: CellDependencies) => string, id: UID, normalizedText: string, compiledFormula: CompiledFormula, dependencies: CellDependencies, properties: CellDisplayProperties);
2323
- get content(): string;
2324
- isFormula(): boolean;
2325
- assignValue(value: CellValue): void;
2326
- assignError(value: string, errorMessage: string): void;
2327
- }
2328
-
2329
2254
  interface CoreState {
2330
2255
  cells: Record<UID, Record<UID, Cell | undefined>>;
2331
2256
  }
@@ -2336,7 +2261,7 @@ interface CoreState {
2336
2261
  * cell and sheet content.
2337
2262
  */
2338
2263
  declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
2339
- static getters: string[];
2264
+ static getters: readonly ["zoneToXC", "getCells", "getFormulaCellContent", "inferFormulaFormat", "getCellStyle", "buildFormulaContent", "getCellById"];
2340
2265
  readonly cells: {
2341
2266
  [sheetId: string]: {
2342
2267
  [id: string]: Cell;
@@ -2362,6 +2287,8 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
2362
2287
  export(data: WorkbookData): void;
2363
2288
  importCell(sheet: Sheet, cellData: CellData, normalizedStyles: {
2364
2289
  [key: number]: Style;
2290
+ }, normalizedFormats: {
2291
+ [key: number]: string;
2365
2292
  }): Cell;
2366
2293
  exportForExcel(data: ExcelWorkbookData): void;
2367
2294
  getCells(sheetId: UID): Record<UID, Cell>;
@@ -2371,11 +2298,14 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
2371
2298
  */
2372
2299
  getCellById(cellId: UID): Cell | undefined;
2373
2300
  /**
2374
- * Reconstructs the original formula string based on a normalized form and its dependencies
2301
+ * Try to infer the cell format based on the formula dependencies.
2302
+ * e.g. if the formula is `=A1` and A1 has a given format, the
2303
+ * same format will be used.
2375
2304
  */
2376
- buildFormulaContent(sheetId: UID, formula: string, dependencies: CellDependencies): string;
2377
- getFormulaCellContent(sheetId: UID, cell: FormulaCell$1): string;
2378
- getCellStyle(cell: Cell): Style;
2305
+ inferFormulaFormat(compiledFormula: CompiledFormula, dependencies: Range[]): string | undefined;
2306
+ buildFormulaContent(sheetId: UID, cell: FormulaCell, dependencies?: Range[]): string;
2307
+ getFormulaCellContent(sheetId: UID, cell: FormulaCell): string;
2308
+ getCellStyle(cell?: Cell): Style;
2379
2309
  /**
2380
2310
  * Converts a zone to a XC coordinate system
2381
2311
  *
@@ -2421,7 +2351,7 @@ interface ChartState {
2421
2351
  };
2422
2352
  }
2423
2353
  declare class ChartPlugin extends CorePlugin<ChartState> implements ChartState {
2424
- static getters: string[];
2354
+ static getters: readonly ["getChartDefinition", "getChartDefinitionUI", "getChartDefinitionsBySheet"];
2425
2355
  readonly chartFigures: ChartState["chartFigures"];
2426
2356
  adaptRanges(applyChange: ApplyRangeChange): void;
2427
2357
  private adaptDataSetRanges;
@@ -2460,7 +2390,7 @@ interface ConditionalFormatState {
2460
2390
  };
2461
2391
  }
2462
2392
  declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState> implements ConditionalFormatState {
2463
- static getters: string[];
2393
+ static getters: readonly ["getConditionalFormats", "getRulesSelection", "getRulesByCell"];
2464
2394
  readonly cfRules: {
2465
2395
  [sheet: string]: ConditionalFormatInternal[];
2466
2396
  };
@@ -2504,7 +2434,7 @@ interface FigureState {
2504
2434
  };
2505
2435
  }
2506
2436
  declare class FigurePlugin extends CorePlugin<FigureState> implements FigureState {
2507
- static getters: string[];
2437
+ static getters: readonly ["getFigures", "getFigure"];
2508
2438
  readonly figures: FigureState["figures"];
2509
2439
  allowDispatch(cmd: CoreCommand): CommandResult;
2510
2440
  handle(cmd: CoreCommand): void;
@@ -2521,25 +2451,19 @@ declare class FigurePlugin extends CorePlugin<FigureState> implements FigureStat
2521
2451
  exportForExcel(data: ExcelWorkbookData): void;
2522
2452
  }
2523
2453
 
2524
- interface PendingMerges {
2525
- sheet: string;
2526
- merges: string[];
2527
- }
2528
2454
  declare type SheetMergeCellMap = Record<number, Record<number, number | undefined> | undefined>;
2529
2455
  interface MergeState {
2530
- readonly merges: Record<UID, Record<number, Merge | undefined> | undefined>;
2456
+ readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
2531
2457
  readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
2532
- readonly pending: PendingMerges | null;
2533
2458
  }
2534
2459
  declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
2535
- static getters: string[];
2460
+ static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCell", "getBottomLeftCell", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "isSingleCellOrMerge"];
2536
2461
  private nextId;
2537
- pending: PendingMerges | null;
2538
- readonly merges: Record<UID, Record<number, Merge | undefined> | undefined>;
2462
+ readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
2539
2463
  readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
2540
2464
  allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
2541
- beforeHandle(cmd: CoreCommand): void;
2542
2465
  handle(cmd: CoreCommand): void;
2466
+ adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
2543
2467
  getMerges(sheetId: UID): Merge[];
2544
2468
  getMerge(sheetId: UID, col: number, row: number): Merge | undefined;
2545
2469
  /**
@@ -2591,8 +2515,10 @@ declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
2591
2515
  */
2592
2516
  private addMerge;
2593
2517
  private removeMerge;
2594
- private removeAllMerges;
2595
- private exportAndRemoveMerges;
2518
+ /**
2519
+ * Apply a range change on merges of a particular sheet.
2520
+ */
2521
+ private applyRangeChangeOnSheet;
2596
2522
  import(data: WorkbookData): void;
2597
2523
  private importMerges;
2598
2524
  export(data: WorkbookData): void;
@@ -2606,7 +2532,7 @@ interface SheetState {
2606
2532
  readonly cellPosition: Record<UID, CellPosition | undefined>;
2607
2533
  }
2608
2534
  declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
2609
- static getters: string[];
2535
+ static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheets", "getVisibleSheets", "getEvaluationSheets", "tryGetCol", "getCol", "tryGetRow", "getRow", "getCell", "getCellsInZone", "getCellPosition", "getColCells", "getColsZone", "getRowsZone", "getNumberCols", "getNumberRows", "getHiddenColsGroups", "getHiddenRowsGroups", "getGridLinesVisibility", "getNextSheetName", "isEmpty"];
2610
2536
  readonly sheetIds: Record<string, UID | undefined>;
2611
2537
  readonly visibleSheets: UID[];
2612
2538
  readonly sheets: Record<UID, Sheet | undefined>;
@@ -2624,6 +2550,7 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
2624
2550
  * Return the sheet name. Throw if the sheet is not found.
2625
2551
  */
2626
2552
  getSheetName(sheetId: UID): string;
2553
+ getCellsInZone(sheetId: UID, zone: Zone): (Cell | undefined)[];
2627
2554
  /**
2628
2555
  * Return the sheet name or undefined if the sheet doesn't exist.
2629
2556
  */
@@ -2632,8 +2559,10 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
2632
2559
  getSheets(): Sheet[];
2633
2560
  getVisibleSheets(): UID[];
2634
2561
  getEvaluationSheets(): Record<UID, Sheet | undefined>;
2635
- getCol(sheetId: UID, index: number): Col | undefined;
2636
- getRow(sheetId: UID, index: number): Row | undefined;
2562
+ tryGetCol(sheetId: UID, index: number): Col | undefined;
2563
+ getCol(sheetId: UID, index: number): Col;
2564
+ tryGetRow(sheetId: UID, index: number): Row | undefined;
2565
+ getRow(sheetId: UID, index: number): Row;
2637
2566
  getCell(sheetId: UID, col: number, row: number): Cell | undefined;
2638
2567
  /**
2639
2568
  * Returns all the cells of a col
@@ -2653,6 +2582,14 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
2653
2582
  isEmpty(sheetId: UID, zone: Zone): boolean;
2654
2583
  private setHeaderSize;
2655
2584
  private updateCellPosition;
2585
+ /**
2586
+ * Set the cell at a new position and clear its previous position.
2587
+ */
2588
+ private setNewPosition;
2589
+ /**
2590
+ * Remove the cell at the given position (if there's one)
2591
+ */
2592
+ private clearPosition;
2656
2593
  private setGridLinesVisibility;
2657
2594
  private clearZones;
2658
2595
  private createSheet;
@@ -2761,7 +2698,7 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
2761
2698
  */
2762
2699
  declare class AutofillPlugin extends UIPlugin {
2763
2700
  static layers: LAYERS[];
2764
- static getters: string[];
2701
+ static getters: readonly ["getAutofillTooltip"];
2765
2702
  static modes: Mode[];
2766
2703
  private autofillZone;
2767
2704
  private lastCellSelected;
@@ -2812,7 +2749,7 @@ interface AutomaticSum {
2812
2749
  zone: Zone;
2813
2750
  }
2814
2751
  declare class AutomaticSumPlugin extends UIPlugin {
2815
- static getters: string[];
2752
+ static getters: readonly ["getAutomaticSums"];
2816
2753
  static modes: Mode[];
2817
2754
  handle(cmd: Command): void;
2818
2755
  getAutomaticSums(sheetId: UID, zone: Zone, anchor: [number, number]): AutomaticSum[];
@@ -2915,7 +2852,7 @@ declare class AutomaticSumPlugin extends UIPlugin {
2915
2852
  */
2916
2853
  declare class ClipboardPlugin extends UIPlugin {
2917
2854
  static layers: LAYERS[];
2918
- static getters: string[];
2855
+ static getters: readonly ["getClipboardContent", "isPaintingFormat"];
2919
2856
  static modes: Mode[];
2920
2857
  private status;
2921
2858
  private state?;
@@ -2986,7 +2923,6 @@ declare class ClipboardPlugin extends UIPlugin {
2986
2923
  * Check if the given zone and at least one of the clipped zones overlap
2987
2924
  */
2988
2925
  private isZoneOverlapClippedZone;
2989
- private interactivePaste;
2990
2926
  /**
2991
2927
  * Check if a col/row added/removed at the given position is dirtying the clipboard
2992
2928
  */
@@ -2995,7 +2931,7 @@ declare class ClipboardPlugin extends UIPlugin {
2995
2931
  }
2996
2932
 
2997
2933
  declare class EvaluationPlugin extends UIPlugin {
2998
- static getters: string[];
2934
+ static getters: readonly ["evaluateFormula", "getRangeFormattedValues", "getRangeValues"];
2999
2935
  static modes: Mode[];
3000
2936
  private isUpToDate;
3001
2937
  private readonly evalContext;
@@ -3006,11 +2942,11 @@ declare class EvaluationPlugin extends UIPlugin {
3006
2942
  /**
3007
2943
  * Return the value of each cell in the range as they are displayed in the grid.
3008
2944
  */
3009
- getRangeFormattedValues(range: Range): string[][];
2945
+ getRangeFormattedValues(range: Range): string[];
3010
2946
  /**
3011
2947
  * Return the value of each cell in the range.
3012
2948
  */
3013
- getRangeValues(range: Range): CellValue[][];
2949
+ getRangeValues(range: Range): (CellValue | undefined)[];
3014
2950
  private evaluate;
3015
2951
  /**
3016
2952
  * Return all functions necessary to properly evaluate a formula:
@@ -3026,7 +2962,7 @@ declare class EvaluationPlugin extends UIPlugin {
3026
2962
  }
3027
2963
 
3028
2964
  declare class EvaluationChartPlugin extends UIPlugin {
3029
- static getters: string[];
2965
+ static getters: readonly ["getChartRuntime"];
3030
2966
  static modes: Mode[];
3031
2967
  readonly chartRuntime: {
3032
2968
  [sheetId: UID]: {
@@ -3045,7 +2981,7 @@ declare class EvaluationChartPlugin extends UIPlugin {
3045
2981
  }
3046
2982
 
3047
2983
  declare class EvaluationConditionalFormatPlugin extends UIPlugin {
3048
- static getters: string[];
2984
+ static getters: readonly ["getConditionalStyle", "getConditionalIcon"];
3049
2985
  static modes: Mode[];
3050
2986
  private isStale;
3051
2987
  private computedStyles;
@@ -3092,7 +3028,7 @@ declare class EvaluationConditionalFormatPlugin extends UIPlugin {
3092
3028
  declare class HighlightPlugin extends UIPlugin {
3093
3029
  static modes: Mode[];
3094
3030
  static layers: LAYERS[];
3095
- static getters: string[];
3031
+ static getters: readonly ["getHighlights"];
3096
3032
  getHighlights(): Highlight$1[];
3097
3033
  private prepareHighlights;
3098
3034
  drawGrid(renderingContext: GridRenderingContext): void;
@@ -3100,7 +3036,7 @@ declare class HighlightPlugin extends UIPlugin {
3100
3036
 
3101
3037
  declare class RendererPlugin extends UIPlugin {
3102
3038
  static layers: LAYERS[];
3103
- static getters: string[];
3039
+ static getters: readonly ["getColIndex", "getRowIndex", "getRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow"];
3104
3040
  static modes: Mode[];
3105
3041
  private boxes;
3106
3042
  /**
@@ -3124,6 +3060,14 @@ declare class RendererPlugin extends UIPlugin {
3124
3060
  private drawIcon;
3125
3061
  private drawHeaders;
3126
3062
  private hasContent;
3063
+ /**
3064
+ * Adapt the current viewport with the headers sizes
3065
+ */
3066
+ private getShiftedViewport;
3067
+ private findNextEmptyCol;
3068
+ private findPreviousEmptyCol;
3069
+ private computeCellAlignment;
3070
+ private createBoxFromPosition;
3127
3071
  private getGridBoxes;
3128
3072
  }
3129
3073
 
@@ -3147,7 +3091,7 @@ interface SelectionPluginState {
3147
3091
  declare class SelectionPlugin extends UIPlugin<SelectionPluginState> {
3148
3092
  static layers: LAYERS[];
3149
3093
  static modes: Mode[];
3150
- static getters: string[];
3094
+ static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getStatisticFnResults", "getSelectedFigureId", "getVisibleFigures", "getSelection", "getPosition", "getSheetPosition", "getSelectionMode", "isSelected", "getElementsFromSelection"];
3151
3095
  private selection;
3152
3096
  private selectedFigureId;
3153
3097
  private activeCol;
@@ -3171,10 +3115,12 @@ declare class SelectionPlugin extends UIPlugin<SelectionPluginState> {
3171
3115
  getSelectedFigureId(): string | null;
3172
3116
  getPosition(): [number, number];
3173
3117
  getSheetPosition(sheetId: UID): [number, number];
3174
- getAggregate(): string | null;
3118
+ getStatisticFnResults(): {
3119
+ [name: string]: number | undefined;
3120
+ };
3175
3121
  getSelectionMode(): SelectionMode;
3176
3122
  isSelected(zone: Zone): boolean;
3177
- getVisibleFigures(sheetId: UID): Figure[];
3123
+ getVisibleFigures(): Figure[];
3178
3124
  /**
3179
3125
  * Returns a sorted array of indexes of all columns (respectively rows depending
3180
3126
  * on the dimension parameter) intersected by the currently selected zones.
@@ -3257,7 +3203,7 @@ interface RangeInputValue {
3257
3203
  declare class SelectionInputPlugin extends UIPlugin {
3258
3204
  static modes: Mode[];
3259
3205
  static layers: LAYERS[];
3260
- static getters: string[];
3206
+ static getters: readonly ["getSelectionInput", "getSelectionInputValue", "isRangeValid", "getSelectionInputHighlights"];
3261
3207
  private inputs;
3262
3208
  private activeSheets;
3263
3209
  private inputHasSingleRange;
@@ -3322,7 +3268,7 @@ interface ClientToDisplay extends Required<Client> {
3322
3268
  color: string;
3323
3269
  }
3324
3270
  declare class SelectionMultiUserPlugin extends UIPlugin {
3325
- static getters: string[];
3271
+ static getters: readonly ["getClientsToDisplay"];
3326
3272
  static layers: LAYERS[];
3327
3273
  static modes: Mode[];
3328
3274
  private availableColors;
@@ -3338,12 +3284,11 @@ declare class SelectionMultiUserPlugin extends UIPlugin {
3338
3284
  }
3339
3285
 
3340
3286
  declare class SortPlugin extends UIPlugin {
3341
- static getters: string[];
3287
+ static getters: readonly ["getContiguousZone"];
3342
3288
  allowDispatch(cmd: Command): CommandResult | CommandResult[];
3343
3289
  handle(cmd: Command): void;
3344
3290
  private checkMerge;
3345
3291
  private checkMergeSizes;
3346
- private interactiveSortSelection;
3347
3292
  /**
3348
3293
  * safe-version of expandZone to make sure we don't get out of the grid
3349
3294
  */
@@ -3388,31 +3333,40 @@ declare class SortPlugin extends UIPlugin {
3388
3333
  * @param zone Zone
3389
3334
  *
3390
3335
  */
3391
- private getContiguousZone;
3336
+ getContiguousZone(sheetId: UID, zone: Zone): Zone;
3392
3337
  /**
3393
3338
  * This function evaluates if the top row of a provided zone can be considered as a `header`
3394
3339
  * by checking the following criteria:
3395
3340
  * * If the left-most column top row value (topLeft) is empty, we ignore it while evaluating the criteria.
3396
3341
  * 1 - Apart from the left-most column, every element of the top row must be non-empty, i.e. a cell should be present in the sheet.
3397
- * 2 - There should be at least one column in which the type (HeaderType) of the rop row cell differs from the type of the cell below.
3342
+ * 2 - There should be at least one column in which the type (CellValueType) of the rop row cell differs from the type of the cell below.
3398
3343
  * For the second criteria, we ignore columns on which the cell below is empty.
3399
3344
  *
3400
3345
  */
3401
3346
  private hasHeader;
3402
- private sortCellsList;
3403
3347
  private sortZone;
3348
+ /**
3349
+ * Return the distances between main merge cells in the zone.
3350
+ * (1 if there are no merges).
3351
+ * Note: it is assumed all merges are the same in the zone.
3352
+ */
3353
+ private mainCellsSteps;
3354
+ /**
3355
+ * Return a 2D array of cells in the zone (main merge cells if there are merges)
3356
+ */
3357
+ private mainCells;
3404
3358
  }
3405
3359
 
3406
3360
  declare class UIOptionsPlugin extends UIPlugin {
3407
3361
  static modes: Mode[];
3408
- static getters: string[];
3362
+ static getters: readonly ["shouldShowFormulas"];
3409
3363
  private showFormulas;
3410
3364
  handle(cmd: Command): void;
3411
3365
  shouldShowFormulas(): boolean;
3412
3366
  }
3413
3367
 
3414
3368
  declare class SheetUIPlugin extends UIPlugin {
3415
- static getters: string[];
3369
+ static getters: readonly ["getCellWidth", "getCellHeight", "getTextWidth", "getCellText"];
3416
3370
  private ctx;
3417
3371
  allowDispatch(cmd: Command): CommandResult;
3418
3372
  handle(cmd: Command): void;
@@ -3422,9 +3376,6 @@ declare class SheetUIPlugin extends UIPlugin {
3422
3376
  getCellText(cell: Cell, showFormula?: boolean): string;
3423
3377
  private getColMaxWidth;
3424
3378
  private getRowMaxHeight;
3425
- private interactiveRenameSheet;
3426
- private interactiveDeleteSheet;
3427
- private interactiveMerge;
3428
3379
  }
3429
3380
 
3430
3381
  interface ViewportPluginState {
@@ -3442,26 +3393,30 @@ interface ViewportPluginState {
3442
3393
  * to align elements to the grid.
3443
3394
  */
3444
3395
  declare class ViewportPlugin extends UIPlugin {
3445
- static getters: string[];
3396
+ static getters: readonly ["getActiveViewport", "getActiveSnappedViewport", "getViewportDimensionWithHeaders", "getMaxViewportSize", "getMaximumViewportOffset"];
3446
3397
  static modes: Mode[];
3447
3398
  readonly viewports: ViewportPluginState["viewports"];
3448
3399
  readonly snappedViewports: ViewportPluginState["viewports"];
3449
3400
  private updateSnap;
3450
3401
  /**
3451
- * The viewport dimensions (clientWidth and clientHeight) are usually set by one of the components
3402
+ * The viewport dimensions are usually set by one of the components
3452
3403
  * (i.e. when grid component is mounted) to properly reflect its state in the DOM.
3453
3404
  * In the absence of a component (standalone model), is it mandatory to set reasonable default values
3454
3405
  * to ensure the correct operation of this plugin.
3455
3406
  */
3456
- private clientWidth;
3457
- private clientHeight;
3407
+ private viewportWidth;
3408
+ private viewportHeight;
3458
3409
  allowDispatch(cmd: Command): CommandResult;
3459
3410
  handle(cmd: Command): void;
3460
3411
  finalize(): void;
3461
- getViewportDimension(): ZoneDimension;
3412
+ getViewportDimensionWithHeaders(): ZoneDimension;
3462
3413
  getActiveViewport(): Viewport;
3463
3414
  getActiveSnappedViewport(): Viewport;
3464
- getGridDimension(sheet: Sheet): ZoneDimension;
3415
+ /**
3416
+ * Return the maximum viewport size. That is the sheet dimension
3417
+ * with some bottom and right padding.
3418
+ */
3419
+ getMaxViewportSize(sheet: Sheet): ZoneDimension;
3465
3420
  getMaximumViewportOffset(sheet: Sheet): {
3466
3421
  maxOffsetX: number;
3467
3422
  maxOffsetY: number;
@@ -3483,6 +3438,11 @@ declare class ViewportPlugin extends UIPlugin {
3483
3438
  private resizeViewport;
3484
3439
  private recomputeViewports;
3485
3440
  private setViewportOffset;
3441
+ /**
3442
+ * Clip the vertical offset within the allowed range.
3443
+ * Not above the sheet, nor below the sheet.
3444
+ */
3445
+ private clipOffsetY;
3486
3446
  private generateViewportState;
3487
3447
  private refreshViewport;
3488
3448
  private adjustViewportZone;
@@ -3501,133 +3461,92 @@ declare class ViewportPlugin extends UIPlugin {
3501
3461
  /** Will update the snapped viewport based on the "standard" viewport to ensure its
3502
3462
  * offsets match the start of the viewport left (resp. top) column (resp. row). */
3503
3463
  private snapViewportToCell;
3464
+ /**
3465
+ * Shift the viewport vertically and move the selection anchor
3466
+ * such that it remains at the same place relative to the
3467
+ * viewport top.
3468
+ */
3469
+ private shiftVertically;
3470
+ /**
3471
+ * Return the row at the viewport's top
3472
+ */
3473
+ private getActiveTopRow;
3504
3474
  }
3505
3475
 
3506
- interface CoreGetters {
3507
- isReadonly: () => boolean;
3476
+ /**
3477
+ * Union of all getter names of a plugin.
3478
+ *
3479
+ * e.g. With the following plugin
3480
+ * ```ts
3481
+ * class MyPlugin {
3482
+ * static getters = [
3483
+ * "getCell",
3484
+ * "getCellValue",
3485
+ * ] as const;
3486
+ * getCell() { ... }
3487
+ * getCellValue() { ... }
3488
+ * }
3489
+ * ```
3490
+ * `type Names = GetterNames<typeof MyPlugin>` is equivalent to
3491
+ * `type Names = "getCell" | "getCellValue"`
3492
+ *
3493
+ * Some technical comments:
3494
+ *
3495
+ * - Since the getter names are in a static array, the type of the plugin must
3496
+ * be given, not the class itself.
3497
+ *
3498
+ * - we need to index the getters array with every index:
3499
+ * `Plugin["getters"][0] | Plugin["getters"][1] | Plugin["getters"][2] | ...`
3500
+ * which is equivalent to `Plugin["getters"][0 | 1 | 2 | ...]`.
3501
+ * This can be generalized because the union of all indices `0 | 1 | 2 | 3 | ...`
3502
+ * is actually the type `number`.
3503
+ */
3504
+ declare type GetterNames<Plugin extends {
3505
+ getters: readonly string[];
3506
+ }> = Plugin["getters"][number];
3507
+ declare type SheetGetters = Pick<SheetPlugin, GetterNames<typeof SheetPlugin>>;
3508
+ declare type CellGetters = Pick<CellPlugin, GetterNames<typeof CellPlugin>>;
3509
+ declare type MergeGetters = Pick<MergePlugin, GetterNames<typeof MergePlugin>>;
3510
+ declare type BordersGetters = Pick<BordersPlugin, GetterNames<typeof BordersPlugin>>;
3511
+ declare type ChartGetters = Pick<ChartPlugin, GetterNames<typeof ChartPlugin>>;
3512
+ declare type FigureGetters = Pick<FigurePlugin, GetterNames<typeof FigurePlugin>>;
3513
+ declare type RangeAdapterGetters = Pick<RangeAdapter, GetterNames<typeof RangeAdapter>>;
3514
+ declare type ConditionalFormatGetters = Pick<ConditionalFormatPlugin, GetterNames<typeof ConditionalFormatPlugin>>;
3515
+ declare type LocalHistoryGetters = {
3508
3516
  canUndo: LocalHistory["canUndo"];
3509
3517
  canRedo: LocalHistory["canRedo"];
3510
- getEvaluationSheets: SheetPlugin["getEvaluationSheets"];
3511
- getSheet: SheetPlugin["getSheet"];
3512
- tryGetSheet: SheetPlugin["tryGetSheet"];
3513
- getSheetName: SheetPlugin["getSheetName"];
3514
- tryGetSheetName: SheetPlugin["tryGetSheetName"];
3515
- getSheetIdByName: SheetPlugin["getSheetIdByName"];
3516
- getSheets: SheetPlugin["getSheets"];
3517
- getVisibleSheets: SheetPlugin["getVisibleSheets"];
3518
- getCol: SheetPlugin["getCol"];
3519
- getRow: SheetPlugin["getRow"];
3520
- getCell: SheetPlugin["getCell"];
3521
- getCellPosition: SheetPlugin["getCellPosition"];
3522
- getColCells: SheetPlugin["getColCells"];
3523
- getColsZone: SheetPlugin["getColsZone"];
3524
- getRowsZone: SheetPlugin["getRowsZone"];
3525
- getHiddenColsGroups: SheetPlugin["getHiddenColsGroups"];
3526
- getHiddenRowsGroups: SheetPlugin["getHiddenColsGroups"];
3527
- getGridLinesVisibility: SheetPlugin["getGridLinesVisibility"];
3528
- getNumberRows: SheetPlugin["getNumberRows"];
3529
- getNumberCols: SheetPlugin["getNumberCols"];
3530
- getNextSheetName: SheetPlugin["getNextSheetName"];
3531
- isEmpty: SheetPlugin["isEmpty"];
3532
- zoneToXC: CellPlugin["zoneToXC"];
3533
- getCells: CellPlugin["getCells"];
3534
- getFormulaCellContent: CellPlugin["getFormulaCellContent"];
3535
- buildFormulaContent: CellPlugin["buildFormulaContent"];
3536
- getCellStyle: CellPlugin["getCellStyle"];
3537
- getCellById: CellPlugin["getCellById"];
3538
- getClipboardContent: ClipboardPlugin["getClipboardContent"];
3539
- isPaintingFormat: ClipboardPlugin["isPaintingFormat"];
3540
- expandZone: MergePlugin["expandZone"];
3541
- isInMerge: MergePlugin["isInMerge"];
3542
- getMainCell: MergePlugin["getMainCell"];
3543
- getBottomLeftCell: MergePlugin["getBottomLeftCell"];
3544
- doesIntersectMerge: MergePlugin["doesIntersectMerge"];
3545
- doesColumnsHaveCommonMerges: MergePlugin["doesColumnsHaveCommonMerges"];
3546
- doesRowsHaveCommonMerges: MergePlugin["doesRowsHaveCommonMerges"];
3547
- isInSameMerge: MergePlugin["isInSameMerge"];
3548
- getMerges: MergePlugin["getMerges"];
3549
- getMerge: MergePlugin["getMerge"];
3550
- isMergeHidden: MergePlugin["isMergeHidden"];
3551
- isSingleCellOrMerge: MergePlugin["isSingleCellOrMerge"];
3552
- getConditionalFormats: ConditionalFormatPlugin["getConditionalFormats"];
3553
- getRulesSelection: ConditionalFormatPlugin["getRulesSelection"];
3554
- getRulesByCell: ConditionalFormatPlugin["getRulesByCell"];
3555
- getFigures: FigurePlugin["getFigures"];
3556
- getFigure: FigurePlugin["getFigure"];
3557
- getCellBorder: BordersPlugin["getCellBorder"];
3558
- getChartDefinition: ChartPlugin["getChartDefinition"];
3559
- getChartDefinitionsBySheet: ChartPlugin["getChartDefinitionsBySheet"];
3560
- getChartDefinitionUI: ChartPlugin["getChartDefinitionUI"];
3561
- getRangeString: RangeAdapter["getRangeString"];
3562
- getRangeFromSheetXC: RangeAdapter["getRangeFromSheetXC"];
3563
- createAdaptedRanges: RangeAdapter["createAdaptedRanges"];
3564
- }
3565
- declare type Getters = CoreGetters & {
3566
- getActiveSheetId: SelectionPlugin["getActiveSheetId"];
3567
- getActiveSheet: SelectionPlugin["getActiveSheet"];
3568
- getActiveCell: SelectionPlugin["getActiveCell"];
3569
- getActiveCols: SelectionPlugin["getActiveCols"];
3570
- getActiveRows: SelectionPlugin["getActiveRows"];
3571
- getCurrentStyle: SelectionPlugin["getCurrentStyle"];
3572
- getSelectedZones: SelectionPlugin["getSelectedZones"];
3573
- getSelectedZone: SelectionPlugin["getSelectedZone"];
3574
- getSelection: SelectionPlugin["getSelection"];
3575
- getSelectedFigureId: SelectionPlugin["getSelectedFigureId"];
3576
- getVisibleFigures: SelectionPlugin["getVisibleFigures"];
3577
- getPosition: SelectionPlugin["getPosition"];
3578
- getSheetPosition: SelectionPlugin["getSheetPosition"];
3579
- getAggregate: SelectionPlugin["getAggregate"];
3580
- getSelectionMode: SelectionPlugin["getSelectionMode"];
3581
- isSelected: SelectionPlugin["isSelected"];
3582
- getElementsFromSelection: SelectionPlugin["getElementsFromSelection"];
3518
+ };
3519
+ declare type CoreGetters = {
3520
+ isReadonly: () => boolean;
3521
+ } & LocalHistoryGetters & SheetGetters & CellGetters & MergeGetters & BordersGetters & ChartGetters & ConditionalFormatGetters & FigureGetters & RangeAdapterGetters;
3522
+ declare type AutofillGetters = Pick<AutofillPlugin, GetterNames<typeof AutofillPlugin>>;
3523
+ declare type AutomaticSumGetters = Pick<AutomaticSumPlugin, GetterNames<typeof AutomaticSumPlugin>>;
3524
+ declare type ClipboardGetters = Pick<ClipboardPlugin, GetterNames<typeof ClipboardPlugin>>;
3525
+ declare type EditionGetters = Pick<EditionPlugin, GetterNames<typeof EditionPlugin>>;
3526
+ declare type EvaluationGetters = Pick<EvaluationPlugin, GetterNames<typeof EvaluationPlugin>>;
3527
+ declare type EvaluationChartGetters = Pick<EvaluationChartPlugin, GetterNames<typeof EvaluationChartPlugin>>;
3528
+ declare type EvaluationConditionalFormatGetters = Pick<EvaluationConditionalFormatPlugin, GetterNames<typeof EvaluationConditionalFormatPlugin>>;
3529
+ declare type FindAndReplaceGetters = Pick<FindAndReplacePlugin, GetterNames<typeof FindAndReplacePlugin>>;
3530
+ declare type HighlightGetters = Pick<HighlightPlugin, GetterNames<typeof HighlightPlugin>>;
3531
+ declare type RendererGetters = Pick<RendererPlugin, GetterNames<typeof RendererPlugin>>;
3532
+ declare type SelectionGetters = Pick<SelectionPlugin, GetterNames<typeof SelectionPlugin>>;
3533
+ declare type SelectionInputGetters = Pick<SelectionInputPlugin, GetterNames<typeof SelectionInputPlugin>>;
3534
+ declare type SelectionMultiUserGetters = Pick<SelectionMultiUserPlugin, GetterNames<typeof SelectionMultiUserPlugin>>;
3535
+ declare type SortGetters = Pick<SortPlugin, GetterNames<typeof SortPlugin>>;
3536
+ declare type UIOptionsGetters = Pick<UIOptionsPlugin, GetterNames<typeof UIOptionsPlugin>>;
3537
+ declare type SheetUIGetters = Pick<SheetUIPlugin, GetterNames<typeof SheetUIPlugin>>;
3538
+ declare type ViewportGetters = Pick<ViewportPlugin, GetterNames<typeof ViewportPlugin>>;
3539
+ declare type SessionGetters = {
3583
3540
  getClient: Session["getClient"];
3584
3541
  getConnectedClients: Session["getConnectedClients"];
3585
3542
  isFullySynchronized: Session["isFullySynchronized"];
3586
- getCellWidth: SheetUIPlugin["getCellWidth"];
3587
- getTextWidth: SheetUIPlugin["getTextWidth"];
3588
- getCellHeight: SheetUIPlugin["getCellHeight"];
3589
- getCellText: SheetUIPlugin["getCellText"];
3590
- getRangeFormattedValues: EvaluationPlugin["getRangeFormattedValues"];
3591
- evaluateFormula: EvaluationPlugin["evaluateFormula"];
3592
- getRangeValues: EvaluationPlugin["getRangeValues"];
3593
- shouldShowFormulas: UIOptionsPlugin["shouldShowFormulas"];
3594
- getChartRuntime: EvaluationChartPlugin["getChartRuntime"];
3595
- getConditionalStyle: EvaluationConditionalFormatPlugin["getConditionalStyle"];
3596
- getConditionalIcon: EvaluationConditionalFormatPlugin["getConditionalIcon"];
3597
- getHighlights: HighlightPlugin["getHighlights"];
3598
- getColIndex: RendererPlugin["getColIndex"];
3599
- getRowIndex: RendererPlugin["getRowIndex"];
3600
- getRect: RendererPlugin["getRect"];
3601
- isVisibleInViewport: RendererPlugin["isVisibleInViewport"];
3602
- getEdgeScrollCol: RendererPlugin["getEdgeScrollCol"];
3603
- getEdgeScrollRow: RendererPlugin["getEdgeScrollRow"];
3604
- getEditionMode: EditionPlugin["getEditionMode"];
3605
- isSelectingForComposer: EditionPlugin["isSelectingForComposer"];
3606
- getCurrentContent: EditionPlugin["getCurrentContent"];
3607
- getEditionSheet: EditionPlugin["getEditionSheet"];
3608
- getComposerSelection: EditionPlugin["getComposerSelection"];
3609
- getCurrentTokens: EditionPlugin["getCurrentTokens"];
3610
- getTokenAtCursor: EditionPlugin["getTokenAtCursor"];
3611
- getComposerHighlights: EditionPlugin["getComposerHighlights"];
3612
- getAutofillTooltip: AutofillPlugin["getAutofillTooltip"];
3613
- getSelectionInput: SelectionInputPlugin["getSelectionInput"];
3614
- getSelectionInputValue: SelectionInputPlugin["getSelectionInputValue"];
3615
- isRangeValid: SelectionInputPlugin["isRangeValid"];
3616
- getSelectionInputHighlights: SelectionInputPlugin["getSelectionInputHighlights"];
3617
- getSearchMatches: FindAndReplacePlugin["getSearchMatches"];
3618
- getCurrentSelectedMatchIndex: FindAndReplacePlugin["getCurrentSelectedMatchIndex"];
3619
- getContiguousZone: SortPlugin["getContiguousZone"];
3620
- getClientsToDisplay: SelectionMultiUserPlugin["getClientsToDisplay"];
3621
- getSnappedViewport: ViewportPlugin["getViewport"];
3622
- getViewportDimension: ViewportPlugin["getViewportDimension"];
3623
- getActiveViewport: ViewportPlugin["getActiveViewport"];
3624
- getActiveSnappedViewport: ViewportPlugin["getActiveSnappedViewport"];
3625
- getGridDimension: ViewportPlugin["getGridDimension"];
3626
- getMaximumViewportOffset: ViewportPlugin["getMaximumViewportOffset"];
3627
- getAutomaticSums: AutomaticSumPlugin["getAutomaticSums"];
3628
3543
  };
3544
+ declare type Getters = CoreGetters & SessionGetters & AutofillGetters & AutomaticSumGetters & ClipboardGetters & EditionGetters & EvaluationGetters & EvaluationChartGetters & EvaluationConditionalFormatGetters & FindAndReplaceGetters & HighlightGetters & RendererGetters & SelectionGetters & SelectionInputGetters & SelectionMultiUserGetters & SortGetters & UIOptionsGetters & SheetUIGetters & ViewportGetters;
3629
3545
 
3630
3546
  interface SpreadsheetEnv extends Env {
3547
+ notifyUser: (content: string) => any;
3548
+ askConfirmation: (content: string, confirm: () => any, cancel?: () => any) => any;
3549
+ editText: (title: string, placeholder: string, callback: (text: string | null) => any) => any;
3631
3550
  openSidePanel: (panel: string, panelProps?: any) => void;
3632
3551
  openLinkEditor: () => void;
3633
3552
  toggleSidePanel: (panel: string, panelProps?: any) => void;
@@ -3646,11 +3565,6 @@ declare enum CellValueType {
3646
3565
  error = "error"
3647
3566
  }
3648
3567
  declare type CellValue = string | number | boolean;
3649
- interface CellDependencies {
3650
- references: Range[];
3651
- strings: string[];
3652
- numbers: number[];
3653
- }
3654
3568
  interface ICell {
3655
3569
  readonly id: UID;
3656
3570
  /**
@@ -3678,7 +3592,7 @@ interface ICell {
3678
3592
  */
3679
3593
  readonly isAutoSummable: boolean;
3680
3594
  isFormula(): this is FormulaCell;
3681
- isLink(): this is LinkCell;
3595
+ isLink(): this is LinkCell$1;
3682
3596
  isEmpty(): boolean;
3683
3597
  }
3684
3598
  interface FormulaCell extends ICell {
@@ -3686,13 +3600,13 @@ interface FormulaCell extends ICell {
3686
3600
  assignError: (value: string, errorMessage: string) => void;
3687
3601
  readonly normalizedText: string;
3688
3602
  readonly compiledFormula: CompiledFormula;
3689
- readonly dependencies: CellDependencies;
3603
+ readonly dependencies: Range[];
3690
3604
  }
3691
3605
  /**
3692
3606
  * A cell that can redirect to a given location which is
3693
3607
  * specified in a link.
3694
3608
  */
3695
- interface LinkCell extends ICell {
3609
+ interface LinkCell$1 extends ICell {
3696
3610
  readonly link: Link;
3697
3611
  /**
3698
3612
  * Go to the link destination
@@ -3920,8 +3834,20 @@ interface DOMCoordinates {
3920
3834
  x: number;
3921
3835
  y: number;
3922
3836
  }
3837
+ /**
3838
+ * The viewport is the visible area of a sheet.
3839
+ * Column and row headers are not included in the viewport.
3840
+ */
3923
3841
  interface Viewport extends Zone {
3842
+ /**
3843
+ * The offset in the X coordinate between the viewport left side and
3844
+ * the grid left side (left of column "A").
3845
+ */
3924
3846
  offsetX: number;
3847
+ /**
3848
+ * The offset in the Y coordinate between the viewport top side and
3849
+ * the grid top side (top of row "1").
3850
+ */
3925
3851
  offsetY: number;
3926
3852
  }
3927
3853
  interface GridRenderingContext {
@@ -4080,6 +4006,40 @@ declare function toNumber(value: ArgValue): number;
4080
4006
  declare function toString(value: ArgValue): string;
4081
4007
  declare function toBoolean(value: ArgValue): boolean;
4082
4008
 
4009
+ /**
4010
+ * Abstract base implementation of a cell.
4011
+ * Concrete cell classes are responsible to build the raw cell `content` based on
4012
+ * whatever data they have (formula, string, ...).
4013
+ */
4014
+ declare abstract class AbstractCell<T extends CellEvaluation = CellEvaluation> implements ICell {
4015
+ readonly id: UID;
4016
+ evaluated: T;
4017
+ readonly style?: Style;
4018
+ readonly format?: string;
4019
+ abstract content: string;
4020
+ constructor(id: UID, evaluated: T, properties: CellDisplayProperties);
4021
+ isFormula(): this is FormulaCell;
4022
+ isLink(): this is LinkCell$1;
4023
+ isEmpty(): boolean;
4024
+ get formattedValue(): string;
4025
+ get composerContent(): string;
4026
+ get defaultAlign(): "center" | "left" | "right";
4027
+ /**
4028
+ * Only empty cells, text cells and numbers are valid
4029
+ */
4030
+ get isAutoSummable(): boolean;
4031
+ }
4032
+ declare abstract class LinkCell extends AbstractCell<TextEvaluation> implements LinkCell$1 {
4033
+ readonly link: Link;
4034
+ readonly content: string;
4035
+ abstract isUrlEditable: boolean;
4036
+ abstract urlRepresentation: string;
4037
+ constructor(id: UID, content: string, properties?: CellDisplayProperties);
4038
+ abstract action(env: SpreadsheetEnv): void;
4039
+ isLink(): boolean;
4040
+ get composerContent(): string;
4041
+ }
4042
+
4083
4043
  declare function createEmptyWorkbookData(sheetName?: string): WorkbookData;
4084
4044
 
4085
4045
  /**
@@ -4093,7 +4053,7 @@ interface FigureContent {
4093
4053
  SidePanelComponent?: string;
4094
4054
  }
4095
4055
 
4096
- interface Props$d {
4056
+ interface Props$g {
4097
4057
  /**
4098
4058
  * Coordinates are expressed relative to the ".o-spreadsheet" element.
4099
4059
  */
@@ -4112,7 +4072,7 @@ interface Props$d {
4112
4072
  */
4113
4073
  flipVerticalOffset: number;
4114
4074
  }
4115
- declare class Popover extends Component<Props$d, SpreadsheetEnv> {
4075
+ declare class Popover extends Component<Props$g, SpreadsheetEnv> {
4116
4076
  static template: string;
4117
4077
  static components: {
4118
4078
  Portal: typeof _odoo_owl_dist_types_misc_portal.Portal;
@@ -4132,10 +4092,12 @@ declare class Popover extends Component<Props$d, SpreadsheetEnv> {
4132
4092
  private verticalPosition;
4133
4093
  }
4134
4094
 
4135
- interface Props$c {
4095
+ interface Props$f {
4136
4096
  position: DOMCoordinates;
4137
4097
  menuItems: FullMenuItem[];
4138
4098
  depth: number;
4099
+ onClose: () => void;
4100
+ onMenuClicked?: (ev: CustomEvent) => void;
4139
4101
  }
4140
4102
  interface MenuState {
4141
4103
  isOpen: boolean;
@@ -4143,7 +4105,7 @@ interface MenuState {
4143
4105
  scrollOffset?: number;
4144
4106
  menuItems: FullMenuItem[];
4145
4107
  }
4146
- declare class Menu extends Component<Props$c, SpreadsheetEnv> {
4108
+ declare class Menu extends Component<Props$f, SpreadsheetEnv> {
4147
4109
  static template: string;
4148
4110
  static components: {
4149
4111
  Menu: typeof Menu;
@@ -4155,8 +4117,7 @@ declare class Menu extends Component<Props$c, SpreadsheetEnv> {
4155
4117
  };
4156
4118
  private subMenu;
4157
4119
  private position;
4158
- private subMenuRef;
4159
- constructor();
4120
+ setup(): void;
4160
4121
  get subMenuPosition(): DOMCoordinates;
4161
4122
  get menuHeight(): number;
4162
4123
  get subMenuHeight(): number;
@@ -4183,7 +4144,6 @@ declare class Menu extends Component<Props$c, SpreadsheetEnv> {
4183
4144
  getShortCut(menu: FullMenuItem): string;
4184
4145
  isRoot(menu: FullMenuItem): boolean;
4185
4146
  isEnabled(menu: FullMenuItem): boolean;
4186
- closeSubMenus(): void;
4187
4147
  onScroll(ev: any): void;
4188
4148
  /**
4189
4149
  * If the given menu is not disabled, open it's submenu at the
@@ -4194,7 +4154,10 @@ declare class Menu extends Component<Props$c, SpreadsheetEnv> {
4194
4154
  onMouseOver(menu: FullMenuItem, position: number): void;
4195
4155
  }
4196
4156
 
4197
- declare class BottomBar extends Component<{}, SpreadsheetEnv> {
4157
+ interface Props$e {
4158
+ onClick: () => void;
4159
+ }
4160
+ declare class BottomBar extends Component<Props$e, SpreadsheetEnv> {
4198
4161
  static template: string;
4199
4162
  static style: string;
4200
4163
  static components: {
@@ -4203,42 +4166,89 @@ declare class BottomBar extends Component<{}, SpreadsheetEnv> {
4203
4166
  position: DOMCoordinates;
4204
4167
  getters: Getters;
4205
4168
  menuState: MenuState;
4206
- mounted(): void;
4207
- patched(): void;
4169
+ selectedStatisticFn: string;
4170
+ setup(): void;
4208
4171
  focusSheet(): void;
4209
4172
  addSheet(): void;
4210
4173
  listSheets(ev: MouseEvent): void;
4211
4174
  activateSheet(name: string): void;
4212
- onDblClick(sheetId: string): void;
4175
+ onDblClick(sheetId: UID): void;
4213
4176
  openContextMenu(x: number, registry: MenuItemRegistry): void;
4214
4177
  onIconClick(sheet: string, ev: MouseEvent): void;
4215
4178
  onContextMenu(sheet: string, ev: MouseEvent): void;
4179
+ getSelectedStatistic(): string | undefined;
4180
+ listSelectionStatistics(ev: MouseEvent): void;
4181
+ private getComposedFnName;
4182
+ }
4183
+
4184
+ interface Props$d {
4185
+ position: Position;
4186
+ }
4187
+ interface Position {
4188
+ top: number;
4189
+ left: number;
4190
+ }
4191
+ interface State$2 {
4192
+ position: Position;
4193
+ handler: boolean;
4194
+ }
4195
+ declare class Autofill extends Component<Props$d, SpreadsheetEnv> {
4196
+ static template: string;
4197
+ static style: string;
4198
+ state: State$2;
4199
+ get style(): string;
4200
+ get styleHandler(): string;
4201
+ get styleNextvalue(): string;
4202
+ getTooltip(): Tooltip | undefined;
4203
+ onMouseDown(ev: MouseEvent): void;
4204
+ onDblClick(): void;
4205
+ }
4206
+
4207
+ interface ClientTagProps {
4208
+ active: boolean;
4209
+ name: string;
4210
+ color: string;
4211
+ col: number;
4212
+ row: number;
4213
+ viewport: Viewport;
4214
+ }
4215
+ declare class ClientTag extends Component<ClientTagProps, SpreadsheetEnv> {
4216
+ static template: string;
4217
+ static style: string;
4218
+ get tagStyle(): string;
4216
4219
  }
4217
4220
 
4218
4221
  interface AutocompleteValue {
4219
4222
  text: string;
4220
4223
  description: string;
4221
4224
  }
4222
- interface Props$b {
4225
+ interface Props$c {
4223
4226
  provider: string;
4224
4227
  filter?: (searchTerm: string, vals: AutocompleteValue[]) => AutocompleteValue[];
4225
4228
  search: string;
4226
4229
  borderStyle: string;
4230
+ exposeAPI: (api: TextValueProviderApi) => void;
4231
+ onCompleted: (text?: string) => void;
4232
+ }
4233
+ interface TextValueProviderApi {
4234
+ moveUp: () => void;
4235
+ moveDown: () => void;
4236
+ getValueToFill: () => string | undefined;
4227
4237
  }
4228
- declare abstract class TextValueProvider extends Component<Props$b> {
4238
+ declare abstract class TextValueProvider extends Component<Props$c> implements TextValueProviderApi {
4229
4239
  static template: string;
4230
4240
  static style: string;
4231
4241
  state: {
4232
4242
  values: AutocompleteValue[];
4233
4243
  selectedIndex: number;
4234
4244
  };
4235
- mounted(): void;
4236
- willUpdateProps(nextProps: any): Promise<void>;
4245
+ setup(): void;
4246
+ checkUpdateProps(nextProps: any): void;
4237
4247
  filter(searchTerm: string): Promise<void>;
4238
4248
  fillValue(index: any): void;
4239
4249
  moveDown(): void;
4240
4250
  moveUp(): void;
4241
- getValueToFill(): string | void;
4251
+ getValueToFill(): string | undefined;
4242
4252
  }
4243
4253
 
4244
4254
  declare class ContentEditableHelper {
@@ -4280,7 +4290,7 @@ declare class ContentEditableHelper {
4280
4290
  private getStartAndEndSelection;
4281
4291
  }
4282
4292
 
4283
- interface Props$a {
4293
+ interface Props$b {
4284
4294
  functionName: string;
4285
4295
  functionDescription: FunctionDescription;
4286
4296
  argToFocus: number;
@@ -4289,60 +4299,31 @@ interface Props$a {
4289
4299
  interface AssistantState {
4290
4300
  allowCellSelectionBehind: boolean;
4291
4301
  }
4292
- declare class FunctionDescriptionProvider extends Component<Props$a> {
4302
+ declare class FunctionDescriptionProvider extends Component<Props$b> {
4293
4303
  static template: string;
4294
4304
  static style: string;
4295
4305
  assistantState: AssistantState;
4296
4306
  private timeOutId;
4297
- willUnmount(): void;
4298
- getContext(): Props$a;
4307
+ setup(): void;
4308
+ getContext(): Props$b;
4299
4309
  onMouseMove(): void;
4300
4310
  }
4301
4311
 
4302
- interface Dimension {
4303
- width: number;
4304
- height: number;
4305
- }
4306
- interface Props$9 {
4307
- focus: "inactive" | "cellFocus" | "contentFocus";
4308
- content: string;
4309
- }
4310
- /**
4311
- * This component is a composer which positions itself on the grid at the anchor cell.
4312
- * It also applies the style of the cell to the composer input.
4313
- */
4314
- declare class GridComposer extends Component<Props$9, SpreadsheetEnv> {
4315
- static template: string;
4316
- static style: string;
4317
- static components: {
4318
- Composer: typeof Composer;
4319
- };
4320
- private getters;
4321
- private zone;
4322
- private rect;
4323
- private composerState;
4324
- constructor();
4325
- get containerStyle(): string;
4326
- get composerStyle(): string;
4327
- mounted(): void;
4328
- onKeydown(ev: KeyboardEvent): void;
4329
- }
4330
-
4331
- interface ComposerFocusedEventData {
4332
- content?: string;
4333
- selection?: ComposerSelection;
4334
- }
4335
4312
  declare type HtmlContent = {
4336
4313
  value: string;
4337
4314
  color?: string;
4338
4315
  class?: string;
4339
4316
  };
4340
- declare type ComposerFocusedEvent = CustomEvent<ComposerFocusedEventData>;
4341
- interface Props$8 {
4317
+ interface Props$a {
4342
4318
  inputStyle: string;
4343
4319
  rect?: Rect;
4344
4320
  delimitation?: Dimension;
4345
4321
  focus: "inactive" | "cellFocus" | "contentFocus";
4322
+ onComposerUnmounted?: () => void;
4323
+ onComposerContentFocused: (selection: {
4324
+ start: number;
4325
+ end: number;
4326
+ }) => void;
4346
4327
  }
4347
4328
  interface ComposerState {
4348
4329
  positionStart: number;
@@ -4359,7 +4340,7 @@ interface FunctionDescriptionState {
4359
4340
  functionDescription: FunctionDescription;
4360
4341
  argToFocus: number;
4361
4342
  }
4362
- declare class Composer extends Component<Props$8, SpreadsheetEnv> {
4343
+ declare class Composer extends Component<Props$a, SpreadsheetEnv> {
4363
4344
  static template: string;
4364
4345
  static style: string;
4365
4346
  static components: {
@@ -4371,10 +4352,10 @@ declare class Composer extends Component<Props$8, SpreadsheetEnv> {
4371
4352
  focus: string;
4372
4353
  };
4373
4354
  private composerRef;
4374
- private autoCompleteRef;
4355
+ private autocompleteAPI?;
4375
4356
  getters: Getters;
4376
4357
  dispatch: {
4377
- <T extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "DELETE_SHEET_CONFIRMATION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C extends Extract<UpdateCellCommand, {
4358
+ <T extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C extends Extract<UpdateCellCommand, {
4378
4359
  type: T;
4379
4360
  }> | Extract<UpdateCellPositionCommand, {
4380
4361
  type: T;
@@ -4474,8 +4455,6 @@ declare class Composer extends Component<Props$8, SpreadsheetEnv> {
4474
4455
  type: T;
4475
4456
  }> | Extract<MovePositionCommand, {
4476
4457
  type: T;
4477
- }> | Extract<DeleteSheetConfirmationCommand, {
4478
- type: T;
4479
4458
  }> | Extract<ActivateSheetCommand, {
4480
4459
  type: T;
4481
4460
  }> | Extract<StartSelectionCommand, {
@@ -4560,6 +4539,10 @@ declare class Composer extends Component<Props$8, SpreadsheetEnv> {
4560
4539
  type: T;
4561
4540
  }> | Extract<SetViewportOffsetCommand, {
4562
4541
  type: T;
4542
+ }> | Extract<MoveViewportDownCommand, {
4543
+ type: T;
4544
+ }> | Extract<MoveViewportUpCommand, {
4545
+ type: T;
4563
4546
  }> | Extract<EvaluateAllSheetsCommand, {
4564
4547
  type: T;
4565
4548
  }> | Extract<ActivateNextSheetCommand, {
@@ -4567,7 +4550,7 @@ declare class Composer extends Component<Props$8, SpreadsheetEnv> {
4567
4550
  }> | Extract<ActivatePreviousSheetCommand, {
4568
4551
  type: T;
4569
4552
  }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
4570
- <T_1 extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "DELETE_SHEET_CONFIRMATION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C_1 extends Extract<UpdateCellCommand, {
4553
+ <T_1 extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C_1 extends Extract<UpdateCellCommand, {
4571
4554
  type: T_1;
4572
4555
  }> | Extract<UpdateCellPositionCommand, {
4573
4556
  type: T_1;
@@ -4667,8 +4650,6 @@ declare class Composer extends Component<Props$8, SpreadsheetEnv> {
4667
4650
  type: T_1;
4668
4651
  }> | Extract<MovePositionCommand, {
4669
4652
  type: T_1;
4670
- }> | Extract<DeleteSheetConfirmationCommand, {
4671
- type: T_1;
4672
4653
  }> | Extract<ActivateSheetCommand, {
4673
4654
  type: T_1;
4674
4655
  }> | Extract<StartSelectionCommand, {
@@ -4753,6 +4734,10 @@ declare class Composer extends Component<Props$8, SpreadsheetEnv> {
4753
4734
  type: T_1;
4754
4735
  }> | Extract<SetViewportOffsetCommand, {
4755
4736
  type: T_1;
4737
+ }> | Extract<MoveViewportDownCommand, {
4738
+ type: T_1;
4739
+ }> | Extract<MoveViewportUpCommand, {
4740
+ type: T_1;
4756
4741
  }> | Extract<EvaluateAllSheetsCommand, {
4757
4742
  type: T_1;
4758
4743
  }> | Extract<ActivateNextSheetCommand, {
@@ -4775,9 +4760,7 @@ declare class Composer extends Component<Props$8, SpreadsheetEnv> {
4775
4760
  [key: string]: Function;
4776
4761
  };
4777
4762
  constructor();
4778
- mounted(): void;
4779
- willUnmount(): void;
4780
- patched(): void;
4763
+ setup(): void;
4781
4764
  private processArrowKeys;
4782
4765
  private processTabKey;
4783
4766
  private processEnterKey;
@@ -4790,7 +4773,7 @@ declare class Composer extends Component<Props$8, SpreadsheetEnv> {
4790
4773
  onMousedown(ev: MouseEvent): void;
4791
4774
  onClick(): void;
4792
4775
  onBlur(): void;
4793
- onCompleted(ev: CustomEvent): void;
4776
+ onCompleted(text: string | undefined): void;
4794
4777
  private processContent;
4795
4778
  private getContent;
4796
4779
  private getColoredTokens;
@@ -4804,41 +4787,33 @@ declare class Composer extends Component<Props$8, SpreadsheetEnv> {
4804
4787
  private autoComplete;
4805
4788
  }
4806
4789
 
4807
- interface Props$7 {
4808
- position: Position;
4809
- }
4810
- interface Position {
4811
- top: number;
4812
- left: number;
4813
- }
4814
- interface State$2 {
4815
- position: Position;
4816
- handler: boolean;
4817
- }
4818
- declare class Autofill extends Component<Props$7, SpreadsheetEnv> {
4819
- static template: string;
4820
- static style: string;
4821
- state: State$2;
4822
- get style(): string;
4823
- get styleHandler(): string;
4824
- get styleNextvalue(): string;
4825
- getTooltip(): Tooltip | undefined;
4826
- onMouseDown(ev: MouseEvent): void;
4827
- onDblClick(): void;
4790
+ interface Dimension {
4791
+ width: number;
4792
+ height: number;
4828
4793
  }
4829
-
4830
- interface ClientTagProps {
4831
- active: boolean;
4832
- name: string;
4833
- color: string;
4834
- col: number;
4835
- row: number;
4836
- viewport: Viewport;
4794
+ interface Props$9 {
4795
+ focus: "inactive" | "cellFocus" | "contentFocus";
4796
+ content: string;
4797
+ onComposerUnmounted: () => void;
4837
4798
  }
4838
- declare class ClientTag extends Component<ClientTagProps, SpreadsheetEnv> {
4799
+ /**
4800
+ * This component is a composer which positions itself on the grid at the anchor cell.
4801
+ * It also applies the style of the cell to the composer input.
4802
+ */
4803
+ declare class GridComposer extends Component<Props$9, SpreadsheetEnv> {
4839
4804
  static template: string;
4840
4805
  static style: string;
4841
- get tagStyle(): string;
4806
+ static components: {
4807
+ Composer: typeof Composer;
4808
+ };
4809
+ private getters;
4810
+ private zone;
4811
+ private rect;
4812
+ private composerState;
4813
+ constructor();
4814
+ setup(): void;
4815
+ get containerStyle(): string;
4816
+ get composerStyle(): string;
4842
4817
  }
4843
4818
 
4844
4819
  interface ErrorToolTipProps {
@@ -4854,9 +4829,11 @@ interface FigureInfo {
4854
4829
  isSelected: boolean;
4855
4830
  figure: Figure;
4856
4831
  }
4857
- declare class FiguresContainer extends Component<{
4832
+ interface Props$8 {
4858
4833
  sidePanelIsOpen: Boolean;
4859
- }, SpreadsheetEnv> {
4834
+ onFigureDeleted: () => void;
4835
+ }
4836
+ declare class FiguresContainer extends Component<Props$8, SpreadsheetEnv> {
4860
4837
  static template: string;
4861
4838
  static style: string;
4862
4839
  static components: {};
@@ -4870,7 +4847,7 @@ declare class FiguresContainer extends Component<{
4870
4847
  };
4871
4848
  getters: Getters;
4872
4849
  dispatch: {
4873
- <T extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "DELETE_SHEET_CONFIRMATION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C extends Extract<UpdateCellCommand, {
4850
+ <T extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C extends Extract<UpdateCellCommand, {
4874
4851
  type: T;
4875
4852
  }> | Extract<UpdateCellPositionCommand, {
4876
4853
  type: T;
@@ -4970,8 +4947,6 @@ declare class FiguresContainer extends Component<{
4970
4947
  type: T;
4971
4948
  }> | Extract<MovePositionCommand, {
4972
4949
  type: T;
4973
- }> | Extract<DeleteSheetConfirmationCommand, {
4974
- type: T;
4975
4950
  }> | Extract<ActivateSheetCommand, {
4976
4951
  type: T;
4977
4952
  }> | Extract<StartSelectionCommand, {
@@ -5056,6 +5031,10 @@ declare class FiguresContainer extends Component<{
5056
5031
  type: T;
5057
5032
  }> | Extract<SetViewportOffsetCommand, {
5058
5033
  type: T;
5034
+ }> | Extract<MoveViewportDownCommand, {
5035
+ type: T;
5036
+ }> | Extract<MoveViewportUpCommand, {
5037
+ type: T;
5059
5038
  }> | Extract<EvaluateAllSheetsCommand, {
5060
5039
  type: T;
5061
5040
  }> | Extract<ActivateNextSheetCommand, {
@@ -5063,7 +5042,7 @@ declare class FiguresContainer extends Component<{
5063
5042
  }> | Extract<ActivatePreviousSheetCommand, {
5064
5043
  type: T;
5065
5044
  }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
5066
- <T_1 extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "DELETE_SHEET_CONFIRMATION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C_1 extends Extract<UpdateCellCommand, {
5045
+ <T_1 extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C_1 extends Extract<UpdateCellCommand, {
5067
5046
  type: T_1;
5068
5047
  }> | Extract<UpdateCellPositionCommand, {
5069
5048
  type: T_1;
@@ -5163,8 +5142,6 @@ declare class FiguresContainer extends Component<{
5163
5142
  type: T_1;
5164
5143
  }> | Extract<MovePositionCommand, {
5165
5144
  type: T_1;
5166
- }> | Extract<DeleteSheetConfirmationCommand, {
5167
- type: T_1;
5168
5145
  }> | Extract<ActivateSheetCommand, {
5169
5146
  type: T_1;
5170
5147
  }> | Extract<StartSelectionCommand, {
@@ -5249,6 +5226,10 @@ declare class FiguresContainer extends Component<{
5249
5226
  type: T_1;
5250
5227
  }> | Extract<SetViewportOffsetCommand, {
5251
5228
  type: T_1;
5229
+ }> | Extract<MoveViewportDownCommand, {
5230
+ type: T_1;
5231
+ }> | Extract<MoveViewportUpCommand, {
5232
+ type: T_1;
5252
5233
  }> | Extract<EvaluateAllSheetsCommand, {
5253
5234
  type: T_1;
5254
5235
  }> | Extract<ActivateNextSheetCommand, {
@@ -5260,19 +5241,20 @@ declare class FiguresContainer extends Component<{
5260
5241
  getVisibleFigures(): FigureInfo[];
5261
5242
  getDims(info: FigureInfo): string;
5262
5243
  getStyle(info: FigureInfo): string;
5263
- mounted(): void;
5244
+ setup(): void;
5264
5245
  resize(figure: Figure, dirX: number, dirY: number, ev: MouseEvent): void;
5265
5246
  onMouseDown(figure: Figure, ev: MouseEvent): void;
5266
5247
  onKeyDown(figure: Figure, ev: KeyboardEvent): void;
5267
5248
  }
5268
5249
 
5269
5250
  declare type Orientation$1 = "n" | "s" | "w" | "e";
5270
- interface Props$6 {
5251
+ interface Props$7 {
5271
5252
  zone: Zone;
5272
5253
  orientation: Orientation$1;
5273
5254
  isMoving: boolean;
5255
+ onMoveHighlight: (x: number, y: number) => void;
5274
5256
  }
5275
- declare class Border extends Component<Props$6, SpreadsheetEnv> {
5257
+ declare class Border extends Component<Props$7, SpreadsheetEnv> {
5276
5258
  static template: string;
5277
5259
  static style: string;
5278
5260
  get style(): string;
@@ -5280,13 +5262,14 @@ declare class Border extends Component<Props$6, SpreadsheetEnv> {
5280
5262
  }
5281
5263
 
5282
5264
  declare type Orientation = "nw" | "ne" | "sw" | "se";
5283
- interface Props$5 {
5265
+ interface Props$6 {
5284
5266
  zone: Zone;
5285
5267
  color: string;
5286
5268
  orientation: Orientation;
5287
5269
  isResizing: boolean;
5270
+ onResizeHighlight: (isLeft: boolean, isRight: boolean) => void;
5288
5271
  }
5289
- declare class Corner extends Component<Props$5, SpreadsheetEnv> {
5272
+ declare class Corner extends Component<Props$6, SpreadsheetEnv> {
5290
5273
  static template: string;
5291
5274
  static style: string;
5292
5275
  private isTop;
@@ -5295,22 +5278,22 @@ declare class Corner extends Component<Props$5, SpreadsheetEnv> {
5295
5278
  onMouseDown(ev: MouseEvent): void;
5296
5279
  }
5297
5280
 
5298
- interface Props$4 {
5281
+ interface Props$5 {
5299
5282
  zone: Zone;
5300
5283
  color: string;
5301
5284
  }
5302
5285
  interface HighlightState {
5303
5286
  shiftingMode: "isMoving" | "isResizing" | "none";
5304
5287
  }
5305
- declare class Highlight extends Component<Props$4, SpreadsheetEnv> {
5288
+ declare class Highlight extends Component<Props$5, SpreadsheetEnv> {
5306
5289
  static template: string;
5307
5290
  static components: {
5308
5291
  Corner: typeof Corner;
5309
5292
  Border: typeof Border;
5310
5293
  };
5311
5294
  highlightState: HighlightState;
5312
- onResizeHighlight(ev: CustomEvent): void;
5313
- onMoveHighlight(ev: CustomEvent): void;
5295
+ onResizeHighlight(isLeft: boolean, isTop: boolean): void;
5296
+ onMoveHighlight(clientX: number, clientY: number): void;
5314
5297
  }
5315
5298
 
5316
5299
  declare class LinkDisplay extends Component<{
@@ -5322,7 +5305,7 @@ declare class LinkDisplay extends Component<{
5322
5305
  };
5323
5306
  static style: string;
5324
5307
  private getters;
5325
- get cell(): LinkCell;
5308
+ get cell(): LinkCell$1;
5326
5309
  openLink(): void;
5327
5310
  edit(): void;
5328
5311
  unlink(): void;
@@ -5330,6 +5313,7 @@ declare class LinkDisplay extends Component<{
5330
5313
 
5331
5314
  interface LinkEditorProps {
5332
5315
  cellPosition: Position$1;
5316
+ onLinkEditorClosed: () => void;
5333
5317
  }
5334
5318
  interface State$1 {
5335
5319
  link: Link;
@@ -5348,7 +5332,7 @@ declare class LinkEditor extends Component<LinkEditorProps, SpreadsheetEnv> {
5348
5332
  private menu;
5349
5333
  private position;
5350
5334
  private urlInput;
5351
- mounted(): void;
5335
+ setup(): void;
5352
5336
  get defaultState(): State$1;
5353
5337
  get menuPosition(): DOMCoordinates;
5354
5338
  onSpecialLink(ev: CustomEvent<State$1>): void;
@@ -5366,7 +5350,7 @@ declare abstract class AbstractResizer extends Component<any, SpreadsheetEnv> {
5366
5350
  lastSelectedElementIndex: number | null;
5367
5351
  getters: Getters;
5368
5352
  dispatch: {
5369
- <T extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "DELETE_SHEET_CONFIRMATION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C extends Extract<UpdateCellCommand, {
5353
+ <T extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C extends Extract<UpdateCellCommand, {
5370
5354
  type: T;
5371
5355
  }> | Extract<UpdateCellPositionCommand, {
5372
5356
  type: T;
@@ -5466,8 +5450,6 @@ declare abstract class AbstractResizer extends Component<any, SpreadsheetEnv> {
5466
5450
  type: T;
5467
5451
  }> | Extract<MovePositionCommand, {
5468
5452
  type: T;
5469
- }> | Extract<DeleteSheetConfirmationCommand, {
5470
- type: T;
5471
5453
  }> | Extract<ActivateSheetCommand, {
5472
5454
  type: T;
5473
5455
  }> | Extract<StartSelectionCommand, {
@@ -5552,6 +5534,10 @@ declare abstract class AbstractResizer extends Component<any, SpreadsheetEnv> {
5552
5534
  type: T;
5553
5535
  }> | Extract<SetViewportOffsetCommand, {
5554
5536
  type: T;
5537
+ }> | Extract<MoveViewportDownCommand, {
5538
+ type: T;
5539
+ }> | Extract<MoveViewportUpCommand, {
5540
+ type: T;
5555
5541
  }> | Extract<EvaluateAllSheetsCommand, {
5556
5542
  type: T;
5557
5543
  }> | Extract<ActivateNextSheetCommand, {
@@ -5559,7 +5545,7 @@ declare abstract class AbstractResizer extends Component<any, SpreadsheetEnv> {
5559
5545
  }> | Extract<ActivatePreviousSheetCommand, {
5560
5546
  type: T;
5561
5547
  }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
5562
- <T_1 extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "DELETE_SHEET_CONFIRMATION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C_1 extends Extract<UpdateCellCommand, {
5548
+ <T_1 extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C_1 extends Extract<UpdateCellCommand, {
5563
5549
  type: T_1;
5564
5550
  }> | Extract<UpdateCellPositionCommand, {
5565
5551
  type: T_1;
@@ -5659,8 +5645,6 @@ declare abstract class AbstractResizer extends Component<any, SpreadsheetEnv> {
5659
5645
  type: T_1;
5660
5646
  }> | Extract<MovePositionCommand, {
5661
5647
  type: T_1;
5662
- }> | Extract<DeleteSheetConfirmationCommand, {
5663
- type: T_1;
5664
5648
  }> | Extract<ActivateSheetCommand, {
5665
5649
  type: T_1;
5666
5650
  }> | Extract<StartSelectionCommand, {
@@ -5745,6 +5729,10 @@ declare abstract class AbstractResizer extends Component<any, SpreadsheetEnv> {
5745
5729
  type: T_1;
5746
5730
  }> | Extract<SetViewportOffsetCommand, {
5747
5731
  type: T_1;
5732
+ }> | Extract<MoveViewportDownCommand, {
5733
+ type: T_1;
5734
+ }> | Extract<MoveViewportUpCommand, {
5735
+ type: T_1;
5748
5736
  }> | Extract<EvaluateAllSheetsCommand, {
5749
5737
  type: T_1;
5750
5738
  }> | Extract<ActivateNextSheetCommand, {
@@ -5893,13 +5881,16 @@ interface HoveredPosition {
5893
5881
  col?: number;
5894
5882
  row?: number;
5895
5883
  }
5896
- interface Props$3 {
5884
+ interface Props$4 {
5897
5885
  sidePanelIsOpen: boolean;
5898
5886
  model: Model;
5899
5887
  linkEditorIsOpen: boolean;
5900
5888
  exposeFocus: (focus: () => void) => void;
5889
+ onComposerContentFocused: () => void;
5890
+ onGridComposerCellFocused: (content?: string, selection?: ComposerSelection) => void;
5891
+ onLinkEditorClosed: () => void;
5901
5892
  }
5902
- declare class Grid extends Component<Props$3, SpreadsheetEnv> {
5893
+ declare class Grid extends Component<Props$4, SpreadsheetEnv> {
5903
5894
  static template: string;
5904
5895
  static style: string;
5905
5896
  static components: {
@@ -5927,7 +5918,11 @@ declare class Grid extends Component<Props$3, SpreadsheetEnv> {
5927
5918
  private currentSheet;
5928
5919
  private clickedCol;
5929
5920
  private clickedRow;
5921
+ private clipBoardString;
5930
5922
  hoveredCell: HoveredPosition;
5923
+ constructor();
5924
+ setup(): void;
5925
+ private initGrid;
5931
5926
  get errorTooltip(): {
5932
5927
  isOpen: boolean;
5933
5928
  position?: undefined;
@@ -5957,9 +5952,6 @@ declare class Grid extends Component<Props$3, SpreadsheetEnv> {
5957
5952
  cellHeight: number;
5958
5953
  };
5959
5954
  private keyDownMapping;
5960
- constructor();
5961
- mounted(): void;
5962
- patched(): void;
5963
5955
  focus(): void;
5964
5956
  resizeGrid(): void;
5965
5957
  onScroll(): void;
@@ -5987,22 +5979,24 @@ declare class Grid extends Component<Props$3, SpreadsheetEnv> {
5987
5979
  onKeydown(ev: KeyboardEvent): void;
5988
5980
  onInputContextMenu(ev: MouseEvent): void;
5989
5981
  onCanvasContextMenu(ev: MouseEvent): void;
5990
- onOverlayContextMenu(ev: CustomEvent): void;
5991
5982
  toggleContextMenu(type: ContextMenuType, x: number, y: number): void;
5983
+ copy(cut: boolean, ev: ClipboardEvent): void;
5984
+ paste(ev: ClipboardEvent): void;
5992
5985
  closeMenu(): void;
5993
5986
  }
5994
5987
 
5995
- interface Props$2 {
5988
+ interface Props$3 {
5996
5989
  component: string;
5997
5990
  panelProps: any;
5991
+ onCloseSidePanel: () => void;
5998
5992
  }
5999
- declare class SidePanel extends Component<Props$2, SpreadsheetEnv> {
5993
+ declare class SidePanel extends Component<Props$3, SpreadsheetEnv> {
6000
5994
  static template: string;
6001
5995
  static style: string;
6002
5996
  state: {
6003
5997
  panel: SidePanelContent;
6004
5998
  };
6005
- willUpdateProps(nextProps: Props$2): Promise<void>;
5999
+ setup(): void;
6006
6000
  getTitle(): string;
6007
6001
  }
6008
6002
 
@@ -6011,10 +6005,11 @@ interface FontSize {
6011
6005
  px: number;
6012
6006
  }
6013
6007
 
6014
- interface Props$1 {
6008
+ interface Props$2 {
6015
6009
  dropdownDirection?: "left" | "right" | "center";
6010
+ onColorPicked: (color: string) => void;
6016
6011
  }
6017
- declare class ColorPicker extends Component<Props$1, SpreadsheetEnv> {
6012
+ declare class ColorPicker extends Component<Props$2, SpreadsheetEnv> {
6018
6013
  static template: string;
6019
6014
  static style: string;
6020
6015
  COLORS: string[][];
@@ -6026,7 +6021,15 @@ interface State {
6026
6021
  menuState: MenuState;
6027
6022
  activeTool: Tool;
6028
6023
  }
6029
- declare class TopBar extends Component<any, SpreadsheetEnv> {
6024
+ interface Props$1 {
6025
+ onClick: () => void;
6026
+ focusComposer: Omit<ComposerFocusType, "cellFocus">;
6027
+ onComposerContentFocused: (selection: {
6028
+ start: number;
6029
+ end: number;
6030
+ }) => void;
6031
+ }
6032
+ declare class TopBar extends Component<Props$1, SpreadsheetEnv> {
6030
6033
  static template: string;
6031
6034
  static style: string;
6032
6035
  static components: {
@@ -6046,7 +6049,7 @@ declare class TopBar extends Component<any, SpreadsheetEnv> {
6046
6049
  currentFormat: string;
6047
6050
  fontSizes: FontSize[];
6048
6051
  dispatch: {
6049
- <T extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "DELETE_SHEET_CONFIRMATION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C extends Extract<UpdateCellCommand, {
6052
+ <T extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C extends Extract<UpdateCellCommand, {
6050
6053
  type: T;
6051
6054
  }> | Extract<UpdateCellPositionCommand, {
6052
6055
  type: T;
@@ -6146,8 +6149,6 @@ declare class TopBar extends Component<any, SpreadsheetEnv> {
6146
6149
  type: T;
6147
6150
  }> | Extract<MovePositionCommand, {
6148
6151
  type: T;
6149
- }> | Extract<DeleteSheetConfirmationCommand, {
6150
- type: T;
6151
6152
  }> | Extract<ActivateSheetCommand, {
6152
6153
  type: T;
6153
6154
  }> | Extract<StartSelectionCommand, {
@@ -6232,6 +6233,10 @@ declare class TopBar extends Component<any, SpreadsheetEnv> {
6232
6233
  type: T;
6233
6234
  }> | Extract<SetViewportOffsetCommand, {
6234
6235
  type: T;
6236
+ }> | Extract<MoveViewportDownCommand, {
6237
+ type: T;
6238
+ }> | Extract<MoveViewportUpCommand, {
6239
+ type: T;
6235
6240
  }> | Extract<EvaluateAllSheetsCommand, {
6236
6241
  type: T;
6237
6242
  }> | Extract<ActivateNextSheetCommand, {
@@ -6239,7 +6244,7 @@ declare class TopBar extends Component<any, SpreadsheetEnv> {
6239
6244
  }> | Extract<ActivatePreviousSheetCommand, {
6240
6245
  type: T;
6241
6246
  }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
6242
- <T_1 extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "DELETE_SHEET_CONFIRMATION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C_1 extends Extract<UpdateCellCommand, {
6247
+ <T_1 extends "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" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CUT_AND_PASTE" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "MOVE_POSITION" | "START_SELECTION" | "START_SELECTION_EXPANSION" | "PREPARE_SELECTION_EXPANSION" | "STOP_SELECTION" | "SELECT_CELL" | "SET_SELECTION" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_ALL" | "ALTER_SELECTION" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_VIEWPORT" | "REFRESH_CHART" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "EVALUATE_ALL_SHEETS" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET", C_1 extends Extract<UpdateCellCommand, {
6243
6248
  type: T_1;
6244
6249
  }> | Extract<UpdateCellPositionCommand, {
6245
6250
  type: T_1;
@@ -6339,8 +6344,6 @@ declare class TopBar extends Component<any, SpreadsheetEnv> {
6339
6344
  type: T_1;
6340
6345
  }> | Extract<MovePositionCommand, {
6341
6346
  type: T_1;
6342
- }> | Extract<DeleteSheetConfirmationCommand, {
6343
- type: T_1;
6344
6347
  }> | Extract<ActivateSheetCommand, {
6345
6348
  type: T_1;
6346
6349
  }> | Extract<StartSelectionCommand, {
@@ -6425,6 +6428,10 @@ declare class TopBar extends Component<any, SpreadsheetEnv> {
6425
6428
  type: T_1;
6426
6429
  }> | Extract<SetViewportOffsetCommand, {
6427
6430
  type: T_1;
6431
+ }> | Extract<MoveViewportDownCommand, {
6432
+ type: T_1;
6433
+ }> | Extract<MoveViewportUpCommand, {
6434
+ type: T_1;
6428
6435
  }> | Extract<EvaluateAllSheetsCommand, {
6429
6436
  type: T_1;
6430
6437
  }> | Extract<ActivateNextSheetCommand, {
@@ -6446,12 +6453,9 @@ declare class TopBar extends Component<any, SpreadsheetEnv> {
6446
6453
  fillColor: string;
6447
6454
  textColor: string;
6448
6455
  menus: FullMenuItem[];
6449
- private menuRef;
6450
6456
  composerStyle: string;
6451
- constructor();
6457
+ setup(): void;
6452
6458
  get topbarComponents(): TopbarComponent[];
6453
- willStart(): Promise<void>;
6454
- willUpdateProps(): Promise<void>;
6455
6459
  onClick(ev: MouseEvent): void;
6456
6460
  toogleStyle(style: string): void;
6457
6461
  toogleFormat(format: string): void;
@@ -6463,7 +6467,7 @@ declare class TopBar extends Component<any, SpreadsheetEnv> {
6463
6467
  updateCellState(): void;
6464
6468
  getMenuName(menu: FullMenuItem): string;
6465
6469
  toggleMerge(): void;
6466
- setColor(target: string, ev: CustomEvent): void;
6470
+ setColor(target: string, color: string): void;
6467
6471
  setBorder(command: BorderCommand): void;
6468
6472
  setFormat(ev: MouseEvent): void;
6469
6473
  setDecimal(step: number): void;
@@ -6475,6 +6479,7 @@ declare class TopBar extends Component<any, SpreadsheetEnv> {
6475
6479
  redo(): void;
6476
6480
  }
6477
6481
 
6482
+ declare type ComposerFocusType = "inactive" | "cellFocus" | "contentFocus";
6478
6483
  interface Props {
6479
6484
  client?: Client;
6480
6485
  data?: any;
@@ -6495,7 +6500,6 @@ declare class Spreadsheet extends Component<Props, SpreadsheetEnv> {
6495
6500
  };
6496
6501
  static _t: (s: string) => string;
6497
6502
  model: Model;
6498
- private grid;
6499
6503
  sidePanel: {
6500
6504
  isOpen: boolean;
6501
6505
  component?: string | undefined;
@@ -6509,14 +6513,14 @@ declare class Spreadsheet extends Component<Props, SpreadsheetEnv> {
6509
6513
  gridFocusMode: "inactive" | "cellFocus" | "contentFocus";
6510
6514
  };
6511
6515
  private _focusGrid?;
6512
- private clipBoardString;
6513
6516
  private keyDownMapping;
6514
6517
  constructor(parent?: Component<any, SpreadsheetEnv> | null, props?: Props);
6515
- get focusTopBarComposer(): "inactive" | "contentFocus";
6516
- get focusGridComposer(): "inactive" | "cellFocus" | "contentFocus";
6517
- mounted(): void;
6518
- willUnmount(): void;
6519
- willUpdateProps(nextProps: Props): Promise<void>;
6518
+ setup(): void;
6519
+ get focusTopBarComposer(): Omit<ComposerFocusType, "cellFocus">;
6520
+ get focusGridComposer(): ComposerFocusType;
6521
+ initiateModelEvents(): void;
6522
+ private onNotifyUI;
6523
+ checkReadonly(nextProps: Props): void;
6520
6524
  private leaveCollaborativeSession;
6521
6525
  private activateFirstSheet;
6522
6526
  destroy(): void;
@@ -6526,14 +6530,12 @@ declare class Spreadsheet extends Component<Props, SpreadsheetEnv> {
6526
6530
  closeLinkEditor(): void;
6527
6531
  toggleSidePanel(panel: string, panelProps: any): void;
6528
6532
  focusGrid(): void;
6529
- copy(cut: boolean, ev: ClipboardEvent): void;
6530
- paste(ev: ClipboardEvent): void;
6531
6533
  save(): void;
6532
6534
  onKeyup(ev: KeyboardEvent): void;
6533
6535
  onKeydown(ev: KeyboardEvent): void;
6534
- onTopBarComposerFocused(ev: ComposerFocusedEvent): void;
6535
- onGridComposerContentFocused(ev: ComposerFocusedEvent): void;
6536
- onGridComposerCellFocused(ev: ComposerFocusedEvent): void;
6536
+ onTopBarComposerFocused(selection: ComposerSelection): void;
6537
+ onGridComposerContentFocused(): void;
6538
+ onGridComposerCellFocused(content?: string, selection?: ComposerSelection): void;
6537
6539
  /**
6538
6540
  * Start the edition or update the content if it's already started.
6539
6541
  */
@@ -6580,7 +6582,7 @@ declare const registries: {
6580
6582
  cellRegistry: Registry<CellBuilder>;
6581
6583
  };
6582
6584
  declare const cellTypes: {
6583
- LinkCell: typeof LinkCell$1;
6585
+ LinkCell: typeof LinkCell;
6584
6586
  };
6585
6587
  declare const helpers: {
6586
6588
  args: typeof args;
@@ -6601,4 +6603,4 @@ declare const helpers: {
6601
6603
  createEmptyWorkbookData: typeof createEmptyWorkbookData;
6602
6604
  };
6603
6605
 
6604
- export { CancelledReason, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DATETIME_FORMAT, DataSource, DispatchResult, Model, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, TransportService, UIPlugin, DEBUG as __DEBUG__, __info__, astToFormula, cellTypes, convertAstNodes, coreTypes, functionCache, helpers, invalidateEvaluationCommands, normalize, parse, readonlyAllowedCommands, registries, setTranslationMethod };
6606
+ export { CancelledReason, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DATETIME_FORMAT, DataSource, DispatchResult, Model, Registry, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, TransportService, UIPlugin, DEBUG as __DEBUG__, __info__, astToFormula, cellTypes, compile, convertAstNodes, coreTypes, functionCache, helpers, invalidateEvaluationCommands, parse, readonlyAllowedCommands, registries, setTranslationMethod };