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