@odoo/o-spreadsheet 17.3.0-alpha.1 → 17.3.0-alpha.10

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.
@@ -2,6 +2,51 @@ import { ChartConfiguration } from 'chart.js';
2
2
  import * as _odoo_owl from '@odoo/owl';
3
3
  import { ComponentConstructor, Component } from '@odoo/owl';
4
4
 
5
+ /**
6
+ * This is a generic event bus based on the Owl event bus.
7
+ * This bus however ensures type safety across events and subscription callbacks.
8
+ */
9
+ declare class EventBus<Event extends {
10
+ type: string;
11
+ }> {
12
+ subscriptions: {
13
+ [eventType: string]: Subscription[];
14
+ };
15
+ /**
16
+ * Add a listener for the 'eventType' events.
17
+ *
18
+ * Note that the 'owner' of this event can be anything, but will more likely
19
+ * be a component or a class. The idea is that the callback will be called with
20
+ * the proper owner bound.
21
+ *
22
+ * Also, the owner should be kind of unique. This will be used to remove the
23
+ * listener.
24
+ */
25
+ on<T extends Event["type"], E extends Extract<Event, {
26
+ type: T;
27
+ }>>(type: T, owner: any, callback: (r: Omit<E, "type">) => void): void;
28
+ /**
29
+ * Emit an event of type 'eventType'. Any extra arguments will be passed to
30
+ * the listeners callback.
31
+ */
32
+ trigger<T extends Event["type"], E extends Extract<Event, {
33
+ type: T;
34
+ }>>(type: T, payload?: Omit<E, "type">): void;
35
+ /**
36
+ * Remove a listener
37
+ */
38
+ off<T extends Event["type"]>(eventType: T, owner: any): void;
39
+ /**
40
+ * Remove all subscriptions.
41
+ */
42
+ clear(): void;
43
+ }
44
+ type Callback = (...args: any[]) => void;
45
+ interface Subscription {
46
+ owner: any;
47
+ callback: Callback;
48
+ }
49
+
5
50
  /**
6
51
  * An injectable store constructor
7
52
  */
@@ -22,14 +67,19 @@ type StoreParams<T extends StoreConstructor> = SkipFirst<ConstructorParameters<T
22
67
  /**
23
68
  * A function used to inject dependencies in a store constructor
24
69
  */
25
- type Get = <T extends StoreConstructor<any>>(Store: T) => T extends StoreConstructor<infer I> ? Store<I> : never;
70
+ type Get = <T extends StoreConstructor>(Store: T) => T extends StoreConstructor<infer I> ? Store<I> : never;
26
71
  /**
27
72
  * Remove the first element of a tuple
28
73
  * @example
29
74
  * type A = SkipFirst<[number, string, boolean]> // [string, boolean]
30
75
  */
31
76
  type SkipFirst<T extends any[]> = T extends [any, ...infer U] ? U : never;
32
- type Store<T> = CQS<T>;
77
+ type OmitFunctions<T> = {
78
+ [K in keyof T as T[K] extends Function ? never : K]: T[K];
79
+ };
80
+ type Store<S> = S extends {
81
+ mutators: readonly (keyof S)[];
82
+ } ? CQS<Pick<S, S["mutators"][number]> & OmitFunctions<S>> : CQS<OmitFunctions<S>>;
33
83
  /**
34
84
  * Command Query Separation [1,2] implementation with types.
35
85
  *
@@ -49,20 +99,21 @@ type CQS<T> = {
49
99
  * making it write-only.
50
100
  */
51
101
  type NeverReturns<T> = T extends (...args: any[]) => any ? (...args: Parameters<T>) => void : T;
