@odoo/o-spreadsheet 17.2.0-alpha.5 → 17.2.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import * as _odoo_owl from '@odoo/owl';
2
2
  import { ComponentConstructor, Component } from '@odoo/owl';
3
- import { ChartConfiguration, ChartData, ChartDataset, ChartOptions } from 'chart.js';
3
+ import { ChartConfiguration } from 'chart.js';
4
4
 
5
5
  /**
6
6
  * An injectable store constructor
@@ -226,9 +226,13 @@ interface FigureSize {
226
226
  width: Pixel;
227
227
  height: Pixel;
228
228
  }
229
+ interface ExcelFigureSize {
230
+ cx: number;
231
+ cy: number;
232
+ }
229
233
  type ResizeDirection = -1 | 0 | 1;
230
234
 
231
- interface Image {
235
+ interface Image$1 {
232
236
  path: string;
233
237
  size: FigureSize;
234
238
  mimetype?: string;
@@ -298,52 +302,18 @@ interface SectionThreshold {
298
302
  readonly type: "number" | "percentage";
299
303
  readonly value: string;
300
304
  }
301
- interface GaugeChartConfiguration extends Omit<ChartConfiguration, "data" | "options"> {
302
- data?: GaugeChartData;
303
- options: GaugeChartOptions;
305
+ interface GaugeValue {
306
+ value: number;
307
+ label: string;
304
308
  }
305
309
  interface GaugeChartRuntime {
306
- chartJsConfig: GaugeChartConfiguration;
307
310
  background: Color;
308
- }
309
- interface GaugeChartData extends Omit<ChartData, "datasets"> {
310
- datasets: GaugeChartDataSets[];
311
- }
312
- interface GaugeChartDataSets extends ChartDataset<"doughnut"> {
313
- readonly minValue?: number;
314
- readonly value?: number | undefined;
315
- readonly backgroundColor?: string[];
316
- }
317
- interface GaugeChartOptions extends ChartOptions {
318
- needle?: NeedleOptions;
319
- valueLabel?: ValueLabelOptions;
320
- }
321
- interface NeedleOptions {
322
- display?: boolean;
323
- borderColor?: Color;
324
- backgroundColor?: Color;
325
- /**
326
- * Needle width as the percentage of the chart area width
327
- */
328
- width?: number;
329
- }
330
- interface ValueLabelOptions {
331
- display?: boolean;
332
- formatter?: (value: any) => string;
333
- font?: {
334
- size?: number;
335
- family?: string;
336
- color?: Color;
337
- };
338
- backgroundColor?: Color;
339
- borderColor?: Color;
340
- borderRadius?: number;
341
- padding?: {
342
- left: number;
343
- right: number;
344
- top: number;
345
- bottom: number;
346
- };
311
+ title: string;
312
+ minValue: GaugeValue;
313
+ maxValue: GaugeValue;
314
+ gaugeValue?: GaugeValue;
315
+ inflectionValues: GaugeValue[];
316
+ colors: Color[];
347
317
  }
348
318
 
