@odoo/o-spreadsheet 17.2.0-alpha.5 → 17.2.0-alpha.8
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.
- package/dist/o-spreadsheet.cjs.js +38645 -36799
- package/dist/o-spreadsheet.d.ts +1197 -746
- package/dist/o-spreadsheet.esm.js +38645 -36801
- package/dist/o-spreadsheet.iife.js +38780 -36934
- package/dist/o-spreadsheet.iife.min.js +1342 -1245
- package/dist/o_spreadsheet.xml +270 -97
- package/package.json +1 -1
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ChartConfiguration } from 'chart.js';
|
|
1
2
|
import * as _odoo_owl from '@odoo/owl';
|
|
2
3
|
import { ComponentConstructor, Component } from '@odoo/owl';
|
|
3
|
-
import { ChartConfiguration, ChartData, ChartDataset, ChartOptions } from 'chart.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* An injectable store constructor
|
|
@@ -133,87 +133,6 @@ interface Subscription {
|
|
|
133
133
|
callback: Callback;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
declare const functionCache: {
|
|
137
|
-
[key: string]: Omit<CompiledFormula, "dependencies" | "tokens">;
|
|
138
|
-
};
|
|
139
|
-
declare function compile(formula: string): CompiledFormula;
|
|
140
|
-
declare function compileTokens(tokens: Token[]): CompiledFormula;
|
|
141
|
-
|
|
142
|
-
type TokenType = "OPERATOR" | "NUMBER" | "STRING" | "SYMBOL" | "SPACE" | "DEBUGGER" | "ARG_SEPARATOR" | "LEFT_PAREN" | "RIGHT_PAREN" | "REFERENCE" | "INVALID_REFERENCE" | "UNKNOWN";
|
|
143
|
-
interface Token {
|
|
144
|
-
readonly type: TokenType;
|
|
145
|
-
readonly value: string;
|
|
146
|
-
}
|
|
147
|
-
declare function tokenize(str: string, locale?: Locale): Token[];
|
|
148
|
-
|
|
149
|
-
interface ASTBase {
|
|
150
|
-
debug?: boolean;
|
|
151
|
-
}
|
|
152
|
-
interface ASTNumber extends ASTBase {
|
|
153
|
-
type: "NUMBER";
|
|
154
|
-
value: number;
|
|
155
|
-
}
|
|
156
|
-
interface ASTReference extends ASTBase {
|
|
157
|
-
type: "REFERENCE";
|
|
158
|
-
value: string;
|
|
159
|
-
}
|
|
160
|
-
interface ASTString extends ASTBase {
|
|
161
|
-
type: "STRING";
|
|
162
|
-
value: string;
|
|
163
|
-
}
|
|
164
|
-
interface ASTBoolean extends ASTBase {
|
|
165
|
-
type: "BOOLEAN";
|
|
166
|
-
value: boolean;
|
|
167
|
-
}
|
|
168
|
-
interface ASTUnaryOperation extends ASTBase {
|
|
169
|
-
type: "UNARY_OPERATION";
|
|
170
|
-
value: any;
|
|
171
|
-
operand: AST;
|
|
172
|
-
postfix?: boolean;
|
|
173
|
-
}
|
|
174
|
-
interface ASTOperation extends ASTBase {
|
|
175
|
-
type: "BIN_OPERATION";
|
|
176
|
-
value: any;
|
|
177
|
-
left: AST;
|
|
178
|
-
right: AST;
|
|
179
|
-
}
|
|
180
|
-
interface ASTFuncall extends ASTBase {
|
|
181
|
-
type: "FUNCALL";
|
|
182
|
-
value: string;
|
|
183
|
-
args: AST[];
|
|
184
|
-
}
|
|
185
|
-
interface ASTEmpty extends ASTBase {
|
|
186
|
-
type: "EMPTY";
|
|
187
|
-
value: "";
|
|
188
|
-
}
|
|
189
|
-
type AST = ASTOperation | ASTUnaryOperation | ASTFuncall | ASTNumber | ASTBoolean | ASTString | ASTReference | ASTEmpty;
|
|
190
|
-
/**
|
|
191
|
-
* Parse an expression (as a string) into an AST.
|
|
192
|
-
*/
|
|
193
|
-
declare function parse(str: string): AST;
|
|
194
|
-
declare function parseTokens(tokens: Token[]): AST;
|
|
195
|
-
/**
|
|
196
|
-
* Allows to visit all nodes of an AST and apply a mapping function
|
|
197
|
-
* to nodes of a specific type.
|
|
198
|
-
* Useful if you want to convert some part of a formula.
|
|
199
|
-
*
|
|
200
|
-
* @example
|
|
201
|
-
* convertAstNodes(ast, "FUNCALL", convertFormulaToExcel)
|
|
202
|
-
*
|
|
203
|
-
* function convertFormulaToExcel(ast: ASTFuncall) {
|
|
204
|
-
* // ...
|
|
205
|
-
* return modifiedAst
|
|
206
|
-
* }
|
|
207
|
-
*/
|
|
208
|
-
declare function convertAstNodes<T extends AST["type"]>(ast: AST, type: T, fn: (ast: Extract<AST, {
|
|
209
|
-
type: T;
|
|
210
|
-
}>) => AST): AST;
|
|
211
|
-
declare function iterateAstNodes(ast: AST): AST[];
|
|
212
|
-
/**
|
|
213
|
-
* Converts an ast formula to the corresponding string
|
|
214
|
-
*/
|
|
215
|
-
declare function astToFormula(ast: AST): string;
|
|
216
|
-
|
|
217
136
|
interface Figure {
|
|
218
137
|
id: UID;
|
|
219
138
|
x: Pixel;
|
|
@@ -226,9 +145,13 @@ interface FigureSize {
|
|
|
226
145
|
width: Pixel;
|
|
227
146
|
height: Pixel;
|
|
228
147
|
}
|
|
148
|
+
interface ExcelFigureSize {
|
|
149
|
+
cx: number;
|
|
150
|
+
cy: number;
|
|
151
|
+
}
|
|
229
152
|
type ResizeDirection = -1 | 0 | 1;
|
|
230
153
|
|
|
231
|
-
interface Image {
|
|
154
|
+
interface Image$1 {
|
|
232
155
|
path: string;
|
|
233
156
|
size: FigureSize;
|
|
234
157
|
mimetype?: string;
|
|
@@ -298,52 +221,18 @@ interface SectionThreshold {
|
|
|
298
221
|
readonly type: "number" | "percentage";
|
|
299
222
|
readonly value: string;
|
|
300
223
|
}
|
|
301
|
-
interface
|
|
302
|
-
|
|
303
|
-
|
|
224
|
+
interface GaugeValue {
|
|
225
|
+
value: number;
|
|
226
|
+
label: string;
|
|
304
227
|
}
|
|
305
228
|
interface GaugeChartRuntime {
|
|
306
|
-
chartJsConfig: GaugeChartConfiguration;
|
|
307
229
|
background: Color;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
readonly value?: number | undefined;
|
|
315
|
-
readonly backgroundColor?: string[];
|
|
316
|
-
}
|
|
317
|
-
interface GaugeChartOptions extends ChartOptions {
|
|
318
|
-
needle?: NeedleOptions;
|
|
319
|
-
valueLabel?: ValueLabelOptions;
|
|
320
|
-
}
|
|
321
|
-
interface NeedleOptions {
|
|
322
|
-
display?: boolean;
|
|
323
|
-
borderColor?: Color;
|
|
324
|
-
backgroundColor?: Color;
|
|
325
|
-
/**
|
|
326
|
-
* Needle width as the percentage of the chart area width
|
|
327
|
-
*/
|
|
328
|
-
width?: number;
|
|
329
|
-
}
|
|
330
|
-
interface ValueLabelOptions {
|
|
331
|
-
display?: boolean;
|
|
332
|
-
formatter?: (value: any) => string;
|
|
333
|
-
font?: {
|
|
334
|
-
size?: number;
|
|
335
|
-
family?: string;
|
|
336
|
-
color?: Color;
|
|
337
|
-
};
|
|
338
|
-
backgroundColor?: Color;
|
|
339
|
-
borderColor?: Color;
|
|
340
|
-
borderRadius?: number;
|
|
341
|
-
padding?: {
|
|
342
|
-
left: number;
|
|
343
|
-
right: number;
|
|
344
|
-
top: number;
|
|
345
|
-
bottom: number;
|
|
346
|
-
};
|
|
230
|
+
title: string;
|
|
231
|
+
minValue: GaugeValue;
|
|
232
|
+
maxValue: GaugeValue;
|
|
233
|
+
gaugeValue?: GaugeValue;
|
|
234
|
+
inflectionValues: GaugeValue[];
|
|
235
|
+
colors: Color[];
|
|
347
236
|
}
|
|
348
237
|
|
|
349
238
|
interface LineChartDefinition {
|
|
@@ -414,8 +303,21 @@ interface ScorecardChartRuntime {
|
|
|
414
303
|
declare const CHART_TYPES: readonly ["line", "bar", "pie", "scorecard", "gauge", "scatter"];
|
|
415
304
|
type ChartType = (typeof CHART_TYPES)[number];
|
|
416
305
|
type ChartDefinition = LineChartDefinition | PieChartDefinition | BarChartDefinition | ScorecardChartDefinition | GaugeChartDefinition | ScatterChartDefinition;
|
|
417
|
-
type ChartJSRuntime = LineChartRuntime | PieChartRuntime | BarChartRuntime |
|
|
418
|
-
type ChartRuntime = ChartJSRuntime | ScorecardChartRuntime;
|
|
306
|
+
type ChartJSRuntime = LineChartRuntime | PieChartRuntime | BarChartRuntime | ScatterChartRuntime;
|
|
307
|
+
type ChartRuntime = ChartJSRuntime | ScorecardChartRuntime | GaugeChartRuntime;
|
|
308
|
+
interface LabelValues {
|
|
309
|
+
readonly values: string[];
|
|
310
|
+
readonly formattedValues: string[];
|
|
311
|
+
}
|
|
312
|
+
interface DatasetValues {
|
|
313
|
+
readonly label?: string;
|
|
314
|
+
readonly data: any[];
|
|
315
|
+
}
|
|
316
|
+
type AxisType = "category" | "linear" | "time";
|
|
317
|
+
interface DataSet {
|
|
318
|
+
readonly labelCell?: Range;
|
|
319
|
+
readonly dataRange: Range;
|
|
320
|
+
}
|
|
419
321
|
interface ExcelChartDataset {
|
|
420
322
|
readonly label?: string;
|
|
421
323
|
readonly range: string;
|
|
@@ -438,6 +340,7 @@ interface ChartCreationContext {
|
|
|
438
340
|
readonly title?: string;
|
|
439
341
|
readonly background?: string;
|
|
440
342
|
readonly auxiliaryRange?: string;
|
|
343
|
+
readonly aggregated?: boolean;
|
|
441
344
|
}
|
|
442
345
|
|
|
443
346
|
declare enum ClipboardMIMEType {
|
|
@@ -453,6 +356,7 @@ interface ClipboardOptions {
|
|
|
453
356
|
isCutOperation?: boolean;
|
|
454
357
|
}
|
|
455
358
|
type ClipboardPasteOptions = "onlyFormat" | "asValue";
|
|
359
|
+
type ClipboardOperation = "CUT" | "COPY";
|
|
456
360
|
type ClipboardCellData = {
|
|
457
361
|
zones: Zone[];
|
|
458
362
|
rowsIndexes: HeaderIndex[];
|
|
@@ -497,6 +401,57 @@ interface SearchOptions {
|
|
|
497
401
|
specificRange?: Range;
|
|
498
402
|
}
|
|
499
403
|
|
|
404
|
+
interface Table {
|
|
405
|
+
readonly id: TableId;
|
|
406
|
+
readonly range: Range;
|
|
407
|
+
readonly filters: Filter[];
|
|
408
|
+
readonly config: TableConfig;
|
|
409
|
+
}
|
|
410
|
+
interface Filter {
|
|
411
|
+
readonly id: UID;
|
|
412
|
+
readonly rangeWithHeaders: Range;
|
|
413
|
+
readonly col: number;
|
|
414
|
+
/** The filtered zone doesn't includes the headers of the table */
|
|
415
|
+
readonly filteredRange: Range | undefined;
|
|
416
|
+
}
|
|
417
|
+
interface TableConfig {
|
|
418
|
+
hasFilters: boolean;
|
|
419
|
+
totalRow: boolean;
|
|
420
|
+
firstColumn: boolean;
|
|
421
|
+
lastColumn: boolean;
|
|
422
|
+
numberOfHeaders: number;
|
|
423
|
+
bandedRows: boolean;
|
|
424
|
+
bandedColumns: boolean;
|
|
425
|
+
automaticAutofill?: boolean;
|
|
426
|
+
styleId: string;
|
|
427
|
+
}
|
|
428
|
+
interface ComputedTableStyle {
|
|
429
|
+
borders: Border$1[][];
|
|
430
|
+
styles: Style[][];
|
|
431
|
+
}
|
|
432
|
+
interface TableElementStyle {
|
|
433
|
+
border?: TableBorder;
|
|
434
|
+
style?: Style;
|
|
435
|
+
size?: number;
|
|
436
|
+
}
|
|
437
|
+
interface TableBorder extends Border$1 {
|
|
438
|
+
horizontal?: BorderDescr;
|
|
439
|
+
vertical?: BorderDescr;
|
|
440
|
+
}
|
|
441
|
+
interface TableStyle {
|
|
442
|
+
category: string;
|
|
443
|
+
colorName: string;
|
|
444
|
+
wholeTable?: TableElementStyle;
|
|
445
|
+
firstColumnStripe?: TableElementStyle;
|
|
446
|
+
secondColumnStripe?: TableElementStyle;
|
|
447
|
+
firstRowStripe?: TableElementStyle;
|
|
448
|
+
secondRowStripe?: TableElementStyle;
|
|
449
|
+
firstColumn?: TableElementStyle;
|
|
450
|
+
lastColumn?: TableElementStyle;
|
|
451
|
+
headerRow?: TableElementStyle;
|
|
452
|
+
totalRow?: TableElementStyle;
|
|
453
|
+
}
|
|
454
|
+
|
|
500
455
|
/**
|
|
501
456
|
* There are two kinds of commands: CoreCommands and LocalCommands
|
|
502
457
|
*
|
|
@@ -521,18 +476,22 @@ interface SearchOptions {
|
|
|
521
476
|
interface SheetDependentCommand {
|
|
522
477
|
sheetId: UID;
|
|
523
478
|
}
|
|
479
|
+
declare function isSheetDependent(cmd: CoreCommand): boolean;
|
|
524
480
|
interface HeadersDependentCommand {
|
|
525
481
|
sheetId: UID;
|
|
526
482
|
dimension: Dimension;
|
|
527
483
|
elements: HeaderIndex[];
|
|
528
484
|
}
|
|
485
|
+
declare function isHeadersDependant(cmd: CoreCommand): boolean;
|
|
529
486
|
interface TargetDependentCommand {
|
|
530
487
|
sheetId: UID;
|
|
531
488
|
target: Zone[];
|
|
532
489
|
}
|
|
490
|
+
declare function isTargetDependent(cmd: CoreCommand): boolean;
|
|
533
491
|
interface RangesDependentCommand {
|
|
534
492
|
ranges: RangeData[];
|
|
535
493
|
}
|
|
494
|
+
declare function isRangeDependant(cmd: CoreCommand): boolean;
|
|
536
495
|
interface PositionDependentCommand {
|
|
537
496
|
sheetId: UID;
|
|
538
497
|
col: number;
|
|
@@ -542,11 +501,15 @@ interface ZoneDependentCommand {
|
|
|
542
501
|
sheetId: UID;
|
|
543
502
|
zone: Zone;
|
|
544
503
|
}
|
|
545
|
-
declare
|
|
546
|
-
declare
|
|
547
|
-
declare const
|
|
548
|
-
declare const
|
|
549
|
-
declare const
|
|
504
|
+
declare function isZoneDependent(cmd: CoreCommand): boolean;
|
|
505
|
+
declare function isPositionDependent(cmd: CoreCommand): boolean;
|
|
506
|
+
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">;
|
|
507
|
+
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">;
|
|
508
|
+
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">;
|
|
509
|
+
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">;
|
|
510
|
+
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">;
|
|
511
|
+
declare function isCoreCommand(cmd: Command): cmd is CoreCommand;
|
|
512
|
+
declare function canExecuteInReadonly(cmd: Command): boolean;
|
|
550
513
|
interface UpdateCellCommand extends PositionDependentCommand {
|
|
551
514
|
type: "UPDATE_CELL";
|
|
552
515
|
content?: string;
|
|
@@ -712,13 +675,25 @@ interface CreateImageOverCommand extends SheetDependentCommand {
|
|
|
712
675
|
figureId: UID;
|
|
713
676
|
position: DOMCoordinates;
|
|
714
677
|
size: FigureSize;
|
|
715
|
-
definition: Image;
|
|
678
|
+
definition: Image$1;
|
|
716
679
|
}
|
|
717
|
-
interface
|
|
718
|
-
type: "
|
|
680
|
+
interface CreateTableCommand extends RangesDependentCommand {
|
|
681
|
+
type: "CREATE_TABLE";
|
|
682
|
+
sheetId: UID;
|
|
683
|
+
config?: TableConfig;
|
|
684
|
+
}
|
|
685
|
+
interface RemoveTableCommand extends TargetDependentCommand {
|
|
686
|
+
type: "REMOVE_TABLE";
|
|
687
|
+
}
|
|
688
|
+
interface UpdateTableCommand {
|
|
689
|
+
type: "UPDATE_TABLE";
|
|
690
|
+
zone: Zone;
|
|
691
|
+
sheetId: UID;
|
|
692
|
+
newTableRange?: RangeData;
|
|
693
|
+
config?: Partial<TableConfig>;
|
|
719
694
|
}
|
|
720
|
-
interface
|
|
721
|
-
type: "
|
|
695
|
+
interface AutofillTableCommand extends PositionDependentCommand {
|
|
696
|
+
type: "AUTOFILL_TABLE_COLUMN";
|
|
722
697
|
}
|
|
723
698
|
interface UpdateFilterCommand extends PositionDependentCommand {
|
|
724
699
|
type: "UPDATE_FILTER";
|
|
@@ -1027,14 +1002,14 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
|
|
|
1027
1002
|
/** IMAGE */
|
|
1028
1003
|
| CreateImageOverCommand
|
|
1029
1004
|
/** FILTERS */
|
|
1030
|
-
|
|
|
1005
|
+
| CreateTableCommand | RemoveTableCommand | UpdateTableCommand
|
|
1031
1006
|
/** HEADER GROUP */
|
|
1032
1007
|
| GroupHeadersCommand | UnGroupHeadersCommand | UnfoldHeaderGroupCommand | FoldHeaderGroupCommand | FoldAllHeaderGroupsCommand | UnfoldAllHeaderGroupsCommand | UnfoldHeaderGroupsInZoneCommand | FoldHeaderGroupsInZoneCommand
|
|
1033
1008
|
/** DATA VALIDATION */
|
|
1034
1009
|
| AddDataValidationCommand | RemoveDataValidationCommand
|
|
1035
1010
|
/** MISC */
|
|
1036
1011
|
| UpdateLocaleCommand;
|
|
1037
|
-
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 | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | ReplaceSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | MoveViewportToCellCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand | RenderCanvasCommand;
|
|
1012
|
+
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;
|
|
1038
1013
|
type Command = CoreCommand | LocalCommand;
|
|
1039
1014
|
/**
|
|
1040
1015
|
* Holds the result of a command dispatch.
|
|
@@ -1136,9 +1111,11 @@ declare const enum CommandResult {
|
|
|
1136
1111
|
FrozenPaneOverlap = "FrozenPaneOverlap",
|
|
1137
1112
|
ValuesNotChanged = "ValuesNotChanged",
|
|
1138
1113
|
InvalidFilterZone = "InvalidFilterZone",
|
|
1139
|
-
|
|
1114
|
+
TableNotFound = "TableNotFound",
|
|
1115
|
+
TableOverlap = "TableOverlap",
|
|
1116
|
+
InvalidTableConfig = "InvalidTableConfig",
|
|
1140
1117
|
FilterNotFound = "FilterNotFound",
|
|
1141
|
-
|
|
1118
|
+
MergeInTable = "MergeInTable",
|
|
1142
1119
|
NonContinuousTargets = "NonContinuousTargets",
|
|
1143
1120
|
DuplicatedFigureId = "DuplicatedFigureId",
|
|
1144
1121
|
InvalidSelectionStep = "InvalidSelectionStep",
|
|
@@ -1199,6 +1176,88 @@ interface CoreCommandDispatcher {
|
|
|
1199
1176
|
type CommandTypes = Command["type"];
|
|
1200
1177
|
type CoreCommandTypes = CoreCommand["type"];
|
|
1201
1178
|
type CoreViewCommand = CoreCommand | EvaluateCellsCommand | UndoCommand | RedoCommand;
|
|
1179
|
+
type CoreViewCommandTypes = CoreViewCommand["type"];
|
|
1180
|
+
|
|
1181
|
+
declare const functionCache: {
|
|
1182
|
+
[key: string]: FormulaToExecute;
|
|
1183
|
+
};
|
|
1184
|
+
declare function compile(formula: string): CompiledFormula;
|
|
1185
|
+
declare function compileTokens(tokens: Token[]): CompiledFormula;
|
|
1186
|
+
|
|
1187
|
+
type TokenType = "OPERATOR" | "NUMBER" | "STRING" | "SYMBOL" | "SPACE" | "DEBUGGER" | "ARG_SEPARATOR" | "LEFT_PAREN" | "RIGHT_PAREN" | "REFERENCE" | "INVALID_REFERENCE" | "UNKNOWN";
|
|
1188
|
+
interface Token {
|
|
1189
|
+
readonly type: TokenType;
|
|
1190
|
+
readonly value: string;
|
|
1191
|
+
}
|
|
1192
|
+
declare function tokenize(str: string, locale?: Locale): Token[];
|
|
1193
|
+
|
|
1194
|
+
interface ASTBase {
|
|
1195
|
+
debug?: boolean;
|
|
1196
|
+
}
|
|
1197
|
+
interface ASTNumber extends ASTBase {
|
|
1198
|
+
type: "NUMBER";
|
|
1199
|
+
value: number;
|
|
1200
|
+
}
|
|
1201
|
+
interface ASTReference extends ASTBase {
|
|
1202
|
+
type: "REFERENCE";
|
|
1203
|
+
value: string;
|
|
1204
|
+
}
|
|
1205
|
+
interface ASTString extends ASTBase {
|
|
1206
|
+
type: "STRING";
|
|
1207
|
+
value: string;
|
|
1208
|
+
}
|
|
1209
|
+
interface ASTBoolean extends ASTBase {
|
|
1210
|
+
type: "BOOLEAN";
|
|
1211
|
+
value: boolean;
|
|
1212
|
+
}
|
|
1213
|
+
interface ASTUnaryOperation extends ASTBase {
|
|
1214
|
+
type: "UNARY_OPERATION";
|
|
1215
|
+
value: any;
|
|
1216
|
+
operand: AST;
|
|
1217
|
+
postfix?: boolean;
|
|
1218
|
+
}
|
|
1219
|
+
interface ASTOperation extends ASTBase {
|
|
1220
|
+
type: "BIN_OPERATION";
|
|
1221
|
+
value: any;
|
|
1222
|
+
left: AST;
|
|
1223
|
+
right: AST;
|
|
1224
|
+
}
|
|
1225
|
+
interface ASTFuncall extends ASTBase {
|
|
1226
|
+
type: "FUNCALL";
|
|
1227
|
+
value: string;
|
|
1228
|
+
args: AST[];
|
|
1229
|
+
}
|
|
1230
|
+
interface ASTEmpty extends ASTBase {
|
|
1231
|
+
type: "EMPTY";
|
|
1232
|
+
value: "";
|
|
1233
|
+
}
|
|
1234
|
+
type AST = ASTOperation | ASTUnaryOperation | ASTFuncall | ASTNumber | ASTBoolean | ASTString | ASTReference | ASTEmpty;
|
|
1235
|
+
/**
|
|
1236
|
+
* Parse an expression (as a string) into an AST.
|
|
1237
|
+
*/
|
|
1238
|
+
declare function parse(str: string): AST;
|
|
1239
|
+
declare function parseTokens(tokens: Token[]): AST;
|
|
1240
|
+
/**
|
|
1241
|
+
* Allows to visit all nodes of an AST and apply a mapping function
|
|
1242
|
+
* to nodes of a specific type.
|
|
1243
|
+
* Useful if you want to convert some part of a formula.
|
|
1244
|
+
*
|
|
1245
|
+
* @example
|
|
1246
|
+
* convertAstNodes(ast, "FUNCALL", convertFormulaToExcel)
|
|
1247
|
+
*
|
|
1248
|
+
* function convertFormulaToExcel(ast: ASTFuncall) {
|
|
1249
|
+
* // ...
|
|
1250
|
+
* return modifiedAst
|
|
1251
|
+
* }
|
|
1252
|
+
*/
|
|
1253
|
+
declare function convertAstNodes<T extends AST["type"]>(ast: AST, type: T, fn: (ast: Extract<AST, {
|
|
1254
|
+
type: T;
|
|
1255
|
+
}>) => AST): AST;
|
|
1256
|
+
declare function iterateAstNodes(ast: AST): AST[];
|
|
1257
|
+
/**
|
|
1258
|
+
* Converts an ast formula to the corresponding string
|
|
1259
|
+
*/
|
|
1260
|
+
declare function astToFormula(ast: AST): string;
|
|
1202
1261
|
|
|
1203
1262
|
/**
|
|
1204
1263
|
* The following type is meant to be used in union with other aliases to prevent
|
|
@@ -1211,7 +1270,7 @@ type Pixel = number & Alias;
|
|
|
1211
1270
|
type UID = string & Alias;
|
|
1212
1271
|
type SetDecimalStep = 1 | -1;
|
|
1213
1272
|
type FilterId = UID & Alias;
|
|
1214
|
-
type
|
|
1273
|
+
type TableId = UID & Alias;
|
|
1215
1274
|
/**
|
|
1216
1275
|
* CSS style color string
|
|
1217
1276
|
* e.g. "#ABC", "#AAAFFF", "rgb(30, 80, 16)"
|
|
@@ -1223,6 +1282,12 @@ interface RGBA {
|
|
|
1223
1282
|
g: number;
|
|
1224
1283
|
b: number;
|
|
1225
1284
|
}
|
|
1285
|
+
interface HSLA {
|
|
1286
|
+
a: number;
|
|
1287
|
+
h: number;
|
|
1288
|
+
s: number;
|
|
1289
|
+
l: number;
|
|
1290
|
+
}
|
|
1226
1291
|
interface Link {
|
|
1227
1292
|
readonly label: string;
|
|
1228
1293
|
readonly url: string;
|
|
@@ -1315,9 +1380,9 @@ interface Border$1 {
|
|
|
1315
1380
|
}
|
|
1316
1381
|
type ReferenceDenormalizer = (range: Range, isMeta: boolean, functionName: string, paramNumber: number) => FPayload;
|
|
1317
1382
|
type EnsureRange = (range: Range) => Matrix<FPayload>;
|
|
1318
|
-
type
|
|
1383
|
+
type FormulaToExecute = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => Matrix<FPayload> | FPayload;
|
|
1319
1384
|
interface CompiledFormula {
|
|
1320
|
-
execute:
|
|
1385
|
+
execute: FormulaToExecute;
|
|
1321
1386
|
tokens: Token[];
|
|
1322
1387
|
dependencies: string[];
|
|
1323
1388
|
}
|
|
@@ -1330,8 +1395,18 @@ type FPayload = {
|
|
|
1330
1395
|
format?: Format;
|
|
1331
1396
|
message?: string;
|
|
1332
1397
|
};
|
|
1398
|
+
type FPayloadNumber = {
|
|
1399
|
+
value: number;
|
|
1400
|
+
format?: string;
|
|
1401
|
+
};
|
|
1333
1402
|
type Arg = Maybe<FPayload> | Matrix<FPayload>;
|
|
1334
1403
|
declare function isMatrix(x: any): x is Matrix<any>;
|
|
1404
|
+
interface ClipboardCell {
|
|
1405
|
+
cell?: Cell;
|
|
1406
|
+
evaluatedCell: EvaluatedCell;
|
|
1407
|
+
border?: Border$1;
|
|
1408
|
+
position: CellPosition;
|
|
1409
|
+
}
|
|
1335
1410
|
interface HeaderDimensions {
|
|
1336
1411
|
start: Pixel;
|
|
1337
1412
|
size: Pixel;
|
|
@@ -1357,7 +1432,11 @@ interface Highlight$1 {
|
|
|
1357
1432
|
sheetId: UID;
|
|
1358
1433
|
color: Color;
|
|
1359
1434
|
interactive?: boolean;
|
|
1435
|
+
thinLine?: boolean;
|
|
1360
1436
|
noFill?: boolean;
|
|
1437
|
+
/** transparency of the fill color (0-1) */
|
|
1438
|
+
fillAlpha?: number;
|
|
1439
|
+
noBorder?: boolean;
|
|
1361
1440
|
}
|
|
1362
1441
|
interface PaneDivision {
|
|
1363
1442
|
/** Represents the number of frozen columns */
|
|
@@ -1390,6 +1469,7 @@ interface RangeProvider {
|
|
|
1390
1469
|
adaptRanges: (applyChange: ApplyRangeChange, sheetId?: UID) => void;
|
|
1391
1470
|
}
|
|
1392
1471
|
type Validation<T> = (toValidate: T) => CommandResult | CommandResult[];
|
|
1472
|
+
type Increment = 1 | -1 | 0;
|
|
1393
1473
|
interface Ref<T> {
|
|
1394
1474
|
el: T | null;
|
|
1395
1475
|
}
|
|
@@ -1448,6 +1528,10 @@ interface HeaderGroup {
|
|
|
1448
1528
|
}
|
|
1449
1529
|
type Direction$1 = "up" | "down" | "left" | "right";
|
|
1450
1530
|
type SelectionStep = number | "end";
|
|
1531
|
+
interface Offset {
|
|
1532
|
+
col: number;
|
|
1533
|
+
row: number;
|
|
1534
|
+
}
|
|
1451
1535
|
type DebouncedFunction<T> = T & {
|
|
1452
1536
|
stopDebounce: () => void;
|
|
1453
1537
|
isDebouncePending: () => boolean;
|
|
@@ -1463,6 +1547,8 @@ interface Locale {
|
|
|
1463
1547
|
timeFormat: string;
|
|
1464
1548
|
formulaArgSeparator: string;
|
|
1465
1549
|
}
|
|
1550
|
+
declare const DEFAULT_LOCALES: Locale[];
|
|
1551
|
+
declare const DEFAULT_LOCALE: Locale;
|
|
1466
1552
|
|
|
1467
1553
|
type Format = string & Alias;
|
|
1468
1554
|
type FormattedValue = string & Alias;
|
|
@@ -1470,6 +1556,7 @@ interface LocaleFormat {
|
|
|
1470
1556
|
locale: Locale;
|
|
1471
1557
|
format?: Format;
|
|
1472
1558
|
}
|
|
1559
|
+
declare const PLAIN_TEXT_FORMAT: Format;
|
|
1473
1560
|
|
|
1474
1561
|
interface CellAttributes {
|
|
1475
1562
|
readonly id: UID;
|
|
@@ -1585,6 +1672,10 @@ interface AutofillResult {
|
|
|
1585
1672
|
row: number;
|
|
1586
1673
|
};
|
|
1587
1674
|
}
|
|
1675
|
+
interface GeneratorCell {
|
|
1676
|
+
data: AutofillData;
|
|
1677
|
+
rule: AutofillModifier;
|
|
1678
|
+
}
|
|
1588
1679
|
interface AutofillModifierImplementation {
|
|
1589
1680
|
apply: (rule: AutofillModifier, data: AutofillData, getters: Getters, direction: DIRECTION) => Omit<AutofillResult, "origin">;
|
|
1590
1681
|
}
|
|
@@ -1636,6 +1727,7 @@ interface SnapshotEvent {
|
|
|
1636
1727
|
type: "snapshot";
|
|
1637
1728
|
}
|
|
1638
1729
|
type CollaborativeEvent = NewLocalStateUpdateEvent | UnexpectedRevisionIdEvent | RemoteRevisionReceivedEvent | RevisionAcknowledgedEvent | RevisionUndone | RevisionRedone | RevisionsDroppedEvent | SnapshotEvent | CollaborativeEventReceived;
|
|
1730
|
+
type CollaborativeEventTypes = CollaborativeEvent["type"];
|
|
1639
1731
|
|
|
1640
1732
|
interface RevisionData {
|
|
1641
1733
|
readonly id: UID;
|
|
@@ -1660,11 +1752,17 @@ type SingleColorRules = CellIsRule;
|
|
|
1660
1752
|
interface SingleColorRule {
|
|
1661
1753
|
style: Style;
|
|
1662
1754
|
}
|
|
1755
|
+
interface TextRule extends SingleColorRule {
|
|
1756
|
+
text: string;
|
|
1757
|
+
}
|
|
1663
1758
|
interface CellIsRule extends SingleColorRule {
|
|
1664
1759
|
type: "CellIsRule";
|
|
1665
1760
|
operator: ConditionalFormattingOperatorValues;
|
|
1666
1761
|
values: string[];
|
|
1667
1762
|
}
|
|
1763
|
+
interface ExpressionRule extends SingleColorRule {
|
|
1764
|
+
type: "ExpressionRule";
|
|
1765
|
+
}
|
|
1668
1766
|
type ThresholdType = "value" | "number" | "percentage" | "percentile" | "formula";
|
|
1669
1767
|
type ColorScaleThreshold = {
|
|
1670
1768
|
color: number;
|
|
@@ -1698,6 +1796,45 @@ interface IconSetRule {
|
|
|
1698
1796
|
upperInflectionPoint: IconThreshold;
|
|
1699
1797
|
lowerInflectionPoint: IconThreshold;
|
|
1700
1798
|
}
|
|
1799
|
+
interface ContainsTextRule extends TextRule {
|
|
1800
|
+
type: "ContainsTextRule";
|
|
1801
|
+
}
|
|
1802
|
+
interface NotContainsTextRule extends TextRule {
|
|
1803
|
+
type: "NotContainsTextRule";
|
|
1804
|
+
}
|
|
1805
|
+
interface BeginsWithRule extends TextRule {
|
|
1806
|
+
type: "BeginsWithRule";
|
|
1807
|
+
}
|
|
1808
|
+
interface EndsWithRule extends TextRule {
|
|
1809
|
+
type: "EndsWithRule";
|
|
1810
|
+
}
|
|
1811
|
+
interface containsBlanksRule extends TextRule {
|
|
1812
|
+
type: "containsBlanksRule";
|
|
1813
|
+
}
|
|
1814
|
+
interface notContainsBlanksRule extends TextRule {
|
|
1815
|
+
type: "notContainsBlanksRule";
|
|
1816
|
+
}
|
|
1817
|
+
interface containsErrorsRule extends SingleColorRule {
|
|
1818
|
+
type: "containsErrorsRule";
|
|
1819
|
+
}
|
|
1820
|
+
interface notContainsErrorsRule extends SingleColorRule {
|
|
1821
|
+
type: "notContainsErrorsRule";
|
|
1822
|
+
}
|
|
1823
|
+
interface TimePeriodRule extends SingleColorRule {
|
|
1824
|
+
type: "TimePeriodRule";
|
|
1825
|
+
timePeriod: string;
|
|
1826
|
+
}
|
|
1827
|
+
interface AboveAverageRule extends SingleColorRule {
|
|
1828
|
+
type: "AboveAverageRule";
|
|
1829
|
+
aboveAverage: boolean;
|
|
1830
|
+
equalAverage: boolean;
|
|
1831
|
+
}
|
|
1832
|
+
interface Top10Rule extends SingleColorRule {
|
|
1833
|
+
type: "Top10Rule";
|
|
1834
|
+
percent: boolean;
|
|
1835
|
+
bottom: boolean;
|
|
1836
|
+
rank: number;
|
|
1837
|
+
}
|
|
1701
1838
|
type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";
|
|
1702
1839
|
|
|
1703
1840
|
interface Currency {
|
|
@@ -1824,6 +1961,9 @@ type CustomFormulaCriterion = {
|
|
|
1824
1961
|
type DataValidationCriterion = TextContainsCriterion | TextNotContainsCriterion | TextIsCriterion | TextIsEmailCriterion | TextIsLinkCriterion | IsBetweenCriterion | DateIsCriterion | DateIsBeforeCriterion | DateIsOnOrBeforeCriterion | DateIsAfterCriterion | DateIsOnOrAfterCriterion | DateIsBetweenCriterion | DateIsNotBetweenCriterion | DateIsValidCriterion | IsEqualCriterion | IsNotEqualCriterion | IsGreaterThanCriterion | IsGreaterOrEqualToCriterion | IsLessThanCriterion | IsLessOrEqualToCriterion | IsNotBetweenCriterion | IsCheckboxCriterion | IsValueInListCriterion | IsValueInRangeCriterion | CustomFormulaCriterion;
|
|
1825
1962
|
type DateCriterionValue = "today" | "tomorrow" | "yesterday" | "lastWeek" | "lastMonth" | "lastYear" | "exactDate";
|
|
1826
1963
|
type DataValidationCriterionType = DataValidationCriterion["type"];
|
|
1964
|
+
type DataValidationDateCriterion = Extract<DataValidationCriterion, {
|
|
1965
|
+
dateValue: DateCriterionValue;
|
|
1966
|
+
}>;
|
|
1827
1967
|
|
|
1828
1968
|
type ClipboardReadResult = {
|
|
1829
1969
|
status: "ok";
|
|
@@ -1858,10 +1998,14 @@ interface ImageProviderInterface {
|
|
|
1858
1998
|
/**
|
|
1859
1999
|
* RequestImage ask the user to input an image file. Then send it to a server trough an FileStore. Finally it return the path and the size of the image in the server.
|
|
1860
2000
|
*/
|
|
1861
|
-
requestImage(): Promise<Image>;
|
|
2001
|
+
requestImage(): Promise<Image$1>;
|
|
1862
2002
|
getImageOriginalSize(path: string): Promise<FigureSize>;
|
|
1863
2003
|
}
|
|
1864
2004
|
|
|
2005
|
+
interface EditTextOptions {
|
|
2006
|
+
error?: string;
|
|
2007
|
+
placeholder?: string;
|
|
2008
|
+
}
|
|
1865
2009
|
type NotificationType = "danger" | "info" | "success" | "warning";
|
|
1866
2010
|
interface InformationNotification {
|
|
1867
2011
|
text: string;
|
|
@@ -1981,7 +2125,7 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
|
|
|
1981
2125
|
private getters;
|
|
1982
2126
|
private providers;
|
|
1983
2127
|
constructor(getters: CoreGetters);
|
|
1984
|
-
static getters: readonly ["getRangeString", "getRangeFromSheetXC", "createAdaptedRanges", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone", "isRangeValid"];
|
|
2128
|
+
static getters: readonly ["extendRange", "getRangeString", "getRangeFromSheetXC", "createAdaptedRanges", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone", "getRangesUnion", "isRangeValid"];
|
|
1985
2129
|
allowDispatch(cmd: Command): CommandResult;
|
|
1986
2130
|
beforeHandle(command: Command): void;
|
|
1987
2131
|
handle(cmd: Command): void;
|
|
@@ -2005,6 +2149,7 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
|
|
|
2005
2149
|
*/
|
|
2006
2150
|
addRangeProvider(provider: RangeProvider["adaptRanges"]): void;
|
|
2007
2151
|
createAdaptedRanges(ranges: Range[], offsetX: number, offsetY: number, sheetId: UID): Range[];
|
|
2152
|
+
extendRange(range: Range, dimension: Dimension, quantity: number): Range;
|
|
2008
2153
|
/**
|
|
2009
2154
|
* Creates a range from a XC reference that can contain a sheet reference
|
|
2010
2155
|
* @param defaultSheetId the sheet to default to if the sheetXC parameter does not contain a sheet reference (usually the active sheet Id)
|
|
@@ -2029,6 +2174,7 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
|
|
|
2029
2174
|
getRangeFromZone(sheetId: UID, zone: Zone | UnboundedZone): Range;
|
|
2030
2175
|
getRangeFromRangeData(data: RangeData): Range;
|
|
2031
2176
|
isRangeValid(rangeStr: string): boolean;
|
|
2177
|
+
getRangesUnion(ranges: Range[]): Range;
|
|
2032
2178
|
/**
|
|
2033
2179
|
* Get a Xc string that represent a part of a range
|
|
2034
2180
|
*/
|
|
@@ -2475,6 +2621,7 @@ declare class FigurePlugin extends CorePlugin<FigureState> implements FigureStat
|
|
|
2475
2621
|
[sheet: string]: Record<UID, Figure | undefined> | undefined;
|
|
2476
2622
|
};
|
|
2477
2623
|
allowDispatch(cmd: CoreCommand): CommandResult;
|
|
2624
|
+
beforeHandle(cmd: CoreCommand): void;
|
|
2478
2625
|
handle(cmd: CoreCommand): void;
|
|
2479
2626
|
private onRowColDelete;
|
|
2480
2627
|
private onRowDeletion;
|
|
@@ -2493,69 +2640,10 @@ declare class FigurePlugin extends CorePlugin<FigureState> implements FigureStat
|
|
|
2493
2640
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
2494
2641
|
}
|
|
2495
2642
|
|
|
2496
|
-
|
|
2497
|
-
readonly id: FilterTableId;
|
|
2498
|
-
readonly zone: Zone;
|
|
2499
|
-
readonly filters: Filter[];
|
|
2500
|
-
constructor(zone: Zone);
|
|
2501
|
-
/** Get zone of the table without the headers */
|
|
2502
|
-
get contentZone(): Zone | undefined;
|
|
2503
|
-
getFilterId(col: number): string | undefined;
|
|
2504
|
-
clone(): FilterTable;
|
|
2505
|
-
}
|
|
2506
|
-
declare class Filter {
|
|
2507
|
-
readonly id: UID;
|
|
2508
|
-
readonly zoneWithHeaders: Zone;
|
|
2509
|
-
constructor(id: UID, zone: Zone);
|
|
2510
|
-
get col(): HeaderIndex;
|
|
2511
|
-
/** Filtered zone, ie. zone of the filter without the header */
|
|
2512
|
-
get filteredZone(): Zone | undefined;
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2515
|
-
interface FiltersState {
|
|
2516
|
-
tables: Record<UID, Record<FilterTableId, FilterTable | undefined>>;
|
|
2517
|
-
}
|
|
2518
|
-
declare class FiltersPlugin extends CorePlugin<FiltersState> implements FiltersState {
|
|
2519
|
-
static getters: readonly ["doesZonesContainFilter", "getFilter", "getFilters", "getFilterTable", "getFilterTables", "getFilterTablesInZone", "getFilterId", "getFilterHeaders", "isFilterHeader"];
|
|
2520
|
-
readonly tables: Record<UID, Record<FilterTableId, FilterTable | undefined>>;
|
|
2521
|
-
allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
|
|
2522
|
-
handle(cmd: CoreCommand): void;
|
|
2523
|
-
getFilters(sheetId: UID): Filter[];
|
|
2524
|
-
getFilterTables(sheetId: UID): FilterTable[];
|
|
2525
|
-
getFilter(position: CellPosition): Filter | undefined;
|
|
2526
|
-
getFilterId(position: CellPosition): FilterId | undefined;
|
|
2527
|
-
getFilterTable({ sheetId, col, row }: CellPosition): FilterTable | undefined;
|
|
2528
|
-
/** Get the filter tables that are fully inside the given zone */
|
|
2529
|
-
getFilterTablesInZone(sheetId: UID, zone: Zone): FilterTable[];
|
|
2530
|
-
doesZonesContainFilter(sheetId: UID, zones: Zone[]): boolean;
|
|
2531
|
-
getFilterHeaders(sheetId: UID): Position$1[];
|
|
2532
|
-
isFilterHeader({ sheetId, col, row }: CellPosition): boolean;
|
|
2533
|
-
private onAddColumnsRows;
|
|
2534
|
-
private onDeleteColumnsRows;
|
|
2535
|
-
private createFilterTable;
|
|
2536
|
-
/** Extend a table down one row */
|
|
2537
|
-
private extendTableDown;
|
|
2538
|
-
/**
|
|
2539
|
-
* Check if an UpdateCell command should cause the given table to be extended by one row.
|
|
2540
|
-
*
|
|
2541
|
-
* The table should be extended if all of these conditions are true:
|
|
2542
|
-
* 1) The updated cell is right below the table
|
|
2543
|
-
* 2) The command adds a content to the cell
|
|
2544
|
-
* 3) No cell right below the table had any content before the command
|
|
2545
|
-
* 4) Extending the table down would not overlap with another filter
|
|
2546
|
-
* 5) Extending the table down would not overlap with a merge
|
|
2547
|
-
*
|
|
2548
|
-
*/
|
|
2549
|
-
private canUpdateCellCmdExtendTable;
|
|
2550
|
-
import(data: WorkbookData): void;
|
|
2551
|
-
export(data: WorkbookData): void;
|
|
2552
|
-
exportForExcel(data: ExcelWorkbookData): void;
|
|
2553
|
-
}
|
|
2554
|
-
|
|
2555
|
-
interface State$6 {
|
|
2643
|
+
interface State$7 {
|
|
2556
2644
|
groups: Record<UID, Record<Dimension, HeaderGroup[]>>;
|
|
2557
2645
|
}
|
|
2558
|
-
declare class HeaderGroupingPlugin extends CorePlugin<State$
|
|
2646
|
+
declare class HeaderGroupingPlugin extends CorePlugin<State$7> {
|
|
2559
2647
|
static getters: readonly ["getHeaderGroups", "getGroupsLayers", "getVisibleGroupLayers", "getHeaderGroup", "getHeaderGroupsInZone", "isGroupFolded", "isRowFolded", "isColFolded"];
|
|
2560
2648
|
private readonly groups;
|
|
2561
2649
|
allowDispatch(cmd: CoreCommand): CommandResult;
|
|
@@ -2671,16 +2759,16 @@ declare class HeaderVisibilityPlugin extends CorePlugin {
|
|
|
2671
2759
|
}
|
|
2672
2760
|
|
|
2673
2761
|
interface ImageState {
|
|
2674
|
-
readonly images: Record<UID, Record<UID, Image | undefined> | undefined>;
|
|
2762
|
+
readonly images: Record<UID, Record<UID, Image$1 | undefined> | undefined>;
|
|
2675
2763
|
}
|
|
2676
2764
|
declare class ImagePlugin extends CorePlugin<ImageState> implements ImageState {
|
|
2677
2765
|
static getters: readonly ["getImage", "getImagePath", "getImageSize"];
|
|
2678
2766
|
readonly fileStore?: FileStore;
|
|
2679
|
-
readonly images: Record<UID, Record<UID, Image | undefined> | undefined>;
|
|
2767
|
+
readonly images: Record<UID, Record<UID, Image$1 | undefined> | undefined>;
|
|
2680
2768
|
/**
|
|
2681
2769
|
* paths of images synced with the file store server.
|
|
2682
2770
|
*/
|
|
2683
|
-
readonly syncedImages: Set<Image["path"]>;
|
|
2771
|
+
readonly syncedImages: Set<Image$1["path"]>;
|
|
2684
2772
|
constructor(config: CorePluginConfig);
|
|
2685
2773
|
allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.InvalidFigureId;
|
|
2686
2774
|
handle(cmd: CoreCommand): void;
|
|
@@ -2688,7 +2776,7 @@ declare class ImagePlugin extends CorePlugin<ImageState> implements ImageState {
|
|
|
2688
2776
|
* Delete unused images from the file store
|
|
2689
2777
|
*/
|
|
2690
2778
|
garbageCollectExternalResources(): void;
|
|
2691
|
-
getImage(figureId: UID): Image;
|
|
2779
|
+
getImage(figureId: UID): Image$1;
|
|
2692
2780
|
getImagePath(figureId: UID): string;
|
|
2693
2781
|
getImageSize(figureId: UID): FigureSize;
|
|
2694
2782
|
private addImage;
|
|
@@ -2797,7 +2885,7 @@ interface SheetState {
|
|
|
2797
2885
|
readonly cellPosition: Record<UID, CellPosition | undefined>;
|
|
2798
2886
|
}
|
|
2799
2887
|
declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
2800
|
-
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "
|
|
2888
|
+
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"];
|
|
2801
2889
|
readonly sheetIdsMapName: Record<string, UID | undefined>;
|
|
2802
2890
|
readonly orderedSheetIds: UID[];
|
|
2803
2891
|
readonly sheets: Record<UID, Sheet | undefined>;
|
|
@@ -2838,7 +2926,7 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
|
2838
2926
|
getNextSheetName(baseName?: string): string;
|
|
2839
2927
|
getSheetSize(sheetId: UID): ZoneDimension;
|
|
2840
2928
|
getSheetZone(sheetId: UID): Zone;
|
|
2841
|
-
getUnboundedZone(sheetId: UID, zone: Zone): UnboundedZone;
|
|
2929
|
+
getUnboundedZone(sheetId: UID, zone: Zone | UnboundedZone): UnboundedZone;
|
|
2842
2930
|
getPaneDivisions(sheetId: UID): Readonly<PaneDivision>;
|
|
2843
2931
|
private setPaneDivisions;
|
|
2844
2932
|
/**
|
|
@@ -2846,11 +2934,7 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
|
2846
2934
|
* This validation ensures that all rows or columns cannot be deleted when frozen panes exist.
|
|
2847
2935
|
*/
|
|
2848
2936
|
checkElementsIncludeAllNonFrozenHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
|
|
2849
|
-
|
|
2850
|
-
* Check if a zone only contains empty cells
|
|
2851
|
-
*/
|
|
2852
|
-
isEmpty(sheetId: UID, zone: Zone): boolean;
|
|
2853
|
-
getCommandZones(cmd: Command): Zone[];
|
|
2937
|
+
getCommandZones(cmd: Command): Zone[];
|
|
2854
2938
|
/**
|
|
2855
2939
|
* Check if zones in the command are well formed and
|
|
2856
2940
|
* not outside the sheet.
|
|
@@ -2942,6 +3026,62 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
|
2942
3026
|
private checkZonesAreInSheet;
|
|
2943
3027
|
}
|
|
2944
3028
|
|
|
3029
|
+
interface TableState {
|
|
3030
|
+
tables: Record<UID, Record<TableId, Table | undefined>>;
|
|
3031
|
+
}
|
|
3032
|
+
declare class TablePlugin extends CorePlugin<TableState> implements TableState {
|
|
3033
|
+
static getters: readonly ["doesZonesContainFilter", "getFilter", "getFilters", "getTable", "getTables", "getTablesInZone", "getTablesOverlappingZones", "getFilterId", "getFilterHeaders", "isFilterHeader"];
|
|
3034
|
+
readonly tables: Record<UID, Record<TableId, Table | undefined>>;
|
|
3035
|
+
adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
|
|
3036
|
+
allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
|
|
3037
|
+
handle(cmd: CoreCommand): void;
|
|
3038
|
+
getFilters(sheetId: UID): Filter[];
|
|
3039
|
+
getTables(sheetId: UID): Table[];
|
|
3040
|
+
getFilter(position: CellPosition): Filter | undefined;
|
|
3041
|
+
getFilterId(position: CellPosition): FilterId | undefined;
|
|
3042
|
+
getTable({ sheetId, col, row }: CellPosition): Table | undefined;
|
|
3043
|
+
/** Get the filter tables that are fully inside the given zone */
|
|
3044
|
+
getTablesInZone(sheetId: UID, zone: Zone): Table[];
|
|
3045
|
+
getTablesOverlappingZones(sheetId: UID, zones: Zone[]): Table[];
|
|
3046
|
+
doesZonesContainFilter(sheetId: UID, zones: Zone[]): boolean;
|
|
3047
|
+
getFilterHeaders(sheetId: UID): Position$1[];
|
|
3048
|
+
isFilterHeader({ sheetId, col, row }: CellPosition): boolean;
|
|
3049
|
+
/** Extend a table down one row */
|
|
3050
|
+
private extendTableDown;
|
|
3051
|
+
/** Extend a table right one col */
|
|
3052
|
+
private extendTableRight;
|
|
3053
|
+
/**
|
|
3054
|
+
* Check if an UpdateCell command should cause the given table to be extended by one row or col.
|
|
3055
|
+
*
|
|
3056
|
+
* The table should be extended if all of these conditions are true:
|
|
3057
|
+
* 1) The updated cell is right below/right of the table
|
|
3058
|
+
* 2) The command adds a content to the cell
|
|
3059
|
+
* 3) No cell right below/right next to the table had any content before the command
|
|
3060
|
+
* 4) Extending the table down/right would not overlap with another table
|
|
3061
|
+
* 5) Extending the table down/right would not overlap with a merge
|
|
3062
|
+
*
|
|
3063
|
+
*/
|
|
3064
|
+
private canUpdateCellCmdExtendTable;
|
|
3065
|
+
private checkUpdatedTableZoneIsValid;
|
|
3066
|
+
private checkTableConfigUpdateIsValid;
|
|
3067
|
+
private createTable;
|
|
3068
|
+
private updateTable;
|
|
3069
|
+
/**
|
|
3070
|
+
* Update the old config of a table with the new partial config from an UpdateTable command.
|
|
3071
|
+
*
|
|
3072
|
+
* Make sure the new config make sense (e.g. if the table has no header, it should not have
|
|
3073
|
+
* filters and number of headers should be 0)
|
|
3074
|
+
*/
|
|
3075
|
+
private updateTableConfig;
|
|
3076
|
+
private createFilterFromZone;
|
|
3077
|
+
private createFilter;
|
|
3078
|
+
private copyTableForSheet;
|
|
3079
|
+
private applyRangeChangeOnTable;
|
|
3080
|
+
import(data: WorkbookData): void;
|
|
3081
|
+
export(data: WorkbookData): void;
|
|
3082
|
+
exportForExcel(data: ExcelWorkbookData): void;
|
|
3083
|
+
}
|
|
3084
|
+
|
|
2945
3085
|
declare class SelectiveHistory<T = unknown> {
|
|
2946
3086
|
private HEAD_BRANCH;
|
|
2947
3087
|
private HEAD_OPERATION;
|
|
@@ -3023,6 +3163,11 @@ declare class SelectiveHistory<T = unknown> {
|
|
|
3023
3163
|
private fastForward;
|
|
3024
3164
|
}
|
|
3025
3165
|
|
|
3166
|
+
interface Dependencies {
|
|
3167
|
+
references: string[];
|
|
3168
|
+
numbers: number[];
|
|
3169
|
+
strings: string[];
|
|
3170
|
+
}
|
|
3026
3171
|
interface CellData {
|
|
3027
3172
|
content?: string;
|
|
3028
3173
|
style?: number;
|
|
@@ -3060,7 +3205,7 @@ interface SheetData {
|
|
|
3060
3205
|
};
|
|
3061
3206
|
conditionalFormats: ConditionalFormat[];
|
|
3062
3207
|
dataValidationRules?: DataValidationRuleData[];
|
|
3063
|
-
|
|
3208
|
+
tables: TableData[];
|
|
3064
3209
|
areGridLinesVisible?: boolean;
|
|
3065
3210
|
isVisible: boolean;
|
|
3066
3211
|
panes?: PaneDivision;
|
|
@@ -3098,8 +3243,8 @@ interface ExcelSheetData extends Omit<SheetData, "figureTables" | "cols" | "rows
|
|
|
3098
3243
|
[key: string]: ExcelCellData | undefined;
|
|
3099
3244
|
};
|
|
3100
3245
|
charts: FigureData<ExcelChartDefinition>[];
|
|
3101
|
-
images: FigureData<Image>[];
|
|
3102
|
-
|
|
3246
|
+
images: FigureData<Image$1>[];
|
|
3247
|
+
tables: ExcelTableData[];
|
|
3103
3248
|
cols: {
|
|
3104
3249
|
[key: number]: ExcelHeaderData;
|
|
3105
3250
|
};
|
|
@@ -3111,13 +3256,14 @@ interface ExcelHeaderData extends HeaderData {
|
|
|
3111
3256
|
outlineLevel?: number;
|
|
3112
3257
|
collapsed?: boolean;
|
|
3113
3258
|
}
|
|
3114
|
-
interface
|
|
3259
|
+
interface TableData {
|
|
3115
3260
|
range: string;
|
|
3261
|
+
config?: TableConfig;
|
|
3116
3262
|
}
|
|
3117
3263
|
interface DataValidationRuleData extends Omit<DataValidationRule, "ranges"> {
|
|
3118
3264
|
ranges: string[];
|
|
3119
3265
|
}
|
|
3120
|
-
interface
|
|
3266
|
+
interface ExcelTableData {
|
|
3121
3267
|
range: string;
|
|
3122
3268
|
filters: ExcelFilterData[];
|
|
3123
3269
|
}
|
|
@@ -3406,7 +3552,7 @@ declare class UIPlugin<State = any> extends BasePlugin<State, Command> {
|
|
|
3406
3552
|
}
|
|
3407
3553
|
|
|
3408
3554
|
declare class EvaluationPlugin extends UIPlugin {
|
|
3409
|
-
static getters: readonly ["evaluateFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getSpreadPositionsOf", "getArrayFormulaSpreadingOn"];
|
|
3555
|
+
static getters: readonly ["evaluateFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getSpreadPositionsOf", "getArrayFormulaSpreadingOn", "isEmpty"];
|
|
3410
3556
|
private shouldRebuildDependenciesGraph;
|
|
3411
3557
|
private evaluator;
|
|
3412
3558
|
private positionsToUpdate;
|
|
@@ -3432,6 +3578,10 @@ declare class EvaluationPlugin extends UIPlugin {
|
|
|
3432
3578
|
getEvaluatedCellsInZone(sheetId: UID, zone: Zone): EvaluatedCell[];
|
|
3433
3579
|
getSpreadPositionsOf(position: CellPosition): CellPosition[];
|
|
3434
3580
|
getArrayFormulaSpreadingOn(position: CellPosition): CellPosition | undefined;
|
|
3581
|
+
/**
|
|
3582
|
+
* Check if a zone only contains empty cells
|
|
3583
|
+
*/
|
|
3584
|
+
isEmpty(sheetId: UID, zone: Zone): boolean;
|
|
3435
3585
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
3436
3586
|
/**
|
|
3437
3587
|
* Returns the corresponding formula cell of a given cell
|
|
@@ -3452,16 +3602,18 @@ interface CustomColorState {
|
|
|
3452
3602
|
*/
|
|
3453
3603
|
declare class CustomColorsPlugin extends UIPlugin<CustomColorState> {
|
|
3454
3604
|
private readonly customColors;
|
|
3455
|
-
private readonly configCustomColors;
|
|
3456
3605
|
private readonly shouldUpdateColors;
|
|
3457
3606
|
static getters: readonly ["getCustomColors"];
|
|
3458
3607
|
constructor(config: UIPluginConfig);
|
|
3459
3608
|
handle(cmd: CoreViewCommand): void;
|
|
3460
3609
|
finalize(): void;
|
|
3461
3610
|
getCustomColors(): Color[];
|
|
3611
|
+
private computeCustomColors;
|
|
3462
3612
|
private getColorsFromCells;
|
|
3463
3613
|
private getFormattingColors;
|
|
3464
3614
|
private getChartColors;
|
|
3615
|
+
private getTableColors;
|
|
3616
|
+
private getTableStyleElementColors;
|
|
3465
3617
|
private tryToAddColor;
|
|
3466
3618
|
}
|
|
3467
3619
|
|
|
@@ -3486,13 +3638,13 @@ declare class EvaluationChartPlugin extends UIPlugin<EvaluationChartState> {
|
|
|
3486
3638
|
}
|
|
3487
3639
|
|
|
3488
3640
|
declare class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
3489
|
-
static getters: readonly ["getConditionalIcon", "
|
|
3641
|
+
static getters: readonly ["getConditionalIcon", "getCellConditionalFormatStyle"];
|
|
3490
3642
|
private isStale;
|
|
3491
3643
|
private computedStyles;
|
|
3492
3644
|
private computedIcons;
|
|
3493
3645
|
handle(cmd: CoreViewCommand): void;
|
|
3494
3646
|
finalize(): void;
|
|
3495
|
-
|
|
3647
|
+
getCellConditionalFormatStyle(position: CellPosition): Style | undefined;
|
|
3496
3648
|
getConditionalIcon({ sheetId, col, row }: CellPosition): string | undefined;
|
|
3497
3649
|
/**
|
|
3498
3650
|
* Compute the styles according to the conditional formatting.
|
|
@@ -3533,7 +3685,7 @@ type SheetValidationResult = {
|
|
|
3533
3685
|
[col: HeaderIndex]: Array<Lazy<ValidationResult>>;
|
|
3534
3686
|
};
|
|
3535
3687
|
declare class EvaluationDataValidationPlugin extends UIPlugin {
|
|
3536
|
-
static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "
|
|
3688
|
+
static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "isCellValidCheckbox", "isDataValidationInvalid"];
|
|
3537
3689
|
validationResults: Record<UID, SheetValidationResult>;
|
|
3538
3690
|
handle(cmd: CoreViewCommand): void;
|
|
3539
3691
|
private setContentToBooleanCells;
|
|
@@ -3548,8 +3700,6 @@ declare class EvaluationDataValidationPlugin extends UIPlugin {
|
|
|
3548
3700
|
isCellValidCheckbox(cellPosition: CellPosition): boolean;
|
|
3549
3701
|
/** Get the validation result if the cell on the given position had the given value */
|
|
3550
3702
|
getValidationResultForCellValue(cellValue: CellValue, cellPosition: CellPosition): ValidationResult;
|
|
3551
|
-
getDataValidationCheckBoxCellPositions(): CellPosition[];
|
|
3552
|
-
getDataValidationListCellsPositions(): CellPosition[];
|
|
3553
3703
|
private getValidationResultForCell;
|
|
3554
3704
|
private computeSheetValidationResults;
|
|
3555
3705
|
private getRuleErrorForCellValue;
|
|
@@ -3616,6 +3766,7 @@ declare class AutofillPlugin extends UIPlugin {
|
|
|
3616
3766
|
* autofiller
|
|
3617
3767
|
*/
|
|
3618
3768
|
private autofillAuto;
|
|
3769
|
+
private getAutofillAutoLastRow;
|
|
3619
3770
|
/**
|
|
3620
3771
|
* Generate the next cell
|
|
3621
3772
|
*/
|
|
@@ -3772,7 +3923,6 @@ declare class CollaborativePlugin extends UIPlugin {
|
|
|
3772
3923
|
* the search with a new value.
|
|
3773
3924
|
*/
|
|
3774
3925
|
declare class FindAndReplacePlugin extends UIPlugin {
|
|
3775
|
-
static layers: readonly ["Search"];
|
|
3776
3926
|
static getters: readonly [];
|
|
3777
3927
|
handle(cmd: Command): void;
|
|
3778
3928
|
private replaceMatch;
|
|
@@ -3882,6 +4032,26 @@ declare class SplitToColumnsPlugin extends UIPlugin {
|
|
|
3882
4032
|
private checkSeparatorInSelection;
|
|
3883
4033
|
}
|
|
3884
4034
|
|
|
4035
|
+
declare class TableStylePlugin extends UIPlugin {
|
|
4036
|
+
static getters: readonly ["getCellTableStyle", "getCellTableBorder"];
|
|
4037
|
+
private tableStyles;
|
|
4038
|
+
handle(cmd: Command): void;
|
|
4039
|
+
finalize(): void;
|
|
4040
|
+
getCellTableStyle(position: CellPosition): Style | undefined;
|
|
4041
|
+
getCellTableBorder(position: CellPosition): Border$1 | undefined;
|
|
4042
|
+
private computeTableStyle;
|
|
4043
|
+
/**
|
|
4044
|
+
* Get the actual table config that will be used to compute the table style. It is different from
|
|
4045
|
+
* the config of the table because of hidden rows and columns in the sheet. For example remove the
|
|
4046
|
+
* hidden rows from config.numberOfHeaders.
|
|
4047
|
+
*/
|
|
4048
|
+
private getTableRuntimeConfig;
|
|
4049
|
+
/**
|
|
4050
|
+
* Get a mapping: relative col/row position in the table <=> col/row in the sheet
|
|
4051
|
+
*/
|
|
4052
|
+
private getTableMapping;
|
|
4053
|
+
}
|
|
4054
|
+
|
|
3885
4055
|
declare class UIOptionsPlugin extends UIPlugin {
|
|
3886
4056
|
static getters: readonly ["shouldShowFormulas"];
|
|
3887
4057
|
private showFormulas;
|
|
@@ -3890,7 +4060,7 @@ declare class UIOptionsPlugin extends UIPlugin {
|
|
|
3890
4060
|
}
|
|
3891
4061
|
|
|
3892
4062
|
declare class SheetUIPlugin extends UIPlugin {
|
|
3893
|
-
static getters: readonly ["doesCellHaveGridIcon", "getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getContiguousZone"
|
|
4063
|
+
static getters: readonly ["doesCellHaveGridIcon", "getCellWidth", "getCellComputedBorder", "getCellComputedStyle", "getTextWidth", "getCellText", "getCellMultiLineText", "getContiguousZone"];
|
|
3894
4064
|
private ctx;
|
|
3895
4065
|
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
3896
4066
|
handle(cmd: Command): void;
|
|
@@ -3907,16 +4077,13 @@ declare class SheetUIPlugin extends UIPlugin {
|
|
|
3907
4077
|
* Expands the given zone until bordered by empty cells or reached the sheet boundaries.
|
|
3908
4078
|
*/
|
|
3909
4079
|
getContiguousZone(sheetId: UID, zoneToExpand: Zone): Zone;
|
|
3910
|
-
/**
|
|
3911
|
-
* Checks if a cell evaluated value is empty. If the cell is part of a merge,
|
|
3912
|
-
* the check applies to the main cell of the merge.
|
|
3913
|
-
*/
|
|
3914
|
-
isEvaluatedCellEmpty(position: CellPosition): boolean;
|
|
3915
4080
|
/**
|
|
3916
4081
|
* Checks if a cell is empty (i.e. does not have a content or a formula does not spread over it).
|
|
3917
4082
|
* If the cell is part of a merge, the check applies to the main cell of the merge.
|
|
3918
4083
|
*/
|
|
3919
4084
|
private isCellEmpty;
|
|
4085
|
+
getCellComputedBorder(position: CellPosition): Border$1 | null;
|
|
4086
|
+
getCellComputedStyle(position: CellPosition): Style;
|
|
3920
4087
|
private getColMaxWidth;
|
|
3921
4088
|
/**
|
|
3922
4089
|
* Check that any "sheetId" in the command matches an existing
|
|
@@ -3982,7 +4149,7 @@ declare class ClipboardPlugin extends UIPlugin {
|
|
|
3982
4149
|
}
|
|
3983
4150
|
|
|
3984
4151
|
declare class FilterEvaluationPlugin extends UIPlugin {
|
|
3985
|
-
static getters: readonly ["
|
|
4152
|
+
static getters: readonly ["getFilterHiddenValues", "getFirstTableInSelection", "isRowFiltered", "isFilterActive"];
|
|
3986
4153
|
private filterValues;
|
|
3987
4154
|
hiddenRows: Set<number>;
|
|
3988
4155
|
isEvaluationDirty: boolean;
|
|
@@ -3990,10 +4157,9 @@ declare class FilterEvaluationPlugin extends UIPlugin {
|
|
|
3990
4157
|
handle(cmd: Command): void;
|
|
3991
4158
|
finalize(): void;
|
|
3992
4159
|
isRowFiltered(sheetId: UID, row: number): boolean;
|
|
3993
|
-
|
|
3994
|
-
getFilterValues(position: CellPosition): string[];
|
|
4160
|
+
getFilterHiddenValues(position: CellPosition): string[];
|
|
3995
4161
|
isFilterActive(position: CellPosition): boolean;
|
|
3996
|
-
|
|
4162
|
+
getFirstTableInSelection(): Table | undefined;
|
|
3997
4163
|
private updateFilter;
|
|
3998
4164
|
private updateHiddenRows;
|
|
3999
4165
|
private getCellValueAsString;
|
|
@@ -4229,7 +4395,7 @@ type SheetViewports = {
|
|
|
4229
4395
|
*
|
|
4230
4396
|
*/
|
|
4231
4397
|
declare class SheetViewPlugin extends UIPlugin {
|
|
4232
|
-
static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getActiveSheetDOMScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport"];
|
|
4398
|
+
static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getActiveSheetDOMScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport"];
|
|
4233
4399
|
readonly viewports: Record<UID, SheetViewports | undefined>;
|
|
4234
4400
|
/**
|
|
4235
4401
|
* The viewport dimensions are usually set by one of the components
|
|
@@ -4276,6 +4442,10 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
4276
4442
|
getActiveSheetDOMScrollInfo(): SheetDOMScrollInfo;
|
|
4277
4443
|
getSheetViewVisibleCols(): HeaderIndex[];
|
|
4278
4444
|
getSheetViewVisibleRows(): HeaderIndex[];
|
|
4445
|
+
/**
|
|
4446
|
+
* Get the positions of all the cells that are visible in the viewport, taking merges into account.
|
|
4447
|
+
*/
|
|
4448
|
+
getVisibleCellPositions(): CellPosition[];
|
|
4279
4449
|
/**
|
|
4280
4450
|
* Return the main viewport maximum size relative to the client size.
|
|
4281
4451
|
*/
|
|
@@ -4292,6 +4462,10 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
4292
4462
|
* Computes the coordinates and size to draw the zone on the canvas
|
|
4293
4463
|
*/
|
|
4294
4464
|
getVisibleRect(zone: Zone): Rect;
|
|
4465
|
+
/**
|
|
4466
|
+
* Computes the coordinates and size to draw the zone without taking the grid offset into account
|
|
4467
|
+
*/
|
|
4468
|
+
getVisibleRectWithoutHeaders(zone: Zone): Rect;
|
|
4295
4469
|
/**
|
|
4296
4470
|
* Returns the position of the MainViewport relatively to the start of the grid (without headers)
|
|
4297
4471
|
* It corresponds to the summed dimensions of the visible cols/rows (in x/y respectively)
|
|
@@ -4399,11 +4573,11 @@ type PluginGetters<Plugin extends {
|
|
|
4399
4573
|
getters: readonly string[];
|
|
4400
4574
|
}> = Pick<InstanceType<Plugin>, GetterNames<Plugin>>;
|
|
4401
4575
|
type RangeAdapterGetters = Pick<RangeAdapter, GetterNames<typeof RangeAdapter>>;
|
|
4402
|
-
type CoreGetters = PluginGetters<typeof SheetPlugin> & PluginGetters<typeof HeaderSizePlugin> & PluginGetters<typeof HeaderVisibilityPlugin> & PluginGetters<typeof CellPlugin> & PluginGetters<typeof MergePlugin> & PluginGetters<typeof BordersPlugin> & PluginGetters<typeof ChartPlugin> & PluginGetters<typeof ImagePlugin> & PluginGetters<typeof FigurePlugin> & RangeAdapterGetters & PluginGetters<typeof ConditionalFormatPlugin> & PluginGetters<typeof
|
|
4576
|
+
type CoreGetters = PluginGetters<typeof SheetPlugin> & PluginGetters<typeof HeaderSizePlugin> & PluginGetters<typeof HeaderVisibilityPlugin> & PluginGetters<typeof CellPlugin> & PluginGetters<typeof MergePlugin> & PluginGetters<typeof BordersPlugin> & PluginGetters<typeof ChartPlugin> & PluginGetters<typeof ImagePlugin> & PluginGetters<typeof FigurePlugin> & RangeAdapterGetters & PluginGetters<typeof ConditionalFormatPlugin> & PluginGetters<typeof TablePlugin> & PluginGetters<typeof SettingsPlugin> & PluginGetters<typeof HeaderGroupingPlugin> & PluginGetters<typeof DataValidationPlugin>;
|
|
4403
4577
|
type Getters = {
|
|
4404
4578
|
isReadonly: () => boolean;
|
|
4405
4579
|
isDashboard: () => boolean;
|
|
4406
|
-
} & CoreGetters & PluginGetters<typeof AutofillPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof FindAndReplacePlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof GridSelectionPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof SheetViewPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin>;
|
|
4580
|
+
} & CoreGetters & PluginGetters<typeof AutofillPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof FindAndReplacePlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof GridSelectionPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof SheetViewPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin> & PluginGetters<typeof TableStylePlugin>;
|
|
4407
4581
|
|
|
4408
4582
|
type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "RANGE<ANY>" | "META";
|
|
4409
4583
|
interface ArgDefinition {
|
|
@@ -4441,6 +4615,89 @@ type EvalContext = {
|
|
|
4441
4615
|
addDependencies?: (position: CellPosition, ranges: Range[]) => void;
|
|
4442
4616
|
};
|
|
4443
4617
|
|
|
4618
|
+
/**
|
|
4619
|
+
* An Operation can be executed to change a data structure from state A
|
|
4620
|
+
* to state B.
|
|
4621
|
+
* It should hold the necessary data used to perform this transition.
|
|
4622
|
+
* It should be possible to revert the changes made by this operation.
|
|
4623
|
+
*
|
|
4624
|
+
* In the context of o-spreadsheet, the data from an operation would
|
|
4625
|
+
* be a revision (the commands are used to execute it, the `changes` are used
|
|
4626
|
+
* to revert it).
|
|
4627
|
+
*/
|
|
4628
|
+
declare class Operation<T> {
|
|
4629
|
+
readonly id: UID;
|
|
4630
|
+
readonly data: T;
|
|
4631
|
+
constructor(id: UID, data: T);
|
|
4632
|
+
transformed(transformation: Transformation<T>): Operation<T>;
|
|
4633
|
+
}
|
|
4634
|
+
|
|
4635
|
+
/**
|
|
4636
|
+
* A branch holds a sequence of operations.
|
|
4637
|
+
* It can be represented as "A - B - C - D" if A, B, C and D are executed one
|
|
4638
|
+
* after the other.
|
|
4639
|
+
*
|
|
4640
|
+
* @param buildTransformation Factory to build transformations
|
|
4641
|
+
* @param operations initial operations
|
|
4642
|
+
*/
|
|
4643
|
+
declare class Branch<T> {
|
|
4644
|
+
private readonly buildTransformation;
|
|
4645
|
+
private operations;
|
|
4646
|
+
constructor(buildTransformation: TransformationFactory<T>, operations?: Operation<T>[]);
|
|
4647
|
+
getOperations(): readonly Operation<T>[];
|
|
4648
|
+
getOperation(operationId: UID): Operation<T>;
|
|
4649
|
+
getLastOperationId(): UID | undefined;
|
|
4650
|
+
/**
|
|
4651
|
+
* Get the id of the operation appears first in the list of operations
|
|
4652
|
+
*/
|
|
4653
|
+
getFirstOperationAmong(op1: UID, op2: UID): UID;
|
|
4654
|
+
contains(operationId: UID): boolean;
|
|
4655
|
+
/**
|
|
4656
|
+
* Add the given operation as the first operation
|
|
4657
|
+
*/
|
|
4658
|
+
prepend(operation: Operation<T>): void;
|
|
4659
|
+
/**
|
|
4660
|
+
* add the given operation after the given predecessorOpId
|
|
4661
|
+
*/
|
|
4662
|
+
insert(newOperation: Operation<T>, predecessorOpId: UID): void;
|
|
4663
|
+
/**
|
|
4664
|
+
* Add the given operation as the last operation
|
|
4665
|
+
*/
|
|
4666
|
+
append(operation: Operation<T>): void;
|
|
4667
|
+
/**
|
|
4668
|
+
* Append operations in the given branch to this branch.
|
|
4669
|
+
*/
|
|
4670
|
+
appendBranch(branch: Branch<T>): void;
|
|
4671
|
+
/**
|
|
4672
|
+
* Create and return a copy of this branch, starting after the given operationId
|
|
4673
|
+
*/
|
|
4674
|
+
fork(operationId: UID): Branch<T>;
|
|
4675
|
+
/**
|
|
4676
|
+
* Transform all the operations in this branch with the given transformation
|
|
4677
|
+
*/
|
|
4678
|
+
transform(transformation: Transformation<T>): void;
|
|
4679
|
+
/**
|
|
4680
|
+
* Cut the branch before the operation, meaning the operation
|
|
4681
|
+
* and all following operations are dropped.
|
|
4682
|
+
*/
|
|
4683
|
+
cutBefore(operationId: UID): void;
|
|
4684
|
+
/**
|
|
4685
|
+
* Cut the branch after the operation, meaning all following operations are dropped.
|
|
4686
|
+
*/
|
|
4687
|
+
cutAfter(operationId: UID): void;
|
|
4688
|
+
/**
|
|
4689
|
+
* Find an operation in this branch based on its id.
|
|
4690
|
+
* This returns the operation itself, operations which comes before it
|
|
4691
|
+
* and operation which comes after it.
|
|
4692
|
+
*/
|
|
4693
|
+
private locateOperation;
|
|
4694
|
+
}
|
|
4695
|
+
|
|
4696
|
+
interface CreateRevisionOptions {
|
|
4697
|
+
revisionId?: UID;
|
|
4698
|
+
clientId?: UID;
|
|
4699
|
+
pending?: boolean;
|
|
4700
|
+
}
|
|
4444
4701
|
interface HistoryChange {
|
|
4445
4702
|
path: [any, ...(number | string)[]];
|
|
4446
4703
|
before: any;
|
|
@@ -4467,6 +4724,15 @@ interface TransformationFactory<T = unknown> {
|
|
|
4467
4724
|
*/
|
|
4468
4725
|
with: (operation: T) => Transformation<T>;
|
|
4469
4726
|
}
|
|
4727
|
+
interface OperationSequenceNode<T> {
|
|
4728
|
+
operation: Operation<T>;
|
|
4729
|
+
branch: Branch<T>;
|
|
4730
|
+
isCancelled: boolean;
|
|
4731
|
+
next?: {
|
|
4732
|
+
operation: Operation<T>;
|
|
4733
|
+
branch: Branch<T>;
|
|
4734
|
+
};
|
|
4735
|
+
}
|
|
4470
4736
|
|
|
4471
4737
|
/**
|
|
4472
4738
|
* Coordinate in pixels
|
|
@@ -4480,6 +4746,29 @@ interface DOMDimension {
|
|
|
4480
4746
|
height: Pixel;
|
|
4481
4747
|
}
|
|
4482
4748
|
type Rect = DOMCoordinates & DOMDimension;
|
|
4749
|
+
interface BoxTextContent {
|
|
4750
|
+
textLines: string[];
|
|
4751
|
+
width: Pixel;
|
|
4752
|
+
align: Align;
|
|
4753
|
+
}
|
|
4754
|
+
interface Box extends Rect {
|
|
4755
|
+
content?: BoxTextContent;
|
|
4756
|
+
style: Style;
|
|
4757
|
+
border?: Border$1;
|
|
4758
|
+
hasIcon?: boolean;
|
|
4759
|
+
clipRect?: Rect;
|
|
4760
|
+
isError?: boolean;
|
|
4761
|
+
image?: Image;
|
|
4762
|
+
isMerge?: boolean;
|
|
4763
|
+
verticalAlign?: VerticalAlign;
|
|
4764
|
+
isOverflow?: boolean;
|
|
4765
|
+
}
|
|
4766
|
+
interface Image {
|
|
4767
|
+
clipIcon: Rect | null;
|
|
4768
|
+
size: Pixel;
|
|
4769
|
+
type: "icon";
|
|
4770
|
+
image: HTMLImageElement;
|
|
4771
|
+
}
|
|
4483
4772
|
/**
|
|
4484
4773
|
* The viewport is the visible area of a sheet.
|
|
4485
4774
|
* Column and row headers are not included in the viewport.
|
|
@@ -4518,13 +4807,19 @@ declare const LAYERS: {
|
|
|
4518
4807
|
readonly Background: 0;
|
|
4519
4808
|
readonly Highlights: 1;
|
|
4520
4809
|
readonly Clipboard: 2;
|
|
4521
|
-
readonly Search: 3;
|
|
4522
4810
|
readonly Chart: 4;
|
|
4523
4811
|
readonly Autofill: 5;
|
|
4524
4812
|
readonly Selection: 6;
|
|
4525
4813
|
readonly Headers: 100;
|
|
4526
4814
|
};
|
|
4527
4815
|
type LayerName = keyof typeof LAYERS;
|
|
4816
|
+
declare const OrderedLayers: () => ("Chart" | "Background" | "Highlights" | "Clipboard" | "Autofill" | "Selection" | "Headers")[];
|
|
4817
|
+
/**
|
|
4818
|
+
*
|
|
4819
|
+
* @param layer New layer name
|
|
4820
|
+
* @param priority The lower priorities are rendered first
|
|
4821
|
+
*/
|
|
4822
|
+
declare function addRenderingLayer(layer: string, priority: number): void;
|
|
4528
4823
|
interface EdgeScrollInfo {
|
|
4529
4824
|
canEdgeScroll: boolean;
|
|
4530
4825
|
direction: ScrollDirection$1;
|
|
@@ -4624,6 +4919,7 @@ declare function createCurrencyFormat(currency: Partial<Currency>): Format;
|
|
|
4624
4919
|
* Sparse arrays remain sparse.
|
|
4625
4920
|
*/
|
|
4626
4921
|
declare function deepCopy<T>(obj: T): T;
|
|
4922
|
+
declare function unquote(string: string, quoteChar?: "'" | '"'): string;
|
|
4627
4923
|
declare function isMarkdownLink(str: string): boolean;
|
|
4628
4924
|
/**
|
|
4629
4925
|
* Build a markdown link from a label and an url
|
|
@@ -4687,7 +4983,7 @@ declare class RangeImpl implements Range {
|
|
|
4687
4983
|
clone(rangeParams?: Partial<ConstructorArgs>): RangeImpl;
|
|
4688
4984
|
}
|
|
4689
4985
|
|
|
4690
|
-
declare function computeTextWidth(context: CanvasRenderingContext2D, text: string, style: Style): number;
|
|
4986
|
+
declare function computeTextWidth(context: CanvasRenderingContext2D, text: string, style: Style, fontUnit?: "px" | "pt"): number;
|
|
4691
4987
|
|
|
4692
4988
|
declare class UuidGenerator {
|
|
4693
4989
|
private isFastIdStrategy;
|
|
@@ -4717,9 +5013,9 @@ declare function toUnboundedZone(xc: string): UnboundedZone;
|
|
|
4717
5013
|
*
|
|
4718
5014
|
* Examples:
|
|
4719
5015
|
* "A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
|
|
4720
|
-
* "B1:B3" ==> Top 0, Bottom
|
|
5016
|
+
* "B1:B3" ==> Top 0, Bottom 2, Left: 1, Right: 1
|
|
4721
5017
|
* "Sheet1!A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
|
|
4722
|
-
* "Sheet1!B1:B3" ==> Top 0, Bottom
|
|
5018
|
+
* "Sheet1!B1:B3" ==> Top 0, Bottom 2, Left: 1, Right: 1
|
|
4723
5019
|
*
|
|
4724
5020
|
* @param xc the string reference to convert
|
|
4725
5021
|
*
|
|
@@ -5167,7 +5463,7 @@ declare class SelectionInputStore extends SpreadsheetStore {
|
|
|
5167
5463
|
readonly highlights: Highlight$1[];
|
|
5168
5464
|
readonly register: (highlightProvider: HighlightProvider) => void;
|
|
5169
5465
|
readonly unRegister: (highlightProvider: HighlightProvider) => void;
|
|
5170
|
-
readonly drawLayer: (ctx: GridRenderingContext, layer: "Chart" | "Background" | "Highlights" | "Clipboard" | "
|
|
5466
|
+
readonly drawLayer: (ctx: GridRenderingContext, layer: "Chart" | "Background" | "Highlights" | "Clipboard" | "Autofill" | "Selection" | "Headers") => void;
|
|
5171
5467
|
readonly dispose: () => void;
|
|
5172
5468
|
};
|
|
5173
5469
|
constructor(get: Get, initialRanges?: string[], inputHasSingleRange?: boolean);
|
|
@@ -5212,7 +5508,7 @@ declare class SelectionInputStore extends SpreadsheetStore {
|
|
|
5212
5508
|
private setRange;
|
|
5213
5509
|
private removeRangeByIndex;
|
|
5214
5510
|
/**
|
|
5215
|
-
*
|
|
5511
|
+
* Converts highlights input format to the command format.
|
|
5216
5512
|
* The first xc in the input range will keep its color.
|
|
5217
5513
|
* Invalid ranges and ranges from other sheets than the active sheets
|
|
5218
5514
|
* are ignored.
|
|
@@ -5234,7 +5530,7 @@ declare class SelectionInputStore extends SpreadsheetStore {
|
|
|
5234
5530
|
getIndex(rangeId: number | null): number | null;
|
|
5235
5531
|
}
|
|
5236
5532
|
|
|
5237
|
-
interface Props$
|
|
5533
|
+
interface Props$Q {
|
|
5238
5534
|
ranges: string[];
|
|
5239
5535
|
hasSingleRange?: boolean;
|
|
5240
5536
|
required?: boolean;
|
|
@@ -5256,7 +5552,7 @@ interface SelectionRange extends Omit<RangeInputValue, "color"> {
|
|
|
5256
5552
|
* onSelectionChanged is called every time the input value
|
|
5257
5553
|
* changes.
|
|
5258
5554
|
*/
|
|
5259
|
-
declare class SelectionInput extends Component<Props$
|
|
5555
|
+
declare class SelectionInput extends Component<Props$Q, SpreadsheetChildEnv> {
|
|
5260
5556
|
static template: string;
|
|
5261
5557
|
static props: {
|
|
5262
5558
|
ranges: ArrayConstructor;
|
|
@@ -5306,11 +5602,11 @@ declare class SelectionInput extends Component<Props$P, SpreadsheetChildEnv> {
|
|
|
5306
5602
|
confirm(): void;
|
|
5307
5603
|
}
|
|
5308
5604
|
|
|
5309
|
-
interface Props$
|
|
5605
|
+
interface Props$P {
|
|
5310
5606
|
messages: string[];
|
|
5311
5607
|
msgType: "warning" | "error";
|
|
5312
5608
|
}
|
|
5313
|
-
declare class ValidationMessages extends Component<Props$
|
|
5609
|
+
declare class ValidationMessages extends Component<Props$P, SpreadsheetChildEnv> {
|
|
5314
5610
|
static template: string;
|
|
5315
5611
|
static props: {
|
|
5316
5612
|
messages: ArrayConstructor;
|
|
@@ -5319,15 +5615,16 @@ declare class ValidationMessages extends Component<Props$O, SpreadsheetChildEnv>
|
|
|
5319
5615
|
get divClasses(): "o-validation-warning text-warning" | "o-validation-error text-danger";
|
|
5320
5616
|
}
|
|
5321
5617
|
|
|
5322
|
-
interface Props$
|
|
5618
|
+
interface Props$O {
|
|
5323
5619
|
label?: string;
|
|
5324
5620
|
value: boolean;
|
|
5325
5621
|
className?: string;
|
|
5326
5622
|
name?: string;
|
|
5327
5623
|
title?: string;
|
|
5624
|
+
disabled?: boolean;
|
|
5328
5625
|
onChange: (value: boolean) => void;
|
|
5329
5626
|
}
|
|
5330
|
-
declare class Checkbox extends Component<Props$
|
|
5627
|
+
declare class Checkbox extends Component<Props$O, SpreadsheetChildEnv> {
|
|
5331
5628
|
static template: string;
|
|
5332
5629
|
static props: {
|
|
5333
5630
|
label: {
|
|
@@ -5350,6 +5647,10 @@ declare class Checkbox extends Component<Props$N, SpreadsheetChildEnv> {
|
|
|
5350
5647
|
type: StringConstructor;
|
|
5351
5648
|
optional: boolean;
|
|
5352
5649
|
};
|
|
5650
|
+
disabled: {
|
|
5651
|
+
type: BooleanConstructor;
|
|
5652
|
+
optional: boolean;
|
|
5653
|
+
};
|
|
5353
5654
|
onChange: FunctionConstructor;
|
|
5354
5655
|
};
|
|
5355
5656
|
static defaultProps: {
|
|
@@ -5358,10 +5659,10 @@ declare class Checkbox extends Component<Props$N, SpreadsheetChildEnv> {
|
|
|
5358
5659
|
onChange(ev: InputEvent): void;
|
|
5359
5660
|
}
|
|
5360
5661
|
|
|
5361
|
-
interface Props$
|
|
5662
|
+
interface Props$N {
|
|
5362
5663
|
class?: string;
|
|
5363
5664
|
}
|
|
5364
|
-
declare class Section extends Component<Props$
|
|
5665
|
+
declare class Section extends Component<Props$N, SpreadsheetChildEnv> {
|
|
5365
5666
|
static template: string;
|
|
5366
5667
|
static props: {
|
|
5367
5668
|
class: {
|
|
@@ -5372,13 +5673,13 @@ declare class Section extends Component<Props$M, SpreadsheetChildEnv> {
|
|
|
5372
5673
|
};
|
|
5373
5674
|
}
|
|
5374
5675
|
|
|
5375
|
-
interface Props$
|
|
5676
|
+
interface Props$M {
|
|
5376
5677
|
ranges: string[];
|
|
5377
5678
|
hasSingleRange?: boolean;
|
|
5378
5679
|
onSelectionChanged: (ranges: string[]) => void;
|
|
5379
5680
|
onSelectionConfirmed: () => void;
|
|
5380
5681
|
}
|
|
5381
|
-
declare class ChartDataSeries extends Component<Props$
|
|
5682
|
+
declare class ChartDataSeries extends Component<Props$M, SpreadsheetChildEnv> {
|
|
5382
5683
|
static template: string;
|
|
5383
5684
|
static components: {
|
|
5384
5685
|
SelectionInput: typeof SelectionInput;
|
|
@@ -5396,10 +5697,10 @@ declare class ChartDataSeries extends Component<Props$L, SpreadsheetChildEnv> {
|
|
|
5396
5697
|
get title(): string;
|
|
5397
5698
|
}
|
|
5398
5699
|
|
|
5399
|
-
interface Props$
|
|
5700
|
+
interface Props$L {
|
|
5400
5701
|
messages: string[];
|
|
5401
5702
|
}
|
|
5402
|
-
declare class ChartErrorSection extends Component<Props$
|
|
5703
|
+
declare class ChartErrorSection extends Component<Props$L, SpreadsheetChildEnv> {
|
|
5403
5704
|
static template: string;
|
|
5404
5705
|
static components: {
|
|
5405
5706
|
Section: typeof Section;
|
|
@@ -5413,7 +5714,7 @@ declare class ChartErrorSection extends Component<Props$K, SpreadsheetChildEnv>
|
|
|
5413
5714
|
};
|
|
5414
5715
|
}
|
|
5415
5716
|
|
|
5416
|
-
interface Props$
|
|
5717
|
+
interface Props$K {
|
|
5417
5718
|
title?: string;
|
|
5418
5719
|
range: string;
|
|
5419
5720
|
isInvalid: boolean;
|
|
@@ -5427,7 +5728,7 @@ interface Props$J {
|
|
|
5427
5728
|
onChange: (value: boolean) => void;
|
|
5428
5729
|
}>;
|
|
5429
5730
|
}
|
|
5430
|
-
declare class ChartLabelRange extends Component<Props$
|
|
5731
|
+
declare class ChartLabelRange extends Component<Props$K, SpreadsheetChildEnv> {
|
|
5431
5732
|
static template: string;
|
|
5432
5733
|
static components: {
|
|
5433
5734
|
SelectionInput: typeof SelectionInput;
|
|
@@ -5452,16 +5753,16 @@ declare class ChartLabelRange extends Component<Props$J, SpreadsheetChildEnv> {
|
|
|
5452
5753
|
optional: boolean;
|
|
5453
5754
|
};
|
|
5454
5755
|
};
|
|
5455
|
-
static defaultProps: Partial<Props$
|
|
5756
|
+
static defaultProps: Partial<Props$K>;
|
|
5456
5757
|
}
|
|
5457
5758
|
|
|
5458
|
-
interface Props$
|
|
5759
|
+
interface Props$J {
|
|
5459
5760
|
figureId: UID;
|
|
5460
5761
|
definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
|
|
5461
5762
|
canUpdateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5462
5763
|
updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5463
5764
|
}
|
|
5464
|
-
declare class LineBarPieConfigPanel extends Component<Props$
|
|
5765
|
+
declare class LineBarPieConfigPanel extends Component<Props$J, SpreadsheetChildEnv> {
|
|
5465
5766
|
static template: string;
|
|
5466
5767
|
static components: {
|
|
5467
5768
|
SelectionInput: typeof SelectionInput;
|
|
@@ -5489,7 +5790,7 @@ declare class LineBarPieConfigPanel extends Component<Props$I, SpreadsheetChildE
|
|
|
5489
5790
|
getLabelRangeOptions(): {
|
|
5490
5791
|
name: string;
|
|
5491
5792
|
label: string;
|
|
5492
|
-
value: boolean
|
|
5793
|
+
value: boolean;
|
|
5493
5794
|
onChange: (aggregated: boolean) => void;
|
|
5494
5795
|
}[];
|
|
5495
5796
|
onUpdateDataSetsHaveTitle(dataSetsHaveTitle: boolean): void;
|
|
@@ -5661,7 +5962,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
|
|
|
5661
5962
|
isSameColor(color1: Color, color2: Color): boolean;
|
|
5662
5963
|
}
|
|
5663
5964
|
|
|
5664
|
-
interface Props$
|
|
5965
|
+
interface Props$I {
|
|
5665
5966
|
currentColor: string | undefined;
|
|
5666
5967
|
toggleColorPicker: () => void;
|
|
5667
5968
|
showColorPicker: boolean;
|
|
@@ -5672,7 +5973,7 @@ interface Props$H {
|
|
|
5672
5973
|
dropdownMaxHeight?: Pixel;
|
|
5673
5974
|
class?: string;
|
|
5674
5975
|
}
|
|
5675
|
-
declare class ColorPickerWidget extends Component<Props$
|
|
5976
|
+
declare class ColorPickerWidget extends Component<Props$I, SpreadsheetChildEnv> {
|
|
5676
5977
|
static template: string;
|
|
5677
5978
|
static props: {
|
|
5678
5979
|
currentColor: {
|
|
@@ -5710,11 +6011,11 @@ declare class ColorPickerWidget extends Component<Props$H, SpreadsheetChildEnv>
|
|
|
5710
6011
|
get colorPickerAnchorRect(): Rect;
|
|
5711
6012
|
}
|
|
5712
6013
|
|
|
5713
|
-
interface Props$
|
|
6014
|
+
interface Props$H {
|
|
5714
6015
|
currentColor?: string;
|
|
5715
6016
|
onColorPicked: (color: string) => void;
|
|
5716
6017
|
}
|
|
5717
|
-
declare class ChartColor extends Component<Props$
|
|
6018
|
+
declare class ChartColor extends Component<Props$H, SpreadsheetChildEnv> {
|
|
5718
6019
|
static template: string;
|
|
5719
6020
|
static components: {
|
|
5720
6021
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
@@ -5733,11 +6034,11 @@ declare class ChartColor extends Component<Props$G, SpreadsheetChildEnv> {
|
|
|
5733
6034
|
togglePicker(): void;
|
|
5734
6035
|
}
|
|
5735
6036
|
|
|
5736
|
-
interface Props$
|
|
6037
|
+
interface Props$G {
|
|
5737
6038
|
title: string;
|
|
5738
6039
|
update: (title: string) => void;
|
|
5739
6040
|
}
|
|
5740
|
-
declare class ChartTitle extends Component<Props$
|
|
6041
|
+
declare class ChartTitle extends Component<Props$G, SpreadsheetChildEnv> {
|
|
5741
6042
|
static template: string;
|
|
5742
6043
|
static components: {
|
|
5743
6044
|
Section: typeof Section;
|
|
@@ -5749,13 +6050,13 @@ declare class ChartTitle extends Component<Props$F, SpreadsheetChildEnv> {
|
|
|
5749
6050
|
updateTitle(ev: InputEvent): void;
|
|
5750
6051
|
}
|
|
5751
6052
|
|
|
5752
|
-
interface Props$
|
|
6053
|
+
interface Props$F {
|
|
5753
6054
|
figureId: UID;
|
|
5754
6055
|
definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
|
|
5755
6056
|
canUpdateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5756
6057
|
updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5757
6058
|
}
|
|
5758
|
-
declare class LineBarPieDesignPanel extends Component<Props$
|
|
6059
|
+
declare class LineBarPieDesignPanel extends Component<Props$F, SpreadsheetChildEnv> {
|
|
5759
6060
|
static template: string;
|
|
5760
6061
|
static components: {
|
|
5761
6062
|
ChartColor: typeof ChartColor;
|
|
@@ -5774,13 +6075,13 @@ declare class LineBarPieDesignPanel extends Component<Props$E, SpreadsheetChildE
|
|
|
5774
6075
|
updateSelect(attr: string, ev: any): void;
|
|
5775
6076
|
}
|
|
5776
6077
|
|
|
5777
|
-
interface Props$
|
|
6078
|
+
interface Props$E {
|
|
5778
6079
|
figureId: UID;
|
|
5779
6080
|
definition: GaugeChartDefinition;
|
|
5780
6081
|
canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5781
6082
|
updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5782
6083
|
}
|
|
5783
|
-
declare class GaugeChartConfigPanel extends Component<Props$
|
|
6084
|
+
declare class GaugeChartConfigPanel extends Component<Props$E, SpreadsheetChildEnv> {
|
|
5784
6085
|
static template: string;
|
|
5785
6086
|
static components: {
|
|
5786
6087
|
ChartErrorSection: typeof ChartErrorSection;
|
|
@@ -5802,13 +6103,13 @@ declare class GaugeChartConfigPanel extends Component<Props$D, SpreadsheetChildE
|
|
|
5802
6103
|
}
|
|
5803
6104
|
|
|
5804
6105
|
type GaugeMenu = "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
|
|
5805
|
-
interface Props$
|
|
6106
|
+
interface Props$D {
|
|
5806
6107
|
figureId: UID;
|
|
5807
6108
|
definition: GaugeChartDefinition;
|
|
5808
6109
|
canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5809
6110
|
updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5810
6111
|
}
|
|
5811
|
-
declare class GaugeChartDesignPanel extends Component<Props$
|
|
6112
|
+
declare class GaugeChartDesignPanel extends Component<Props$D, SpreadsheetChildEnv> {
|
|
5812
6113
|
static template: string;
|
|
5813
6114
|
static components: {
|
|
5814
6115
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
@@ -5848,7 +6149,7 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
|
|
|
5848
6149
|
getLabelRangeOptions(): {
|
|
5849
6150
|
name: string;
|
|
5850
6151
|
label: string;
|
|
5851
|
-
value: boolean
|
|
6152
|
+
value: boolean;
|
|
5852
6153
|
onChange: (aggregated: boolean) => void;
|
|
5853
6154
|
}[];
|
|
5854
6155
|
onUpdateLabelsAsText(labelsAsText: boolean): void;
|
|
@@ -5857,13 +6158,13 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
|
|
|
5857
6158
|
onUpdateCumulative(cumulative: boolean): void;
|
|
5858
6159
|
}
|
|
5859
6160
|
|
|
5860
|
-
interface Props$
|
|
6161
|
+
interface Props$C {
|
|
5861
6162
|
figureId: UID;
|
|
5862
6163
|
definition: ScorecardChartDefinition;
|
|
5863
6164
|
canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5864
6165
|
updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5865
6166
|
}
|
|
5866
|
-
declare class ScorecardChartConfigPanel extends Component<Props$
|
|
6167
|
+
declare class ScorecardChartConfigPanel extends Component<Props$C, SpreadsheetChildEnv> {
|
|
5867
6168
|
static template: string;
|
|
5868
6169
|
static components: {
|
|
5869
6170
|
SelectionInput: typeof SelectionInput;
|
|
@@ -5892,13 +6193,13 @@ declare class ScorecardChartConfigPanel extends Component<Props$B, SpreadsheetCh
|
|
|
5892
6193
|
}
|
|
5893
6194
|
|
|
5894
6195
|
type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
|
|
5895
|
-
interface Props$
|
|
6196
|
+
interface Props$B {
|
|
5896
6197
|
figureId: UID;
|
|
5897
6198
|
definition: ScorecardChartDefinition;
|
|
5898
6199
|
canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5899
6200
|
updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5900
6201
|
}
|
|
5901
|
-
declare class ScorecardChartDesignPanel extends Component<Props$
|
|
6202
|
+
declare class ScorecardChartDesignPanel extends Component<Props$B, SpreadsheetChildEnv> {
|
|
5902
6203
|
static template: string;
|
|
5903
6204
|
static components: {
|
|
5904
6205
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
@@ -6024,10 +6325,40 @@ interface FigureContent {
|
|
|
6024
6325
|
borderWidth?: number;
|
|
6025
6326
|
}
|
|
6026
6327
|
|
|
6328
|
+
interface SidePanelProps {
|
|
6329
|
+
onCloseSidePanel?: () => void;
|
|
6330
|
+
[key: string]: unknown;
|
|
6331
|
+
}
|
|
6332
|
+
interface OpenSidePanel {
|
|
6333
|
+
isOpen: true;
|
|
6334
|
+
props?: SidePanelProps;
|
|
6335
|
+
key?: string;
|
|
6336
|
+
}
|
|
6337
|
+
interface ClosedSidePanel {
|
|
6338
|
+
isOpen: false;
|
|
6339
|
+
}
|
|
6340
|
+
type SidePanelState = OpenSidePanel | ClosedSidePanel;
|
|
6341
|
+
declare class SidePanelStore extends SpreadsheetStore {
|
|
6342
|
+
initialPanelProps: SidePanelProps;
|
|
6343
|
+
componentTag: string;
|
|
6344
|
+
get isOpen(): boolean;
|
|
6345
|
+
get panelProps(): SidePanelProps;
|
|
6346
|
+
get panelKey(): string | undefined;
|
|
6347
|
+
open(componentTag: string, panelProps?: SidePanelProps): void;
|
|
6348
|
+
toggle(componentTag: string, panelProps: SidePanelProps): void;
|
|
6349
|
+
close(): void;
|
|
6350
|
+
private computeState;
|
|
6351
|
+
}
|
|
6352
|
+
|
|
6027
6353
|
interface SidePanelContent {
|
|
6028
6354
|
title: string | ((env: SpreadsheetChildEnv) => string);
|
|
6029
6355
|
Body: any;
|
|
6030
6356
|
Footer?: any;
|
|
6357
|
+
/**
|
|
6358
|
+
* A callback used to validate the props or generate new props
|
|
6359
|
+
* based on the current state of the spreadsheet model, using the getters.
|
|
6360
|
+
*/
|
|
6361
|
+
computeState?: (getters: Getters, initialProps: object) => SidePanelState;
|
|
6031
6362
|
}
|
|
6032
6363
|
|
|
6033
6364
|
/**
|
|
@@ -6061,11 +6392,25 @@ interface AutofillRule {
|
|
|
6061
6392
|
sequence: number;
|
|
6062
6393
|
}
|
|
6063
6394
|
|
|
6064
|
-
declare function transformRangeData(range: RangeData, executed: CoreCommand): RangeData | undefined;
|
|
6065
|
-
|
|
6066
6395
|
interface FunctionContext {
|
|
6396
|
+
/**
|
|
6397
|
+
* The parent function name of the token.
|
|
6398
|
+
*/
|
|
6067
6399
|
parent: string;
|
|
6400
|
+
/**
|
|
6401
|
+
* The position of the token within the argument list of its parent function.
|
|
6402
|
+
*/
|
|
6068
6403
|
argPosition: number;
|
|
6404
|
+
/**
|
|
6405
|
+
* An array of parsed arguments, possibly containing undefined values if the argument
|
|
6406
|
+
* is empty or is an invalid expression.
|
|
6407
|
+
*/
|
|
6408
|
+
args: (AST | undefined)[];
|
|
6409
|
+
/**
|
|
6410
|
+
* Array of token arrays representing the tokens for each argument.
|
|
6411
|
+
* Needed as an intermediate step to parse the arguments AST (see `args` property).
|
|
6412
|
+
*/
|
|
6413
|
+
argsTokens?: Token[][];
|
|
6069
6414
|
}
|
|
6070
6415
|
/**
|
|
6071
6416
|
* Enriched Token is used by the composer to add information on the tokens that
|
|
@@ -6086,6 +6431,27 @@ interface EnrichedToken extends Token {
|
|
|
6086
6431
|
functionContext?: FunctionContext;
|
|
6087
6432
|
}
|
|
6088
6433
|
|
|
6434
|
+
interface Props$A {
|
|
6435
|
+
proposals: AutoCompleteProposal[];
|
|
6436
|
+
selectedIndex: number | undefined;
|
|
6437
|
+
onValueSelected: (value: string) => void;
|
|
6438
|
+
onValueHovered: (index: string) => void;
|
|
6439
|
+
}
|
|
6440
|
+
declare class TextValueProvider extends Component<Props$A> {
|
|
6441
|
+
static template: string;
|
|
6442
|
+
static props: {
|
|
6443
|
+
proposals: ArrayConstructor;
|
|
6444
|
+
selectedIndex: {
|
|
6445
|
+
type: NumberConstructor;
|
|
6446
|
+
optional: boolean;
|
|
6447
|
+
};
|
|
6448
|
+
onValueSelected: FunctionConstructor;
|
|
6449
|
+
onValueHovered: FunctionConstructor;
|
|
6450
|
+
};
|
|
6451
|
+
private autoCompleteListRef;
|
|
6452
|
+
setup(): void;
|
|
6453
|
+
}
|
|
6454
|
+
|
|
6089
6455
|
type EditionMode = "editing" | "selecting" | "inactive";
|
|
6090
6456
|
interface ComposerSelection {
|
|
6091
6457
|
start: number;
|
|
@@ -6174,6 +6540,8 @@ declare class ComposerStore extends SpreadsheetStore {
|
|
|
6174
6540
|
*/
|
|
6175
6541
|
private insertText;
|
|
6176
6542
|
private updateRangeColor;
|
|
6543
|
+
/** Add headers at the end of the sheet so the formula in the composer has enough space to spread */
|
|
6544
|
+
private addHeadersForSpreadingFormula;
|
|
6177
6545
|
/**
|
|
6178
6546
|
* Highlight all ranges that can be found in the composer content.
|
|
6179
6547
|
*/
|
|
@@ -6182,7 +6550,7 @@ declare class ComposerStore extends SpreadsheetStore {
|
|
|
6182
6550
|
* Return ranges currently referenced in the composer
|
|
6183
6551
|
*/
|
|
6184
6552
|
private getReferencedRanges;
|
|
6185
|
-
get
|
|
6553
|
+
get autocompleteProvider(): AutoCompleteProvider | undefined;
|
|
6186
6554
|
/**
|
|
6187
6555
|
* Function used to determine when composer selection can start.
|
|
6188
6556
|
* Three conditions are necessary:
|
|
@@ -6210,15 +6578,282 @@ declare class ComposerFocusStore extends SpreadsheetStore {
|
|
|
6210
6578
|
private setComposerContent;
|
|
6211
6579
|
}
|
|
6212
6580
|
|
|
6581
|
+
declare class ContentEditableHelper {
|
|
6582
|
+
el: HTMLElement;
|
|
6583
|
+
constructor(el: HTMLElement);
|
|
6584
|
+
updateEl(el: HTMLElement): void;
|
|
6585
|
+
/**
|
|
6586
|
+
* select the text at position start to end, no matter the children
|
|
6587
|
+
*/
|
|
6588
|
+
selectRange(start: number, end: number): void;
|
|
6589
|
+
/**
|
|
6590
|
+
* finds the dom element that contains the character at `offset`
|
|
6591
|
+
*/
|
|
6592
|
+
private findChildAtCharacterIndex;
|
|
6593
|
+
/**
|
|
6594
|
+
* Sets (or Replaces all) the text inside the root element in the form of distinctive paragraphs and
|
|
6595
|
+
* span for each element provided in `contents`.
|
|
6596
|
+
*
|
|
6597
|
+
* The function will apply the diff between the current content and the new content to avoid the systematic
|
|
6598
|
+
* destruction of DOM elements which interferes with IME[1]
|
|
6599
|
+
*
|
|
6600
|
+
* Each line of text will be encapsulated in a paragraph element.
|
|
6601
|
+
* Each span will have its own fontcolor and specific class if provided in the HtmlContent object.
|
|
6602
|
+
*
|
|
6603
|
+
* [1] https://developer.mozilla.org/en-US/docs/Glossary/Input_method_editor
|
|
6604
|
+
*/
|
|
6605
|
+
setText(contents: HtmlContent[][]): void;
|
|
6606
|
+
scrollSelectionIntoView(): void;
|
|
6607
|
+
/**
|
|
6608
|
+
* remove the current selection of the user
|
|
6609
|
+
* */
|
|
6610
|
+
removeSelection(): void;
|
|
6611
|
+
private removeAll;
|
|
6612
|
+
/**
|
|
6613
|
+
* finds the indexes of the current selection.
|
|
6614
|
+
* */
|
|
6615
|
+
getCurrentSelection(): {
|
|
6616
|
+
start: number;
|
|
6617
|
+
end: number;
|
|
6618
|
+
};
|
|
6619
|
+
/**
|
|
6620
|
+
* Computes the text 'index' inside this.el based on the currently selected node and its offset.
|
|
6621
|
+
* The selected node is either a Text node or an Element node.
|
|
6622
|
+
*
|
|
6623
|
+
* case 1 -Text node:
|
|
6624
|
+
* the offset is the number of characters from the start of the node. We have to add this offset to the
|
|
6625
|
+
* content length of all previous nodes.
|
|
6626
|
+
*
|
|
6627
|
+
* case 2 - Element node:
|
|
6628
|
+
* the offset is the number of child nodes before the selected node. We have to add the content length of
|
|
6629
|
+
* all the bnodes prior to the selected node as well as the content of the child node before the offset.
|
|
6630
|
+
*
|
|
6631
|
+
* See the MDN documentation for more details.
|
|
6632
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Range/startOffset
|
|
6633
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Range/endOffset
|
|
6634
|
+
*
|
|
6635
|
+
*/
|
|
6636
|
+
private findSelectionIndex;
|
|
6637
|
+
private getStartAndEndSelection;
|
|
6638
|
+
getText(): string;
|
|
6639
|
+
}
|
|
6640
|
+
|
|
6213
6641
|
interface Props$z {
|
|
6214
|
-
|
|
6642
|
+
functionName: string;
|
|
6643
|
+
functionDescription: FunctionDescription;
|
|
6644
|
+
argToFocus: number;
|
|
6645
|
+
}
|
|
6646
|
+
interface AssistantState {
|
|
6647
|
+
allowCellSelectionBehind: boolean;
|
|
6215
6648
|
}
|
|
6216
|
-
declare class
|
|
6649
|
+
declare class FunctionDescriptionProvider extends Component<Props$z> {
|
|
6217
6650
|
static template: string;
|
|
6218
6651
|
static props: {
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6652
|
+
functionName: StringConstructor;
|
|
6653
|
+
functionDescription: ObjectConstructor;
|
|
6654
|
+
argToFocus: NumberConstructor;
|
|
6655
|
+
};
|
|
6656
|
+
assistantState: AssistantState;
|
|
6657
|
+
private timeOutId;
|
|
6658
|
+
setup(): void;
|
|
6659
|
+
getContext(): Props$z;
|
|
6660
|
+
onMouseMove(): void;
|
|
6661
|
+
}
|
|
6662
|
+
|
|
6663
|
+
type HtmlContent = {
|
|
6664
|
+
value: string;
|
|
6665
|
+
color?: Color;
|
|
6666
|
+
class?: string;
|
|
6667
|
+
};
|
|
6668
|
+
declare const tokenColors: {
|
|
6669
|
+
readonly OPERATOR: "#3da4ab";
|
|
6670
|
+
readonly NUMBER: "#02c39a";
|
|
6671
|
+
readonly STRING: "#00a82d";
|
|
6672
|
+
readonly FUNCTION: "#4a4e4d";
|
|
6673
|
+
readonly DEBUGGER: "#3da4ab";
|
|
6674
|
+
readonly LEFT_PAREN: "#4a4e4d";
|
|
6675
|
+
readonly RIGHT_PAREN: "#4a4e4d";
|
|
6676
|
+
readonly ARG_SEPARATOR: "#4a4e4d";
|
|
6677
|
+
readonly MATCHING_PAREN: "#000000";
|
|
6678
|
+
};
|
|
6679
|
+
interface ComposerProps {
|
|
6680
|
+
focus: ComposerFocusType;
|
|
6681
|
+
inputStyle?: string;
|
|
6682
|
+
rect?: Rect;
|
|
6683
|
+
delimitation?: DOMDimension;
|
|
6684
|
+
onComposerContentFocused: () => void;
|
|
6685
|
+
onComposerCellFocused?: (content: String) => void;
|
|
6686
|
+
isDefaultFocus?: boolean;
|
|
6687
|
+
}
|
|
6688
|
+
interface ComposerState {
|
|
6689
|
+
positionStart: number;
|
|
6690
|
+
positionEnd: number;
|
|
6691
|
+
}
|
|
6692
|
+
interface AutoCompleteState {
|
|
6693
|
+
provider: AutoCompleteProvider | undefined;
|
|
6694
|
+
selectedIndex: number | undefined;
|
|
6695
|
+
}
|
|
6696
|
+
interface FunctionDescriptionState {
|
|
6697
|
+
showDescription: boolean;
|
|
6698
|
+
functionName: string;
|
|
6699
|
+
functionDescription: FunctionDescription;
|
|
6700
|
+
argToFocus: number;
|
|
6701
|
+
}
|
|
6702
|
+
declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
6703
|
+
static template: string;
|
|
6704
|
+
static props: {
|
|
6705
|
+
focus: {
|
|
6706
|
+
validate: (value: string) => boolean;
|
|
6707
|
+
};
|
|
6708
|
+
inputStyle: {
|
|
6709
|
+
type: StringConstructor;
|
|
6710
|
+
optional: boolean;
|
|
6711
|
+
};
|
|
6712
|
+
rect: {
|
|
6713
|
+
type: ObjectConstructor;
|
|
6714
|
+
optional: boolean;
|
|
6715
|
+
};
|
|
6716
|
+
delimitation: {
|
|
6717
|
+
type: ObjectConstructor;
|
|
6718
|
+
optional: boolean;
|
|
6719
|
+
};
|
|
6720
|
+
onComposerCellFocused: {
|
|
6721
|
+
type: FunctionConstructor;
|
|
6722
|
+
optional: boolean;
|
|
6723
|
+
};
|
|
6724
|
+
onComposerContentFocused: FunctionConstructor;
|
|
6725
|
+
isDefaultFocus: {
|
|
6726
|
+
type: BooleanConstructor;
|
|
6727
|
+
optional: boolean;
|
|
6728
|
+
};
|
|
6729
|
+
};
|
|
6730
|
+
static components: {
|
|
6731
|
+
TextValueProvider: typeof TextValueProvider;
|
|
6732
|
+
FunctionDescriptionProvider: typeof FunctionDescriptionProvider;
|
|
6733
|
+
};
|
|
6734
|
+
static defaultProps: {
|
|
6735
|
+
inputStyle: string;
|
|
6736
|
+
isDefaultFocus: boolean;
|
|
6737
|
+
};
|
|
6738
|
+
private composerStore;
|
|
6739
|
+
private DOMFocusableElementStore;
|
|
6740
|
+
composerRef: {
|
|
6741
|
+
el: HTMLElement | null;
|
|
6742
|
+
};
|
|
6743
|
+
contentHelper: ContentEditableHelper;
|
|
6744
|
+
composerState: ComposerState;
|
|
6745
|
+
autoCompleteState: AutoCompleteState;
|
|
6746
|
+
functionDescriptionState: FunctionDescriptionState;
|
|
6747
|
+
private compositionActive;
|
|
6748
|
+
get assistantStyle(): string;
|
|
6749
|
+
shouldProcessInputEvents: boolean;
|
|
6750
|
+
tokens: EnrichedToken[];
|
|
6751
|
+
keyMapping: {
|
|
6752
|
+
[key: string]: Function;
|
|
6753
|
+
};
|
|
6754
|
+
keyCodeMapping: {
|
|
6755
|
+
[keyCode: string]: Function;
|
|
6756
|
+
};
|
|
6757
|
+
setup(): void;
|
|
6758
|
+
private processArrowKeys;
|
|
6759
|
+
private handleArrowKeysForAutocomplete;
|
|
6760
|
+
private processTabKey;
|
|
6761
|
+
private processEnterKey;
|
|
6762
|
+
private processNewLineEvent;
|
|
6763
|
+
private processEscapeKey;
|
|
6764
|
+
private processF4Key;
|
|
6765
|
+
private processNumpadDecimal;
|
|
6766
|
+
onCompositionStart(): void;
|
|
6767
|
+
onCompositionEnd(): void;
|
|
6768
|
+
onKeydown(ev: KeyboardEvent): void;
|
|
6769
|
+
onPaste(ev: ClipboardEvent): void;
|
|
6770
|
+
onInput(ev: InputEvent): void;
|
|
6771
|
+
onKeyup(ev: KeyboardEvent): void;
|
|
6772
|
+
showAutoComplete(provider: AutoCompleteProvider): void;
|
|
6773
|
+
updateAutoCompleteIndex(index: number): void;
|
|
6774
|
+
/**
|
|
6775
|
+
* This is required to ensure the content helper selection is
|
|
6776
|
+
* properly updated on "onclick" events. Depending on the browser,
|
|
6777
|
+
* the callback onClick from the composer will be executed before
|
|
6778
|
+
* the selection was updated in the dom, which means we capture an
|
|
6779
|
+
* wrong selection which is then forced upon the content helper on
|
|
6780
|
+
* processContent.
|
|
6781
|
+
*/
|
|
6782
|
+
onMousedown(ev: MouseEvent): void;
|
|
6783
|
+
onClick(): void;
|
|
6784
|
+
onDblClick(): void;
|
|
6785
|
+
private processContent;
|
|
6786
|
+
/**
|
|
6787
|
+
* Get the HTML content corresponding to the current composer token, divided by lines.
|
|
6788
|
+
*/
|
|
6789
|
+
private getContentLines;
|
|
6790
|
+
private getColoredTokens;
|
|
6791
|
+
/**
|
|
6792
|
+
* Split an array of HTMLContents into lines. Each NEWLINE character encountered will create a new
|
|
6793
|
+
* line. Contents can be split into multiple parts if they contain multiple NEWLINE characters.
|
|
6794
|
+
*/
|
|
6795
|
+
private splitHtmlContentIntoLines;
|
|
6796
|
+
private isContentEmpty;
|
|
6797
|
+
private rangeColor;
|
|
6798
|
+
/**
|
|
6799
|
+
* Compute the state of the composer from the tokenAtCursor.
|
|
6800
|
+
* If the token is a function or symbol (that isn't a cell/range reference) we have to initialize
|
|
6801
|
+
* the autocomplete engine otherwise we initialize the formula assistant.
|
|
6802
|
+
*/
|
|
6803
|
+
private processTokenAtCursor;
|
|
6804
|
+
private autoComplete;
|
|
6805
|
+
}
|
|
6806
|
+
|
|
6807
|
+
interface AutoCompleteProposal {
|
|
6808
|
+
/**
|
|
6809
|
+
* Text to auto complete.
|
|
6810
|
+
*/
|
|
6811
|
+
text: string;
|
|
6812
|
+
description?: string;
|
|
6813
|
+
/**
|
|
6814
|
+
* Version of the text but displayed using html to highlight part of it.
|
|
6815
|
+
*/
|
|
6816
|
+
htmlContent?: HtmlContent[];
|
|
6817
|
+
/**
|
|
6818
|
+
* Key to use for fuzzy search.
|
|
6819
|
+
*/
|
|
6820
|
+
fuzzySearchKey?: string;
|
|
6821
|
+
}
|
|
6822
|
+
interface AutoCompleteProvider {
|
|
6823
|
+
proposals: AutoCompleteProposal[];
|
|
6824
|
+
selectProposal(text: string): void;
|
|
6825
|
+
autoSelectFirstProposal: boolean;
|
|
6826
|
+
}
|
|
6827
|
+
/**
|
|
6828
|
+
* We declare the providers in the registry as an object (rather than a class)
|
|
6829
|
+
* to allow a type-safe way to declare the provider.
|
|
6830
|
+
* We still want to be able to use `this` for the getters and dispatch for simplicity.
|
|
6831
|
+
* Binding happens at runtime in the edition plugin.
|
|
6832
|
+
*/
|
|
6833
|
+
interface AutoCompleteProviderDefinition {
|
|
6834
|
+
sequence?: number;
|
|
6835
|
+
autoSelectFirstProposal?: boolean;
|
|
6836
|
+
maxDisplayedProposals?: number;
|
|
6837
|
+
getProposals(this: {
|
|
6838
|
+
composer: ComposerStore;
|
|
6839
|
+
getters: Getters;
|
|
6840
|
+
}, tokenAtCursor: EnrichedToken, content: string): AutoCompleteProposal[] | undefined;
|
|
6841
|
+
selectProposal(this: {
|
|
6842
|
+
composer: ComposerStore;
|
|
6843
|
+
}, tokenAtCursor: EnrichedToken, text: string): void;
|
|
6844
|
+
}
|
|
6845
|
+
|
|
6846
|
+
declare function transformRangeData(range: RangeData, executed: CoreCommand): RangeData | undefined;
|
|
6847
|
+
|
|
6848
|
+
interface Props$y {
|
|
6849
|
+
figure: Figure;
|
|
6850
|
+
}
|
|
6851
|
+
declare class ChartJsComponent extends Component<Props$y, SpreadsheetChildEnv> {
|
|
6852
|
+
static template: string;
|
|
6853
|
+
static props: {
|
|
6854
|
+
figure: ObjectConstructor;
|
|
6855
|
+
};
|
|
6856
|
+
private canvas;
|
|
6222
6857
|
private chart?;
|
|
6223
6858
|
get background(): string;
|
|
6224
6859
|
get canvasStyle(): string;
|
|
@@ -6228,10 +6863,10 @@ declare class ChartJsComponent extends Component<Props$z, SpreadsheetChildEnv> {
|
|
|
6228
6863
|
private updateChartJs;
|
|
6229
6864
|
}
|
|
6230
6865
|
|
|
6231
|
-
interface Props$
|
|
6866
|
+
interface Props$x {
|
|
6232
6867
|
figure: Figure;
|
|
6233
6868
|
}
|
|
6234
|
-
declare class ScorecardChart extends Component<Props$
|
|
6869
|
+
declare class ScorecardChart extends Component<Props$x, SpreadsheetChildEnv> {
|
|
6235
6870
|
static template: string;
|
|
6236
6871
|
static props: {
|
|
6237
6872
|
figure: ObjectConstructor;
|
|
@@ -6243,7 +6878,7 @@ declare class ScorecardChart extends Component<Props$y, SpreadsheetChildEnv> {
|
|
|
6243
6878
|
}
|
|
6244
6879
|
|
|
6245
6880
|
type MenuItemOrSeparator = Action | "separator";
|
|
6246
|
-
interface Props$
|
|
6881
|
+
interface Props$w {
|
|
6247
6882
|
position: DOMCoordinates;
|
|
6248
6883
|
menuItems: Action[];
|
|
6249
6884
|
depth: number;
|
|
@@ -6251,6 +6886,7 @@ interface Props$x {
|
|
|
6251
6886
|
onClose: () => void;
|
|
6252
6887
|
onMenuClicked?: (ev: CustomEvent) => void;
|
|
6253
6888
|
menuId?: UID;
|
|
6889
|
+
onMouseOver?: () => void;
|
|
6254
6890
|
}
|
|
6255
6891
|
interface MenuState {
|
|
6256
6892
|
isOpen: boolean;
|
|
@@ -6258,8 +6894,9 @@ interface MenuState {
|
|
|
6258
6894
|
position: null | DOMCoordinates;
|
|
6259
6895
|
scrollOffset?: Pixel;
|
|
6260
6896
|
menuItems: Action[];
|
|
6897
|
+
isHoveringChild?: boolean;
|
|
6261
6898
|
}
|
|
6262
|
-
declare class Menu extends Component<Props$
|
|
6899
|
+
declare class Menu extends Component<Props$w, SpreadsheetChildEnv> {
|
|
6263
6900
|
static template: string;
|
|
6264
6901
|
static props: {
|
|
6265
6902
|
position: ObjectConstructor;
|
|
@@ -6281,6 +6918,10 @@ declare class Menu extends Component<Props$x, SpreadsheetChildEnv> {
|
|
|
6281
6918
|
type: StringConstructor;
|
|
6282
6919
|
optional: boolean;
|
|
6283
6920
|
};
|
|
6921
|
+
onMouseOver: {
|
|
6922
|
+
type: FunctionConstructor;
|
|
6923
|
+
optional: boolean;
|
|
6924
|
+
};
|
|
6284
6925
|
};
|
|
6285
6926
|
static components: {
|
|
6286
6927
|
Menu: typeof Menu;
|
|
@@ -6293,6 +6934,7 @@ declare class Menu extends Component<Props$x, SpreadsheetChildEnv> {
|
|
|
6293
6934
|
private menuRef;
|
|
6294
6935
|
private hoveredMenu;
|
|
6295
6936
|
private position;
|
|
6937
|
+
private openingTimeOut;
|
|
6296
6938
|
setup(): void;
|
|
6297
6939
|
get menuItemsAndSeparators(): MenuItemOrSeparator[];
|
|
6298
6940
|
get subMenuPosition(): DOMCoordinates;
|
|
@@ -6306,28 +6948,32 @@ declare class Menu extends Component<Props$x, SpreadsheetChildEnv> {
|
|
|
6306
6948
|
getName(menu: Action): string;
|
|
6307
6949
|
isRoot(menu: Action): boolean;
|
|
6308
6950
|
isEnabled(menu: Action): boolean;
|
|
6951
|
+
isActive(menuItem: Action): boolean;
|
|
6309
6952
|
onScroll(ev: any): void;
|
|
6310
6953
|
/**
|
|
6311
6954
|
* If the given menu is not disabled, open it's submenu at the
|
|
6312
6955
|
* correct position according to available surrounding space.
|
|
6313
6956
|
*/
|
|
6314
|
-
openSubMenu
|
|
6957
|
+
private openSubMenu;
|
|
6315
6958
|
isParentMenu(subMenu: MenuState, menuItem: Action): boolean;
|
|
6316
|
-
closeSubMenu
|
|
6959
|
+
private closeSubMenu;
|
|
6317
6960
|
onClickMenu(menu: Action, ev: MouseEvent): void;
|
|
6961
|
+
onMouseOver(menu: Action, ev: MouseEvent): void;
|
|
6962
|
+
onMouseOverMainMenu(): void;
|
|
6963
|
+
onMouseOverChildMenu(): void;
|
|
6318
6964
|
onMouseEnter(menu: Action, ev: MouseEvent): void;
|
|
6319
6965
|
onMouseLeave(menu: Action): void;
|
|
6320
6966
|
}
|
|
6321
6967
|
|
|
6322
6968
|
type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
|
|
6323
|
-
interface Props$
|
|
6969
|
+
interface Props$v {
|
|
6324
6970
|
figure: Figure;
|
|
6325
6971
|
style: string;
|
|
6326
6972
|
onFigureDeleted: () => void;
|
|
6327
6973
|
onMouseDown: (ev: MouseEvent) => void;
|
|
6328
6974
|
onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
|
|
6329
6975
|
}
|
|
6330
|
-
declare class FigureComponent extends Component<Props$
|
|
6976
|
+
declare class FigureComponent extends Component<Props$v, SpreadsheetChildEnv> {
|
|
6331
6977
|
static template: string;
|
|
6332
6978
|
static props: {
|
|
6333
6979
|
figure: ObjectConstructor;
|
|
@@ -6376,11 +7022,11 @@ declare class FigureComponent extends Component<Props$w, SpreadsheetChildEnv> {
|
|
|
6376
7022
|
private openContextMenu;
|
|
6377
7023
|
}
|
|
6378
7024
|
|
|
6379
|
-
interface Props$
|
|
7025
|
+
interface Props$u {
|
|
6380
7026
|
figure: Figure;
|
|
6381
7027
|
onFigureDeleted: () => void;
|
|
6382
7028
|
}
|
|
6383
|
-
declare class ChartFigure extends Component<Props$
|
|
7029
|
+
declare class ChartFigure extends Component<Props$u, SpreadsheetChildEnv> {
|
|
6384
7030
|
static template: string;
|
|
6385
7031
|
static props: {
|
|
6386
7032
|
figure: ObjectConstructor;
|
|
@@ -6392,7 +7038,7 @@ declare class ChartFigure extends Component<Props$v, SpreadsheetChildEnv> {
|
|
|
6392
7038
|
get chartComponent(): new (...args: any) => Component;
|
|
6393
7039
|
}
|
|
6394
7040
|
|
|
6395
|
-
interface Props$
|
|
7041
|
+
interface Props$t {
|
|
6396
7042
|
isVisible: boolean;
|
|
6397
7043
|
position: Position;
|
|
6398
7044
|
}
|
|
@@ -6400,298 +7046,52 @@ interface Position {
|
|
|
6400
7046
|
top: HeaderIndex;
|
|
6401
7047
|
left: HeaderIndex;
|
|
6402
7048
|
}
|
|
6403
|
-
interface State$
|
|
7049
|
+
interface State$6 {
|
|
6404
7050
|
position: Position;
|
|
6405
7051
|
handler: boolean;
|
|
6406
7052
|
}
|
|
6407
|
-
declare class Autofill extends Component<Props$
|
|
7053
|
+
declare class Autofill extends Component<Props$t, SpreadsheetChildEnv> {
|
|
6408
7054
|
static template: string;
|
|
6409
7055
|
static props: {
|
|
6410
7056
|
position: ObjectConstructor;
|
|
6411
7057
|
isVisible: BooleanConstructor;
|
|
6412
7058
|
};
|
|
6413
|
-
state: State$
|
|
7059
|
+
state: State$6;
|
|
6414
7060
|
get style(): string;
|
|
6415
7061
|
get handlerStyle(): string;
|
|
6416
|
-
get styleNextValue(): string;
|
|
6417
|
-
getTooltip(): Tooltip | undefined;
|
|
6418
|
-
onMouseDown(ev: MouseEvent): void;
|
|
6419
|
-
onDblClick(): void;
|
|
6420
|
-
}
|
|
6421
|
-
|
|
6422
|
-
interface ClientTagProps {
|
|
6423
|
-
active: boolean;
|
|
6424
|
-
name: string;
|
|
6425
|
-
color: Color;
|
|
6426
|
-
col: HeaderIndex;
|
|
6427
|
-
row: HeaderIndex;
|
|
6428
|
-
}
|
|
6429
|
-
declare class ClientTag extends Component<ClientTagProps, SpreadsheetChildEnv> {
|
|
6430
|
-
static template: string;
|
|
6431
|
-
static props: {
|
|
6432
|
-
active: BooleanConstructor;
|
|
6433
|
-
name: StringConstructor;
|
|
6434
|
-
color: StringConstructor;
|
|
6435
|
-
col: NumberConstructor;
|
|
6436
|
-
row: NumberConstructor;
|
|
6437
|
-
};
|
|
6438
|
-
get tagStyle(): string;
|
|
6439
|
-
}
|
|
6440
|
-
|
|
6441
|
-
interface Props$t {
|
|
6442
|
-
values: AutocompleteValue[];
|
|
6443
|
-
selectedIndex: number | undefined;
|
|
6444
|
-
getHtmlContent: (value: string) => string;
|
|
6445
|
-
onValueSelected: (value: string) => void;
|
|
6446
|
-
onValueHovered: (index: string) => void;
|
|
6447
|
-
}
|
|
6448
|
-
declare class TextValueProvider extends Component<Props$t> {
|
|
6449
|
-
static template: string;
|
|
6450
|
-
static props: {
|
|
6451
|
-
values: ArrayConstructor;
|
|
6452
|
-
selectedIndex: {
|
|
6453
|
-
type: NumberConstructor;
|
|
6454
|
-
optional: boolean;
|
|
6455
|
-
};
|
|
6456
|
-
getHtmlContent: FunctionConstructor;
|
|
6457
|
-
onValueSelected: FunctionConstructor;
|
|
6458
|
-
onValueHovered: FunctionConstructor;
|
|
6459
|
-
};
|
|
6460
|
-
private autoCompleteListRef;
|
|
6461
|
-
setup(): void;
|
|
6462
|
-
}
|
|
6463
|
-
|
|
6464
|
-
declare class ContentEditableHelper {
|
|
6465
|
-
el: HTMLElement;
|
|
6466
|
-
constructor(el: HTMLElement);
|
|
6467
|
-
updateEl(el: HTMLElement): void;
|
|
6468
|
-
/**
|
|
6469
|
-
* select the text at position start to end, no matter the children
|
|
6470
|
-
*/
|
|
6471
|
-
selectRange(start: number, end: number): void;
|
|
6472
|
-
/**
|
|
6473
|
-
* finds the dom element that contains the character at `offset`
|
|
6474
|
-
*/
|
|
6475
|
-
private findChildAtCharacterIndex;
|
|
6476
|
-
/**
|
|
6477
|
-
* Sets (or Replaces all) the text inside the root element in the form of distinctive paragraphs and
|
|
6478
|
-
* span for each element provided in `contents`.
|
|
6479
|
-
*
|
|
6480
|
-
* The function will apply the diff between the current content and the new content to avoid the systematic
|
|
6481
|
-
* destruction of DOM elements which interferes with IME[1]
|
|
6482
|
-
*
|
|
6483
|
-
* Each line of text will be encapsulated in a paragraph element.
|
|
6484
|
-
* Each span will have its own fontcolor and specific class if provided in the HtmlContent object.
|
|
6485
|
-
*
|
|
6486
|
-
* [1] https://developer.mozilla.org/en-US/docs/Glossary/Input_method_editor
|
|
6487
|
-
*/
|
|
6488
|
-
setText(contents: HtmlContent[][]): void;
|
|
6489
|
-
scrollSelectionIntoView(): void;
|
|
6490
|
-
/**
|
|
6491
|
-
* remove the current selection of the user
|
|
6492
|
-
* */
|
|
6493
|
-
removeSelection(): void;
|
|
6494
|
-
private removeAll;
|
|
6495
|
-
/**
|
|
6496
|
-
* finds the indexes of the current selection.
|
|
6497
|
-
* */
|
|
6498
|
-
getCurrentSelection(): {
|
|
6499
|
-
start: number;
|
|
6500
|
-
end: number;
|
|
6501
|
-
};
|
|
6502
|
-
/**
|
|
6503
|
-
* Computes the text 'index' inside this.el based on the currently selected node and its offset.
|
|
6504
|
-
* The selected node is either a Text node or an Element node.
|
|
6505
|
-
*
|
|
6506
|
-
* case 1 -Text node:
|
|
6507
|
-
* the offset is the number of characters from the start of the node. We have to add this offset to the
|
|
6508
|
-
* content length of all previous nodes.
|
|
6509
|
-
*
|
|
6510
|
-
* case 2 - Element node:
|
|
6511
|
-
* the offset is the number of child nodes before the selected node. We have to add the content length of
|
|
6512
|
-
* all the bnodes prior to the selected node as well as the content of the child node before the offset.
|
|
6513
|
-
*
|
|
6514
|
-
* See the MDN documentation for more details.
|
|
6515
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Range/startOffset
|
|
6516
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Range/endOffset
|
|
6517
|
-
*
|
|
6518
|
-
*/
|
|
6519
|
-
private findSelectionIndex;
|
|
6520
|
-
private getStartAndEndSelection;
|
|
6521
|
-
getText(): string;
|
|
6522
|
-
}
|
|
6523
|
-
|
|
6524
|
-
interface Props$s {
|
|
6525
|
-
functionName: string;
|
|
6526
|
-
functionDescription: FunctionDescription;
|
|
6527
|
-
argToFocus: number;
|
|
6528
|
-
}
|
|
6529
|
-
interface AssistantState {
|
|
6530
|
-
allowCellSelectionBehind: boolean;
|
|
6531
|
-
}
|
|
6532
|
-
declare class FunctionDescriptionProvider extends Component<Props$s> {
|
|
6533
|
-
static template: string;
|
|
6534
|
-
static props: {
|
|
6535
|
-
functionName: StringConstructor;
|
|
6536
|
-
functionDescription: ObjectConstructor;
|
|
6537
|
-
argToFocus: NumberConstructor;
|
|
6538
|
-
};
|
|
6539
|
-
assistantState: AssistantState;
|
|
6540
|
-
private timeOutId;
|
|
6541
|
-
setup(): void;
|
|
6542
|
-
getContext(): Props$s;
|
|
6543
|
-
onMouseMove(): void;
|
|
6544
|
-
}
|
|
6545
|
-
|
|
6546
|
-
type HtmlContent = {
|
|
6547
|
-
value: string;
|
|
6548
|
-
color?: Color;
|
|
6549
|
-
class?: string;
|
|
6550
|
-
};
|
|
6551
|
-
interface AutocompleteValue {
|
|
6552
|
-
text: string;
|
|
6553
|
-
description: string;
|
|
6554
|
-
}
|
|
6555
|
-
interface ComposerProps {
|
|
6556
|
-
focus: ComposerFocusType;
|
|
6557
|
-
inputStyle?: string;
|
|
6558
|
-
rect?: Rect;
|
|
6559
|
-
delimitation?: DOMDimension;
|
|
6560
|
-
onComposerContentFocused: () => void;
|
|
6561
|
-
onComposerCellFocused?: (content: String) => void;
|
|
6562
|
-
isDefaultFocus?: boolean;
|
|
6563
|
-
}
|
|
6564
|
-
interface ComposerState {
|
|
6565
|
-
positionStart: number;
|
|
6566
|
-
positionEnd: number;
|
|
6567
|
-
}
|
|
6568
|
-
interface AutoCompleteState {
|
|
6569
|
-
showProvider: boolean;
|
|
6570
|
-
selectedIndex: number | undefined;
|
|
6571
|
-
values: AutocompleteValue[];
|
|
6572
|
-
type: "function" | "dataValidation";
|
|
6573
|
-
getHtmlContent: (text: string) => HtmlContent[];
|
|
7062
|
+
get styleNextValue(): string;
|
|
7063
|
+
getTooltip(): Tooltip | undefined;
|
|
7064
|
+
onMouseDown(ev: MouseEvent): void;
|
|
7065
|
+
onDblClick(): void;
|
|
6574
7066
|
}
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
7067
|
+
|
|
7068
|
+
interface ClientTagProps {
|
|
7069
|
+
active: boolean;
|
|
7070
|
+
name: string;
|
|
7071
|
+
color: Color;
|
|
7072
|
+
col: HeaderIndex;
|
|
7073
|
+
row: HeaderIndex;
|
|
6580
7074
|
}
|
|
6581
|
-
declare class
|
|
7075
|
+
declare class ClientTag extends Component<ClientTagProps, SpreadsheetChildEnv> {
|
|
6582
7076
|
static template: string;
|
|
6583
7077
|
static props: {
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
optional: boolean;
|
|
6590
|
-
};
|
|
6591
|
-
rect: {
|
|
6592
|
-
type: ObjectConstructor;
|
|
6593
|
-
optional: boolean;
|
|
6594
|
-
};
|
|
6595
|
-
delimitation: {
|
|
6596
|
-
type: ObjectConstructor;
|
|
6597
|
-
optional: boolean;
|
|
6598
|
-
};
|
|
6599
|
-
onComposerCellFocused: {
|
|
6600
|
-
type: FunctionConstructor;
|
|
6601
|
-
optional: boolean;
|
|
6602
|
-
};
|
|
6603
|
-
onComposerContentFocused: FunctionConstructor;
|
|
6604
|
-
isDefaultFocus: {
|
|
6605
|
-
type: BooleanConstructor;
|
|
6606
|
-
optional: boolean;
|
|
6607
|
-
};
|
|
6608
|
-
};
|
|
6609
|
-
static components: {
|
|
6610
|
-
TextValueProvider: typeof TextValueProvider;
|
|
6611
|
-
FunctionDescriptionProvider: typeof FunctionDescriptionProvider;
|
|
6612
|
-
};
|
|
6613
|
-
static defaultProps: {
|
|
6614
|
-
inputStyle: string;
|
|
6615
|
-
isDefaultFocus: boolean;
|
|
6616
|
-
};
|
|
6617
|
-
private composerStore;
|
|
6618
|
-
private DOMFocusableElementStore;
|
|
6619
|
-
composerRef: {
|
|
6620
|
-
el: HTMLElement | null;
|
|
6621
|
-
};
|
|
6622
|
-
contentHelper: ContentEditableHelper;
|
|
6623
|
-
composerState: ComposerState;
|
|
6624
|
-
autoCompleteState: AutoCompleteState;
|
|
6625
|
-
functionDescriptionState: FunctionDescriptionState;
|
|
6626
|
-
private compositionActive;
|
|
6627
|
-
get assistantStyle(): string;
|
|
6628
|
-
shouldProcessInputEvents: boolean;
|
|
6629
|
-
tokens: EnrichedToken[];
|
|
6630
|
-
keyMapping: {
|
|
6631
|
-
[key: string]: Function;
|
|
6632
|
-
};
|
|
6633
|
-
keyCodeMapping: {
|
|
6634
|
-
[keyCode: string]: Function;
|
|
7078
|
+
active: BooleanConstructor;
|
|
7079
|
+
name: StringConstructor;
|
|
7080
|
+
color: StringConstructor;
|
|
7081
|
+
col: NumberConstructor;
|
|
7082
|
+
row: NumberConstructor;
|
|
6635
7083
|
};
|
|
6636
|
-
|
|
6637
|
-
private processArrowKeys;
|
|
6638
|
-
private handleArrowKeysForAutocomplete;
|
|
6639
|
-
private processTabKey;
|
|
6640
|
-
private processEnterKey;
|
|
6641
|
-
private processNewLineEvent;
|
|
6642
|
-
private processEscapeKey;
|
|
6643
|
-
private processF4Key;
|
|
6644
|
-
private processNumpadDecimal;
|
|
6645
|
-
onCompositionStart(): void;
|
|
6646
|
-
onCompositionEnd(): void;
|
|
6647
|
-
onKeydown(ev: KeyboardEvent): void;
|
|
6648
|
-
onPaste(ev: ClipboardEvent): void;
|
|
6649
|
-
onInput(ev: InputEvent): void;
|
|
6650
|
-
onKeyup(ev: KeyboardEvent): void;
|
|
6651
|
-
showFunctionAutocomplete(searchTerm: string): void;
|
|
6652
|
-
updateAutoCompleteIndex(index: number): void;
|
|
6653
|
-
/**
|
|
6654
|
-
* This is required to ensure the content helper selection is
|
|
6655
|
-
* properly updated on "onclick" events. Depending on the browser,
|
|
6656
|
-
* the callback onClick from the composer will be executed before
|
|
6657
|
-
* the selection was updated in the dom, which means we capture an
|
|
6658
|
-
* wrong selection which is then forced upon the content helper on
|
|
6659
|
-
* processContent.
|
|
6660
|
-
*/
|
|
6661
|
-
onMousedown(ev: MouseEvent): void;
|
|
6662
|
-
onClick(): void;
|
|
6663
|
-
onDblClick(): void;
|
|
6664
|
-
private processContent;
|
|
6665
|
-
/**
|
|
6666
|
-
* Get the HTML content corresponding to the current composer token, divided by lines.
|
|
6667
|
-
*/
|
|
6668
|
-
private getContentLines;
|
|
6669
|
-
private getColoredTokens;
|
|
6670
|
-
/**
|
|
6671
|
-
* Split an array of HTMLContents into lines. Each NEWLINE character encountered will create a new
|
|
6672
|
-
* line. Contents can be split into multiple parts if they contain multiple NEWLINE characters.
|
|
6673
|
-
*/
|
|
6674
|
-
private splitHtmlContentIntoLines;
|
|
6675
|
-
private isContentEmpty;
|
|
6676
|
-
private rangeColor;
|
|
6677
|
-
/**
|
|
6678
|
-
* Compute the state of the composer from the tokenAtCursor.
|
|
6679
|
-
* If the token is a function or symbol (that isn't a cell/range reference) we have to initialize
|
|
6680
|
-
* the autocomplete engine otherwise we initialize the formula assistant.
|
|
6681
|
-
*/
|
|
6682
|
-
private processTokenAtCursor;
|
|
6683
|
-
private autoComplete;
|
|
6684
|
-
private showDataValidationAutocomplete;
|
|
7084
|
+
get tagStyle(): string;
|
|
6685
7085
|
}
|
|
6686
7086
|
|
|
6687
|
-
interface Props$
|
|
7087
|
+
interface Props$s {
|
|
6688
7088
|
gridDims: DOMDimension;
|
|
6689
7089
|
}
|
|
6690
7090
|
/**
|
|
6691
7091
|
* This component is a composer which positions itself on the grid at the anchor cell.
|
|
6692
7092
|
* It also applies the style of the cell to the composer input.
|
|
6693
7093
|
*/
|
|
6694
|
-
declare class GridComposer extends Component<Props$
|
|
7094
|
+
declare class GridComposer extends Component<Props$s, SpreadsheetChildEnv> {
|
|
6695
7095
|
static template: string;
|
|
6696
7096
|
static props: {
|
|
6697
7097
|
gridDims: ObjectConstructor;
|
|
@@ -6760,8 +7160,8 @@ declare class CellPopoverStore extends SpreadsheetStore {
|
|
|
6760
7160
|
readonly handle: (cmd: Command) => void;
|
|
6761
7161
|
readonly hover: (position: Position$1) => void;
|
|
6762
7162
|
readonly clear: () => void;
|
|
6763
|
-
readonly renderingLayers: readonly ("Chart" | "Background" | "Highlights" | "Clipboard" | "
|
|
6764
|
-
readonly drawLayer: (ctx: GridRenderingContext, layer: "Chart" | "Background" | "Highlights" | "Clipboard" | "
|
|
7163
|
+
readonly renderingLayers: readonly ("Chart" | "Background" | "Highlights" | "Clipboard" | "Autofill" | "Selection" | "Headers")[];
|
|
7164
|
+
readonly drawLayer: (ctx: GridRenderingContext, layer: "Chart" | "Background" | "Highlights" | "Clipboard" | "Autofill" | "Selection" | "Headers") => void;
|
|
6765
7165
|
readonly dispose: () => void;
|
|
6766
7166
|
};
|
|
6767
7167
|
handle(cmd: Command): void;
|
|
@@ -6773,10 +7173,10 @@ declare class CellPopoverStore extends SpreadsheetStore {
|
|
|
6773
7173
|
private computePopoverAnchorRect;
|
|
6774
7174
|
}
|
|
6775
7175
|
|
|
6776
|
-
interface Props$
|
|
7176
|
+
interface Props$r {
|
|
6777
7177
|
cellPosition: CellPosition;
|
|
6778
7178
|
}
|
|
6779
|
-
declare class FilterIcon extends Component<Props$
|
|
7179
|
+
declare class FilterIcon extends Component<Props$r, SpreadsheetChildEnv> {
|
|
6780
7180
|
static template: string;
|
|
6781
7181
|
static props: {
|
|
6782
7182
|
cellPosition: ObjectConstructor;
|
|
@@ -6785,12 +7185,13 @@ declare class FilterIcon extends Component<Props$q, SpreadsheetChildEnv> {
|
|
|
6785
7185
|
setup(): void;
|
|
6786
7186
|
onClick(): void;
|
|
6787
7187
|
get isFilterActive(): boolean;
|
|
7188
|
+
get iconClass(): string;
|
|
6788
7189
|
}
|
|
6789
7190
|
|
|
6790
|
-
interface Props$
|
|
7191
|
+
interface Props$q {
|
|
6791
7192
|
gridPosition: DOMCoordinates;
|
|
6792
7193
|
}
|
|
6793
|
-
declare class FilterIconsOverlay extends Component<Props$
|
|
7194
|
+
declare class FilterIconsOverlay extends Component<Props$q, SpreadsheetChildEnv> {
|
|
6794
7195
|
static template: string;
|
|
6795
7196
|
static props: {
|
|
6796
7197
|
gridPosition: {
|
|
@@ -6811,10 +7212,10 @@ declare class FilterIconsOverlay extends Component<Props$p, SpreadsheetChildEnv>
|
|
|
6811
7212
|
getFilterHeadersPositions(): CellPosition[];
|
|
6812
7213
|
}
|
|
6813
7214
|
|
|
6814
|
-
interface Props$
|
|
7215
|
+
interface Props$p {
|
|
6815
7216
|
cellPosition: CellPosition;
|
|
6816
7217
|
}
|
|
6817
|
-
declare class DataValidationCheckbox extends Component<Props$
|
|
7218
|
+
declare class DataValidationCheckbox extends Component<Props$p, SpreadsheetChildEnv> {
|
|
6818
7219
|
static template: string;
|
|
6819
7220
|
static props: {
|
|
6820
7221
|
cellPosition: ObjectConstructor;
|
|
@@ -6824,10 +7225,10 @@ declare class DataValidationCheckbox extends Component<Props$o, SpreadsheetChild
|
|
|
6824
7225
|
get isDisabled(): boolean;
|
|
6825
7226
|
}
|
|
6826
7227
|
|
|
6827
|
-
interface Props$
|
|
7228
|
+
interface Props$o {
|
|
6828
7229
|
cellPosition: CellPosition;
|
|
6829
7230
|
}
|
|
6830
|
-
declare class DataValidationListIcon extends Component<Props$
|
|
7231
|
+
declare class DataValidationListIcon extends Component<Props$o, SpreadsheetChildEnv> {
|
|
6831
7232
|
static template: string;
|
|
6832
7233
|
static props: {
|
|
6833
7234
|
cellPosition: ObjectConstructor;
|
|
@@ -6857,7 +7258,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
|
6857
7258
|
}
|
|
6858
7259
|
|
|
6859
7260
|
type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
|
|
6860
|
-
interface Props$
|
|
7261
|
+
interface Props$n {
|
|
6861
7262
|
onFigureDeleted: () => void;
|
|
6862
7263
|
}
|
|
6863
7264
|
interface Container {
|
|
@@ -6936,7 +7337,7 @@ interface DndState {
|
|
|
6936
7337
|
* that occurred during the drag & drop, and to position the figure on the correct pane.
|
|
6937
7338
|
*
|
|
6938
7339
|
*/
|
|
6939
|
-
declare class FiguresContainer extends Component<Props$
|
|
7340
|
+
declare class FiguresContainer extends Component<Props$n, SpreadsheetChildEnv> {
|
|
6940
7341
|
static template: string;
|
|
6941
7342
|
static props: {
|
|
6942
7343
|
onFigureDeleted: FunctionConstructor;
|
|
@@ -6971,10 +7372,10 @@ declare class FiguresContainer extends Component<Props$m, SpreadsheetChildEnv> {
|
|
|
6971
7372
|
private getSnapLineStyle;
|
|
6972
7373
|
}
|
|
6973
7374
|
|
|
6974
|
-
interface Props$
|
|
7375
|
+
interface Props$m {
|
|
6975
7376
|
focusGrid: () => void;
|
|
6976
7377
|
}
|
|
6977
|
-
declare class GridAddRowsFooter extends Component<Props$
|
|
7378
|
+
declare class GridAddRowsFooter extends Component<Props$m, SpreadsheetChildEnv> {
|
|
6978
7379
|
static template: string;
|
|
6979
7380
|
static props: {
|
|
6980
7381
|
focusGrid: FunctionConstructor;
|
|
@@ -6998,7 +7399,7 @@ declare class GridAddRowsFooter extends Component<Props$l, SpreadsheetChildEnv>
|
|
|
6998
7399
|
private onExternalClick;
|
|
6999
7400
|
}
|
|
7000
7401
|
|
|
7001
|
-
interface Props$
|
|
7402
|
+
interface Props$l {
|
|
7002
7403
|
onCellHovered: (position: Partial<Position$1>) => void;
|
|
7003
7404
|
onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
|
|
7004
7405
|
onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
|
|
@@ -7011,7 +7412,7 @@ interface Props$k {
|
|
|
7011
7412
|
gridOverlayDimensions: string;
|
|
7012
7413
|
onFigureDeleted: () => void;
|
|
7013
7414
|
}
|
|
7014
|
-
declare class GridOverlay extends Component<Props$
|
|
7415
|
+
declare class GridOverlay extends Component<Props$l, SpreadsheetChildEnv> {
|
|
7015
7416
|
static template: string;
|
|
7016
7417
|
static props: {
|
|
7017
7418
|
onCellHovered: {
|
|
@@ -7066,12 +7467,12 @@ declare class GridOverlay extends Component<Props$k, SpreadsheetChildEnv> {
|
|
|
7066
7467
|
private getCartesianCoordinates;
|
|
7067
7468
|
}
|
|
7068
7469
|
|
|
7069
|
-
interface Props$
|
|
7470
|
+
interface Props$k {
|
|
7070
7471
|
gridRect: Rect;
|
|
7071
7472
|
onClosePopover: () => void;
|
|
7072
7473
|
onMouseWheel: (ev: WheelEvent) => void;
|
|
7073
7474
|
}
|
|
7074
|
-
declare class GridPopover extends Component<Props$
|
|
7475
|
+
declare class GridPopover extends Component<Props$k, SpreadsheetChildEnv> {
|
|
7075
7476
|
static template: string;
|
|
7076
7477
|
static props: {
|
|
7077
7478
|
onClosePopover: FunctionConstructor;
|
|
@@ -7214,13 +7615,13 @@ declare class HeadersOverlay extends Component<any, SpreadsheetChildEnv> {
|
|
|
7214
7615
|
}
|
|
7215
7616
|
|
|
7216
7617
|
type Orientation$1 = "n" | "s" | "w" | "e";
|
|
7217
|
-
interface Props$
|
|
7618
|
+
interface Props$j {
|
|
7218
7619
|
zone: Zone;
|
|
7219
7620
|
orientation: Orientation$1;
|
|
7220
7621
|
isMoving: boolean;
|
|
7221
7622
|
onMoveHighlight: (x: Pixel, y: Pixel) => void;
|
|
7222
7623
|
}
|
|
7223
|
-
declare class Border extends Component<Props$
|
|
7624
|
+
declare class Border extends Component<Props$j, SpreadsheetChildEnv> {
|
|
7224
7625
|
static template: string;
|
|
7225
7626
|
static props: {
|
|
7226
7627
|
zone: ObjectConstructor;
|
|
@@ -7233,14 +7634,14 @@ declare class Border extends Component<Props$i, SpreadsheetChildEnv> {
|
|
|
7233
7634
|
}
|
|
7234
7635
|
|
|
7235
7636
|
type Orientation = "nw" | "ne" | "sw" | "se";
|
|
7236
|
-
interface Props$
|
|
7637
|
+
interface Props$i {
|
|
7237
7638
|
zone: Zone;
|
|
7238
7639
|
color: Color;
|
|
7239
7640
|
orientation: Orientation;
|
|
7240
7641
|
isResizing: boolean;
|
|
7241
7642
|
onResizeHighlight: (isLeft: boolean, isRight: boolean) => void;
|
|
7242
7643
|
}
|
|
7243
|
-
declare class Corner extends Component<Props$
|
|
7644
|
+
declare class Corner extends Component<Props$i, SpreadsheetChildEnv> {
|
|
7244
7645
|
static template: string;
|
|
7245
7646
|
static props: {
|
|
7246
7647
|
zone: ObjectConstructor;
|
|
@@ -7255,14 +7656,14 @@ declare class Corner extends Component<Props$h, SpreadsheetChildEnv> {
|
|
|
7255
7656
|
onMouseDown(ev: MouseEvent): void;
|
|
7256
7657
|
}
|
|
7257
7658
|
|
|
7258
|
-
interface Props$
|
|
7659
|
+
interface Props$h {
|
|
7259
7660
|
zone: Zone;
|
|
7260
7661
|
color: Color;
|
|
7261
7662
|
}
|
|
7262
7663
|
interface HighlightState {
|
|
7263
7664
|
shiftingMode: "isMoving" | "isResizing" | "none";
|
|
7264
7665
|
}
|
|
7265
|
-
declare class Highlight extends Component<Props$
|
|
7666
|
+
declare class Highlight extends Component<Props$h, SpreadsheetChildEnv> {
|
|
7266
7667
|
static template: string;
|
|
7267
7668
|
static props: {
|
|
7268
7669
|
zone: ObjectConstructor;
|
|
@@ -7279,7 +7680,7 @@ declare class Highlight extends Component<Props$g, SpreadsheetChildEnv> {
|
|
|
7279
7680
|
|
|
7280
7681
|
type ScrollDirection = "horizontal" | "vertical";
|
|
7281
7682
|
|
|
7282
|
-
interface Props$
|
|
7683
|
+
interface Props$g {
|
|
7283
7684
|
width: Pixel;
|
|
7284
7685
|
height: Pixel;
|
|
7285
7686
|
direction: ScrollDirection;
|
|
@@ -7287,7 +7688,7 @@ interface Props$f {
|
|
|
7287
7688
|
offset: Pixel;
|
|
7288
7689
|
onScroll: (offset: Pixel) => void;
|
|
7289
7690
|
}
|
|
7290
|
-
declare class ScrollBar extends Component<Props$
|
|
7691
|
+
declare class ScrollBar extends Component<Props$g> {
|
|
7291
7692
|
static props: {
|
|
7292
7693
|
width: {
|
|
7293
7694
|
type: NumberConstructor;
|
|
@@ -7315,10 +7716,10 @@ declare class ScrollBar extends Component<Props$f> {
|
|
|
7315
7716
|
onScroll(ev: any): void;
|
|
7316
7717
|
}
|
|
7317
7718
|
|
|
7318
|
-
interface Props$
|
|
7719
|
+
interface Props$f {
|
|
7319
7720
|
leftOffset: number;
|
|
7320
7721
|
}
|
|
7321
|
-
declare class HorizontalScrollBar extends Component<Props$
|
|
7722
|
+
declare class HorizontalScrollBar extends Component<Props$f, SpreadsheetChildEnv> {
|
|
7322
7723
|
static props: {
|
|
7323
7724
|
leftOffset: {
|
|
7324
7725
|
type: NumberConstructor;
|
|
@@ -7344,10 +7745,10 @@ declare class HorizontalScrollBar extends Component<Props$e, SpreadsheetChildEnv
|
|
|
7344
7745
|
onScroll(offset: any): void;
|
|
7345
7746
|
}
|
|
7346
7747
|
|
|
7347
|
-
interface Props$
|
|
7748
|
+
interface Props$e {
|
|
7348
7749
|
topOffset: number;
|
|
7349
7750
|
}
|
|
7350
|
-
declare class VerticalScrollBar extends Component<Props$
|
|
7751
|
+
declare class VerticalScrollBar extends Component<Props$e, SpreadsheetChildEnv> {
|
|
7351
7752
|
static props: {
|
|
7352
7753
|
topOffset: {
|
|
7353
7754
|
type: NumberConstructor;
|
|
@@ -7373,19 +7774,6 @@ declare class VerticalScrollBar extends Component<Props$d, SpreadsheetChildEnv>
|
|
|
7373
7774
|
onScroll(offset: any): void;
|
|
7374
7775
|
}
|
|
7375
7776
|
|
|
7376
|
-
interface SidePanelProps {
|
|
7377
|
-
onCloseSidePanel?: () => void;
|
|
7378
|
-
[key: string]: unknown;
|
|
7379
|
-
}
|
|
7380
|
-
declare class SidePanelStore extends SpreadsheetStore {
|
|
7381
|
-
isOpen: boolean;
|
|
7382
|
-
panelProps: SidePanelProps;
|
|
7383
|
-
componentTag: string;
|
|
7384
|
-
open(componentTag: string, panelProps?: SidePanelProps): void;
|
|
7385
|
-
toggle(componentTag: string, panelProps: SidePanelProps): void;
|
|
7386
|
-
close(): void;
|
|
7387
|
-
}
|
|
7388
|
-
|
|
7389
7777
|
declare class HoveredCellStore extends SpreadsheetStore {
|
|
7390
7778
|
col: number | undefined;
|
|
7391
7779
|
row: number | undefined;
|
|
@@ -7405,10 +7793,10 @@ declare class HoveredCellStore extends SpreadsheetStore {
|
|
|
7405
7793
|
* - a vertical resizer (same, for rows)
|
|
7406
7794
|
*/
|
|
7407
7795
|
type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER" | "GROUP_HEADERS" | "UNGROUP_HEADERS";
|
|
7408
|
-
interface Props$
|
|
7796
|
+
interface Props$d {
|
|
7409
7797
|
exposeFocus: (focus: () => void) => void;
|
|
7410
7798
|
}
|
|
7411
|
-
declare class Grid extends Component<Props$
|
|
7799
|
+
declare class Grid extends Component<Props$d, SpreadsheetChildEnv> {
|
|
7412
7800
|
static template: string;
|
|
7413
7801
|
static props: {
|
|
7414
7802
|
exposeFocus: FunctionConstructor;
|
|
@@ -7500,30 +7888,37 @@ interface DndPartialArgs {
|
|
|
7500
7888
|
onCancel?: () => void;
|
|
7501
7889
|
onDragEnd?: (itemId: UID, indexAtEnd: Pixel) => void;
|
|
7502
7890
|
}
|
|
7503
|
-
interface State$
|
|
7891
|
+
interface State$5 {
|
|
7504
7892
|
itemsStyle: Record<UID, string>;
|
|
7505
7893
|
draggedItemId: UID | undefined;
|
|
7506
7894
|
start: (direction: Direction, args: DndPartialArgs) => void;
|
|
7507
7895
|
cancel: () => void;
|
|
7508
7896
|
}
|
|
7509
|
-
declare function useDragAndDropListItems(): State$
|
|
7897
|
+
declare function useDragAndDropListItems(): State$5;
|
|
7510
7898
|
|
|
7511
7899
|
declare function useHighlightsOnHover(ref: Ref<HTMLElement>, highlightProvider: HighlightProvider): void;
|
|
7512
7900
|
declare function useHighlights(highlightProvider: HighlightProvider): void;
|
|
7513
7901
|
|
|
7514
|
-
|
|
7902
|
+
declare class MainChartPanelStore extends SpreadsheetStore {
|
|
7903
|
+
panel: "configuration" | "design";
|
|
7904
|
+
activatePanel(panel: "configuration" | "design"): void;
|
|
7905
|
+
}
|
|
7906
|
+
|
|
7907
|
+
interface Props$c {
|
|
7515
7908
|
onCloseSidePanel: () => void;
|
|
7909
|
+
figureId: UID;
|
|
7516
7910
|
}
|
|
7517
|
-
declare class ChartPanel extends Component<Props$
|
|
7911
|
+
declare class ChartPanel extends Component<Props$c, SpreadsheetChildEnv> {
|
|
7518
7912
|
static template: string;
|
|
7519
7913
|
static components: {
|
|
7520
7914
|
Section: typeof Section;
|
|
7521
7915
|
};
|
|
7522
7916
|
static props: {
|
|
7523
7917
|
onCloseSidePanel: FunctionConstructor;
|
|
7918
|
+
figureId: StringConstructor;
|
|
7524
7919
|
};
|
|
7525
|
-
|
|
7526
|
-
get figureId(): UID
|
|
7920
|
+
store: Store<MainChartPanelStore>;
|
|
7921
|
+
get figureId(): UID;
|
|
7527
7922
|
setup(): void;
|
|
7528
7923
|
updateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
|
|
7529
7924
|
canUpdateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
|
|
@@ -7533,7 +7928,7 @@ declare class ChartPanel extends Component<Props$b, SpreadsheetChildEnv> {
|
|
|
7533
7928
|
get chartTypes(): Record<string, string>;
|
|
7534
7929
|
}
|
|
7535
7930
|
|
|
7536
|
-
declare class FindAndReplaceStore extends SpreadsheetStore {
|
|
7931
|
+
declare class FindAndReplaceStore extends SpreadsheetStore implements HighlightProvider {
|
|
7537
7932
|
private allSheetsMatches;
|
|
7538
7933
|
private activeSheetMatches;
|
|
7539
7934
|
private specificRangeMatches;
|
|
@@ -7546,7 +7941,6 @@ declare class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
7546
7941
|
searchOptions: SearchOptions;
|
|
7547
7942
|
updateSearchContent: DebouncedFunction<(toSearch: string) => void>;
|
|
7548
7943
|
constructor(get: Get);
|
|
7549
|
-
get renderingLayers(): readonly ["Search"];
|
|
7550
7944
|
get searchMatches(): CellPosition[];
|
|
7551
7945
|
private _updateSearchContent;
|
|
7552
7946
|
updateSearchOptions(searchOptions: Partial<SearchOptions>): void;
|
|
@@ -7592,7 +7986,7 @@ declare class FindAndReplaceStore extends SpreadsheetStore {
|
|
|
7592
7986
|
*/
|
|
7593
7987
|
replaceAll(): void;
|
|
7594
7988
|
private getSearchableString;
|
|
7595
|
-
|
|
7989
|
+
get highlights(): Highlight$1[];
|
|
7596
7990
|
}
|
|
7597
7991
|
|
|
7598
7992
|
declare function isEvaluationError(error: Maybe<CellValue>): error is string;
|
|
@@ -7781,13 +8175,13 @@ declare class Ripple extends Component<RippleProps, SpreadsheetChildEnv> {
|
|
|
7781
8175
|
getRippleEffectProps(id: number): RippleEffectProps;
|
|
7782
8176
|
}
|
|
7783
8177
|
|
|
7784
|
-
interface Props$
|
|
8178
|
+
interface Props$b {
|
|
7785
8179
|
sheetId: string;
|
|
7786
8180
|
openContextMenu: (registry: MenuItemRegistry, ev: MouseEvent) => void;
|
|
7787
8181
|
style?: string;
|
|
7788
8182
|
onMouseDown: (ev: MouseEvent) => void;
|
|
7789
8183
|
}
|
|
7790
|
-
declare class BottomBarSheet extends Component<Props$
|
|
8184
|
+
declare class BottomBarSheet extends Component<Props$b, SpreadsheetChildEnv> {
|
|
7791
8185
|
static template: string;
|
|
7792
8186
|
static props: {
|
|
7793
8187
|
sheetId: StringConstructor;
|
|
@@ -7833,11 +8227,11 @@ declare class BottomBarSheet extends Component<Props$a, SpreadsheetChildEnv> {
|
|
|
7833
8227
|
get sheetName(): string;
|
|
7834
8228
|
}
|
|
7835
8229
|
|
|
7836
|
-
interface Props$
|
|
8230
|
+
interface Props$a {
|
|
7837
8231
|
openContextMenu: (x: number, y: number, registry: MenuItemRegistry) => void;
|
|
7838
8232
|
closeContextMenu: () => void;
|
|
7839
8233
|
}
|
|
7840
|
-
declare class BottomBarStatistic extends Component<Props$
|
|
8234
|
+
declare class BottomBarStatistic extends Component<Props$a, SpreadsheetChildEnv> {
|
|
7841
8235
|
static template: string;
|
|
7842
8236
|
static props: {
|
|
7843
8237
|
openContextMenu: FunctionConstructor;
|
|
@@ -7858,13 +8252,13 @@ interface BottomBarSheetItem {
|
|
|
7858
8252
|
id: UID;
|
|
7859
8253
|
name: string;
|
|
7860
8254
|
}
|
|
7861
|
-
interface Props$
|
|
8255
|
+
interface Props$9 {
|
|
7862
8256
|
onClick: () => void;
|
|
7863
8257
|
}
|
|
7864
8258
|
interface BottomBarMenuState extends MenuState {
|
|
7865
8259
|
menuId: UID | undefined;
|
|
7866
8260
|
}
|
|
7867
|
-
declare class BottomBar extends Component<Props$
|
|
8261
|
+
declare class BottomBar extends Component<Props$9, SpreadsheetChildEnv> {
|
|
7868
8262
|
static template: string;
|
|
7869
8263
|
static props: {
|
|
7870
8264
|
onClick: FunctionConstructor;
|
|
@@ -7906,7 +8300,7 @@ declare class BottomBar extends Component<Props$8, SpreadsheetChildEnv> {
|
|
|
7906
8300
|
get sheetListMaxScroll(): number;
|
|
7907
8301
|
}
|
|
7908
8302
|
|
|
7909
|
-
interface Props$
|
|
8303
|
+
interface Props$8 {
|
|
7910
8304
|
}
|
|
7911
8305
|
interface ClickableCell {
|
|
7912
8306
|
coordinates: Rect;
|
|
@@ -7914,7 +8308,7 @@ interface ClickableCell {
|
|
|
7914
8308
|
action: (position: CellPosition, env: SpreadsheetChildEnv) => void;
|
|
7915
8309
|
tKey: string;
|
|
7916
8310
|
}
|
|
7917
|
-
declare class SpreadsheetDashboard extends Component<Props$
|
|
8311
|
+
declare class SpreadsheetDashboard extends Component<Props$8, SpreadsheetChildEnv> {
|
|
7918
8312
|
static template: string;
|
|
7919
8313
|
static props: {};
|
|
7920
8314
|
static components: {
|
|
@@ -7952,7 +8346,7 @@ declare class SpreadsheetDashboard extends Component<Props$7, SpreadsheetChildEn
|
|
|
7952
8346
|
private getGridRect;
|
|
7953
8347
|
}
|
|
7954
8348
|
|
|
7955
|
-
interface Props$
|
|
8349
|
+
interface Props$7 {
|
|
7956
8350
|
group: HeaderGroup;
|
|
7957
8351
|
layerOffset: number;
|
|
7958
8352
|
openContextMenu(position: DOMCoordinates, menuItems: Action[]): void;
|
|
@@ -7962,7 +8356,7 @@ interface GroupBox {
|
|
|
7962
8356
|
headerRect: Rect;
|
|
7963
8357
|
isEndHidden: boolean;
|
|
7964
8358
|
}
|
|
7965
|
-
declare abstract class AbstractHeaderGroup extends Component<Props$
|
|
8359
|
+
declare abstract class AbstractHeaderGroup extends Component<Props$7, SpreadsheetChildEnv> {
|
|
7966
8360
|
static template: string;
|
|
7967
8361
|
static props: {
|
|
7968
8362
|
group: ObjectConstructor;
|
|
@@ -7994,11 +8388,11 @@ declare class ColGroup extends AbstractHeaderGroup {
|
|
|
7994
8388
|
get groupBox(): GroupBox;
|
|
7995
8389
|
}
|
|
7996
8390
|
|
|
7997
|
-
interface Props$
|
|
8391
|
+
interface Props$6 {
|
|
7998
8392
|
dimension: Dimension;
|
|
7999
8393
|
layers: HeaderGroup[][];
|
|
8000
8394
|
}
|
|
8001
|
-
declare class HeaderGroupContainer extends Component<Props$
|
|
8395
|
+
declare class HeaderGroupContainer extends Component<Props$6, SpreadsheetChildEnv> {
|
|
8002
8396
|
static template: string;
|
|
8003
8397
|
static props: {
|
|
8004
8398
|
dimension: StringConstructor;
|
|
@@ -8021,7 +8415,7 @@ declare class HeaderGroupContainer extends Component<Props$5, SpreadsheetChildEn
|
|
|
8021
8415
|
get frozenPaneContainerSize(): Pixel;
|
|
8022
8416
|
}
|
|
8023
8417
|
|
|
8024
|
-
declare class SidePanel extends Component<
|
|
8418
|
+
declare class SidePanel extends Component<{}, SpreadsheetChildEnv> {
|
|
8025
8419
|
static template: string;
|
|
8026
8420
|
static props: {};
|
|
8027
8421
|
sidePanelStore: Store<SidePanelStore>;
|
|
@@ -8031,6 +8425,39 @@ declare class SidePanel extends Component<never, SpreadsheetChildEnv> {
|
|
|
8031
8425
|
getTitle(): string;
|
|
8032
8426
|
}
|
|
8033
8427
|
|
|
8428
|
+
declare const sortRange: ActionSpec;
|
|
8429
|
+
declare const sortAscending: ActionSpec;
|
|
8430
|
+
declare const dataCleanup: ActionSpec;
|
|
8431
|
+
declare const removeDuplicates: ActionSpec;
|
|
8432
|
+
declare const trimWhitespace: ActionSpec;
|
|
8433
|
+
declare const sortDescending: ActionSpec;
|
|
8434
|
+
declare const createRemoveFilter: ActionSpec;
|
|
8435
|
+
declare const createRemoveFilterTool: ActionSpec;
|
|
8436
|
+
declare const splitToColumns: ActionSpec;
|
|
8437
|
+
|
|
8438
|
+
declare const ACTION_DATA_createRemoveFilter: typeof createRemoveFilter;
|
|
8439
|
+
declare const ACTION_DATA_createRemoveFilterTool: typeof createRemoveFilterTool;
|
|
8440
|
+
declare const ACTION_DATA_dataCleanup: typeof dataCleanup;
|
|
8441
|
+
declare const ACTION_DATA_removeDuplicates: typeof removeDuplicates;
|
|
8442
|
+
declare const ACTION_DATA_sortAscending: typeof sortAscending;
|
|
8443
|
+
declare const ACTION_DATA_sortDescending: typeof sortDescending;
|
|
8444
|
+
declare const ACTION_DATA_sortRange: typeof sortRange;
|
|
8445
|
+
declare const ACTION_DATA_splitToColumns: typeof splitToColumns;
|
|
8446
|
+
declare const ACTION_DATA_trimWhitespace: typeof trimWhitespace;
|
|
8447
|
+
declare namespace ACTION_DATA {
|
|
8448
|
+
export {
|
|
8449
|
+
ACTION_DATA_createRemoveFilter as createRemoveFilter,
|
|
8450
|
+
ACTION_DATA_createRemoveFilterTool as createRemoveFilterTool,
|
|
8451
|
+
ACTION_DATA_dataCleanup as dataCleanup,
|
|
8452
|
+
ACTION_DATA_removeDuplicates as removeDuplicates,
|
|
8453
|
+
ACTION_DATA_sortAscending as sortAscending,
|
|
8454
|
+
ACTION_DATA_sortDescending as sortDescending,
|
|
8455
|
+
ACTION_DATA_sortRange as sortRange,
|
|
8456
|
+
ACTION_DATA_splitToColumns as splitToColumns,
|
|
8457
|
+
ACTION_DATA_trimWhitespace as trimWhitespace,
|
|
8458
|
+
};
|
|
8459
|
+
}
|
|
8460
|
+
|
|
8034
8461
|
declare const undo: ActionSpec;
|
|
8035
8462
|
declare const redo: ActionSpec;
|
|
8036
8463
|
declare const copy: ActionSpec;
|
|
@@ -8051,6 +8478,8 @@ declare const deleteCells: ActionSpec;
|
|
|
8051
8478
|
declare const deleteCellShiftUp: ActionSpec;
|
|
8052
8479
|
declare const deleteCellShiftLeft: ActionSpec;
|
|
8053
8480
|
declare const mergeCells: ActionSpec;
|
|
8481
|
+
declare const editTable: ActionSpec;
|
|
8482
|
+
declare const deleteTable: ActionSpec;
|
|
8054
8483
|
|
|
8055
8484
|
declare const ACTION_EDIT_clearCols: typeof clearCols;
|
|
8056
8485
|
declare const ACTION_EDIT_clearRows: typeof clearRows;
|
|
@@ -8063,7 +8492,9 @@ declare const ACTION_EDIT_deleteCol: typeof deleteCol;
|
|
|
8063
8492
|
declare const ACTION_EDIT_deleteCols: typeof deleteCols;
|
|
8064
8493
|
declare const ACTION_EDIT_deleteRow: typeof deleteRow;
|
|
8065
8494
|
declare const ACTION_EDIT_deleteRows: typeof deleteRows;
|
|
8495
|
+
declare const ACTION_EDIT_deleteTable: typeof deleteTable;
|
|
8066
8496
|
declare const ACTION_EDIT_deleteValues: typeof deleteValues;
|
|
8497
|
+
declare const ACTION_EDIT_editTable: typeof editTable;
|
|
8067
8498
|
declare const ACTION_EDIT_findAndReplace: typeof findAndReplace;
|
|
8068
8499
|
declare const ACTION_EDIT_mergeCells: typeof mergeCells;
|
|
8069
8500
|
declare const ACTION_EDIT_paste: typeof paste;
|
|
@@ -8085,7 +8516,9 @@ declare namespace ACTION_EDIT {
|
|
|
8085
8516
|
ACTION_EDIT_deleteCols as deleteCols,
|
|
8086
8517
|
ACTION_EDIT_deleteRow as deleteRow,
|
|
8087
8518
|
ACTION_EDIT_deleteRows as deleteRows,
|
|
8519
|
+
ACTION_EDIT_deleteTable as deleteTable,
|
|
8088
8520
|
ACTION_EDIT_deleteValues as deleteValues,
|
|
8521
|
+
ACTION_EDIT_editTable as editTable,
|
|
8089
8522
|
ACTION_EDIT_findAndReplace as findAndReplace,
|
|
8090
8523
|
ACTION_EDIT_mergeCells as mergeCells,
|
|
8091
8524
|
ACTION_EDIT_paste as paste,
|
|
@@ -8238,92 +8671,14 @@ declare namespace ACTION_FORMAT {
|
|
|
8238
8671
|
};
|
|
8239
8672
|
}
|
|
8240
8673
|
|
|
8241
|
-
|
|
8242
|
-
declare const unhideCols: ActionSpec;
|
|
8243
|
-
declare const unhideAllCols: ActionSpec;
|
|
8244
|
-
declare const hideRows: ActionSpec;
|
|
8245
|
-
declare const unhideRows: ActionSpec;
|
|
8246
|
-
declare const unhideAllRows: ActionSpec;
|
|
8247
|
-
declare const unFreezePane: ActionSpec;
|
|
8248
|
-
declare const freezePane: ActionSpec;
|
|
8249
|
-
declare const unFreezeRows: ActionSpec;
|
|
8250
|
-
declare const freezeFirstRow: ActionSpec;
|
|
8251
|
-
declare const freezeSecondRow: ActionSpec;
|
|
8252
|
-
declare const freezeCurrentRow: ActionSpec;
|
|
8253
|
-
declare const unFreezeCols: ActionSpec;
|
|
8254
|
-
declare const freezeFirstCol: ActionSpec;
|
|
8255
|
-
declare const freezeSecondCol: ActionSpec;
|
|
8256
|
-
declare const freezeCurrentCol: ActionSpec;
|
|
8257
|
-
declare const viewGridlines: ActionSpec;
|
|
8258
|
-
declare const viewFormulas: ActionSpec;
|
|
8259
|
-
declare const createRemoveFilter: ActionSpec;
|
|
8260
|
-
declare const groupColumns: ActionSpec;
|
|
8261
|
-
declare const groupRows: ActionSpec;
|
|
8262
|
-
declare const ungroupColumns: ActionSpec;
|
|
8263
|
-
declare const ungroupRows: ActionSpec;
|
|
8264
|
-
declare function canUngroupHeaders(env: SpreadsheetChildEnv, dimension: Dimension): boolean;
|
|
8265
|
-
|
|
8266
|
-
declare const ACTION_VIEW_canUngroupHeaders: typeof canUngroupHeaders;
|
|
8267
|
-
declare const ACTION_VIEW_createRemoveFilter: typeof createRemoveFilter;
|
|
8268
|
-
declare const ACTION_VIEW_freezeCurrentCol: typeof freezeCurrentCol;
|
|
8269
|
-
declare const ACTION_VIEW_freezeCurrentRow: typeof freezeCurrentRow;
|
|
8270
|
-
declare const ACTION_VIEW_freezeFirstCol: typeof freezeFirstCol;
|
|
8271
|
-
declare const ACTION_VIEW_freezeFirstRow: typeof freezeFirstRow;
|
|
8272
|
-
declare const ACTION_VIEW_freezePane: typeof freezePane;
|
|
8273
|
-
declare const ACTION_VIEW_freezeSecondCol: typeof freezeSecondCol;
|
|
8274
|
-
declare const ACTION_VIEW_freezeSecondRow: typeof freezeSecondRow;
|
|
8275
|
-
declare const ACTION_VIEW_groupColumns: typeof groupColumns;
|
|
8276
|
-
declare const ACTION_VIEW_groupRows: typeof groupRows;
|
|
8277
|
-
declare const ACTION_VIEW_hideCols: typeof hideCols;
|
|
8278
|
-
declare const ACTION_VIEW_hideRows: typeof hideRows;
|
|
8279
|
-
declare const ACTION_VIEW_unFreezeCols: typeof unFreezeCols;
|
|
8280
|
-
declare const ACTION_VIEW_unFreezePane: typeof unFreezePane;
|
|
8281
|
-
declare const ACTION_VIEW_unFreezeRows: typeof unFreezeRows;
|
|
8282
|
-
declare const ACTION_VIEW_ungroupColumns: typeof ungroupColumns;
|
|
8283
|
-
declare const ACTION_VIEW_ungroupRows: typeof ungroupRows;
|
|
8284
|
-
declare const ACTION_VIEW_unhideAllCols: typeof unhideAllCols;
|
|
8285
|
-
declare const ACTION_VIEW_unhideAllRows: typeof unhideAllRows;
|
|
8286
|
-
declare const ACTION_VIEW_unhideCols: typeof unhideCols;
|
|
8287
|
-
declare const ACTION_VIEW_unhideRows: typeof unhideRows;
|
|
8288
|
-
declare const ACTION_VIEW_viewFormulas: typeof viewFormulas;
|
|
8289
|
-
declare const ACTION_VIEW_viewGridlines: typeof viewGridlines;
|
|
8290
|
-
declare namespace ACTION_VIEW {
|
|
8291
|
-
export {
|
|
8292
|
-
ACTION_VIEW_canUngroupHeaders as canUngroupHeaders,
|
|
8293
|
-
ACTION_VIEW_createRemoveFilter as createRemoveFilter,
|
|
8294
|
-
ACTION_VIEW_freezeCurrentCol as freezeCurrentCol,
|
|
8295
|
-
ACTION_VIEW_freezeCurrentRow as freezeCurrentRow,
|
|
8296
|
-
ACTION_VIEW_freezeFirstCol as freezeFirstCol,
|
|
8297
|
-
ACTION_VIEW_freezeFirstRow as freezeFirstRow,
|
|
8298
|
-
ACTION_VIEW_freezePane as freezePane,
|
|
8299
|
-
ACTION_VIEW_freezeSecondCol as freezeSecondCol,
|
|
8300
|
-
ACTION_VIEW_freezeSecondRow as freezeSecondRow,
|
|
8301
|
-
ACTION_VIEW_groupColumns as groupColumns,
|
|
8302
|
-
ACTION_VIEW_groupRows as groupRows,
|
|
8303
|
-
ACTION_VIEW_hideCols as hideCols,
|
|
8304
|
-
ACTION_VIEW_hideRows as hideRows,
|
|
8305
|
-
ACTION_VIEW_unFreezeCols as unFreezeCols,
|
|
8306
|
-
ACTION_VIEW_unFreezePane as unFreezePane,
|
|
8307
|
-
ACTION_VIEW_unFreezeRows as unFreezeRows,
|
|
8308
|
-
ACTION_VIEW_ungroupColumns as ungroupColumns,
|
|
8309
|
-
ACTION_VIEW_ungroupRows as ungroupRows,
|
|
8310
|
-
ACTION_VIEW_unhideAllCols as unhideAllCols,
|
|
8311
|
-
ACTION_VIEW_unhideAllRows as unhideAllRows,
|
|
8312
|
-
ACTION_VIEW_unhideCols as unhideCols,
|
|
8313
|
-
ACTION_VIEW_unhideRows as unhideRows,
|
|
8314
|
-
ACTION_VIEW_viewFormulas as viewFormulas,
|
|
8315
|
-
ACTION_VIEW_viewGridlines as viewGridlines,
|
|
8316
|
-
};
|
|
8317
|
-
}
|
|
8318
|
-
|
|
8319
|
-
interface Props$4 {
|
|
8674
|
+
interface Props$5 {
|
|
8320
8675
|
action: ActionSpec;
|
|
8321
8676
|
hasTriangleDownIcon?: boolean;
|
|
8322
8677
|
selectedColor?: string;
|
|
8323
8678
|
class?: string;
|
|
8324
8679
|
onClick?: (ev: MouseEvent) => void;
|
|
8325
8680
|
}
|
|
8326
|
-
declare class ActionButton extends Component<Props$
|
|
8681
|
+
declare class ActionButton extends Component<Props$5, SpreadsheetChildEnv> {
|
|
8327
8682
|
static template: string;
|
|
8328
8683
|
static props: {
|
|
8329
8684
|
action: ObjectConstructor;
|
|
@@ -8356,7 +8711,7 @@ declare class ActionButton extends Component<Props$4, SpreadsheetChildEnv> {
|
|
|
8356
8711
|
}
|
|
8357
8712
|
|
|
8358
8713
|
type Tool = "borderColorTool" | "borderTypeTool";
|
|
8359
|
-
interface State$
|
|
8714
|
+
interface State$4 {
|
|
8360
8715
|
activeTool: Tool | undefined;
|
|
8361
8716
|
}
|
|
8362
8717
|
interface BorderEditorProps {
|
|
@@ -8407,7 +8762,7 @@ declare class BorderEditor extends Component<BorderEditorProps, SpreadsheetChild
|
|
|
8407
8762
|
el: HTMLElement | null;
|
|
8408
8763
|
};
|
|
8409
8764
|
borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
|
|
8410
|
-
state: State$
|
|
8765
|
+
state: State$4;
|
|
8411
8766
|
toggleDropdownTool(tool: Tool): void;
|
|
8412
8767
|
closeDropdown(): void;
|
|
8413
8768
|
setBorderPosition(position: BorderPosition): void;
|
|
@@ -8418,19 +8773,19 @@ declare class BorderEditor extends Component<BorderEditorProps, SpreadsheetChild
|
|
|
8418
8773
|
get lineStylePickerAnchorRect(): Rect;
|
|
8419
8774
|
}
|
|
8420
8775
|
|
|
8421
|
-
interface Props$
|
|
8776
|
+
interface Props$4 {
|
|
8422
8777
|
toggleBorderEditor: () => void;
|
|
8423
8778
|
showBorderEditor: boolean;
|
|
8424
8779
|
disabled?: boolean;
|
|
8425
8780
|
dropdownMaxHeight?: Pixel;
|
|
8426
8781
|
class?: string;
|
|
8427
8782
|
}
|
|
8428
|
-
interface State$
|
|
8783
|
+
interface State$3 {
|
|
8429
8784
|
currentColor: Color;
|
|
8430
8785
|
currentStyle: BorderStyle;
|
|
8431
8786
|
currentPosition: BorderPosition | undefined;
|
|
8432
8787
|
}
|
|
8433
|
-
declare class BorderEditorWidget extends Component<Props$
|
|
8788
|
+
declare class BorderEditorWidget extends Component<Props$4, SpreadsheetChildEnv> {
|
|
8434
8789
|
static template: string;
|
|
8435
8790
|
static props: {
|
|
8436
8791
|
toggleBorderEditor: FunctionConstructor;
|
|
@@ -8454,7 +8809,7 @@ declare class BorderEditorWidget extends Component<Props$3, SpreadsheetChildEnv>
|
|
|
8454
8809
|
borderEditorButtonRef: {
|
|
8455
8810
|
el: HTMLElement | null;
|
|
8456
8811
|
};
|
|
8457
|
-
state: State$
|
|
8812
|
+
state: State$3;
|
|
8458
8813
|
get borderEditorAnchorRect(): Rect;
|
|
8459
8814
|
onBorderPositionPicked(position: BorderPosition): void;
|
|
8460
8815
|
onBorderColorPicked(color: Color): void;
|
|
@@ -8476,15 +8831,15 @@ declare class TopBarComposer extends Component<any, SpreadsheetChildEnv> {
|
|
|
8476
8831
|
onFocus(selection: ComposerSelection): void;
|
|
8477
8832
|
}
|
|
8478
8833
|
|
|
8479
|
-
interface State$
|
|
8834
|
+
interface State$2 {
|
|
8480
8835
|
isOpen: boolean;
|
|
8481
8836
|
}
|
|
8482
|
-
interface Props$
|
|
8837
|
+
interface Props$3 {
|
|
8483
8838
|
onToggle: () => void;
|
|
8484
8839
|
dropdownStyle: string;
|
|
8485
8840
|
class: string;
|
|
8486
8841
|
}
|
|
8487
|
-
declare class FontSizeEditor extends Component<Props$
|
|
8842
|
+
declare class FontSizeEditor extends Component<Props$3, SpreadsheetChildEnv> {
|
|
8488
8843
|
static template: string;
|
|
8489
8844
|
static props: {
|
|
8490
8845
|
onToggle: FunctionConstructor;
|
|
@@ -8493,7 +8848,7 @@ declare class FontSizeEditor extends Component<Props$2, SpreadsheetChildEnv> {
|
|
|
8493
8848
|
};
|
|
8494
8849
|
static components: {};
|
|
8495
8850
|
fontSizes: number[];
|
|
8496
|
-
dropdown: State$
|
|
8851
|
+
dropdown: State$2;
|
|
8497
8852
|
private inputRef;
|
|
8498
8853
|
private rootEditorRef;
|
|
8499
8854
|
setup(): void;
|
|
@@ -8508,6 +8863,81 @@ declare class FontSizeEditor extends Component<Props$2, SpreadsheetChildEnv> {
|
|
|
8508
8863
|
onInputKeydown(ev: KeyboardEvent): void;
|
|
8509
8864
|
}
|
|
8510
8865
|
|
|
8866
|
+
interface Props$2 {
|
|
8867
|
+
tableConfig: TableConfig;
|
|
8868
|
+
}
|
|
8869
|
+
declare class TableStylePreview extends Component<Props$2, SpreadsheetChildEnv> {
|
|
8870
|
+
static template: string;
|
|
8871
|
+
static props: {
|
|
8872
|
+
tableConfig: ObjectConstructor;
|
|
8873
|
+
};
|
|
8874
|
+
private canvasRef;
|
|
8875
|
+
setup(): void;
|
|
8876
|
+
private drawTable;
|
|
8877
|
+
}
|
|
8878
|
+
|
|
8879
|
+
interface TableStylesPopoverProps {
|
|
8880
|
+
selectedStyleId?: string;
|
|
8881
|
+
tableConfig: Omit<TableConfig, "styleId">;
|
|
8882
|
+
closePopover: () => void;
|
|
8883
|
+
onStylePicked: (styleId: string) => void;
|
|
8884
|
+
popoverProps?: PopoverProps;
|
|
8885
|
+
}
|
|
8886
|
+
type CustomTablePopoverMouseEvent = MouseEvent & {
|
|
8887
|
+
hasClosedTableStylesPopover?: boolean;
|
|
8888
|
+
};
|
|
8889
|
+
declare class TableStylesPopover extends Component<TableStylesPopoverProps, SpreadsheetChildEnv> {
|
|
8890
|
+
static template: string;
|
|
8891
|
+
static components: {
|
|
8892
|
+
Popover: typeof Popover;
|
|
8893
|
+
TableStylePreview: typeof TableStylePreview;
|
|
8894
|
+
};
|
|
8895
|
+
static props: {
|
|
8896
|
+
tableConfig: ObjectConstructor;
|
|
8897
|
+
popoverProps: {
|
|
8898
|
+
type: ObjectConstructor;
|
|
8899
|
+
optional: boolean;
|
|
8900
|
+
};
|
|
8901
|
+
closePopover: FunctionConstructor;
|
|
8902
|
+
onStylePicked: FunctionConstructor;
|
|
8903
|
+
selectedStyleId: {
|
|
8904
|
+
type: StringConstructor;
|
|
8905
|
+
optional: boolean;
|
|
8906
|
+
};
|
|
8907
|
+
};
|
|
8908
|
+
stylePresets: Record<string, TableStyle>;
|
|
8909
|
+
categories: {
|
|
8910
|
+
none: string;
|
|
8911
|
+
light: string;
|
|
8912
|
+
medium: string;
|
|
8913
|
+
dark: string;
|
|
8914
|
+
};
|
|
8915
|
+
private tableStyleListRef;
|
|
8916
|
+
setup(): void;
|
|
8917
|
+
onExternalClick(ev: CustomTablePopoverMouseEvent): void;
|
|
8918
|
+
getPresetsByCategory(category: string): string[];
|
|
8919
|
+
getTableConfig(styleId: string): TableConfig;
|
|
8920
|
+
getStyleName(styleId: string): string;
|
|
8921
|
+
}
|
|
8922
|
+
|
|
8923
|
+
interface State$1 {
|
|
8924
|
+
popoverProps: PopoverProps | undefined;
|
|
8925
|
+
}
|
|
8926
|
+
declare class TableDropdownButton extends Component<{}, SpreadsheetChildEnv> {
|
|
8927
|
+
static template: string;
|
|
8928
|
+
static components: {
|
|
8929
|
+
TableStylesPopover: typeof TableStylesPopover;
|
|
8930
|
+
ActionButton: typeof ActionButton;
|
|
8931
|
+
};
|
|
8932
|
+
static props: {};
|
|
8933
|
+
state: State$1;
|
|
8934
|
+
onStylePicked(styleId: string): void;
|
|
8935
|
+
onClick(ev: CustomTablePopoverMouseEvent): void;
|
|
8936
|
+
private closePopover;
|
|
8937
|
+
get action(): ActionSpec;
|
|
8938
|
+
get tableConfig(): TableConfig;
|
|
8939
|
+
}
|
|
8940
|
+
|
|
8511
8941
|
interface Props$1 {
|
|
8512
8942
|
class?: string;
|
|
8513
8943
|
}
|
|
@@ -8550,6 +8980,7 @@ declare class TopBar extends Component<Props, SpreadsheetChildEnv> {
|
|
|
8550
8980
|
ActionButton: typeof ActionButton;
|
|
8551
8981
|
PaintFormatButton: typeof PaintFormatButton;
|
|
8552
8982
|
BorderEditorWidget: typeof BorderEditorWidget;
|
|
8983
|
+
TableDropdownButton: typeof TableDropdownButton;
|
|
8553
8984
|
};
|
|
8554
8985
|
state: State;
|
|
8555
8986
|
isSelectingMenu: boolean;
|
|
@@ -8557,7 +8988,7 @@ declare class TopBar extends Component<Props, SpreadsheetChildEnv> {
|
|
|
8557
8988
|
menus: Action[];
|
|
8558
8989
|
EDIT: typeof ACTION_EDIT;
|
|
8559
8990
|
FORMAT: typeof ACTION_FORMAT;
|
|
8560
|
-
|
|
8991
|
+
DATA: typeof ACTION_DATA;
|
|
8561
8992
|
formatNumberMenuItemSpec: ActionSpec;
|
|
8562
8993
|
isntToolbarMenu: boolean;
|
|
8563
8994
|
composerStore: Store<ComposerStore>;
|
|
@@ -8659,6 +9090,7 @@ declare const SPREADSHEET_DIMENSIONS: {
|
|
|
8659
9090
|
SCROLLBAR_WIDTH: number;
|
|
8660
9091
|
};
|
|
8661
9092
|
declare const registries: {
|
|
9093
|
+
autoCompleteProviders: Registry<AutoCompleteProviderDefinition>;
|
|
8662
9094
|
autofillModifiersRegistry: Registry<AutofillModifierImplementation>;
|
|
8663
9095
|
autofillRulesRegistry: Registry<AutofillRule>;
|
|
8664
9096
|
cellMenuRegistry: MenuItemRegistry;
|
|
@@ -8703,7 +9135,7 @@ declare const registries: {
|
|
|
8703
9135
|
clipboardHandlersRegistries: {
|
|
8704
9136
|
figureHandlers: Registry<{
|
|
8705
9137
|
new (getters: Getters, dispatch: {
|
|
8706
|
-
<T extends "
|
|
9138
|
+
<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, {
|
|
8707
9139
|
type: T;
|
|
8708
9140
|
}> | Extract<UpdateCellPositionCommand, {
|
|
8709
9141
|
type: T;
|
|
@@ -8779,9 +9211,11 @@ declare const registries: {
|
|
|
8779
9211
|
type: T;
|
|
8780
9212
|
}> | Extract<CreateImageOverCommand, {
|
|
8781
9213
|
type: T;
|
|
8782
|
-
}> | Extract<
|
|
9214
|
+
}> | Extract<CreateTableCommand, {
|
|
9215
|
+
type: T;
|
|
9216
|
+
}> | Extract<RemoveTableCommand, {
|
|
8783
9217
|
type: T;
|
|
8784
|
-
}> | Extract<
|
|
9218
|
+
}> | Extract<UpdateTableCommand, {
|
|
8785
9219
|
type: T;
|
|
8786
9220
|
}> | Extract<GroupHeadersCommand, {
|
|
8787
9221
|
type: T;
|
|
@@ -8855,6 +9289,8 @@ declare const registries: {
|
|
|
8855
9289
|
type: T;
|
|
8856
9290
|
}> | Extract<AutofillSelectCommand, {
|
|
8857
9291
|
type: T;
|
|
9292
|
+
}> | Extract<AutofillTableCommand, {
|
|
9293
|
+
type: T;
|
|
8858
9294
|
}> | Extract<ShowFormulaCommand, {
|
|
8859
9295
|
type: T;
|
|
8860
9296
|
}> | Extract<AutofillAutoCommand, {
|
|
@@ -8898,7 +9334,7 @@ declare const registries: {
|
|
|
8898
9334
|
}> | Extract<RenderCanvasCommand, {
|
|
8899
9335
|
type: T;
|
|
8900
9336
|
}>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
|
|
8901
|
-
<T_1 extends "
|
|
9337
|
+
<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, {
|
|
8902
9338
|
type: T_1;
|
|
8903
9339
|
}> | Extract<UpdateCellPositionCommand, {
|
|
8904
9340
|
type: T_1;
|
|
@@ -8974,9 +9410,11 @@ declare const registries: {
|
|
|
8974
9410
|
type: T_1;
|
|
8975
9411
|
}> | Extract<CreateImageOverCommand, {
|
|
8976
9412
|
type: T_1;
|
|
8977
|
-
}> | Extract<
|
|
9413
|
+
}> | Extract<CreateTableCommand, {
|
|
9414
|
+
type: T_1;
|
|
9415
|
+
}> | Extract<RemoveTableCommand, {
|
|
8978
9416
|
type: T_1;
|
|
8979
|
-
}> | Extract<
|
|
9417
|
+
}> | Extract<UpdateTableCommand, {
|
|
8980
9418
|
type: T_1;
|
|
8981
9419
|
}> | Extract<GroupHeadersCommand, {
|
|
8982
9420
|
type: T_1;
|
|
@@ -9050,6 +9488,8 @@ declare const registries: {
|
|
|
9050
9488
|
type: T_1;
|
|
9051
9489
|
}> | Extract<AutofillSelectCommand, {
|
|
9052
9490
|
type: T_1;
|
|
9491
|
+
}> | Extract<AutofillTableCommand, {
|
|
9492
|
+
type: T_1;
|
|
9053
9493
|
}> | Extract<ShowFormulaCommand, {
|
|
9054
9494
|
type: T_1;
|
|
9055
9495
|
}> | Extract<AutofillAutoCommand, {
|
|
@@ -9097,7 +9537,7 @@ declare const registries: {
|
|
|
9097
9537
|
}>;
|
|
9098
9538
|
cellHandlers: Registry<{
|
|
9099
9539
|
new (getters: Getters, dispatch: {
|
|
9100
|
-
<T extends "
|
|
9540
|
+
<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, {
|
|
9101
9541
|
type: T;
|
|
9102
9542
|
}> | Extract<UpdateCellPositionCommand, {
|
|
9103
9543
|
type: T;
|
|
@@ -9173,9 +9613,11 @@ declare const registries: {
|
|
|
9173
9613
|
type: T;
|
|
9174
9614
|
}> | Extract<CreateImageOverCommand, {
|
|
9175
9615
|
type: T;
|
|
9176
|
-
}> | Extract<
|
|
9616
|
+
}> | Extract<CreateTableCommand, {
|
|
9617
|
+
type: T;
|
|
9618
|
+
}> | Extract<RemoveTableCommand, {
|
|
9177
9619
|
type: T;
|
|
9178
|
-
}> | Extract<
|
|
9620
|
+
}> | Extract<UpdateTableCommand, {
|
|
9179
9621
|
type: T;
|
|
9180
9622
|
}> | Extract<GroupHeadersCommand, {
|
|
9181
9623
|
type: T;
|
|
@@ -9249,6 +9691,8 @@ declare const registries: {
|
|
|
9249
9691
|
type: T;
|
|
9250
9692
|
}> | Extract<AutofillSelectCommand, {
|
|
9251
9693
|
type: T;
|
|
9694
|
+
}> | Extract<AutofillTableCommand, {
|
|
9695
|
+
type: T;
|
|
9252
9696
|
}> | Extract<ShowFormulaCommand, {
|
|
9253
9697
|
type: T;
|
|
9254
9698
|
}> | Extract<AutofillAutoCommand, {
|
|
@@ -9292,7 +9736,7 @@ declare const registries: {
|
|
|
9292
9736
|
}> | Extract<RenderCanvasCommand, {
|
|
9293
9737
|
type: T;
|
|
9294
9738
|
}>>(type: {} extends Omit<C, "type"> ? T : never): DispatchResult;
|
|
9295
|
-
<T_1 extends "
|
|
9739
|
+
<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, {
|
|
9296
9740
|
type: T_1;
|
|
9297
9741
|
}> | Extract<UpdateCellPositionCommand, {
|
|
9298
9742
|
type: T_1;
|
|
@@ -9368,9 +9812,11 @@ declare const registries: {
|
|
|
9368
9812
|
type: T_1;
|
|
9369
9813
|
}> | Extract<CreateImageOverCommand, {
|
|
9370
9814
|
type: T_1;
|
|
9371
|
-
}> | Extract<
|
|
9815
|
+
}> | Extract<CreateTableCommand, {
|
|
9816
|
+
type: T_1;
|
|
9817
|
+
}> | Extract<RemoveTableCommand, {
|
|
9372
9818
|
type: T_1;
|
|
9373
|
-
}> | Extract<
|
|
9819
|
+
}> | Extract<UpdateTableCommand, {
|
|
9374
9820
|
type: T_1;
|
|
9375
9821
|
}> | Extract<GroupHeadersCommand, {
|
|
9376
9822
|
type: T_1;
|
|
@@ -9444,6 +9890,8 @@ declare const registries: {
|
|
|
9444
9890
|
type: T_1;
|
|
9445
9891
|
}> | Extract<AutofillSelectCommand, {
|
|
9446
9892
|
type: T_1;
|
|
9893
|
+
}> | Extract<AutofillTableCommand, {
|
|
9894
|
+
type: T_1;
|
|
9447
9895
|
}> | Extract<ShowFormulaCommand, {
|
|
9448
9896
|
type: T_1;
|
|
9449
9897
|
}> | Extract<AutofillAutoCommand, {
|
|
@@ -9532,6 +9980,7 @@ declare const helpers: {
|
|
|
9532
9980
|
deepCopy: typeof deepCopy;
|
|
9533
9981
|
expandZoneOnInsertion: typeof expandZoneOnInsertion;
|
|
9534
9982
|
reduceZoneOnDeletion: typeof reduceZoneOnDeletion;
|
|
9983
|
+
unquote: typeof unquote;
|
|
9535
9984
|
};
|
|
9536
9985
|
declare const links: {
|
|
9537
9986
|
isMarkdownLink: typeof isMarkdownLink;
|
|
@@ -9564,6 +10013,7 @@ declare const components: {
|
|
|
9564
10013
|
ScorecardChartDesignPanel: typeof ScorecardChartDesignPanel;
|
|
9565
10014
|
FigureComponent: typeof FigureComponent;
|
|
9566
10015
|
Menu: typeof Menu;
|
|
10016
|
+
Popover: typeof Popover;
|
|
9567
10017
|
SelectionInput: typeof SelectionInput;
|
|
9568
10018
|
ValidationMessages: typeof ValidationMessages;
|
|
9569
10019
|
};
|
|
@@ -9590,12 +10040,13 @@ declare const stores: {
|
|
|
9590
10040
|
useLocalStore: typeof useLocalStore;
|
|
9591
10041
|
SidePanelStore: typeof SidePanelStore;
|
|
9592
10042
|
};
|
|
10043
|
+
|
|
9593
10044
|
declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
|
|
9594
10045
|
addFunction: (fName: string, fDescription: AddFunctionDescription) => any;
|
|
9595
10046
|
};
|
|
9596
10047
|
declare const constants: {
|
|
9597
10048
|
DEFAULT_LOCALE: Locale;
|
|
9598
|
-
|
|
10049
|
+
HIGHLIGHT_COLOR: string;
|
|
9599
10050
|
};
|
|
9600
10051
|
|
|
9601
|
-
export { AST, ASTFuncall, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, AddFunctionDescription, Arg, CancelledReason, Cell, CellErrorType, CellPosition, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DispatchResult, EnrichedToken, EvalContext, EvaluationError, FPayload, FunctionRegistry, Model, Registry, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, Token, TransportService, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenize };
|
|
10052
|
+
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, CoreViewCommand, CoreViewCommandTypes, CreateChartCommand, CreateFigureCommand, CreateImageOverCommand, CreateRevisionOptions, CreateSheetCommand, CreateTableCommand, Currency, CustomFormulaCriterion, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetValues, DateCriterionValue, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, Dependencies, Dimension, Direction$1 as Direction, DispatchResult, DuplicateSheetCommand, EdgeScrollInfo, EditTextOptions, EmptyCell, EndsWithRule, EnrichedToken, EnsureRange, ErrorCell, EvalContext, EvaluateCellsCommand, EvaluatedCell, EvaluationError, ExcelCellData, ExcelChartDataset, ExcelChartDefinition, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelWorkbookData, ExpressionRule, FPayload, FPayloadNumber, Figure, FigureData, FigureSize, Filter, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, 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, 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 };
|