52
- declare class ReactiveStore {
102
+ declare class DisposableStore implements Disposable {
53
103
  protected get: Get;
54
- constructor(get: Get);
55
- }
56
- declare class DisposableStore extends ReactiveStore implements Disposable {
57
104
  private disposeCallbacks;
105
+ constructor(get: Get);
58
106
  protected onDispose(callback: () => void): void;
59
107
  dispose(): void;
60
108
  }
61
109
 
110
+ interface StoreUpdateEvent {
111
+ type: "store-updated";
112
+ }
62
113
  /**
63
114
  * A type-safe dependency container
64
115
  */
65
- declare class DependencyContainer {
116
+ declare class DependencyContainer extends EventBus<StoreUpdateEvent> {
66
117
  private dependencies;
67
118
  private factory;
68
119
  /**
@@ -87,52 +138,7 @@ declare function useStoreProvider(): DependencyContainer;
87
138
  * Get the instance of a store.
88
139
  */
89
140
  declare function useStore<T extends StoreConstructor>(Store: T): Store<InstanceType<T>>;
90
- declare function useLocalStore<T extends LocalStoreConstructor<any>>(Store: T, ...args: StoreParams<T>): Store<InstanceType<T>>;
91
-
92
- /**
93
- * This is a generic event bus based on the Owl event bus.
94
- * This bus however ensures type safety across events and subscription callbacks.
95
- */
96
- declare class EventBus<Event extends {
97
- type: string;
98
- }> {
99
- subscriptions: {
100
- [eventType: string]: Subscription[];
101
- };
102
- /**
103
- * Add a listener for the 'eventType' events.
104
- *
105
- * Note that the 'owner' of this event can be anything, but will more likely
106
- * be a component or a class. The idea is that the callback will be called with
107
- * the proper owner bound.
108
- *
109
- * Also, the owner should be kind of unique. This will be used to remove the
110
- * listener.
111
- */
112
- on<T extends Event["type"], E extends Extract<Event, {
113
- type: T;
114
- }>>(type: T, owner: any, callback: (r: Omit<E, "type">) => void): void;
115
- /**
116
- * Emit an event of type 'eventType'. Any extra arguments will be passed to
117
- * the listeners callback.
118
- */
119
- trigger<T extends Event["type"], E extends Extract<Event, {
120
- type: T;
121
- }>>(type: T, payload?: Omit<E, "type">): void;
122
- /**
123
- * Remove a listener
124
- */
125
- off<T extends Event["type"]>(eventType: T, owner: any): void;
126
- /**
127
- * Remove all subscriptions.
128
- */
129
- clear(): void;
130
- }
131
- type Callback = (...args: any[]) => void;
132
- interface Subscription {
133
- owner: any;
134
- callback: Callback;
135
- }
141
+ declare function useLocalStore<T extends LocalStoreConstructor<any>>(Store: T, ...args: StoreParams<T> extends never ? [] : StoreParams<T>): Store<InstanceType<T>>;
136
142
 
137
143
  interface Figure {
138
144
  id: UID;
@@ -182,26 +188,37 @@ type XlsxHexColor = string & Alias;
182
188
  type VerticalAxisPosition = "left" | "right";
183
189
  type LegendPosition = "top" | "bottom" | "left" | "right" | "none";
184
190
 
185
- interface BarChartDefinition {
186
- readonly type: "bar";
187
- readonly dataSets: string[];
191
+ interface ComboBarChartDefinition {
192
+ readonly dataSets: CustomizedDataSet[];
188
193
  readonly dataSetsHaveTitle: boolean;
189
194
  readonly labelRange?: string;
190
- readonly title: string;
195
+ readonly title: TitleDesign;
191
196
  readonly background?: Color;
192
- readonly verticalAxisPosition: VerticalAxisPosition;
193
197
  readonly legendPosition: LegendPosition;
194
- readonly stacked: boolean;
195
198
  readonly aggregated?: boolean;
199
+ readonly axesDesign?: AxesDesign;
200
+ }
201
+
202
+ interface BarChartDefinition extends ComboBarChartDefinition {
203
+ readonly type: "bar";
204
+ readonly stacked: boolean;
196
205
  }
197
206
  type BarChartRuntime = {
198
207
  chartJsConfig: ChartConfiguration;
199
208
  background: Color;
200
209
  };
201
210
 
211
+ interface ComboChartDefinition extends ComboBarChartDefinition {
212
+ readonly type: "combo";
213
+ }
214
+ type ComboChartRuntime = {
215
+ chartJsConfig: ChartConfiguration;
216
+ background: Color;
217
+ };
218
+
202
219
  interface GaugeChartDefinition {
203
220
  readonly type: "gauge";
204
- readonly title: string;
221
+ readonly title: TitleDesign;
205
222
  readonly dataRange?: string;
206
223
  readonly sectionRule: SectionRule;
207
224
  readonly background?: Color;
@@ -228,7 +245,7 @@ interface GaugeValue {
228
245
  }
229
246
  interface GaugeChartRuntime {
230
247
  background: Color;
231
- title: string;
248
+ title: TitleDesign;
232
249
  minValue: GaugeValue;
233
250
  maxValue: GaugeValue;
234
251
  gaugeValue?: GaugeValue;
@@ -238,17 +255,17 @@ interface GaugeChartRuntime {
238
255
 
239
256
  interface LineChartDefinition {
240
257
  readonly type: "line";
241
- readonly dataSets: string[];
258
+ readonly dataSets: CustomizedDataSet[];
242
259
  readonly dataSetsHaveTitle: boolean;
243
260
  readonly labelRange?: string;
244
- readonly title: string;
261
+ readonly title: TitleDesign;
245
262
  readonly background?: Color;
246
- readonly verticalAxisPosition: VerticalAxisPosition;
247
263
  readonly legendPosition: LegendPosition;
248
264
  readonly labelsAsText: boolean;
249
265
  readonly stacked: boolean;
250
266
  readonly aggregated?: boolean;
251
267
  readonly cumulative: boolean;
268
+ readonly axesDesign?: AxesDesign;
252
269
  }
253
270
  type LineChartRuntime = {
254
271
  chartJsConfig: ChartConfiguration;
@@ -257,13 +274,14 @@ type LineChartRuntime = {
257
274
 
258
275
  interface PieChartDefinition {
259
276
  readonly type: "pie";
260
- readonly dataSets: string[];
277
+ readonly dataSets: CustomizedDataSet[];
261
278
  readonly dataSetsHaveTitle: boolean;
262
279
  readonly labelRange?: string;
263
- readonly title: string;
280
+ readonly title: TitleDesign;
264
281
  readonly background?: Color;
265
282
  readonly legendPosition: LegendPosition;
266
283
  readonly aggregated?: boolean;
284
+ readonly axesDesign?: AxesDesign;
267
285
  }
268
286
  type PieChartRuntime = {
269
287
  chartJsConfig: ChartConfiguration;
@@ -277,7 +295,7 @@ type ScatterChartRuntime = LineChartRuntime;
277
295
 
278
296
  interface ScorecardChartDefinition {
279
297
  readonly type: "scorecard";
280
- readonly title: string;
298
+ readonly title: TitleDesign;
281
299
  readonly keyValue?: string;
282
300
  readonly baseline?: string;
283
301
  readonly baselineMode: BaselineMode;
@@ -285,11 +303,16 @@ interface ScorecardChartDefinition {
285
303
  readonly background?: Color;
286
304
  readonly baselineColorUp: Color;
287
305
  readonly baselineColorDown: Color;
306
+ readonly humanize?: boolean;
288
307
  }
289
- type BaselineMode = "text" | "difference" | "percentage";
308
+ type BaselineMode = "text" | "difference" | "percentage" | "progress";
290
309
  type BaselineArrowDirection = "neutral" | "up" | "down";
310
+ interface ProgressBar {
311
+ readonly value: number;
312
+ readonly color: Color;
313
+ }
291
314
  interface ScorecardChartRuntime {
292
- readonly title: string;
315
+ readonly title: TitleDesign;
293
316
  readonly keyValue: string;
294
317
  readonly baselineDisplay: string;
295
318
  readonly baselineColor?: string;
@@ -299,12 +322,40 @@ interface ScorecardChartRuntime {
299
322
  readonly fontColor: Color;
300
323
  readonly keyValueStyle?: Style;
301
324
  readonly baselineStyle?: Style;
325
+ readonly progressBar?: ProgressBar;
302
326
  }
303
327
 
304
- declare const CHART_TYPES: readonly ["line", "bar", "pie", "scorecard", "gauge", "scatter"];
328
+ interface WaterfallChartDefinition {
329
+ readonly type: "waterfall";
330
+ readonly dataSets: CustomizedDataSet[];
331
+ readonly dataSetsHaveTitle: boolean;
332
+ readonly labelRange?: string;
333
+ readonly title: TitleDesign;
334
+ readonly background?: Color;
335
+ readonly verticalAxisPosition: VerticalAxisPosition;
336
+ readonly legendPosition: LegendPosition;
337
+ readonly aggregated?: boolean;
338
+ readonly showSubTotals: boolean;
339
+ readonly showConnectorLines: boolean;
340
+ readonly firstValueAsSubtotal?: boolean;
341
+ readonly positiveValuesColor?: Color;
342
+ readonly negativeValuesColor?: Color;
343
+ readonly subTotalValuesColor?: Color;
344
+ readonly axesDesign?: AxesDesign;
345
+ }
346
+ type WaterfallChartRuntime = {
347
+ chartJsConfig: ChartConfiguration;
348
+ background: Color;
349
+ };
350
+
351
+ declare const CHART_TYPES: readonly ["line", "bar", "pie", "scorecard", "gauge", "scatter", "combo", "waterfall"];
305
352
  type ChartType = (typeof CHART_TYPES)[number];
306
- type ChartDefinition = LineChartDefinition | PieChartDefinition | BarChartDefinition | ScorecardChartDefinition | GaugeChartDefinition | ScatterChartDefinition;
307
- type ChartJSRuntime = LineChartRuntime | PieChartRuntime | BarChartRuntime | ScatterChartRuntime;
353
+ type ChartDefinition = LineChartDefinition | PieChartDefinition | BarChartDefinition | ScorecardChartDefinition | GaugeChartDefinition | ScatterChartDefinition | ComboChartDefinition | WaterfallChartDefinition;
354
+ type ChartWithAxisDefinition = Extract<ChartDefinition, {
355
+ dataSets: CustomizedDataSet[];
356
+ labelRange?: string;
357
+ }>;
358
+ type ChartJSRuntime = LineChartRuntime | PieChartRuntime | BarChartRuntime | ComboChartRuntime | ScatterChartRuntime | WaterfallChartRuntime;
308
359
  type ChartRuntime = ChartJSRuntime | ScorecardChartRuntime | GaugeChartRuntime;
309
360
  interface LabelValues {
310
361
  readonly values: string[];
@@ -314,34 +365,79 @@ interface DatasetValues {
314
365
  readonly label?: string;
315
366
  readonly data: any[];
316
367
  }
368
+ interface DatasetDesign {
369
+ readonly backgroundColor?: string;
370
+ readonly yAxisId?: string;
371
+ readonly label?: string;
372
+ }
373
+ interface AxisDesign {
374
+ readonly title?: TitleDesign;
375
+ }
376
+ interface AxesDesign {
377
+ readonly x?: AxisDesign;
378
+ readonly y?: AxisDesign;
379
+ readonly y1?: AxisDesign;
380
+ }
381
+ interface TitleDesign {
382
+ readonly text?: string;
383
+ readonly bold?: boolean;
384
+ readonly italic?: boolean;
385
+ readonly align?: Align;
386
+ readonly color?: Color;
387
+ }
388
+ type CustomizedDataSet = {
389
+ readonly dataRange: string;
390
+ } & DatasetDesign;
317
391
  type AxisType = "category" | "linear" | "time";
318
392
  interface DataSet {
319
393
  readonly labelCell?: Range;
320
394
  readonly dataRange: Range;
395
+ readonly rightYAxis?: boolean;
396
+ readonly backgroundColor?: Color;
397
+ readonly customLabel?: string;
321
398
  }
322
399
  interface ExcelChartDataset {
323
- readonly label?: string;
400
+ readonly label?: {
401
+ text?: string;
402
+ } | {
403
+ reference?: string;
404
+ };
324
405
  readonly range: string;
406
+ readonly backgroundColor?: Color;
407
+ readonly rightYAxis?: boolean;
325
408
  }
326
- type ExcelChartType = "line" | "bar" | "pie";
409
+ type ExcelChartType = "line" | "bar" | "pie" | "combo" | "scatter";
327
410
  interface ExcelChartDefinition {
328
- readonly title?: string;
411
+ readonly title?: TitleDesign;
329
412
  readonly type: ExcelChartType;
330
413
  readonly dataSets: ExcelChartDataset[];
331
414
  readonly labelRange?: string;
332
415
  readonly backgroundColor: XlsxHexColor;
333
416
  readonly fontColor: XlsxHexColor;
334
- readonly verticalAxisPosition: VerticalAxisPosition;
335
417
  readonly legendPosition: LegendPosition;
336
418
  readonly stacked?: boolean;
337
419
  readonly cumulative?: boolean;
420
+ readonly verticalAxis?: {
421
+ useLeftAxis?: boolean;
422
+ useRightAxis?: boolean;
423
+ };
424
+ readonly axesDesign?: AxesDesign;
338
425
  }
339
426
  interface ChartCreationContext {
340
- readonly range?: string[];
341
- readonly title?: string;
427
+ readonly range?: CustomizedDataSet[];
428
+ readonly title?: TitleDesign;
342
429
  readonly background?: string;
343
430
  readonly auxiliaryRange?: string;
344
431
  readonly aggregated?: boolean;
432
+ readonly stacked?: boolean;
433
+ readonly cumulative?: boolean;
434
+ readonly dataSetsHaveTitle?: boolean;
435
+ readonly labelsAsText?: boolean;
436
+ readonly showSubTotals?: boolean;
437
+ readonly showConnectorLines?: boolean;
438
+ readonly firstValueAsSubtotal?: boolean;
439
+ readonly legendPosition?: LegendPosition;
440
+ readonly axesDesign?: AxesDesign;
345
441
  }
346
442
 
347
443
  declare enum ClipboardMIMEType {
@@ -402,6 +498,90 @@ interface SearchOptions {
402
498
  specificRange?: Range;
403
499
  }
404
500
 
501
+ type Aggregator = "array_agg" | "count" | "count_distinct" | "bool_and" | "bool_or" | "max" | "min" | "avg" | "sum";
502
+ type Granularity = "day" | "week" | "month" | "quarter" | "year" | "day_of_month" | "iso_week_number" | "month_number" | "quarter_number" | "year_number";
503
+ interface PivotCoreDimension {
504
+ name: string;
505
+ order?: "asc" | "desc";
506
+ granularity?: Granularity | string;
507
+ }
508
+ interface PivotCoreMeasure {
509
+ name: string;
510
+ aggregator?: Aggregator | string;
511
+ }
512
+ interface CommonPivotCoreDefinition {
513
+ columns: PivotCoreDimension[];
514
+ rows: PivotCoreDimension[];
515
+ measures: PivotCoreMeasure[];
516
+ name: string;
517
+ }
518
+ interface SpreadsheetPivotCoreDefinition extends CommonPivotCoreDefinition {
519
+ type: "SPREADSHEET";
520
+ dataSet?: {
521
+ sheetId: UID;
522
+ zone: Zone;
523
+ };
524
+ }
525
+ interface FakePivotDefinition extends CommonPivotCoreDefinition {
526
+ type: "FAKE";
527
+ }
528
+ type PivotCoreDefinition = SpreadsheetPivotCoreDefinition | FakePivotDefinition;
529
+ type TechnicalName = string;
530
+ interface PivotField {
531
+ name: TechnicalName;
532
+ type: string;
533
+ string: string;
534
+ aggregator?: string;
535
+ help?: string;
536
+ }
537
+ type PivotFields = Record<TechnicalName, PivotField | undefined>;
538
+ interface PivotMeasure extends PivotCoreMeasure {
539
+ nameWithAggregator: string;
540
+ displayName: string;
541
+ type: string;
542
+ isValid: boolean;
543
+ }
544
+ interface PivotDimension$1 extends PivotCoreDimension {
545
+ nameWithGranularity: string;
546
+ displayName: string;
547
+ type: string;
548
+ isValid: boolean;
549
+ }
550
+ interface PivotTableColumn {
551
+ fields: string[];
552
+ values: string[];
553
+ width: number;
554
+ offset: number;
555
+ }
556
+ interface PivotTableRow {
557
+ fields: string[];
558
+ values: string[];
559
+ indent: number;
560
+ }
561
+ interface PivotTableData {
562
+ cols: PivotTableColumn[][];
563
+ rows: PivotTableRow[];
564
+ measures: string[];
565
+ rowTitle?: string;
566
+ }
567
+ interface PivotTableCell {
568
+ isHeader: boolean;
569
+ domain?: string[];
570
+ content?: string;
571
+ measure?: string;
572
+ }
573
+ interface PivotTimeAdapter<T> {
574
+ normalizeFunctionValue: (value: string) => T;
575
+ formatValue: (normalizedValue: T, locale?: Locale) => string;
576
+ getFormat: (locale?: Locale) => Format | undefined;
577
+ toCellValue: (normalizedValue: T) => CellValue;
578
+ }
579
+ interface DomainArg {
580
+ field: string;
581
+ value: string;
582
+ }
583
+ type StringDomainArgs = string[];
584
+
405
585
  interface Table {
406
586
  readonly id: TableId;
407
587
  readonly range: Range;
@@ -451,7 +631,9 @@ interface TableBorder extends Border$1 {
451
631
  }
452
632
  interface TableStyle {
453
633
  category: string;
454
- colorName: string;
634
+ displayName: string;
635
+ templateName: TableStyleTemplateName;
636
+ primaryColor: string;
455
637
  wholeTable?: TableElementStyle;
456
638
  firstColumnStripe?: TableElementStyle;
457
639
  secondColumnStripe?: TableElementStyle;
@@ -462,6 +644,7 @@ interface TableStyle {
462
644
  headerRow?: TableElementStyle;
463
645
  totalRow?: TableElementStyle;
464
646
  }
647
+ type TableStyleTemplateName = "none" | "lightColoredText" | "lightAllBorders" | "mediumAllBorders" | "lightWithHeader" | "mediumBandedBorders" | "mediumMinimalBorders" | "darkNoBorders" | "mediumWhiteBorders" | "dark";
465
648
 
466
649
  /**
467
650
  * There are two kinds of commands: CoreCommands and LocalCommands
@@ -514,11 +697,12 @@ interface ZoneDependentCommand {
514
697
  }
515
698
  declare function isZoneDependent(cmd: CoreCommand): boolean;
516
699
  declare function isPositionDependent(cmd: CoreCommand): boolean;
517
- declare const invalidateEvaluationCommands: Set<"CUT" | "COPY" | "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" | "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" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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">;
518
- declare const invalidateDependenciesCommands: Set<"CUT" | "COPY" | "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" | "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" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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">;
519
- declare const invalidateCFEvaluationCommands: Set<"CUT" | "COPY" | "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" | "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" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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">;
520
- declare const readonlyAllowedCommands: Set<"CUT" | "COPY" | "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" | "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" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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">;
521
- 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">;
700
+ declare const invalidateEvaluationCommands: Set<"CUT" | "COPY" | "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" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "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" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT">;
701
+ declare const invalidateDependenciesCommands: Set<"CUT" | "COPY" | "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" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "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" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT">;
702
+ declare const invalidateCFEvaluationCommands: Set<"CUT" | "COPY" | "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" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "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" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT">;
703
+ declare const invalidateBordersCommands: Set<"CUT" | "COPY" | "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" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "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" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT">;
704
+ declare const readonlyAllowedCommands: Set<"CUT" | "COPY" | "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" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "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" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT">;
705
+ 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" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "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" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT">;
522
706
  declare function isCoreCommand(cmd: Command): cmd is CoreCommand;
523
707
  declare function canExecuteInReadonly(cmd: Command): boolean;
524
708
  interface UpdateCellCommand extends PositionDependentCommand {
@@ -705,8 +889,30 @@ interface UpdateTableCommand {
705
889
  tableType?: CoreTableType;
706
890
  config?: Partial<TableConfig>;
707
891
  }
892
+ interface ResizeTableCommand {
893
+ type: "RESIZE_TABLE";
894
+ zone: Zone;
895
+ sheetId: UID;
896
+ newTableRange: RangeData;
897
+ tableType?: CoreTableType;
898
+ }
708
899
  interface AutofillTableCommand extends PositionDependentCommand {
709
900
  type: "AUTOFILL_TABLE_COLUMN";
901
+ /** The row to start the autofill in. If undefined, it will autofill from the top of the table column */
902
+ autofillRowStart?: number;
903
+ /** The row to end the autofill in. If undefined, it will autofill to the bottom of the table column */
904
+ autofillRowEnd?: number;
905
+ }
906
+ interface CreateTableStyleCommand {
907
+ type: "CREATE_TABLE_STYLE";
908
+ tableStyleId: string;
909
+ tableStyleName: string;
910
+ templateName: TableStyleTemplateName;
911
+ primaryColor: Color;
912
+ }
913
+ interface RemoveTableStyleCommand {
914
+ type: "REMOVE_TABLE_STYLE";
915
+ tableStyleId: string;
710
916
  }
711
917
  interface UpdateFilterCommand extends PositionDependentCommand {
712
918
  type: "UPDATE_FILTER";
@@ -736,6 +942,35 @@ interface UpdateLocaleCommand {
736
942
  type: "UPDATE_LOCALE";
737
943
  locale: Locale;
738
944
  }
945
+ interface AddPivotCommand {
946
+ type: "ADD_PIVOT";
947
+ pivotId: UID;
948
+ pivot: PivotCoreDefinition;
949
+ }
950
+ interface UpdatePivotCommand {
951
+ type: "UPDATE_PIVOT";
952
+ pivotId: UID;
953
+ pivot: PivotCoreDefinition;
954
+ }
955
+ interface InsertPivotCommand extends PositionDependentCommand {
956
+ type: "INSERT_PIVOT";
957
+ pivotId: UID;
958
+ table: PivotTableData;
959
+ }
960
+ interface RenamePivotCommand {
961
+ type: "RENAME_PIVOT";
962
+ pivotId: UID;
963
+ name: string;
964
+ }
965
+ interface RemovePivotCommand {
966
+ type: "REMOVE_PIVOT";
967
+ pivotId: UID;
968
+ }
969
+ interface DuplicatePivotCommand {
970
+ type: "DUPLICATE_PIVOT";
971
+ pivotId: UID;
972
+ newPivotId: string;
973
+ }
739
974
  interface RemoveDuplicatesCommand {
740
975
  type: "REMOVE_DUPLICATES";
741
976
  columns: HeaderIndex[];
@@ -856,14 +1091,6 @@ interface ActivateSheetCommand {
856
1091
  sheetIdFrom: UID;
857
1092
  sheetIdTo: UID;
858
1093
  }
859
- /**
860
- * Set a color to be used for the next selection to highlight.
861
- * The color is only used when selection highlight is enabled.
862
- */
863
- interface SetColorCommand {
864
- type: "SET_HIGHLIGHT_COLOR";
865
- color: Color;
866
- }
867
1094
  interface EvaluateCellsCommand {
868
1095
  type: "EVALUATE_CELLS";
869
1096
  }
@@ -990,8 +1217,14 @@ interface SplitTextIntoColumnsCommand {
990
1217
  addNewColumns: boolean;
991
1218
  force?: boolean;
992
1219
  }
993
- interface RenderCanvasCommand {
994
- type: "RENDER_CANVAS";
1220
+ interface RefreshPivotCommand {
1221
+ type: "REFRESH_PIVOT";
1222
+ id: UID;
1223
+ }
1224
+ interface InsertNewPivotCommand {
1225
+ type: "INSERT_NEW_PIVOT";
1226
+ pivotId: UID;
1227
+ newSheetId: UID;
995
1228
  }
996
1229
  type CoreCommand =
997
1230
  /** CELLS */
@@ -1015,14 +1248,16 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
1015
1248
  /** IMAGE */
1016
1249
  | CreateImageOverCommand
1017
1250
  /** FILTERS */
1018
- | CreateTableCommand | RemoveTableCommand | UpdateTableCommand
1251
+ | CreateTableCommand | RemoveTableCommand | UpdateTableCommand | CreateTableStyleCommand | RemoveTableStyleCommand
1019
1252
  /** HEADER GROUP */
1020
1253
  | GroupHeadersCommand | UnGroupHeadersCommand | UnfoldHeaderGroupCommand | FoldHeaderGroupCommand | FoldAllHeaderGroupsCommand | UnfoldAllHeaderGroupsCommand | UnfoldHeaderGroupsInZoneCommand | FoldHeaderGroupsInZoneCommand
1021
1254
  /** DATA VALIDATION */
1022
1255
  | AddDataValidationCommand | RemoveDataValidationCommand
1023
1256
  /** MISC */
1024
- | UpdateLocaleCommand;
1025
- type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | CopyCommand | CutCommand | PasteCommand | CopyPasteCellsAboveCommand | CopyPasteCellsOnLeftCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | CancelPaintFormatCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | StartChangeHighlightCommand | SetColorCommand | StartCommand | AutofillCommand | AutofillSelectCommand | AutofillTableCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | ReplaceSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | MoveViewportToCellCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand | RenderCanvasCommand;
1257
+ | UpdateLocaleCommand
1258
+ /** PIVOT */
1259
+ | AddPivotCommand | UpdatePivotCommand | InsertPivotCommand | RenamePivotCommand | RemovePivotCommand | DuplicatePivotCommand;
1260
+ type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | CopyCommand | CutCommand | PasteCommand | CopyPasteCellsAboveCommand | CopyPasteCellsOnLeftCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | CancelPaintFormatCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | StartChangeHighlightCommand | StartCommand | AutofillCommand | AutofillSelectCommand | AutofillTableCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | ReplaceSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | MoveViewportToCellCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand | ResizeTableCommand | RefreshPivotCommand | InsertNewPivotCommand;
1026
1261
  type Command = CoreCommand | LocalCommand;
1027
1262
  /**
1028
1263
  * Holds the result of a command dispatch.
@@ -1116,6 +1351,7 @@ declare const enum CommandResult {
1116
1351
  Readonly = "Readonly",
1117
1352
  InvalidViewportSize = "InvalidViewportSize",
1118
1353
  InvalidScrollingDirection = "InvalidScrollingDirection",
1354
+ ViewportScrollLimitsReached = "ViewportScrollLimitsReached",
1119
1355
  FigureDoesNotExist = "FigureDoesNotExist",
1120
1356
  InvalidConditionalFormatId = "InvalidConditionalFormatId",
1121
1357
  InvalidCellPopover = "InvalidCellPopover",
@@ -1127,6 +1363,7 @@ declare const enum CommandResult {
1127
1363
  TableNotFound = "TableNotFound",
1128
1364
  TableOverlap = "TableOverlap",
1129
1365
  InvalidTableConfig = "InvalidTableConfig",
1366
+ InvalidTableStyle = "InvalidTableStyle",
1130
1367
  FilterNotFound = "FilterNotFound",
1131
1368
  MergeInTable = "MergeInTable",
1132
1369
  NonContinuousTargets = "NonContinuousTargets",
@@ -1156,7 +1393,11 @@ declare const enum CommandResult {
1156
1393
  InvalidNumberOfCriterionValues = "InvalidNumberOfCriterionValues",
1157
1394
  InvalidCopyPasteSelection = "InvalidCopyPasteSelection",
1158
1395
  NoChanges = "NoChanges",
1159
- InvalidInputId = "InvalidInputId"
1396
+ InvalidInputId = "InvalidInputId",
1397
+ SheetIsHidden = "SheetIsHidden",
1398
+ InvalidTableResize = "InvalidTableResize",
1399
+ PivotIdNotFound = "PivotIdNotFound",
1400
+ EmptyName = "EmptyName"
1160
1401
  }
1161
1402
  interface CommandHandler<T> {
1162
1403
  allowDispatch(command: T): CommandResult | CommandResult[];
@@ -1171,9 +1412,6 @@ interface CommandDispatcher {
1171
1412
  dispatch<T extends CommandTypes, C extends Extract<Command, {
1172
1413
  type: T;
1173
1414
  }>>(type: T, r: Omit<C, "type">): DispatchResult;
1174
- canDispatch<T extends CommandTypes, C extends Extract<Command, {
1175
- type: T;
1176
- }>>(type: T, r: Omit<C, "type">): DispatchResult;
1177
1415
  }
1178
1416
  interface CoreCommandDispatcher {
1179
1417
  dispatch<T extends CoreCommandTypes, C extends Extract<CoreCommand, {
@@ -1182,9 +1420,6 @@ interface CoreCommandDispatcher {
1182
1420
  dispatch<T extends CoreCommandTypes, C extends Extract<CoreCommand, {
1183
1421
  type: T;
1184
1422
  }>>(type: T, r: Omit<C, "type">): DispatchResult;
1185
- canDispatch<T extends CoreCommandTypes, C extends Extract<CoreCommand, {
1186
- type: T;
1187
- }>>(type: T, r: Omit<C, "type">): DispatchResult;
1188
1423
  }
1189
1424
  type CommandTypes = Command["type"];
1190
1425
  type CoreCommandTypes = CoreCommand["type"];
@@ -1272,6 +1507,11 @@ declare function iterateAstNodes(ast: AST): AST[];
1272
1507
  */
1273
1508
  declare function astToFormula(ast: AST): string;
1274
1509
 
1510
+ declare function getFunctionsFromTokens(tokens: Token[], functionNames: string[]): {
1511
+ functionName: string;
1512
+ args: AST[];
1513
+ }[];
1514
+
1275
1515
  /**
1276
1516
  * The following type is meant to be used in union with other aliases to prevent
1277
1517
  * Intellisense from resolving it.
@@ -1330,6 +1570,13 @@ interface UnboundedZone {
1330
1570
  bottom: HeaderIndex | undefined;
1331
1571
  left: HeaderIndex;
1332
1572
  right: HeaderIndex | undefined;
1573
+ /**
1574
+ * The hasHeader flag is used to determine if the zone has a header (eg. A2:A or C3:3).
1575
+ *
1576
+ * The main issue is that the zone A1:A and A:A have different behavior. The "correct" way to handle this would be to
1577
+ * allow the top/left to be undefined, but this make typing and using unbounded zones VERY annoying. So we use this
1578
+ * boolean instead.
1579
+ */
1333
1580
  hasHeader?: boolean;
1334
1581
  }
1335
1582
  interface ZoneDimension {
@@ -1438,7 +1685,6 @@ interface PixelPosition {
1438
1685
  }
1439
1686
  interface Merge extends Zone {
1440
1687
  id: number;
1441
- topLeft: Position$1;
1442
1688
  }
1443
1689
  interface Highlight$1 {
1444
1690
  zone: Zone;
@@ -1450,6 +1696,7 @@ interface Highlight$1 {
1450
1696
  /** transparency of the fill color (0-1) */
1451
1697
  fillAlpha?: number;
1452
1698
  noBorder?: boolean;
1699
+ dashed?: boolean;
1453
1700
  }
1454
1701
  interface PaneDivision {
1455
1702
  /** Represents the number of frozen columns */
@@ -1549,6 +1796,10 @@ type DebouncedFunction<T> = T & {
1549
1796
  stopDebounce: () => void;
1550
1797
  isDebouncePending: () => boolean;
1551
1798
  };
1799
+ interface GridClickModifiers {
1800
+ addZone: boolean;
1801
+ expandZone: boolean;
1802
+ }
1552
1803
 
1553
1804
  type LocaleCode = string & Alias;
1554
1805
  interface Locale {
@@ -2043,6 +2294,7 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
2043
2294
  getStore: Get;
2044
2295
  }
2045
2296
 
2297
+ type HistoryPath = [any, ...(number | string)[]];
2046
2298
  declare class StateObserver {
2047
2299
  private changes;
2048
2300
  private commands;
@@ -2055,7 +2307,7 @@ declare class StateObserver {
2055
2307
  commands: CoreCommand[];
2056
2308
  };
2057
2309
  addCommand(command: CoreCommand): void;
2058
- addChange(...args: [...HistoryChange["path"], any]): void;
2310
+ addChange(...args: [...HistoryPath, any]): void;
2059
2311
  }
2060
2312
 
2061
2313
  interface Validator {
@@ -2088,7 +2340,8 @@ declare class BasePlugin<State = any, C = any> implements CommandHandler<C>, Val
2088
2340
  static getters: readonly string[];
2089
2341
  protected history: WorkbookHistory<State>;
2090
2342
  protected dispatch: CommandDispatcher["dispatch"];
2091
- constructor(stateObserver: StateObserver, dispatch: CommandDispatcher["dispatch"]);
2343
+ protected canDispatch: CommandDispatcher["dispatch"];
2344
+ constructor(stateObserver: StateObserver, dispatch: CommandDispatcher["dispatch"], canDispatch: CommandDispatcher["dispatch"]);
2092
2345
  /**
2093
2346
  * Export for excel should be available for all plugins, even for the UI.
2094
2347
  * In some case, we need to export evaluated value, which is available from
@@ -2138,7 +2391,7 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
2138
2391
  private getters;
2139
2392
  private providers;
2140
2393
  constructor(getters: CoreGetters);
2141
- static getters: readonly ["extendRange", "getRangeString", "getRangeFromSheetXC", "createAdaptedRanges", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone", "getRangesUnion", "isRangeValid"];
2394
+ static getters: readonly ["extendRange", "getRangeString", "getRangeFromSheetXC", "createAdaptedRanges", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone", "getRangesUnion", "recomputeRanges", "isRangeValid", "removeRangesSheetPrefix"];
2142
2395
  allowDispatch(cmd: Command): CommandResult;
2143
2396
  beforeHandle(command: Command): void;
2144
2397
  handle(cmd: Command): void;
@@ -2162,6 +2415,10 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
2162
2415
  */
2163
2416
  addRangeProvider(provider: RangeProvider["adaptRanges"]): void;
2164
2417
  createAdaptedRanges(ranges: Range[], offsetX: number, offsetY: number, sheetId: UID): Range[];
2418
+ /**
2419
+ * Remove the sheet name prefix if a range is part of the given sheet.
2420
+ */
2421
+ removeRangesSheetPrefix(sheetId: UID, ranges: Range[]): Range[];
2165
2422
  extendRange(range: Range, dimension: Dimension, quantity: number): Range;
2166
2423
  /**
2167
2424
  * Creates a range from a XC reference that can contain a sheet reference
@@ -2185,6 +2442,10 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
2185
2442
  getRangeDataFromXc(sheetId: UID, xc: string): RangeData;
2186
2443
  getRangeDataFromZone(sheetId: UID, zone: Zone | UnboundedZone): RangeData;
2187
2444
  getRangeFromZone(sheetId: UID, zone: Zone | UnboundedZone): Range;
2445
+ /**
2446
+ * Allows you to recompute ranges from the same sheet
2447
+ */
2448
+ recomputeRanges(ranges: Range[], rangesToRemove: Range[]): Range[];
2188
2449
  getRangeFromRangeData(data: RangeData): Range;
2189
2450
  isRangeValid(rangeStr: string): boolean;
2190
2451
  getRangesUnion(ranges: Range[]): Range;
@@ -2200,6 +2461,7 @@ interface CorePluginConfig {
2200
2461
  readonly stateObserver: StateObserver;
2201
2462
  readonly range: RangeAdapter;
2202
2463
  readonly dispatch: CoreCommandDispatcher["dispatch"];
2464
+ readonly canDispatch: CoreCommandDispatcher["dispatch"];
2203
2465
  readonly uuidGenerator: UuidGenerator;
2204
2466
  readonly custom: ModelConfig["custom"];
2205
2467
  readonly external: ModelConfig["external"];
@@ -2217,7 +2479,7 @@ interface CorePluginConstructor {
2217
2479
  declare class CorePlugin<State = any> extends BasePlugin<State, CoreCommand> implements RangeProvider {
2218
2480
  protected getters: CoreGetters;
2219
2481
  protected uuidGenerator: UuidGenerator;
2220
- constructor({ getters, stateObserver, range, dispatch, uuidGenerator }: CorePluginConfig);
2482
+ constructor({ getters, stateObserver, range, dispatch, canDispatch, uuidGenerator, }: CorePluginConfig);
2221
2483
  import(data: WorkbookData): void;
2222
2484
  export(data: WorkbookData): void;
2223
2485
  /**
@@ -2355,7 +2617,7 @@ declare class BordersPlugin extends CorePlugin<BordersPluginState> implements Bo
2355
2617
  exportForExcel(data: ExcelWorkbookData): void;
2356
2618
  }
2357
2619
 
2358
- interface CoreState {
2620
+ interface CoreState$1 {
2359
2621
  cells: Record<UID, Record<UID, Cell | undefined>>;
2360
2622
  nextId: number;
2361
2623
  }
@@ -2365,8 +2627,8 @@ interface CoreState {
2365
2627
  * This is the most fundamental of all plugins. It defines how to interact with
2366
2628
  * cell and sheet content.
2367
2629
  */
2368
- declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
2369
- static getters: readonly ["zoneToXC", "getCells", "getTranslatedCellFormula", "getCellStyle", "getCellById"];
2630
+ declare class CellPlugin extends CorePlugin<CoreState$1> implements CoreState$1 {
2631
+ static getters: readonly ["zoneToXC", "getCells", "getTranslatedCellFormula", "getCellStyle", "getCellById", "getFormulaMovedInSheet"];
2370
2632
  readonly nextId = 1;
2371
2633
  readonly cells: {
2372
2634
  [sheetId: string]: {
@@ -2406,6 +2668,7 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
2406
2668
  getCellById(cellId: UID): Cell | undefined;
2407
2669
  private getFormulaCellContent;
2408
2670
  getTranslatedCellFormula(sheetId: UID, offsetX: number, offsetY: number, compiledFormula: RangeCompiledFormula): string;
2671
+ getFormulaMovedInSheet(targetSheetId: UID, compiledFormula: RangeCompiledFormula): string;
2409
2672
  getCellStyle(position: CellPosition): Style;
2410
2673
  /**
2411
2674
  * Converts a zone to a XC coordinate system
@@ -2459,7 +2722,7 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
2459
2722
  */
2460
2723
  declare abstract class AbstractChart {
2461
2724
  readonly sheetId: UID;
2462
- readonly title: string;
2725
+ readonly title: TitleDesign;
2463
2726
  abstract readonly type: ChartType;
2464
2727
  protected readonly getters: CoreGetters;
2465
2728
  constructor(definition: ChartDefinition, sheetId: UID, getters: CoreGetters);
@@ -2571,7 +2834,7 @@ declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState>
2571
2834
  /**
2572
2835
  * Add or remove cells to a given conditional formatting rule and return the adapted CF's XCs.
2573
2836
  */
2574
- getAdaptedCfRanges(sheetId: UID, cf: ConditionalFormat, toAdd: string[], toRemove: string[]): string[] | undefined;
2837
+ getAdaptedCfRanges(sheetId: UID, cf: ConditionalFormat, toAdd: Zone[], toRemove: Zone[]): RangeData[] | undefined;
2575
2838
  private mapToConditionalFormat;
2576
2839
  private mapToConditionalFormatInternal;
2577
2840
  /**
@@ -2653,10 +2916,10 @@ declare class FigurePlugin extends CorePlugin<FigureState> implements FigureStat
2653
2916
  exportForExcel(data: ExcelWorkbookData): void;
2654
2917
  }
2655
2918
 
2656
- interface State$7 {
2919
+ interface State$9 {
2657
2920
  groups: Record<UID, Record<Dimension, HeaderGroup[]>>;
2658
2921
  }
2659
- declare class HeaderGroupingPlugin extends CorePlugin<State$7> {
2922
+ declare class HeaderGroupingPlugin extends CorePlugin<State$9> {
2660
2923
  static getters: readonly ["getHeaderGroups", "getGroupsLayers", "getVisibleGroupLayers", "getHeaderGroup", "getHeaderGroupsInZone", "isGroupFolded", "isRowFolded", "isColFolded"];
2661
2924
  private readonly groups;
2662
2925
  allowDispatch(cmd: CoreCommand): CommandResult;
@@ -2805,7 +3068,7 @@ interface MergeState {
2805
3068
  readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
2806
3069
  }
2807
3070
  declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
2808
- static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "getBottomLeftCell", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "getSelectionRangeString", "isMainCellPosition"];
3071
+ static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "getSelectionRangeString", "isMainCellPosition"];
2809
3072
  private nextId;
2810
3073
  readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
2811
3074
  readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
@@ -2839,7 +3102,6 @@ declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
2839
3102
  isInSameMerge(sheetId: UID, colA: HeaderIndex, rowA: HeaderIndex, colB: HeaderIndex, rowB: HeaderIndex): boolean;
2840
3103
  isInMerge({ sheetId, col, row }: CellPosition): boolean;
2841
3104
  getMainCellPosition(position: CellPosition): CellPosition;
2842
- getBottomLeftCell(position: CellPosition): CellPosition;
2843
3105
  isMergeHidden(sheetId: UID, merge: Merge): boolean;
2844
3106
  /**
2845
3107
  * Check if the zone represents a single cell or a single merge.
@@ -2880,6 +3142,56 @@ declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
2880
3142
  exportForExcel(data: ExcelWorkbookData): void;
2881
3143
  }
2882
3144
 
3145
+ interface Pivot$1 {
3146
+ definition: PivotCoreDefinition;
3147
+ formulaId: string;
3148
+ }
3149
+ interface CoreState {
3150
+ nextFormulaId: number;
3151
+ pivots: Record<UID, Pivot$1 | undefined>;
3152
+ formulaIds: Record<UID, string | undefined>;
3153
+ }
3154
+ declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState {
3155
+ static getters: readonly ["getPivotCoreDefinition", "getPivotDisplayName", "getPivotId", "getPivotFormulaId", "getPivotIds", "getPivotName", "isExistingPivot"];
3156
+ readonly nextFormulaId: number;
3157
+ readonly pivots: {
3158
+ [pivotId: UID]: Pivot$1 | undefined;
3159
+ };
3160
+ readonly formulaIds: {
3161
+ [formulaId: UID]: UID | undefined;
3162
+ };
3163
+ allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.NoChanges | CommandResult.PivotIdNotFound | CommandResult.EmptyName;
3164
+ handle(cmd: CoreCommand): void;
3165
+ getPivotDisplayName(pivotId: UID): string;
3166
+ getPivotName(pivotId: UID): string;
3167
+ /**
3168
+ * Returns the pivot core definition of the pivot with the given id.
3169
+ * Be careful, this is the core definition, this should be used only in a
3170
+ * context where the pivot is not loaded yet.
3171
+ */
3172
+ getPivotCoreDefinition(pivotId: UID): PivotCoreDefinition;
3173
+ /**
3174
+ * Get the pivot ID (UID) from the formula ID (the one used in the formula)
3175
+ */
3176
+ getPivotId(formulaId: string): UID | undefined;
3177
+ getPivotFormulaId(pivotId: UID): string;
3178
+ getPivotIds(): UID[];
3179
+ isExistingPivot(pivotId: UID): boolean;
3180
+ private addPivot;
3181
+ private insertPivot;
3182
+ private resizeSheet;
3183
+ private addPivotFormula;
3184
+ private getPivotCore;
3185
+ /**
3186
+ * Import the pivots
3187
+ */
3188
+ import(data: WorkbookData): void;
3189
+ /**
3190
+ * Export the pivots
3191
+ */
3192
+ export(data: WorkbookData): void;
3193
+ }
3194
+
2883
3195
  declare class SettingsPlugin extends CorePlugin {
2884
3196
  static getters: readonly ["getLocale"];
2885
3197
  private locale;
@@ -2898,7 +3210,7 @@ interface SheetState {
2898
3210
  readonly cellPosition: Record<UID, CellPosition | undefined>;
2899
3211
  }
2900
3212
  declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
2901
- static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone", "checkElementsIncludeAllNonFrozenHeaders"];
3213
+ static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone", "checkElementsIncludeAllNonFrozenHeaders"];
2902
3214
  readonly sheetIdsMapName: Record<string, UID | undefined>;
2903
3215
  readonly orderedSheetIds: UID[];
2904
3216
  readonly sheets: Record<UID, Sheet | undefined>;
@@ -2924,10 +3236,8 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
2924
3236
  getSheetIdByName(name: string | undefined): UID | undefined;
2925
3237
  getSheetIds(): UID[];
2926
3238
  getVisibleSheetIds(): UID[];
2927
- getEvaluationSheets(): Record<UID, Sheet | undefined>;
2928
3239
  doesHeaderExist(sheetId: UID, dimension: Dimension, index: number): boolean;
2929
3240
  doesHeadersExist(sheetId: UID, dimension: Dimension, headerIndexes: HeaderIndex[]): boolean;
2930
- getRow(sheetId: UID, index: HeaderIndex): Row;
2931
3241
  getCell({ sheetId, col, row }: CellPosition): Cell | undefined;
2932
3242
  getColsZone(sheetId: UID, start: HeaderIndex, end: HeaderIndex): Zone;
2933
3243
  getRowCells(sheetId: UID, row: HeaderIndex): UID[];
@@ -3039,11 +3349,31 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
3039
3349
  private checkZonesAreInSheet;
3040
3350
  }
3041
3351
 
3352
+ interface TableStylesState {
3353
+ readonly styles: {
3354
+ [styleId: string]: TableStyle;
3355
+ };
3356
+ }
3357
+ declare class TableStylePlugin extends CorePlugin<TableStylesState> implements TableStylesState {
3358
+ static getters: readonly ["getNewCustomTableStyleName", "getTableStyle", "getTableStyles", "isTableStyleEditable"];
3359
+ readonly styles: {
3360
+ [styleId: string]: TableStyle;
3361
+ };
3362
+ allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
3363
+ handle(cmd: CoreCommand): void;
3364
+ getTableStyle(styleId: string): TableStyle;
3365
+ getTableStyles(): Record<string, TableStyle>;
3366
+ getNewCustomTableStyleName(): string;
3367
+ isTableStyleEditable(styleId: string): boolean;
3368
+ import(data: WorkbookData): void;
3369
+ export(data: WorkbookData): void;
3370
+ }
3371
+
3042
3372
  interface TableState {
3043
3373
  tables: Record<UID, Record<TableId, CoreTable | undefined>>;
3044
3374
  }
3045
3375
  declare class TablePlugin extends CorePlugin<TableState> implements TableState {
3046
- static getters: readonly ["getCoreTable", "getCoreTables"];
3376
+ static getters: readonly ["getCoreTable", "getCoreTables", "getCoreTableMatchingTopLeft"];
3047
3377
  readonly tables: Record<UID, Record<TableId, CoreTable | undefined>>;
3048
3378
  adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
3049
3379
  allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
@@ -3067,7 +3397,7 @@ declare class TablePlugin extends CorePlugin<TableState> implements TableState {
3067
3397
  *
3068
3398
  */
3069
3399
  private canUpdateCellCmdExtendTable;
3070
- private getTableFromZone;
3400
+ getCoreTableMatchingTopLeft(sheetId: UID, zone: Zone): CoreTable | undefined;
3071
3401
  private checkUpdatedTableZoneIsValid;
3072
3402
  private checkTableConfigUpdateIsValid;
3073
3403
  private createStaticTable;
@@ -3153,7 +3483,6 @@ declare class SelectiveHistory<T = unknown> {
3153
3483
  */
3154
3484
  redo(operationId: UID, redoId: UID, insertAfter: UID): void;
3155
3485
  drop(operationId: UID): void;
3156
- getRevertedExecution(): T[];
3157
3486
  /**
3158
3487
  * Revert the state as it was *before* the given operation was executed.
3159
3488
  */
@@ -3223,6 +3552,9 @@ interface SheetData {
3223
3552
  interface WorkbookSettings {
3224
3553
  locale: Locale;
3225
3554
  }
3555
+ type PivotData = {
3556
+ formulaId: string;
3557
+ } & PivotCoreDefinition;
3226
3558
  interface WorkbookData {
3227
3559
  version: number;
3228
3560
  sheets: SheetData[];
@@ -3235,9 +3567,16 @@ interface WorkbookData {
3235
3567
  borders: {
3236
3568
  [key: number]: Border$1;
3237
3569
  };
3570
+ pivots: {
3571
+ [key: string]: PivotData;
3572
+ };
3573
+ pivotNextId: number;
3238
3574
  revisionId: UID;
3239
3575
  uniqueFigureIds: boolean;
3240
3576
  settings: WorkbookSettings;
3577
+ customTableStyles: {
3578
+ [key: string]: TableStyleData;
3579
+ };
3241
3580
  }
3242
3581
  interface ExcelWorkbookData extends WorkbookData {
3243
3582
  sheets: ExcelSheetData[];
@@ -3276,12 +3615,18 @@ interface DataValidationRuleData extends Omit<DataValidationRule, "ranges"> {
3276
3615
  interface ExcelTableData {
3277
3616
  range: string;
3278
3617
  filters: ExcelFilterData[];
3618
+ config: TableConfig;
3279
3619
  }
3280
3620
  interface ExcelFilterData {
3281
3621
  colId: number;
3282
3622
  displayedValues: string[];
3283
3623
  displayBlanks?: boolean;
3284
3624
  }
3625
+ interface TableStyleData {
3626
+ templateName: TableStyleTemplateName;
3627
+ primaryColor: string;
3628
+ displayName: string;
3629
+ }
3285
3630
 
3286
3631
  interface AbstractMessage {
3287
3632
  version: number;
@@ -3535,6 +3880,7 @@ interface UIPluginConfig {
3535
3880
  readonly getters: Getters;
3536
3881
  readonly stateObserver: StateObserver;
3537
3882
  readonly dispatch: CommandDispatcher["dispatch"];
3883
+ readonly canDispatch: CommandDispatcher["dispatch"];
3538
3884
  readonly selection: SelectionStreamProcessor;
3539
3885
  readonly moveClient: (position: ClientPosition) => void;
3540
3886
  readonly uiActions: UIActions;
@@ -3557,12 +3903,12 @@ declare class UIPlugin<State = any> extends BasePlugin<State, Command> {
3557
3903
  protected getters: Getters;
3558
3904
  protected ui: UIActions;
3559
3905
  protected selection: SelectionStreamProcessor;
3560
- constructor({ getters, stateObserver, dispatch, uiActions, selection }: UIPluginConfig);
3906
+ constructor({ getters, stateObserver, dispatch, canDispatch, uiActions, selection, }: UIPluginConfig);
3561
3907
  drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
3562
3908
  }
3563
3909
 
3564
3910
  declare class EvaluationPlugin extends UIPlugin {
3565
- static getters: readonly ["evaluateFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getSpreadPositionsOf", "getArrayFormulaSpreadingOn", "isEmpty"];
3911
+ static getters: readonly ["evaluateFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getSpreadZone", "getArrayFormulaSpreadingOn", "isEmpty"];
3566
3912
  private shouldRebuildDependenciesGraph;
3567
3913
  private evaluator;
3568
3914
  private positionsToUpdate;
@@ -3586,7 +3932,12 @@ declare class EvaluationPlugin extends UIPlugin {
3586
3932
  getEvaluatedCell(position: CellPosition): EvaluatedCell;
3587
3933
  getEvaluatedCells(sheetId: UID): Record<UID, EvaluatedCell>;
3588
3934
  getEvaluatedCellsInZone(sheetId: UID, zone: Zone): EvaluatedCell[];
3589
- getSpreadPositionsOf(position: CellPosition): CellPosition[];
3935
+ /**
3936
+ * Return the spread zone the position is part of, if any
3937
+ */
3938
+ getSpreadZone(position: CellPosition, options?: {
3939
+ ignoreSpillError: boolean;
3940
+ }): Zone | undefined;
3590
3941
  getArrayFormulaSpreadingOn(position: CellPosition): CellPosition | undefined;
3591
3942
  /**
3592
3943
  * Check if a zone only contains empty cells
@@ -3775,6 +4126,163 @@ declare class HeaderSizeUIPlugin extends UIPlugin<HeaderSizeState> implements He
3775
4126
  private getRowTallestCell;
3776
4127
  }
3777
4128
 
4129
+ /**
4130
+ * Represent a pivot runtime definition. A pivot runtime definition is a pivot
4131
+ * definition that has been enriched to include the display name of its attributes
4132
+ * (measures, columns, rows).
4133
+ */
4134
+ declare class PivotRuntimeDefinition {
4135
+ readonly measures: PivotMeasure[];
4136
+ readonly columns: PivotDimension$1[];
4137
+ readonly rows: PivotDimension$1[];
4138
+ constructor(definition: CommonPivotCoreDefinition, fields: PivotFields);
4139
+ getDimension(nameWithGranularity: string): PivotDimension$1;
4140
+ getMeasure(name: string): PivotMeasure;
4141
+ }
4142
+
4143
+ /**
4144
+ * Class used to ease the construction of a pivot table.
4145
+ * Let's consider the following example, with:
4146
+ * - columns groupBy: [sales_team, create_date]
4147
+ * - rows groupBy: [continent, city]
4148
+ * - measures: [revenues]
4149
+ * _____________________________________________________________________________________| ----|
4150
+ * | | Sale Team 1 | Sale Team 2 | | |
4151
+ * | |___________________________|_________________________|_____________| |
4152
+ * | | May 2020 | June 2020 | May 2020 | June 2020 | Total | |<---- `cols`
4153
+ * | |______________|____________|____________|____________|_____________| | ----|
4154
+ * | | Revenues | Revenues | Revenues | Revenues | Revenues | | |<--- `measureRow`
4155
+ * |________________|______________|____________|____________|____________|_____________| ----| ----|
4156
+ * |Europe | 25 | 35 | 40 | 30 | 65 | ----|
4157
+ * | Brussels | 0 | 15 | 30 | 30 | 30 | |
4158
+ * | Paris | 25 | 20 | 10 | 0 | 35 | |
4159
+ * |North America | 60 | 75 | | | 60 | |<---- `body`
4160
+ * | Washington | 60 | 75 | | | 60 | |
4161
+ * |Total | 85 | 110 | 40 | 30 | 125 | |
4162
+ * |________________|______________|____________|____________|____________|_____________| ----|
4163
+ *
4164
+ * | |
4165
+ * |----------------|
4166
+ * |
4167
+ * |
4168
+ * `rows`
4169
+ *
4170
+ * `rows` is an array of cells, each cells contains the indent level, the fields used for the group by and the values for theses fields.
4171
+ * For example:
4172
+ * `Europe`: { indent: 1, fields: ["continent"], values: ["id_of_Europe"]}
4173
+ * `Brussels`: { indent: 2, fields: ["continent", "city"], values: ["id_of_Europe", "id_of_Brussels"]}
4174
+ * `Total`: { indent: 0, fields: [], values: []}
4175
+ *
4176
+ * `columns` is an double array, first by row and then by cell. So, in this example, it looks like:
4177
+ * [[row1], [row2], [measureRow]]
4178
+ * Each cell of a column's row contains the width (span) of the cells, the fields used for the group by and the values for theses fields.
4179
+ * For example:
4180
+ * `Sale Team 1`: { width: 2, fields: ["sales_team"], values: ["id_of_SaleTeam1"]}
4181
+ * `May 2020` (the one under Sale Team 2): { width: 1, fields: ["sales_team", "create_date"], values: ["id_of_SaleTeam2", "May 2020"]}
4182
+ * `Revenues` (the one under Total): { width: 1, fields: ["measure"], values: ["revenues"]}
4183
+ *
4184
+ */
4185
+ declare class SpreadsheetPivotTable {
4186
+ readonly columns: PivotTableColumn[][];
4187
+ readonly rows: PivotTableRow[];
4188
+ readonly measures: string[];
4189
+ readonly rowTitle?: string;
4190
+ readonly maxIndent: number;
4191
+ readonly pivotCells: {
4192
+ [key: string]: PivotTableCell[][];
4193
+ };
4194
+ constructor(columns: PivotTableColumn[][], rows: PivotTableRow[], measures: string[], rowTitle?: string);
4195
+ /**
4196
+ * Get the number of columns leafs (i.e. the number of the last row of columns)
4197
+ */
4198
+ getNumberOfDataColumns(): number;
4199
+ getPivotCells(includeTotal?: boolean, includeColumnHeaders?: boolean): PivotTableCell[][];
4200
+ private isTotalRow;
4201
+ private getPivotCell;
4202
+ private getColHeaderDomain;
4203
+ private getColDomain;
4204
+ private getColMeasure;
4205
+ private getRowDomain;
4206
+ export(): {
4207
+ cols: PivotTableColumn[][];
4208
+ rows: PivotTableRow[];
4209
+ measures: string[];
4210
+ rowTitle: string | undefined;
4211
+ };
4212
+ }
4213
+
4214
+ interface InitPivotParams {
4215
+ reload?: boolean;
4216
+ }
4217
+ interface Pivot<T = PivotRuntimeDefinition> {
4218
+ type: PivotCoreDefinition["type"];
4219
+ definition: T;
4220
+ init(params?: InitPivotParams): void;
4221
+ isValid(): boolean;
4222
+ getTableStructure(): SpreadsheetPivotTable;
4223
+ getFields(): PivotFields | undefined;
4224
+ getPivotHeaderValueAndFormat(domain: StringDomainArgs): FPayload;
4225
+ getPivotCellValueAndFormat(measure: string, domain: StringDomainArgs): FPayload;
4226
+ getMeasure: (name: string) => PivotMeasure;
4227
+ assertIsValid({ throwOnError }: {
4228
+ throwOnError: boolean;
4229
+ }): FPayload | undefined;
4230
+ getPossibleFieldValues(groupBy: string): {
4231
+ value: string | boolean | number;
4232
+ label: string;
4233
+ }[];
4234
+ needsReevaluation: boolean;
4235
+ }
4236
+
4237
+ declare class PivotUIPlugin extends UIPlugin {
4238
+ static getters: readonly ["getPivot", "getFirstPivotFunction", "getPivotIdFromPosition", "getPivotDomainArgsFromPosition", "isPivotUnused", "areDomainArgsFieldsValid"];
4239
+ private pivots;
4240
+ private unusedPivots?;
4241
+ private custom;
4242
+ constructor(config: UIPluginConfig);
4243
+ beforeHandle(cmd: Command): void;
4244
+ handle(cmd: Command): void;
4245
+ /**
4246
+ * Get the id of the pivot at the given position. Returns undefined if there
4247
+ * is no pivot at this position
4248
+ */
4249
+ getPivotIdFromPosition(position: CellPosition): "" | UID | undefined;
4250
+ getFirstPivotFunction(tokens: Token[]): {
4251
+ functionName: string;
4252
+ args: (CellValue | Matrix<CellValue> | undefined)[];
4253
+ } | undefined;
4254
+ /**
4255
+ * Returns the domain args of a pivot formula from a position.
4256
+ * For all those formulas:
4257
+ *
4258
+ * =PIVOT.VALUE(1,"expected_revenue","stage_id",2,"city","Brussels")
4259
+ * =PIVOT.HEADER(1,"stage_id",2,"city","Brussels")
4260
+ * =PIVOT.HEADER(1,"stage_id",2,"city","Brussels","measure","expected_revenue")
4261
+ *
4262
+ * the result is the same: ["stage_id", 2, "city", "Brussels"]
4263
+ *
4264
+ * If the cell is the result of PIVOT, the result is the domain of the cell
4265
+ * as if it was the individual pivot formula
4266
+ */
4267
+ getPivotDomainArgsFromPosition(position: CellPosition): (CellValue | Matrix<CellValue> | undefined)[] | undefined;
4268
+ getPivot(pivotId: UID): Pivot<PivotRuntimeDefinition>;
4269
+ isPivotUnused(pivotId: UID): boolean;
4270
+ /**
4271
+ * Check if the fields in the domain part of
4272
+ * a pivot function are valid according to the pivot definition.
4273
+ * e.g. =PIVOT.VALUE(1,"revenue","country_id",...,"create_date:month",...,"source_id",...)
4274
+ */
4275
+ areDomainArgsFieldsValid(pivotId: UID, domainArgs: string[]): boolean;
4276
+ /**
4277
+ * Refresh the cache of a pivot
4278
+ */
4279
+ private refreshPivot;
4280
+ setupPivot(pivotId: UID, { recreate }?: {
4281
+ recreate: boolean;
4282
+ }): void;
4283
+ _getUnusedPivots(): UID[];
4284
+ }
4285
+
3778
4286
  /**
3779
4287
  * Autofill Plugin
3780
4288
  *
@@ -3929,7 +4437,18 @@ declare class AutomaticSumPlugin extends UIPlugin {
3929
4437
  private transpose;
3930
4438
  }
3931
4439
 
3932
- interface ClientToDisplay extends Required<Client> {
4440
+ declare class CellComputedStylePlugin extends UIPlugin {
4441
+ static getters: readonly ["getCellComputedBorder", "getCellComputedStyle"];
4442
+ private styles;
4443
+ private borders;
4444
+ handle(cmd: Command): void;
4445
+ getCellComputedBorder(position: CellPosition): Border$1 | null;
4446
+ getCellComputedStyle(position: CellPosition): Style;
4447
+ private computeCellBorder;
4448
+ private computeCellStyle;
4449
+ }
4450
+
4451
+ interface ClientToDisplay extends Required<Client> {
3933
4452
  color: Color;
3934
4453
  }
3935
4454
  declare class CollaborativePlugin extends UIPlugin {
@@ -4071,7 +4590,7 @@ declare class SplitToColumnsPlugin extends UIPlugin {
4071
4590
  private checkSeparatorInSelection;
4072
4591
  }
4073
4592
 
4074
- declare class TableStylePlugin extends UIPlugin {
4593
+ declare class TableComputedStylePlugin extends UIPlugin {
4075
4594
  static getters: readonly ["getCellTableStyle", "getCellTableBorder"];
4076
4595
  private tableStyles;
4077
4596
  handle(cmd: Command): void;
@@ -4099,7 +4618,7 @@ declare class UIOptionsPlugin extends UIPlugin {
4099
4618
  }
4100
4619
 
4101
4620
  declare class SheetUIPlugin extends UIPlugin {
4102
- static getters: readonly ["doesCellHaveGridIcon", "getCellWidth", "getCellComputedBorder", "getCellComputedStyle", "getTextWidth", "getCellText", "getCellMultiLineText", "getContiguousZone"];
4621
+ static getters: readonly ["doesCellHaveGridIcon", "getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getContiguousZone"];
4103
4622
  private ctx;
4104
4623
  allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
4105
4624
  handle(cmd: Command): void;
@@ -4121,8 +4640,6 @@ declare class SheetUIPlugin extends UIPlugin {
4121
4640
  * If the cell is part of a merge, the check applies to the main cell of the merge.
4122
4641
  */
4123
4642
  private isCellEmpty;
4124
- getCellComputedBorder(position: CellPosition): Border$1 | null;
4125
- getCellComputedStyle(position: CellPosition): Style;
4126
4643
  private getColMaxWidth;
4127
4644
  /**
4128
4645
  * Check that any "sheetId" in the command matches an existing
@@ -4190,7 +4707,7 @@ declare class ClipboardPlugin extends UIPlugin {
4190
4707
  declare class FilterEvaluationPlugin extends UIPlugin {
4191
4708
  static getters: readonly ["getFilterHiddenValues", "getFirstTableInSelection", "isRowFiltered", "isFilterActive"];
4192
4709
  private filterValues;
4193
- hiddenRows: Set<number>;
4710
+ hiddenRows: Record<UID, Set<number> | undefined>;
4194
4711
  isEvaluationDirty: boolean;
4195
4712
  allowDispatch(cmd: LocalCommand): CommandResult;
4196
4713
  handle(cmd: Command): void;
@@ -4241,7 +4758,7 @@ declare class HeaderPositionsUIPlugin extends UIPlugin {
4241
4758
  */
4242
4759
  declare class GridSelectionPlugin extends UIPlugin {
4243
4760
  static layers: readonly ["Selection"];
4244
- static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getSelectedCells", "getStatisticFnResults", "getAggregate", "getSelectedFigureId", "getSelection", "getActivePosition", "getSheetPosition", "isSelected", "isSingleColSelected", "getElementsFromSelection", "tryGetActiveSheetId", "isGridSelectionActive"];
4761
+ static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getSelectedCells", "getSelectedFigureId", "getSelection", "getActivePosition", "getSheetPosition", "isSingleColSelected", "getElementsFromSelection", "tryGetActiveSheetId", "isGridSelectionActive"];
4245
4762
  private gridSelection;
4246
4763
  private selectedFigureId;
4247
4764
  private sheetsData;
@@ -4266,11 +4783,6 @@ declare class GridSelectionPlugin extends UIPlugin {
4266
4783
  getSelectedFigureId(): UID | null;
4267
4784
  getActivePosition(): CellPosition;
4268
4785
  getSheetPosition(sheetId: UID): CellPosition;
4269
- getStatisticFnResults(): {
4270
- [name: string]: number | undefined;
4271
- };
4272
- getAggregate(): string | null;
4273
- isSelected(zone: Zone): boolean;
4274
4786
  isSingleColSelected(): boolean;
4275
4787
  /**
4276
4788
  * Returns a sorted array of indexes of all columns (respectively rows depending
@@ -4327,8 +4839,8 @@ declare class InternalViewport {
4327
4839
  canScrollHorizontally: boolean;
4328
4840
  viewportWidth: Pixel;
4329
4841
  viewportHeight: Pixel;
4330
- private offsetCorrectionX;
4331
- private offsetCorrectionY;
4842
+ offsetCorrectionX: Pixel;
4843
+ offsetCorrectionY: Pixel;
4332
4844
  constructor(getters: Getters, sheetId: UID, boundaries: Zone, sizeInGrid: DOMDimension, options: {
4333
4845
  canScrollVertically: boolean;
4334
4846
  canScrollHorizontally: boolean;
@@ -4358,6 +4870,7 @@ declare class InternalViewport {
4358
4870
  adjustPosition(position: Position$1): void;
4359
4871
  private adjustPositionX;
4360
4872
  private adjustPositionY;
4873
+ willNewOffsetScrollViewport(offsetX: Pixel, offsetY: Pixel): boolean;
4361
4874
  setViewportOffset(offsetX: Pixel, offsetY: Pixel): void;
4362
4875
  adjustViewportZone(): void;
4363
4876
  /**
@@ -4526,6 +5039,7 @@ declare class SheetViewPlugin extends UIPlugin {
4526
5039
  private checkPositiveDimension;
4527
5040
  private checkValuesAreDifferent;
4528
5041
  private checkScrollingDirection;
5042
+ private checkIfViewportsWillChange;
4529
5043
  private getMainViewport;
4530
5044
  private getMainInternalViewport;
4531
5045
  /** gets rid of deprecated sheetIds */
@@ -4533,11 +5047,6 @@ declare class SheetViewPlugin extends UIPlugin {
4533
5047
  private resizeSheetView;
4534
5048
  private recomputeViewports;
4535
5049
  private setSheetViewOffset;
4536
- /**
4537
- * Clip the vertical offset within the allowed range.
4538
- * Not above the sheet, nor below the sheet.
4539
- */
4540
- private clipOffsetY;
4541
5050
  private getViewportOffset;
4542
5051
  private resetViewports;
4543
5052
  /**
@@ -4612,11 +5121,11 @@ type PluginGetters<Plugin extends {
4612
5121
  getters: readonly string[];
4613
5122
  }> = Pick<InstanceType<Plugin>, GetterNames<Plugin>>;
4614
5123
  type RangeAdapterGetters = Pick<RangeAdapter, GetterNames<typeof RangeAdapter>>;
4615
- 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>;
5124
+ 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> & PluginGetters<typeof PivotCorePlugin>;
4616
5125
  type Getters = {
4617
5126
  isReadonly: () => boolean;
4618
5127
  isDashboard: () => boolean;
4619
- } & 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> & PluginGetters<typeof DynamicTablesPlugin>;
5128
+ } & 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> & PluginGetters<typeof CellComputedStylePlugin> & PluginGetters<typeof DynamicTablesPlugin> & PluginGetters<typeof PivotUIPlugin> & PluginGetters<typeof TableComputedStylePlugin>;
4620
5129
 
4621
5130
  type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "RANGE<ANY>" | "META";
4622
5131
  interface ArgDefinition {
@@ -4739,9 +5248,9 @@ interface CreateRevisionOptions {
4739
5248
  pending?: boolean;
4740
5249
  }
4741
5250
  interface HistoryChange {
4742
- path: [any, ...(number | string)[]];
5251
+ key: string;
5252
+ target: any;
4743
5253
  before: any;
4744
- after: any;
4745
5254
  }
4746
5255
  interface WorkbookHistory<Plugin> {
4747
5256
  update<T extends keyof Plugin>(key: T, val: Plugin[T]): void;
@@ -4877,6 +5386,12 @@ declare function rgbaToHex(rgba: RGBA): Color;
4877
5386
  * Color string to RGBA representation
4878
5387
  */
4879
5388
  declare function colorToRGBA(color: Color): RGBA;
5389
+ declare class ColorGenerator {
5390
+ private currentColorIndex;
5391
+ private colors;
5392
+ constructor(colors?: string[]);
5393
+ next(): string;
5394
+ }
4880
5395
 
4881
5396
  /**
4882
5397
  * Convert a (col) number to the corresponding letter.
@@ -4934,11 +5449,13 @@ declare class DateTime {
4934
5449
  getTime(): number;
4935
5450
  getFullYear(): number;
4936
5451
  getMonth(): number;
5452
+ getQuarter(): number;
4937
5453
  getDate(): number;
4938
5454
  getDay(): number;
4939
5455
  getHours(): number;
4940
5456
  getMinutes(): number;
4941
5457
  getSeconds(): number;
5458
+ getIsoWeek(): number;
4942
5459
  setFullYear(year: number): number;
4943
5460
  setMonth(month: number): number;
4944
5461
  setDate(date: number): number;
@@ -4981,7 +5498,7 @@ declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
4981
5498
  /**
4982
5499
  * Compares two objects.
4983
5500
  */
4984
- declare function deepEquals(o1: any, o2: any): boolean;
5501
+ declare function deepEquals(o1: any, o2: any, ignoreFunctions?: "ignoreFunctions"): boolean;
4985
5502
 
4986
5503
  interface ConstructorArgs {
4987
5504
  readonly zone: Readonly<Zone | UnboundedZone>;
@@ -5085,12 +5602,11 @@ declare function isInside(col: number, row: number, zone: Zone): boolean;
5085
5602
  * a cell that is part of the new zone and not the previous one.
5086
5603
  */
5087
5604
  declare function findCellInNewZone(oldZone: Zone, currentZone: Zone): Position$1;
5088
- declare function positionToZone(position: Position$1): {
5089
- left: HeaderIndex;
5090
- right: HeaderIndex;
5091
- top: HeaderIndex;
5092
- bottom: HeaderIndex;
5093
- };
5605
+ declare function positionToZone(position: Position$1): Zone;
5606
+ /**
5607
+ * Merge contiguous and overlapping zones that are in the array into bigger zones
5608
+ */
5609
+ declare function mergeContiguousZones(zones: Zone[]): Zone[];
5094
5610
 
5095
5611
  /**
5096
5612
  * Model
@@ -5222,7 +5738,7 @@ declare class Model extends EventBus<any> implements CommandDispatcher {
5222
5738
  * Check if a command can be dispatched, and returns a DispatchResult object with the possible
5223
5739
  * reasons the dispatch failed.
5224
5740
  */
5225
- canDispatch: CommandDispatcher["canDispatch"];
5741
+ canDispatch: CommandDispatcher["dispatch"];
5226
5742
  /**
5227
5743
  * The dispatch method is the only entry point to manipulate data in the model.
5228
5744
  * This is through this method that commands are dispatched most of the time
@@ -5278,74 +5794,6 @@ declare class Model extends EventBus<any> implements CommandDispatcher {
5278
5794
  garbageCollectExternalResources(): void;
5279
5795
  }
5280
5796
 
5281
- declare class ClipboardHandler<T> {
5282
- protected getters: Getters;
5283
- protected dispatch: CommandDispatcher["dispatch"];
5284
- constructor(getters: Getters, dispatch: CommandDispatcher["dispatch"]);
5285
- copy(data: ClipboardData): T | undefined;
5286
- paste(target: ClipboardPasteTarget, clippedContent: T, options: ClipboardOptions | undefined): void;
5287
- isPasteAllowed(sheetId: UID, target: Zone[], content: T, option: ClipboardOptions): CommandResult;
5288
- isCutAllowed(data: ClipboardData): CommandResult;
5289
- getPasteTarget(target: Zone[], content: T, options: ClipboardOptions): ClipboardPasteTarget;
5290
- convertOSClipboardData(data: any): T | undefined;
5291
- }
5292
-
5293
- declare class AbstractCellClipboardHandler<T, T1> extends ClipboardHandler<T> {
5294
- copy(data: ClipboardCellData): T | undefined;
5295
- pasteFromCopy(sheetId: UID, target: Zone[], content: T1[][], options?: ClipboardOptions): void;
5296
- protected pasteZone(sheetId: UID, col: HeaderIndex, row: HeaderIndex, data: T1[][], clipboardOptions?: ClipboardOptions): void;
5297
- }
5298
-
5299
- declare class AbstractFigureClipboardHandler<T> extends ClipboardHandler<T> {
5300
- copy(data: ClipboardFigureData): T | undefined;
5301
- }
5302
-
5303
- type CellPopoverType = "ErrorToolTip" | "LinkDisplay" | "FilterMenu" | "LinkEditor";
5304
- type PopoverPropsPosition = "TopRight" | "BottomLeft";
5305
- type MaxSizedComponentConstructor = ComponentConstructor & {
5306
- maxSize?: {
5307
- maxWidth?: number;
5308
- maxHeight?: number;
5309
- };
5310
- };
5311
- /**
5312
- * If the cell at the given position have an associated component (linkDisplay, errorTooltip, ...),
5313
- * returns the parameters to display the component
5314
- */
5315
- type CellPopoverBuilder = (position: CellPosition, getters: Getters) => CellPopoverComponent<MaxSizedComponentConstructor>;
5316
- interface PopoverBuilders {
5317
- onOpen?: CellPopoverBuilder;
5318
- onHover?: CellPopoverBuilder;
5319
- }
5320
- interface ClosedCellPopover {
5321
- isOpen: false;
5322
- }
5323
- interface OpenCellPopover {
5324
- isOpen: true;
5325
- type: CellPopoverType;
5326
- col: number;
5327
- row: number;
5328
- }
5329
- /**
5330
- * Description of a cell component.
5331
- * i.e. which component class, which props and where to
5332
- * display it relative to the cell
5333
- */
5334
- type OpenCellPopoverComponent<C extends ComponentConstructor> = {
5335
- isOpen: true;
5336
- Component: C;
5337
- props: PropsOf<C>;
5338
- cellCorner: PopoverPropsPosition;
5339
- };
5340
- type CellPopoverComponent<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = ClosedCellPopover | OpenCellPopoverComponent<C>;
5341
- type PositionedCellPopoverComponent<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = {
5342
- isOpen: true;
5343
- Component: C;
5344
- props: PropsOf<C>;
5345
- anchorRect: Rect;
5346
- cellCorner: PopoverPropsPosition;
5347
- };
5348
-
5349
5797
  /**
5350
5798
  * Registry
5351
5799
  *
@@ -5391,169 +5839,564 @@ declare class Registry<T> {
5391
5839
  remove(key: string): void;
5392
5840
  }
5393
5841
 
5394
- interface LinkSpec {
5395
- readonly match: (url: string) => boolean;
5396
- readonly createLink: (url: string, label: string) => Link;
5397
- /**
5398
- * String used to display the URL in components.
5399
- * Particularly useful for special links (sheet, etc.)
5400
- * - a simple web link displays the raw url
5401
- * - a link to a sheet displays the sheet name
5402
- */
5403
- readonly urlRepresentation: (url: string, getters: Getters) => string;
5404
- readonly open: (url: string, env: SpreadsheetChildEnv) => void;
5405
- readonly sequence: number;
5406
- }
5407
- declare function urlRepresentation(link: Link, getters: Getters): string;
5408
- declare function openLink(link: Link, env: SpreadsheetChildEnv): void;
5409
-
5410
- type TransformationFunction<U extends CoreCommandTypes, V extends CoreCommandTypes> = (toTransform: Extract<CoreCommand, {
5411
- type: U;
5412
- }>, executed: Extract<CoreCommand, {
5413
- type: V;
5414
- }>) => CoreCommand | undefined;
5415
- declare class OTRegistry extends Registry<Map<CoreCommandTypes, TransformationFunction<CoreCommandTypes, CoreCommandTypes>>> {
5416
- /**
5417
- * Add a transformation function to the registry. When the executed command
5418
- * happened, all the commands in toTransforms should be transformed using the
5419
- * transformation function given
5420
- */
5421
- addTransformation<U extends CoreCommandTypes, V extends CoreCommandTypes>(executed: U, toTransforms: V[], fn: TransformationFunction<CoreCommandTypes, CoreCommandTypes>): this;
5422
- /**
5423
- * Get the transformation function to transform the command toTransform, after
5424
- * that the executed command happened.
5425
- */
5426
- getTransformation<U extends CoreCommandTypes, V extends CoreCommandTypes>(toTransform: U, executed: V): TransformationFunction<CoreCommandTypes, CoreCommandTypes> | undefined;
5427
- }
5428
-
5429
- interface CellClickableItem {
5430
- condition: (position: CellPosition, env: SpreadsheetChildEnv) => boolean;
5431
- execute: (position: CellPosition, env: SpreadsheetChildEnv) => void;
5432
- sequence: number;
5842
+ interface PivotRegistryItem$1 {
5843
+ editor: new (...args: any) => Component;
5433
5844
  }
5434
5845
 
5435
- interface TopbarComponent {
5436
- id: UID;
5437
- component: any;
5438
- isVisible?: (env: SpreadsheetChildEnv) => boolean;
5846
+ interface PivotParams {
5847
+ definition: PivotCoreDefinition;
5848
+ getters: Getters;
5439
5849
  }
5440
-
5441
- /**
5442
- * Instantiate a chart object based on a definition
5443
- */
5444
- interface ChartBuilder {
5445
- /**
5446
- * Check if this factory should be used
5447
- */
5448
- match: (type: ChartType) => boolean;
5449
- createChart: (definition: ChartDefinition, sheetId: UID, getters: CoreGetters) => AbstractChart;
5450
- getChartRuntime: (chart: AbstractChart, getters: Getters) => ChartRuntime;
5451
- validateChartDefinition(validator: Validator, definition: ChartDefinition): CommandResult | CommandResult[];
5452
- transformDefinition(definition: ChartDefinition, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): ChartDefinition;
5453
- getChartDefinitionFromContextCreation(context: ChartCreationContext): ChartDefinition;
5454
- name: string;
5455
- sequence: number;
5850
+ type PivotUIConstructor = new (custom: ModelConfig["custom"], params: PivotParams) => Pivot;
5851
+ type PivotDefinitionConstructor = new (definition: PivotCoreDefinition, fields: PivotFields, getters: Getters) => PivotRuntimeDefinition;
5852
+ interface PivotRegistryItem {
5853
+ ui: PivotUIConstructor;
5854
+ definition: PivotDefinitionConstructor;
5855
+ externalData: boolean;
5856
+ onIterationEndEvaluation: (pivot: Pivot) => void;
5857
+ granularities: string[];
5858
+ isMeasureCandidate: (field: PivotField) => boolean;
5859
+ isGroupable: (field: PivotField) => boolean;
5456
5860
  }
5457
5861
 
5458
- declare class SpreadsheetStore extends DisposableStore {
5459
- protected model: Model;
5862
+ declare class ClipboardHandler<T> {
5460
5863
  protected getters: Getters;
5461
- private renderer;
5462
- constructor(get: Get);
5463
- get renderingLayers(): Readonly<LayerName[]>;
5464
- protected handle(cmd: Command): void;
5465
- protected finalize(): void;
5466
- drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
5864
+ protected dispatch: CommandDispatcher["dispatch"];
5865
+ constructor(getters: Getters, dispatch: CommandDispatcher["dispatch"]);
5866
+ copy(data: ClipboardData): T | undefined;
5867
+ paste(target: ClipboardPasteTarget, clippedContent: T, options: ClipboardOptions | undefined): void;
5868
+ isPasteAllowed(sheetId: UID, target: Zone[], content: T, option: ClipboardOptions): CommandResult;
5869
+ isCutAllowed(data: ClipboardData): CommandResult;
5870
+ getPasteTarget(target: Zone[], content: T, options: ClipboardOptions): ClipboardPasteTarget;
5871
+ convertOSClipboardData(data: any): T | undefined;
5467
5872
  }
5468
5873
 
5469
- interface HighlightProvider {
5470
- highlights: Highlight$1[];
5471
- }
5472
- declare class HighlightStore extends SpreadsheetStore {
5473
- private providers;
5474
- constructor(get: Get);
5475
- get renderingLayers(): readonly ["Highlights"];
5476
- get highlights(): Highlight$1[];
5477
- register(highlightProvider: HighlightProvider): void;
5478
- unRegister(highlightProvider: HighlightProvider): void;
5479
- drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
5874
+ declare class AbstractCellClipboardHandler<T, T1> extends ClipboardHandler<T> {
5875
+ copy(data: ClipboardCellData): T | undefined;
5876
+ pasteFromCopy(sheetId: UID, target: Zone[], content: T1[][], options?: ClipboardOptions): void;
5877
+ protected pasteZone(sheetId: UID, col: HeaderIndex, row: HeaderIndex, data: T1[][], clipboardOptions?: ClipboardOptions): void;
5480
5878
  }
5481
5879
 
5482
- interface RangeInputValue {
5483
- id: number;
5484
- xc: string;
5485
- color: Color;
5880
+ declare class AbstractFigureClipboardHandler<T> extends ClipboardHandler<T> {
5881
+ copy(data: ClipboardFigureData): T | undefined;
5486
5882
  }
5487
- /**
5488
- * Selection input Plugin
5489
- *
5490
- * The SelectionInput component input and output are both arrays of strings, but
5491
- * it requires an intermediary internal state to work.
5492
- * This plugin handles this internal state.
5493
- */
5494
- declare class SelectionInputStore extends SpreadsheetStore {
5495
- private initialRanges;
5496
- private readonly inputHasSingleRange;
5497
- ranges: RangeInputValue[];
5498
- focusedRangeIndex: number | null;
5499
- private inputSheetId;
5500
- private focusStore;
5501
- protected highlightStore: {
5502
- readonly renderingLayers: readonly ["Highlights"];
5503
- readonly highlights: Highlight$1[];
5504
- readonly register: (highlightProvider: HighlightProvider) => void;
5505
- readonly unRegister: (highlightProvider: HighlightProvider) => void;
5506
- readonly drawLayer: (ctx: GridRenderingContext, layer: "Chart" | "Background" | "Highlights" | "Clipboard" | "Autofill" | "Selection" | "Headers") => void;
5507
- readonly dispose: () => void;
5508
- };
5509
- constructor(get: Get, initialRanges?: string[], inputHasSingleRange?: boolean);
5510
- handleEvent(event: SelectionEvent): void;
5511
- handle(cmd: Command): void;
5512
- changeRange(rangeId: number, value: string): void;
5513
- addEmptyRange(): void;
5514
- removeRange(rangeId: number): void;
5515
- confirm(): void;
5516
- reset(): void;
5517
- get selectionInputValues(): string[];
5883
+
5884
+ interface ActionSpec {
5518
5885
  /**
5519
- * Return a list of all valid XCs.
5520
- * e.g. ["A1", "Sheet2!B3", "E12"]
5886
+ * String or a function to compute the name
5521
5887
  */
5522
- get selectionInputs(): (RangeInputValue & {
5523
- isFocused: boolean;
5524
- isValidRange: boolean;
5525
- })[];
5526
- get isResettable(): boolean;
5527
- get isConfirmable(): boolean;
5528
- private get hasMainFocus();
5529
- get highlights(): Highlight$1[];
5530
- focusById(rangeId: number): void;
5888
+ name: string | ((env: SpreadsheetChildEnv) => string);
5889
+ description?: string | ((env: SpreadsheetChildEnv) => string);
5531
5890
  /**
5532
- * Focus a given range or remove the focus.
5891
+ * which represents its position inside the
5892
+ * menus (the lower sequence it has, the upper it is in the menu)
5533
5893
  */
5534
- private focus;
5535
- private focusLast;
5536
- unfocus(): void;
5537
- private captureSelection;
5538
- resetWithRanges(ranges: string[]): void;
5539
- private setContent;
5894
+ sequence?: number;
5540
5895
  /**
5541
- * Insert new inputs after the given index.
5896
+ * used for example to add child
5542
5897
  */
5543
- private insertNewRange;
5898
+ id?: string;
5544
5899
  /**
5545
- * Set a new value in a given range input. If more than one value is provided,
5546
- * new inputs will be added.
5900
+ * Can be defined to compute the visibility of the item
5547
5901
  */
5548
- private setRange;
5549
- private removeRangeByIndex;
5902
+ isVisible?: (env: SpreadsheetChildEnv) => boolean;
5550
5903
  /**
5551
- * Converts highlights input format to the command format.
5552
- * The first xc in the input range will keep its color.
5553
- * Invalid ranges and ranges from other sheets than the active sheets
5554
- * are ignored.
5904
+ * Can be defined to compute if the user can click on the action
5555
5905
  */
5556
- private inputToHighlights;
5906
+ isEnabled?: (env: SpreadsheetChildEnv) => boolean;
5907
+ /**
5908
+ * Can be defined to compute if the action is active
5909
+ */
5910
+ isActive?: (env: SpreadsheetChildEnv) => boolean;
5911
+ /**
5912
+ * Can be defined to display an icon
5913
+ */
5914
+ icon?: string | ((env: SpreadsheetChildEnv) => string);
5915
+ /**
5916
+ * Can be defined to display another icon on the right of the item.
5917
+ */
5918
+ secondaryIcon?: string | ((env: SpreadsheetChildEnv) => string);
5919
+ /**
5920
+ * is the action allowed when running spreadsheet in readonly mode
5921
+ */
5922
+ isReadonlyAllowed?: boolean;
5923
+ /**
5924
+ * Execute the action. The action can return a result.
5925
+ * The result will be carried by a `menu-clicked` event to the menu parent component.
5926
+ */
5927
+ execute?: (env: SpreadsheetChildEnv) => unknown;
5928
+ /**
5929
+ * subitems associated to this item
5930
+ * NB: an action without an execute function or children is not displayed !
5931
+ */
5932
+ children?: ActionChildren;
5933
+ /**
5934
+ * whether it should add a separator below the item in menus
5935
+ * NB: a separator defined on the last item is not displayed !
5936
+ */
5937
+ separator?: boolean;
5938
+ textColor?: Color;
5939
+ onStartHover?: (env: SpreadsheetChildEnv) => void;
5940
+ onStopHover?: (env: SpreadsheetChildEnv) => void;
5941
+ }
5942
+ interface Action {
5943
+ name: (env: SpreadsheetChildEnv) => string;
5944
+ description: (env: SpreadsheetChildEnv) => string;
5945
+ sequence: number;
5946
+ id: string;
5947
+ isVisible: (env: SpreadsheetChildEnv) => boolean;
5948
+ isEnabled: (env: SpreadsheetChildEnv) => boolean;
5949
+ isActive?: (env: SpreadsheetChildEnv) => boolean;
5950
+ icon: (env: SpreadsheetChildEnv) => string;
5951
+ secondaryIcon: (env: SpreadsheetChildEnv) => string;
5952
+ isReadonlyAllowed: boolean;
5953
+ execute?: (env: SpreadsheetChildEnv) => unknown;
5954
+ children: (env: SpreadsheetChildEnv) => Action[];
5955
+ separator: boolean;
5956
+ textColor?: Color;
5957
+ onStartHover?: (env: SpreadsheetChildEnv) => void;
5958
+ onStopHover?: (env: SpreadsheetChildEnv) => void;
5959
+ }
5960
+ type ActionBuilder = (env: SpreadsheetChildEnv) => ActionSpec[];
5961
+ type ActionChildren = (ActionSpec | ActionBuilder)[];
5962
+ declare function createActions(menuItems: ActionSpec[]): Action[];
5963
+ declare function createAction(item: ActionSpec): Action;
5964
+
5965
+ interface NumberFormatActionSpec extends ActionSpec {
5966
+ format?: Format | ((env: SpreadsheetChildEnv) => Format);
5967
+ }
5968
+ /**
5969
+ * Create a format action specification for a given format.
5970
+ * The format can be dynamically computed from the environment.
5971
+ */
5972
+ declare function createFormatActionSpec({ name, format, descriptionValue, }: {
5973
+ name: string;
5974
+ descriptionValue: CellValue;
5975
+ format: Format | ((env: SpreadsheetChildEnv) => Format);
5976
+ }): NumberFormatActionSpec;
5977
+ declare const formatNumberAutomatic: NumberFormatActionSpec;
5978
+ declare const formatNumberPlainText: NumberFormatActionSpec;
5979
+ declare const formatNumberNumber: NumberFormatActionSpec;
5980
+ declare const formatPercent: ActionSpec;
5981
+ declare const formatNumberPercent: NumberFormatActionSpec;
5982
+ declare const formatNumberCurrency: NumberFormatActionSpec;
5983
+ declare const formatNumberCurrencyRounded: NumberFormatActionSpec;
5984
+ declare const EXAMPLE_DATE: CellValue;
5985
+ declare const formatCustomCurrency: ActionSpec;
5986
+ declare const formatNumberDate: NumberFormatActionSpec;
5987
+ declare const formatNumberTime: NumberFormatActionSpec;
5988
+ declare const formatNumberDateTime: NumberFormatActionSpec;
5989
+ declare const formatNumberDuration: NumberFormatActionSpec;
5990
+ declare const formatNumberQuarter: NumberFormatActionSpec;
5991
+ declare const formatNumberFullQuarter: NumberFormatActionSpec;
5992
+ declare const moreFormats: ActionSpec;
5993
+ declare const formatNumberFullDateTime: NumberFormatActionSpec;
5994
+ declare const formatNumberFullWeekDayAndMonth: NumberFormatActionSpec;
5995
+ declare const formatNumberDayAndFullMonth: NumberFormatActionSpec;
5996
+ declare const formatNumberShortWeekDay: NumberFormatActionSpec;
5997
+ declare const formatNumberDayAndShortMonth: NumberFormatActionSpec;
5998
+ declare const formatNumberFullMonth: NumberFormatActionSpec;
5999
+ declare const formatNumberShortMonth: NumberFormatActionSpec;
6000
+ declare const incraseDecimalPlaces: ActionSpec;
6001
+ declare const decraseDecimalPlaces: ActionSpec;
6002
+ declare const formatBold: ActionSpec;
6003
+ declare const formatItalic: ActionSpec;
6004
+ declare const formatUnderline: ActionSpec;
6005
+ declare const formatStrikethrough: ActionSpec;
6006
+ declare const formatFontSize: ActionSpec;
6007
+ declare const formatAlignment: ActionSpec;
6008
+ declare const formatAlignmentHorizontal: ActionSpec;
6009
+ declare const formatAlignmentLeft: ActionSpec;
6010
+ declare const formatAlignmentCenter: ActionSpec;
6011
+ declare const formatAlignmentRight: ActionSpec;
6012
+ declare const formatAlignmentVertical: ActionSpec;
6013
+ declare const formatAlignmentTop: ActionSpec;
6014
+ declare const formatAlignmentMiddle: ActionSpec;
6015
+ declare const formatAlignmentBottom: ActionSpec;
6016
+ declare const formatWrappingIcon: ActionSpec;
6017
+ declare const formatWrapping: ActionSpec;
6018
+ declare const formatWrappingOverflow: ActionSpec;
6019
+ declare const formatWrappingWrap: ActionSpec;
6020
+ declare const formatWrappingClip: ActionSpec;
6021
+ declare const textColor: ActionSpec;
6022
+ declare const fillColor: ActionSpec;
6023
+ declare const formatCF: ActionSpec;
6024
+ declare const clearFormat: ActionSpec;
6025
+
6026
+ declare const ACTION_FORMAT_EXAMPLE_DATE: typeof EXAMPLE_DATE;
6027
+ type ACTION_FORMAT_NumberFormatActionSpec = NumberFormatActionSpec;
6028
+ declare const ACTION_FORMAT_clearFormat: typeof clearFormat;
6029
+ declare const ACTION_FORMAT_createFormatActionSpec: typeof createFormatActionSpec;
6030
+ declare const ACTION_FORMAT_decraseDecimalPlaces: typeof decraseDecimalPlaces;
6031
+ declare const ACTION_FORMAT_fillColor: typeof fillColor;
6032
+ declare const ACTION_FORMAT_formatAlignment: typeof formatAlignment;
6033
+ declare const ACTION_FORMAT_formatAlignmentBottom: typeof formatAlignmentBottom;
6034
+ declare const ACTION_FORMAT_formatAlignmentCenter: typeof formatAlignmentCenter;
6035
+ declare const ACTION_FORMAT_formatAlignmentHorizontal: typeof formatAlignmentHorizontal;
6036
+ declare const ACTION_FORMAT_formatAlignmentLeft: typeof formatAlignmentLeft;
6037
+ declare const ACTION_FORMAT_formatAlignmentMiddle: typeof formatAlignmentMiddle;
6038
+ declare const ACTION_FORMAT_formatAlignmentRight: typeof formatAlignmentRight;
6039
+ declare const ACTION_FORMAT_formatAlignmentTop: typeof formatAlignmentTop;
6040
+ declare const ACTION_FORMAT_formatAlignmentVertical: typeof formatAlignmentVertical;
6041
+ declare const ACTION_FORMAT_formatBold: typeof formatBold;
6042
+ declare const ACTION_FORMAT_formatCF: typeof formatCF;
6043
+ declare const ACTION_FORMAT_formatCustomCurrency: typeof formatCustomCurrency;
6044
+ declare const ACTION_FORMAT_formatFontSize: typeof formatFontSize;
6045
+ declare const ACTION_FORMAT_formatItalic: typeof formatItalic;
6046
+ declare const ACTION_FORMAT_formatNumberAutomatic: typeof formatNumberAutomatic;
6047
+ declare const ACTION_FORMAT_formatNumberCurrency: typeof formatNumberCurrency;
6048
+ declare const ACTION_FORMAT_formatNumberCurrencyRounded: typeof formatNumberCurrencyRounded;
6049
+ declare const ACTION_FORMAT_formatNumberDate: typeof formatNumberDate;
6050
+ declare const ACTION_FORMAT_formatNumberDateTime: typeof formatNumberDateTime;
6051
+ declare const ACTION_FORMAT_formatNumberDayAndFullMonth: typeof formatNumberDayAndFullMonth;
6052
+ declare const ACTION_FORMAT_formatNumberDayAndShortMonth: typeof formatNumberDayAndShortMonth;
6053
+ declare const ACTION_FORMAT_formatNumberDuration: typeof formatNumberDuration;
6054
+ declare const ACTION_FORMAT_formatNumberFullDateTime: typeof formatNumberFullDateTime;
6055
+ declare const ACTION_FORMAT_formatNumberFullMonth: typeof formatNumberFullMonth;
6056
+ declare const ACTION_FORMAT_formatNumberFullQuarter: typeof formatNumberFullQuarter;
6057
+ declare const ACTION_FORMAT_formatNumberFullWeekDayAndMonth: typeof formatNumberFullWeekDayAndMonth;
6058
+ declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
6059
+ declare const ACTION_FORMAT_formatNumberPercent: typeof formatNumberPercent;
6060
+ declare const ACTION_FORMAT_formatNumberPlainText: typeof formatNumberPlainText;
6061
+ declare const ACTION_FORMAT_formatNumberQuarter: typeof formatNumberQuarter;
6062
+ declare const ACTION_FORMAT_formatNumberShortMonth: typeof formatNumberShortMonth;
6063
+ declare const ACTION_FORMAT_formatNumberShortWeekDay: typeof formatNumberShortWeekDay;
6064
+ declare const ACTION_FORMAT_formatNumberTime: typeof formatNumberTime;
6065
+ declare const ACTION_FORMAT_formatPercent: typeof formatPercent;
6066
+ declare const ACTION_FORMAT_formatStrikethrough: typeof formatStrikethrough;
6067
+ declare const ACTION_FORMAT_formatUnderline: typeof formatUnderline;
6068
+ declare const ACTION_FORMAT_formatWrapping: typeof formatWrapping;
6069
+ declare const ACTION_FORMAT_formatWrappingClip: typeof formatWrappingClip;
6070
+ declare const ACTION_FORMAT_formatWrappingIcon: typeof formatWrappingIcon;
6071
+ declare const ACTION_FORMAT_formatWrappingOverflow: typeof formatWrappingOverflow;
6072
+ declare const ACTION_FORMAT_formatWrappingWrap: typeof formatWrappingWrap;
6073
+ declare const ACTION_FORMAT_incraseDecimalPlaces: typeof incraseDecimalPlaces;
6074
+ declare const ACTION_FORMAT_moreFormats: typeof moreFormats;
6075
+ declare const ACTION_FORMAT_textColor: typeof textColor;
6076
+ declare namespace ACTION_FORMAT {
6077
+ export {
6078
+ ACTION_FORMAT_EXAMPLE_DATE as EXAMPLE_DATE,
6079
+ ACTION_FORMAT_NumberFormatActionSpec as NumberFormatActionSpec,
6080
+ ACTION_FORMAT_clearFormat as clearFormat,
6081
+ ACTION_FORMAT_createFormatActionSpec as createFormatActionSpec,
6082
+ ACTION_FORMAT_decraseDecimalPlaces as decraseDecimalPlaces,
6083
+ ACTION_FORMAT_fillColor as fillColor,
6084
+ ACTION_FORMAT_formatAlignment as formatAlignment,
6085
+ ACTION_FORMAT_formatAlignmentBottom as formatAlignmentBottom,
6086
+ ACTION_FORMAT_formatAlignmentCenter as formatAlignmentCenter,
6087
+ ACTION_FORMAT_formatAlignmentHorizontal as formatAlignmentHorizontal,
6088
+ ACTION_FORMAT_formatAlignmentLeft as formatAlignmentLeft,
6089
+ ACTION_FORMAT_formatAlignmentMiddle as formatAlignmentMiddle,
6090
+ ACTION_FORMAT_formatAlignmentRight as formatAlignmentRight,
6091
+ ACTION_FORMAT_formatAlignmentTop as formatAlignmentTop,
6092
+ ACTION_FORMAT_formatAlignmentVertical as formatAlignmentVertical,
6093
+ ACTION_FORMAT_formatBold as formatBold,
6094
+ ACTION_FORMAT_formatCF as formatCF,
6095
+ ACTION_FORMAT_formatCustomCurrency as formatCustomCurrency,
6096
+ ACTION_FORMAT_formatFontSize as formatFontSize,
6097
+ ACTION_FORMAT_formatItalic as formatItalic,
6098
+ ACTION_FORMAT_formatNumberAutomatic as formatNumberAutomatic,
6099
+ ACTION_FORMAT_formatNumberCurrency as formatNumberCurrency,
6100
+ ACTION_FORMAT_formatNumberCurrencyRounded as formatNumberCurrencyRounded,
6101
+ ACTION_FORMAT_formatNumberDate as formatNumberDate,
6102
+ ACTION_FORMAT_formatNumberDateTime as formatNumberDateTime,
6103
+ ACTION_FORMAT_formatNumberDayAndFullMonth as formatNumberDayAndFullMonth,
6104
+ ACTION_FORMAT_formatNumberDayAndShortMonth as formatNumberDayAndShortMonth,
6105
+ ACTION_FORMAT_formatNumberDuration as formatNumberDuration,
6106
+ ACTION_FORMAT_formatNumberFullDateTime as formatNumberFullDateTime,
6107
+ ACTION_FORMAT_formatNumberFullMonth as formatNumberFullMonth,
6108
+ ACTION_FORMAT_formatNumberFullQuarter as formatNumberFullQuarter,
6109
+ ACTION_FORMAT_formatNumberFullWeekDayAndMonth as formatNumberFullWeekDayAndMonth,
6110
+ ACTION_FORMAT_formatNumberNumber as formatNumberNumber,
6111
+ ACTION_FORMAT_formatNumberPercent as formatNumberPercent,
6112
+ ACTION_FORMAT_formatNumberPlainText as formatNumberPlainText,
6113
+ ACTION_FORMAT_formatNumberQuarter as formatNumberQuarter,
6114
+ ACTION_FORMAT_formatNumberShortMonth as formatNumberShortMonth,
6115
+ ACTION_FORMAT_formatNumberShortWeekDay as formatNumberShortWeekDay,
6116
+ ACTION_FORMAT_formatNumberTime as formatNumberTime,
6117
+ ACTION_FORMAT_formatPercent as formatPercent,
6118
+ ACTION_FORMAT_formatStrikethrough as formatStrikethrough,
6119
+ ACTION_FORMAT_formatUnderline as formatUnderline,
6120
+ ACTION_FORMAT_formatWrapping as formatWrapping,
6121
+ ACTION_FORMAT_formatWrappingClip as formatWrappingClip,
6122
+ ACTION_FORMAT_formatWrappingIcon as formatWrappingIcon,
6123
+ ACTION_FORMAT_formatWrappingOverflow as formatWrappingOverflow,
6124
+ ACTION_FORMAT_formatWrappingWrap as formatWrappingWrap,
6125
+ ACTION_FORMAT_incraseDecimalPlaces as incraseDecimalPlaces,
6126
+ ACTION_FORMAT_moreFormats as moreFormats,
6127
+ ACTION_FORMAT_textColor as textColor,
6128
+ };
6129
+ }
6130
+
6131
+ type CellPopoverType = "ErrorToolTip" | "LinkDisplay" | "FilterMenu" | "LinkEditor";
6132
+ type PopoverPropsPosition = "TopRight" | "BottomLeft";
6133
+ type MaxSizedComponentConstructor = ComponentConstructor & {
6134
+ maxSize?: {
6135
+ maxWidth?: number;
6136
+ maxHeight?: number;
6137
+ };
6138
+ };
6139
+ /**
6140
+ * If the cell at the given position have an associated component (linkDisplay, errorTooltip, ...),
6141
+ * returns the parameters to display the component
6142
+ */
6143
+ type CellPopoverBuilder = (position: CellPosition, getters: Getters) => CellPopoverComponent<MaxSizedComponentConstructor>;
6144
+ interface PopoverBuilders {
6145
+ onOpen?: CellPopoverBuilder;
6146
+ onHover?: CellPopoverBuilder;
6147
+ }
6148
+ interface ClosedCellPopover {
6149
+ isOpen: false;
6150
+ }
6151
+ interface OpenCellPopover {
6152
+ isOpen: true;
6153
+ type: CellPopoverType;
6154
+ col: number;
6155
+ row: number;
6156
+ }
6157
+ /**
6158
+ * Description of a cell component.
6159
+ * i.e. which component class, which props and where to
6160
+ * display it relative to the cell
6161
+ */
6162
+ type OpenCellPopoverComponent<C extends ComponentConstructor> = {
6163
+ isOpen: true;
6164
+ Component: C;
6165
+ props: PropsOf<C>;
6166
+ cellCorner: PopoverPropsPosition;
6167
+ };
6168
+ type CellPopoverComponent<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = ClosedCellPopover | OpenCellPopoverComponent<C>;
6169
+ type PositionedCellPopoverComponent<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = {
6170
+ isOpen: true;
6171
+ Component: C;
6172
+ props: PropsOf<C>;
6173
+ anchorRect: Rect;
6174
+ cellCorner: PopoverPropsPosition;
6175
+ };
6176
+
6177
+ interface LinkSpec {
6178
+ readonly match: (url: string) => boolean;
6179
+ readonly createLink: (url: string, label: string) => Link;
6180
+ /**
6181
+ * String used to display the URL in components.
6182
+ * Particularly useful for special links (sheet, etc.)
6183
+ * - a simple web link displays the raw url
6184
+ * - a link to a sheet displays the sheet name
6185
+ */
6186
+ readonly urlRepresentation: (url: string, getters: Getters) => string;
6187
+ readonly open: (url: string, env: SpreadsheetChildEnv) => void;
6188
+ readonly sequence: number;
6189
+ }
6190
+ declare function urlRepresentation(link: Link, getters: Getters): string;
6191
+ declare function openLink(link: Link, env: SpreadsheetChildEnv): void;
6192
+
6193
+ type TransformationFunction<U extends CoreCommandTypes, V extends CoreCommandTypes> = (toTransform: Extract<CoreCommand, {
6194
+ type: U;
6195
+ }>, executed: Extract<CoreCommand, {
6196
+ type: V;
6197
+ }>) => CoreCommand | undefined;
6198
+ declare class OTRegistry extends Registry<Map<CoreCommandTypes, TransformationFunction<CoreCommandTypes, CoreCommandTypes>>> {
6199
+ /**
6200
+ * Add a transformation function to the registry. When the executed command
6201
+ * happened, all the commands in toTransforms should be transformed using the
6202
+ * transformation function given
6203
+ */
6204
+ addTransformation<U extends CoreCommandTypes, V extends CoreCommandTypes>(executed: U, toTransforms: V[], fn: TransformationFunction<CoreCommandTypes, CoreCommandTypes>): this;
6205
+ /**
6206
+ * Get the transformation function to transform the command toTransform, after
6207
+ * that the executed command happened.
6208
+ */
6209
+ getTransformation<U extends CoreCommandTypes, V extends CoreCommandTypes>(toTransform: U, executed: V): TransformationFunction<CoreCommandTypes, CoreCommandTypes> | undefined;
6210
+ }
6211
+
6212
+ interface CellClickableItem {
6213
+ condition: (position: CellPosition, getters: Getters) => boolean;
6214
+ execute: (position: CellPosition, env: SpreadsheetChildEnv) => void;
6215
+ sequence: number;
6216
+ }
6217
+
6218
+ interface TopbarComponent {
6219
+ id: UID;
6220
+ component: any;
6221
+ isVisible?: (env: SpreadsheetChildEnv) => boolean;
6222
+ }
6223
+
6224
+ /**
6225
+ * Instantiate a chart object based on a definition
6226
+ */
6227
+ interface ChartBuilder {
6228
+ /**
6229
+ * Check if this factory should be used
6230
+ */
6231
+ match: (type: ChartType) => boolean;
6232
+ createChart: (definition: ChartDefinition, sheetId: UID, getters: CoreGetters) => AbstractChart;
6233
+ getChartRuntime: (chart: AbstractChart, getters: Getters) => ChartRuntime;
6234
+ validateChartDefinition(validator: Validator, definition: ChartDefinition): CommandResult | CommandResult[];
6235
+ transformDefinition(definition: ChartDefinition, executed: AddColumnsRowsCommand | RemoveColumnsRowsCommand): ChartDefinition;
6236
+ getChartDefinitionFromContextCreation(context: ChartCreationContext): ChartDefinition;
6237
+ name: string;
6238
+ sequence: number;
6239
+ }
6240
+
6241
+ interface Props$Z {
6242
+ label?: string;
6243
+ value: boolean;
6244
+ className?: string;
6245
+ name?: string;
6246
+ title?: string;
6247
+ disabled?: boolean;
6248
+ onChange: (value: boolean) => void;
6249
+ }
6250
+ declare class Checkbox extends Component<Props$Z, SpreadsheetChildEnv> {
6251
+ static template: string;
6252
+ static props: {
6253
+ label: {
6254
+ type: StringConstructor;
6255
+ optional: boolean;
6256
+ };
6257
+ value: {
6258
+ type: BooleanConstructor;
6259
+ optional: boolean;
6260
+ };
6261
+ className: {
6262
+ type: StringConstructor;
6263
+ optional: boolean;
6264
+ };
6265
+ name: {
6266
+ type: StringConstructor;
6267
+ optional: boolean;
6268
+ };
6269
+ title: {
6270
+ type: StringConstructor;
6271
+ optional: boolean;
6272
+ };
6273
+ disabled: {
6274
+ type: BooleanConstructor;
6275
+ optional: boolean;
6276
+ };
6277
+ onChange: FunctionConstructor;
6278
+ };
6279
+ static defaultProps: {
6280
+ value: boolean;
6281
+ };
6282
+ onChange(ev: InputEvent): void;
6283
+ }
6284
+
6285
+ interface Props$Y {
6286
+ class?: string;
6287
+ }
6288
+ declare class Section extends Component<Props$Y, SpreadsheetChildEnv> {
6289
+ static template: string;
6290
+ static props: {
6291
+ class: {
6292
+ type: StringConstructor;
6293
+ optional: boolean;
6294
+ };
6295
+ slots: ObjectConstructor;
6296
+ };
6297
+ }
6298
+
6299
+ declare class SpreadsheetStore extends DisposableStore {
6300
+ protected model: Model;
6301
+ protected getters: Getters;
6302
+ private renderer;
6303
+ constructor(get: Get);
6304
+ get renderingLayers(): Readonly<LayerName[]>;
6305
+ protected handle(cmd: Command): void;
6306
+ protected finalize(): void;
6307
+ drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
6308
+ }
6309
+
6310
+ interface HighlightProvider {
6311
+ highlights: Highlight$1[];
6312
+ }
6313
+ declare class HighlightStore extends SpreadsheetStore {
6314
+ mutators: readonly ["register", "unRegister"];
6315
+ private providers;
6316
+ constructor(get: Get);
6317
+ get renderingLayers(): readonly ["Highlights"];
6318
+ get highlights(): Highlight$1[];
6319
+ register(highlightProvider: HighlightProvider): void;
6320
+ unRegister(highlightProvider: HighlightProvider): void;
6321
+ drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
6322
+ }
6323
+
6324
+ interface RangeInputValue {
6325
+ id: number;
6326
+ xc: string;
6327
+ color: Color;
6328
+ }
6329
+ /**
6330
+ * Selection input Plugin
6331
+ *
6332
+ * The SelectionInput component input and output are both arrays of strings, but
6333
+ * it requires an intermediary internal state to work.
6334
+ * This plugin handles this internal state.
6335
+ */
6336
+ declare class SelectionInputStore extends SpreadsheetStore {
6337
+ private initialRanges;
6338
+ private readonly inputHasSingleRange;
6339
+ private readonly colors;
6340
+ mutators: readonly ["resetWithRanges", "focusById", "unfocus", "addEmptyRange", "removeRange", "changeRange", "reset", "confirm"];
6341
+ ranges: RangeInputValue[];
6342
+ focusedRangeIndex: number | null;
6343
+ private inputSheetId;
6344
+ private focusStore;
6345
+ protected highlightStore: {
6346
+ readonly register: (highlightProvider: HighlightProvider) => void;
6347
+ readonly unRegister: (highlightProvider: HighlightProvider) => void;
6348
+ readonly mutators: readonly ["register", "unRegister"];
6349
+ readonly renderingLayers: readonly ["Highlights"];
6350
+ readonly highlights: Highlight$1[];
6351
+ };
6352
+ constructor(get: Get, initialRanges?: string[], inputHasSingleRange?: boolean, colors?: Color[]);
6353
+ handleEvent(event: SelectionEvent): void;
6354
+ handle(cmd: Command): void;
6355
+ changeRange(rangeId: number, value: string): void;
6356
+ addEmptyRange(): void;
6357
+ removeRange(rangeId: number): void;
6358
+ confirm(): void;
6359
+ reset(): void;
6360
+ get selectionInputValues(): string[];
6361
+ /**
6362
+ * Return a list of all valid XCs.
6363
+ * e.g. ["A1", "Sheet2!B3", "E12"]
6364
+ */
6365
+ get selectionInputs(): (RangeInputValue & {
6366
+ isFocused: boolean;
6367
+ isValidRange: boolean;
6368
+ })[];
6369
+ get isResettable(): boolean;
6370
+ get isConfirmable(): boolean;
6371
+ private get hasMainFocus();
6372
+ get highlights(): Highlight$1[];
6373
+ focusById(rangeId: number): void;
6374
+ /**
6375
+ * Focus a given range or remove the focus.
6376
+ */
6377
+ private focus;
6378
+ private focusLast;
6379
+ unfocus(): void;
6380
+ private captureSelection;
6381
+ resetWithRanges(ranges: string[]): void;
6382
+ private setContent;
6383
+ /**
6384
+ * Insert new inputs after the given index.
6385
+ */
6386
+ private insertNewRange;
6387
+ /**
6388
+ * Set a new value in a given range input. If more than one value is provided,
6389
+ * new inputs will be added.
6390
+ */
6391
+ private setRange;
6392
+ private removeRangeByIndex;
6393
+ /**
6394
+ * Converts highlights input format to the command format.
6395
+ * The first xc in the input range will keep its color.
6396
+ * Invalid ranges and ranges from other sheets than the active sheets
6397
+ * are ignored.
6398
+ */
6399
+ private inputToHighlights;
5557
6400
  private cleanInputs;
5558
6401
  /**
5559
6402
  * Check if a cell or range reference should be highlighted.
@@ -5570,7 +6413,7 @@ declare class SelectionInputStore extends SpreadsheetStore {
5570
6413
  getIndex(rangeId: number | null): number | null;
5571
6414
  }
5572
6415
 
5573
- interface Props$Q {
6416
+ interface Props$X {
5574
6417
  ranges: string[];
5575
6418
  hasSingleRange?: boolean;
5576
6419
  required?: boolean;
@@ -5578,6 +6421,7 @@ interface Props$Q {
5578
6421
  class?: string;
5579
6422
  onSelectionChanged?: (ranges: string[]) => void;
5580
6423
  onSelectionConfirmed?: () => void;
6424
+ colors?: Color[];
5581
6425
  }
5582
6426
  interface SelectionRange extends Omit<RangeInputValue, "color"> {
5583
6427
  isFocused: boolean;
@@ -5592,7 +6436,7 @@ interface SelectionRange extends Omit<RangeInputValue, "color"> {
5592
6436
  * onSelectionChanged is called every time the input value
5593
6437
  * changes.
5594
6438
  */
5595
- declare class SelectionInput extends Component<Props$Q, SpreadsheetChildEnv> {
6439
+ declare class SelectionInput extends Component<Props$X, SpreadsheetChildEnv> {
5596
6440
  static template: string;
5597
6441
  static props: {
5598
6442
  ranges: ArrayConstructor;
@@ -5620,6 +6464,11 @@ declare class SelectionInput extends Component<Props$Q, SpreadsheetChildEnv> {
5620
6464
  type: FunctionConstructor;
5621
6465
  optional: boolean;
5622
6466
  };
6467
+ colors: {
6468
+ type: ArrayConstructor;
6469
+ optional: boolean;
6470
+ default: never[];
6471
+ };
5623
6472
  };
5624
6473
  private state;
5625
6474
  private focusedInput;
@@ -5642,84 +6491,13 @@ declare class SelectionInput extends Component<Props$Q, SpreadsheetChildEnv> {
5642
6491
  confirm(): void;
5643
6492
  }
5644
6493
 
5645
- interface Props$P {
5646
- messages: string[];
5647
- msgType: "warning" | "error";
5648
- }
5649
- declare class ValidationMessages extends Component<Props$P, SpreadsheetChildEnv> {
5650
- static template: string;
5651
- static props: {
5652
- messages: ArrayConstructor;
5653
- msgType: StringConstructor;
5654
- };
5655
- get divClasses(): "o-validation-warning text-warning" | "o-validation-error text-danger";
5656
- }
5657
-
5658
- interface Props$O {
5659
- label?: string;
5660
- value: boolean;
5661
- className?: string;
5662
- name?: string;
5663
- title?: string;
5664
- disabled?: boolean;
5665
- onChange: (value: boolean) => void;
5666
- }
5667
- declare class Checkbox extends Component<Props$O, SpreadsheetChildEnv> {
5668
- static template: string;
5669
- static props: {
5670
- label: {
5671
- type: StringConstructor;
5672
- optional: boolean;
5673
- };
5674
- value: {
5675
- type: BooleanConstructor;
5676
- optional: boolean;
5677
- };
5678
- className: {
5679
- type: StringConstructor;
5680
- optional: boolean;
5681
- };
5682
- name: {
5683
- type: StringConstructor;
5684
- optional: boolean;
5685
- };
5686
- title: {
5687
- type: StringConstructor;
5688
- optional: boolean;
5689
- };
5690
- disabled: {
5691
- type: BooleanConstructor;
5692
- optional: boolean;
5693
- };
5694
- onChange: FunctionConstructor;
5695
- };
5696
- static defaultProps: {
5697
- value: boolean;
5698
- };
5699
- onChange(ev: InputEvent): void;
5700
- }
5701
-
5702
- interface Props$N {
5703
- class?: string;
5704
- }
5705
- declare class Section extends Component<Props$N, SpreadsheetChildEnv> {
5706
- static template: string;
5707
- static props: {
5708
- class: {
5709
- type: StringConstructor;
5710
- optional: boolean;
5711
- };
5712
- slots: ObjectConstructor;
5713
- };
5714
- }
5715
-
5716
- interface Props$M {
5717
- ranges: string[];
6494
+ interface Props$W {
6495
+ ranges: CustomizedDataSet[];
5718
6496
  hasSingleRange?: boolean;
5719
6497
  onSelectionChanged: (ranges: string[]) => void;
5720
6498
  onSelectionConfirmed: () => void;
5721
6499
  }
5722
- declare class ChartDataSeries extends Component<Props$M, SpreadsheetChildEnv> {
6500
+ declare class ChartDataSeries extends Component<Props$W, SpreadsheetChildEnv> {
5723
6501
  static template: string;
5724
6502
  static components: {
5725
6503
  SelectionInput: typeof SelectionInput;
@@ -5734,13 +6512,28 @@ declare class ChartDataSeries extends Component<Props$M, SpreadsheetChildEnv> {
5734
6512
  onSelectionChanged: FunctionConstructor;
5735
6513
  onSelectionConfirmed: FunctionConstructor;
5736
6514
  };
6515
+ get ranges(): string[];
6516
+ get colors(): (Color | undefined)[];
5737
6517
  get title(): string;
5738
6518
  }
5739
6519
 
5740
- interface Props$L {
6520
+ interface Props$V {
6521
+ messages: string[];
6522
+ msgType: "warning" | "error";
6523
+ }
6524
+ declare class ValidationMessages extends Component<Props$V, SpreadsheetChildEnv> {
6525
+ static template: string;
6526
+ static props: {
6527
+ messages: ArrayConstructor;
6528
+ msgType: StringConstructor;
6529
+ };
6530
+ get divClasses(): "o-validation-warning text-warning" | "o-validation-error text-danger";
6531
+ }
6532
+
6533
+ interface Props$U {
5741
6534
  messages: string[];
5742
6535
  }
5743
- declare class ChartErrorSection extends Component<Props$L, SpreadsheetChildEnv> {
6536
+ declare class ChartErrorSection extends Component<Props$U, SpreadsheetChildEnv> {
5744
6537
  static template: string;
5745
6538
  static components: {
5746
6539
  Section: typeof Section;
@@ -5754,7 +6547,7 @@ declare class ChartErrorSection extends Component<Props$L, SpreadsheetChildEnv>
5754
6547
  };
5755
6548
  }
5756
6549
 
5757
- interface Props$K {
6550
+ interface Props$T {
5758
6551
  title?: string;
5759
6552
  range: string;
5760
6553
  isInvalid: boolean;
@@ -5768,7 +6561,7 @@ interface Props$K {
5768
6561
  onChange: (value: boolean) => void;
5769
6562
  }>;
5770
6563
  }
5771
- declare class ChartLabelRange extends Component<Props$K, SpreadsheetChildEnv> {
6564
+ declare class ChartLabelRange extends Component<Props$T, SpreadsheetChildEnv> {
5772
6565
  static template: string;
5773
6566
  static components: {
5774
6567
  SelectionInput: typeof SelectionInput;
@@ -5793,20 +6586,18 @@ declare class ChartLabelRange extends Component<Props$K, SpreadsheetChildEnv> {
5793
6586
  optional: boolean;
5794
6587
  };
5795
6588
  };
5796
- static defaultProps: Partial<Props$K>;
6589
+ static defaultProps: Partial<Props$T>;
5797
6590
  }
5798
6591
 
5799
- interface Props$J {
6592
+ interface Props$S {
5800
6593
  figureId: UID;
5801
- definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
5802
- canUpdateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5803
- updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
6594
+ definition: ChartWithAxisDefinition;
6595
+ canUpdateChart: (figureId: UID, definition: Partial<ChartWithAxisDefinition>) => DispatchResult;
6596
+ updateChart: (figureId: UID, definition: Partial<ChartWithAxisDefinition>) => DispatchResult;
5804
6597
  }
5805
- declare class LineBarPieConfigPanel extends Component<Props$J, SpreadsheetChildEnv> {
6598
+ declare class GenericChartConfigPanel extends Component<Props$S, SpreadsheetChildEnv> {
5806
6599
  static template: string;
5807
6600
  static components: {
5808
- SelectionInput: typeof SelectionInput;
5809
- ValidationMessages: typeof ValidationMessages;
5810
6601
  ChartDataSeries: typeof ChartDataSeries;
5811
6602
  ChartLabelRange: typeof ChartLabelRange;
5812
6603
  Section: typeof Section;
@@ -5840,7 +6631,7 @@ declare class LineBarPieConfigPanel extends Component<Props$J, SpreadsheetChildE
5840
6631
  */
5841
6632
  onDataSeriesRangesChanged(ranges: string[]): void;
5842
6633
  onDataSeriesConfirmed(): void;
5843
- getDataSeriesRanges(): string[];
6634
+ getDataSeriesRanges(): CustomizedDataSet[];
5844
6635
  /**
5845
6636
  * Change the local labelRange. The model should be updated when the
5846
6637
  * button "confirm" is clicked
@@ -5852,13 +6643,29 @@ declare class LineBarPieConfigPanel extends Component<Props$J, SpreadsheetChildE
5852
6643
  calculateHeaderPosition(): number | undefined;
5853
6644
  }
5854
6645
 
5855
- declare class BarConfigPanel extends LineBarPieConfigPanel {
6646
+ declare class BarConfigPanel extends GenericChartConfigPanel {
5856
6647
  static template: string;
5857
6648
  get stackedLabel(): string;
5858
6649
  onUpdateStacked(stacked: boolean): void;
5859
6650
  onUpdateAggregated(aggregated: boolean): void;
5860
6651
  }
5861
6652
 
6653
+ declare class SidePanelCollapsible extends Component {
6654
+ static template: string;
6655
+ static props: {
6656
+ slots: ObjectConstructor;
6657
+ collapsedAtInit: {
6658
+ type: BooleanConstructor;
6659
+ optional: boolean;
6660
+ };
6661
+ class: {
6662
+ type: StringConstructor;
6663
+ optional: boolean;
6664
+ };
6665
+ };
6666
+ currentId: string;
6667
+ }
6668
+
5862
6669
  declare enum ComponentsImportance {
5863
6670
  Grid = 0,
5864
6671
  Highlight = 5,
@@ -6002,7 +6809,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
6002
6809
  isSameColor(color1: Color, color2: Color): boolean;
6003
6810
  }
6004
6811
 
6005
- interface Props$I {
6812
+ interface Props$R {
6006
6813
  currentColor: string | undefined;
6007
6814
  toggleColorPicker: () => void;
6008
6815
  showColorPicker: boolean;
@@ -6013,7 +6820,7 @@ interface Props$I {
6013
6820
  dropdownMaxHeight?: Pixel;
6014
6821
  class?: string;
6015
6822
  }
6016
- declare class ColorPickerWidget extends Component<Props$I, SpreadsheetChildEnv> {
6823
+ declare class ColorPickerWidget extends Component<Props$R, SpreadsheetChildEnv> {
6017
6824
  static template: string;
6018
6825
  static props: {
6019
6826
  currentColor: {
@@ -6051,77 +6858,203 @@ declare class ColorPickerWidget extends Component<Props$I, SpreadsheetChildEnv>
6051
6858
  get colorPickerAnchorRect(): Rect;
6052
6859
  }
6053
6860
 
6054
- interface Props$H {
6861
+ interface Props$Q {
6055
6862
  currentColor?: string;
6056
6863
  onColorPicked: (color: string) => void;
6864
+ title?: string;
6057
6865
  }
6058
- declare class ChartColor extends Component<Props$H, SpreadsheetChildEnv> {
6866
+ declare class RoundColorPicker extends Component<Props$Q, SpreadsheetChildEnv> {
6059
6867
  static template: string;
6060
6868
  static components: {
6061
6869
  ColorPickerWidget: typeof ColorPickerWidget;
6062
6870
  Section: typeof Section;
6871
+ ColorPicker: typeof ColorPicker;
6063
6872
  };
6064
6873
  static props: {
6065
6874
  currentColor: {
6066
6875
  type: StringConstructor;
6067
6876
  optional: boolean;
6068
6877
  };
6069
- onColorPicked: FunctionConstructor;
6878
+ title: {
6879
+ type: StringConstructor;
6880
+ optional: boolean;
6881
+ };
6882
+ onColorPicked: FunctionConstructor;
6883
+ };
6884
+ colorPickerButtonRef: {
6885
+ el: HTMLElement | null;
6886
+ };
6887
+ private state;
6888
+ setup(): void;
6889
+ closePicker(): void;
6890
+ togglePicker(): void;
6891
+ onColorPicked(color: string): void;
6892
+ get colorPickerAnchorRect(): Rect;
6893
+ get buttonStyle(): string;
6894
+ }
6895
+
6896
+ interface Props$P {
6897
+ title: string;
6898
+ updateTitle: (title: string) => void;
6899
+ name?: string;
6900
+ toggleItalic?: () => void;
6901
+ toggleBold?: () => void;
6902
+ updateAlignment?: (string: any) => void;
6903
+ updateColor?: (Color: any) => void;
6904
+ style: TitleDesign;
6905
+ }
6906
+ declare class ChartTitle extends Component<Props$P, SpreadsheetChildEnv> {
6907
+ static template: string;
6908
+ static components: {
6909
+ Section: typeof Section;
6910
+ ColorPickerWidget: typeof ColorPickerWidget;
6911
+ };
6912
+ static props: {
6913
+ title: StringConstructor;
6914
+ updateTitle: FunctionConstructor;
6915
+ name: {
6916
+ type: StringConstructor;
6917
+ optional: boolean;
6918
+ };
6919
+ toggleItalic: {
6920
+ type: FunctionConstructor;
6921
+ optional: boolean;
6922
+ };
6923
+ toggleBold: {
6924
+ type: FunctionConstructor;
6925
+ optional: boolean;
6926
+ };
6927
+ updateAlignment: {
6928
+ type: FunctionConstructor;
6929
+ optional: boolean;
6930
+ };
6931
+ updateColor: {
6932
+ type: FunctionConstructor;
6933
+ optional: boolean;
6934
+ };
6935
+ style: {
6936
+ type: ObjectConstructor;
6937
+ optional: boolean;
6938
+ };
6070
6939
  };
6071
- private state;
6940
+ openedEl: HTMLElement | null;
6072
6941
  setup(): void;
6073
- closePicker(): void;
6074
- togglePicker(): void;
6942
+ state: {
6943
+ activeTool: string;
6944
+ };
6945
+ updateTitle(ev: InputEvent): void;
6946
+ toggleDropdownTool(tool: string, ev: MouseEvent): void;
6947
+ /**
6948
+ * TODO: This is clearly not a goot way to handle external click, but
6949
+ * we currently have no other way to do it ... Should be done in
6950
+ * another task to handle the fact we want only one menu opened at a
6951
+ * time with something like a menuStore ?
6952
+ */
6953
+ onExternalClick(ev: MouseEvent): void;
6954
+ onColorPicked(color: Color): void;
6955
+ updateAlignment(aligment: "left" | "center" | "right"): void;
6956
+ closeMenus(): void;
6075
6957
  }
6076
6958
 
6077
- interface Props$G {
6078
- title: string;
6079
- update: (title: string) => void;
6959
+ interface AxisDefinition {
6960
+ id: string;
6961
+ name: string;
6962
+ }
6963
+ interface Props$O {
6964
+ figureId: UID;
6965
+ definition: ChartWithAxisDefinition | WaterfallChartDefinition;
6966
+ updateChart: (figureId: UID, definition: Partial<ChartWithAxisDefinition | WaterfallChartDefinition>) => DispatchResult;
6967
+ axesList: AxisDefinition[];
6080
6968
  }
6081
- declare class ChartTitle extends Component<Props$G, SpreadsheetChildEnv> {
6969
+ declare class AxisDesignEditor extends Component<Props$O, SpreadsheetChildEnv> {
6082
6970
  static template: string;
6083
6971
  static components: {
6084
6972
  Section: typeof Section;
6973
+ ChartTitle: typeof ChartTitle;
6085
6974
  };
6086
- static props: {
6087
- title: StringConstructor;
6088
- update: FunctionConstructor;
6975
+ state: {
6976
+ currentAxis: string;
6089
6977
  };
6090
- updateTitle(ev: InputEvent): void;
6978
+ get axisTitleStyle(): TitleDesign;
6979
+ updateAxisTitleColor(color: Color): void;
6980
+ toggleBoldAxisTitle(): void;
6981
+ toggleItalicAxisTitle(): void;
6982
+ updateAxisTitleAlignment(align: "left" | "center" | "right"): void;
6983
+ updateAxisEditor(ev: any): void;
6984
+ getAxisTitle(): any;
6985
+ updateAxisTitle(text: string): void;
6091
6986
  }
6092
6987
 
6093
- interface Props$F {
6988
+ interface Props$N {
6094
6989
  figureId: UID;
6095
- definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
6096
- canUpdateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
6097
- updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
6990
+ definition: ChartDefinition;
6991
+ updateChart: (figureId: UID, definition: Partial<ChartDefinition>) => DispatchResult;
6098
6992
  }
6099
- declare class LineBarPieDesignPanel extends Component<Props$F, SpreadsheetChildEnv> {
6993
+ declare class GeneralDesignEditor extends Component<Props$N, SpreadsheetChildEnv> {
6100
6994
  static template: string;
6101
6995
  static components: {
6102
- ChartColor: typeof ChartColor;
6996
+ RoundColorPicker: typeof RoundColorPicker;
6103
6997
  ChartTitle: typeof ChartTitle;
6104
6998
  Section: typeof Section;
6999
+ SidePanelCollapsible: typeof SidePanelCollapsible;
6105
7000
  };
6106
7001
  static props: {
6107
7002
  figureId: StringConstructor;
6108
7003
  definition: ObjectConstructor;
6109
7004
  updateChart: FunctionConstructor;
6110
- canUpdateChart: FunctionConstructor;
7005
+ slots: {
7006
+ type: ObjectConstructor;
7007
+ optional: boolean;
7008
+ };
6111
7009
  };
6112
- get title(): string;
7010
+ private state;
7011
+ setup(): void;
7012
+ get title(): TitleDesign;
7013
+ toggleDropdownTool(tool: string, ev: MouseEvent): void;
6113
7014
  updateBackgroundColor(color: Color): void;
6114
- updateTitle(title: string): void;
6115
- updateSelect(attr: string, ev: any): void;
7015
+ updateTitle(newTitle: string): void;
7016
+ get titleStyle(): TitleDesign;
7017
+ updateChartTitleColor(color: Color): void;
7018
+ toggleBoldChartTitle(): void;
7019
+ toggleItalicChartTitle(): void;
7020
+ updateChartTitleAlignment(align: "left" | "center" | "right"): void;
6116
7021
  }
6117
7022
 
6118
- interface Props$E {
7023
+ interface Props$M {
7024
+ figureId: UID;
7025
+ definition: ChartWithAxisDefinition;
7026
+ canUpdateChart: (figureID: UID, definition: Partial<ChartWithAxisDefinition>) => DispatchResult;
7027
+ updateChart: (figureId: UID, definition: Partial<ChartWithAxisDefinition>) => DispatchResult;
7028
+ }
7029
+ declare class ChartWithAxisDesignPanel extends Component<Props$M, SpreadsheetChildEnv> {
7030
+ static template: string;
7031
+ static components: {
7032
+ GeneralDesignEditor: typeof GeneralDesignEditor;
7033
+ SidePanelCollapsible: typeof SidePanelCollapsible;
7034
+ Section: typeof Section;
7035
+ AxisDesignEditor: typeof AxisDesignEditor;
7036
+ RoundColorPicker: typeof RoundColorPicker;
7037
+ };
7038
+ private state;
7039
+ get axesList(): AxisDefinition[];
7040
+ updateLegendPosition(ev: any): void;
7041
+ getDataSeries(): (string | undefined)[];
7042
+ updateSerieEditor(ev: any): void;
7043
+ updateDataSeriesColor(color: string): void;
7044
+ getDataSerieColor(): "" | Color;
7045
+ updateDataSeriesAxis(ev: any): void;
7046
+ getDataSerieAxis(): "left" | "right";
7047
+ updateDataSeriesLabel(ev: any): void;
7048
+ getDataSerieLabel(): string | undefined;
7049
+ }
7050
+
7051
+ interface Props$L {
6119
7052
  figureId: UID;
6120
7053
  definition: GaugeChartDefinition;
6121
7054
  canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
6122
7055
  updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
6123
7056
  }
6124
- declare class GaugeChartConfigPanel extends Component<Props$E, SpreadsheetChildEnv> {
7057
+ declare class GaugeChartConfigPanel extends Component<Props$L, SpreadsheetChildEnv> {
6125
7058
  static template: string;
6126
7059
  static components: {
6127
7060
  ChartErrorSection: typeof ChartErrorSection;
@@ -6139,49 +7072,53 @@ declare class GaugeChartConfigPanel extends Component<Props$E, SpreadsheetChildE
6139
7072
  get isDataRangeInvalid(): boolean;
6140
7073
  onDataRangeChanged(ranges: string[]): void;
6141
7074
  updateDataRange(): void;
6142
- getDataRange(): string;
7075
+ getDataRange(): CustomizedDataSet;
6143
7076
  }
6144
7077
 
6145
- type GaugeMenu = "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
6146
- interface Props$D {
7078
+ interface PanelState {
7079
+ sectionRuleDispatchResult?: DispatchResult;
7080
+ sectionRule: SectionRule;
7081
+ }
7082
+ interface Props$K {
6147
7083
  figureId: UID;
6148
7084
  definition: GaugeChartDefinition;
6149
- canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
7085
+ canUpdateChart: (figureID: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
6150
7086
  updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
6151
7087
  }
6152
- declare class GaugeChartDesignPanel extends Component<Props$D, SpreadsheetChildEnv> {
7088
+ declare class GaugeChartDesignPanel extends Component<Props$K, SpreadsheetChildEnv> {
6153
7089
  static template: string;
6154
7090
  static components: {
6155
- ColorPickerWidget: typeof ColorPickerWidget;
6156
- ChartErrorSection: typeof ChartErrorSection;
6157
- ChartColor: typeof ChartColor;
6158
- ChartTitle: typeof ChartTitle;
7091
+ SidePanelCollapsible: typeof SidePanelCollapsible;
6159
7092
  Section: typeof Section;
7093
+ RoundColorPicker: typeof RoundColorPicker;
7094
+ GeneralDesignEditor: typeof GeneralDesignEditor;
7095
+ ChartErrorSection: typeof ChartErrorSection;
6160
7096
  };
6161
7097
  static props: {
6162
7098
  figureId: StringConstructor;
6163
7099
  definition: ObjectConstructor;
6164
7100
  updateChart: FunctionConstructor;
6165
- canUpdateChart: FunctionConstructor;
7101
+ canUpdateChart: {
7102
+ type: FunctionConstructor;
7103
+ optional: boolean;
7104
+ };
6166
7105
  };
6167
- private state;
7106
+ protected state: PanelState;
6168
7107
  setup(): void;
6169
- get title(): string;
6170
7108
  get designErrorMessages(): string[];
6171
7109
  updateBackgroundColor(color: Color): void;
6172
- updateTitle(title: string): void;
7110
+ updateTitle(content: string): void;
6173
7111
  isRangeMinInvalid(): boolean;
6174
7112
  isRangeMaxInvalid(): boolean;
6175
7113
  get isLowerInflectionPointInvalid(): boolean;
6176
7114
  get isUpperInflectionPointInvalid(): boolean;
6177
7115
  updateSectionColor(target: string, color: Color): void;
6178
- toggleMenu(menu: GaugeMenu): void;
6179
7116
  updateSectionRule(sectionRule: SectionRule): void;
6180
7117
  canUpdateSectionRule(sectionRule: SectionRule): void;
6181
- private closeMenus;
7118
+ get backgroundColorTitle(): string;
6182
7119
  }
6183
7120
 
6184
- declare class LineConfigPanel extends LineBarPieConfigPanel {
7121
+ declare class LineConfigPanel extends GenericChartConfigPanel {
6185
7122
  static template: string;
6186
7123
  get canTreatLabelsAsText(): boolean;
6187
7124
  get stackedLabel(): string;
@@ -6198,13 +7135,13 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
6198
7135
  onUpdateCumulative(cumulative: boolean): void;
6199
7136
  }
6200
7137
 
6201
- interface Props$C {
7138
+ interface Props$J {
6202
7139
  figureId: UID;
6203
7140
  definition: ScorecardChartDefinition;
6204
7141
  canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
6205
7142
  updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
6206
7143
  }
6207
- declare class ScorecardChartConfigPanel extends Component<Props$C, SpreadsheetChildEnv> {
7144
+ declare class ScorecardChartConfigPanel extends Component<Props$J, SpreadsheetChildEnv> {
6208
7145
  static template: string;
6209
7146
  static components: {
6210
7147
  SelectionInput: typeof SelectionInput;
@@ -6233,35 +7170,38 @@ declare class ScorecardChartConfigPanel extends Component<Props$C, SpreadsheetCh
6233
7170
  }
6234
7171
 
6235
7172
  type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
6236
- interface Props$B {
7173
+ interface Props$I {
6237
7174
  figureId: UID;
6238
7175
  definition: ScorecardChartDefinition;
6239
- canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
7176
+ canUpdateChart: (figureID: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
6240
7177
  updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
6241
7178
  }
6242
- declare class ScorecardChartDesignPanel extends Component<Props$B, SpreadsheetChildEnv> {
7179
+ declare class ScorecardChartDesignPanel extends Component<Props$I, SpreadsheetChildEnv> {
6243
7180
  static template: string;
6244
7181
  static components: {
6245
- ColorPickerWidget: typeof ColorPickerWidget;
6246
- ChartColor: typeof ChartColor;
6247
- ChartTitle: typeof ChartTitle;
7182
+ GeneralDesignEditor: typeof GeneralDesignEditor;
7183
+ RoundColorPicker: typeof RoundColorPicker;
7184
+ SidePanelCollapsible: typeof SidePanelCollapsible;
6248
7185
  Section: typeof Section;
7186
+ Checkbox: typeof Checkbox;
6249
7187
  };
6250
7188
  static props: {
6251
7189
  figureId: StringConstructor;
6252
7190
  definition: ObjectConstructor;
6253
7191
  updateChart: FunctionConstructor;
6254
- canUpdateChart: FunctionConstructor;
7192
+ canUpdateChart: {
7193
+ type: FunctionConstructor;
7194
+ optional: boolean;
7195
+ };
6255
7196
  };
6256
- private state;
6257
- setup(): void;
6258
- get title(): string;
6259
- updateTitle(title: string): void;
7197
+ get colorsSectionTitle(): string;
7198
+ get humanizeNumbersLabel(): string;
7199
+ updateTitle(content: string): void;
7200
+ updateHumanizeNumbers(humanize: boolean): void;
6260
7201
  translate(term: any): string;
6261
7202
  updateBaselineDescr(ev: any): void;
6262
- toggleColorPicker(colorPickerId: ColorPickerId): void;
6263
7203
  setColor(color: Color, colorPickerId: ColorPickerId): void;
6264
- private closeMenus;
7204
+ get backgroundColorTitle(): string;
6265
7205
  }
6266
7206
 
6267
7207
  interface ChartSidePanel {
@@ -6269,87 +7209,6 @@ interface ChartSidePanel {
6269
7209
  design: new (...args: any) => Component;
6270
7210
  }
6271
7211
 
6272
- interface ActionSpec {
6273
- /**
6274
- * String or a function to compute the name
6275
- */
6276
- name: string | ((env: SpreadsheetChildEnv) => string);
6277
- description?: string | ((env: SpreadsheetChildEnv) => string);
6278
- /**
6279
- * which represents its position inside the
6280
- * menus (the lower sequence it has, the upper it is in the menu)
6281
- */
6282
- sequence?: number;
6283
- /**
6284
- * used for example to add child
6285
- */
6286
- id?: string;
6287
- /**
6288
- * Can be defined to compute the visibility of the item
6289
- */
6290
- isVisible?: (env: SpreadsheetChildEnv) => boolean;
6291
- /**
6292
- * Can be defined to compute if the user can click on the action
6293
- */
6294
- isEnabled?: (env: SpreadsheetChildEnv) => boolean;
6295
- /**
6296
- * Can be defined to compute if the action is active
6297
- */
6298
- isActive?: (env: SpreadsheetChildEnv) => boolean;
6299
- /**
6300
- * Can be defined to display an icon
6301
- */
6302
- icon?: string | ((env: SpreadsheetChildEnv) => string);
6303
- /**
6304
- * Can be defined to display another icon on the right of the item.
6305
- */
6306
- secondaryIcon?: string | ((env: SpreadsheetChildEnv) => string);
6307
- /**
6308
- * is the action allowed when running spreadsheet in readonly mode
6309
- */
6310
- isReadonlyAllowed?: boolean;
6311
- /**
6312
- * Execute the action. The action can return a result.
6313
- * The result will be carried by a `menu-clicked` event to the menu parent component.
6314
- */
6315
- execute?: (env: SpreadsheetChildEnv) => unknown;
6316
- /**
6317
- * subitems associated to this item
6318
- * NB: an action without an execute function or children is not displayed !
6319
- */
6320
- children?: ActionChildren;
6321
- /**
6322
- * whether it should add a separator below the item in menus
6323
- * NB: a separator defined on the last item is not displayed !
6324
- */
6325
- separator?: boolean;
6326
- textColor?: Color;
6327
- onStartHover?: (env: SpreadsheetChildEnv) => void;
6328
- onStopHover?: (env: SpreadsheetChildEnv) => void;
6329
- }
6330
- interface Action {
6331
- name: (env: SpreadsheetChildEnv) => string;
6332
- description: (env: SpreadsheetChildEnv) => string;
6333
- sequence: number;
6334
- id: string;
6335
- isVisible: (env: SpreadsheetChildEnv) => boolean;
6336
- isEnabled: (env: SpreadsheetChildEnv) => boolean;
6337
- isActive?: (env: SpreadsheetChildEnv) => boolean;
6338
- icon: (env: SpreadsheetChildEnv) => string;
6339
- secondaryIcon: (env: SpreadsheetChildEnv) => string;
6340
- isReadonlyAllowed: boolean;
6341
- execute?: (env: SpreadsheetChildEnv) => unknown;
6342
- children: (env: SpreadsheetChildEnv) => Action[];
6343
- separator: boolean;
6344
- textColor?: Color;
6345
- onStartHover?: (env: SpreadsheetChildEnv) => void;
6346
- onStopHover?: (env: SpreadsheetChildEnv) => void;
6347
- }
6348
- type ActionBuilder = (env: SpreadsheetChildEnv) => ActionSpec[];
6349
- type ActionChildren = (ActionSpec | ActionBuilder)[];
6350
- declare function createActions(menuItems: ActionSpec[]): Action[];
6351
- declare function createAction(item: ActionSpec): Action;
6352
-
6353
7212
  /**
6354
7213
  * This registry is intended to map a type of figure (tag) to a class of
6355
7214
  * component, that will be used in the UI to represent the figure.
@@ -6379,6 +7238,7 @@ interface ClosedSidePanel {
6379
7238
  }
6380
7239
  type SidePanelState = OpenSidePanel | ClosedSidePanel;
6381
7240
  declare class SidePanelStore extends SpreadsheetStore {
7241
+ mutators: readonly ["open", "toggle", "close"];
6382
7242
  initialPanelProps: SidePanelProps;
6383
7243
  componentTag: string;
6384
7244
  get isOpen(): boolean;
@@ -6391,7 +7251,7 @@ declare class SidePanelStore extends SpreadsheetStore {
6391
7251
  }
6392
7252
 
6393
7253
  interface SidePanelContent {
6394
- title: string | ((env: SpreadsheetChildEnv) => string);
7254
+ title: string | ((env: SpreadsheetChildEnv, props: object) => string);
6395
7255
  Body: any;
6396
7256
  Footer?: any;
6397
7257
  /**
@@ -6471,13 +7331,13 @@ interface EnrichedToken extends Token {
6471
7331
  functionContext?: FunctionContext;
6472
7332
  }
6473
7333
 
6474
- interface Props$A {
7334
+ interface Props$H {
6475
7335
  proposals: AutoCompleteProposal[];
6476
7336
  selectedIndex: number | undefined;
6477
7337
  onValueSelected: (value: string) => void;
6478
7338
  onValueHovered: (index: string) => void;
6479
7339
  }
6480
- declare class TextValueProvider extends Component<Props$A> {
7340
+ declare class TextValueProvider extends Component<Props$H> {
6481
7341
  static template: string;
6482
7342
  static props: {
6483
7343
  proposals: ArrayConstructor;
@@ -6492,12 +7352,24 @@ declare class TextValueProvider extends Component<Props$A> {
6492
7352
  setup(): void;
6493
7353
  }
6494
7354
 
7355
+ declare class AutoCompleteStore extends SpreadsheetStore {
7356
+ mutators: readonly ["useProvider", "moveSelection", "hide", "selectIndex"];
7357
+ selectedIndex: number | undefined;
7358
+ provider: AutoCompleteProvider | undefined;
7359
+ get selectedProposal(): AutoCompleteProposal | undefined;
7360
+ useProvider(provider: AutoCompleteProvider): void;
7361
+ hide(): void;
7362
+ selectIndex(index: number): void;
7363
+ moveSelection(direction: "previous" | "next"): void;
7364
+ }
7365
+
6495
7366
  type EditionMode = "editing" | "selecting" | "inactive";
6496
7367
  interface ComposerSelection {
6497
7368
  start: number;
6498
7369
  end: number;
6499
7370
  }
6500
7371
  declare class ComposerStore extends SpreadsheetStore {
7372
+ mutators: readonly ["startEdition", "setCurrentContent", "stopEdition", "stopComposerRangeSelection", "cancelEdition", "cycleReferences", "changeComposerCursorSelection", "replaceComposerCursorSelection"];
6501
7373
  private col;
6502
7374
  private row;
6503
7375
  editionMode: EditionMode;
@@ -6604,6 +7476,7 @@ declare class ComposerStore extends SpreadsheetStore {
6604
7476
 
6605
7477
  type ComposerFocusType = "inactive" | "cellFocus" | "contentFocus";
6606
7478
  declare class ComposerFocusStore extends SpreadsheetStore {
7479
+ mutators: readonly ["focusTopBarComposer", "focusGridComposerContent", "focusGridComposerCell"];
6607
7480
  private composerStore;
6608
7481
  private topBarFocus;
6609
7482
  private gridFocusMode;
@@ -6678,7 +7551,7 @@ declare class ContentEditableHelper {
6678
7551
  getText(): string;
6679
7552
  }
6680
7553
 
6681
- interface Props$z {
7554
+ interface Props$G {
6682
7555
  functionName: string;
6683
7556
  functionDescription: FunctionDescription;
6684
7557
  argToFocus: number;
@@ -6686,7 +7559,7 @@ interface Props$z {
6686
7559
  interface AssistantState {
6687
7560
  allowCellSelectionBehind: boolean;
6688
7561
  }
6689
- declare class FunctionDescriptionProvider extends Component<Props$z> {
7562
+ declare class FunctionDescriptionProvider extends Component<Props$G, SpreadsheetChildEnv> {
6690
7563
  static template: string;
6691
7564
  static props: {
6692
7565
  functionName: StringConstructor;
@@ -6696,8 +7569,9 @@ declare class FunctionDescriptionProvider extends Component<Props$z> {
6696
7569
  assistantState: AssistantState;
6697
7570
  private timeOutId;
6698
7571
  setup(): void;
6699
- getContext(): Props$z;
7572
+ getContext(): Props$G;
6700
7573
  onMouseMove(): void;
7574
+ get formulaArgSeparator(): string;
6701
7575
  }
6702
7576
 
6703
7577
  type HtmlContent = {
@@ -6723,16 +7597,13 @@ interface ComposerProps {
6723
7597
  delimitation?: DOMDimension;
6724
7598
  onComposerContentFocused: () => void;
6725
7599
  onComposerCellFocused?: (content: String) => void;
7600
+ onInputContextMenu?: (event: MouseEvent) => void;
6726
7601
  isDefaultFocus?: boolean;
6727
7602
  }
6728
7603
  interface ComposerState {
6729
7604
  positionStart: number;
6730
7605
  positionEnd: number;
6731
7606
  }
6732
- interface AutoCompleteState {
6733
- provider: AutoCompleteProvider | undefined;
6734
- selectedIndex: number | undefined;
6735
- }
6736
7607
  interface FunctionDescriptionState {
6737
7608
  showDescription: boolean;
6738
7609
  functionName: string;
@@ -6766,6 +7637,10 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
6766
7637
  type: BooleanConstructor;
6767
7638
  optional: boolean;
6768
7639
  };
7640
+ onInputContextMenu: {
7641
+ type: FunctionConstructor;
7642
+ optional: boolean;
7643
+ };
6769
7644
  };
6770
7645
  static components: {
6771
7646
  TextValueProvider: typeof TextValueProvider;
@@ -6782,7 +7657,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
6782
7657
  };
6783
7658
  contentHelper: ContentEditableHelper;
6784
7659
  composerState: ComposerState;
6785
- autoCompleteState: AutoCompleteState;
7660
+ autoCompleteState: Store<AutoCompleteStore>;
6786
7661
  functionDescriptionState: FunctionDescriptionState;
6787
7662
  private compositionActive;
6788
7663
  get assistantStyle(): string;
@@ -6809,7 +7684,6 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
6809
7684
  onPaste(ev: ClipboardEvent): void;
6810
7685
  onInput(ev: InputEvent): void;
6811
7686
  onKeyup(ev: KeyboardEvent): void;
6812
- showAutoComplete(provider: AutoCompleteProvider): void;
6813
7687
  updateAutoCompleteIndex(index: number): void;
6814
7688
  /**
6815
7689
  * This is required to ensure the content helper selection is
@@ -6822,6 +7696,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
6822
7696
  onMousedown(ev: MouseEvent): void;
6823
7697
  onClick(): void;
6824
7698
  onDblClick(): void;
7699
+ onContextMenu(ev: MouseEvent): void;
6825
7700
  private processContent;
6826
7701
  /**
6827
7702
  * Get the HTML content corresponding to the current composer token, divided by lines.
@@ -6885,16 +7760,17 @@ interface AutoCompleteProviderDefinition {
6885
7760
 
6886
7761
  declare function transformRangeData(range: RangeData, executed: CoreCommand): RangeData | undefined;
6887
7762
 
6888
- interface Props$y {
7763
+ interface Props$F {
6889
7764
  figure: Figure;
6890
7765
  }
6891
- declare class ChartJsComponent extends Component<Props$y, SpreadsheetChildEnv> {
7766
+ declare class ChartJsComponent extends Component<Props$F, SpreadsheetChildEnv> {
6892
7767
  static template: string;
6893
7768
  static props: {
6894
7769
  figure: ObjectConstructor;
6895
7770
  };
6896
7771
  private canvas;
6897
7772
  private chart?;
7773
+ private currentRuntime;
6898
7774
  get background(): string;
6899
7775
  get canvasStyle(): string;
6900
7776
  get chartRuntime(): ChartJSRuntime;
@@ -6903,10 +7779,10 @@ declare class ChartJsComponent extends Component<Props$y, SpreadsheetChildEnv> {
6903
7779
  private updateChartJs;
6904
7780
  }
6905
7781
 
6906
- interface Props$x {
7782
+ interface Props$E {
6907
7783
  figure: Figure;
6908
7784
  }
6909
- declare class ScorecardChart extends Component<Props$x, SpreadsheetChildEnv> {
7785
+ declare class ScorecardChart extends Component<Props$E, SpreadsheetChildEnv> {
6910
7786
  static template: string;
6911
7787
  static props: {
6912
7788
  figure: ObjectConstructor;
@@ -6918,7 +7794,7 @@ declare class ScorecardChart extends Component<Props$x, SpreadsheetChildEnv> {
6918
7794
  }
6919
7795
 
6920
7796
  type MenuItemOrSeparator = Action | "separator";
6921
- interface Props$w {
7797
+ interface Props$D {
6922
7798
  position: DOMCoordinates;
6923
7799
  menuItems: Action[];
6924
7800
  depth: number;
@@ -6936,7 +7812,7 @@ interface MenuState {
6936
7812
  menuItems: Action[];
6937
7813
  isHoveringChild?: boolean;
6938
7814
  }
6939
- declare class Menu extends Component<Props$w, SpreadsheetChildEnv> {
7815
+ declare class Menu extends Component<Props$D, SpreadsheetChildEnv> {
6940
7816
  static template: string;
6941
7817
  static props: {
6942
7818
  position: ObjectConstructor;
@@ -7006,14 +7882,14 @@ declare class Menu extends Component<Props$w, SpreadsheetChildEnv> {
7006
7882
  }
7007
7883
 
7008
7884
  type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
7009
- interface Props$v {
7885
+ interface Props$C {
7010
7886
  figure: Figure;
7011
7887
  style: string;
7012
7888
  onFigureDeleted: () => void;
7013
7889
  onMouseDown: (ev: MouseEvent) => void;
7014
7890
  onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
7015
7891
  }
7016
- declare class FigureComponent extends Component<Props$v, SpreadsheetChildEnv> {
7892
+ declare class FigureComponent extends Component<Props$C, SpreadsheetChildEnv> {
7017
7893
  static template: string;
7018
7894
  static props: {
7019
7895
  figure: ObjectConstructor;
@@ -7062,11 +7938,11 @@ declare class FigureComponent extends Component<Props$v, SpreadsheetChildEnv> {
7062
7938
  private openContextMenu;
7063
7939
  }
7064
7940
 
7065
- interface Props$u {
7941
+ interface Props$B {
7066
7942
  figure: Figure;
7067
7943
  onFigureDeleted: () => void;
7068
7944
  }
7069
- declare class ChartFigure extends Component<Props$u, SpreadsheetChildEnv> {
7945
+ declare class ChartFigure extends Component<Props$B, SpreadsheetChildEnv> {
7070
7946
  static template: string;
7071
7947
  static props: {
7072
7948
  figure: ObjectConstructor;
@@ -7078,7 +7954,7 @@ declare class ChartFigure extends Component<Props$u, SpreadsheetChildEnv> {
7078
7954
  get chartComponent(): new (...args: any) => Component;
7079
7955
  }
7080
7956
 
7081
- interface Props$t {
7957
+ interface Props$A {
7082
7958
  isVisible: boolean;
7083
7959
  position: Position;
7084
7960
  }
@@ -7086,17 +7962,17 @@ interface Position {
7086
7962
  top: HeaderIndex;
7087
7963
  left: HeaderIndex;
7088
7964
  }
7089
- interface State$6 {
7965
+ interface State$8 {
7090
7966
  position: Position;
7091
7967
  handler: boolean;
7092
7968
  }
7093
- declare class Autofill extends Component<Props$t, SpreadsheetChildEnv> {
7969
+ declare class Autofill extends Component<Props$A, SpreadsheetChildEnv> {
7094
7970
  static template: string;
7095
7971
  static props: {
7096
7972
  position: ObjectConstructor;
7097
7973
  isVisible: BooleanConstructor;
7098
7974
  };
7099
- state: State$6;
7975
+ state: State$8;
7100
7976
  get style(): string;
7101
7977
  get handlerStyle(): string;
7102
7978
  get styleNextValue(): string;
@@ -7124,17 +8000,19 @@ declare class ClientTag extends Component<ClientTagProps, SpreadsheetChildEnv> {
7124
8000
  get tagStyle(): string;
7125
8001
  }
7126
8002
 
7127
- interface Props$s {
8003
+ interface Props$z {
7128
8004
  gridDims: DOMDimension;
8005
+ onInputContextMenu: (event: MouseEvent) => void;
7129
8006
  }
7130
8007
  /**
7131
8008
  * This component is a composer which positions itself on the grid at the anchor cell.
7132
8009
  * It also applies the style of the cell to the composer input.
7133
8010
  */
7134
- declare class GridComposer extends Component<Props$s, SpreadsheetChildEnv> {
8011
+ declare class GridComposer extends Component<Props$z, SpreadsheetChildEnv> {
7135
8012
  static template: string;
7136
8013
  static props: {
7137
8014
  gridDims: ObjectConstructor;
8015
+ onInputContextMenu: FunctionConstructor;
7138
8016
  };
7139
8017
  static components: {
7140
8018
  Composer: typeof Composer;
@@ -7166,7 +8044,6 @@ interface GridCellIconProps {
7166
8044
  cellPosition: CellPosition;
7167
8045
  horizontalAlign?: Align;
7168
8046
  verticalAlign?: VerticalAlign;
7169
- offset?: DOMCoordinates;
7170
8047
  }
7171
8048
  declare class GridCellIcon extends Component<GridCellIconProps, SpreadsheetChildEnv> {
7172
8049
  static template: string;
@@ -7180,82 +8057,18 @@ declare class GridCellIcon extends Component<GridCellIconProps, SpreadsheetChild
7180
8057
  type: StringConstructor;
7181
8058
  optional: boolean;
7182
8059
  };
7183
- offset: {
7184
- type: ObjectConstructor;
7185
- optional: boolean;
7186
- };
7187
- slots: ObjectConstructor;
7188
- };
7189
- get iconStyle(): string;
7190
- private getIconVerticalPosition;
7191
- private getIconHorizontalPosition;
7192
- isPositionVisible(position: CellPosition): boolean;
7193
- }
7194
-
7195
- declare class CellPopoverStore extends SpreadsheetStore {
7196
- private persistentPopover?;
7197
- protected hoveredCell: {
7198
- readonly col: number | undefined;
7199
- readonly row: number | undefined;
7200
- readonly handle: (cmd: Command) => void;
7201
- readonly hover: (position: Position$1) => void;
7202
- readonly clear: () => void;
7203
- readonly renderingLayers: readonly ("Chart" | "Background" | "Highlights" | "Clipboard" | "Autofill" | "Selection" | "Headers")[];
7204
- readonly drawLayer: (ctx: GridRenderingContext, layer: "Chart" | "Background" | "Highlights" | "Clipboard" | "Autofill" | "Selection" | "Headers") => void;
7205
- readonly dispose: () => void;
7206
- };
7207
- handle(cmd: Command): void;
7208
- open({ col, row }: Position$1, type: CellPopoverType): void;
7209
- close(): void;
7210
- get persistentCellPopover(): OpenCellPopover | ClosedCellPopover;
7211
- get isOpen(): boolean;
7212
- get cellPopover(): ClosedCellPopover | PositionedCellPopoverComponent;
7213
- private computePopoverAnchorRect;
7214
- }
7215
-
7216
- interface Props$r {
7217
- cellPosition: CellPosition;
7218
- }
7219
- declare class FilterIcon extends Component<Props$r, SpreadsheetChildEnv> {
7220
- static template: string;
7221
- static props: {
7222
- cellPosition: ObjectConstructor;
7223
- };
7224
- protected cellPopovers: Store<CellPopoverStore>;
7225
- setup(): void;
7226
- onClick(): void;
7227
- get isFilterActive(): boolean;
7228
- get iconClass(): string;
7229
- }
7230
-
7231
- interface Props$q {
7232
- gridPosition: DOMCoordinates;
7233
- }
7234
- declare class FilterIconsOverlay extends Component<Props$q, SpreadsheetChildEnv> {
7235
- static template: string;
7236
- static props: {
7237
- gridPosition: {
7238
- type: ObjectConstructor;
7239
- optional: boolean;
7240
- };
7241
- };
7242
- static components: {
7243
- GridCellIcon: typeof GridCellIcon;
7244
- FilterIcon: typeof FilterIcon;
7245
- };
7246
- static defaultProps: {
7247
- gridPosition: {
7248
- x: number;
7249
- y: number;
7250
- };
8060
+ slots: ObjectConstructor;
7251
8061
  };
7252
- getFilterHeadersPositions(): CellPosition[];
8062
+ get iconStyle(): string;
8063
+ private getIconVerticalPosition;
8064
+ private getIconHorizontalPosition;
8065
+ isPositionVisible(position: CellPosition): boolean;
7253
8066
  }
7254
8067
 
7255
- interface Props$p {
8068
+ interface Props$y {
7256
8069
  cellPosition: CellPosition;
7257
8070
  }
7258
- declare class DataValidationCheckbox extends Component<Props$p, SpreadsheetChildEnv> {
8071
+ declare class DataValidationCheckbox extends Component<Props$y, SpreadsheetChildEnv> {
7259
8072
  static template: string;
7260
8073
  static props: {
7261
8074
  cellPosition: ObjectConstructor;
@@ -7265,10 +8078,10 @@ declare class DataValidationCheckbox extends Component<Props$p, SpreadsheetChild
7265
8078
  get isDisabled(): boolean;
7266
8079
  }
7267
8080
 
7268
- interface Props$o {
8081
+ interface Props$x {
7269
8082
  cellPosition: CellPosition;
7270
8083
  }
7271
- declare class DataValidationListIcon extends Component<Props$o, SpreadsheetChildEnv> {
8084
+ declare class DataValidationListIcon extends Component<Props$x, SpreadsheetChildEnv> {
7272
8085
  static template: string;
7273
8086
  static props: {
7274
8087
  cellPosition: ObjectConstructor;
@@ -7298,7 +8111,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
7298
8111
  }
7299
8112
 
7300
8113
  type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
7301
- interface Props$n {
8114
+ interface Props$w {
7302
8115
  onFigureDeleted: () => void;
7303
8116
  }
7304
8117
  interface Container {
@@ -7377,7 +8190,7 @@ interface DndState {
7377
8190
  * that occurred during the drag & drop, and to position the figure on the correct pane.
7378
8191
  *
7379
8192
  */
7380
- declare class FiguresContainer extends Component<Props$n, SpreadsheetChildEnv> {
8193
+ declare class FiguresContainer extends Component<Props$w, SpreadsheetChildEnv> {
7381
8194
  static template: string;
7382
8195
  static props: {
7383
8196
  onFigureDeleted: FunctionConstructor;
@@ -7412,10 +8225,54 @@ declare class FiguresContainer extends Component<Props$n, SpreadsheetChildEnv> {
7412
8225
  private getSnapLineStyle;
7413
8226
  }
7414
8227
 
7415
- interface Props$m {
8228
+ declare class CellPopoverStore extends SpreadsheetStore {
8229
+ mutators: readonly ["open", "close"];
8230
+ private persistentPopover?;
8231
+ protected hoveredCell: {
8232
+ readonly clear: () => void;
8233
+ readonly hover: (position: Position$1) => void;
8234
+ readonly mutators: readonly ["clear", "hover"];
8235
+ readonly col: number | undefined;
8236
+ readonly row: number | undefined;
8237
+ readonly renderingLayers: readonly ("Chart" | "Background" | "Highlights" | "Clipboard" | "Autofill" | "Selection" | "Headers")[];
8238
+ };
8239
+ handle(cmd: Command): void;
8240
+ open({ col, row }: Position$1, type: CellPopoverType): void;
8241
+ close(): void;
8242
+ get persistentCellPopover(): OpenCellPopover | ClosedCellPopover;
8243
+ get isOpen(): boolean;
8244
+ get cellPopover(): ClosedCellPopover | PositionedCellPopoverComponent;
8245
+ private computePopoverAnchorRect;
8246
+ }
8247
+
8248
+ interface Props$v {
8249
+ cellPosition: CellPosition;
8250
+ }
8251
+ declare class FilterIcon extends Component<Props$v, SpreadsheetChildEnv> {
8252
+ static template: string;
8253
+ static props: {
8254
+ cellPosition: ObjectConstructor;
8255
+ };
8256
+ protected cellPopovers: Store<CellPopoverStore>;
8257
+ setup(): void;
8258
+ onClick(): void;
8259
+ get isFilterActive(): boolean;
8260
+ get iconClass(): string;
8261
+ }
8262
+
8263
+ declare class FilterIconsOverlay extends Component<{}, SpreadsheetChildEnv> {
8264
+ static template: string;
8265
+ static components: {
8266
+ GridCellIcon: typeof GridCellIcon;
8267
+ FilterIcon: typeof FilterIcon;
8268
+ };
8269
+ getFilterHeadersPositions(): CellPosition[];
8270
+ }
8271
+
8272
+ interface Props$u {
7416
8273
  focusGrid: () => void;
7417
8274
  }
7418
- declare class GridAddRowsFooter extends Component<Props$m, SpreadsheetChildEnv> {
8275
+ declare class GridAddRowsFooter extends Component<Props$u, SpreadsheetChildEnv> {
7419
8276
  static template: string;
7420
8277
  static props: {
7421
8278
  focusGrid: FunctionConstructor;
@@ -7439,20 +8296,17 @@ declare class GridAddRowsFooter extends Component<Props$m, SpreadsheetChildEnv>
7439
8296
  private onExternalClick;
7440
8297
  }
7441
8298
 
7442
- interface Props$l {
8299
+ interface Props$t {
7443
8300
  onCellHovered: (position: Partial<Position$1>) => void;
7444
8301
  onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
7445
- onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
7446
- addZone: boolean;
7447
- expandZone: boolean;
7448
- }) => void;
8302
+ onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: GridClickModifiers) => void;
7449
8303
  onCellRightClicked: (col: HeaderIndex, row: HeaderIndex, coordinates: DOMCoordinates) => void;
7450
8304
  onGridResized: (dimension: Rect) => void;
7451
8305
  onGridMoved: (deltaX: Pixel, deltaY: Pixel) => void;
7452
8306
  gridOverlayDimensions: string;
7453
8307
  onFigureDeleted: () => void;
7454
8308
  }
7455
- declare class GridOverlay extends Component<Props$l, SpreadsheetChildEnv> {
8309
+ declare class GridOverlay extends Component<Props$t, SpreadsheetChildEnv> {
7456
8310
  static template: string;
7457
8311
  static props: {
7458
8312
  onCellHovered: {
@@ -7486,6 +8340,7 @@ declare class GridOverlay extends Component<Props$l, SpreadsheetChildEnv> {
7486
8340
  FiguresContainer: typeof FiguresContainer;
7487
8341
  DataValidationOverlay: typeof DataValidationOverlay;
7488
8342
  GridAddRowsFooter: typeof GridAddRowsFooter;
8343
+ FilterIconsOverlay: typeof FilterIconsOverlay;
7489
8344
  };
7490
8345
  static defaultProps: {
7491
8346
  onCellHovered: () => void;
@@ -7497,6 +8352,7 @@ declare class GridOverlay extends Component<Props$l, SpreadsheetChildEnv> {
7497
8352
  };
7498
8353
  private gridOverlay;
7499
8354
  private gridOverlayRect;
8355
+ private cellPopovers;
7500
8356
  setup(): void;
7501
8357
  get gridOverlayEl(): HTMLElement;
7502
8358
  get style(): string;
@@ -7507,12 +8363,12 @@ declare class GridOverlay extends Component<Props$l, SpreadsheetChildEnv> {
7507
8363
  private getCartesianCoordinates;
7508
8364
  }
7509
8365
 
7510
- interface Props$k {
8366
+ interface Props$s {
7511
8367
  gridRect: Rect;
7512
8368
  onClosePopover: () => void;
7513
8369
  onMouseWheel: (ev: WheelEvent) => void;
7514
8370
  }
7515
- declare class GridPopover extends Component<Props$k, SpreadsheetChildEnv> {
8371
+ declare class GridPopover extends Component<Props$s, SpreadsheetChildEnv> {
7516
8372
  static template: string;
7517
8373
  static props: {
7518
8374
  onClosePopover: FunctionConstructor;
@@ -7655,13 +8511,13 @@ declare class HeadersOverlay extends Component<any, SpreadsheetChildEnv> {
7655
8511
  }
7656
8512
 
7657
8513
  type Orientation$1 = "n" | "s" | "w" | "e";
7658
- interface Props$j {
8514
+ interface Props$r {
7659
8515
  zone: Zone;
7660
8516
  orientation: Orientation$1;
7661
8517
  isMoving: boolean;
7662
8518
  onMoveHighlight: (x: Pixel, y: Pixel) => void;
7663
8519
  }
7664
- declare class Border extends Component<Props$j, SpreadsheetChildEnv> {
8520
+ declare class Border extends Component<Props$r, SpreadsheetChildEnv> {
7665
8521
  static template: string;
7666
8522
  static props: {
7667
8523
  zone: ObjectConstructor;
@@ -7674,14 +8530,14 @@ declare class Border extends Component<Props$j, SpreadsheetChildEnv> {
7674
8530
  }
7675
8531
 
7676
8532
  type Orientation = "nw" | "ne" | "sw" | "se";
7677
- interface Props$i {
8533
+ interface Props$q {
7678
8534
  zone: Zone;
7679
8535
  color: Color;
7680
8536
  orientation: Orientation;
7681
8537
  isResizing: boolean;
7682
8538
  onResizeHighlight: (isLeft: boolean, isRight: boolean) => void;
7683
8539
  }
7684
- declare class Corner extends Component<Props$i, SpreadsheetChildEnv> {
8540
+ declare class Corner extends Component<Props$q, SpreadsheetChildEnv> {
7685
8541
  static template: string;
7686
8542
  static props: {
7687
8543
  zone: ObjectConstructor;
@@ -7696,14 +8552,14 @@ declare class Corner extends Component<Props$i, SpreadsheetChildEnv> {
7696
8552
  onMouseDown(ev: MouseEvent): void;
7697
8553
  }
7698
8554
 
7699
- interface Props$h {
8555
+ interface Props$p {
7700
8556
  zone: Zone;
7701
8557
  color: Color;
7702
8558
  }
7703
8559
  interface HighlightState {
7704
8560
  shiftingMode: "isMoving" | "isResizing" | "none";
7705
8561
  }
7706
- declare class Highlight extends Component<Props$h, SpreadsheetChildEnv> {
8562
+ declare class Highlight extends Component<Props$p, SpreadsheetChildEnv> {
7707
8563
  static template: string;
7708
8564
  static props: {
7709
8565
  zone: ObjectConstructor;
@@ -7720,7 +8576,7 @@ declare class Highlight extends Component<Props$h, SpreadsheetChildEnv> {
7720
8576
 
7721
8577
  type ScrollDirection = "horizontal" | "vertical";
7722
8578
 
7723
- interface Props$g {
8579
+ interface Props$o {
7724
8580
  width: Pixel;
7725
8581
  height: Pixel;
7726
8582
  direction: ScrollDirection;
@@ -7728,7 +8584,7 @@ interface Props$g {
7728
8584
  offset: Pixel;
7729
8585
  onScroll: (offset: Pixel) => void;
7730
8586
  }
7731
- declare class ScrollBar extends Component<Props$g> {
8587
+ declare class ScrollBar extends Component<Props$o> {
7732
8588
  static props: {
7733
8589
  width: {
7734
8590
  type: NumberConstructor;
@@ -7756,10 +8612,10 @@ declare class ScrollBar extends Component<Props$g> {
7756
8612
  onScroll(ev: any): void;
7757
8613
  }
7758
8614
 
7759
- interface Props$f {
8615
+ interface Props$n {
7760
8616
  leftOffset: number;
7761
8617
  }
7762
- declare class HorizontalScrollBar extends Component<Props$f, SpreadsheetChildEnv> {
8618
+ declare class HorizontalScrollBar extends Component<Props$n, SpreadsheetChildEnv> {
7763
8619
  static props: {
7764
8620
  leftOffset: {
7765
8621
  type: NumberConstructor;
@@ -7785,10 +8641,10 @@ declare class HorizontalScrollBar extends Component<Props$f, SpreadsheetChildEnv
7785
8641
  onScroll(offset: any): void;
7786
8642
  }
7787
8643
 
7788
- interface Props$e {
8644
+ interface Props$m {
7789
8645
  topOffset: number;
7790
8646
  }
7791
- declare class VerticalScrollBar extends Component<Props$e, SpreadsheetChildEnv> {
8647
+ declare class VerticalScrollBar extends Component<Props$m, SpreadsheetChildEnv> {
7792
8648
  static props: {
7793
8649
  topOffset: {
7794
8650
  type: NumberConstructor;
@@ -7814,7 +8670,26 @@ declare class VerticalScrollBar extends Component<Props$e, SpreadsheetChildEnv>
7814
8670
  onScroll(offset: any): void;
7815
8671
  }
7816
8672
 
8673
+ interface Props$l {
8674
+ table: Table;
8675
+ }
8676
+ interface State$7 {
8677
+ highlightZone: Zone | undefined;
8678
+ }
8679
+ declare class TableResizer extends Component<Props$l, SpreadsheetChildEnv> {
8680
+ static template: string;
8681
+ static props: {
8682
+ table: ObjectConstructor;
8683
+ };
8684
+ state: State$7;
8685
+ setup(): void;
8686
+ get containerStyle(): string;
8687
+ onMouseDown(ev: MouseEvent): void;
8688
+ get highlights(): Highlight$1[];
8689
+ }
8690
+
7817
8691
  declare class HoveredCellStore extends SpreadsheetStore {
8692
+ mutators: readonly ["clear", "hover"];
7818
8693
  col: number | undefined;
7819
8694
  row: number | undefined;
7820
8695
  handle(cmd: Command): void;
@@ -7833,10 +8708,10 @@ declare class HoveredCellStore extends SpreadsheetStore {
7833
8708
  * - a vertical resizer (same, for rows)
7834
8709
  */
7835
8710
  type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER" | "GROUP_HEADERS" | "UNGROUP_HEADERS";
7836
- interface Props$d {
8711
+ interface Props$k {
7837
8712
  exposeFocus: (focus: () => void) => void;
7838
8713
  }
7839
- declare class Grid extends Component<Props$d, SpreadsheetChildEnv> {
8714
+ declare class Grid extends Component<Props$k, SpreadsheetChildEnv> {
7840
8715
  static template: string;
7841
8716
  static props: {
7842
8717
  exposeFocus: FunctionConstructor;
@@ -7853,7 +8728,7 @@ declare class Grid extends Component<Props$d, SpreadsheetChildEnv> {
7853
8728
  Popover: typeof Popover;
7854
8729
  VerticalScrollBar: typeof VerticalScrollBar;
7855
8730
  HorizontalScrollBar: typeof HorizontalScrollBar;
7856
- FilterIconsOverlay: typeof FilterIconsOverlay;
8731
+ TableResizer: typeof TableResizer;
7857
8732
  };
7858
8733
  readonly HEADER_HEIGHT = 26;
7859
8734
  readonly HEADER_WIDTH = 48;
@@ -7889,10 +8764,7 @@ declare class Grid extends Component<Props$d, SpreadsheetChildEnv> {
7889
8764
  getClientPositionKey(client: Client): string;
7890
8765
  isCellHovered(col: HeaderIndex, row: HeaderIndex): boolean;
7891
8766
  private getGridRect;
7892
- onCellClicked(col: HeaderIndex, row: HeaderIndex, { addZone, expandZone }: {
7893
- addZone: boolean;
7894
- expandZone: boolean;
7895
- }): void;
8767
+ onCellClicked(col: HeaderIndex, row: HeaderIndex, modifiers: GridClickModifiers): void;
7896
8768
  onCellDoubleClicked(col: HeaderIndex, row: HeaderIndex): void;
7897
8769
  processArrows(ev: KeyboardEvent): void;
7898
8770
  onKeydown(ev: KeyboardEvent): void;
@@ -7911,6 +8783,7 @@ declare class Grid extends Component<Props$d, SpreadsheetChildEnv> {
7911
8783
  private processHeaderGroupingEventOnGrid;
7912
8784
  onComposerCellFocused(content?: string, selection?: ComposerSelection): void;
7913
8785
  onComposerContentFocused(): void;
8786
+ get staticTables(): Table[];
7914
8787
  }
7915
8788
 
7916
8789
  type Direction = "horizontal" | "vertical";
@@ -7928,27 +8801,30 @@ interface DndPartialArgs {
7928
8801
  onCancel?: () => void;
7929
8802
  onDragEnd?: (itemId: UID, indexAtEnd: Pixel) => void;
7930
8803
  }
7931
- interface State$5 {
8804
+ interface State$6 {
7932
8805
  itemsStyle: Record<UID, string>;
7933
8806
  draggedItemId: UID | undefined;
7934
8807
  start: (direction: Direction, args: DndPartialArgs) => void;
7935
8808
  cancel: () => void;
7936
8809
  }
7937
- declare function useDragAndDropListItems(): State$5;
8810
+ declare function useDragAndDropListItems(): State$6;
7938
8811
 
7939
8812
  declare function useHighlightsOnHover(ref: Ref<HTMLElement>, highlightProvider: HighlightProvider): void;
7940
8813
  declare function useHighlights(highlightProvider: HighlightProvider): void;
7941
8814
 
7942
8815
  declare class MainChartPanelStore extends SpreadsheetStore {
8816
+ mutators: readonly ["activatePanel", "changeChartType"];
7943
8817
  panel: "configuration" | "design";
8818
+ private creationContext;
7944
8819
  activatePanel(panel: "configuration" | "design"): void;
8820
+ changeChartType(figureId: UID, type: ChartType): void;
7945
8821
  }
7946
8822
 
7947
- interface Props$c {
8823
+ interface Props$j {
7948
8824
  onCloseSidePanel: () => void;
7949
8825
  figureId: UID;
7950
8826
  }
7951
- declare class ChartPanel extends Component<Props$c, SpreadsheetChildEnv> {
8827
+ declare class ChartPanel extends Component<Props$j, SpreadsheetChildEnv> {
7952
8828
  static template: string;
7953
8829
  static components: {
7954
8830
  Section: typeof Section;
@@ -7968,7 +8844,32 @@ declare class ChartPanel extends Component<Props$c, SpreadsheetChildEnv> {
7968
8844
  get chartTypes(): Record<string, string>;
7969
8845
  }
7970
8846
 
8847
+ interface Props$i {
8848
+ figureId: UID;
8849
+ definition: PieChartDefinition;
8850
+ canUpdateChart: (figureID: UID, definition: Partial<PieChartDefinition>) => DispatchResult;
8851
+ updateChart: (figureId: UID, definition: Partial<PieChartDefinition>) => DispatchResult;
8852
+ }
8853
+ declare class PieChartDesignPanel extends Component<Props$i, SpreadsheetChildEnv> {
8854
+ static template: string;
8855
+ static components: {
8856
+ GeneralDesignEditor: typeof GeneralDesignEditor;
8857
+ Section: typeof Section;
8858
+ };
8859
+ static props: {
8860
+ figureId: StringConstructor;
8861
+ definition: ObjectConstructor;
8862
+ updateChart: FunctionConstructor;
8863
+ canUpdateChart: {
8864
+ type: FunctionConstructor;
8865
+ optional: boolean;
8866
+ };
8867
+ };
8868
+ updateLegendPosition(ev: any): void;
8869
+ }
8870
+
7971
8871
  declare class FindAndReplaceStore extends SpreadsheetStore implements HighlightProvider {
8872
+ mutators: readonly ["updateSearchOptions", "updateSearchContent", "searchFormulas", "selectPreviousMatch", "selectNextMatch", "replace"];
7972
8873
  private allSheetsMatches;
7973
8874
  private activeSheetMatches;
7974
8875
  private specificRangeMatches;
@@ -7989,44 +8890,291 @@ declare class FindAndReplaceStore extends SpreadsheetStore implements HighlightP
7989
8890
  selectNextMatch(): void;
7990
8891
  get pendingSearch(): boolean;
7991
8892
  handle(cmd: Command): void;
7992
- finalize(): void;
7993
- get allSheetMatchesCount(): number;
7994
- get activeSheetMatchesCount(): number;
7995
- get specificRangeMatchesCount(): number;
7996
- /**
7997
- * Will update the current searchOptions and accordingly update the regex.
7998
- * It will then search for matches using the regex and store them.
7999
- */
8000
- private _updateSearch;
8001
- /**
8002
- * refresh the matches according to the current search options
8003
- */
8004
- private refreshSearch;
8005
- private getSheetsInSearchOrder;
8006
- /**
8007
- * Find matches using the current regex
8008
- */
8009
- private findMatches;
8010
- private findMatchesInSheet;
8011
- /**
8012
- * Changes the selected search cell. Given a direction it will
8013
- * Change the selection to the previous, current or nextCell,
8014
- * if it exists otherwise it will set the selectedMatchIndex to null.
8015
- * It will also reset the index to 0 if the search has changed.
8016
- * It is also used to keep coherence between the selected searchMatch
8017
- * and selectedMatchIndex.
8018
- */
8019
- private selectNextCell;
8020
- /**
8021
- * Replace the value of the currently selected match
8022
- */
8023
- replace(): void;
8024
- /**
8025
- * Apply the replace function to all the matches one time.
8026
- */
8027
- replaceAll(): void;
8028
- private getSearchableString;
8029
- get highlights(): Highlight$1[];
8893
+ finalize(): void;
8894
+ get allSheetMatchesCount(): number;
8895
+ get activeSheetMatchesCount(): number;
8896
+ get specificRangeMatchesCount(): number;
8897
+ /**
8898
+ * Will update the current searchOptions and accordingly update the regex.
8899
+ * It will then search for matches using the regex and store them.
8900
+ */
8901
+ private _updateSearch;
8902
+ /**
8903
+ * refresh the matches according to the current search options
8904
+ */
8905
+ private refreshSearch;
8906
+ private getSheetsInSearchOrder;
8907
+ /**
8908
+ * Find matches using the current regex
8909
+ */
8910
+ private findMatches;
8911
+ private findMatchesInSheet;
8912
+ /**
8913
+ * Changes the selected search cell. Given a direction it will
8914
+ * Change the selection to the previous, current or nextCell,
8915
+ * if it exists otherwise it will set the selectedMatchIndex to null.
8916
+ * It will also reset the index to 0 if the search has changed.
8917
+ * It is also used to keep coherence between the selected searchMatch
8918
+ * and selectedMatchIndex.
8919
+ */
8920
+ private selectNextCell;
8921
+ /**
8922
+ * Replace the value of the currently selected match
8923
+ */
8924
+ replace(): void;
8925
+ /**
8926
+ * Apply the replace function to all the matches one time.
8927
+ */
8928
+ replaceAll(): void;
8929
+ private getSearchableString;
8930
+ get highlights(): Highlight$1[];
8931
+ }
8932
+
8933
+ /** @odoo-module */
8934
+
8935
+ interface Props$h {
8936
+ name: string;
8937
+ displayName: string;
8938
+ onChanged: (name: string) => void;
8939
+ }
8940
+ declare class EditableName extends Component<Props$h, SpreadsheetChildEnv> {
8941
+ static template: string;
8942
+ static props: {
8943
+ name: StringConstructor;
8944
+ displayName: StringConstructor;
8945
+ onChanged: FunctionConstructor;
8946
+ };
8947
+ private state;
8948
+ setup(): void;
8949
+ rename(): void;
8950
+ save(): void;
8951
+ }
8952
+
8953
+ interface Props$g {
8954
+ onFieldPicked: (field: string) => void;
8955
+ fields: PivotField[];
8956
+ }
8957
+ declare class AddDimensionButton extends Component<Props$g, SpreadsheetChildEnv> {
8958
+ static template: string;
8959
+ static components: {
8960
+ Popover: typeof Popover;
8961
+ TextValueProvider: typeof TextValueProvider;
8962
+ };
8963
+ static props: {
8964
+ onFieldPicked: FunctionConstructor;
8965
+ fields: ArrayConstructor;
8966
+ };
8967
+ private buttonRef;
8968
+ private popover;
8969
+ private search;
8970
+ private autoComplete;
8971
+ setup(): void;
8972
+ getProvider(): AutoCompleteProvider;
8973
+ get proposals(): AutoCompleteProposal[];
8974
+ get popoverProps(): {
8975
+ anchorRect: {
8976
+ x: number;
8977
+ y: number;
8978
+ width: number;
8979
+ height: number;
8980
+ };
8981
+ positioning: string;
8982
+ };
8983
+ updateSearch(searchInput: string): void;
8984
+ pickField(field: PivotField): void;
8985
+ togglePopover(): void;
8986
+ onKeyDown(ev: KeyboardEvent): void;
8987
+ }
8988
+
8989
+ interface Props$f {
8990
+ dimension: PivotDimension;
8991
+ onRemoved: (dimension: PivotDimension) => void;
8992
+ }
8993
+ declare class PivotDimension extends Component<Props$f, SpreadsheetChildEnv> {
8994
+ static template: string;
8995
+ static props: {
8996
+ dimension: ObjectConstructor;
8997
+ onRemoved: {
8998
+ type: FunctionConstructor;
8999
+ optional: boolean;
9000
+ };
9001
+ slots: {
9002
+ type: ObjectConstructor;
9003
+ optional: boolean;
9004
+ };
9005
+ };
9006
+ }
9007
+
9008
+ interface Props$e {
9009
+ dimension: PivotDimension$1;
9010
+ onUpdated: (dimension: PivotDimension$1, ev: InputEvent) => void;
9011
+ availableGranularities: Set<string>;
9012
+ allGranularities: string[];
9013
+ }
9014
+ declare class PivotDimensionGranularity extends Component<Props$e, SpreadsheetChildEnv> {
9015
+ static template: string;
9016
+ static props: {
9017
+ dimension: ObjectConstructor;
9018
+ onUpdated: FunctionConstructor;
9019
+ availableGranularities: SetConstructor;
9020
+ allGranularities: ArrayConstructor;
9021
+ };
9022
+ periods: {
9023
+ year: string;
9024
+ quarter: string;
9025
+ month: string;
9026
+ week: string;
9027
+ day: string;
9028
+ year_number: string;
9029
+ quarter_number: string;
9030
+ month_number: string;
9031
+ iso_week_number: string;
9032
+ day_of_month: string;
9033
+ };
9034
+ }
9035
+
9036
+ interface Props$d {
9037
+ dimension: PivotDimension$1;
9038
+ onUpdated: (dimension: PivotDimension$1, ev: InputEvent) => void;
9039
+ }
9040
+ declare class PivotDimensionOrder extends Component<Props$d, SpreadsheetChildEnv> {
9041
+ static template: string;
9042
+ static props: {
9043
+ dimension: ObjectConstructor;
9044
+ onUpdated: FunctionConstructor;
9045
+ };
9046
+ }
9047
+
9048
+ /**
9049
+ * Build a pivot formula expression
9050
+ */
9051
+ declare function makePivotFormula(formula: "PIVOT.VALUE" | "PIVOT.HEADER", args: (string | boolean | number)[]): string;
9052
+ /**
9053
+ * Given an object of form {"1": {...}, "2": {...}, ...} get the maximum ID used
9054
+ * in this object
9055
+ * If the object has no keys, return 0
9056
+ *
9057
+ */
9058
+ declare function getMaxObjectId(o: object): number;
9059
+ /**
9060
+ * Get the first Pivot function description of the given formula.
9061
+ */
9062
+ declare function getFirstPivotFunction(tokens: Token[]): {
9063
+ functionName: string;
9064
+ args: AST[];
9065
+ };
9066
+ /**
9067
+ * Parse a spreadsheet formula and detect the number of PIVOT functions that are
9068
+ * present in the given formula.
9069
+ */
9070
+ declare function getNumberOfPivotFunctions(tokens: Token[]): number;
9071
+ /**
9072
+ * Parse a dimension string into a pivot dimension definition.
9073
+ * e.g "create_date:month" => { name: "create_date", granularity: "month" }
9074
+ */
9075
+ declare function parseDimension(dimension: string): PivotCoreDimension;
9076
+ declare function isDateField(field: PivotField): boolean;
9077
+ /**
9078
+ * Create a proposal entry for the compose autocomplete
9079
+ * to insert a field name string in a formula.
9080
+ */
9081
+ declare function makeFieldProposal(field: PivotField, granularity?: Granularity): {
9082
+ text: string;
9083
+ description: string;
9084
+ htmlContent: {
9085
+ value: string;
9086
+ color: "#00a82d";
9087
+ }[];
9088
+ fuzzySearchKey: string;
9089
+ };
9090
+ /**
9091
+ * Perform the autocomplete of the composer by inserting the value
9092
+ * at the cursor position, replacing the current token if necessary.
9093
+ * Must be bound to the autocomplete provider.
9094
+ */
9095
+ declare function insertTokenAfterArgSeparator(this: {
9096
+ composer: ComposerStore;
9097
+ }, tokenAtCursor: EnrichedToken, value: string): void;
9098
+ /**
9099
+ * Perform the autocomplete of the composer by inserting the value
9100
+ * at the cursor position, replacing the current token if necessary.
9101
+ * Must be bound to the autocomplete provider.
9102
+ * @param {EnrichedToken} tokenAtCursor
9103
+ * @param {string} value
9104
+ */
9105
+ declare function insertTokenAfterLeftParenthesis(this: {
9106
+ composer: ComposerStore;
9107
+ }, tokenAtCursor: EnrichedToken, value: string): void;
9108
+
9109
+ interface Props$c {
9110
+ definition: PivotRuntimeDefinition;
9111
+ onDimensionsUpdated: (definition: Partial<PivotCoreDefinition>) => void;
9112
+ unusedGroupableFields: PivotField[];
9113
+ unusedMeasureFields: PivotField[];
9114
+ unusedDateTimeGranularities: Record<string, Set<string>>;
9115
+ allGranularities: string[];
9116
+ }
9117
+ declare class PivotLayoutConfigurator extends Component<Props$c, SpreadsheetChildEnv> {
9118
+ static template: string;
9119
+ static components: {
9120
+ AddDimensionButton: typeof AddDimensionButton;
9121
+ PivotDimension: typeof PivotDimension;
9122
+ PivotDimensionOrder: typeof PivotDimensionOrder;
9123
+ PivotDimensionGranularity: typeof PivotDimensionGranularity;
9124
+ };
9125
+ static props: {
9126
+ definition: ObjectConstructor;
9127
+ onDimensionsUpdated: FunctionConstructor;
9128
+ unusedGroupableFields: ArrayConstructor;
9129
+ unusedMeasureFields: ArrayConstructor;
9130
+ unusedDateTimeGranularities: ObjectConstructor;
9131
+ allGranularities: ArrayConstructor;
9132
+ };
9133
+ private dimensionsRef;
9134
+ private dragAndDrop;
9135
+ AGGREGATORS: {};
9136
+ isDateField: typeof isDateField;
9137
+ startDragAndDrop(dimension: PivotDimension$1, event: MouseEvent): void;
9138
+ startDragAndDropMeasures(measure: PivotMeasure, event: MouseEvent): void;
9139
+ getDimensionElementsRects(): {
9140
+ x: number;
9141
+ y: number;
9142
+ width: number;
9143
+ height: number;
9144
+ }[];
9145
+ removeDimension(dimension: PivotDimension$1): void;
9146
+ removeMeasureDimension(measure: PivotMeasure): void;
9147
+ addColumnDimension(fieldName: string): void;
9148
+ addRowDimension(fieldName: string): void;
9149
+ addMeasureDimension(fieldName: string): void;
9150
+ updateAggregator(updatedMeasure: PivotMeasure, aggregator: string): void;
9151
+ updateOrder(updateDimension: PivotDimension$1, order?: "asc" | "desc"): void;
9152
+ updateGranularity(dimension: PivotDimension$1, granularity: Granularity): void;
9153
+ }
9154
+
9155
+ declare class PivotSidePanelStore extends SpreadsheetStore {
9156
+ private pivotId;
9157
+ mutators: readonly ["applyUpdate", "renamePivot", "update"];
9158
+ private updatesAreDeferred;
9159
+ private draft;
9160
+ constructor(get: Get, pivotId: UID);
9161
+ handle(cmd: Command): void;
9162
+ get fields(): PivotFields;
9163
+ get pivot(): Pivot<PivotRuntimeDefinition>;
9164
+ get definition(): PivotRuntimeDefinition;
9165
+ get isDirty(): boolean;
9166
+ get unusedMeasureFields(): PivotField[];
9167
+ get unusedGroupableFields(): PivotField[];
9168
+ get allGranularities(): string[];
9169
+ get unusedDateTimeGranularities(): {};
9170
+ reset(pivotId: UID): void;
9171
+ deferUpdates(shouldDefer: boolean): void;
9172
+ applyUpdate(): void;
9173
+ discardPendingUpdate(): void;
9174
+ renamePivot(name: string): void;
9175
+ update(definitionUpdate: Partial<PivotCoreDefinition>): void;
9176
+ private addDefaultDateTimeGranularity;
9177
+ private getUnusedDateTimeGranularities;
8030
9178
  }
8031
9179
 
8032
9180
  declare function isEvaluationError(error: Maybe<CellValue>): error is string;
@@ -8050,23 +9198,35 @@ declare class FunctionRegistry extends Registry<FunctionDescription> {
8050
9198
  };
8051
9199
  }
8052
9200
 
8053
- declare class ChartColors {
8054
- private graphColorIndex;
8055
- next(): string;
8056
- }
8057
9201
  /**
8058
9202
  * Choose a font color based on a background color.
8059
9203
  * The font is white with a dark background.
8060
9204
  */
8061
9205
  declare function chartFontColor(backgroundColor: Color | undefined): Color;
9206
+ declare function getChartAxisTitleRuntime(design?: AxisDesign): {
9207
+ display: boolean;
9208
+ text: string;
9209
+ color?: string;
9210
+ font: {
9211
+ style: "italic" | "normal";
9212
+ weight: "bold" | "normal";
9213
+ };
9214
+ align: "start" | "center" | "end";
9215
+ } | undefined;
8062
9216
 
8063
9217
  /**
8064
9218
  * Get a default chart js configuration
8065
9219
  */
8066
- declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale }: LocaleFormat): Required<ChartConfiguration>;
9220
+ declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale, truncateLabels }: LocaleFormat & {
9221
+ truncateLabels?: boolean;
9222
+ }): Required<ChartConfiguration>;
8067
9223
  /** See https://www.chartjs.org/docs/latest/charts/area.html#filling-modes */
8068
9224
  declare function getFillingMode(index: number): "origin" | number;
8069
9225
 
9226
+ declare function getPivotHighlights(getters: Getters, pivotId: UID): Highlight$1[];
9227
+
9228
+ declare function pivotTimeAdapter(granularity: Granularity): PivotTimeAdapter<string | number | false>;
9229
+
8070
9230
  /**
8071
9231
  * This function tries to load anything that could look like a valid
8072
9232
  * workbookData object. It applies any migrations, if needed, and return a
@@ -8082,6 +9242,7 @@ declare function createEmptyExcelSheet(sheetId: UID, name: string): ExcelSheetDa
8082
9242
  declare function genericRepeat<T extends Command>(getters: Getters, command: T): T;
8083
9243
 
8084
9244
  interface NotificationStore {
9245
+ mutators: readonly ["notifyUser", "raiseError", "askConfirmation"];
8085
9246
  notifyUser: (notification: InformationNotification) => any;
8086
9247
  raiseError: (text: string, callback?: () => void) => any;
8087
9248
  askConfirmation: (content: string, confirm: () => any, cancel?: () => any) => any;
@@ -8092,7 +9253,8 @@ interface Renderer {
8092
9253
  drawLayer(ctx: GridRenderingContext, layer: LayerName): void;
8093
9254
  renderingLayers: Readonly<LayerName[]>;
8094
9255
  }
8095
- declare class RendererStore extends ReactiveStore {
9256
+ declare class RendererStore {
9257
+ mutators: readonly ["register", "unRegister"];
8096
9258
  private renderers;
8097
9259
  register(renderer: Renderer): void;
8098
9260
  unRegister(renderer: Renderer): void;
@@ -8246,6 +9408,7 @@ declare class BottomBarSheet extends Component<Props$b, SpreadsheetChildEnv> {
8246
9408
  private sheetDivRef;
8247
9409
  private sheetNameRef;
8248
9410
  private editionState;
9411
+ private DOMFocusableElementStore;
8249
9412
  setup(): void;
8250
9413
  private focusInputAndSelectContent;
8251
9414
  private scrollToSheet;
@@ -8281,7 +9444,7 @@ declare class BottomBarStatistic extends Component<Props$a, SpreadsheetChildEnv>
8281
9444
  Ripple: typeof Ripple;
8282
9445
  };
8283
9446
  selectedStatisticFn: string;
8284
- private statisticFnResults;
9447
+ private store;
8285
9448
  setup(): void;
8286
9449
  getSelectedStatistic(): string | undefined;
8287
9450
  listSelectionStatistics(ev: MouseEvent): void;
@@ -8340,13 +9503,21 @@ declare class BottomBar extends Component<Props$9, SpreadsheetChildEnv> {
8340
9503
  get sheetListMaxScroll(): number;
8341
9504
  }
8342
9505
 
8343
- interface Props$8 {
8344
- }
8345
9506
  interface ClickableCell {
8346
9507
  coordinates: Rect;
8347
- position: Position$1;
9508
+ position: CellPosition;
8348
9509
  action: (position: CellPosition, env: SpreadsheetChildEnv) => void;
8349
- tKey: string;
9510
+ }
9511
+ declare class ClickableCellsStore extends SpreadsheetStore {
9512
+ private _clickableCells;
9513
+ private _registryItems;
9514
+ handle(cmd: Command): void;
9515
+ private getClickableAction;
9516
+ private findClickableAction;
9517
+ get clickableCells(): ClickableCell[];
9518
+ }
9519
+
9520
+ interface Props$8 {
8350
9521
  }
8351
9522
  declare class SpreadsheetDashboard extends Component<Props$8, SpreadsheetChildEnv> {
8352
9523
  static template: string;
@@ -8357,12 +9528,12 @@ declare class SpreadsheetDashboard extends Component<Props$8, SpreadsheetChildEn
8357
9528
  Popover: typeof Popover;
8358
9529
  VerticalScrollBar: typeof VerticalScrollBar;
8359
9530
  HorizontalScrollBar: typeof HorizontalScrollBar;
8360
- FilterIconsOverlay: typeof FilterIconsOverlay;
8361
9531
  };
8362
9532
  protected cellPopovers: Store<CellPopoverStore>;
8363
9533
  onMouseWheel: (ev: WheelEvent) => void;
8364
9534
  canvasPosition: DOMCoordinates;
8365
9535
  hoveredCell: Store<HoveredCellStore>;
9536
+ clickableCellsStore: Store<ClickableCellsStore>;
8366
9537
  setup(): void;
8367
9538
  onCellHovered({ col, row }: {
8368
9539
  col: any;
@@ -8378,7 +9549,6 @@ declare class SpreadsheetDashboard extends Component<Props$8, SpreadsheetChildEn
8378
9549
  *
8379
9550
  */
8380
9551
  getClickableCells(): ClickableCell[];
8381
- getClickableAction(position: CellPosition): false | ((position: CellPosition, env: SpreadsheetChildEnv) => void);
8382
9552
  selectClickableCell(clickableCell: ClickableCell): void;
8383
9553
  onClosePopover(): void;
8384
9554
  onGridResized({ height, width }: DOMDimension): void;
@@ -8570,147 +9740,6 @@ declare namespace ACTION_EDIT {
8570
9740
  };
8571
9741
  }
8572
9742
 
8573
- declare const formatNumberAutomatic: ActionSpec;
8574
- declare const formatNumberPlainText: ActionSpec;
8575
- declare const formatNumberNumber: ActionSpec;
8576
- declare const formatPercent: ActionSpec;
8577
- declare const formatNumberPercent: ActionSpec;
8578
- declare const formatNumberCurrency: ActionSpec;
8579
- declare const formatNumberCurrencyRounded: ActionSpec;
8580
- declare const formatCustomCurrency: ActionSpec;
8581
- declare const formatNumberDate: ActionSpec;
8582
- declare const formatNumberTime: ActionSpec;
8583
- declare const formatNumberDateTime: ActionSpec;
8584
- declare const formatNumberDuration: ActionSpec;
8585
- declare const moreFormats: ActionSpec;
8586
- declare const formatNumberFullDateTime: ActionSpec;
8587
- declare const formatNumberFullWeekDayAndMonth: ActionSpec;
8588
- declare const formatNumberDayAndFullMonth: ActionSpec;
8589
- declare const formatNumberShortWeekDay: ActionSpec;
8590
- declare const formatNumberDayAndShortMonth: ActionSpec;
8591
- declare const formatNumberFullMonth: ActionSpec;
8592
- declare const formatNumberShortMonth: ActionSpec;
8593
- declare const incraseDecimalPlaces: ActionSpec;
8594
- declare const decraseDecimalPlaces: ActionSpec;
8595
- declare const formatBold: ActionSpec;
8596
- declare const formatItalic: ActionSpec;
8597
- declare const formatUnderline: ActionSpec;
8598
- declare const formatStrikethrough: ActionSpec;
8599
- declare const formatFontSize: ActionSpec;
8600
- declare const formatAlignment: ActionSpec;
8601
- declare const formatAlignmentHorizontal: ActionSpec;
8602
- declare const formatAlignmentLeft: ActionSpec;
8603
- declare const formatAlignmentCenter: ActionSpec;
8604
- declare const formatAlignmentRight: ActionSpec;
8605
- declare const formatAlignmentVertical: ActionSpec;
8606
- declare const formatAlignmentTop: ActionSpec;
8607
- declare const formatAlignmentMiddle: ActionSpec;
8608
- declare const formatAlignmentBottom: ActionSpec;
8609
- declare const formatWrappingIcon: ActionSpec;
8610
- declare const formatWrapping: ActionSpec;
8611
- declare const formatWrappingOverflow: ActionSpec;
8612
- declare const formatWrappingWrap: ActionSpec;
8613
- declare const formatWrappingClip: ActionSpec;
8614
- declare const textColor: ActionSpec;
8615
- declare const fillColor: ActionSpec;
8616
- declare const formatCF: ActionSpec;
8617
- declare const clearFormat: ActionSpec;
8618
-
8619
- declare const ACTION_FORMAT_clearFormat: typeof clearFormat;
8620
- declare const ACTION_FORMAT_decraseDecimalPlaces: typeof decraseDecimalPlaces;
8621
- declare const ACTION_FORMAT_fillColor: typeof fillColor;
8622
- declare const ACTION_FORMAT_formatAlignment: typeof formatAlignment;
8623
- declare const ACTION_FORMAT_formatAlignmentBottom: typeof formatAlignmentBottom;
8624
- declare const ACTION_FORMAT_formatAlignmentCenter: typeof formatAlignmentCenter;
8625
- declare const ACTION_FORMAT_formatAlignmentHorizontal: typeof formatAlignmentHorizontal;
8626
- declare const ACTION_FORMAT_formatAlignmentLeft: typeof formatAlignmentLeft;
8627
- declare const ACTION_FORMAT_formatAlignmentMiddle: typeof formatAlignmentMiddle;
8628
- declare const ACTION_FORMAT_formatAlignmentRight: typeof formatAlignmentRight;
8629
- declare const ACTION_FORMAT_formatAlignmentTop: typeof formatAlignmentTop;
8630
- declare const ACTION_FORMAT_formatAlignmentVertical: typeof formatAlignmentVertical;
8631
- declare const ACTION_FORMAT_formatBold: typeof formatBold;
8632
- declare const ACTION_FORMAT_formatCF: typeof formatCF;
8633
- declare const ACTION_FORMAT_formatCustomCurrency: typeof formatCustomCurrency;
8634
- declare const ACTION_FORMAT_formatFontSize: typeof formatFontSize;
8635
- declare const ACTION_FORMAT_formatItalic: typeof formatItalic;
8636
- declare const ACTION_FORMAT_formatNumberAutomatic: typeof formatNumberAutomatic;
8637
- declare const ACTION_FORMAT_formatNumberCurrency: typeof formatNumberCurrency;
8638
- declare const ACTION_FORMAT_formatNumberCurrencyRounded: typeof formatNumberCurrencyRounded;
8639
- declare const ACTION_FORMAT_formatNumberDate: typeof formatNumberDate;
8640
- declare const ACTION_FORMAT_formatNumberDateTime: typeof formatNumberDateTime;
8641
- declare const ACTION_FORMAT_formatNumberDayAndFullMonth: typeof formatNumberDayAndFullMonth;
8642
- declare const ACTION_FORMAT_formatNumberDayAndShortMonth: typeof formatNumberDayAndShortMonth;
8643
- declare const ACTION_FORMAT_formatNumberDuration: typeof formatNumberDuration;
8644
- declare const ACTION_FORMAT_formatNumberFullDateTime: typeof formatNumberFullDateTime;
8645
- declare const ACTION_FORMAT_formatNumberFullMonth: typeof formatNumberFullMonth;
8646
- declare const ACTION_FORMAT_formatNumberFullWeekDayAndMonth: typeof formatNumberFullWeekDayAndMonth;
8647
- declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
8648
- declare const ACTION_FORMAT_formatNumberPercent: typeof formatNumberPercent;
8649
- declare const ACTION_FORMAT_formatNumberPlainText: typeof formatNumberPlainText;
8650
- declare const ACTION_FORMAT_formatNumberShortMonth: typeof formatNumberShortMonth;
8651
- declare const ACTION_FORMAT_formatNumberShortWeekDay: typeof formatNumberShortWeekDay;
8652
- declare const ACTION_FORMAT_formatNumberTime: typeof formatNumberTime;
8653
- declare const ACTION_FORMAT_formatPercent: typeof formatPercent;
8654
- declare const ACTION_FORMAT_formatStrikethrough: typeof formatStrikethrough;
8655
- declare const ACTION_FORMAT_formatUnderline: typeof formatUnderline;
8656
- declare const ACTION_FORMAT_formatWrapping: typeof formatWrapping;
8657
- declare const ACTION_FORMAT_formatWrappingClip: typeof formatWrappingClip;
8658
- declare const ACTION_FORMAT_formatWrappingIcon: typeof formatWrappingIcon;
8659
- declare const ACTION_FORMAT_formatWrappingOverflow: typeof formatWrappingOverflow;
8660
- declare const ACTION_FORMAT_formatWrappingWrap: typeof formatWrappingWrap;
8661
- declare const ACTION_FORMAT_incraseDecimalPlaces: typeof incraseDecimalPlaces;
8662
- declare const ACTION_FORMAT_moreFormats: typeof moreFormats;
8663
- declare const ACTION_FORMAT_textColor: typeof textColor;
8664
- declare namespace ACTION_FORMAT {
8665
- export {
8666
- ACTION_FORMAT_clearFormat as clearFormat,
8667
- ACTION_FORMAT_decraseDecimalPlaces as decraseDecimalPlaces,
8668
- ACTION_FORMAT_fillColor as fillColor,
8669
- ACTION_FORMAT_formatAlignment as formatAlignment,
8670
- ACTION_FORMAT_formatAlignmentBottom as formatAlignmentBottom,
8671
- ACTION_FORMAT_formatAlignmentCenter as formatAlignmentCenter,
8672
- ACTION_FORMAT_formatAlignmentHorizontal as formatAlignmentHorizontal,
8673
- ACTION_FORMAT_formatAlignmentLeft as formatAlignmentLeft,
8674
- ACTION_FORMAT_formatAlignmentMiddle as formatAlignmentMiddle,
8675
- ACTION_FORMAT_formatAlignmentRight as formatAlignmentRight,
8676
- ACTION_FORMAT_formatAlignmentTop as formatAlignmentTop,
8677
- ACTION_FORMAT_formatAlignmentVertical as formatAlignmentVertical,
8678
- ACTION_FORMAT_formatBold as formatBold,
8679
- ACTION_FORMAT_formatCF as formatCF,
8680
- ACTION_FORMAT_formatCustomCurrency as formatCustomCurrency,
8681
- ACTION_FORMAT_formatFontSize as formatFontSize,
8682
- ACTION_FORMAT_formatItalic as formatItalic,
8683
- ACTION_FORMAT_formatNumberAutomatic as formatNumberAutomatic,
8684
- ACTION_FORMAT_formatNumberCurrency as formatNumberCurrency,
8685
- ACTION_FORMAT_formatNumberCurrencyRounded as formatNumberCurrencyRounded,
8686
- ACTION_FORMAT_formatNumberDate as formatNumberDate,
8687
- ACTION_FORMAT_formatNumberDateTime as formatNumberDateTime,
8688
- ACTION_FORMAT_formatNumberDayAndFullMonth as formatNumberDayAndFullMonth,
8689
- ACTION_FORMAT_formatNumberDayAndShortMonth as formatNumberDayAndShortMonth,
8690
- ACTION_FORMAT_formatNumberDuration as formatNumberDuration,
8691
- ACTION_FORMAT_formatNumberFullDateTime as formatNumberFullDateTime,
8692
- ACTION_FORMAT_formatNumberFullMonth as formatNumberFullMonth,
8693
- ACTION_FORMAT_formatNumberFullWeekDayAndMonth as formatNumberFullWeekDayAndMonth,
8694
- ACTION_FORMAT_formatNumberNumber as formatNumberNumber,
8695
- ACTION_FORMAT_formatNumberPercent as formatNumberPercent,
8696
- ACTION_FORMAT_formatNumberPlainText as formatNumberPlainText,
8697
- ACTION_FORMAT_formatNumberShortMonth as formatNumberShortMonth,
8698
- ACTION_FORMAT_formatNumberShortWeekDay as formatNumberShortWeekDay,
8699
- ACTION_FORMAT_formatNumberTime as formatNumberTime,
8700
- ACTION_FORMAT_formatPercent as formatPercent,
8701
- ACTION_FORMAT_formatStrikethrough as formatStrikethrough,
8702
- ACTION_FORMAT_formatUnderline as formatUnderline,
8703
- ACTION_FORMAT_formatWrapping as formatWrapping,
8704
- ACTION_FORMAT_formatWrappingClip as formatWrappingClip,
8705
- ACTION_FORMAT_formatWrappingIcon as formatWrappingIcon,
8706
- ACTION_FORMAT_formatWrappingOverflow as formatWrappingOverflow,
8707
- ACTION_FORMAT_formatWrappingWrap as formatWrappingWrap,
8708
- ACTION_FORMAT_incraseDecimalPlaces as incraseDecimalPlaces,
8709
- ACTION_FORMAT_moreFormats as moreFormats,
8710
- ACTION_FORMAT_textColor as textColor,
8711
- };
8712
- }
8713
-
8714
9743
  interface Props$5 {
8715
9744
  action: ActionSpec;
8716
9745
  hasTriangleDownIcon?: boolean;
@@ -8751,7 +9780,7 @@ declare class ActionButton extends Component<Props$5, SpreadsheetChildEnv> {
8751
9780
  }
8752
9781
 
8753
9782
  type Tool = "borderColorTool" | "borderTypeTool";
8754
- interface State$4 {
9783
+ interface State$5 {
8755
9784
  activeTool: Tool | undefined;
8756
9785
  }
8757
9786
  interface BorderEditorProps {
@@ -8802,7 +9831,7 @@ declare class BorderEditor extends Component<BorderEditorProps, SpreadsheetChild
8802
9831
  el: HTMLElement | null;
8803
9832
  };
8804
9833
  borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
8805
- state: State$4;
9834
+ state: State$5;
8806
9835
  toggleDropdownTool(tool: Tool): void;
8807
9836
  closeDropdown(): void;
8808
9837
  setBorderPosition(position: BorderPosition): void;
@@ -8820,7 +9849,7 @@ interface Props$4 {
8820
9849
  dropdownMaxHeight?: Pixel;
8821
9850
  class?: string;
8822
9851
  }
8823
- interface State$3 {
9852
+ interface State$4 {
8824
9853
  currentColor: Color;
8825
9854
  currentStyle: BorderStyle;
8826
9855
  currentPosition: BorderPosition | undefined;
@@ -8849,7 +9878,7 @@ declare class BorderEditorWidget extends Component<Props$4, SpreadsheetChildEnv>
8849
9878
  borderEditorButtonRef: {
8850
9879
  el: HTMLElement | null;
8851
9880
  };
8852
- state: State$3;
9881
+ state: State$4;
8853
9882
  get borderEditorAnchorRect(): Rect;
8854
9883
  onBorderPositionPicked(position: BorderPosition): void;
8855
9884
  onBorderColorPicked(color: Color): void;
@@ -8868,10 +9897,11 @@ declare class TopBarComposer extends Component<any, SpreadsheetChildEnv> {
8868
9897
  get focus(): Omit<ComposerFocusType, "cellFocus">;
8869
9898
  get composerStyle(): string;
8870
9899
  get containerStyle(): string;
9900
+ get delimitation(): DOMDimension;
8871
9901
  onFocus(selection: ComposerSelection): void;
8872
9902
  }
8873
9903
 
8874
- interface State$2 {
9904
+ interface State$3 {
8875
9905
  isOpen: boolean;
8876
9906
  }
8877
9907
  interface Props$3 {
@@ -8888,7 +9918,7 @@ declare class FontSizeEditor extends Component<Props$3, SpreadsheetChildEnv> {
8888
9918
  };
8889
9919
  static components: {};
8890
9920
  fontSizes: number[];
8891
- dropdown: State$2;
9921
+ dropdown: State$3;
8892
9922
  private inputRef;
8893
9923
  private rootEditorRef;
8894
9924
  setup(): void;
@@ -8905,15 +9935,43 @@ declare class FontSizeEditor extends Component<Props$3, SpreadsheetChildEnv> {
8905
9935
 
8906
9936
  interface Props$2 {
8907
9937
  tableConfig: TableConfig;
9938
+ tableStyle: TableStyle;
9939
+ class: string;
9940
+ styleId?: string;
9941
+ selected?: boolean;
9942
+ onClick?: () => void;
8908
9943
  }
8909
9944
  declare class TableStylePreview extends Component<Props$2, SpreadsheetChildEnv> {
8910
9945
  static template: string;
9946
+ static components: {
9947
+ Menu: typeof Menu;
9948
+ };
8911
9949
  static props: {
8912
9950
  tableConfig: ObjectConstructor;
9951
+ tableStyle: ObjectConstructor;
9952
+ class: StringConstructor;
9953
+ styleId: {
9954
+ type: StringConstructor;
9955
+ optional: boolean;
9956
+ };
9957
+ selected: {
9958
+ type: BooleanConstructor;
9959
+ optional: boolean;
9960
+ };
9961
+ onClick: {
9962
+ type: FunctionConstructor;
9963
+ optional: boolean;
9964
+ };
8913
9965
  };
8914
9966
  private canvasRef;
9967
+ menu: MenuState;
8915
9968
  setup(): void;
8916
9969
  private drawTable;
9970
+ onContextMenu(event: MouseEvent): void;
9971
+ closeMenu(): void;
9972
+ get styleName(): string;
9973
+ get isStyleEditable(): boolean;
9974
+ editTableStyle(): void;
8917
9975
  }
8918
9976
 
8919
9977
  interface TableStylesPopoverProps {
@@ -8926,6 +9984,9 @@ interface TableStylesPopoverProps {
8926
9984
  type CustomTablePopoverMouseEvent = MouseEvent & {
8927
9985
  hasClosedTableStylesPopover?: boolean;
8928
9986
  };
9987
+ interface State$2 {
9988
+ selectedCategory: string;
9989
+ }
8929
9990
  declare class TableStylesPopover extends Component<TableStylesPopoverProps, SpreadsheetChildEnv> {
8930
9991
  static template: string;
8931
9992
  static components: {
@@ -8945,19 +10006,20 @@ declare class TableStylesPopover extends Component<TableStylesPopoverProps, Spre
8945
10006
  optional: boolean;
8946
10007
  };
8947
10008
  };
8948
- stylePresets: Record<string, TableStyle>;
8949
10009
  categories: {
8950
- none: string;
8951
10010
  light: string;
8952
10011
  medium: string;
8953
10012
  dark: string;
10013
+ custom: string;
8954
10014
  };
8955
10015
  private tableStyleListRef;
10016
+ state: State$2;
10017
+ menu: MenuState;
8956
10018
  setup(): void;
8957
10019
  onExternalClick(ev: CustomTablePopoverMouseEvent): void;
8958
- getPresetsByCategory(category: string): string[];
8959
- getTableConfig(styleId: string): TableConfig;
8960
- getStyleName(styleId: string): string;
10020
+ get displayedStyles(): string[];
10021
+ get initialSelectedCategory(): string;
10022
+ newTableStyle(): void;
8961
10023
  }
8962
10024
 
8963
10025
  interface State$1 {
@@ -9073,7 +10135,7 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
9073
10135
  private notificationStore;
9074
10136
  private composerFocusStore;
9075
10137
  get model(): Model;
9076
- getStyle(): string;
10138
+ getStyle(): "grid-template-rows: auto;" | "grid-template-rows: 63px auto 37px";
9077
10139
  setup(): void;
9078
10140
  private bindModelEvents;
9079
10141
  private unbindModelEvents;
@@ -9103,6 +10165,8 @@ declare const CellErrorType: {
9103
10165
  readonly BadExpression: "#BAD_EXPR";
9104
10166
  readonly CircularDependency: "#CYCLE";
9105
10167
  readonly UnknownFunction: "#NAME?";
10168
+ readonly DivisionByZero: "#DIV/0!";
10169
+ readonly SpilledBlocked: "#SPILL!";
9106
10170
  readonly GenericError: "#ERROR";
9107
10171
  };
9108
10172
  declare class EvaluationError extends Error {
@@ -9169,13 +10233,13 @@ declare const registries: {
9169
10233
  inverseCommandRegistry: Registry<(cmd: CoreCommand) => CoreCommand[]>;
9170
10234
  urlRegistry: Registry<LinkSpec>;
9171
10235
  cellPopoverRegistry: Registry<PopoverBuilders>;
9172
- numberFormatMenuRegistry: MenuItemRegistry;
10236
+ numberFormatMenuRegistry: Registry<NumberFormatActionSpec>;
9173
10237
  repeatLocalCommandTransformRegistry: Registry<(getters: Getters, cmd: LocalCommand, childCommands: readonly CoreCommand[]) => LocalCommand | CoreCommand[] | undefined>;
9174
10238
  repeatCommandTransformRegistry: Registry<(getters: Getters, cmd: CoreCommand) => CoreCommand | undefined>;
9175
10239
  clipboardHandlersRegistries: {
9176
10240
  figureHandlers: Registry<{
9177
10241
  new (getters: Getters, dispatch: {
9178
- <T extends "CUT" | "COPY" | "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" | "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" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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, {
10242
+ <T extends "CUT" | "COPY" | "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" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "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" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT", C extends Extract<UpdateCellCommand, {
9179
10243
  type: T;
9180
10244
  }> | Extract<UpdateCellPositionCommand, {
9181
10245
  type: T;
@@ -9257,6 +10321,10 @@ declare const registries: {
9257
10321
  type: T;
9258
10322
  }> | Extract<UpdateTableCommand, {
9259
10323
  type: T;
10324
+ }> | Extract<CreateTableStyleCommand, {
10325
+ type: T;
10326
+ }> | Extract<RemoveTableStyleCommand, {
10327
+ type: T;
9260
10328
  }> | Extract<GroupHeadersCommand, {
9261
10329
  type: T;
9262
10330
  }> | Extract<UnGroupHeadersCommand, {
@@ -9279,6 +10347,18 @@ declare const registries: {
9279
10347
  type: T;
9280
10348
  }> | Extract<UpdateLocaleCommand, {
9281
10349
  type: T;
10350
+ }> | Extract<AddPivotCommand, {
10351
+ type: T;
10352
+ }> | Extract<UpdatePivotCommand, {
10353
+ type: T;
10354
+ }> | Extract<InsertPivotCommand, {
10355
+ type: T;
10356
+ }> | Extract<RenamePivotCommand, {
10357
+ type: T;
10358
+ }> | Extract<RemovePivotCommand, {
10359
+ type: T;
10360
+ }> | Extract<DuplicatePivotCommand, {
10361
+ type: T;
9282
10362
  }> | Extract<RequestUndoCommand, {
9283
10363
  type: T;
9284
10364
  }> | Extract<RequestRedoCommand, {
@@ -9321,8 +10401,6 @@ declare const registries: {
9321
10401
  type: T;
9322
10402
  }> | Extract<StartChangeHighlightCommand, {
9323
10403
  type: T;
9324
- }> | Extract<SetColorCommand, {
9325
- type: T;
9326
10404
  }> | Extract<StartCommand, {
9327
10405
  type: T;
9328
10406
  }> | Extract<AutofillCommand, {
@@ -9371,10 +10449,14 @@ declare const registries: {
9371
10449
  type: T;
9372
10450
  }> | Extract<TrimWhitespaceCommand, {
9373
10451
  type: T;
9374
- }> | Extract<RenderCanvasCommand, {
10452
+ }> | Extract<ResizeTableCommand, {
10453
+ type: T;
10454
+ }> | Extract<RefreshPivotCommand, {
10455
+ type: T;
10456
+ }> | Extract<InsertNewPivotCommand, {
9375
10457
  type: T;
9376
10458
  }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
9377
- <T_1 extends "CUT" | "COPY" | "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" | "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" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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, {
10459
+ <T_1 extends "CUT" | "COPY" | "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" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "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" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT", C_1 extends Extract<UpdateCellCommand, {
9378
10460
  type: T_1;
9379
10461
  }> | Extract<UpdateCellPositionCommand, {
9380
10462
  type: T_1;
@@ -9456,6 +10538,10 @@ declare const registries: {
9456
10538
  type: T_1;
9457
10539
  }> | Extract<UpdateTableCommand, {
9458
10540
  type: T_1;
10541
+ }> | Extract<CreateTableStyleCommand, {
10542
+ type: T_1;
10543
+ }> | Extract<RemoveTableStyleCommand, {
10544
+ type: T_1;
9459
10545
  }> | Extract<GroupHeadersCommand, {
9460
10546
  type: T_1;
9461
10547
  }> | Extract<UnGroupHeadersCommand, {
@@ -9478,6 +10564,18 @@ declare const registries: {
9478
10564
  type: T_1;
9479
10565
  }> | Extract<UpdateLocaleCommand, {
9480
10566
  type: T_1;
10567
+ }> | Extract<AddPivotCommand, {
10568
+ type: T_1;
10569
+ }> | Extract<UpdatePivotCommand, {
10570
+ type: T_1;
10571
+ }> | Extract<InsertPivotCommand, {
10572
+ type: T_1;
10573
+ }> | Extract<RenamePivotCommand, {
10574
+ type: T_1;
10575
+ }> | Extract<RemovePivotCommand, {
10576
+ type: T_1;
10577
+ }> | Extract<DuplicatePivotCommand, {
10578
+ type: T_1;
9481
10579
  }> | Extract<RequestUndoCommand, {
9482
10580
  type: T_1;
9483
10581
  }> | Extract<RequestRedoCommand, {
@@ -9520,8 +10618,6 @@ declare const registries: {
9520
10618
  type: T_1;
9521
10619
  }> | Extract<StartChangeHighlightCommand, {
9522
10620
  type: T_1;
9523
- }> | Extract<SetColorCommand, {
9524
- type: T_1;
9525
10621
  }> | Extract<StartCommand, {
9526
10622
  type: T_1;
9527
10623
  }> | Extract<AutofillCommand, {
@@ -9570,14 +10666,18 @@ declare const registries: {
9570
10666
  type: T_1;
9571
10667
  }> | Extract<TrimWhitespaceCommand, {
9572
10668
  type: T_1;
9573
- }> | Extract<RenderCanvasCommand, {
10669
+ }> | Extract<ResizeTableCommand, {
10670
+ type: T_1;
10671
+ }> | Extract<RefreshPivotCommand, {
10672
+ type: T_1;
10673
+ }> | Extract<InsertNewPivotCommand, {
9574
10674
  type: T_1;
9575
10675
  }>>(type: T_1, r: Omit<C_1, "type">): DispatchResult;
9576
10676
  }): AbstractFigureClipboardHandler<any>;
9577
10677
  }>;
9578
10678
  cellHandlers: Registry<{
9579
10679
  new (getters: Getters, dispatch: {
9580
- <T extends "CUT" | "COPY" | "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" | "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" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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, {
10680
+ <T extends "CUT" | "COPY" | "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" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "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" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT", C extends Extract<UpdateCellCommand, {
9581
10681
  type: T;
9582
10682
  }> | Extract<UpdateCellPositionCommand, {
9583
10683
  type: T;
@@ -9659,6 +10759,10 @@ declare const registries: {
9659
10759
  type: T;
9660
10760
  }> | Extract<UpdateTableCommand, {
9661
10761
  type: T;
10762
+ }> | Extract<CreateTableStyleCommand, {
10763
+ type: T;
10764
+ }> | Extract<RemoveTableStyleCommand, {
10765
+ type: T;
9662
10766
  }> | Extract<GroupHeadersCommand, {
9663
10767
  type: T;
9664
10768
  }> | Extract<UnGroupHeadersCommand, {
@@ -9681,6 +10785,18 @@ declare const registries: {
9681
10785
  type: T;
9682
10786
  }> | Extract<UpdateLocaleCommand, {
9683
10787
  type: T;
10788
+ }> | Extract<AddPivotCommand, {
10789
+ type: T;
10790
+ }> | Extract<UpdatePivotCommand, {
10791
+ type: T;
10792
+ }> | Extract<InsertPivotCommand, {
10793
+ type: T;
10794
+ }> | Extract<RenamePivotCommand, {
10795
+ type: T;
10796
+ }> | Extract<RemovePivotCommand, {
10797
+ type: T;
10798
+ }> | Extract<DuplicatePivotCommand, {
10799
+ type: T;
9684
10800
  }> | Extract<RequestUndoCommand, {
9685
10801
  type: T;
9686
10802
  }> | Extract<RequestRedoCommand, {
@@ -9723,8 +10839,6 @@ declare const registries: {
9723
10839
  type: T;
9724
10840
  }> | Extract<StartChangeHighlightCommand, {
9725
10841
  type: T;
9726
- }> | Extract<SetColorCommand, {
9727
- type: T;
9728
10842
  }> | Extract<StartCommand, {
9729
10843
  type: T;
9730
10844
  }> | Extract<AutofillCommand, {
@@ -9773,10 +10887,14 @@ declare const registries: {
9773
10887
  type: T;
9774
10888
  }> | Extract<TrimWhitespaceCommand, {
9775
10889
  type: T;
9776
- }> | Extract<RenderCanvasCommand, {
10890
+ }> | Extract<ResizeTableCommand, {
10891
+ type: T;
10892
+ }> | Extract<RefreshPivotCommand, {
10893
+ type: T;
10894
+ }> | Extract<InsertNewPivotCommand, {
9777
10895
  type: T;
9778
10896
  }>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
9779
- <T_1 extends "CUT" | "COPY" | "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" | "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" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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, {
10897
+ <T_1 extends "CUT" | "COPY" | "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" | "CREATE_TABLE_STYLE" | "REMOVE_TABLE_STYLE" | "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" | "ADD_PIVOT" | "UPDATE_PIVOT" | "INSERT_PIVOT" | "RENAME_PIVOT" | "REMOVE_PIVOT" | "DUPLICATE_PIVOT" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "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" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "AUTOFILL_TABLE_COLUMN" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "REPLACE_SEARCH" | "SORT_CELLS" | "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" | "RESIZE_TABLE" | "REFRESH_PIVOT" | "INSERT_NEW_PIVOT", C_1 extends Extract<UpdateCellCommand, {
9780
10898
  type: T_1;
9781
10899
  }> | Extract<UpdateCellPositionCommand, {
9782
10900
  type: T_1;
@@ -9858,6 +10976,10 @@ declare const registries: {
9858
10976
  type: T_1;
9859
10977
  }> | Extract<UpdateTableCommand, {
9860
10978
  type: T_1;
10979
+ }> | Extract<CreateTableStyleCommand, {
10980
+ type: T_1;
10981
+ }> | Extract<RemoveTableStyleCommand, {
10982
+ type: T_1;
9861
10983
  }> | Extract<GroupHeadersCommand, {
9862
10984
  type: T_1;
9863
10985
  }> | Extract<UnGroupHeadersCommand, {
@@ -9880,6 +11002,18 @@ declare const registries: {
9880
11002
  type: T_1;
9881
11003
  }> | Extract<UpdateLocaleCommand, {
9882
11004
  type: T_1;
11005
+ }> | Extract<AddPivotCommand, {
11006
+ type: T_1;
11007
+ }> | Extract<UpdatePivotCommand, {
11008
+ type: T_1;
11009
+ }> | Extract<InsertPivotCommand, {
11010
+ type: T_1;
11011
+ }> | Extract<RenamePivotCommand, {
11012
+ type: T_1;
11013
+ }> | Extract<RemovePivotCommand, {
11014
+ type: T_1;
11015
+ }> | Extract<DuplicatePivotCommand, {
11016
+ type: T_1;
9883
11017
  }> | Extract<RequestUndoCommand, {
9884
11018
  type: T_1;
9885
11019
  }> | Extract<RequestRedoCommand, {
@@ -9922,8 +11056,6 @@ declare const registries: {
9922
11056
  type: T_1;
9923
11057
  }> | Extract<StartChangeHighlightCommand, {
9924
11058
  type: T_1;
9925
- }> | Extract<SetColorCommand, {
9926
- type: T_1;
9927
11059
  }> | Extract<StartCommand, {
9928
11060
  type: T_1;
9929
11061
  }> | Extract<AutofillCommand, {
@@ -9972,12 +11104,20 @@ declare const registries: {
9972
11104
  type: T_1;
9973
11105
  }> | Extract<TrimWhitespaceCommand, {
9974
11106
  type: T_1;
9975
- }> | Extract<RenderCanvasCommand, {
11107
+ }> | Extract<ResizeTableCommand, {
11108
+ type: T_1;
11109
+ }> | Extract<RefreshPivotCommand, {
11110
+ type: T_1;
11111
+ }> | Extract<InsertNewPivotCommand, {
9976
11112
  type: T_1;
9977
11113
  }>>(type: T_1, r: Omit<C_1, "type">): DispatchResult;
9978
11114
  }): AbstractCellClipboardHandler<any, any>;
9979
11115
  }>;
9980
11116
  };
11117
+ pivotRegistry: Registry<PivotRegistryItem>;
11118
+ pivotTimeAdapterRegistry: Registry<PivotTimeAdapter<string | number | false>>;
11119
+ pivotSidePanelRegistry: Registry<PivotRegistryItem$1>;
11120
+ supportedPivotExplodedFormulaRegistry: Registry<boolean>;
9981
11121
  };
9982
11122
  declare const helpers: {
9983
11123
  arg: typeof arg;
@@ -9995,13 +11135,14 @@ declare const helpers: {
9995
11135
  UuidGenerator: typeof UuidGenerator;
9996
11136
  formatValue: typeof formatValue;
9997
11137
  createCurrencyFormat: typeof createCurrencyFormat;
11138
+ ColorGenerator: typeof ColorGenerator;
9998
11139
  computeTextWidth: typeof computeTextWidth;
9999
11140
  createEmptyWorkbookData: typeof createEmptyWorkbookData;
10000
11141
  createEmptySheet: typeof createEmptySheet;
10001
11142
  createEmptyExcelSheet: typeof createEmptyExcelSheet;
10002
11143
  getDefaultChartJsRuntime: typeof getDefaultChartJsRuntime;
10003
11144
  chartFontColor: typeof chartFontColor;
10004
- ChartColors: typeof ChartColors;
11145
+ getChartAxisTitleRuntime: typeof getChartAxisTitleRuntime;
10005
11146
  getFillingMode: typeof getFillingMode;
10006
11147
  rgbaToHex: typeof rgbaToHex;
10007
11148
  colorToRGBA: typeof colorToRGBA;
@@ -10021,6 +11162,20 @@ declare const helpers: {
10021
11162
  expandZoneOnInsertion: typeof expandZoneOnInsertion;
10022
11163
  reduceZoneOnDeletion: typeof reduceZoneOnDeletion;
10023
11164
  unquote: typeof unquote;
11165
+ makePivotFormula: typeof makePivotFormula;
11166
+ getMaxObjectId: typeof getMaxObjectId;
11167
+ getFunctionsFromTokens: typeof getFunctionsFromTokens;
11168
+ getFirstPivotFunction: typeof getFirstPivotFunction;
11169
+ getNumberOfPivotFunctions: typeof getNumberOfPivotFunctions;
11170
+ parseDimension: typeof parseDimension;
11171
+ isDateField: typeof isDateField;
11172
+ makeFieldProposal: typeof makeFieldProposal;
11173
+ insertTokenAfterArgSeparator: typeof insertTokenAfterArgSeparator;
11174
+ insertTokenAfterLeftParenthesis: typeof insertTokenAfterLeftParenthesis;
11175
+ mergeContiguousZones: typeof mergeContiguousZones;
11176
+ getPivotHighlights: typeof getPivotHighlights;
11177
+ pivotTimeAdapter: typeof pivotTimeAdapter;
11178
+ UNDO_REDO_PIVOT_COMMANDS: string[];
10024
11179
  };
10025
11180
  declare const links: {
10026
11181
  isMarkdownLink: typeof isMarkdownLink;
@@ -10032,7 +11187,7 @@ declare const links: {
10032
11187
  declare const components: {
10033
11188
  Checkbox: typeof Checkbox;
10034
11189
  Section: typeof Section;
10035
- ChartColor: typeof ChartColor;
11190
+ RoundColorPicker: typeof RoundColorPicker;
10036
11191
  ChartDataSeries: typeof ChartDataSeries;
10037
11192
  ChartErrorSection: typeof ChartErrorSection;
10038
11193
  ChartLabelRange: typeof ChartLabelRange;
@@ -10044,9 +11199,10 @@ declare const components: {
10044
11199
  GridOverlay: typeof GridOverlay;
10045
11200
  ScorecardChart: typeof ScorecardChart;
10046
11201
  LineConfigPanel: typeof LineConfigPanel;
10047
- LineBarPieDesignPanel: typeof LineBarPieDesignPanel;
10048
11202
  BarConfigPanel: typeof BarConfigPanel;
10049
- LineBarPieConfigPanel: typeof LineBarPieConfigPanel;
11203
+ PieChartDesignPanel: typeof PieChartDesignPanel;
11204
+ GenericChartConfigPanel: typeof GenericChartConfigPanel;
11205
+ ChartWithAxisDesignPanel: typeof ChartWithAxisDesignPanel;
10050
11206
  GaugeChartConfigPanel: typeof GaugeChartConfigPanel;
10051
11207
  GaugeChartDesignPanel: typeof GaugeChartDesignPanel;
10052
11208
  ScorecardChartConfigPanel: typeof ScorecardChartConfigPanel;
@@ -10056,6 +11212,12 @@ declare const components: {
10056
11212
  Popover: typeof Popover;
10057
11213
  SelectionInput: typeof SelectionInput;
10058
11214
  ValidationMessages: typeof ValidationMessages;
11215
+ AddDimensionButton: typeof AddDimensionButton;
11216
+ PivotDimensionGranularity: typeof PivotDimensionGranularity;
11217
+ PivotDimensionOrder: typeof PivotDimensionOrder;
11218
+ PivotDimension: typeof PivotDimension;
11219
+ PivotLayoutConfigurator: typeof PivotLayoutConfigurator;
11220
+ EditableName: typeof EditableName;
10059
11221
  };
10060
11222
  declare const hooks: {
10061
11223
  useDragAndDropListItems: typeof useDragAndDropListItems;
@@ -10079,6 +11241,7 @@ declare const stores: {
10079
11241
  useStore: typeof useStore;
10080
11242
  useLocalStore: typeof useLocalStore;
10081
11243
  SidePanelStore: typeof SidePanelStore;
11244
+ PivotSidePanelStore: typeof PivotSidePanelStore;
10082
11245
  };
10083
11246
 
10084
11247
  declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
@@ -10087,6 +11250,16 @@ declare function addFunction(functionName: string, functionDescription: AddFunct
10087
11250
  declare const constants: {
10088
11251
  DEFAULT_LOCALE: Locale;
10089
11252
  HIGHLIGHT_COLOR: string;
11253
+ PIVOT_TABLE_CONFIG: {
11254
+ hasFilters: boolean;
11255
+ totalRow: boolean;
11256
+ firstColumn: boolean;
11257
+ lastColumn: boolean;
11258
+ numberOfHeaders: number;
11259
+ bandedRows: boolean;
11260
+ bandedColumns: boolean;
11261
+ styleId: string;
11262
+ };
10090
11263
  };
10091
11264
 
10092
- 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, AutofillTableCommand, 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, CoreTable, CoreTableType, 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, DynamicTable, 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, FormulaToExecute, 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, StaticTable, StoreConstructor, StoreParams, Style, SumSelectionCommand, Table, TableConfig, TableData, TableElementStyle, 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, __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 };
11265
+ export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePaintFormatCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, AddColumnsRowsCommand, AddConditionalFormatCommand, AddDataValidationCommand, AddFunctionDescription, AddMergeCommand, AddPivotCommand, Aggregator, Alias, Align, AlphanumericIncrementModifier, AnchorZone, ApplyRangeChange, ApplyRangeChangeResult, Arg, ArgDefinition, ArgType, AutoFillCellCommand, AutofillAutoCommand, AutofillCellData, AutofillCommand, AutofillData, AutofillModifier, AutofillModifierImplementation, AutofillResult, AutofillSelectCommand, AutofillTableCommand, AutoresizeColumnsCommand, AutoresizeRowsCommand, AxesDesign, AxisDesign, 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, ChartWithAxisDefinition, 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, CommonPivotCoreDefinition, CompiledFormula, ComputeFunction, ComputedTableStyle, ConditionalFormat, ConditionalFormatInternal, ConditionalFormatRule, ConditionalFormattingOperatorValues, ConsecutiveIndexes, ContainsTextRule, CopyCommand, CopyModifier, CopyPasteCellsAboveCommand, CopyPasteCellsOnLeftCommand, CoreCommand, CoreCommandDispatcher, CoreCommandTypes, CoreGetters, CorePlugin, CoreTable, CoreTableType, CoreViewCommand, CoreViewCommandTypes, CreateChartCommand, CreateFigureCommand, CreateImageOverCommand, CreateRevisionOptions, CreateSheetCommand, CreateTableCommand, CreateTableStyleCommand, Currency, CustomFormulaCriterion, CustomizedDataSet, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetDesign, DatasetValues, DateCriterionValue, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, Dependencies, Dimension, Direction$1 as Direction, DispatchResult, DomainArg, DuplicatePivotCommand, DuplicateSheetCommand, DynamicTable, 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, FormulaToExecute, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, GeneratorCell, Getters, Granularity, GridClickModifiers, GridRenderingContext, GroupHeadersCommand, HSLA, HeaderData, HeaderDimensions, HeaderGroup, HeaderIndex, HeadersDependentCommand, HideColumnsRowsCommand, HideSheetCommand, Highlight$1 as Highlight, HistoryChange, IconSet, IconSetRule, IconThreshold, Image, Immutable, Increment, IncrementModifier, InformationNotification, InitPivotParams, InsertCellCommand, InsertNewPivotCommand, InsertPivotCommand, 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, Pivot, PivotCoreDefinition, PivotCoreDimension, PivotCoreMeasure, PivotDimension$1 as PivotDimension, PivotField, PivotFields, PivotMeasure, PivotRuntimeDefinition, PivotTableCell, PivotTableColumn, PivotTableData, PivotTableRow, PivotTimeAdapter, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, RangeCompiledFormula, RangeData, RangePart, RangeProvider, RangesDependentCommand, Rect, RedoCommand, Ref, ReferenceDenormalizer, RefreshPivotCommand, Registry, RemoteRevisionMessage, RemoteRevisionReceivedEvent, RemoveColumnsRowsCommand, RemoveConditionalFormatCommand, RemoveDataValidationCommand, RemoveDuplicatesCommand, RemoveMergeCommand, RemovePivotCommand, RemoveTableCommand, RemoveTableStyleCommand, RenamePivotCommand, RenameSheetCommand, RepeatPasteCommand, ReplaceSearchCommand, RequestRedoCommand, RequestUndoCommand, ResizeColumnsRowsCommand, ResizeDirection, ResizeTableCommand, ResizeViewportCommand, Revision, RevisionAcknowledgedEvent, RevisionData, RevisionRedone, RevisionRedoneMessage, RevisionUndone, RevisionUndoneMessage, RevisionsDroppedEvent, Row, SPREADSHEET_DIMENSIONS, ScrollDirection$1 as ScrollDirection, SelectFigureCommand, Selection, SelectionStep, SetBorderCommand, SetDecimalCommand, SetDecimalStep, SetFormattingCommand, SetGridLinesVisibilityCommand, SetViewportOffsetCommand, SetZoneBordersCommand, Sheet, SheetDOMScrollInfo, SheetData, SheetDependentCommand, SheetScrollInfo, ShowFormulaCommand, ShowSheetCommand, SingleColorRule, SingleColorRules, SnapshotEvent, SortCommand, SortDirection, SortOptions, SplitTextIntoColumnsCommand, Spreadsheet, SpreadsheetChildEnv, SpreadsheetEnv, SpreadsheetPivotCoreDefinition, SpreadsheetPivotTable, StartChangeHighlightCommand, StartCommand, StaticTable, StoreConstructor, StoreParams, StringDomainArgs, Style, SumSelectionCommand, Table, TableConfig, TableData, TableElementStyle, TableId, TableStyle, TableStyleData, TableStyleTemplateName, TargetDependentCommand, TechnicalName, TextCell, TextContainsCriterion, TextIsCriterion, TextIsEmailCriterion, TextIsLinkCriterion, TextNotContainsCriterion, TextRule, ThresholdType, TimePeriodRule, TitleDesign, 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, UpdatePivotCommand, UpdateTableCommand, Validation, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, __info__, addFunction, addRenderingLayer, astToFormula, borderStyles, canExecuteInReadonly, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateBordersCommands, 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 };