349
319
  interface LineChartDefinition {
@@ -414,8 +384,21 @@ interface ScorecardChartRuntime {
414
384
  declare const CHART_TYPES: readonly ["line", "bar", "pie", "scorecard", "gauge", "scatter"];
415
385
  type ChartType = (typeof CHART_TYPES)[number];
416
386
  type ChartDefinition = LineChartDefinition | PieChartDefinition | BarChartDefinition | ScorecardChartDefinition | GaugeChartDefinition | ScatterChartDefinition;
417
- type ChartJSRuntime = LineChartRuntime | PieChartRuntime | BarChartRuntime | GaugeChartRuntime | ScatterChartRuntime;
418
- type ChartRuntime = ChartJSRuntime | ScorecardChartRuntime;
387
+ type ChartJSRuntime = LineChartRuntime | PieChartRuntime | BarChartRuntime | ScatterChartRuntime;
388
+ type ChartRuntime = ChartJSRuntime | ScorecardChartRuntime | GaugeChartRuntime;
389
+ interface LabelValues {
390
+ readonly values: string[];
391
+ readonly formattedValues: string[];
392
+ }
393
+ interface DatasetValues {
394
+ readonly label?: string;
395
+ readonly data: any[];
396
+ }
397
+ type AxisType = "category" | "linear" | "time";
398
+ interface DataSet {
399
+ readonly labelCell?: Range;
400
+ readonly dataRange: Range;
401
+ }
419
402
  interface ExcelChartDataset {
420
403
  readonly label?: string;
421
404
  readonly range: string;
@@ -453,6 +436,7 @@ interface ClipboardOptions {
453
436
  isCutOperation?: boolean;
454
437
  }
455
438
  type ClipboardPasteOptions = "onlyFormat" | "asValue";
439
+ type ClipboardOperation = "CUT" | "COPY";
456
440
  type ClipboardCellData = {
457
441
  zones: Zone[];
458
442
  rowsIndexes: HeaderIndex[];
@@ -497,6 +481,56 @@ interface SearchOptions {
497
481
  specificRange?: Range;
498
482
  }
499
483
 
484
+ interface Table {
485
+ readonly id: TableId;
486
+ readonly range: Range;
487
+ readonly filters: Filter[];
488
+ readonly config: TableConfig;
489
+ }
490
+ interface Filter {
491
+ readonly id: UID;
492
+ readonly rangeWithHeaders: Range;
493
+ readonly col: number;
494
+ /** The filtered zone doesn't includes the headers of the table */
495
+ readonly filteredRange: Range | undefined;
496
+ }
497
+ interface TableConfig {
498
+ hasFilters: boolean;
499
+ totalRow: boolean;
500
+ firstColumn: boolean;
501
+ lastColumn: boolean;
502
+ numberOfHeaders: number;
503
+ bandedRows: boolean;
504
+ bandedColumns: boolean;
505
+ styleId: string;
506
+ }
507
+ interface ComputedTableStyle {
508
+ borders: Border$1[][];
509
+ styles: Style[][];
510
+ }
511
+ interface TableElementStyle {
512
+ border?: TableBorder;
513
+ style?: Style;
514
+ size?: number;
515
+ }
516
+ interface TableBorder extends Border$1 {
517
+ horizontal?: BorderDescr;
518
+ vertical?: BorderDescr;
519
+ }
520
+ interface TableStyle {
521
+ category: string;
522
+ colorName: string;
523
+ wholeTable?: TableElementStyle;
524
+ firstColumnStripe?: TableElementStyle;
525
+ secondColumnStripe?: TableElementStyle;
526
+ firstRowStripe?: TableElementStyle;
527
+ secondRowStripe?: TableElementStyle;
528
+ firstColumn?: TableElementStyle;
529
+ lastColumn?: TableElementStyle;
530
+ headerRow?: TableElementStyle;
531
+ totalRow?: TableElementStyle;
532
+ }
533
+
500
534
  /**
501
535
  * There are two kinds of commands: CoreCommands and LocalCommands
502
536
  *
@@ -521,18 +555,22 @@ interface SearchOptions {
521
555
  interface SheetDependentCommand {
522
556
  sheetId: UID;
523
557
  }
558
+ declare function isSheetDependent(cmd: CoreCommand): boolean;
524
559
  interface HeadersDependentCommand {
525
560
  sheetId: UID;
526
561
  dimension: Dimension;
527
562
  elements: HeaderIndex[];
528
563
  }
564
+ declare function isHeadersDependant(cmd: CoreCommand): boolean;
529
565
  interface TargetDependentCommand {
530
566
  sheetId: UID;
531
567
  target: Zone[];
532
568
  }
569
+ declare function isTargetDependent(cmd: CoreCommand): boolean;
533
570
  interface RangesDependentCommand {
534
571
  ranges: RangeData[];
535
572
  }
573
+ declare function isRangeDependant(cmd: CoreCommand): boolean;
536
574
  interface PositionDependentCommand {
537
575
  sheetId: UID;
538
576
  col: number;
@@ -542,11 +580,15 @@ interface ZoneDependentCommand {
542
580
  sheetId: UID;
543
581
  zone: Zone;
544
582
  }
545
- declare const invalidateEvaluationCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS">;
546
- declare const invalidateDependenciesCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS">;
547
- declare const invalidateCFEvaluationCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS">;
548
- declare const readonlyAllowedCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS">;
549
- declare const coreTypes: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE">;
583
+ declare function isZoneDependent(cmd: CoreCommand): boolean;
584
+ declare function isPositionDependent(cmd: CoreCommand): boolean;
585
+ declare const invalidateEvaluationCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS">;
586
+ declare const invalidateDependenciesCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS">;
587
+ declare const invalidateCFEvaluationCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS">;
588
+ declare const readonlyAllowedCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS">;
589
+ declare const coreTypes: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE">;
590
+ declare function isCoreCommand(cmd: Command): cmd is CoreCommand;
591
+ declare function canExecuteInReadonly(cmd: Command): boolean;
550
592
  interface UpdateCellCommand extends PositionDependentCommand {
551
593
  type: "UPDATE_CELL";
552
594
  content?: string;
@@ -712,13 +754,22 @@ interface CreateImageOverCommand extends SheetDependentCommand {
712
754
  figureId: UID;
713
755
  position: DOMCoordinates;
714
756
  size: FigureSize;
715
- definition: Image;
757
+ definition: Image$1;
758
+ }
759
+ interface CreateTableCommand extends RangesDependentCommand {
760
+ type: "CREATE_TABLE";
761
+ sheetId: UID;
762
+ config?: TableConfig;
716
763
  }
717
- interface CreateFilterTableCommand extends TargetDependentCommand {
718
- type: "CREATE_FILTER_TABLE";
764
+ interface RemoveTableCommand extends TargetDependentCommand {
765
+ type: "REMOVE_TABLE";
719
766
  }
720
- interface RemoveFilterTableCommand extends TargetDependentCommand {
721
- type: "REMOVE_FILTER_TABLE";
767
+ interface UpdateTableCommand {
768
+ type: "UPDATE_TABLE";
769
+ zone: Zone;
770
+ sheetId: UID;
771
+ newTableRange?: RangeData;
772
+ config?: Partial<TableConfig>;
722
773
  }
723
774
  interface UpdateFilterCommand extends PositionDependentCommand {
724
775
  type: "UPDATE_FILTER";
@@ -1027,7 +1078,7 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
1027
1078
  /** IMAGE */
1028
1079
  | CreateImageOverCommand
1029
1080
  /** FILTERS */
1030
- | CreateFilterTableCommand | RemoveFilterTableCommand
1081
+ | CreateTableCommand | RemoveTableCommand | UpdateTableCommand
1031
1082
  /** HEADER GROUP */
1032
1083
  | GroupHeadersCommand | UnGroupHeadersCommand | UnfoldHeaderGroupCommand | FoldHeaderGroupCommand | FoldAllHeaderGroupsCommand | UnfoldAllHeaderGroupsCommand | UnfoldHeaderGroupsInZoneCommand | FoldHeaderGroupsInZoneCommand
1033
1084
  /** DATA VALIDATION */
@@ -1136,9 +1187,11 @@ declare const enum CommandResult {
1136
1187
  FrozenPaneOverlap = "FrozenPaneOverlap",
1137
1188
  ValuesNotChanged = "ValuesNotChanged",
1138
1189
  InvalidFilterZone = "InvalidFilterZone",
1139
- FilterOverlap = "FilterOverlap",
1190
+ TableNotFound = "TableNotFound",
1191
+ TableOverlap = "TableOverlap",
1192
+ InvalidTableConfig = "InvalidTableConfig",
1140
1193
  FilterNotFound = "FilterNotFound",
1141
- MergeInFilter = "MergeInFilter",
1194
+ MergeInTable = "MergeInTable",
1142
1195
  NonContinuousTargets = "NonContinuousTargets",
1143
1196
  DuplicatedFigureId = "DuplicatedFigureId",
1144
1197
  InvalidSelectionStep = "InvalidSelectionStep",
@@ -1199,6 +1252,7 @@ interface CoreCommandDispatcher {
1199
1252
  type CommandTypes = Command["type"];
1200
1253
  type CoreCommandTypes = CoreCommand["type"];
1201
1254
  type CoreViewCommand = CoreCommand | EvaluateCellsCommand | UndoCommand | RedoCommand;
1255
+ type CoreViewCommandTypes = CoreViewCommand["type"];
1202
1256
 
1203
1257
  /**
1204
1258
  * The following type is meant to be used in union with other aliases to prevent
@@ -1211,7 +1265,7 @@ type Pixel = number & Alias;
1211
1265
  type UID = string & Alias;
1212
1266
  type SetDecimalStep = 1 | -1;
1213
1267
  type FilterId = UID & Alias;
1214
- type FilterTableId = UID & Alias;
1268
+ type TableId = UID & Alias;
1215
1269
  /**
1216
1270
  * CSS style color string
1217
1271
  * e.g. "#ABC", "#AAAFFF", "rgb(30, 80, 16)"
@@ -1223,6 +1277,12 @@ interface RGBA {
1223
1277
  g: number;
1224
1278
  b: number;
1225
1279
  }
1280
+ interface HSLA {
1281
+ a: number;
1282
+ h: number;
1283
+ s: number;
1284
+ l: number;
1285
+ }
1226
1286
  interface Link {
1227
1287
  readonly label: string;
1228
1288
  readonly url: string;
@@ -1330,8 +1390,18 @@ type FPayload = {
1330
1390
  format?: Format;
1331
1391
  message?: string;
1332
1392
  };
1393
+ type FPayloadNumber = {
1394
+ value: number;
1395
+ format?: string;
1396
+ };
1333
1397
  type Arg = Maybe<FPayload> | Matrix<FPayload>;
1334
1398
  declare function isMatrix(x: any): x is Matrix<any>;
1399
+ interface ClipboardCell {
1400
+ cell?: Cell;
1401
+ evaluatedCell: EvaluatedCell;
1402
+ border?: Border$1;
1403
+ position: CellPosition;
1404
+ }
1335
1405
  interface HeaderDimensions {
1336
1406
  start: Pixel;
1337
1407
  size: Pixel;
@@ -1358,6 +1428,8 @@ interface Highlight$1 {
1358
1428
  color: Color;
1359
1429
  interactive?: boolean;
1360
1430
  noFill?: boolean;
1431
+ /** transparency of the fill color (0-1) */
1432
+ fillAlpha?: number;
1361
1433
  }
1362
1434
  interface PaneDivision {
1363
1435
  /** Represents the number of frozen columns */
@@ -1390,6 +1462,7 @@ interface RangeProvider {
1390
1462
  adaptRanges: (applyChange: ApplyRangeChange, sheetId?: UID) => void;
1391
1463
  }
1392
1464
  type Validation<T> = (toValidate: T) => CommandResult | CommandResult[];
1465
+ type Increment = 1 | -1 | 0;
1393
1466
  interface Ref<T> {
1394
1467
  el: T | null;
1395
1468
  }
@@ -1448,6 +1521,10 @@ interface HeaderGroup {
1448
1521
  }
1449
1522
  type Direction$1 = "up" | "down" | "left" | "right";
1450
1523
  type SelectionStep = number | "end";
1524
+ interface Offset {
1525
+ col: number;
1526
+ row: number;
1527
+ }
1451
1528
  type DebouncedFunction<T> = T & {
1452
1529
  stopDebounce: () => void;
1453
1530
  isDebouncePending: () => boolean;
@@ -1463,6 +1540,8 @@ interface Locale {
1463
1540
  timeFormat: string;
1464
1541
  formulaArgSeparator: string;
1465
1542
  }
1543
+ declare const DEFAULT_LOCALES: Locale[];
1544
+ declare const DEFAULT_LOCALE: Locale;
1466
1545
 
1467
1546
  type Format = string & Alias;
1468
1547
  type FormattedValue = string & Alias;
@@ -1470,6 +1549,7 @@ interface LocaleFormat {
1470
1549
  locale: Locale;
1471
1550
  format?: Format;
1472
1551
  }
1552
+ declare const PLAIN_TEXT_FORMAT: Format;
1473
1553
 
1474
1554
  interface CellAttributes {
1475
1555
  readonly id: UID;
@@ -1585,6 +1665,10 @@ interface AutofillResult {
1585
1665
  row: number;
1586
1666
  };
1587
1667
  }
1668
+ interface GeneratorCell {
1669
+ data: AutofillData;
1670
+ rule: AutofillModifier;
1671
+ }
1588
1672
  interface AutofillModifierImplementation {
1589
1673
  apply: (rule: AutofillModifier, data: AutofillData, getters: Getters, direction: DIRECTION) => Omit<AutofillResult, "origin">;
1590
1674
  }
@@ -1636,6 +1720,7 @@ interface SnapshotEvent {
1636
1720
  type: "snapshot";
1637
1721
  }
1638
1722
  type CollaborativeEvent = NewLocalStateUpdateEvent | UnexpectedRevisionIdEvent | RemoteRevisionReceivedEvent | RevisionAcknowledgedEvent | RevisionUndone | RevisionRedone | RevisionsDroppedEvent | SnapshotEvent | CollaborativeEventReceived;
1723
+ type CollaborativeEventTypes = CollaborativeEvent["type"];
1639
1724
 
1640
1725
  interface RevisionData {
1641
1726
  readonly id: UID;
@@ -1660,11 +1745,17 @@ type SingleColorRules = CellIsRule;
1660
1745
  interface SingleColorRule {
1661
1746
  style: Style;
1662
1747
  }
1748
+ interface TextRule extends SingleColorRule {
1749
+ text: string;
1750
+ }
1663
1751
  interface CellIsRule extends SingleColorRule {
1664
1752
  type: "CellIsRule";
1665
1753
  operator: ConditionalFormattingOperatorValues;
1666
1754
  values: string[];
1667
1755
  }
1756
+ interface ExpressionRule extends SingleColorRule {
1757
+ type: "ExpressionRule";
1758
+ }
1668
1759
  type ThresholdType = "value" | "number" | "percentage" | "percentile" | "formula";
1669
1760
  type ColorScaleThreshold = {
1670
1761
  color: number;
@@ -1698,6 +1789,45 @@ interface IconSetRule {
1698
1789
  upperInflectionPoint: IconThreshold;
1699
1790
  lowerInflectionPoint: IconThreshold;
1700
1791
  }
1792
+ interface ContainsTextRule extends TextRule {
1793
+ type: "ContainsTextRule";
1794
+ }
1795
+ interface NotContainsTextRule extends TextRule {
1796
+ type: "NotContainsTextRule";
1797
+ }
1798
+ interface BeginsWithRule extends TextRule {
1799
+ type: "BeginsWithRule";
1800
+ }
1801
+ interface EndsWithRule extends TextRule {
1802
+ type: "EndsWithRule";
1803
+ }
1804
+ interface containsBlanksRule extends TextRule {
1805
+ type: "containsBlanksRule";
1806
+ }
1807
+ interface notContainsBlanksRule extends TextRule {
1808
+ type: "notContainsBlanksRule";
1809
+ }
1810
+ interface containsErrorsRule extends SingleColorRule {
1811
+ type: "containsErrorsRule";
1812
+ }
1813
+ interface notContainsErrorsRule extends SingleColorRule {
1814
+ type: "notContainsErrorsRule";
1815
+ }
1816
+ interface TimePeriodRule extends SingleColorRule {
1817
+ type: "TimePeriodRule";
1818
+ timePeriod: string;
1819
+ }
1820
+ interface AboveAverageRule extends SingleColorRule {
1821
+ type: "AboveAverageRule";
1822
+ aboveAverage: boolean;
1823
+ equalAverage: boolean;
1824
+ }
1825
+ interface Top10Rule extends SingleColorRule {
1826
+ type: "Top10Rule";
1827
+ percent: boolean;
1828
+ bottom: boolean;
1829
+ rank: number;
1830
+ }
1701
1831
  type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";
1702
1832
 
1703
1833
  interface Currency {
@@ -1824,6 +1954,9 @@ type CustomFormulaCriterion = {
1824
1954
  type DataValidationCriterion = TextContainsCriterion | TextNotContainsCriterion | TextIsCriterion | TextIsEmailCriterion | TextIsLinkCriterion | IsBetweenCriterion | DateIsCriterion | DateIsBeforeCriterion | DateIsOnOrBeforeCriterion | DateIsAfterCriterion | DateIsOnOrAfterCriterion | DateIsBetweenCriterion | DateIsNotBetweenCriterion | DateIsValidCriterion | IsEqualCriterion | IsNotEqualCriterion | IsGreaterThanCriterion | IsGreaterOrEqualToCriterion | IsLessThanCriterion | IsLessOrEqualToCriterion | IsNotBetweenCriterion | IsCheckboxCriterion | IsValueInListCriterion | IsValueInRangeCriterion | CustomFormulaCriterion;
1825
1955
  type DateCriterionValue = "today" | "tomorrow" | "yesterday" | "lastWeek" | "lastMonth" | "lastYear" | "exactDate";
1826
1956
  type DataValidationCriterionType = DataValidationCriterion["type"];
1957
+ type DataValidationDateCriterion = Extract<DataValidationCriterion, {
1958
+ dateValue: DateCriterionValue;
1959
+ }>;
1827
1960
 
1828
1961
  type ClipboardReadResult = {
1829
1962
  status: "ok";
@@ -1858,10 +1991,14 @@ interface ImageProviderInterface {
1858
1991
  /**
1859
1992
  * RequestImage ask the user to input an image file. Then send it to a server trough an FileStore. Finally it return the path and the size of the image in the server.
1860
1993
  */
1861
- requestImage(): Promise<Image>;
1994
+ requestImage(): Promise<Image$1>;
1862
1995
  getImageOriginalSize(path: string): Promise<FigureSize>;
1863
1996
  }
1864
1997
 
1998
+ interface EditTextOptions {
1999
+ error?: string;
2000
+ placeholder?: string;
2001
+ }
1865
2002
  type NotificationType = "danger" | "info" | "success" | "warning";
1866
2003
  interface InformationNotification {
1867
2004
  text: string;
@@ -1981,7 +2118,7 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
1981
2118
  private getters;
1982
2119
  private providers;
1983
2120
  constructor(getters: CoreGetters);
1984
- static getters: readonly ["getRangeString", "getRangeFromSheetXC", "createAdaptedRanges", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone", "isRangeValid"];
2121
+ static getters: readonly ["extendRange", "getRangeString", "getRangeFromSheetXC", "createAdaptedRanges", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone", "getRangesUnion", "isRangeValid"];
1985
2122
  allowDispatch(cmd: Command): CommandResult;
1986
2123
  beforeHandle(command: Command): void;
1987
2124
  handle(cmd: Command): void;
@@ -2005,6 +2142,7 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
2005
2142
  */
2006
2143
  addRangeProvider(provider: RangeProvider["adaptRanges"]): void;
2007
2144
  createAdaptedRanges(ranges: Range[], offsetX: number, offsetY: number, sheetId: UID): Range[];
2145
+ extendRange(range: Range, dimension: Dimension, quantity: number): Range;
2008
2146
  /**
2009
2147
  * Creates a range from a XC reference that can contain a sheet reference
2010
2148
  * @param defaultSheetId the sheet to default to if the sheetXC parameter does not contain a sheet reference (usually the active sheet Id)
@@ -2029,6 +2167,7 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
2029
2167
  getRangeFromZone(sheetId: UID, zone: Zone | UnboundedZone): Range;
2030
2168
  getRangeFromRangeData(data: RangeData): Range;
2031
2169
  isRangeValid(rangeStr: string): boolean;
2170
+ getRangesUnion(ranges: Range[]): Range;
2032
2171
  /**
2033
2172
  * Get a Xc string that represent a part of a range
2034
2173
  */
@@ -2493,69 +2632,10 @@ declare class FigurePlugin extends CorePlugin<FigureState> implements FigureStat
2493
2632
  exportForExcel(data: ExcelWorkbookData): void;
2494
2633
  }
2495
2634
 
2496
- declare class FilterTable implements Cloneable<FilterTable> {
2497
- readonly id: FilterTableId;
2498
- readonly zone: Zone;
2499
- readonly filters: Filter[];
2500
- constructor(zone: Zone);
2501
- /** Get zone of the table without the headers */
2502
- get contentZone(): Zone | undefined;
2503
- getFilterId(col: number): string | undefined;
2504
- clone(): FilterTable;
2505
- }
2506
- declare class Filter {
2507
- readonly id: UID;
2508
- readonly zoneWithHeaders: Zone;
2509
- constructor(id: UID, zone: Zone);
2510
- get col(): HeaderIndex;
2511
- /** Filtered zone, ie. zone of the filter without the header */
2512
- get filteredZone(): Zone | undefined;
2513
- }
2514
-
2515
- interface FiltersState {
2516
- tables: Record<UID, Record<FilterTableId, FilterTable | undefined>>;
2517
- }
2518
- declare class FiltersPlugin extends CorePlugin<FiltersState> implements FiltersState {
2519
- static getters: readonly ["doesZonesContainFilter", "getFilter", "getFilters", "getFilterTable", "getFilterTables", "getFilterTablesInZone", "getFilterId", "getFilterHeaders", "isFilterHeader"];
2520
- readonly tables: Record<UID, Record<FilterTableId, FilterTable | undefined>>;
2521
- allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
2522
- handle(cmd: CoreCommand): void;
2523
- getFilters(sheetId: UID): Filter[];
2524
- getFilterTables(sheetId: UID): FilterTable[];
2525
- getFilter(position: CellPosition): Filter | undefined;
2526
- getFilterId(position: CellPosition): FilterId | undefined;
2527
- getFilterTable({ sheetId, col, row }: CellPosition): FilterTable | undefined;
2528
- /** Get the filter tables that are fully inside the given zone */
2529
- getFilterTablesInZone(sheetId: UID, zone: Zone): FilterTable[];
2530
- doesZonesContainFilter(sheetId: UID, zones: Zone[]): boolean;
2531
- getFilterHeaders(sheetId: UID): Position$1[];
2532
- isFilterHeader({ sheetId, col, row }: CellPosition): boolean;
2533
- private onAddColumnsRows;
2534
- private onDeleteColumnsRows;
2535
- private createFilterTable;
2536
- /** Extend a table down one row */
2537
- private extendTableDown;
2538
- /**
2539
- * Check if an UpdateCell command should cause the given table to be extended by one row.
2540
- *
2541
- * The table should be extended if all of these conditions are true:
2542
- * 1) The updated cell is right below the table
2543
- * 2) The command adds a content to the cell
2544
- * 3) No cell right below the table had any content before the command
2545
- * 4) Extending the table down would not overlap with another filter
2546
- * 5) Extending the table down would not overlap with a merge
2547
- *
2548
- */
2549
- private canUpdateCellCmdExtendTable;
2550
- import(data: WorkbookData): void;
2551
- export(data: WorkbookData): void;
2552
- exportForExcel(data: ExcelWorkbookData): void;
2553
- }
2554
-
2555
- interface State$6 {
2635
+ interface State$7 {
2556
2636
  groups: Record<UID, Record<Dimension, HeaderGroup[]>>;
2557
2637
  }
2558
- declare class HeaderGroupingPlugin extends CorePlugin<State$6> {
2638
+ declare class HeaderGroupingPlugin extends CorePlugin<State$7> {
2559
2639
  static getters: readonly ["getHeaderGroups", "getGroupsLayers", "getVisibleGroupLayers", "getHeaderGroup", "getHeaderGroupsInZone", "isGroupFolded", "isRowFolded", "isColFolded"];
2560
2640
  private readonly groups;
2561
2641
  allowDispatch(cmd: CoreCommand): CommandResult;
@@ -2671,16 +2751,16 @@ declare class HeaderVisibilityPlugin extends CorePlugin {
2671
2751
  }
2672
2752
 
2673
2753
  interface ImageState {
2674
- readonly images: Record<UID, Record<UID, Image | undefined> | undefined>;
2754
+ readonly images: Record<UID, Record<UID, Image$1 | undefined> | undefined>;
2675
2755
  }
2676
2756
  declare class ImagePlugin extends CorePlugin<ImageState> implements ImageState {
2677
2757
  static getters: readonly ["getImage", "getImagePath", "getImageSize"];
2678
2758
  readonly fileStore?: FileStore;
2679
- readonly images: Record<UID, Record<UID, Image | undefined> | undefined>;
2759
+ readonly images: Record<UID, Record<UID, Image$1 | undefined> | undefined>;
2680
2760
  /**
2681
2761
  * paths of images synced with the file store server.
2682
2762
  */
2683
- readonly syncedImages: Set<Image["path"]>;
2763
+ readonly syncedImages: Set<Image$1["path"]>;
2684
2764
  constructor(config: CorePluginConfig);
2685
2765
  allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.InvalidFigureId;
2686
2766
  handle(cmd: CoreCommand): void;
@@ -2688,7 +2768,7 @@ declare class ImagePlugin extends CorePlugin<ImageState> implements ImageState {
2688
2768
  * Delete unused images from the file store
2689
2769
  */
2690
2770
  garbageCollectExternalResources(): void;
2691
- getImage(figureId: UID): Image;
2771
+ getImage(figureId: UID): Image$1;
2692
2772
  getImagePath(figureId: UID): string;
2693
2773
  getImageSize(figureId: UID): FigureSize;
2694
2774
  private addImage;
@@ -2838,7 +2918,7 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
2838
2918
  getNextSheetName(baseName?: string): string;
2839
2919
  getSheetSize(sheetId: UID): ZoneDimension;
2840
2920
  getSheetZone(sheetId: UID): Zone;
2841
- getUnboundedZone(sheetId: UID, zone: Zone): UnboundedZone;
2921
+ getUnboundedZone(sheetId: UID, zone: Zone | UnboundedZone): UnboundedZone;
2842
2922
  getPaneDivisions(sheetId: UID): Readonly<PaneDivision>;
2843
2923
  private setPaneDivisions;
2844
2924
  /**
@@ -2942,6 +3022,62 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
2942
3022
  private checkZonesAreInSheet;
2943
3023
  }
2944
3024
 
3025
+ interface TableState {
3026
+ tables: Record<UID, Record<TableId, Table | undefined>>;
3027
+ }
3028
+ declare class TablePlugin extends CorePlugin<TableState> implements TableState {
3029
+ static getters: readonly ["doesZonesContainFilter", "getFilter", "getFilters", "getTable", "getTables", "getTablesInZone", "getTablesOverlappingZones", "getFilterId", "getFilterHeaders", "isFilterHeader"];
3030
+ readonly tables: Record<UID, Record<TableId, Table | undefined>>;
3031
+ adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
3032
+ allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
3033
+ handle(cmd: CoreCommand): void;
3034
+ getFilters(sheetId: UID): Filter[];
3035
+ getTables(sheetId: UID): Table[];
3036
+ getFilter(position: CellPosition): Filter | undefined;
3037
+ getFilterId(position: CellPosition): FilterId | undefined;
3038
+ getTable({ sheetId, col, row }: CellPosition): Table | undefined;
3039
+ /** Get the filter tables that are fully inside the given zone */
3040
+ getTablesInZone(sheetId: UID, zone: Zone): Table[];
3041
+ getTablesOverlappingZones(sheetId: UID, zones: Zone[]): Table[];
3042
+ doesZonesContainFilter(sheetId: UID, zones: Zone[]): boolean;
3043
+ getFilterHeaders(sheetId: UID): Position$1[];
3044
+ isFilterHeader({ sheetId, col, row }: CellPosition): boolean;
3045
+ /** Extend a table down one row */
3046
+ private extendTableDown;
3047
+ /** Extend a table right one col */
3048
+ private extendTableRight;
3049
+ /**
3050
+ * Check if an UpdateCell command should cause the given table to be extended by one row or col.
3051
+ *
3052
+ * The table should be extended if all of these conditions are true:
3053
+ * 1) The updated cell is right below/right of the table
3054
+ * 2) The command adds a content to the cell
3055
+ * 3) No cell right below/right next to the table had any content before the command
3056
+ * 4) Extending the table down/right would not overlap with another table
3057
+ * 5) Extending the table down/right would not overlap with a merge
3058
+ *
3059
+ */
3060
+ private canUpdateCellCmdExtendTable;
3061
+ private checkUpdatedTableZoneIsValid;
3062
+ private checkTableConfigUpdateIsValid;
3063
+ private createTable;
3064
+ private updateTable;
3065
+ /**
3066
+ * Update the old config of a table with the new partial config from an UpdateTable command.
3067
+ *
3068
+ * Make sure the new config make sense (e.g. if the table has no header, it should not have
3069
+ * filters and number of headers should be 0)
3070
+ */
3071
+ private updateTableConfig;
3072
+ private createFilterFromZone;
3073
+ private createFilter;
3074
+ private copyTableForSheet;
3075
+ private applyRangeChangeOnTable;
3076
+ import(data: WorkbookData): void;
3077
+ export(data: WorkbookData): void;
3078
+ exportForExcel(data: ExcelWorkbookData): void;
3079
+ }
3080
+
2945
3081
  declare class SelectiveHistory<T = unknown> {
2946
3082
  private HEAD_BRANCH;
2947
3083
  private HEAD_OPERATION;
@@ -3023,6 +3159,11 @@ declare class SelectiveHistory<T = unknown> {
3023
3159
  private fastForward;
3024
3160
  }
3025
3161
 
3162
+ interface Dependencies {
3163
+ references: string[];
3164
+ numbers: number[];
3165
+ strings: string[];
3166
+ }
3026
3167
  interface CellData {
3027
3168
  content?: string;
3028
3169
  style?: number;
@@ -3060,7 +3201,7 @@ interface SheetData {
3060
3201
  };
3061
3202
  conditionalFormats: ConditionalFormat[];
3062
3203
  dataValidationRules?: DataValidationRuleData[];
3063
- filterTables: FilterTableData[];
3204
+ tables: TableData[];
3064
3205
  areGridLinesVisible?: boolean;
3065
3206
  isVisible: boolean;
3066
3207
  panes?: PaneDivision;
@@ -3098,8 +3239,8 @@ interface ExcelSheetData extends Omit<SheetData, "figureTables" | "cols" | "rows
3098
3239
  [key: string]: ExcelCellData | undefined;
3099
3240
  };
3100
3241
  charts: FigureData<ExcelChartDefinition>[];
3101
- images: FigureData<Image>[];
3102
- filterTables: ExcelFilterTableData[];
3242
+ images: FigureData<Image$1>[];
3243
+ tables: ExcelTableData[];
3103
3244
  cols: {
3104
3245
  [key: number]: ExcelHeaderData;
3105
3246
  };
@@ -3111,13 +3252,14 @@ interface ExcelHeaderData extends HeaderData {
3111
3252
  outlineLevel?: number;
3112
3253
  collapsed?: boolean;
3113
3254
  }
3114
- interface FilterTableData {
3255
+ interface TableData {
3115
3256
  range: string;
3257
+ config?: TableConfig;
3116
3258
  }
3117
3259
  interface DataValidationRuleData extends Omit<DataValidationRule, "ranges"> {
3118
3260
  ranges: string[];
3119
3261
  }
3120
- interface ExcelFilterTableData {
3262
+ interface ExcelTableData {
3121
3263
  range: string;
3122
3264
  filters: ExcelFilterData[];
3123
3265
  }
@@ -3486,13 +3628,13 @@ declare class EvaluationChartPlugin extends UIPlugin<EvaluationChartState> {
3486
3628
  }
3487
3629
 
3488
3630
  declare class EvaluationConditionalFormatPlugin extends UIPlugin {
3489
- static getters: readonly ["getConditionalIcon", "getCellComputedStyle"];
3631
+ static getters: readonly ["getConditionalIcon", "getCellConditionalFormatStyle"];
3490
3632
  private isStale;
3491
3633
  private computedStyles;
3492
3634
  private computedIcons;
3493
3635
  handle(cmd: CoreViewCommand): void;
3494
3636
  finalize(): void;
3495
- getCellComputedStyle(position: CellPosition): Style;
3637
+ getCellConditionalFormatStyle(position: CellPosition): Style | undefined;
3496
3638
  getConditionalIcon({ sheetId, col, row }: CellPosition): string | undefined;
3497
3639
  /**
3498
3640
  * Compute the styles according to the conditional formatting.
@@ -3882,6 +4024,26 @@ declare class SplitToColumnsPlugin extends UIPlugin {
3882
4024
  private checkSeparatorInSelection;
3883
4025
  }
3884
4026
 
4027
+ declare class TableStylePlugin extends UIPlugin {
4028
+ static getters: readonly ["getCellTableStyle", "getCellTableBorder"];
4029
+ private tableStyles;
4030
+ handle(cmd: Command): void;
4031
+ finalize(): void;
4032
+ getCellTableStyle(position: CellPosition): Style | undefined;
4033
+ getCellTableBorder(position: CellPosition): Border$1 | undefined;
4034
+ private computeTableStyle;
4035
+ /**
4036
+ * Get the actual table config that will be used to compute the table style. It is different from
4037
+ * the config of the table because of hidden rows and columns in the sheet. For example remove the
4038
+ * hidden rows from config.numberOfHeaders.
4039
+ */
4040
+ private getTableRuntimeConfig;
4041
+ /**
4042
+ * Get a mapping: relative col/row position in the table <=> col/row in the sheet
4043
+ */
4044
+ private getTableMapping;
4045
+ }
4046
+
3885
4047
  declare class UIOptionsPlugin extends UIPlugin {
3886
4048
  static getters: readonly ["shouldShowFormulas"];
3887
4049
  private showFormulas;
@@ -3890,7 +4052,7 @@ declare class UIOptionsPlugin extends UIPlugin {
3890
4052
  }
3891
4053
 
3892
4054
  declare class SheetUIPlugin extends UIPlugin {
3893
- static getters: readonly ["doesCellHaveGridIcon", "getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getContiguousZone", "isEvaluatedCellEmpty"];
4055
+ static getters: readonly ["doesCellHaveGridIcon", "getCellWidth", "getCellComputedBorder", "getCellComputedStyle", "getTextWidth", "getCellText", "getCellMultiLineText", "getContiguousZone"];
3894
4056
  private ctx;
3895
4057
  allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
3896
4058
  handle(cmd: Command): void;
@@ -3907,16 +4069,13 @@ declare class SheetUIPlugin extends UIPlugin {
3907
4069
  * Expands the given zone until bordered by empty cells or reached the sheet boundaries.
3908
4070
  */
3909
4071
  getContiguousZone(sheetId: UID, zoneToExpand: Zone): Zone;
3910
- /**
3911
- * Checks if a cell evaluated value is empty. If the cell is part of a merge,
3912
- * the check applies to the main cell of the merge.
3913
- */
3914
- isEvaluatedCellEmpty(position: CellPosition): boolean;
3915
4072
  /**
3916
4073
  * Checks if a cell is empty (i.e. does not have a content or a formula does not spread over it).
3917
4074
  * If the cell is part of a merge, the check applies to the main cell of the merge.
3918
4075
  */
3919
4076
  private isCellEmpty;
4077
+ getCellComputedBorder(position: CellPosition): Border$1 | null;
4078
+ getCellComputedStyle(position: CellPosition): Style;
3920
4079
  private getColMaxWidth;
3921
4080
  /**
3922
4081
  * Check that any "sheetId" in the command matches an existing
@@ -3982,7 +4141,7 @@ declare class ClipboardPlugin extends UIPlugin {
3982
4141
  }
3983
4142
 
3984
4143
  declare class FilterEvaluationPlugin extends UIPlugin {
3985
- static getters: readonly ["getCellBorderWithFilterBorder", "getFilterValues", "isRowFiltered", "isFilterActive"];
4144
+ static getters: readonly ["getFilterHiddenValues", "getFirstTableInSelection", "isRowFiltered", "isFilterActive"];
3986
4145
  private filterValues;
3987
4146
  hiddenRows: Set<number>;
3988
4147
  isEvaluationDirty: boolean;
@@ -3990,10 +4149,9 @@ declare class FilterEvaluationPlugin extends UIPlugin {
3990
4149
  handle(cmd: Command): void;
3991
4150
  finalize(): void;
3992
4151
  isRowFiltered(sheetId: UID, row: number): boolean;
3993
- getCellBorderWithFilterBorder(position: CellPosition): Border$1 | null;
3994
- getFilterValues(position: CellPosition): string[];
4152
+ getFilterHiddenValues(position: CellPosition): string[];
3995
4153
  isFilterActive(position: CellPosition): boolean;
3996
- private intersectZoneWithViewport;
4154
+ getFirstTableInSelection(): Table | undefined;
3997
4155
  private updateFilter;
3998
4156
  private updateHiddenRows;
3999
4157
  private getCellValueAsString;
@@ -4399,11 +4557,11 @@ type PluginGetters<Plugin extends {
4399
4557
  getters: readonly string[];
4400
4558
  }> = Pick<InstanceType<Plugin>, GetterNames<Plugin>>;
4401
4559
  type RangeAdapterGetters = Pick<RangeAdapter, GetterNames<typeof RangeAdapter>>;
4402
- type CoreGetters = PluginGetters<typeof SheetPlugin> & PluginGetters<typeof HeaderSizePlugin> & PluginGetters<typeof HeaderVisibilityPlugin> & PluginGetters<typeof CellPlugin> & PluginGetters<typeof MergePlugin> & PluginGetters<typeof BordersPlugin> & PluginGetters<typeof ChartPlugin> & PluginGetters<typeof ImagePlugin> & PluginGetters<typeof FigurePlugin> & RangeAdapterGetters & PluginGetters<typeof ConditionalFormatPlugin> & PluginGetters<typeof FiltersPlugin> & PluginGetters<typeof SettingsPlugin> & PluginGetters<typeof HeaderGroupingPlugin> & PluginGetters<typeof DataValidationPlugin>;
4560
+ type CoreGetters = PluginGetters<typeof SheetPlugin> & PluginGetters<typeof HeaderSizePlugin> & PluginGetters<typeof HeaderVisibilityPlugin> & PluginGetters<typeof CellPlugin> & PluginGetters<typeof MergePlugin> & PluginGetters<typeof BordersPlugin> & PluginGetters<typeof ChartPlugin> & PluginGetters<typeof ImagePlugin> & PluginGetters<typeof FigurePlugin> & RangeAdapterGetters & PluginGetters<typeof ConditionalFormatPlugin> & PluginGetters<typeof TablePlugin> & PluginGetters<typeof SettingsPlugin> & PluginGetters<typeof HeaderGroupingPlugin> & PluginGetters<typeof DataValidationPlugin>;
4403
4561
  type Getters = {
4404
4562
  isReadonly: () => boolean;
4405
4563
  isDashboard: () => boolean;
4406
- } & CoreGetters & PluginGetters<typeof AutofillPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof FindAndReplacePlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof GridSelectionPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof SheetViewPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin>;
4564
+ } & CoreGetters & PluginGetters<typeof AutofillPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof FindAndReplacePlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof GridSelectionPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof SheetViewPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin> & PluginGetters<typeof TableStylePlugin>;
4407
4565
 
4408
4566
  type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "RANGE<ANY>" | "META";
4409
4567
  interface ArgDefinition {
@@ -4441,6 +4599,89 @@ type EvalContext = {
4441
4599
  addDependencies?: (position: CellPosition, ranges: Range[]) => void;
4442
4600
  };
4443
4601
 
4602
+ /**
4603
+ * An Operation can be executed to change a data structure from state A
4604
+ * to state B.
4605
+ * It should hold the necessary data used to perform this transition.
4606
+ * It should be possible to revert the changes made by this operation.
4607
+ *
4608
+ * In the context of o-spreadsheet, the data from an operation would
4609
+ * be a revision (the commands are used to execute it, the `changes` are used
4610
+ * to revert it).
4611
+ */
4612
+ declare class Operation<T> {
4613
+ readonly id: UID;
4614
+ readonly data: T;
4615
+ constructor(id: UID, data: T);
4616
+ transformed(transformation: Transformation<T>): Operation<T>;
4617
+ }
4618
+
4619
+ /**
4620
+ * A branch holds a sequence of operations.
4621
+ * It can be represented as "A - B - C - D" if A, B, C and D are executed one
4622
+ * after the other.
4623
+ *
4624
+ * @param buildTransformation Factory to build transformations
4625
+ * @param operations initial operations
4626
+ */
4627
+ declare class Branch<T> {
4628
+ private readonly buildTransformation;
4629
+ private operations;
4630
+ constructor(buildTransformation: TransformationFactory<T>, operations?: Operation<T>[]);
4631
+ getOperations(): readonly Operation<T>[];
4632
+ getOperation(operationId: UID): Operation<T>;
4633
+ getLastOperationId(): UID | undefined;
4634
+ /**
4635
+ * Get the id of the operation appears first in the list of operations
4636
+ */
4637
+ getFirstOperationAmong(op1: UID, op2: UID): UID;
4638
+ contains(operationId: UID): boolean;
4639
+ /**
4640
+ * Add the given operation as the first operation
4641
+ */
4642
+ prepend(operation: Operation<T>): void;
4643
+ /**
4644
+ * add the given operation after the given predecessorOpId
4645
+ */
4646
+ insert(newOperation: Operation<T>, predecessorOpId: UID): void;
4647
+ /**
4648
+ * Add the given operation as the last operation
4649
+ */
4650
+ append(operation: Operation<T>): void;
4651
+ /**
4652
+ * Append operations in the given branch to this branch.
4653
+ */
4654
+ appendBranch(branch: Branch<T>): void;
4655
+ /**
4656
+ * Create and return a copy of this branch, starting after the given operationId
4657
+ */
4658
+ fork(operationId: UID): Branch<T>;
4659
+ /**
4660
+ * Transform all the operations in this branch with the given transformation
4661
+ */
4662
+ transform(transformation: Transformation<T>): void;
4663
+ /**
4664
+ * Cut the branch before the operation, meaning the operation
4665
+ * and all following operations are dropped.
4666
+ */
4667
+ cutBefore(operationId: UID): void;
4668
+ /**
4669
+ * Cut the branch after the operation, meaning all following operations are dropped.
4670
+ */
4671
+ cutAfter(operationId: UID): void;
4672
+ /**
4673
+ * Find an operation in this branch based on its id.
4674
+ * This returns the operation itself, operations which comes before it
4675
+ * and operation which comes after it.
4676
+ */
4677
+ private locateOperation;
4678
+ }
4679
+
4680
+ interface CreateRevisionOptions {
4681
+ revisionId?: UID;
4682
+ clientId?: UID;
4683
+ pending?: boolean;
4684
+ }
4444
4685
  interface HistoryChange {
4445
4686
  path: [any, ...(number | string)[]];
4446
4687
  before: any;
@@ -4467,6 +4708,15 @@ interface TransformationFactory<T = unknown> {
4467
4708
  */
4468
4709
  with: (operation: T) => Transformation<T>;
4469
4710
  }
4711
+ interface OperationSequenceNode<T> {
4712
+ operation: Operation<T>;
4713
+ branch: Branch<T>;
4714
+ isCancelled: boolean;
4715
+ next?: {
4716
+ operation: Operation<T>;
4717
+ branch: Branch<T>;
4718
+ };
4719
+ }
4470
4720
 
4471
4721
  /**
4472
4722
  * Coordinate in pixels
@@ -4480,6 +4730,29 @@ interface DOMDimension {
4480
4730
  height: Pixel;
4481
4731
  }
4482
4732
  type Rect = DOMCoordinates & DOMDimension;
4733
+ interface BoxTextContent {
4734
+ textLines: string[];
4735
+ width: Pixel;
4736
+ align: Align;
4737
+ }
4738
+ interface Box extends Rect {
4739
+ content?: BoxTextContent;
4740
+ style: Style;
4741
+ border?: Border$1;
4742
+ hasIcon?: boolean;
4743
+ clipRect?: Rect;
4744
+ isError?: boolean;
4745
+ image?: Image;
4746
+ isMerge?: boolean;
4747
+ verticalAlign?: VerticalAlign;
4748
+ isOverflow?: boolean;
4749
+ }
4750
+ interface Image {
4751
+ clipIcon: Rect | null;
4752
+ size: Pixel;
4753
+ type: "icon";
4754
+ image: HTMLImageElement;
4755
+ }
4483
4756
  /**
4484
4757
  * The viewport is the visible area of a sheet.
4485
4758
  * Column and row headers are not included in the viewport.
@@ -4525,6 +4798,13 @@ declare const LAYERS: {
4525
4798
  readonly Headers: 100;
4526
4799
  };
4527
4800
  type LayerName = keyof typeof LAYERS;
4801
+ declare const OrderedLayers: () => ("Chart" | "Background" | "Highlights" | "Clipboard" | "Search" | "Autofill" | "Selection" | "Headers")[];
4802
+ /**
4803
+ *
4804
+ * @param layer New layer name
4805
+ * @param priority The lower priorities are rendered first
4806
+ */
4807
+ declare function addRenderingLayer(layer: string, priority: number): void;
4528
4808
  interface EdgeScrollInfo {
4529
4809
  canEdgeScroll: boolean;
4530
4810
  direction: ScrollDirection$1;
@@ -4624,6 +4904,7 @@ declare function createCurrencyFormat(currency: Partial<Currency>): Format;
4624
4904
  * Sparse arrays remain sparse.
4625
4905
  */
4626
4906
  declare function deepCopy<T>(obj: T): T;
4907
+ declare function unquote(string: string, quoteChar?: "'" | '"'): string;
4627
4908
  declare function isMarkdownLink(str: string): boolean;
4628
4909
  /**
4629
4910
  * Build a markdown link from a label and an url
@@ -4687,7 +4968,7 @@ declare class RangeImpl implements Range {
4687
4968
  clone(rangeParams?: Partial<ConstructorArgs>): RangeImpl;
4688
4969
  }
4689
4970
 
4690
- declare function computeTextWidth(context: CanvasRenderingContext2D, text: string, style: Style): number;
4971
+ declare function computeTextWidth(context: CanvasRenderingContext2D, text: string, style: Style, fontUnit?: "px" | "pt"): number;
4691
4972
 
4692
4973
  declare class UuidGenerator {
4693
4974
  private isFastIdStrategy;
@@ -4717,9 +4998,9 @@ declare function toUnboundedZone(xc: string): UnboundedZone;
4717
4998
  *
4718
4999
  * Examples:
4719
5000
  * "A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
4720
- * "B1:B3" ==> Top 0, Bottom 3, Left: 1, Right: 1
5001
+ * "B1:B3" ==> Top 0, Bottom 2, Left: 1, Right: 1
4721
5002
  * "Sheet1!A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
4722
- * "Sheet1!B1:B3" ==> Top 0, Bottom 3, Left: 1, Right: 1
5003
+ * "Sheet1!B1:B3" ==> Top 0, Bottom 2, Left: 1, Right: 1
4723
5004
  *
4724
5005
  * @param xc the string reference to convert
4725
5006
  *
@@ -5212,7 +5493,7 @@ declare class SelectionInputStore extends SpreadsheetStore {
5212
5493
  private setRange;
5213
5494
  private removeRangeByIndex;
5214
5495
  /**
5215
- * Convert highlights input format to the command format.
5496
+ * Converts highlights input format to the command format.
5216
5497
  * The first xc in the input range will keep its color.
5217
5498
  * Invalid ranges and ranges from other sheets than the active sheets
5218
5499
  * are ignored.
@@ -5234,7 +5515,7 @@ declare class SelectionInputStore extends SpreadsheetStore {
5234
5515
  getIndex(rangeId: number | null): number | null;
5235
5516
  }
5236
5517
 
5237
- interface Props$P {
5518
+ interface Props$Q {
5238
5519
  ranges: string[];
5239
5520
  hasSingleRange?: boolean;
5240
5521
  required?: boolean;
@@ -5256,7 +5537,7 @@ interface SelectionRange extends Omit<RangeInputValue, "color"> {
5256
5537
  * onSelectionChanged is called every time the input value
5257
5538
  * changes.
5258
5539
  */
5259
- declare class SelectionInput extends Component<Props$P, SpreadsheetChildEnv> {
5540
+ declare class SelectionInput extends Component<Props$Q, SpreadsheetChildEnv> {
5260
5541
  static template: string;
5261
5542
  static props: {
5262
5543
  ranges: ArrayConstructor;
@@ -5306,11 +5587,11 @@ declare class SelectionInput extends Component<Props$P, SpreadsheetChildEnv> {
5306
5587
  confirm(): void;
5307
5588
  }
5308
5589
 
5309
- interface Props$O {
5590
+ interface Props$P {
5310
5591
  messages: string[];
5311
5592
  msgType: "warning" | "error";
5312
5593
  }
5313
- declare class ValidationMessages extends Component<Props$O, SpreadsheetChildEnv> {
5594
+ declare class ValidationMessages extends Component<Props$P, SpreadsheetChildEnv> {
5314
5595
  static template: string;
5315
5596
  static props: {
5316
5597
  messages: ArrayConstructor;
@@ -5319,15 +5600,16 @@ declare class ValidationMessages extends Component<Props$O, SpreadsheetChildEnv>
5319
5600
  get divClasses(): "o-validation-warning text-warning" | "o-validation-error text-danger";
5320
5601
  }
5321
5602
 
5322
- interface Props$N {
5603
+ interface Props$O {
5323
5604
  label?: string;
5324
5605
  value: boolean;
5325
5606
  className?: string;
5326
5607
  name?: string;
5327
5608
  title?: string;
5609
+ disabled?: boolean;
5328
5610
  onChange: (value: boolean) => void;
5329
5611
  }
5330
- declare class Checkbox extends Component<Props$N, SpreadsheetChildEnv> {
5612
+ declare class Checkbox extends Component<Props$O, SpreadsheetChildEnv> {
5331
5613
  static template: string;
5332
5614
  static props: {
5333
5615
  label: {
@@ -5350,6 +5632,10 @@ declare class Checkbox extends Component<Props$N, SpreadsheetChildEnv> {
5350
5632
  type: StringConstructor;
5351
5633
  optional: boolean;
5352
5634
  };
5635
+ disabled: {
5636
+ type: BooleanConstructor;
5637
+ optional: boolean;
5638
+ };
5353
5639
  onChange: FunctionConstructor;
5354
5640
  };
5355
5641
  static defaultProps: {
@@ -5358,10 +5644,10 @@ declare class Checkbox extends Component<Props$N, SpreadsheetChildEnv> {
5358
5644
  onChange(ev: InputEvent): void;
5359
5645
  }
5360
5646
 
5361
- interface Props$M {
5647
+ interface Props$N {
5362
5648
  class?: string;
5363
5649
  }
5364
- declare class Section extends Component<Props$M, SpreadsheetChildEnv> {
5650
+ declare class Section extends Component<Props$N, SpreadsheetChildEnv> {
5365
5651
  static template: string;
5366
5652
  static props: {
5367
5653
  class: {
@@ -5372,13 +5658,13 @@ declare class Section extends Component<Props$M, SpreadsheetChildEnv> {
5372
5658
  };
5373
5659
  }
5374
5660
 
5375
- interface Props$L {
5661
+ interface Props$M {
5376
5662
  ranges: string[];
5377
5663
  hasSingleRange?: boolean;
5378
5664
  onSelectionChanged: (ranges: string[]) => void;
5379
5665
  onSelectionConfirmed: () => void;
5380
5666
  }
5381
- declare class ChartDataSeries extends Component<Props$L, SpreadsheetChildEnv> {
5667
+ declare class ChartDataSeries extends Component<Props$M, SpreadsheetChildEnv> {
5382
5668
  static template: string;
5383
5669
  static components: {
5384
5670
  SelectionInput: typeof SelectionInput;
@@ -5396,10 +5682,10 @@ declare class ChartDataSeries extends Component<Props$L, SpreadsheetChildEnv> {
5396
5682
  get title(): string;
5397
5683
  }
5398
5684
 
5399
- interface Props$K {
5685
+ interface Props$L {
5400
5686
  messages: string[];
5401
5687
  }
5402
- declare class ChartErrorSection extends Component<Props$K, SpreadsheetChildEnv> {
5688
+ declare class ChartErrorSection extends Component<Props$L, SpreadsheetChildEnv> {
5403
5689
  static template: string;
5404
5690
  static components: {
5405
5691
  Section: typeof Section;
@@ -5413,7 +5699,7 @@ declare class ChartErrorSection extends Component<Props$K, SpreadsheetChildEnv>
5413
5699
  };
5414
5700
  }
5415
5701
 
5416
- interface Props$J {
5702
+ interface Props$K {
5417
5703
  title?: string;
5418
5704
  range: string;
5419
5705
  isInvalid: boolean;
@@ -5427,7 +5713,7 @@ interface Props$J {
5427
5713
  onChange: (value: boolean) => void;
5428
5714
  }>;
5429
5715
  }
5430
- declare class ChartLabelRange extends Component<Props$J, SpreadsheetChildEnv> {
5716
+ declare class ChartLabelRange extends Component<Props$K, SpreadsheetChildEnv> {
5431
5717
  static template: string;
5432
5718
  static components: {
5433
5719
  SelectionInput: typeof SelectionInput;
@@ -5452,16 +5738,16 @@ declare class ChartLabelRange extends Component<Props$J, SpreadsheetChildEnv> {
5452
5738
  optional: boolean;
5453
5739
  };
5454
5740
  };
5455
- static defaultProps: Partial<Props$J>;
5741
+ static defaultProps: Partial<Props$K>;
5456
5742
  }
5457
5743
 
5458
- interface Props$I {
5744
+ interface Props$J {
5459
5745
  figureId: UID;
5460
5746
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
5461
5747
  canUpdateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5462
5748
  updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5463
5749
  }
5464
- declare class LineBarPieConfigPanel extends Component<Props$I, SpreadsheetChildEnv> {
5750
+ declare class LineBarPieConfigPanel extends Component<Props$J, SpreadsheetChildEnv> {
5465
5751
  static template: string;
5466
5752
  static components: {
5467
5753
  SelectionInput: typeof SelectionInput;
@@ -5661,7 +5947,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
5661
5947
  isSameColor(color1: Color, color2: Color): boolean;
5662
5948
  }
5663
5949
 
5664
- interface Props$H {
5950
+ interface Props$I {
5665
5951
  currentColor: string | undefined;
5666
5952
  toggleColorPicker: () => void;
5667
5953
  showColorPicker: boolean;
@@ -5672,7 +5958,7 @@ interface Props$H {
5672
5958
  dropdownMaxHeight?: Pixel;
5673
5959
  class?: string;
5674
5960
  }
5675
- declare class ColorPickerWidget extends Component<Props$H, SpreadsheetChildEnv> {
5961
+ declare class ColorPickerWidget extends Component<Props$I, SpreadsheetChildEnv> {
5676
5962
  static template: string;
5677
5963
  static props: {
5678
5964
  currentColor: {
@@ -5710,11 +5996,11 @@ declare class ColorPickerWidget extends Component<Props$H, SpreadsheetChildEnv>
5710
5996
  get colorPickerAnchorRect(): Rect;
5711
5997
  }
5712
5998
 
5713
- interface Props$G {
5999
+ interface Props$H {
5714
6000
  currentColor?: string;
5715
6001
  onColorPicked: (color: string) => void;
5716
6002
  }
5717
- declare class ChartColor extends Component<Props$G, SpreadsheetChildEnv> {
6003
+ declare class ChartColor extends Component<Props$H, SpreadsheetChildEnv> {
5718
6004
  static template: string;
5719
6005
  static components: {
5720
6006
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5733,11 +6019,11 @@ declare class ChartColor extends Component<Props$G, SpreadsheetChildEnv> {
5733
6019
  togglePicker(): void;
5734
6020
  }
5735
6021
 
5736
- interface Props$F {
6022
+ interface Props$G {
5737
6023
  title: string;
5738
6024
  update: (title: string) => void;
5739
6025
  }
5740
- declare class ChartTitle extends Component<Props$F, SpreadsheetChildEnv> {
6026
+ declare class ChartTitle extends Component<Props$G, SpreadsheetChildEnv> {
5741
6027
  static template: string;
5742
6028
  static components: {
5743
6029
  Section: typeof Section;
@@ -5749,13 +6035,13 @@ declare class ChartTitle extends Component<Props$F, SpreadsheetChildEnv> {
5749
6035
  updateTitle(ev: InputEvent): void;
5750
6036
  }
5751
6037
 
5752
- interface Props$E {
6038
+ interface Props$F {
5753
6039
  figureId: UID;
5754
6040
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
5755
6041
  canUpdateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5756
6042
  updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5757
6043
  }
5758
- declare class LineBarPieDesignPanel extends Component<Props$E, SpreadsheetChildEnv> {
6044
+ declare class LineBarPieDesignPanel extends Component<Props$F, SpreadsheetChildEnv> {
5759
6045
  static template: string;
5760
6046
  static components: {
5761
6047
  ChartColor: typeof ChartColor;
@@ -5774,13 +6060,13 @@ declare class LineBarPieDesignPanel extends Component<Props$E, SpreadsheetChildE
5774
6060
  updateSelect(attr: string, ev: any): void;
5775
6061
  }
5776
6062
 
5777
- interface Props$D {
6063
+ interface Props$E {
5778
6064
  figureId: UID;
5779
6065
  definition: GaugeChartDefinition;
5780
6066
  canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5781
6067
  updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5782
6068
  }
5783
- declare class GaugeChartConfigPanel extends Component<Props$D, SpreadsheetChildEnv> {
6069
+ declare class GaugeChartConfigPanel extends Component<Props$E, SpreadsheetChildEnv> {
5784
6070
  static template: string;
5785
6071
  static components: {
5786
6072
  ChartErrorSection: typeof ChartErrorSection;
@@ -5802,13 +6088,13 @@ declare class GaugeChartConfigPanel extends Component<Props$D, SpreadsheetChildE
5802
6088
  }
5803
6089
 
5804
6090
  type GaugeMenu = "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
5805
- interface Props$C {
6091
+ interface Props$D {
5806
6092
  figureId: UID;
5807
6093
  definition: GaugeChartDefinition;
5808
6094
  canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5809
6095
  updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5810
6096
  }
5811
- declare class GaugeChartDesignPanel extends Component<Props$C, SpreadsheetChildEnv> {
6097
+ declare class GaugeChartDesignPanel extends Component<Props$D, SpreadsheetChildEnv> {
5812
6098
  static template: string;
5813
6099
  static components: {
5814
6100
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -5857,13 +6143,13 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
5857
6143
  onUpdateCumulative(cumulative: boolean): void;
5858
6144
  }
5859
6145
 
5860
- interface Props$B {
6146
+ interface Props$C {
5861
6147
  figureId: UID;
5862
6148
  definition: ScorecardChartDefinition;
5863
6149
  canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5864
6150
  updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5865
6151
  }
5866
- declare class ScorecardChartConfigPanel extends Component<Props$B, SpreadsheetChildEnv> {
6152
+ declare class ScorecardChartConfigPanel extends Component<Props$C, SpreadsheetChildEnv> {
5867
6153
  static template: string;
5868
6154
  static components: {
5869
6155
  SelectionInput: typeof SelectionInput;
@@ -5892,13 +6178,13 @@ declare class ScorecardChartConfigPanel extends Component<Props$B, SpreadsheetCh
5892
6178
  }
5893
6179
 
5894
6180
  type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
5895
- interface Props$A {
6181
+ interface Props$B {
5896
6182
  figureId: UID;
5897
6183
  definition: ScorecardChartDefinition;
5898
6184
  canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5899
6185
  updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5900
6186
  }
5901
- declare class ScorecardChartDesignPanel extends Component<Props$A, SpreadsheetChildEnv> {
6187
+ declare class ScorecardChartDesignPanel extends Component<Props$B, SpreadsheetChildEnv> {
5902
6188
  static template: string;
5903
6189
  static components: {
5904
6190
  ColorPickerWidget: typeof ColorPickerWidget;
@@ -6024,10 +6310,38 @@ interface FigureContent {
6024
6310
  borderWidth?: number;
6025
6311
  }
6026
6312
 
6313
+ interface SidePanelProps {
6314
+ onCloseSidePanel?: () => void;
6315
+ [key: string]: unknown;
6316
+ }
6317
+ interface OpenSidePanel {
6318
+ isOpen: true;
6319
+ props: SidePanelProps;
6320
+ }
6321
+ interface ClosedSidePanel {
6322
+ isOpen: false;
6323
+ }
6324
+ type SidePanelState = OpenSidePanel | ClosedSidePanel;
6325
+ declare class SidePanelStore extends SpreadsheetStore {
6326
+ initialPanelProps: SidePanelProps;
6327
+ componentTag: string;
6328
+ get isOpen(): boolean;
6329
+ get panelProps(): SidePanelProps;
6330
+ open(componentTag: string, panelProps?: SidePanelProps): void;
6331
+ toggle(componentTag: string, panelProps: SidePanelProps): void;
6332
+ close(): void;
6333
+ private computeState;
6334
+ }
6335
+
6027
6336
  interface SidePanelContent {
6028
6337
  title: string | ((env: SpreadsheetChildEnv) => string);
6029
6338
  Body: any;
6030
6339
  Footer?: any;
6340
+ /**
6341
+ * A callback used to validate the props or generate new props
6342
+ * based on the current state of the spreadsheet model, using the getters.
6343
+ */
6344
+ computeState?: (getters: Getters, initialProps: object) => SidePanelState;
6031
6345
  }
6032
6346
 
6033
6347
  /**
@@ -6061,11 +6375,25 @@ interface AutofillRule {
6061
6375
  sequence: number;
6062
6376
  }
6063
6377
 
6064
- declare function transformRangeData(range: RangeData, executed: CoreCommand): RangeData | undefined;
6065
-
6066
6378
  interface FunctionContext {
6379
+ /**
6380
+ * The parent function name of the token.
6381
+ */
6067
6382
  parent: string;
6383
+ /**
6384
+ * The position of the token within the argument list of its parent function.
6385
+ */
6068
6386
  argPosition: number;
6387
+ /**
6388
+ * An array of parsed arguments, possibly containing undefined values if the argument
6389
+ * is empty or is an invalid expression.
6390
+ */
6391
+ args: (AST | undefined)[];
6392
+ /**
6393
+ * Array of token arrays representing the tokens for each argument.
6394
+ * Needed as an intermediate step to parse the arguments AST (see `args` property).
6395
+ */
6396
+ argsTokens?: Token[][];
6069
6397
  }
6070
6398
  /**
6071
6399
  * Enriched Token is used by the composer to add information on the tokens that
@@ -6086,13 +6414,34 @@ interface EnrichedToken extends Token {
6086
6414
  functionContext?: FunctionContext;
6087
6415
  }
6088
6416
 
6089
- type EditionMode = "editing" | "selecting" | "inactive";
6090
- interface ComposerSelection {
6091
- start: number;
6092
- end: number;
6417
+ interface Props$A {
6418
+ proposals: AutoCompleteProposal[];
6419
+ selectedIndex: number | undefined;
6420
+ onValueSelected: (value: string) => void;
6421
+ onValueHovered: (index: string) => void;
6093
6422
  }
6094
- declare class ComposerStore extends SpreadsheetStore {
6095
- private col;
6423
+ declare class TextValueProvider extends Component<Props$A> {
6424
+ static template: string;
6425
+ static props: {
6426
+ proposals: ArrayConstructor;
6427
+ selectedIndex: {
6428
+ type: NumberConstructor;
6429
+ optional: boolean;
6430
+ };
6431
+ onValueSelected: FunctionConstructor;
6432
+ onValueHovered: FunctionConstructor;
6433
+ };
6434
+ private autoCompleteListRef;
6435
+ setup(): void;
6436
+ }
6437
+
6438
+ type EditionMode = "editing" | "selecting" | "inactive";
6439
+ interface ComposerSelection {
6440
+ start: number;
6441
+ end: number;
6442
+ }
6443
+ declare class ComposerStore extends SpreadsheetStore {
6444
+ private col;
6096
6445
  private row;
6097
6446
  editionMode: EditionMode;
6098
6447
  private sheetId;
@@ -6182,7 +6531,7 @@ declare class ComposerStore extends SpreadsheetStore {
6182
6531
  * Return ranges currently referenced in the composer
6183
6532
  */
6184
6533
  private getReferencedRanges;
6185
- get autoCompleteDataValidationValues(): string[];
6534
+ get autocompleteProvider(): AutoCompleteProvider | undefined;
6186
6535
  /**
6187
6536
  * Function used to determine when composer selection can start.
6188
6537
  * Three conditions are necessary:
@@ -6210,10 +6559,277 @@ declare class ComposerFocusStore extends SpreadsheetStore {
6210
6559
  private setComposerContent;
6211
6560
  }
6212
6561
 
6562
+ declare class ContentEditableHelper {
6563
+ el: HTMLElement;
6564
+ constructor(el: HTMLElement);
6565
+ updateEl(el: HTMLElement): void;
6566
+ /**
6567
+ * select the text at position start to end, no matter the children
6568
+ */
6569
+ selectRange(start: number, end: number): void;
6570
+ /**
6571
+ * finds the dom element that contains the character at `offset`
6572
+ */
6573
+ private findChildAtCharacterIndex;
6574
+ /**
6575
+ * Sets (or Replaces all) the text inside the root element in the form of distinctive paragraphs and
6576
+ * span for each element provided in `contents`.
6577
+ *
6578
+ * The function will apply the diff between the current content and the new content to avoid the systematic
6579
+ * destruction of DOM elements which interferes with IME[1]
6580
+ *
6581
+ * Each line of text will be encapsulated in a paragraph element.
6582
+ * Each span will have its own fontcolor and specific class if provided in the HtmlContent object.
6583
+ *
6584
+ * [1] https://developer.mozilla.org/en-US/docs/Glossary/Input_method_editor
6585
+ */
6586
+ setText(contents: HtmlContent[][]): void;
6587
+ scrollSelectionIntoView(): void;
6588
+ /**
6589
+ * remove the current selection of the user
6590
+ * */
6591
+ removeSelection(): void;
6592
+ private removeAll;
6593
+ /**
6594
+ * finds the indexes of the current selection.
6595
+ * */
6596
+ getCurrentSelection(): {
6597
+ start: number;
6598
+ end: number;
6599
+ };
6600
+ /**
6601
+ * Computes the text 'index' inside this.el based on the currently selected node and its offset.
6602
+ * The selected node is either a Text node or an Element node.
6603
+ *
6604
+ * case 1 -Text node:
6605
+ * the offset is the number of characters from the start of the node. We have to add this offset to the
6606
+ * content length of all previous nodes.
6607
+ *
6608
+ * case 2 - Element node:
6609
+ * the offset is the number of child nodes before the selected node. We have to add the content length of
6610
+ * all the bnodes prior to the selected node as well as the content of the child node before the offset.
6611
+ *
6612
+ * See the MDN documentation for more details.
6613
+ * https://developer.mozilla.org/en-US/docs/Web/API/Range/startOffset
6614
+ * https://developer.mozilla.org/en-US/docs/Web/API/Range/endOffset
6615
+ *
6616
+ */
6617
+ private findSelectionIndex;
6618
+ private getStartAndEndSelection;
6619
+ getText(): string;
6620
+ }
6621
+
6213
6622
  interface Props$z {
6623
+ functionName: string;
6624
+ functionDescription: FunctionDescription;
6625
+ argToFocus: number;
6626
+ }
6627
+ interface AssistantState {
6628
+ allowCellSelectionBehind: boolean;
6629
+ }
6630
+ declare class FunctionDescriptionProvider extends Component<Props$z> {
6631
+ static template: string;
6632
+ static props: {
6633
+ functionName: StringConstructor;
6634
+ functionDescription: ObjectConstructor;
6635
+ argToFocus: NumberConstructor;
6636
+ };
6637
+ assistantState: AssistantState;
6638
+ private timeOutId;
6639
+ setup(): void;
6640
+ getContext(): Props$z;
6641
+ onMouseMove(): void;
6642
+ }
6643
+
6644
+ type HtmlContent = {
6645
+ value: string;
6646
+ color?: Color;
6647
+ class?: string;
6648
+ };
6649
+ declare const tokenColors: {
6650
+ readonly OPERATOR: "#3da4ab";
6651
+ readonly NUMBER: "#02c39a";
6652
+ readonly STRING: "#00a82d";
6653
+ readonly FUNCTION: "#4a4e4d";
6654
+ readonly DEBUGGER: "#3da4ab";
6655
+ readonly LEFT_PAREN: "#4a4e4d";
6656
+ readonly RIGHT_PAREN: "#4a4e4d";
6657
+ readonly ARG_SEPARATOR: "#4a4e4d";
6658
+ readonly MATCHING_PAREN: "#000000";
6659
+ };
6660
+ interface ComposerProps {
6661
+ focus: ComposerFocusType;
6662
+ inputStyle?: string;
6663
+ rect?: Rect;
6664
+ delimitation?: DOMDimension;
6665
+ onComposerContentFocused: () => void;
6666
+ onComposerCellFocused?: (content: String) => void;
6667
+ isDefaultFocus?: boolean;
6668
+ }
6669
+ interface ComposerState {
6670
+ positionStart: number;
6671
+ positionEnd: number;
6672
+ }
6673
+ interface AutoCompleteState {
6674
+ provider: AutoCompleteProvider | undefined;
6675
+ selectedIndex: number | undefined;
6676
+ }
6677
+ interface FunctionDescriptionState {
6678
+ showDescription: boolean;
6679
+ functionName: string;
6680
+ functionDescription: FunctionDescription;
6681
+ argToFocus: number;
6682
+ }
6683
+ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
6684
+ static template: string;
6685
+ static props: {
6686
+ focus: {
6687
+ validate: (value: string) => boolean;
6688
+ };
6689
+ inputStyle: {
6690
+ type: StringConstructor;
6691
+ optional: boolean;
6692
+ };
6693
+ rect: {
6694
+ type: ObjectConstructor;
6695
+ optional: boolean;
6696
+ };
6697
+ delimitation: {
6698
+ type: ObjectConstructor;
6699
+ optional: boolean;
6700
+ };
6701
+ onComposerCellFocused: {
6702
+ type: FunctionConstructor;
6703
+ optional: boolean;
6704
+ };
6705
+ onComposerContentFocused: FunctionConstructor;
6706
+ isDefaultFocus: {
6707
+ type: BooleanConstructor;
6708
+ optional: boolean;
6709
+ };
6710
+ };
6711
+ static components: {
6712
+ TextValueProvider: typeof TextValueProvider;
6713
+ FunctionDescriptionProvider: typeof FunctionDescriptionProvider;
6714
+ };
6715
+ static defaultProps: {
6716
+ inputStyle: string;
6717
+ isDefaultFocus: boolean;
6718
+ };
6719
+ private composerStore;
6720
+ private DOMFocusableElementStore;
6721
+ composerRef: {
6722
+ el: HTMLElement | null;
6723
+ };
6724
+ contentHelper: ContentEditableHelper;
6725
+ composerState: ComposerState;
6726
+ autoCompleteState: AutoCompleteState;
6727
+ functionDescriptionState: FunctionDescriptionState;
6728
+ private compositionActive;
6729
+ get assistantStyle(): string;
6730
+ shouldProcessInputEvents: boolean;
6731
+ tokens: EnrichedToken[];
6732
+ keyMapping: {
6733
+ [key: string]: Function;
6734
+ };
6735
+ keyCodeMapping: {
6736
+ [keyCode: string]: Function;
6737
+ };
6738
+ setup(): void;
6739
+ private processArrowKeys;
6740
+ private handleArrowKeysForAutocomplete;
6741
+ private processTabKey;
6742
+ private processEnterKey;
6743
+ private processNewLineEvent;
6744
+ private processEscapeKey;
6745
+ private processF4Key;
6746
+ private processNumpadDecimal;
6747
+ onCompositionStart(): void;
6748
+ onCompositionEnd(): void;
6749
+ onKeydown(ev: KeyboardEvent): void;
6750
+ onPaste(ev: ClipboardEvent): void;
6751
+ onInput(ev: InputEvent): void;
6752
+ onKeyup(ev: KeyboardEvent): void;
6753
+ showAutoComplete(provider: AutoCompleteProvider): void;
6754
+ updateAutoCompleteIndex(index: number): void;
6755
+ /**
6756
+ * This is required to ensure the content helper selection is
6757
+ * properly updated on "onclick" events. Depending on the browser,
6758
+ * the callback onClick from the composer will be executed before
6759
+ * the selection was updated in the dom, which means we capture an
6760
+ * wrong selection which is then forced upon the content helper on
6761
+ * processContent.
6762
+ */
6763
+ onMousedown(ev: MouseEvent): void;
6764
+ onClick(): void;
6765
+ onDblClick(): void;
6766
+ private processContent;
6767
+ /**
6768
+ * Get the HTML content corresponding to the current composer token, divided by lines.
6769
+ */
6770
+ private getContentLines;
6771
+ private getColoredTokens;
6772
+ /**
6773
+ * Split an array of HTMLContents into lines. Each NEWLINE character encountered will create a new
6774
+ * line. Contents can be split into multiple parts if they contain multiple NEWLINE characters.
6775
+ */
6776
+ private splitHtmlContentIntoLines;
6777
+ private isContentEmpty;
6778
+ private rangeColor;
6779
+ /**
6780
+ * Compute the state of the composer from the tokenAtCursor.
6781
+ * If the token is a function or symbol (that isn't a cell/range reference) we have to initialize
6782
+ * the autocomplete engine otherwise we initialize the formula assistant.
6783
+ */
6784
+ private processTokenAtCursor;
6785
+ private autoComplete;
6786
+ }
6787
+
6788
+ interface AutoCompleteProposal {
6789
+ /**
6790
+ * Text to auto complete.
6791
+ */
6792
+ text: string;
6793
+ description?: string;
6794
+ /**
6795
+ * Version of the text but displayed using html to highlight part of it.
6796
+ */
6797
+ htmlContent?: HtmlContent[];
6798
+ /**
6799
+ * Key to use for fuzzy search.
6800
+ */
6801
+ fuzzySearchKey?: string;
6802
+ }
6803
+ interface AutoCompleteProvider {
6804
+ proposals: AutoCompleteProposal[];
6805
+ selectProposal(text: string): void;
6806
+ autoSelectFirstProposal: boolean;
6807
+ }
6808
+ /**
6809
+ * We declare the providers in the registry as an object (rather than a class)
6810
+ * to allow a type-safe way to declare the provider.
6811
+ * We still want to be able to use `this` for the getters and dispatch for simplicity.
6812
+ * Binding happens at runtime in the edition plugin.
6813
+ */
6814
+ interface AutoCompleteProviderDefinition {
6815
+ sequence?: number;
6816
+ autoSelectFirstProposal?: boolean;
6817
+ maxDisplayedProposals?: number;
6818
+ getProposals(this: {
6819
+ composer: ComposerStore;
6820
+ getters: Getters;
6821
+ }, tokenAtCursor: EnrichedToken, content: string): AutoCompleteProposal[] | undefined;
6822
+ selectProposal(this: {
6823
+ composer: ComposerStore;
6824
+ }, tokenAtCursor: EnrichedToken, text: string): void;
6825
+ }
6826
+
6827
+ declare function transformRangeData(range: RangeData, executed: CoreCommand): RangeData | undefined;
6828
+
6829
+ interface Props$y {
6214
6830
  figure: Figure;
6215
6831
  }
6216
- declare class ChartJsComponent extends Component<Props$z, SpreadsheetChildEnv> {
6832
+ declare class ChartJsComponent extends Component<Props$y, SpreadsheetChildEnv> {
6217
6833
  static template: string;
6218
6834
  static props: {
6219
6835
  figure: ObjectConstructor;
@@ -6228,10 +6844,10 @@ declare class ChartJsComponent extends Component<Props$z, SpreadsheetChildEnv> {
6228
6844
  private updateChartJs;
6229
6845
  }
6230
6846
 
6231
- interface Props$y {
6847
+ interface Props$x {
6232
6848
  figure: Figure;
6233
6849
  }
6234
- declare class ScorecardChart extends Component<Props$y, SpreadsheetChildEnv> {
6850
+ declare class ScorecardChart extends Component<Props$x, SpreadsheetChildEnv> {
6235
6851
  static template: string;
6236
6852
  static props: {
6237
6853
  figure: ObjectConstructor;
@@ -6243,7 +6859,7 @@ declare class ScorecardChart extends Component<Props$y, SpreadsheetChildEnv> {
6243
6859
  }
6244
6860
 
6245
6861
  type MenuItemOrSeparator = Action | "separator";
6246
- interface Props$x {
6862
+ interface Props$w {
6247
6863
  position: DOMCoordinates;
6248
6864
  menuItems: Action[];
6249
6865
  depth: number;
@@ -6259,7 +6875,7 @@ interface MenuState {
6259
6875
  scrollOffset?: Pixel;
6260
6876
  menuItems: Action[];
6261
6877
  }
6262
- declare class Menu extends Component<Props$x, SpreadsheetChildEnv> {
6878
+ declare class Menu extends Component<Props$w, SpreadsheetChildEnv> {
6263
6879
  static template: string;
6264
6880
  static props: {
6265
6881
  position: ObjectConstructor;
@@ -6320,14 +6936,14 @@ declare class Menu extends Component<Props$x, SpreadsheetChildEnv> {
6320
6936
  }
6321
6937
 
6322
6938
  type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
6323
- interface Props$w {
6939
+ interface Props$v {
6324
6940
  figure: Figure;
6325
6941
  style: string;
6326
6942
  onFigureDeleted: () => void;
6327
6943
  onMouseDown: (ev: MouseEvent) => void;
6328
6944
  onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
6329
6945
  }
6330
- declare class FigureComponent extends Component<Props$w, SpreadsheetChildEnv> {
6946
+ declare class FigureComponent extends Component<Props$v, SpreadsheetChildEnv> {
6331
6947
  static template: string;
6332
6948
  static props: {
6333
6949
  figure: ObjectConstructor;
@@ -6376,11 +6992,11 @@ declare class FigureComponent extends Component<Props$w, SpreadsheetChildEnv> {
6376
6992
  private openContextMenu;
6377
6993
  }
6378
6994
 
6379
- interface Props$v {
6995
+ interface Props$u {
6380
6996
  figure: Figure;
6381
6997
  onFigureDeleted: () => void;
6382
6998
  }
6383
- declare class ChartFigure extends Component<Props$v, SpreadsheetChildEnv> {
6999
+ declare class ChartFigure extends Component<Props$u, SpreadsheetChildEnv> {
6384
7000
  static template: string;
6385
7001
  static props: {
6386
7002
  figure: ObjectConstructor;
@@ -6392,7 +7008,7 @@ declare class ChartFigure extends Component<Props$v, SpreadsheetChildEnv> {
6392
7008
  get chartComponent(): new (...args: any) => Component;
6393
7009
  }
6394
7010
 
6395
- interface Props$u {
7011
+ interface Props$t {
6396
7012
  isVisible: boolean;
6397
7013
  position: Position;
6398
7014
  }
@@ -6400,298 +7016,52 @@ interface Position {
6400
7016
  top: HeaderIndex;
6401
7017
  left: HeaderIndex;
6402
7018
  }
6403
- interface State$5 {
6404
- position: Position;
6405
- handler: boolean;
6406
- }
6407
- declare class Autofill extends Component<Props$u, SpreadsheetChildEnv> {
6408
- static template: string;
6409
- static props: {
6410
- position: ObjectConstructor;
6411
- isVisible: BooleanConstructor;
6412
- };
6413
- state: State$5;
6414
- get style(): string;
6415
- get handlerStyle(): string;
6416
- get styleNextValue(): string;
6417
- getTooltip(): Tooltip | undefined;
6418
- onMouseDown(ev: MouseEvent): void;
6419
- onDblClick(): void;
6420
- }
6421
-
6422
- interface ClientTagProps {
6423
- active: boolean;
6424
- name: string;
6425
- color: Color;
6426
- col: HeaderIndex;
6427
- row: HeaderIndex;
6428
- }
6429
- declare class ClientTag extends Component<ClientTagProps, SpreadsheetChildEnv> {
6430
- static template: string;
6431
- static props: {
6432
- active: BooleanConstructor;
6433
- name: StringConstructor;
6434
- color: StringConstructor;
6435
- col: NumberConstructor;
6436
- row: NumberConstructor;
6437
- };
6438
- get tagStyle(): string;
6439
- }
6440
-
6441
- interface Props$t {
6442
- values: AutocompleteValue[];
6443
- selectedIndex: number | undefined;
6444
- getHtmlContent: (value: string) => string;
6445
- onValueSelected: (value: string) => void;
6446
- onValueHovered: (index: string) => void;
6447
- }
6448
- declare class TextValueProvider extends Component<Props$t> {
6449
- static template: string;
6450
- static props: {
6451
- values: ArrayConstructor;
6452
- selectedIndex: {
6453
- type: NumberConstructor;
6454
- optional: boolean;
6455
- };
6456
- getHtmlContent: FunctionConstructor;
6457
- onValueSelected: FunctionConstructor;
6458
- onValueHovered: FunctionConstructor;
6459
- };
6460
- private autoCompleteListRef;
6461
- setup(): void;
6462
- }
6463
-
6464
- declare class ContentEditableHelper {
6465
- el: HTMLElement;
6466
- constructor(el: HTMLElement);
6467
- updateEl(el: HTMLElement): void;
6468
- /**
6469
- * select the text at position start to end, no matter the children
6470
- */
6471
- selectRange(start: number, end: number): void;
6472
- /**
6473
- * finds the dom element that contains the character at `offset`
6474
- */
6475
- private findChildAtCharacterIndex;
6476
- /**
6477
- * Sets (or Replaces all) the text inside the root element in the form of distinctive paragraphs and
6478
- * span for each element provided in `contents`.
6479
- *
6480
- * The function will apply the diff between the current content and the new content to avoid the systematic
6481
- * destruction of DOM elements which interferes with IME[1]
6482
- *
6483
- * Each line of text will be encapsulated in a paragraph element.
6484
- * Each span will have its own fontcolor and specific class if provided in the HtmlContent object.
6485
- *
6486
- * [1] https://developer.mozilla.org/en-US/docs/Glossary/Input_method_editor
6487
- */
6488
- setText(contents: HtmlContent[][]): void;
6489
- scrollSelectionIntoView(): void;
6490
- /**
6491
- * remove the current selection of the user
6492
- * */
6493
- removeSelection(): void;
6494
- private removeAll;
6495
- /**
6496
- * finds the indexes of the current selection.
6497
- * */
6498
- getCurrentSelection(): {
6499
- start: number;
6500
- end: number;
6501
- };
6502
- /**
6503
- * Computes the text 'index' inside this.el based on the currently selected node and its offset.
6504
- * The selected node is either a Text node or an Element node.
6505
- *
6506
- * case 1 -Text node:
6507
- * the offset is the number of characters from the start of the node. We have to add this offset to the
6508
- * content length of all previous nodes.
6509
- *
6510
- * case 2 - Element node:
6511
- * the offset is the number of child nodes before the selected node. We have to add the content length of
6512
- * all the bnodes prior to the selected node as well as the content of the child node before the offset.
6513
- *
6514
- * See the MDN documentation for more details.
6515
- * https://developer.mozilla.org/en-US/docs/Web/API/Range/startOffset
6516
- * https://developer.mozilla.org/en-US/docs/Web/API/Range/endOffset
6517
- *
6518
- */
6519
- private findSelectionIndex;
6520
- private getStartAndEndSelection;
6521
- getText(): string;
6522
- }
6523
-
6524
- interface Props$s {
6525
- functionName: string;
6526
- functionDescription: FunctionDescription;
6527
- argToFocus: number;
6528
- }
6529
- interface AssistantState {
6530
- allowCellSelectionBehind: boolean;
6531
- }
6532
- declare class FunctionDescriptionProvider extends Component<Props$s> {
6533
- static template: string;
6534
- static props: {
6535
- functionName: StringConstructor;
6536
- functionDescription: ObjectConstructor;
6537
- argToFocus: NumberConstructor;
6538
- };
6539
- assistantState: AssistantState;
6540
- private timeOutId;
6541
- setup(): void;
6542
- getContext(): Props$s;
6543
- onMouseMove(): void;
6544
- }
6545
-
6546
- type HtmlContent = {
6547
- value: string;
6548
- color?: Color;
6549
- class?: string;
6550
- };
6551
- interface AutocompleteValue {
6552
- text: string;
6553
- description: string;
6554
- }
6555
- interface ComposerProps {
6556
- focus: ComposerFocusType;
6557
- inputStyle?: string;
6558
- rect?: Rect;
6559
- delimitation?: DOMDimension;
6560
- onComposerContentFocused: () => void;
6561
- onComposerCellFocused?: (content: String) => void;
6562
- isDefaultFocus?: boolean;
6563
- }
6564
- interface ComposerState {
6565
- positionStart: number;
6566
- positionEnd: number;
6567
- }
6568
- interface AutoCompleteState {
6569
- showProvider: boolean;
6570
- selectedIndex: number | undefined;
6571
- values: AutocompleteValue[];
6572
- type: "function" | "dataValidation";
6573
- getHtmlContent: (text: string) => HtmlContent[];
6574
- }
6575
- interface FunctionDescriptionState {
6576
- showDescription: boolean;
6577
- functionName: string;
6578
- functionDescription: FunctionDescription;
6579
- argToFocus: number;
7019
+ interface State$6 {
7020
+ position: Position;
7021
+ handler: boolean;
6580
7022
  }
6581
- declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
7023
+ declare class Autofill extends Component<Props$t, SpreadsheetChildEnv> {
6582
7024
  static template: string;
6583
7025
  static props: {
6584
- focus: {
6585
- validate: (value: string) => boolean;
6586
- };
6587
- inputStyle: {
6588
- type: StringConstructor;
6589
- optional: boolean;
6590
- };
6591
- rect: {
6592
- type: ObjectConstructor;
6593
- optional: boolean;
6594
- };
6595
- delimitation: {
6596
- type: ObjectConstructor;
6597
- optional: boolean;
6598
- };
6599
- onComposerCellFocused: {
6600
- type: FunctionConstructor;
6601
- optional: boolean;
6602
- };
6603
- onComposerContentFocused: FunctionConstructor;
6604
- isDefaultFocus: {
6605
- type: BooleanConstructor;
6606
- optional: boolean;
6607
- };
6608
- };
6609
- static components: {
6610
- TextValueProvider: typeof TextValueProvider;
6611
- FunctionDescriptionProvider: typeof FunctionDescriptionProvider;
6612
- };
6613
- static defaultProps: {
6614
- inputStyle: string;
6615
- isDefaultFocus: boolean;
6616
- };
6617
- private composerStore;
6618
- private DOMFocusableElementStore;
6619
- composerRef: {
6620
- el: HTMLElement | null;
6621
- };
6622
- contentHelper: ContentEditableHelper;
6623
- composerState: ComposerState;
6624
- autoCompleteState: AutoCompleteState;
6625
- functionDescriptionState: FunctionDescriptionState;
6626
- private compositionActive;
6627
- get assistantStyle(): string;
6628
- shouldProcessInputEvents: boolean;
6629
- tokens: EnrichedToken[];
6630
- keyMapping: {
6631
- [key: string]: Function;
6632
- };
6633
- keyCodeMapping: {
6634
- [keyCode: string]: Function;
7026
+ position: ObjectConstructor;
7027
+ isVisible: BooleanConstructor;
6635
7028
  };
6636
- setup(): void;
6637
- private processArrowKeys;
6638
- private handleArrowKeysForAutocomplete;
6639
- private processTabKey;
6640
- private processEnterKey;
6641
- private processNewLineEvent;
6642
- private processEscapeKey;
6643
- private processF4Key;
6644
- private processNumpadDecimal;
6645
- onCompositionStart(): void;
6646
- onCompositionEnd(): void;
6647
- onKeydown(ev: KeyboardEvent): void;
6648
- onPaste(ev: ClipboardEvent): void;
6649
- onInput(ev: InputEvent): void;
6650
- onKeyup(ev: KeyboardEvent): void;
6651
- showFunctionAutocomplete(searchTerm: string): void;
6652
- updateAutoCompleteIndex(index: number): void;
6653
- /**
6654
- * This is required to ensure the content helper selection is
6655
- * properly updated on "onclick" events. Depending on the browser,
6656
- * the callback onClick from the composer will be executed before
6657
- * the selection was updated in the dom, which means we capture an
6658
- * wrong selection which is then forced upon the content helper on
6659
- * processContent.
6660
- */
6661
- onMousedown(ev: MouseEvent): void;
6662
- onClick(): void;
7029
+ state: State$6;
7030
+ get style(): string;
7031
+ get handlerStyle(): string;
7032
+ get styleNextValue(): string;
7033
+ getTooltip(): Tooltip | undefined;
7034
+ onMouseDown(ev: MouseEvent): void;
6663
7035
  onDblClick(): void;
6664
- private processContent;
6665
- /**
6666
- * Get the HTML content corresponding to the current composer token, divided by lines.
6667
- */
6668
- private getContentLines;
6669
- private getColoredTokens;
6670
- /**
6671
- * Split an array of HTMLContents into lines. Each NEWLINE character encountered will create a new
6672
- * line. Contents can be split into multiple parts if they contain multiple NEWLINE characters.
6673
- */
6674
- private splitHtmlContentIntoLines;
6675
- private isContentEmpty;
6676
- private rangeColor;
6677
- /**
6678
- * Compute the state of the composer from the tokenAtCursor.
6679
- * If the token is a function or symbol (that isn't a cell/range reference) we have to initialize
6680
- * the autocomplete engine otherwise we initialize the formula assistant.
6681
- */
6682
- private processTokenAtCursor;
6683
- private autoComplete;
6684
- private showDataValidationAutocomplete;
6685
7036
  }
6686
7037
 
6687
- interface Props$r {
7038
+ interface ClientTagProps {
7039
+ active: boolean;
7040
+ name: string;
7041
+ color: Color;
7042
+ col: HeaderIndex;
7043
+ row: HeaderIndex;
7044
+ }
7045
+ declare class ClientTag extends Component<ClientTagProps, SpreadsheetChildEnv> {
7046
+ static template: string;
7047
+ static props: {
7048
+ active: BooleanConstructor;
7049
+ name: StringConstructor;
7050
+ color: StringConstructor;
7051
+ col: NumberConstructor;
7052
+ row: NumberConstructor;
7053
+ };
7054
+ get tagStyle(): string;
7055
+ }
7056
+
7057
+ interface Props$s {
6688
7058
  gridDims: DOMDimension;
6689
7059
  }
6690
7060
  /**
6691
7061
  * This component is a composer which positions itself on the grid at the anchor cell.
6692
7062
  * It also applies the style of the cell to the composer input.
6693
7063
  */
6694
- declare class GridComposer extends Component<Props$r, SpreadsheetChildEnv> {
7064
+ declare class GridComposer extends Component<Props$s, SpreadsheetChildEnv> {
6695
7065
  static template: string;
6696
7066
  static props: {
6697
7067
  gridDims: ObjectConstructor;
@@ -6773,10 +7143,10 @@ declare class CellPopoverStore extends SpreadsheetStore {
6773
7143
  private computePopoverAnchorRect;
6774
7144
  }
6775
7145
 
6776
- interface Props$q {
7146
+ interface Props$r {
6777
7147
  cellPosition: CellPosition;
6778
7148
  }
6779
- declare class FilterIcon extends Component<Props$q, SpreadsheetChildEnv> {
7149
+ declare class FilterIcon extends Component<Props$r, SpreadsheetChildEnv> {
6780
7150
  static template: string;
6781
7151
  static props: {
6782
7152
  cellPosition: ObjectConstructor;
@@ -6785,12 +7155,13 @@ declare class FilterIcon extends Component<Props$q, SpreadsheetChildEnv> {
6785
7155
  setup(): void;
6786
7156
  onClick(): void;
6787
7157
  get isFilterActive(): boolean;
7158
+ get iconClass(): string;
6788
7159
  }
6789
7160
 
6790
- interface Props$p {
7161
+ interface Props$q {
6791
7162
  gridPosition: DOMCoordinates;
6792
7163
  }
6793
- declare class FilterIconsOverlay extends Component<Props$p, SpreadsheetChildEnv> {
7164
+ declare class FilterIconsOverlay extends Component<Props$q, SpreadsheetChildEnv> {
6794
7165
  static template: string;
6795
7166
  static props: {
6796
7167
  gridPosition: {
@@ -6811,10 +7182,10 @@ declare class FilterIconsOverlay extends Component<Props$p, SpreadsheetChildEnv>
6811
7182
  getFilterHeadersPositions(): CellPosition[];
6812
7183
  }
6813
7184
 
6814
- interface Props$o {
7185
+ interface Props$p {
6815
7186
  cellPosition: CellPosition;
6816
7187
  }
6817
- declare class DataValidationCheckbox extends Component<Props$o, SpreadsheetChildEnv> {
7188
+ declare class DataValidationCheckbox extends Component<Props$p, SpreadsheetChildEnv> {
6818
7189
  static template: string;
6819
7190
  static props: {
6820
7191
  cellPosition: ObjectConstructor;
@@ -6824,10 +7195,10 @@ declare class DataValidationCheckbox extends Component<Props$o, SpreadsheetChild
6824
7195
  get isDisabled(): boolean;
6825
7196
  }
6826
7197
 
6827
- interface Props$n {
7198
+ interface Props$o {
6828
7199
  cellPosition: CellPosition;
6829
7200
  }
6830
- declare class DataValidationListIcon extends Component<Props$n, SpreadsheetChildEnv> {
7201
+ declare class DataValidationListIcon extends Component<Props$o, SpreadsheetChildEnv> {
6831
7202
  static template: string;
6832
7203
  static props: {
6833
7204
  cellPosition: ObjectConstructor;
@@ -6857,7 +7228,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
6857
7228
  }
6858
7229
 
6859
7230
  type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
6860
- interface Props$m {
7231
+ interface Props$n {
6861
7232
  onFigureDeleted: () => void;
6862
7233
  }
6863
7234
  interface Container {
@@ -6936,7 +7307,7 @@ interface DndState {
6936
7307
  * that occurred during the drag & drop, and to position the figure on the correct pane.
6937
7308
  *
6938
7309
  */
6939
- declare class FiguresContainer extends Component<Props$m, SpreadsheetChildEnv> {
7310
+ declare class FiguresContainer extends Component<Props$n, SpreadsheetChildEnv> {
6940
7311
  static template: string;
6941
7312
  static props: {
6942
7313
  onFigureDeleted: FunctionConstructor;
@@ -6971,10 +7342,10 @@ declare class FiguresContainer extends Component<Props$m, SpreadsheetChildEnv> {
6971
7342
  private getSnapLineStyle;
6972
7343
  }
6973
7344
 
6974
- interface Props$l {
7345
+ interface Props$m {
6975
7346
  focusGrid: () => void;
6976
7347
  }
6977
- declare class GridAddRowsFooter extends Component<Props$l, SpreadsheetChildEnv> {
7348
+ declare class GridAddRowsFooter extends Component<Props$m, SpreadsheetChildEnv> {
6978
7349
  static template: string;
6979
7350
  static props: {
6980
7351
  focusGrid: FunctionConstructor;
@@ -6998,7 +7369,7 @@ declare class GridAddRowsFooter extends Component<Props$l, SpreadsheetChildEnv>
6998
7369
  private onExternalClick;
6999
7370
  }
7000
7371
 
7001
- interface Props$k {
7372
+ interface Props$l {
7002
7373
  onCellHovered: (position: Partial<Position$1>) => void;
7003
7374
  onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
7004
7375
  onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
@@ -7011,7 +7382,7 @@ interface Props$k {
7011
7382
  gridOverlayDimensions: string;
7012
7383
  onFigureDeleted: () => void;
7013
7384
  }
7014
- declare class GridOverlay extends Component<Props$k, SpreadsheetChildEnv> {
7385
+ declare class GridOverlay extends Component<Props$l, SpreadsheetChildEnv> {
7015
7386
  static template: string;
7016
7387
  static props: {
7017
7388
  onCellHovered: {
@@ -7066,12 +7437,12 @@ declare class GridOverlay extends Component<Props$k, SpreadsheetChildEnv> {
7066
7437
  private getCartesianCoordinates;
7067
7438
  }
7068
7439
 
7069
- interface Props$j {
7440
+ interface Props$k {
7070
7441
  gridRect: Rect;
7071
7442
  onClosePopover: () => void;
7072
7443
  onMouseWheel: (ev: WheelEvent) => void;
7073
7444
  }
7074
- declare class GridPopover extends Component<Props$j, SpreadsheetChildEnv> {
7445
+ declare class GridPopover extends Component<Props$k, SpreadsheetChildEnv> {
7075
7446
  static template: string;
7076
7447
  static props: {
7077
7448
  onClosePopover: FunctionConstructor;
@@ -7214,13 +7585,13 @@ declare class HeadersOverlay extends Component<any, SpreadsheetChildEnv> {
7214
7585
  }
7215
7586
 
7216
7587
  type Orientation$1 = "n" | "s" | "w" | "e";
7217
- interface Props$i {
7588
+ interface Props$j {
7218
7589
  zone: Zone;
7219
7590
  orientation: Orientation$1;
7220
7591
  isMoving: boolean;
7221
7592
  onMoveHighlight: (x: Pixel, y: Pixel) => void;
7222
7593
  }
7223
- declare class Border extends Component<Props$i, SpreadsheetChildEnv> {
7594
+ declare class Border extends Component<Props$j, SpreadsheetChildEnv> {
7224
7595
  static template: string;
7225
7596
  static props: {
7226
7597
  zone: ObjectConstructor;
@@ -7233,14 +7604,14 @@ declare class Border extends Component<Props$i, SpreadsheetChildEnv> {
7233
7604
  }
7234
7605
 
7235
7606
  type Orientation = "nw" | "ne" | "sw" | "se";
7236
- interface Props$h {
7607
+ interface Props$i {
7237
7608
  zone: Zone;
7238
7609
  color: Color;
7239
7610
  orientation: Orientation;
7240
7611
  isResizing: boolean;
7241
7612
  onResizeHighlight: (isLeft: boolean, isRight: boolean) => void;
7242
7613
  }
7243
- declare class Corner extends Component<Props$h, SpreadsheetChildEnv> {
7614
+ declare class Corner extends Component<Props$i, SpreadsheetChildEnv> {
7244
7615
  static template: string;
7245
7616
  static props: {
7246
7617
  zone: ObjectConstructor;
@@ -7255,14 +7626,14 @@ declare class Corner extends Component<Props$h, SpreadsheetChildEnv> {
7255
7626
  onMouseDown(ev: MouseEvent): void;
7256
7627
  }
7257
7628
 
7258
- interface Props$g {
7629
+ interface Props$h {
7259
7630
  zone: Zone;
7260
7631
  color: Color;
7261
7632
  }
7262
7633
  interface HighlightState {
7263
7634
  shiftingMode: "isMoving" | "isResizing" | "none";
7264
7635
  }
7265
- declare class Highlight extends Component<Props$g, SpreadsheetChildEnv> {
7636
+ declare class Highlight extends Component<Props$h, SpreadsheetChildEnv> {
7266
7637
  static template: string;
7267
7638
  static props: {
7268
7639
  zone: ObjectConstructor;
@@ -7279,7 +7650,7 @@ declare class Highlight extends Component<Props$g, SpreadsheetChildEnv> {
7279
7650
 
7280
7651
  type ScrollDirection = "horizontal" | "vertical";
7281
7652
 
7282
- interface Props$f {
7653
+ interface Props$g {
7283
7654
  width: Pixel;
7284
7655
  height: Pixel;
7285
7656
  direction: ScrollDirection;
@@ -7287,7 +7658,7 @@ interface Props$f {
7287
7658
  offset: Pixel;
7288
7659
  onScroll: (offset: Pixel) => void;
7289
7660
  }
7290
- declare class ScrollBar extends Component<Props$f> {
7661
+ declare class ScrollBar extends Component<Props$g> {
7291
7662
  static props: {
7292
7663
  width: {
7293
7664
  type: NumberConstructor;
@@ -7315,10 +7686,10 @@ declare class ScrollBar extends Component<Props$f> {
7315
7686
  onScroll(ev: any): void;
7316
7687
  }
7317
7688
 
7318
- interface Props$e {
7689
+ interface Props$f {
7319
7690
  leftOffset: number;
7320
7691
  }
7321
- declare class HorizontalScrollBar extends Component<Props$e, SpreadsheetChildEnv> {
7692
+ declare class HorizontalScrollBar extends Component<Props$f, SpreadsheetChildEnv> {
7322
7693
  static props: {
7323
7694
  leftOffset: {
7324
7695
  type: NumberConstructor;
@@ -7344,10 +7715,10 @@ declare class HorizontalScrollBar extends Component<Props$e, SpreadsheetChildEnv
7344
7715
  onScroll(offset: any): void;
7345
7716
  }
7346
7717
 
7347
- interface Props$d {
7718
+ interface Props$e {
7348
7719
  topOffset: number;
7349
7720
  }
7350
- declare class VerticalScrollBar extends Component<Props$d, SpreadsheetChildEnv> {
7721
+ declare class VerticalScrollBar extends Component<Props$e, SpreadsheetChildEnv> {
7351
7722
  static props: {
7352
7723
  topOffset: {
7353
7724
  type: NumberConstructor;
@@ -7373,19 +7744,6 @@ declare class VerticalScrollBar extends Component<Props$d, SpreadsheetChildEnv>
7373
7744
  onScroll(offset: any): void;
7374
7745
  }
7375
7746
 
7376
- interface SidePanelProps {
7377
- onCloseSidePanel?: () => void;
7378
- [key: string]: unknown;
7379
- }
7380
- declare class SidePanelStore extends SpreadsheetStore {
7381
- isOpen: boolean;
7382
- panelProps: SidePanelProps;
7383
- componentTag: string;
7384
- open(componentTag: string, panelProps?: SidePanelProps): void;
7385
- toggle(componentTag: string, panelProps: SidePanelProps): void;
7386
- close(): void;
7387
- }
7388
-
7389
7747
  declare class HoveredCellStore extends SpreadsheetStore {
7390
7748
  col: number | undefined;
7391
7749
  row: number | undefined;
@@ -7405,10 +7763,10 @@ declare class HoveredCellStore extends SpreadsheetStore {
7405
7763
  * - a vertical resizer (same, for rows)
7406
7764
  */
7407
7765
  type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER" | "GROUP_HEADERS" | "UNGROUP_HEADERS";
7408
- interface Props$c {
7766
+ interface Props$d {
7409
7767
  exposeFocus: (focus: () => void) => void;
7410
7768
  }
7411
- declare class Grid extends Component<Props$c, SpreadsheetChildEnv> {
7769
+ declare class Grid extends Component<Props$d, SpreadsheetChildEnv> {
7412
7770
  static template: string;
7413
7771
  static props: {
7414
7772
  exposeFocus: FunctionConstructor;
@@ -7500,30 +7858,37 @@ interface DndPartialArgs {
7500
7858
  onCancel?: () => void;
7501
7859
  onDragEnd?: (itemId: UID, indexAtEnd: Pixel) => void;
7502
7860
  }
7503
- interface State$4 {
7861
+ interface State$5 {
7504
7862
  itemsStyle: Record<UID, string>;
7505
7863
  draggedItemId: UID | undefined;
7506
7864
  start: (direction: Direction, args: DndPartialArgs) => void;
7507
7865
  cancel: () => void;
7508
7866
  }
7509
- declare function useDragAndDropListItems(): State$4;
7867
+ declare function useDragAndDropListItems(): State$5;
7510
7868
 
7511
7869
  declare function useHighlightsOnHover(ref: Ref<HTMLElement>, highlightProvider: HighlightProvider): void;
7512
7870
  declare function useHighlights(highlightProvider: HighlightProvider): void;
7513
7871
 
7514
- interface Props$b {
7872
+ declare class MainChartPanelStore extends SpreadsheetStore {
7873
+ panel: "configuration" | "design";
7874
+ activatePanel(panel: "configuration" | "design"): void;
7875
+ }
7876
+
7877
+ interface Props$c {
7515
7878
  onCloseSidePanel: () => void;
7879
+ figureId: UID;
7516
7880
  }
7517
- declare class ChartPanel extends Component<Props$b, SpreadsheetChildEnv> {
7881
+ declare class ChartPanel extends Component<Props$c, SpreadsheetChildEnv> {
7518
7882
  static template: string;
7519
7883
  static components: {
7520
7884
  Section: typeof Section;
7521
7885
  };
7522
7886
  static props: {
7523
7887
  onCloseSidePanel: FunctionConstructor;
7888
+ figureId: StringConstructor;
7524
7889
  };
7525
- private store;
7526
- get figureId(): UID | null;
7890
+ store: Store<MainChartPanelStore>;
7891
+ get figureId(): UID;
7527
7892
  setup(): void;
7528
7893
  updateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
7529
7894
  canUpdateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
@@ -7781,13 +8146,13 @@ declare class Ripple extends Component<RippleProps, SpreadsheetChildEnv> {
7781
8146
  getRippleEffectProps(id: number): RippleEffectProps;
7782
8147
  }
7783
8148
 
7784
- interface Props$a {
8149
+ interface Props$b {
7785
8150
  sheetId: string;
7786
8151
  openContextMenu: (registry: MenuItemRegistry, ev: MouseEvent) => void;
7787
8152
  style?: string;
7788
8153
  onMouseDown: (ev: MouseEvent) => void;
7789
8154
  }
7790
- declare class BottomBarSheet extends Component<Props$a, SpreadsheetChildEnv> {
8155
+ declare class BottomBarSheet extends Component<Props$b, SpreadsheetChildEnv> {
7791
8156
  static template: string;
7792
8157
  static props: {
7793
8158
  sheetId: StringConstructor;
@@ -7833,11 +8198,11 @@ declare class BottomBarSheet extends Component<Props$a, SpreadsheetChildEnv> {
7833
8198
  get sheetName(): string;
7834
8199
  }
7835
8200
 
7836
- interface Props$9 {
8201
+ interface Props$a {
7837
8202
  openContextMenu: (x: number, y: number, registry: MenuItemRegistry) => void;
7838
8203
  closeContextMenu: () => void;
7839
8204
  }
7840
- declare class BottomBarStatistic extends Component<Props$9, SpreadsheetChildEnv> {
8205
+ declare class BottomBarStatistic extends Component<Props$a, SpreadsheetChildEnv> {
7841
8206
  static template: string;
7842
8207
  static props: {
7843
8208
  openContextMenu: FunctionConstructor;
@@ -7858,13 +8223,13 @@ interface BottomBarSheetItem {
7858
8223
  id: UID;
7859
8224
  name: string;
7860
8225
  }
7861
- interface Props$8 {
8226
+ interface Props$9 {
7862
8227
  onClick: () => void;
7863
8228
  }
7864
8229
  interface BottomBarMenuState extends MenuState {
7865
8230
  menuId: UID | undefined;
7866
8231
  }
7867
- declare class BottomBar extends Component<Props$8, SpreadsheetChildEnv> {
8232
+ declare class BottomBar extends Component<Props$9, SpreadsheetChildEnv> {
7868
8233
  static template: string;
7869
8234
  static props: {
7870
8235
  onClick: FunctionConstructor;
@@ -7906,7 +8271,7 @@ declare class BottomBar extends Component<Props$8, SpreadsheetChildEnv> {
7906
8271
  get sheetListMaxScroll(): number;
7907
8272
  }
7908
8273
 
7909
- interface Props$7 {
8274
+ interface Props$8 {
7910
8275
  }
7911
8276
  interface ClickableCell {
7912
8277
  coordinates: Rect;
@@ -7914,7 +8279,7 @@ interface ClickableCell {
7914
8279
  action: (position: CellPosition, env: SpreadsheetChildEnv) => void;
7915
8280
  tKey: string;
7916
8281
  }
7917
- declare class SpreadsheetDashboard extends Component<Props$7, SpreadsheetChildEnv> {
8282
+ declare class SpreadsheetDashboard extends Component<Props$8, SpreadsheetChildEnv> {
7918
8283
  static template: string;
7919
8284
  static props: {};
7920
8285
  static components: {
@@ -7952,7 +8317,7 @@ declare class SpreadsheetDashboard extends Component<Props$7, SpreadsheetChildEn
7952
8317
  private getGridRect;
7953
8318
  }
7954
8319
 
7955
- interface Props$6 {
8320
+ interface Props$7 {
7956
8321
  group: HeaderGroup;
7957
8322
  layerOffset: number;
7958
8323
  openContextMenu(position: DOMCoordinates, menuItems: Action[]): void;
@@ -7962,7 +8327,7 @@ interface GroupBox {
7962
8327
  headerRect: Rect;
7963
8328
  isEndHidden: boolean;
7964
8329
  }
7965
- declare abstract class AbstractHeaderGroup extends Component<Props$6, SpreadsheetChildEnv> {
8330
+ declare abstract class AbstractHeaderGroup extends Component<Props$7, SpreadsheetChildEnv> {
7966
8331
  static template: string;
7967
8332
  static props: {
7968
8333
  group: ObjectConstructor;
@@ -7994,11 +8359,11 @@ declare class ColGroup extends AbstractHeaderGroup {
7994
8359
  get groupBox(): GroupBox;
7995
8360
  }
7996
8361
 
7997
- interface Props$5 {
8362
+ interface Props$6 {
7998
8363
  dimension: Dimension;
7999
8364
  layers: HeaderGroup[][];
8000
8365
  }
8001
- declare class HeaderGroupContainer extends Component<Props$5, SpreadsheetChildEnv> {
8366
+ declare class HeaderGroupContainer extends Component<Props$6, SpreadsheetChildEnv> {
8002
8367
  static template: string;
8003
8368
  static props: {
8004
8369
  dimension: StringConstructor;
@@ -8021,7 +8386,7 @@ declare class HeaderGroupContainer extends Component<Props$5, SpreadsheetChildEn
8021
8386
  get frozenPaneContainerSize(): Pixel;
8022
8387
  }
8023
8388
 
8024
- declare class SidePanel extends Component<never, SpreadsheetChildEnv> {
8389
+ declare class SidePanel extends Component<{}, SpreadsheetChildEnv> {
8025
8390
  static template: string;
8026
8391
  static props: {};
8027
8392
  sidePanelStore: Store<SidePanelStore>;
@@ -8031,6 +8396,39 @@ declare class SidePanel extends Component<never, SpreadsheetChildEnv> {
8031
8396
  getTitle(): string;
8032
8397
  }
8033
8398
 
8399
+ declare const sortRange: ActionSpec;
8400
+ declare const sortAscending: ActionSpec;
8401
+ declare const dataCleanup: ActionSpec;
8402
+ declare const removeDuplicates: ActionSpec;
8403
+ declare const trimWhitespace: ActionSpec;
8404
+ declare const sortDescending: ActionSpec;
8405
+ declare const createRemoveFilter: ActionSpec;
8406
+ declare const createRemoveFilterTool: ActionSpec;
8407
+ declare const splitToColumns: ActionSpec;
8408
+
8409
+ declare const ACTION_DATA_createRemoveFilter: typeof createRemoveFilter;
8410
+ declare const ACTION_DATA_createRemoveFilterTool: typeof createRemoveFilterTool;
8411
+ declare const ACTION_DATA_dataCleanup: typeof dataCleanup;
8412
+ declare const ACTION_DATA_removeDuplicates: typeof removeDuplicates;
8413
+ declare const ACTION_DATA_sortAscending: typeof sortAscending;
8414
+ declare const ACTION_DATA_sortDescending: typeof sortDescending;
8415
+ declare const ACTION_DATA_sortRange: typeof sortRange;
8416
+ declare const ACTION_DATA_splitToColumns: typeof splitToColumns;
8417
+ declare const ACTION_DATA_trimWhitespace: typeof trimWhitespace;
8418
+ declare namespace ACTION_DATA {
8419
+ export {
8420
+ ACTION_DATA_createRemoveFilter as createRemoveFilter,
8421
+ ACTION_DATA_createRemoveFilterTool as createRemoveFilterTool,
8422
+ ACTION_DATA_dataCleanup as dataCleanup,
8423
+ ACTION_DATA_removeDuplicates as removeDuplicates,
8424
+ ACTION_DATA_sortAscending as sortAscending,
8425
+ ACTION_DATA_sortDescending as sortDescending,
8426
+ ACTION_DATA_sortRange as sortRange,
8427
+ ACTION_DATA_splitToColumns as splitToColumns,
8428
+ ACTION_DATA_trimWhitespace as trimWhitespace,
8429
+ };
8430
+ }
8431
+
8034
8432
  declare const undo: ActionSpec;
8035
8433
  declare const redo: ActionSpec;
8036
8434
  declare const copy: ActionSpec;
@@ -8051,6 +8449,8 @@ declare const deleteCells: ActionSpec;
8051
8449
  declare const deleteCellShiftUp: ActionSpec;
8052
8450
  declare const deleteCellShiftLeft: ActionSpec;
8053
8451
  declare const mergeCells: ActionSpec;
8452
+ declare const editTable: ActionSpec;
8453
+ declare const deleteTable: ActionSpec;
8054
8454
 
8055
8455
  declare const ACTION_EDIT_clearCols: typeof clearCols;
8056
8456
  declare const ACTION_EDIT_clearRows: typeof clearRows;
@@ -8063,7 +8463,9 @@ declare const ACTION_EDIT_deleteCol: typeof deleteCol;
8063
8463
  declare const ACTION_EDIT_deleteCols: typeof deleteCols;
8064
8464
  declare const ACTION_EDIT_deleteRow: typeof deleteRow;
8065
8465
  declare const ACTION_EDIT_deleteRows: typeof deleteRows;
8466
+ declare const ACTION_EDIT_deleteTable: typeof deleteTable;
8066
8467
  declare const ACTION_EDIT_deleteValues: typeof deleteValues;
8468
+ declare const ACTION_EDIT_editTable: typeof editTable;
8067
8469
  declare const ACTION_EDIT_findAndReplace: typeof findAndReplace;
8068
8470
  declare const ACTION_EDIT_mergeCells: typeof mergeCells;
8069
8471
  declare const ACTION_EDIT_paste: typeof paste;
@@ -8085,7 +8487,9 @@ declare namespace ACTION_EDIT {
8085
8487
  ACTION_EDIT_deleteCols as deleteCols,
8086
8488
  ACTION_EDIT_deleteRow as deleteRow,
8087
8489
  ACTION_EDIT_deleteRows as deleteRows,
8490
+ ACTION_EDIT_deleteTable as deleteTable,
8088
8491
  ACTION_EDIT_deleteValues as deleteValues,
8492
+ ACTION_EDIT_editTable as editTable,
8089
8493
  ACTION_EDIT_findAndReplace as findAndReplace,
8090
8494
  ACTION_EDIT_mergeCells as mergeCells,
8091
8495
  ACTION_EDIT_paste as paste,
@@ -8238,92 +8642,14 @@ declare namespace ACTION_FORMAT {
8238
8642
  };
8239
8643
  }
8240
8644
 
8241
- declare const hideCols: ActionSpec;
8242
- declare const unhideCols: ActionSpec;
8243
- declare const unhideAllCols: ActionSpec;
8244
- declare const hideRows: ActionSpec;
8245
- declare const unhideRows: ActionSpec;
8246
- declare const unhideAllRows: ActionSpec;
8247
- declare const unFreezePane: ActionSpec;
8248
- declare const freezePane: ActionSpec;
8249
- declare const unFreezeRows: ActionSpec;
8250
- declare const freezeFirstRow: ActionSpec;
8251
- declare const freezeSecondRow: ActionSpec;
8252
- declare const freezeCurrentRow: ActionSpec;
8253
- declare const unFreezeCols: ActionSpec;
8254
- declare const freezeFirstCol: ActionSpec;
8255
- declare const freezeSecondCol: ActionSpec;
8256
- declare const freezeCurrentCol: ActionSpec;
8257
- declare const viewGridlines: ActionSpec;
8258
- declare const viewFormulas: ActionSpec;
8259
- declare const createRemoveFilter: ActionSpec;
8260
- declare const groupColumns: ActionSpec;
8261
- declare const groupRows: ActionSpec;
8262
- declare const ungroupColumns: ActionSpec;
8263
- declare const ungroupRows: ActionSpec;
8264
- declare function canUngroupHeaders(env: SpreadsheetChildEnv, dimension: Dimension): boolean;
8265
-
8266
- declare const ACTION_VIEW_canUngroupHeaders: typeof canUngroupHeaders;
8267
- declare const ACTION_VIEW_createRemoveFilter: typeof createRemoveFilter;
8268
- declare const ACTION_VIEW_freezeCurrentCol: typeof freezeCurrentCol;
8269
- declare const ACTION_VIEW_freezeCurrentRow: typeof freezeCurrentRow;
8270
- declare const ACTION_VIEW_freezeFirstCol: typeof freezeFirstCol;
8271
- declare const ACTION_VIEW_freezeFirstRow: typeof freezeFirstRow;
8272
- declare const ACTION_VIEW_freezePane: typeof freezePane;
8273
- declare const ACTION_VIEW_freezeSecondCol: typeof freezeSecondCol;
8274
- declare const ACTION_VIEW_freezeSecondRow: typeof freezeSecondRow;
8275
- declare const ACTION_VIEW_groupColumns: typeof groupColumns;
8276
- declare const ACTION_VIEW_groupRows: typeof groupRows;
8277
- declare const ACTION_VIEW_hideCols: typeof hideCols;
8278
- declare const ACTION_VIEW_hideRows: typeof hideRows;
8279
- declare const ACTION_VIEW_unFreezeCols: typeof unFreezeCols;
8280
- declare const ACTION_VIEW_unFreezePane: typeof unFreezePane;
8281
- declare const ACTION_VIEW_unFreezeRows: typeof unFreezeRows;
8282
- declare const ACTION_VIEW_ungroupColumns: typeof ungroupColumns;
8283
- declare const ACTION_VIEW_ungroupRows: typeof ungroupRows;
8284
- declare const ACTION_VIEW_unhideAllCols: typeof unhideAllCols;
8285
- declare const ACTION_VIEW_unhideAllRows: typeof unhideAllRows;
8286
- declare const ACTION_VIEW_unhideCols: typeof unhideCols;
8287
- declare const ACTION_VIEW_unhideRows: typeof unhideRows;
8288
- declare const ACTION_VIEW_viewFormulas: typeof viewFormulas;
8289
- declare const ACTION_VIEW_viewGridlines: typeof viewGridlines;
8290
- declare namespace ACTION_VIEW {
8291
- export {
8292
- ACTION_VIEW_canUngroupHeaders as canUngroupHeaders,
8293
- ACTION_VIEW_createRemoveFilter as createRemoveFilter,
8294
- ACTION_VIEW_freezeCurrentCol as freezeCurrentCol,
8295
- ACTION_VIEW_freezeCurrentRow as freezeCurrentRow,
8296
- ACTION_VIEW_freezeFirstCol as freezeFirstCol,
8297
- ACTION_VIEW_freezeFirstRow as freezeFirstRow,
8298
- ACTION_VIEW_freezePane as freezePane,
8299
- ACTION_VIEW_freezeSecondCol as freezeSecondCol,
8300
- ACTION_VIEW_freezeSecondRow as freezeSecondRow,
8301
- ACTION_VIEW_groupColumns as groupColumns,
8302
- ACTION_VIEW_groupRows as groupRows,
8303
- ACTION_VIEW_hideCols as hideCols,
8304
- ACTION_VIEW_hideRows as hideRows,
8305
- ACTION_VIEW_unFreezeCols as unFreezeCols,
8306
- ACTION_VIEW_unFreezePane as unFreezePane,
8307
- ACTION_VIEW_unFreezeRows as unFreezeRows,
8308
- ACTION_VIEW_ungroupColumns as ungroupColumns,
8309
- ACTION_VIEW_ungroupRows as ungroupRows,
8310
- ACTION_VIEW_unhideAllCols as unhideAllCols,
8311
- ACTION_VIEW_unhideAllRows as unhideAllRows,
8312
- ACTION_VIEW_unhideCols as unhideCols,
8313
- ACTION_VIEW_unhideRows as unhideRows,
8314
- ACTION_VIEW_viewFormulas as viewFormulas,
8315
- ACTION_VIEW_viewGridlines as viewGridlines,
8316
- };
8317
- }
8318
-
8319
- interface Props$4 {
8645
+ interface Props$5 {
8320
8646
  action: ActionSpec;
8321
8647
  hasTriangleDownIcon?: boolean;
8322
8648
  selectedColor?: string;
8323
8649
  class?: string;
8324
8650
  onClick?: (ev: MouseEvent) => void;
8325
8651
  }
8326
- declare class ActionButton extends Component<Props$4, SpreadsheetChildEnv> {
8652
+ declare class ActionButton extends Component<Props$5, SpreadsheetChildEnv> {
8327
8653
  static template: string;
8328
8654
  static props: {
8329
8655
  action: ObjectConstructor;
@@ -8356,7 +8682,7 @@ declare class ActionButton extends Component<Props$4, SpreadsheetChildEnv> {
8356
8682
  }
8357
8683
 
8358
8684
  type Tool = "borderColorTool" | "borderTypeTool";
8359
- interface State$3 {
8685
+ interface State$4 {
8360
8686
  activeTool: Tool | undefined;
8361
8687
  }
8362
8688
  interface BorderEditorProps {
@@ -8407,7 +8733,7 @@ declare class BorderEditor extends Component<BorderEditorProps, SpreadsheetChild
8407
8733
  el: HTMLElement | null;
8408
8734
  };
8409
8735
  borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
8410
- state: State$3;
8736
+ state: State$4;
8411
8737
  toggleDropdownTool(tool: Tool): void;
8412
8738
  closeDropdown(): void;
8413
8739
  setBorderPosition(position: BorderPosition): void;
@@ -8418,19 +8744,19 @@ declare class BorderEditor extends Component<BorderEditorProps, SpreadsheetChild
8418
8744
  get lineStylePickerAnchorRect(): Rect;
8419
8745
  }
8420
8746
 
8421
- interface Props$3 {
8747
+ interface Props$4 {
8422
8748
  toggleBorderEditor: () => void;
8423
8749
  showBorderEditor: boolean;
8424
8750
  disabled?: boolean;
8425
8751
  dropdownMaxHeight?: Pixel;
8426
8752
  class?: string;
8427
8753
  }
8428
- interface State$2 {
8754
+ interface State$3 {
8429
8755
  currentColor: Color;
8430
8756
  currentStyle: BorderStyle;
8431
8757
  currentPosition: BorderPosition | undefined;
8432
8758
  }
8433
- declare class BorderEditorWidget extends Component<Props$3, SpreadsheetChildEnv> {
8759
+ declare class BorderEditorWidget extends Component<Props$4, SpreadsheetChildEnv> {
8434
8760
  static template: string;
8435
8761
  static props: {
8436
8762
  toggleBorderEditor: FunctionConstructor;
@@ -8454,7 +8780,7 @@ declare class BorderEditorWidget extends Component<Props$3, SpreadsheetChildEnv>
8454
8780
  borderEditorButtonRef: {
8455
8781
  el: HTMLElement | null;
8456
8782
  };
8457
- state: State$2;
8783
+ state: State$3;
8458
8784
  get borderEditorAnchorRect(): Rect;
8459
8785
  onBorderPositionPicked(position: BorderPosition): void;
8460
8786
  onBorderColorPicked(color: Color): void;
@@ -8476,15 +8802,15 @@ declare class TopBarComposer extends Component<any, SpreadsheetChildEnv> {
8476
8802
  onFocus(selection: ComposerSelection): void;
8477
8803
  }
8478
8804
 
8479
- interface State$1 {
8805
+ interface State$2 {
8480
8806
  isOpen: boolean;
8481
8807
  }
8482
- interface Props$2 {
8808
+ interface Props$3 {
8483
8809
  onToggle: () => void;
8484
8810
  dropdownStyle: string;
8485
8811
  class: string;
8486
8812
  }
8487
- declare class FontSizeEditor extends Component<Props$2, SpreadsheetChildEnv> {
8813
+ declare class FontSizeEditor extends Component<Props$3, SpreadsheetChildEnv> {
8488
8814
  static template: string;
8489
8815
  static props: {
8490
8816
  onToggle: FunctionConstructor;
@@ -8493,7 +8819,7 @@ declare class FontSizeEditor extends Component<Props$2, SpreadsheetChildEnv> {
8493
8819
  };
8494
8820
  static components: {};
8495
8821
  fontSizes: number[];
8496
- dropdown: State$1;
8822
+ dropdown: State$2;
8497
8823
  private inputRef;
8498
8824
  private rootEditorRef;
8499
8825
  setup(): void;
@@ -8508,6 +8834,81 @@ declare class FontSizeEditor extends Component<Props$2, SpreadsheetChildEnv> {
8508
8834
  onInputKeydown(ev: KeyboardEvent): void;
8509
8835
  }
8510
8836
 
8837
+ interface Props$2 {
8838
+ tableConfig: TableConfig;
8839
+ }
8840
+ declare class TableStylePreview extends Component<Props$2, SpreadsheetChildEnv> {
8841
+ static template: string;
8842
+ static props: {
8843
+ tableConfig: ObjectConstructor;
8844
+ };
8845
+ private canvasRef;
8846
+ setup(): void;
8847
+ private drawTable;
8848
+ }
8849
+
8850
+ interface TableStylesPopoverProps {
8851
+ selectedStyleId?: string;
8852
+ tableConfig: Omit<TableConfig, "styleId">;
8853
+ closePopover: () => void;
8854
+ onStylePicked: (styleId: string) => void;
8855
+ popoverProps?: PopoverProps;
8856
+ }
8857
+ type CustomTablePopoverMouseEvent = MouseEvent & {
8858
+ hasClosedTableStylesPopover?: boolean;
8859
+ };
8860
+ declare class TableStylesPopover extends Component<TableStylesPopoverProps, SpreadsheetChildEnv> {
8861
+ static template: string;
8862
+ static components: {
8863
+ Popover: typeof Popover;
8864
+ TableStylePreview: typeof TableStylePreview;
8865
+ };
8866
+ static props: {
8867
+ tableConfig: ObjectConstructor;
8868
+ popoverProps: {
8869
+ type: ObjectConstructor;
8870
+ optional: boolean;
8871
+ };
8872
+ closePopover: FunctionConstructor;
8873
+ onStylePicked: FunctionConstructor;
8874
+ selectedStyleId: {
8875
+ type: StringConstructor;
8876
+ optional: boolean;
8877
+ };
8878
+ };
8879
+ stylePresets: Record<string, TableStyle>;
8880
+ categories: {
8881
+ none: string;
8882
+ light: string;
8883
+ medium: string;
8884
+ dark: string;
8885
+ };
8886
+ private tableStyleListRef;
8887
+ setup(): void;
8888
+ onExternalClick(ev: CustomTablePopoverMouseEvent): void;
8889
+ getPresetsByCategory(category: string): string[];
8890
+ getTableConfig(styleId: string): TableConfig;
8891
+ getStyleName(styleId: string): string;
8892
+ }
8893
+
8894
+ interface State$1 {
8895
+ popoverProps: PopoverProps | undefined;
8896
+ }
8897
+ declare class TableDropdownButton extends Component<{}, SpreadsheetChildEnv> {
8898
+ static template: string;
8899
+ static components: {
8900
+ TableStylesPopover: typeof TableStylesPopover;
8901
+ ActionButton: typeof ActionButton;
8902
+ };
8903
+ static props: {};
8904
+ state: State$1;
8905
+ onStylePicked(styleId: string): void;
8906
+ onClick(ev: CustomTablePopoverMouseEvent): void;
8907
+ private closePopover;
8908
+ get action(): ActionSpec;
8909
+ get tableConfig(): TableConfig;
8910
+ }
8911
+
8511
8912
  interface Props$1 {
8512
8913
  class?: string;
8513
8914
  }
@@ -8550,6 +8951,7 @@ declare class TopBar extends Component<Props, SpreadsheetChildEnv> {
8550
8951
  ActionButton: typeof ActionButton;
8551
8952
  PaintFormatButton: typeof PaintFormatButton;
8552
8953
  BorderEditorWidget: typeof BorderEditorWidget;
8954
+ TableDropdownButton: typeof TableDropdownButton;
8553
8955
  };
8554
8956
  state: State;
8555
8957
  isSelectingMenu: boolean;
@@ -8557,7 +8959,7 @@ declare class TopBar extends Component<Props, SpreadsheetChildEnv> {
8557
8959
  menus: Action[];
8558
8960
  EDIT: typeof ACTION_EDIT;
8559
8961
  FORMAT: typeof ACTION_FORMAT;
8560
- VIEW: typeof ACTION_VIEW;
8962
+ DATA: typeof ACTION_DATA;
8561
8963
  formatNumberMenuItemSpec: ActionSpec;
8562
8964
  isntToolbarMenu: boolean;
8563
8965
  composerStore: Store<ComposerStore>;
@@ -8659,6 +9061,7 @@ declare const SPREADSHEET_DIMENSIONS: {
8659
9061
  SCROLLBAR_WIDTH: number;
8660
9062
  };
8661
9063
  declare const registries: {
9064
+ autoCompleteProviders: Registry<AutoCompleteProviderDefinition>;
8662
9065
  autofillModifiersRegistry: Registry<AutofillModifierImplementation>;
8663
9066
  autofillRulesRegistry: Registry<AutofillRule>;
8664
9067
  cellMenuRegistry: MenuItemRegistry;
@@ -8703,7 +9106,7 @@ declare const registries: {
8703
9106
  clipboardHandlersRegistries: {
8704
9107
  figureHandlers: Registry<{
8705
9108
  new (getters: Getters, dispatch: {
8706
- <T extends "SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS", C extends Extract<UpdateCellCommand, {
9109
+ <T extends "SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS", C extends Extract<UpdateCellCommand, {
8707
9110
  type: T;
8708
9111
  }> | Extract<UpdateCellPositionCommand, {
8709
9112
  type: T;
@@ -8779,9 +9182,11 @@ declare const registries: {
8779
9182
  type: T;
8780
9183
  }> | Extract<CreateImageOverCommand, {
8781
9184
  type: T;
8782
- }> | Extract<CreateFilterTableCommand, {
9185
+ }> | Extract<CreateTableCommand, {
9186
+ type: T;
9187
+ }> | Extract<RemoveTableCommand, {
8783
9188
  type: T;
8784
- }> | Extract<RemoveFilterTableCommand, {
9189
+ }> | Extract<UpdateTableCommand, {
8785
9190
  type: T;
8786
9191
  }> | Extract<GroupHeadersCommand, {
8787
9192
  type: T;
@@ -8898,7 +9303,7 @@ declare const registries: {
8898
9303
  }> | Extract<RenderCanvasCommand, {
8899
9304
  type: T;
8900
9305
  }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
8901
- <T_1 extends "SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS", C_1 extends Extract<UpdateCellCommand, {
9306
+ <T_1 extends "SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS", C_1 extends Extract<UpdateCellCommand, {
8902
9307
  type: T_1;
8903
9308
  }> | Extract<UpdateCellPositionCommand, {
8904
9309
  type: T_1;
@@ -8974,9 +9379,11 @@ declare const registries: {
8974
9379
  type: T_1;
8975
9380
  }> | Extract<CreateImageOverCommand, {
8976
9381
  type: T_1;
8977
- }> | Extract<CreateFilterTableCommand, {
9382
+ }> | Extract<CreateTableCommand, {
8978
9383
  type: T_1;
8979
- }> | Extract<RemoveFilterTableCommand, {
9384
+ }> | Extract<RemoveTableCommand, {
9385
+ type: T_1;
9386
+ }> | Extract<UpdateTableCommand, {
8980
9387
  type: T_1;
8981
9388
  }> | Extract<GroupHeadersCommand, {
8982
9389
  type: T_1;
@@ -9097,7 +9504,7 @@ declare const registries: {
9097
9504
  }>;
9098
9505
  cellHandlers: Registry<{
9099
9506
  new (getters: Getters, dispatch: {
9100
- <T extends "SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS", C extends Extract<UpdateCellCommand, {
9507
+ <T extends "SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS", C extends Extract<UpdateCellCommand, {
9101
9508
  type: T;
9102
9509
  }> | Extract<UpdateCellPositionCommand, {
9103
9510
  type: T;
@@ -9173,9 +9580,11 @@ declare const registries: {
9173
9580
  type: T;
9174
9581
  }> | Extract<CreateImageOverCommand, {
9175
9582
  type: T;
9176
- }> | Extract<CreateFilterTableCommand, {
9583
+ }> | Extract<CreateTableCommand, {
9584
+ type: T;
9585
+ }> | Extract<RemoveTableCommand, {
9177
9586
  type: T;
9178
- }> | Extract<RemoveFilterTableCommand, {
9587
+ }> | Extract<UpdateTableCommand, {
9179
9588
  type: T;
9180
9589
  }> | Extract<GroupHeadersCommand, {
9181
9590
  type: T;
@@ -9292,7 +9701,7 @@ declare const registries: {
9292
9701
  }> | Extract<RenderCanvasCommand, {
9293
9702
  type: T;
9294
9703
  }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
9295
- <T_1 extends "SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS", C_1 extends Extract<UpdateCellCommand, {
9704
+ <T_1 extends "SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_TABLE" | "REMOVE_TABLE" | "UPDATE_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "SCROLL_TO_CELL" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE" | "RENDER_CANVAS", C_1 extends Extract<UpdateCellCommand, {
9296
9705
  type: T_1;
9297
9706
  }> | Extract<UpdateCellPositionCommand, {
9298
9707
  type: T_1;
@@ -9368,9 +9777,11 @@ declare const registries: {
9368
9777
  type: T_1;
9369
9778
  }> | Extract<CreateImageOverCommand, {
9370
9779
  type: T_1;
9371
- }> | Extract<CreateFilterTableCommand, {
9780
+ }> | Extract<CreateTableCommand, {
9372
9781
  type: T_1;
9373
- }> | Extract<RemoveFilterTableCommand, {
9782
+ }> | Extract<RemoveTableCommand, {
9783
+ type: T_1;
9784
+ }> | Extract<UpdateTableCommand, {
9374
9785
  type: T_1;
9375
9786
  }> | Extract<GroupHeadersCommand, {
9376
9787
  type: T_1;
@@ -9532,6 +9943,7 @@ declare const helpers: {
9532
9943
  deepCopy: typeof deepCopy;
9533
9944
  expandZoneOnInsertion: typeof expandZoneOnInsertion;
9534
9945
  reduceZoneOnDeletion: typeof reduceZoneOnDeletion;
9946
+ unquote: typeof unquote;
9535
9947
  };
9536
9948
  declare const links: {
9537
9949
  isMarkdownLink: typeof isMarkdownLink;
@@ -9564,6 +9976,7 @@ declare const components: {
9564
9976
  ScorecardChartDesignPanel: typeof ScorecardChartDesignPanel;
9565
9977
  FigureComponent: typeof FigureComponent;
9566
9978
  Menu: typeof Menu;
9979
+ Popover: typeof Popover;
9567
9980
  SelectionInput: typeof SelectionInput;
9568
9981
  ValidationMessages: typeof ValidationMessages;
9569
9982
  };
@@ -9590,12 +10003,13 @@ declare const stores: {
9590
10003
  useLocalStore: typeof useLocalStore;
9591
10004
  SidePanelStore: typeof SidePanelStore;
9592
10005
  };
10006
+
9593
10007
  declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
9594
10008
  addFunction: (fName: string, fDescription: AddFunctionDescription) => any;
9595
10009
  };
9596
10010
  declare const constants: {
9597
10011
  DEFAULT_LOCALE: Locale;
9598
- SECONDARY_COLOR: string;
10012
+ HIGHLIGHT_COLOR: string;
9599
10013
  };
9600
10014
 
9601
- export { AST, ASTFuncall, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, AddFunctionDescription, Arg, CancelledReason, Cell, CellErrorType, CellPosition, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DispatchResult, EnrichedToken, EvalContext, EvaluationError, FPayload, FunctionRegistry, Model, Registry, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, Token, TransportService, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenize };
10015
+ export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePaintFormatCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, AddColumnsRowsCommand, AddConditionalFormatCommand, AddDataValidationCommand, AddFunctionDescription, AddMergeCommand, Alias, Align, AlphanumericIncrementModifier, AnchorZone, ApplyRangeChange, ApplyRangeChangeResult, Arg, ArgDefinition, ArgType, AutoFillCellCommand, AutofillAutoCommand, AutofillCellData, AutofillCommand, AutofillData, AutofillModifier, AutofillModifierImplementation, AutofillResult, AutofillSelectCommand, AutoresizeColumnsCommand, AutoresizeRowsCommand, AxisType, BeginsWithRule, BooleanCell, Border$1 as Border, BorderData, BorderDescr, BorderDescription, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelPaintFormatCommand, CancelledReason, Cell, CellData, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartCreationContext, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartType, CleanClipBoardHighlightCommand, ClearCellCommand, ClearFormattingCommand, Client, ClientId, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, ClientPosition, ClipboardCell, ClipboardCellData, ClipboardContent, ClipboardData, ClipboardFigureData, ClipboardMIMEType, ClipboardOperation, ClipboardOptions, ClipboardPasteOptions, ClipboardPasteTarget, Cloneable, CollaborationMessage, CollaborativeEvent, CollaborativeEventReceived, CollaborativeEventTypes, Color, ColorScaleMidPointThreshold, ColorScaleRule, ColorScaleThreshold, Command, CommandDispatcher, CommandHandler, CommandResult, CommandTypes, CompiledFormula, ComputeFunction, ComputedTableStyle, ConditionalFormat, ConditionalFormatInternal, ConditionalFormatRule, ConditionalFormattingOperatorValues, ConsecutiveIndexes, ContainsTextRule, CopyCommand, CopyModifier, CopyPasteCellsAboveCommand, CopyPasteCellsOnLeftCommand, CoreCommand, CoreCommandDispatcher, CoreCommandTypes, CoreGetters, CorePlugin, CoreViewCommand, CoreViewCommandTypes, CreateChartCommand, CreateFigureCommand, CreateImageOverCommand, CreateRevisionOptions, CreateSheetCommand, CreateTableCommand, Currency, CustomFormulaCriterion, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetValues, DateCriterionValue, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, Dependencies, Dimension, Direction$1 as Direction, DispatchResult, DuplicateSheetCommand, EdgeScrollInfo, EditTextOptions, EmptyCell, EndsWithRule, EnrichedToken, EnsureRange, ErrorCell, EvalContext, EvaluateCellsCommand, EvaluatedCell, EvaluationError, ExcelCellData, ExcelChartDataset, ExcelChartDefinition, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelWorkbookData, ExpressionRule, FPayload, FPayloadNumber, Figure, FigureData, FigureSize, Filter, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, GeneratorCell, Getters, GridRenderingContext, GroupHeadersCommand, HSLA, HeaderData, HeaderDimensions, HeaderGroup, HeaderIndex, HeadersDependentCommand, HideColumnsRowsCommand, HideSheetCommand, Highlight$1 as Highlight, HistoryChange, IconSet, IconSetRule, IconThreshold, Image, Immutable, Increment, IncrementModifier, InformationNotification, InsertCellCommand, IsBetweenCriterion, IsCheckboxCriterion, IsEqualCriterion, IsGreaterOrEqualToCriterion, IsGreaterThanCriterion, IsLessOrEqualToCriterion, IsLessThanCriterion, IsNotBetweenCriterion, IsNotEqualCriterion, IsValueInListCriterion, IsValueInRangeCriterion, LabelValues, LayerName, Lazy, Link, LiteralCell, LocalCommand, Locale, LocaleCode, LocaleFormat, Matrix, Maybe, MenuMouseEvent, Merge, Model, MoveColumnsRowsCommand, MoveConditionalFormatCommand, MoveRangeCommand, MoveSheetCommand, MoveViewportDownCommand, MoveViewportToCellCommand, MoveViewportUpCommand, NewLocalStateUpdateEvent, NotContainsTextRule, NotificationType, NumberCell, Offset, OperationSequenceNode, OrderedLayers, PLAIN_TEXT_FORMAT, PaneDivision, PasteCommand, PasteFromOSClipboardCommand, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, RangeCompiledFormula, RangeData, RangePart, RangeProvider, RangesDependentCommand, Rect, RedoCommand, Ref, ReferenceDenormalizer, Registry, RemoteRevisionMessage, RemoteRevisionReceivedEvent, RemoveColumnsRowsCommand, RemoveConditionalFormatCommand, RemoveDataValidationCommand, RemoveDuplicatesCommand, RemoveMergeCommand, RemoveTableCommand, RenameSheetCommand, RenderCanvasCommand, RepeatPasteCommand, ReplaceSearchCommand, RequestRedoCommand, RequestUndoCommand, ResizeColumnsRowsCommand, ResizeDirection, ResizeViewportCommand, Revision, RevisionAcknowledgedEvent, RevisionData, RevisionRedone, RevisionRedoneMessage, RevisionUndone, RevisionUndoneMessage, RevisionsDroppedEvent, Row, SPREADSHEET_DIMENSIONS, ScrollDirection$1 as ScrollDirection, SelectFigureCommand, Selection, SelectionStep, SetBorderCommand, SetColorCommand, SetDecimalCommand, SetDecimalStep, SetFormattingCommand, SetGridLinesVisibilityCommand, SetViewportOffsetCommand, SetZoneBordersCommand, Sheet, SheetDOMScrollInfo, SheetData, SheetDependentCommand, SheetScrollInfo, ShowFormulaCommand, ShowSheetCommand, SingleColorRule, SingleColorRules, SnapshotEvent, SortCommand, SortDirection, SortOptions, SplitTextIntoColumnsCommand, Spreadsheet, SpreadsheetChildEnv, SpreadsheetEnv, StartChangeHighlightCommand, StartCommand, StoreConstructor, StoreParams, Style, SumSelectionCommand, Table, TableConfig, TableData, TableId, TableStyle, TargetDependentCommand, TextCell, TextContainsCriterion, TextIsCriterion, TextIsEmailCriterion, TextIsLinkCriterion, TextNotContainsCriterion, TextRule, ThresholdType, TimePeriodRule, Token, Tooltip, Top10Rule, Transformation, TransformationFactory, TransportService, TrimWhitespaceCommand, UID, UIPlugin, UnGroupHeadersCommand, UnboundedZone, UndoCommand, UnexpectedRevisionIdEvent, UnfoldAllHeaderGroupsCommand, UnfoldHeaderGroupCommand, UnfoldHeaderGroupsInZoneCommand, UnfreezeColumnsCommand, UnfreezeColumnsRowsCommand, UnfreezeRowsCommand, UnhideColumnsRowsCommand, UpdateCellCommand, UpdateCellData, UpdateCellPositionCommand, UpdateChartCommand, UpdateFigureCommand, UpdateFilterCommand, UpdateLocaleCommand, UpdateTableCommand, Validation, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, _CompiledFormula, __info__, addFunction, addRenderingLayer, astToFormula, borderStyles, canExecuteInReadonly, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, notContainsBlanksRule, notContainsErrorsRule, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };