@odoo/o-spreadsheet 16.5.0-alpha.0 → 16.5.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/o-spreadsheet.cjs.js +54293 -49649
- package/dist/o-spreadsheet.d.ts +1009 -484
- package/dist/o-spreadsheet.esm.js +54294 -49649
- package/dist/o-spreadsheet.iife.js +54310 -49666
- package/dist/o-spreadsheet.iife.min.js +656 -532
- package/package.json +20 -19
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _odoo_owl from '@odoo/owl';
|
|
2
2
|
import { ComponentConstructor, Component } from '@odoo/owl';
|
|
3
|
-
import { ChartConfiguration, ChartData,
|
|
3
|
+
import { ChartConfiguration, ChartData, ChartDataset, ChartOptions } from 'chart.js';
|
|
4
4
|
|
|
5
5
|
declare enum CellErrorLevel {
|
|
6
6
|
silent = 0,
|
|
@@ -10,6 +10,7 @@ declare class EvaluationError extends Error {
|
|
|
10
10
|
readonly errorType: string;
|
|
11
11
|
readonly logLevel: number;
|
|
12
12
|
constructor(errorType: string, message: string, logLevel?: number);
|
|
13
|
+
get isVerbose(): boolean;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
declare const functionCache: {
|
|
@@ -374,7 +375,7 @@ interface SectionThreshold {
|
|
|
374
375
|
}
|
|
375
376
|
interface GaugeChartConfiguration extends Omit<ChartConfiguration, "data" | "options"> {
|
|
376
377
|
data?: GaugeChartData;
|
|
377
|
-
options
|
|
378
|
+
options: GaugeChartOptions;
|
|
378
379
|
}
|
|
379
380
|
interface GaugeChartRuntime {
|
|
380
381
|
chartJsConfig: GaugeChartConfiguration;
|
|
@@ -383,32 +384,40 @@ interface GaugeChartRuntime {
|
|
|
383
384
|
interface GaugeChartData extends Omit<ChartData, "datasets"> {
|
|
384
385
|
datasets: GaugeChartDataSets[];
|
|
385
386
|
}
|
|
386
|
-
interface GaugeChartDataSets extends
|
|
387
|
+
interface GaugeChartDataSets extends ChartDataset<"doughnut"> {
|
|
387
388
|
readonly minValue?: number;
|
|
388
389
|
readonly value?: number | undefined;
|
|
389
390
|
readonly backgroundColor?: string[];
|
|
390
391
|
}
|
|
391
392
|
interface GaugeChartOptions extends ChartOptions {
|
|
392
|
-
needle?:
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
393
|
+
needle?: NeedleOptions;
|
|
394
|
+
valueLabel?: ValueLabelOptions;
|
|
395
|
+
}
|
|
396
|
+
interface NeedleOptions {
|
|
397
|
+
display?: boolean;
|
|
398
|
+
borderColor?: Color;
|
|
399
|
+
backgroundColor?: Color;
|
|
400
|
+
/**
|
|
401
|
+
* Needle width as the percentage of the chart area width
|
|
402
|
+
*/
|
|
403
|
+
width?: number;
|
|
404
|
+
}
|
|
405
|
+
interface ValueLabelOptions {
|
|
406
|
+
display?: boolean;
|
|
407
|
+
formatter?: (value: any) => string;
|
|
408
|
+
font?: {
|
|
409
|
+
size?: number;
|
|
410
|
+
family?: string;
|
|
411
|
+
color?: Color;
|
|
397
412
|
};
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
top: number;
|
|
407
|
-
right: number;
|
|
408
|
-
bottom: number;
|
|
409
|
-
left: number;
|
|
410
|
-
};
|
|
411
|
-
bottomMarginPercentage: number;
|
|
413
|
+
backgroundColor?: Color;
|
|
414
|
+
borderColor?: Color;
|
|
415
|
+
borderRadius?: number;
|
|
416
|
+
padding?: {
|
|
417
|
+
left: number;
|
|
418
|
+
right: number;
|
|
419
|
+
top: number;
|
|
420
|
+
bottom: number;
|
|
412
421
|
};
|
|
413
422
|
}
|
|
414
423
|
|
|
@@ -424,6 +433,7 @@ interface LineChartDefinition {
|
|
|
424
433
|
readonly labelsAsText: boolean;
|
|
425
434
|
readonly stacked: boolean;
|
|
426
435
|
readonly aggregated?: boolean;
|
|
436
|
+
readonly cumulative: boolean;
|
|
427
437
|
}
|
|
428
438
|
type LineChartRuntime = {
|
|
429
439
|
chartJsConfig: ChartConfiguration;
|
|
@@ -490,6 +500,7 @@ interface ExcelChartDefinition {
|
|
|
490
500
|
readonly verticalAxisPosition: VerticalAxisPosition;
|
|
491
501
|
readonly legendPosition: LegendPosition;
|
|
492
502
|
readonly stacked?: boolean;
|
|
503
|
+
readonly cumulative?: boolean;
|
|
493
504
|
}
|
|
494
505
|
interface ChartCreationContext {
|
|
495
506
|
readonly range?: string[];
|
|
@@ -575,7 +586,6 @@ interface IconSetRule {
|
|
|
575
586
|
lowerInflectionPoint: IconThreshold;
|
|
576
587
|
}
|
|
577
588
|
type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";
|
|
578
|
-
type UpDown = "up" | "down";
|
|
579
589
|
|
|
580
590
|
interface CellData {
|
|
581
591
|
content?: string;
|
|
@@ -613,10 +623,12 @@ interface SheetData {
|
|
|
613
623
|
[key: number]: HeaderData;
|
|
614
624
|
};
|
|
615
625
|
conditionalFormats: ConditionalFormat[];
|
|
626
|
+
dataValidationRules?: DataValidationRuleData[];
|
|
616
627
|
filterTables: FilterTableData[];
|
|
617
628
|
areGridLinesVisible?: boolean;
|
|
618
629
|
isVisible: boolean;
|
|
619
630
|
panes?: PaneDivision;
|
|
631
|
+
headerGroups?: Record<Dimension, HeaderGroup[]>;
|
|
620
632
|
}
|
|
621
633
|
interface WorkbookSettings {
|
|
622
634
|
locale: Locale;
|
|
@@ -661,6 +673,9 @@ interface ExcelSheetData extends Omit<SheetData, "figureTables"> {
|
|
|
661
673
|
interface FilterTableData {
|
|
662
674
|
range: string;
|
|
663
675
|
}
|
|
676
|
+
interface DataValidationRuleData extends Omit<DataValidationRule, "ranges"> {
|
|
677
|
+
ranges: string[];
|
|
678
|
+
}
|
|
664
679
|
interface ExcelFilterTableData {
|
|
665
680
|
range: string;
|
|
666
681
|
filters: ExcelFilterData[];
|
|
@@ -960,7 +975,7 @@ declare class RangeImpl implements Range {
|
|
|
960
975
|
constructor(args: ConstructorArgs, getSheetSize: (sheetId: UID) => ZoneDimension);
|
|
961
976
|
static fromRange(range: Range, getters: CoreGetters): RangeImpl;
|
|
962
977
|
get unboundedZone(): UnboundedZone;
|
|
963
|
-
get zone(): Zone
|
|
978
|
+
get zone(): Readonly<Zone>;
|
|
964
979
|
static getRangeParts(xc: string, zone: UnboundedZone): RangePart[];
|
|
965
980
|
get isFullCol(): boolean;
|
|
966
981
|
get isFullRow(): boolean;
|
|
@@ -1046,10 +1061,10 @@ type StatefulStream<Event, State> = {
|
|
|
1046
1061
|
interface SelectionProcessor {
|
|
1047
1062
|
selectZone(anchor: AnchorZone, options?: SelectionEventOptions): DispatchResult;
|
|
1048
1063
|
selectCell(col: number, row: number): DispatchResult;
|
|
1049
|
-
moveAnchorCell(direction:
|
|
1064
|
+
moveAnchorCell(direction: Direction$1, step: SelectionStep): DispatchResult;
|
|
1050
1065
|
setAnchorCorner(col: number, row: number): DispatchResult;
|
|
1051
1066
|
addCellToSelection(col: number, row: number): DispatchResult;
|
|
1052
|
-
resizeAnchorZone(direction:
|
|
1067
|
+
resizeAnchorZone(direction: Direction$1, step: SelectionStep): DispatchResult;
|
|
1053
1068
|
selectColumn(index: number, mode: SelectionEvent["mode"]): DispatchResult;
|
|
1054
1069
|
selectRow(index: number, mode: SelectionEvent["mode"]): DispatchResult;
|
|
1055
1070
|
selectAll(): DispatchResult;
|
|
@@ -1083,11 +1098,6 @@ interface ImageProviderInterface {
|
|
|
1083
1098
|
getImageOriginalSize(path: string): Promise<FigureSize>;
|
|
1084
1099
|
}
|
|
1085
1100
|
|
|
1086
|
-
interface NotifyUIEvent {
|
|
1087
|
-
type: "ERROR";
|
|
1088
|
-
text: string;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
1101
|
/**
|
|
1092
1102
|
* Model
|
|
1093
1103
|
*
|
|
@@ -1133,7 +1143,8 @@ interface ModelConfig {
|
|
|
1133
1143
|
readonly transportService: TransportService;
|
|
1134
1144
|
readonly client: Client;
|
|
1135
1145
|
readonly snapshotRequested: boolean;
|
|
1136
|
-
readonly notifyUI: (payload:
|
|
1146
|
+
readonly notifyUI: (payload: InformationNotification) => void;
|
|
1147
|
+
readonly raiseBlockingErrorUI: (text: string) => void;
|
|
1137
1148
|
}
|
|
1138
1149
|
interface ModelExternalConfig {
|
|
1139
1150
|
readonly fileStore?: FileStore;
|
|
@@ -1363,7 +1374,7 @@ declare class BasePlugin<State = any, C = any> implements CommandHandler<C>, Val
|
|
|
1363
1374
|
checkValidations<T>(command: T, ...validations: Validation<T>[]): CommandResult | CommandResult[];
|
|
1364
1375
|
}
|
|
1365
1376
|
|
|
1366
|
-
type UIActions = Pick<ModelConfig, "notifyUI">;
|
|
1377
|
+
type UIActions = Pick<ModelConfig, "notifyUI" | "raiseBlockingErrorUI">;
|
|
1367
1378
|
interface UIPluginConfig {
|
|
1368
1379
|
readonly getters: Getters;
|
|
1369
1380
|
readonly stateObserver: StateObserver;
|
|
@@ -1383,7 +1394,7 @@ interface UIPluginConstructor {
|
|
|
1383
1394
|
* UI plugins handle any transient data required to display a spreadsheet.
|
|
1384
1395
|
* They can draw on the grid canvas.
|
|
1385
1396
|
*/
|
|
1386
|
-
declare class UIPlugin<State = any
|
|
1397
|
+
declare class UIPlugin<State = any> extends BasePlugin<State, Command> {
|
|
1387
1398
|
static layers: LAYERS[];
|
|
1388
1399
|
protected getters: Getters;
|
|
1389
1400
|
protected ui: UIActions;
|
|
@@ -1419,7 +1430,9 @@ declare class FindAndReplacePlugin extends UIPlugin {
|
|
|
1419
1430
|
private currentSearchRegex;
|
|
1420
1431
|
private searchOptions;
|
|
1421
1432
|
private toSearch;
|
|
1433
|
+
private isSearchDirty;
|
|
1422
1434
|
handle(cmd: Command): void;
|
|
1435
|
+
finalize(): void;
|
|
1423
1436
|
getSearchMatches(): SearchMatch[];
|
|
1424
1437
|
getCurrentSelectedMatchIndex(): number | null;
|
|
1425
1438
|
/**
|
|
@@ -1451,6 +1464,7 @@ declare class FindAndReplacePlugin extends UIPlugin {
|
|
|
1451
1464
|
*/
|
|
1452
1465
|
private selectNextCell;
|
|
1453
1466
|
private clearSearch;
|
|
1467
|
+
private replaceMatch;
|
|
1454
1468
|
/**
|
|
1455
1469
|
* Replace the value of the currently selected match
|
|
1456
1470
|
*/
|
|
@@ -1469,7 +1483,7 @@ interface ComposerSelection {
|
|
|
1469
1483
|
end: number;
|
|
1470
1484
|
}
|
|
1471
1485
|
declare class EditionPlugin extends UIPlugin {
|
|
1472
|
-
static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell"];
|
|
1486
|
+
static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell", "getCycledReference", "getAutoCompleteDataValidationValues"];
|
|
1473
1487
|
private col;
|
|
1474
1488
|
private row;
|
|
1475
1489
|
private mode;
|
|
@@ -1478,10 +1492,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1478
1492
|
private currentTokens;
|
|
1479
1493
|
private selectionStart;
|
|
1480
1494
|
private selectionEnd;
|
|
1481
|
-
private selectionInitialStart;
|
|
1482
1495
|
private initialContent;
|
|
1483
|
-
private previousRef;
|
|
1484
|
-
private previousRange;
|
|
1485
1496
|
private colorIndexByRange;
|
|
1486
1497
|
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
1487
1498
|
private handleEvent;
|
|
@@ -1497,6 +1508,20 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1497
1508
|
* Return the (enriched) token just before the cursor.
|
|
1498
1509
|
*/
|
|
1499
1510
|
getTokenAtCursor(): EnrichedToken | undefined;
|
|
1511
|
+
/**
|
|
1512
|
+
* Return the cycled reference if any (A1 -> $A$1 -> A$1 -> $A1 -> A1)
|
|
1513
|
+
*/
|
|
1514
|
+
getCycledReference(selection: {
|
|
1515
|
+
start: number;
|
|
1516
|
+
end: number;
|
|
1517
|
+
}, content: string): {
|
|
1518
|
+
content: string;
|
|
1519
|
+
selection: {
|
|
1520
|
+
start: number;
|
|
1521
|
+
end: number;
|
|
1522
|
+
};
|
|
1523
|
+
} | undefined;
|
|
1524
|
+
getInitialComposerContent(): string | undefined;
|
|
1500
1525
|
private cycleReferences;
|
|
1501
1526
|
private validateSelection;
|
|
1502
1527
|
private onColumnsRemoved;
|
|
@@ -1514,6 +1539,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1514
1539
|
*/
|
|
1515
1540
|
private startEdition;
|
|
1516
1541
|
private stopEdition;
|
|
1542
|
+
private getCurrentCanonicalContent;
|
|
1517
1543
|
private cancelEditionAndActivateSheet;
|
|
1518
1544
|
private getComposerContent;
|
|
1519
1545
|
private numberComposerContent;
|
|
@@ -1527,7 +1553,11 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1527
1553
|
/**
|
|
1528
1554
|
* Replace the current reference selected by the new one.
|
|
1529
1555
|
* */
|
|
1530
|
-
private
|
|
1556
|
+
private replaceSelectedRange;
|
|
1557
|
+
/**
|
|
1558
|
+
* Replace the reference of the old zone by the new one.
|
|
1559
|
+
*/
|
|
1560
|
+
private updateComposerRange;
|
|
1531
1561
|
private getZoneReference;
|
|
1532
1562
|
private getRangeReference;
|
|
1533
1563
|
/**
|
|
@@ -1550,6 +1580,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1550
1580
|
* Return ranges currently referenced in the composer
|
|
1551
1581
|
*/
|
|
1552
1582
|
getReferencedRanges(): Range[];
|
|
1583
|
+
getAutoCompleteDataValidationValues(): string[];
|
|
1553
1584
|
/**
|
|
1554
1585
|
* Function used to determine when composer selection can start.
|
|
1555
1586
|
* Three conditions are necessary:
|
|
@@ -1558,11 +1589,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1558
1589
|
* - Previous and next tokens can be separated by spaces
|
|
1559
1590
|
*/
|
|
1560
1591
|
private canStartComposerRangeSelection;
|
|
1561
|
-
|
|
1562
|
-
* Return all the tokens between selectionStart and selectionEnd.
|
|
1563
|
-
* Includes token that begin right on selectionStart or end right on selectionEnd.
|
|
1564
|
-
*/
|
|
1565
|
-
private getTokensInSelection;
|
|
1592
|
+
private checkDataValidation;
|
|
1566
1593
|
}
|
|
1567
1594
|
|
|
1568
1595
|
/**
|
|
@@ -1661,9 +1688,10 @@ type ClipboardPasteOptions = "onlyFormat" | "onlyValue";
|
|
|
1661
1688
|
interface SheetDependentCommand {
|
|
1662
1689
|
sheetId: UID;
|
|
1663
1690
|
}
|
|
1664
|
-
interface
|
|
1691
|
+
interface HeadersDependentCommand {
|
|
1665
1692
|
sheetId: UID;
|
|
1666
1693
|
dimension: Dimension;
|
|
1694
|
+
elements: HeaderIndex[];
|
|
1667
1695
|
}
|
|
1668
1696
|
interface TargetDependentCommand {
|
|
1669
1697
|
sheetId: UID;
|
|
@@ -1677,11 +1705,15 @@ interface PositionDependentCommand {
|
|
|
1677
1705
|
col: number;
|
|
1678
1706
|
row: number;
|
|
1679
1707
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
declare const
|
|
1708
|
+
interface ZoneDependentCommand {
|
|
1709
|
+
sheetId: UID;
|
|
1710
|
+
zone: Zone;
|
|
1711
|
+
}
|
|
1712
|
+
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" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
|
|
1713
|
+
declare const invalidateDependenciesCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "CANCEL_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE">;
|
|
1714
|
+
declare const invalidateCFEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
|
|
1715
|
+
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" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "CANCEL_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE">;
|
|
1716
|
+
declare const coreTypes: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE">;
|
|
1685
1717
|
interface UpdateCellCommand extends PositionDependentCommand {
|
|
1686
1718
|
type: "UPDATE_CELL";
|
|
1687
1719
|
content?: string;
|
|
@@ -1695,31 +1727,32 @@ interface UpdateCellPositionCommand extends PositionDependentCommand {
|
|
|
1695
1727
|
type: "UPDATE_CELL_POSITION";
|
|
1696
1728
|
cellId?: UID;
|
|
1697
1729
|
}
|
|
1698
|
-
interface AddColumnsRowsCommand extends
|
|
1730
|
+
interface AddColumnsRowsCommand extends SheetDependentCommand {
|
|
1699
1731
|
type: "ADD_COLUMNS_ROWS";
|
|
1732
|
+
dimension: Dimension;
|
|
1700
1733
|
base: HeaderIndex;
|
|
1701
1734
|
quantity: number;
|
|
1702
1735
|
position: "before" | "after";
|
|
1703
1736
|
}
|
|
1704
|
-
interface RemoveColumnsRowsCommand extends
|
|
1737
|
+
interface RemoveColumnsRowsCommand extends HeadersDependentCommand {
|
|
1705
1738
|
type: "REMOVE_COLUMNS_ROWS";
|
|
1706
1739
|
elements: HeaderIndex[];
|
|
1707
1740
|
}
|
|
1708
|
-
interface MoveColumnsRowsCommand extends
|
|
1741
|
+
interface MoveColumnsRowsCommand extends HeadersDependentCommand {
|
|
1709
1742
|
type: "MOVE_COLUMNS_ROWS";
|
|
1710
1743
|
base: HeaderIndex;
|
|
1711
1744
|
elements: HeaderIndex[];
|
|
1712
1745
|
}
|
|
1713
|
-
interface ResizeColumnsRowsCommand extends
|
|
1746
|
+
interface ResizeColumnsRowsCommand extends HeadersDependentCommand {
|
|
1714
1747
|
type: "RESIZE_COLUMNS_ROWS";
|
|
1715
1748
|
elements: number[];
|
|
1716
1749
|
size: number | null;
|
|
1717
1750
|
}
|
|
1718
|
-
interface HideColumnsRowsCommand extends
|
|
1751
|
+
interface HideColumnsRowsCommand extends HeadersDependentCommand {
|
|
1719
1752
|
type: "HIDE_COLUMNS_ROWS";
|
|
1720
1753
|
elements: HeaderIndex[];
|
|
1721
1754
|
}
|
|
1722
|
-
interface UnhideColumnsRowsCommand extends
|
|
1755
|
+
interface UnhideColumnsRowsCommand extends HeadersDependentCommand {
|
|
1723
1756
|
type: "UNHIDE_COLUMNS_ROWS";
|
|
1724
1757
|
elements: HeaderIndex[];
|
|
1725
1758
|
}
|
|
@@ -1812,9 +1845,9 @@ interface RemoveConditionalFormatCommand extends SheetDependentCommand {
|
|
|
1812
1845
|
id: string;
|
|
1813
1846
|
}
|
|
1814
1847
|
interface MoveConditionalFormatCommand extends SheetDependentCommand {
|
|
1815
|
-
type: "
|
|
1848
|
+
type: "CHANGE_CONDITIONAL_FORMAT_PRIORITY";
|
|
1816
1849
|
cfId: UID;
|
|
1817
|
-
|
|
1850
|
+
delta: number;
|
|
1818
1851
|
}
|
|
1819
1852
|
interface CreateFigureCommand extends SheetDependentCommand {
|
|
1820
1853
|
type: "CREATE_FIGURE";
|
|
@@ -1861,7 +1894,7 @@ interface RemoveFilterTableCommand extends TargetDependentCommand {
|
|
|
1861
1894
|
}
|
|
1862
1895
|
interface UpdateFilterCommand extends PositionDependentCommand {
|
|
1863
1896
|
type: "UPDATE_FILTER";
|
|
1864
|
-
|
|
1897
|
+
hiddenValues: string[];
|
|
1865
1898
|
}
|
|
1866
1899
|
interface SetFormattingCommand extends TargetDependentCommand {
|
|
1867
1900
|
type: "SET_FORMATTING";
|
|
@@ -1887,13 +1920,67 @@ interface UpdateLocaleCommand {
|
|
|
1887
1920
|
type: "UPDATE_LOCALE";
|
|
1888
1921
|
locale: Locale;
|
|
1889
1922
|
}
|
|
1923
|
+
interface RemoveDuplicatesCommand {
|
|
1924
|
+
type: "REMOVE_DUPLICATES";
|
|
1925
|
+
columns: HeaderIndex[];
|
|
1926
|
+
hasHeader: boolean;
|
|
1927
|
+
}
|
|
1928
|
+
interface TrimWhitespaceCommand {
|
|
1929
|
+
type: "TRIM_WHITESPACE";
|
|
1930
|
+
}
|
|
1931
|
+
interface GroupHeadersCommand extends SheetDependentCommand {
|
|
1932
|
+
type: "GROUP_HEADERS";
|
|
1933
|
+
dimension: Dimension;
|
|
1934
|
+
start: HeaderIndex;
|
|
1935
|
+
end: HeaderIndex;
|
|
1936
|
+
}
|
|
1937
|
+
interface UnGroupHeadersCommand extends SheetDependentCommand {
|
|
1938
|
+
type: "UNGROUP_HEADERS";
|
|
1939
|
+
dimension: Dimension;
|
|
1940
|
+
start: HeaderIndex;
|
|
1941
|
+
end: HeaderIndex;
|
|
1942
|
+
}
|
|
1943
|
+
interface FoldHeaderGroupCommand extends SheetDependentCommand {
|
|
1944
|
+
type: "FOLD_HEADER_GROUP";
|
|
1945
|
+
dimension: Dimension;
|
|
1946
|
+
start: HeaderIndex;
|
|
1947
|
+
end: HeaderIndex;
|
|
1948
|
+
}
|
|
1949
|
+
interface UnfoldHeaderGroupCommand extends SheetDependentCommand {
|
|
1950
|
+
type: "UNFOLD_HEADER_GROUP";
|
|
1951
|
+
dimension: Dimension;
|
|
1952
|
+
start: HeaderIndex;
|
|
1953
|
+
end: HeaderIndex;
|
|
1954
|
+
}
|
|
1955
|
+
interface FoldAllHeaderGroupsCommand extends SheetDependentCommand {
|
|
1956
|
+
type: "FOLD_ALL_HEADER_GROUPS";
|
|
1957
|
+
dimension: Dimension;
|
|
1958
|
+
}
|
|
1959
|
+
interface UnfoldAllHeaderGroupsCommand extends SheetDependentCommand {
|
|
1960
|
+
type: "UNFOLD_ALL_HEADER_GROUPS";
|
|
1961
|
+
dimension: Dimension;
|
|
1962
|
+
}
|
|
1963
|
+
interface UnfoldHeaderGroupsInZoneCommand extends ZoneDependentCommand {
|
|
1964
|
+
type: "UNFOLD_HEADER_GROUPS_IN_ZONE";
|
|
1965
|
+
dimension: Dimension;
|
|
1966
|
+
}
|
|
1967
|
+
interface FoldHeaderGroupsInZoneCommand extends ZoneDependentCommand {
|
|
1968
|
+
type: "FOLD_HEADER_GROUPS_IN_ZONE";
|
|
1969
|
+
dimension: Dimension;
|
|
1970
|
+
}
|
|
1971
|
+
interface AddDataValidationCommand extends SheetDependentCommand, RangesDependentCommand {
|
|
1972
|
+
type: "ADD_DATA_VALIDATION_RULE";
|
|
1973
|
+
rule: Omit<DataValidationRule, "ranges">;
|
|
1974
|
+
}
|
|
1975
|
+
interface RemoveDataValidationCommand extends SheetDependentCommand {
|
|
1976
|
+
type: "REMOVE_DATA_VALIDATION_RULE";
|
|
1977
|
+
id: string;
|
|
1978
|
+
}
|
|
1890
1979
|
interface CopyCommand {
|
|
1891
1980
|
type: "COPY";
|
|
1892
1981
|
}
|
|
1893
1982
|
interface CutCommand {
|
|
1894
1983
|
type: "CUT";
|
|
1895
|
-
/** Zones to cut. If none were given, will copy the zones in the selection*/
|
|
1896
|
-
cutTarget?: Zone[];
|
|
1897
1984
|
}
|
|
1898
1985
|
interface PasteCommand {
|
|
1899
1986
|
type: "PASTE";
|
|
@@ -1947,22 +2034,6 @@ interface ActivateSheetCommand {
|
|
|
1947
2034
|
sheetIdFrom: UID;
|
|
1948
2035
|
sheetIdTo: UID;
|
|
1949
2036
|
}
|
|
1950
|
-
/**
|
|
1951
|
-
* Set the selection mode to `readyToExpand`.
|
|
1952
|
-
* The user is ready to expand the selected zones with a new
|
|
1953
|
-
* selection (i.e. add an other zone the to currently selected zones).
|
|
1954
|
-
* In other words, the next selection will be added to the
|
|
1955
|
-
* current selection if this mode is active.
|
|
1956
|
-
*/
|
|
1957
|
-
interface PrepareExpansionCommand {
|
|
1958
|
-
type: "PREPARE_SELECTION_INPUT_EXPANSION";
|
|
1959
|
-
}
|
|
1960
|
-
/**
|
|
1961
|
-
* Set the selection mode to `idle`.
|
|
1962
|
-
*/
|
|
1963
|
-
interface StopSelectionCommand {
|
|
1964
|
-
type: "STOP_SELECTION_INPUT";
|
|
1965
|
-
}
|
|
1966
2037
|
/**
|
|
1967
2038
|
* Set a color to be used for the next selection to highlight.
|
|
1968
2039
|
* The color is only used when selection highlight is enabled.
|
|
@@ -1976,11 +2047,7 @@ interface EvaluateCellsCommand {
|
|
|
1976
2047
|
}
|
|
1977
2048
|
interface StartChangeHighlightCommand {
|
|
1978
2049
|
type: "START_CHANGE_HIGHLIGHT";
|
|
1979
|
-
|
|
1980
|
-
}
|
|
1981
|
-
interface ChangeHighlightCommand {
|
|
1982
|
-
type: "CHANGE_HIGHLIGHT";
|
|
1983
|
-
range: RangeData;
|
|
2050
|
+
zone: Zone;
|
|
1984
2051
|
}
|
|
1985
2052
|
interface StopComposerSelectionCommand {
|
|
1986
2053
|
type: "STOP_COMPOSER_RANGE_SELECTION";
|
|
@@ -1992,7 +2059,9 @@ interface StartEditionCommand {
|
|
|
1992
2059
|
}
|
|
1993
2060
|
interface StopEditionCommand {
|
|
1994
2061
|
type: "STOP_EDITION";
|
|
1995
|
-
|
|
2062
|
+
}
|
|
2063
|
+
interface CancelEditionCommand {
|
|
2064
|
+
type: "CANCEL_EDITION";
|
|
1996
2065
|
}
|
|
1997
2066
|
interface SetCurrentContentCommand {
|
|
1998
2067
|
type: "SET_CURRENT_CONTENT";
|
|
@@ -2150,9 +2219,6 @@ interface UpdateSearchCommand {
|
|
|
2150
2219
|
interface ClearSearchCommand {
|
|
2151
2220
|
type: "CLEAR_SEARCH";
|
|
2152
2221
|
}
|
|
2153
|
-
interface RefreshSearchCommand {
|
|
2154
|
-
type: "REFRESH_SEARCH";
|
|
2155
|
-
}
|
|
2156
2222
|
interface SelectSearchPreviousCommand {
|
|
2157
2223
|
type: "SELECT_SEARCH_PREVIOUS_MATCH";
|
|
2158
2224
|
}
|
|
@@ -2258,11 +2324,17 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
|
|
|
2258
2324
|
| SetFormattingCommand | ClearFormattingCommand | SetZoneBordersCommand | SetBorderCommand
|
|
2259
2325
|
/** CHART */
|
|
2260
2326
|
| CreateChartCommand | UpdateChartCommand
|
|
2261
|
-
/**
|
|
2327
|
+
/** IMAGE */
|
|
2262
2328
|
| CreateImageOverCommand
|
|
2263
2329
|
/** FILTERS */
|
|
2264
|
-
| CreateFilterTableCommand | RemoveFilterTableCommand
|
|
2265
|
-
|
|
2330
|
+
| CreateFilterTableCommand | RemoveFilterTableCommand
|
|
2331
|
+
/** HEADER GROUP */
|
|
2332
|
+
| GroupHeadersCommand | UnGroupHeadersCommand | UnfoldHeaderGroupCommand | FoldHeaderGroupCommand | FoldAllHeaderGroupsCommand | UnfoldAllHeaderGroupsCommand | UnfoldHeaderGroupsInZoneCommand | FoldHeaderGroupsInZoneCommand
|
|
2333
|
+
/** DATA VALIDATION */
|
|
2334
|
+
| AddDataValidationCommand | RemoveDataValidationCommand
|
|
2335
|
+
/** MISC */
|
|
2336
|
+
| UpdateLocaleCommand;
|
|
2337
|
+
type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | AddRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | CancelPaintFormatCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | StartChangeHighlightCommand | SetColorCommand | StopComposerSelectionCommand | StartEditionCommand | StopEditionCommand | CancelEditionCommand | SetCurrentContentCommand | ChangeComposerSelectionCommand | ReplaceComposerSelectionCommand | CycleEditionReferencesCommand | StartCommand | AutofillCommand | AutofillSelectCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | UpdateSearchCommand | ClearSearchCommand | SelectSearchPreviousCommand | SelectSearchNextCommand | ReplaceSearchCommand | ReplaceAllSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | OpenCellPopoverCommand | CloseCellPopoverCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand;
|
|
2266
2338
|
type Command = CoreCommand | LocalCommand;
|
|
2267
2339
|
/**
|
|
2268
2340
|
* Holds the result of a command dispatch.
|
|
@@ -2285,102 +2357,114 @@ declare class DispatchResult {
|
|
|
2285
2357
|
}
|
|
2286
2358
|
type CancelledReason = Exclude<CommandResult, CommandResult.Success>;
|
|
2287
2359
|
declare const enum CommandResult {
|
|
2288
|
-
Success =
|
|
2289
|
-
CancelledForUnknownReason =
|
|
2290
|
-
WillRemoveExistingMerge =
|
|
2291
|
-
MergeIsDestructive =
|
|
2292
|
-
CellIsMerged =
|
|
2293
|
-
InvalidTarget =
|
|
2294
|
-
EmptyUndoStack =
|
|
2295
|
-
EmptyRedoStack =
|
|
2296
|
-
NotEnoughElements =
|
|
2297
|
-
NotEnoughSheets =
|
|
2298
|
-
MissingSheetName =
|
|
2299
|
-
UnchangedSheetName =
|
|
2300
|
-
DuplicatedSheetName =
|
|
2301
|
-
DuplicatedSheetId =
|
|
2302
|
-
ForbiddenCharactersInSheetName =
|
|
2303
|
-
WrongSheetMove =
|
|
2304
|
-
WrongSheetPosition =
|
|
2305
|
-
InvalidAnchorZone =
|
|
2306
|
-
SelectionOutOfBound =
|
|
2307
|
-
TargetOutOfSheet =
|
|
2308
|
-
WrongCutSelection =
|
|
2309
|
-
WrongPasteSelection =
|
|
2310
|
-
WrongPasteOption =
|
|
2311
|
-
WrongFigurePasteOption =
|
|
2312
|
-
EmptyClipboard =
|
|
2313
|
-
EmptyRange =
|
|
2314
|
-
InvalidRange =
|
|
2315
|
-
InvalidZones =
|
|
2316
|
-
InvalidSheetId =
|
|
2317
|
-
InvalidFigureId =
|
|
2318
|
-
InputAlreadyFocused =
|
|
2319
|
-
MaximumRangesReached =
|
|
2320
|
-
InvalidChartDefinition =
|
|
2321
|
-
InvalidDataSet =
|
|
2322
|
-
InvalidLabelRange =
|
|
2323
|
-
InvalidScorecardKeyValue =
|
|
2324
|
-
InvalidScorecardBaseline =
|
|
2325
|
-
InvalidGaugeDataRange =
|
|
2326
|
-
EmptyGaugeRangeMin =
|
|
2327
|
-
GaugeRangeMinNaN =
|
|
2328
|
-
EmptyGaugeRangeMax =
|
|
2329
|
-
GaugeRangeMaxNaN =
|
|
2330
|
-
GaugeRangeMinBiggerThanRangeMax =
|
|
2331
|
-
GaugeLowerInflectionPointNaN =
|
|
2332
|
-
GaugeUpperInflectionPointNaN =
|
|
2333
|
-
GaugeLowerBiggerThanUpper =
|
|
2334
|
-
InvalidAutofillSelection =
|
|
2335
|
-
WrongComposerSelection =
|
|
2336
|
-
MinBiggerThanMax =
|
|
2337
|
-
LowerBiggerThanUpper =
|
|
2338
|
-
MidBiggerThanMax =
|
|
2339
|
-
MinBiggerThanMid =
|
|
2340
|
-
FirstArgMissing =
|
|
2341
|
-
SecondArgMissing =
|
|
2342
|
-
MinNaN =
|
|
2343
|
-
MidNaN =
|
|
2344
|
-
MaxNaN =
|
|
2345
|
-
ValueUpperInflectionNaN =
|
|
2346
|
-
ValueLowerInflectionNaN =
|
|
2347
|
-
MinInvalidFormula =
|
|
2348
|
-
MidInvalidFormula =
|
|
2349
|
-
MaxInvalidFormula =
|
|
2350
|
-
ValueUpperInvalidFormula =
|
|
2351
|
-
ValueLowerInvalidFormula =
|
|
2352
|
-
InvalidSortZone =
|
|
2353
|
-
WaitingSessionConfirmation =
|
|
2354
|
-
MergeOverlap =
|
|
2355
|
-
TooManyHiddenElements =
|
|
2356
|
-
Readonly =
|
|
2357
|
-
InvalidViewportSize =
|
|
2358
|
-
InvalidScrollingDirection =
|
|
2359
|
-
FigureDoesNotExist =
|
|
2360
|
-
InvalidConditionalFormatId =
|
|
2361
|
-
InvalidCellPopover =
|
|
2362
|
-
EmptyTarget =
|
|
2363
|
-
InvalidFreezeQuantity =
|
|
2364
|
-
FrozenPaneOverlap =
|
|
2365
|
-
ValuesNotChanged =
|
|
2366
|
-
InvalidFilterZone =
|
|
2367
|
-
FilterOverlap =
|
|
2368
|
-
FilterNotFound =
|
|
2369
|
-
MergeInFilter =
|
|
2370
|
-
NonContinuousTargets =
|
|
2371
|
-
DuplicatedFigureId =
|
|
2372
|
-
InvalidSelectionStep =
|
|
2373
|
-
DuplicatedChartId =
|
|
2374
|
-
ChartDoesNotExist =
|
|
2375
|
-
InvalidHeaderIndex =
|
|
2376
|
-
InvalidQuantity =
|
|
2377
|
-
MoreThanOneColumnSelected =
|
|
2378
|
-
EmptySplitSeparator =
|
|
2379
|
-
SplitWillOverwriteContent =
|
|
2380
|
-
NoSplitSeparatorInSelection =
|
|
2381
|
-
NoActiveSheet =
|
|
2382
|
-
InvalidLocale =
|
|
2383
|
-
AlreadyInPaintingFormatMode =
|
|
2360
|
+
Success = "Success",
|
|
2361
|
+
CancelledForUnknownReason = "CancelledForUnknownReason",
|
|
2362
|
+
WillRemoveExistingMerge = "WillRemoveExistingMerge",
|
|
2363
|
+
MergeIsDestructive = "MergeIsDestructive",
|
|
2364
|
+
CellIsMerged = "CellIsMerged",
|
|
2365
|
+
InvalidTarget = "InvalidTarget",
|
|
2366
|
+
EmptyUndoStack = "EmptyUndoStack",
|
|
2367
|
+
EmptyRedoStack = "EmptyRedoStack",
|
|
2368
|
+
NotEnoughElements = "NotEnoughElements",
|
|
2369
|
+
NotEnoughSheets = "NotEnoughSheets",
|
|
2370
|
+
MissingSheetName = "MissingSheetName",
|
|
2371
|
+
UnchangedSheetName = "UnchangedSheetName",
|
|
2372
|
+
DuplicatedSheetName = "DuplicatedSheetName",
|
|
2373
|
+
DuplicatedSheetId = "DuplicatedSheetId",
|
|
2374
|
+
ForbiddenCharactersInSheetName = "ForbiddenCharactersInSheetName",
|
|
2375
|
+
WrongSheetMove = "WrongSheetMove",
|
|
2376
|
+
WrongSheetPosition = "WrongSheetPosition",
|
|
2377
|
+
InvalidAnchorZone = "InvalidAnchorZone",
|
|
2378
|
+
SelectionOutOfBound = "SelectionOutOfBound",
|
|
2379
|
+
TargetOutOfSheet = "TargetOutOfSheet",
|
|
2380
|
+
WrongCutSelection = "WrongCutSelection",
|
|
2381
|
+
WrongPasteSelection = "WrongPasteSelection",
|
|
2382
|
+
WrongPasteOption = "WrongPasteOption",
|
|
2383
|
+
WrongFigurePasteOption = "WrongFigurePasteOption",
|
|
2384
|
+
EmptyClipboard = "EmptyClipboard",
|
|
2385
|
+
EmptyRange = "EmptyRange",
|
|
2386
|
+
InvalidRange = "InvalidRange",
|
|
2387
|
+
InvalidZones = "InvalidZones",
|
|
2388
|
+
InvalidSheetId = "InvalidSheetId",
|
|
2389
|
+
InvalidFigureId = "InvalidFigureId",
|
|
2390
|
+
InputAlreadyFocused = "InputAlreadyFocused",
|
|
2391
|
+
MaximumRangesReached = "MaximumRangesReached",
|
|
2392
|
+
InvalidChartDefinition = "InvalidChartDefinition",
|
|
2393
|
+
InvalidDataSet = "InvalidDataSet",
|
|
2394
|
+
InvalidLabelRange = "InvalidLabelRange",
|
|
2395
|
+
InvalidScorecardKeyValue = "InvalidScorecardKeyValue",
|
|
2396
|
+
InvalidScorecardBaseline = "InvalidScorecardBaseline",
|
|
2397
|
+
InvalidGaugeDataRange = "InvalidGaugeDataRange",
|
|
2398
|
+
EmptyGaugeRangeMin = "EmptyGaugeRangeMin",
|
|
2399
|
+
GaugeRangeMinNaN = "GaugeRangeMinNaN",
|
|
2400
|
+
EmptyGaugeRangeMax = "EmptyGaugeRangeMax",
|
|
2401
|
+
GaugeRangeMaxNaN = "GaugeRangeMaxNaN",
|
|
2402
|
+
GaugeRangeMinBiggerThanRangeMax = "GaugeRangeMinBiggerThanRangeMax",
|
|
2403
|
+
GaugeLowerInflectionPointNaN = "GaugeLowerInflectionPointNaN",
|
|
2404
|
+
GaugeUpperInflectionPointNaN = "GaugeUpperInflectionPointNaN",
|
|
2405
|
+
GaugeLowerBiggerThanUpper = "GaugeLowerBiggerThanUpper",
|
|
2406
|
+
InvalidAutofillSelection = "InvalidAutofillSelection",
|
|
2407
|
+
WrongComposerSelection = "WrongComposerSelection",
|
|
2408
|
+
MinBiggerThanMax = "MinBiggerThanMax",
|
|
2409
|
+
LowerBiggerThanUpper = "LowerBiggerThanUpper",
|
|
2410
|
+
MidBiggerThanMax = "MidBiggerThanMax",
|
|
2411
|
+
MinBiggerThanMid = "MinBiggerThanMid",
|
|
2412
|
+
FirstArgMissing = "FirstArgMissing",
|
|
2413
|
+
SecondArgMissing = "SecondArgMissing",
|
|
2414
|
+
MinNaN = "MinNaN",
|
|
2415
|
+
MidNaN = "MidNaN",
|
|
2416
|
+
MaxNaN = "MaxNaN",
|
|
2417
|
+
ValueUpperInflectionNaN = "ValueUpperInflectionNaN",
|
|
2418
|
+
ValueLowerInflectionNaN = "ValueLowerInflectionNaN",
|
|
2419
|
+
MinInvalidFormula = "MinInvalidFormula",
|
|
2420
|
+
MidInvalidFormula = "MidInvalidFormula",
|
|
2421
|
+
MaxInvalidFormula = "MaxInvalidFormula",
|
|
2422
|
+
ValueUpperInvalidFormula = "ValueUpperInvalidFormula",
|
|
2423
|
+
ValueLowerInvalidFormula = "ValueLowerInvalidFormula",
|
|
2424
|
+
InvalidSortZone = "InvalidSortZone",
|
|
2425
|
+
WaitingSessionConfirmation = "WaitingSessionConfirmation",
|
|
2426
|
+
MergeOverlap = "MergeOverlap",
|
|
2427
|
+
TooManyHiddenElements = "TooManyHiddenElements",
|
|
2428
|
+
Readonly = "Readonly",
|
|
2429
|
+
InvalidViewportSize = "InvalidViewportSize",
|
|
2430
|
+
InvalidScrollingDirection = "InvalidScrollingDirection",
|
|
2431
|
+
FigureDoesNotExist = "FigureDoesNotExist",
|
|
2432
|
+
InvalidConditionalFormatId = "InvalidConditionalFormatId",
|
|
2433
|
+
InvalidCellPopover = "InvalidCellPopover",
|
|
2434
|
+
EmptyTarget = "EmptyTarget",
|
|
2435
|
+
InvalidFreezeQuantity = "InvalidFreezeQuantity",
|
|
2436
|
+
FrozenPaneOverlap = "FrozenPaneOverlap",
|
|
2437
|
+
ValuesNotChanged = "ValuesNotChanged",
|
|
2438
|
+
InvalidFilterZone = "InvalidFilterZone",
|
|
2439
|
+
FilterOverlap = "FilterOverlap",
|
|
2440
|
+
FilterNotFound = "FilterNotFound",
|
|
2441
|
+
MergeInFilter = "MergeInFilter",
|
|
2442
|
+
NonContinuousTargets = "NonContinuousTargets",
|
|
2443
|
+
DuplicatedFigureId = "DuplicatedFigureId",
|
|
2444
|
+
InvalidSelectionStep = "InvalidSelectionStep",
|
|
2445
|
+
DuplicatedChartId = "DuplicatedChartId",
|
|
2446
|
+
ChartDoesNotExist = "ChartDoesNotExist",
|
|
2447
|
+
InvalidHeaderIndex = "InvalidHeaderIndex",
|
|
2448
|
+
InvalidQuantity = "InvalidQuantity",
|
|
2449
|
+
MoreThanOneColumnSelected = "MoreThanOneColumnSelected",
|
|
2450
|
+
EmptySplitSeparator = "EmptySplitSeparator",
|
|
2451
|
+
SplitWillOverwriteContent = "SplitWillOverwriteContent",
|
|
2452
|
+
NoSplitSeparatorInSelection = "NoSplitSeparatorInSelection",
|
|
2453
|
+
NoActiveSheet = "NoActiveSheet",
|
|
2454
|
+
InvalidLocale = "InvalidLocale",
|
|
2455
|
+
AlreadyInPaintingFormatMode = "AlreadyInPaintingFormatMode",
|
|
2456
|
+
MoreThanOneRangeSelected = "MoreThanOneRangeSelected",
|
|
2457
|
+
NoColumnsProvided = "NoColumnsProvided",
|
|
2458
|
+
ColumnsNotIncludedInZone = "ColumnsNotIncludedInZone",
|
|
2459
|
+
DuplicatesColumnsSelected = "DuplicatesColumnsSelected",
|
|
2460
|
+
InvalidHeaderGroupStartEnd = "InvalidHeaderGroupStartEnd",
|
|
2461
|
+
HeaderGroupAlreadyExists = "HeaderGroupAlreadyExists",
|
|
2462
|
+
UnknownHeaderGroup = "UnknownHeaderGroup",
|
|
2463
|
+
UnknownDataValidationRule = "UnknownDataValidationRule",
|
|
2464
|
+
UnknownDataValidationCriterionType = "UnknownDataValidationCriterionType",
|
|
2465
|
+
InvalidDataValidationCriterionValue = "InvalidDataValidationCriterionValue",
|
|
2466
|
+
InvalidNumberOfCriterionValues = "InvalidNumberOfCriterionValues",
|
|
2467
|
+
BlockingValidationRule = "BlockingValidationRule"
|
|
2384
2468
|
}
|
|
2385
2469
|
interface CommandHandler<T> {
|
|
2386
2470
|
allowDispatch(command: T): CommandResult | CommandResult[];
|
|
@@ -2508,7 +2592,7 @@ interface CellPosition {
|
|
|
2508
2592
|
sheetId: UID;
|
|
2509
2593
|
}
|
|
2510
2594
|
declare const borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
|
|
2511
|
-
type BorderStyle = typeof borderStyles[number];
|
|
2595
|
+
type BorderStyle = (typeof borderStyles)[number];
|
|
2512
2596
|
type BorderDescr = {
|
|
2513
2597
|
style: BorderStyle;
|
|
2514
2598
|
color: Color;
|
|
@@ -2528,44 +2612,20 @@ interface Border$1 {
|
|
|
2528
2612
|
right?: BorderDescr;
|
|
2529
2613
|
}
|
|
2530
2614
|
type ReferenceDenormalizer = (range: Range, isMeta: boolean, functionName: string, paramNumber: number) => any | any[][];
|
|
2531
|
-
type EnsureRange = (range: Range) =>
|
|
2532
|
-
type _CompiledFormula = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) =>
|
|
2615
|
+
type EnsureRange = (range: Range) => Matrix<ValueAndFormat>;
|
|
2616
|
+
type _CompiledFormula = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => Matrix<ValueAndFormat> | ValueAndFormat;
|
|
2533
2617
|
interface CompiledFormula {
|
|
2534
2618
|
execute: _CompiledFormula;
|
|
2535
2619
|
tokens: Token[];
|
|
2536
2620
|
dependencies: string[];
|
|
2537
2621
|
}
|
|
2538
2622
|
type Matrix<T = unknown> = T[][];
|
|
2539
|
-
type
|
|
2540
|
-
type MatrixArg = {
|
|
2541
|
-
value: MatrixArgValue;
|
|
2542
|
-
format?: MatrixArgFormat;
|
|
2543
|
-
};
|
|
2544
|
-
type PrimitiveArg = {
|
|
2545
|
-
value: PrimitiveArgValue;
|
|
2546
|
-
format?: PrimitiveFormat;
|
|
2547
|
-
};
|
|
2548
|
-
type ArgValue = PrimitiveArgValue | MatrixArgValue;
|
|
2549
|
-
type MatrixArgValue = Matrix<CellValue | undefined>;
|
|
2550
|
-
type PrimitiveArgValue = CellValue | null;
|
|
2551
|
-
type MatrixArgFormat = Matrix<PrimitiveFormat>;
|
|
2552
|
-
type PrimitiveFormat = Format | undefined;
|
|
2553
|
-
type FunctionReturn = MatrixFunctionReturn | PrimitiveFunctionReturn;
|
|
2554
|
-
type FunctionReturnValue = CellValue | Matrix<CellValue>;
|
|
2555
|
-
type FunctionReturnFormat = PrimitiveFormat | MatrixArgFormat;
|
|
2556
|
-
type MatrixFunctionReturn = {
|
|
2557
|
-
value: Matrix<CellValue>;
|
|
2558
|
-
format?: FunctionReturnFormat;
|
|
2559
|
-
};
|
|
2560
|
-
type PrimitiveFunctionReturn = {
|
|
2623
|
+
type ValueAndFormat = {
|
|
2561
2624
|
value: CellValue;
|
|
2562
|
-
format?:
|
|
2563
|
-
};
|
|
2564
|
-
type FormulaReturn = MatrixFunctionReturn | PrimitiveFormulaReturn;
|
|
2565
|
-
type PrimitiveFormulaReturn = {
|
|
2566
|
-
value: CellValue | null;
|
|
2567
|
-
format?: PrimitiveFormat;
|
|
2625
|
+
format?: Format;
|
|
2568
2626
|
};
|
|
2627
|
+
type Arg = Maybe<ValueAndFormat> | Matrix<ValueAndFormat>;
|
|
2628
|
+
type ArgValue = Maybe<CellValue> | Matrix<CellValue>;
|
|
2569
2629
|
interface HeaderDimensions {
|
|
2570
2630
|
start: Pixel;
|
|
2571
2631
|
size: Pixel;
|
|
@@ -2648,6 +2708,7 @@ interface Lazy<T> {
|
|
|
2648
2708
|
*/
|
|
2649
2709
|
map: <U>(callback: (value: T) => U) => Lazy<U>;
|
|
2650
2710
|
}
|
|
2711
|
+
type Maybe<T> = T | undefined;
|
|
2651
2712
|
interface Cloneable<T> {
|
|
2652
2713
|
clone: (args?: Partial<T>) => T;
|
|
2653
2714
|
}
|
|
@@ -2669,6 +2730,13 @@ type ImmutableSet<T> = ReadonlySet<Immutable<T>>;
|
|
|
2669
2730
|
type ImmutableObject<T> = {
|
|
2670
2731
|
readonly [K in keyof T]: Immutable<T[K]>;
|
|
2671
2732
|
};
|
|
2733
|
+
interface HeaderGroup {
|
|
2734
|
+
start: HeaderIndex;
|
|
2735
|
+
end: HeaderIndex;
|
|
2736
|
+
isFolded?: boolean;
|
|
2737
|
+
}
|
|
2738
|
+
type Direction$1 = "up" | "down" | "left" | "right";
|
|
2739
|
+
type SelectionStep = number | "end";
|
|
2672
2740
|
|
|
2673
2741
|
type LocaleCode = string & Alias;
|
|
2674
2742
|
interface Locale {
|
|
@@ -2719,7 +2787,7 @@ interface EvaluatedCellProperties {
|
|
|
2719
2787
|
readonly isAutoSummable: boolean;
|
|
2720
2788
|
readonly link?: Link;
|
|
2721
2789
|
}
|
|
2722
|
-
type CellValue = string | number | boolean;
|
|
2790
|
+
type CellValue = string | number | boolean | null;
|
|
2723
2791
|
type EvaluatedCell = NumberCell | TextCell | BooleanCell | EmptyCell | ErrorCell;
|
|
2724
2792
|
interface NumberCell extends EvaluatedCellProperties {
|
|
2725
2793
|
readonly type: CellValueType.number;
|
|
@@ -2821,6 +2889,123 @@ interface Currency {
|
|
|
2821
2889
|
position: "before" | "after";
|
|
2822
2890
|
}
|
|
2823
2891
|
|
|
2892
|
+
interface DataValidationRule {
|
|
2893
|
+
id: UID;
|
|
2894
|
+
criterion: DataValidationCriterion;
|
|
2895
|
+
ranges: Range[];
|
|
2896
|
+
isBlocking?: boolean;
|
|
2897
|
+
}
|
|
2898
|
+
type TextContainsCriterion = {
|
|
2899
|
+
type: "textContains";
|
|
2900
|
+
values: string[];
|
|
2901
|
+
};
|
|
2902
|
+
type TextNotContainsCriterion = {
|
|
2903
|
+
type: "textNotContains";
|
|
2904
|
+
values: string[];
|
|
2905
|
+
};
|
|
2906
|
+
type TextIsCriterion = {
|
|
2907
|
+
type: "textIs";
|
|
2908
|
+
values: string[];
|
|
2909
|
+
};
|
|
2910
|
+
type TextIsEmailCriterion = {
|
|
2911
|
+
type: "textIsEmail";
|
|
2912
|
+
values: string[];
|
|
2913
|
+
};
|
|
2914
|
+
type TextIsLinkCriterion = {
|
|
2915
|
+
type: "textIsLink";
|
|
2916
|
+
values: string[];
|
|
2917
|
+
};
|
|
2918
|
+
type DateIsCriterion = {
|
|
2919
|
+
type: "dateIs";
|
|
2920
|
+
dateValue: DateCriterionValue;
|
|
2921
|
+
values: string[];
|
|
2922
|
+
};
|
|
2923
|
+
type DateIsBeforeCriterion = {
|
|
2924
|
+
type: "dateIsBefore";
|
|
2925
|
+
dateValue: DateCriterionValue;
|
|
2926
|
+
values: string[];
|
|
2927
|
+
};
|
|
2928
|
+
type DateIsOnOrBeforeCriterion = {
|
|
2929
|
+
type: "dateIsOnOrBefore";
|
|
2930
|
+
dateValue: DateCriterionValue;
|
|
2931
|
+
values: string[];
|
|
2932
|
+
};
|
|
2933
|
+
type DateIsAfterCriterion = {
|
|
2934
|
+
type: "dateIsAfter";
|
|
2935
|
+
dateValue: DateCriterionValue;
|
|
2936
|
+
values: string[];
|
|
2937
|
+
};
|
|
2938
|
+
type DateIsOnOrAfterCriterion = {
|
|
2939
|
+
type: "dateIsOnOrAfter";
|
|
2940
|
+
dateValue: DateCriterionValue;
|
|
2941
|
+
values: string[];
|
|
2942
|
+
};
|
|
2943
|
+
type DateIsBetweenCriterion = {
|
|
2944
|
+
type: "dateIsBetween";
|
|
2945
|
+
values: string[];
|
|
2946
|
+
};
|
|
2947
|
+
type DateIsNotBetweenCriterion = {
|
|
2948
|
+
type: "dateIsNotBetween";
|
|
2949
|
+
values: string[];
|
|
2950
|
+
};
|
|
2951
|
+
type DateIsValidCriterion = {
|
|
2952
|
+
type: "dateIsValid";
|
|
2953
|
+
values: string[];
|
|
2954
|
+
};
|
|
2955
|
+
type IsEqualCriterion = {
|
|
2956
|
+
type: "isEqual";
|
|
2957
|
+
values: string[];
|
|
2958
|
+
};
|
|
2959
|
+
type IsNotEqualCriterion = {
|
|
2960
|
+
type: "isNotEqual";
|
|
2961
|
+
values: string[];
|
|
2962
|
+
};
|
|
2963
|
+
type IsGreaterThanCriterion = {
|
|
2964
|
+
type: "isGreaterThan";
|
|
2965
|
+
values: string[];
|
|
2966
|
+
};
|
|
2967
|
+
type IsGreaterOrEqualToCriterion = {
|
|
2968
|
+
type: "isGreaterOrEqualTo";
|
|
2969
|
+
values: string[];
|
|
2970
|
+
};
|
|
2971
|
+
type IsLessThanCriterion = {
|
|
2972
|
+
type: "isLessThan";
|
|
2973
|
+
values: string[];
|
|
2974
|
+
};
|
|
2975
|
+
type IsLessOrEqualToCriterion = {
|
|
2976
|
+
type: "isLessOrEqualTo";
|
|
2977
|
+
values: string[];
|
|
2978
|
+
};
|
|
2979
|
+
type IsBetweenCriterion = {
|
|
2980
|
+
type: "isBetween";
|
|
2981
|
+
values: string[];
|
|
2982
|
+
};
|
|
2983
|
+
type IsNotBetweenCriterion = {
|
|
2984
|
+
type: "isNotBetween";
|
|
2985
|
+
values: string[];
|
|
2986
|
+
};
|
|
2987
|
+
type IsCheckboxCriterion = {
|
|
2988
|
+
type: "isBoolean";
|
|
2989
|
+
values: string[];
|
|
2990
|
+
};
|
|
2991
|
+
type IsValueInListCriterion = {
|
|
2992
|
+
type: "isValueInList";
|
|
2993
|
+
values: string[];
|
|
2994
|
+
displayStyle: "arrow" | "plainText";
|
|
2995
|
+
};
|
|
2996
|
+
type IsValueInRangeCriterion = {
|
|
2997
|
+
type: "isValueInRange";
|
|
2998
|
+
values: string[];
|
|
2999
|
+
displayStyle: "arrow" | "plainText";
|
|
3000
|
+
};
|
|
3001
|
+
type CustomFormulaCriterion = {
|
|
3002
|
+
type: "customFormula";
|
|
3003
|
+
values: string[];
|
|
3004
|
+
};
|
|
3005
|
+
type DataValidationCriterion = TextContainsCriterion | TextNotContainsCriterion | TextIsCriterion | TextIsEmailCriterion | TextIsLinkCriterion | IsBetweenCriterion | DateIsCriterion | DateIsBeforeCriterion | DateIsOnOrBeforeCriterion | DateIsAfterCriterion | DateIsOnOrAfterCriterion | DateIsBetweenCriterion | DateIsNotBetweenCriterion | DateIsValidCriterion | IsEqualCriterion | IsNotEqualCriterion | IsGreaterThanCriterion | IsGreaterOrEqualToCriterion | IsLessThanCriterion | IsLessOrEqualToCriterion | IsNotBetweenCriterion | IsCheckboxCriterion | IsValueInListCriterion | IsValueInRangeCriterion | CustomFormulaCriterion;
|
|
3006
|
+
type DateCriterionValue = "today" | "tomorrow" | "yesterday" | "lastWeek" | "lastMonth" | "lastYear" | "exactDate";
|
|
3007
|
+
type DataValidationCriterionType = DataValidationCriterion["type"];
|
|
3008
|
+
|
|
2824
3009
|
type ClipboardReadResult = {
|
|
2825
3010
|
status: "ok";
|
|
2826
3011
|
content: string;
|
|
@@ -2833,28 +3018,16 @@ interface ClipboardInterface {
|
|
|
2833
3018
|
readText(): Promise<ClipboardReadResult>;
|
|
2834
3019
|
}
|
|
2835
3020
|
|
|
2836
|
-
type
|
|
2837
|
-
[key: string]: string;
|
|
2838
|
-
}]) => string;
|
|
2839
|
-
/***
|
|
2840
|
-
* Allow to inject a translation function from outside o-spreadsheet.
|
|
2841
|
-
* @param tfn the function that will do the translation
|
|
2842
|
-
*/
|
|
2843
|
-
declare function setTranslationMethod(tfn: TranslationFunction): void;
|
|
2844
|
-
|
|
2845
|
-
interface EditTextOptions {
|
|
2846
|
-
error?: string;
|
|
2847
|
-
placeholder?: string;
|
|
2848
|
-
}
|
|
3021
|
+
type NotificationType = "danger" | "info" | "success" | "warning";
|
|
2849
3022
|
interface InformationNotification {
|
|
2850
3023
|
text: string;
|
|
2851
|
-
|
|
3024
|
+
type: NotificationType;
|
|
3025
|
+
sticky: boolean;
|
|
2852
3026
|
}
|
|
2853
3027
|
interface SpreadsheetEnv {
|
|
2854
3028
|
notifyUser: (notification: InformationNotification) => any;
|
|
2855
3029
|
raiseError: (text: string, callback?: () => void) => any;
|
|
2856
3030
|
askConfirmation: (content: string, confirm: () => any, cancel?: () => any) => any;
|
|
2857
|
-
editText: (title: string, callback: (text: string | null) => any, options?: EditTextOptions) => any;
|
|
2858
3031
|
}
|
|
2859
3032
|
interface SpreadsheetChildEnv extends SpreadsheetEnv {
|
|
2860
3033
|
model: Model;
|
|
@@ -2863,8 +3036,7 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
|
|
|
2863
3036
|
openSidePanel: (panel: string, panelProps?: any) => void;
|
|
2864
3037
|
toggleSidePanel: (panel: string, panelProps?: any) => void;
|
|
2865
3038
|
clipboard: ClipboardInterface;
|
|
2866
|
-
|
|
2867
|
-
startCellEdition: (content: string) => void;
|
|
3039
|
+
startCellEdition: (content?: string) => void;
|
|
2868
3040
|
loadCurrencies?: () => Promise<Currency[]>;
|
|
2869
3041
|
loadLocales: () => Promise<Locale[]>;
|
|
2870
3042
|
}
|
|
@@ -2880,24 +3052,32 @@ interface ArgDefinition {
|
|
|
2880
3052
|
default?: boolean;
|
|
2881
3053
|
defaultValue?: any;
|
|
2882
3054
|
}
|
|
2883
|
-
type ComputeFunctionArg<T> = T | (() => T)
|
|
3055
|
+
type ComputeFunctionArg<T> = T | (() => T);
|
|
2884
3056
|
type ComputeFunction<T, R> = (this: EvalContext, ...args: ComputeFunctionArg<T>[]) => R;
|
|
2885
|
-
interface
|
|
3057
|
+
interface AddFunctionDescriptionBase {
|
|
2886
3058
|
description: string;
|
|
2887
|
-
compute: ComputeFunction<ArgValue, FunctionReturnValue>;
|
|
2888
|
-
computeFormat?: ComputeFunction<Arg, FunctionReturnFormat>;
|
|
2889
3059
|
category?: string;
|
|
2890
3060
|
args: ArgDefinition[];
|
|
2891
3061
|
returns: [ArgType];
|
|
2892
3062
|
isExported?: boolean;
|
|
2893
3063
|
hidden?: boolean;
|
|
2894
3064
|
}
|
|
2895
|
-
interface
|
|
3065
|
+
interface ComputeValue {
|
|
3066
|
+
compute: ComputeFunction<ArgValue, CellValue | Matrix<CellValue>>;
|
|
3067
|
+
}
|
|
3068
|
+
interface ComputeFormat {
|
|
3069
|
+
computeFormat: ComputeFunction<Arg, Format | undefined | Matrix<Format | undefined>>;
|
|
3070
|
+
}
|
|
3071
|
+
interface ComputeValueAndFormat {
|
|
3072
|
+
computeValueAndFormat: ComputeFunction<Arg, Matrix<ValueAndFormat> | ValueAndFormat>;
|
|
3073
|
+
}
|
|
3074
|
+
type AddFunctionDescription = (AddFunctionDescriptionBase & ComputeValue & Partial<ComputeFormat>) | (AddFunctionDescriptionBase & ComputeValueAndFormat);
|
|
3075
|
+
type FunctionDescription = AddFunctionDescription & {
|
|
2896
3076
|
minArgRequired: number;
|
|
2897
3077
|
maxArgPossible: number;
|
|
2898
3078
|
nbrArgRepeating: number;
|
|
2899
3079
|
getArgToFocus: (argPosition: number) => number;
|
|
2900
|
-
}
|
|
3080
|
+
};
|
|
2901
3081
|
type EvalContext = {
|
|
2902
3082
|
__lastFnCalled?: string;
|
|
2903
3083
|
__originCellXC?: () => string;
|
|
@@ -2978,7 +3158,7 @@ interface CorePluginConstructor {
|
|
|
2978
3158
|
* persisted state.
|
|
2979
3159
|
* They should not be concerned about UI parts or transient state.
|
|
2980
3160
|
*/
|
|
2981
|
-
declare class CorePlugin<State = any
|
|
3161
|
+
declare class CorePlugin<State = any> extends BasePlugin<State, CoreCommand> implements RangeProvider {
|
|
2982
3162
|
protected getters: CoreGetters;
|
|
2983
3163
|
protected uuidGenerator: UuidGenerator;
|
|
2984
3164
|
constructor({ getters, stateObserver, range, dispatch, uuidGenerator }: CorePluginConfig);
|
|
@@ -3128,7 +3308,7 @@ interface CoreState {
|
|
|
3128
3308
|
* cell and sheet content.
|
|
3129
3309
|
*/
|
|
3130
3310
|
declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
|
|
3131
|
-
static getters: readonly ["zoneToXC", "getCells", "getFormulaCellContent", "
|
|
3311
|
+
static getters: readonly ["zoneToXC", "getCells", "getFormulaCellContent", "getTranslatedCellFormula", "getCellStyle", "getCellById"];
|
|
3132
3312
|
readonly nextId = 1;
|
|
3133
3313
|
readonly cells: {
|
|
3134
3314
|
[sheetId: string]: {
|
|
@@ -3158,14 +3338,15 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
|
|
|
3158
3338
|
[key: number]: Format;
|
|
3159
3339
|
}): Cell;
|
|
3160
3340
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
3341
|
+
private removeDefaultStyleValues;
|
|
3161
3342
|
getCells(sheetId: UID): Record<UID, Cell>;
|
|
3162
3343
|
/**
|
|
3163
3344
|
* get a cell by ID. Used in evaluation when evaluating an async cell, we need to be able to find it back after
|
|
3164
3345
|
* starting an async evaluation even if it has been moved or re-allocated
|
|
3165
3346
|
*/
|
|
3166
3347
|
getCellById(cellId: UID): Cell | undefined;
|
|
3167
|
-
|
|
3168
|
-
|
|
3348
|
+
getFormulaCellContent(sheetId: UID, cell: Pick<FormulaCell, "dependencies" | "compiledFormula">, dependencies?: Range[]): string;
|
|
3349
|
+
getTranslatedCellFormula(sheetId: UID, offsetX: number, offsetY: number, compiledFormula: CompiledFormula, dependencies: Range[]): string;
|
|
3169
3350
|
getCellStyle(position: CellPosition): Style;
|
|
3170
3351
|
/**
|
|
3171
3352
|
* Converts a zone to a XC coordinate system
|
|
@@ -3337,7 +3518,7 @@ declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState>
|
|
|
3337
3518
|
* Add or replace a conditional format rule
|
|
3338
3519
|
*/
|
|
3339
3520
|
private addConditionalFormatting;
|
|
3340
|
-
private
|
|
3521
|
+
private checkValidPriorityChange;
|
|
3341
3522
|
private checkEmptyRange;
|
|
3342
3523
|
private checkCFRule;
|
|
3343
3524
|
private checkOperatorArgsNumber;
|
|
@@ -3350,7 +3531,36 @@ declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState>
|
|
|
3350
3531
|
private checkMidBiggerThanMax;
|
|
3351
3532
|
private checkMinBiggerThanMid;
|
|
3352
3533
|
private removeConditionalFormatting;
|
|
3353
|
-
private
|
|
3534
|
+
private changeCFPriority;
|
|
3535
|
+
}
|
|
3536
|
+
|
|
3537
|
+
interface DataValidationState {
|
|
3538
|
+
readonly rules: {
|
|
3539
|
+
[sheet: string]: DataValidationRule[];
|
|
3540
|
+
};
|
|
3541
|
+
}
|
|
3542
|
+
declare class DataValidationPlugin extends CorePlugin<DataValidationState> implements DataValidationState {
|
|
3543
|
+
static getters: readonly ["cellHasListDataValidationIcon", "getDataValidationRule", "getDataValidationRules", "getValidationRuleForCell"];
|
|
3544
|
+
readonly rules: {
|
|
3545
|
+
[sheet: string]: DataValidationRule[];
|
|
3546
|
+
};
|
|
3547
|
+
adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
|
|
3548
|
+
private loopThroughRangesOfSheet;
|
|
3549
|
+
allowDispatch(cmd: Command): CommandResult | CommandResult[];
|
|
3550
|
+
handle(cmd: CoreCommand): void;
|
|
3551
|
+
getDataValidationRules(sheetId: UID): DataValidationRule[];
|
|
3552
|
+
getDataValidationRule(sheetId: UID, id: UID): DataValidationRule | undefined;
|
|
3553
|
+
getValidationRuleForCell({ sheetId, col, row }: CellPosition): DataValidationRule | undefined;
|
|
3554
|
+
cellHasListDataValidationIcon(cellPosition: CellPosition): boolean;
|
|
3555
|
+
private addDataValidationRule;
|
|
3556
|
+
private removeRangesFromRules;
|
|
3557
|
+
private removeDataValidationRule;
|
|
3558
|
+
private setCenterStyleToBooleanCells;
|
|
3559
|
+
import(data: WorkbookData): void;
|
|
3560
|
+
export(data: Partial<WorkbookData>): void;
|
|
3561
|
+
private checkCriterionTypeIsValid;
|
|
3562
|
+
private checkCriterionHasValidNumberOfValues;
|
|
3563
|
+
private checkCriterionValuesAreValid;
|
|
3354
3564
|
}
|
|
3355
3565
|
|
|
3356
3566
|
interface FigureState {
|
|
@@ -3441,6 +3651,85 @@ declare class FiltersPlugin extends CorePlugin<FiltersState> implements FiltersS
|
|
|
3441
3651
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
3442
3652
|
}
|
|
3443
3653
|
|
|
3654
|
+
interface State$7 {
|
|
3655
|
+
groups: Record<UID, Record<Dimension, HeaderGroup[]>>;
|
|
3656
|
+
}
|
|
3657
|
+
declare class HeaderGroupingPlugin extends CorePlugin<State$7> {
|
|
3658
|
+
static getters: readonly ["getHeaderGroups", "getGroupsLayers", "getVisibleGroupLayers", "getHeaderGroup", "getHeaderGroupsInZone", "isGroupFolded", "isRowFolded", "isColFolded"];
|
|
3659
|
+
private readonly groups;
|
|
3660
|
+
allowDispatch(cmd: CoreCommand): CommandResult;
|
|
3661
|
+
handle(cmd: CoreCommand): void;
|
|
3662
|
+
getHeaderGroups(sheetId: UID, dim: Dimension): HeaderGroup[];
|
|
3663
|
+
getHeaderGroup(sheetId: UID, dim: Dimension, start: number, end: number): HeaderGroup | undefined;
|
|
3664
|
+
getHeaderGroupsInZone(sheetId: UID, dim: Dimension, zone: Zone): HeaderGroup[];
|
|
3665
|
+
/**
|
|
3666
|
+
* Get all the groups of a sheet in a dimension, and return an array of layers of those groups.
|
|
3667
|
+
*
|
|
3668
|
+
* The layering rules are:
|
|
3669
|
+
* 1) A group containing another group should be on a layer above the group it contains
|
|
3670
|
+
* 2) The widest/highest groups should be on the left/top layer compared to the groups it contains
|
|
3671
|
+
* 3) The group should be on the left/top-most layer possible, barring intersections with other groups (see rules 1 and 2)
|
|
3672
|
+
*/
|
|
3673
|
+
getGroupsLayers(sheetId: UID, dimension: Dimension): HeaderGroup[][];
|
|
3674
|
+
/**
|
|
3675
|
+
* Get all the groups of a sheet in a dimension, and return an array of layers of those groups,
|
|
3676
|
+
* excluding the groups that are totally hidden.
|
|
3677
|
+
*/
|
|
3678
|
+
getVisibleGroupLayers(sheetId: UID, dimension: Dimension): HeaderGroup[][];
|
|
3679
|
+
isGroupFolded(sheetId: UID, dimension: Dimension, start: number, end: number): boolean;
|
|
3680
|
+
isRowFolded(sheetId: UID, row: HeaderIndex): boolean;
|
|
3681
|
+
isColFolded(sheetId: UID, col: HeaderIndex): boolean;
|
|
3682
|
+
private getGroupId;
|
|
3683
|
+
/**
|
|
3684
|
+
* To get layers of groups, and to add/remove headers from groups, we can see each header of a group as a brick. Each
|
|
3685
|
+
* brick falls down in the pile corresponding to its header, until it hits another brick, or the ground.
|
|
3686
|
+
*
|
|
3687
|
+
* With this abstraction, we can very simply group/ungroup headers from groups, and get the layers of groups.
|
|
3688
|
+
* - grouping headers is done by adding a brick to each header pile
|
|
3689
|
+
* - un-grouping headers is done by removing a brick from each header pile
|
|
3690
|
+
* - getting the layers of groups is done by simply letting the brick fall and checking the result
|
|
3691
|
+
*
|
|
3692
|
+
* Example:
|
|
3693
|
+
* We have 2 groups ([A=>E] and [C=>D]), and we want to group headers [C=>F]
|
|
3694
|
+
*
|
|
3695
|
+
* Headers : A B C D E F G A B C D E F G A B C D E F G
|
|
3696
|
+
* Headers to group: [C=>D]: _ _ [C=>F]: _ _ _ _
|
|
3697
|
+
* | | ==> | | | | ==> ==> Result: 3 groups
|
|
3698
|
+
* | | ˅ ˅ | | _ _ - [C=>D]
|
|
3699
|
+
* Groups: ˅ ˅ _ _ ˅ | _ _ _ - [C=>E]
|
|
3700
|
+
* Groups: _ _ _ _ _ _ _ _ _ _ ˅ _ _ _ _ _ _ - [A=>F]
|
|
3701
|
+
|
|
3702
|
+
* @param groups
|
|
3703
|
+
* @param start start of the range where to add/remove headers
|
|
3704
|
+
* @param end end of the range where to add/remove headers
|
|
3705
|
+
* @param delta -1: remove headers, 1: add headers, 0: get layers (don't add/remove anything)
|
|
3706
|
+
*/
|
|
3707
|
+
private bricksFallingAlgorithm;
|
|
3708
|
+
private groupHeaders;
|
|
3709
|
+
/**
|
|
3710
|
+
* Ungroup the given headers. The headers will be taken out of the group they are in. This might split a group into two
|
|
3711
|
+
* if the headers were in the middle of a group. If multiple groups contains a header, it will only be taken out of the
|
|
3712
|
+
* lowest group in the layering of the groups.
|
|
3713
|
+
*/
|
|
3714
|
+
private unGroupHeaders;
|
|
3715
|
+
private moveGroupsOnHeaderInsertion;
|
|
3716
|
+
private moveGroupsOnHeaderDeletion;
|
|
3717
|
+
private doGroupOverlap;
|
|
3718
|
+
private removeDuplicateGroups;
|
|
3719
|
+
private findGroupWithStartEnd;
|
|
3720
|
+
/**
|
|
3721
|
+
* Fold the given group, and all the groups starting at the same index that are contained inside the given group.
|
|
3722
|
+
*/
|
|
3723
|
+
private foldHeaderGroup;
|
|
3724
|
+
/**
|
|
3725
|
+
* Unfold the given group, and all the groups starting at the same index that contain the given group.
|
|
3726
|
+
*/
|
|
3727
|
+
private unfoldHeaderGroup;
|
|
3728
|
+
private getGroupIndex;
|
|
3729
|
+
import(data: WorkbookData): void;
|
|
3730
|
+
export(data: WorkbookData): void;
|
|
3731
|
+
}
|
|
3732
|
+
|
|
3444
3733
|
interface HeaderSizeState$1 {
|
|
3445
3734
|
sizes: Record<UID, Record<Dimension, Array<Pixel | undefined>>>;
|
|
3446
3735
|
}
|
|
@@ -3462,11 +3751,12 @@ declare class HeaderSizePlugin extends CorePlugin<HeaderSizeState$1> implements
|
|
|
3462
3751
|
}
|
|
3463
3752
|
|
|
3464
3753
|
declare class HeaderVisibilityPlugin extends CorePlugin {
|
|
3465
|
-
static getters: readonly ["
|
|
3754
|
+
static getters: readonly ["checkElementsIncludeAllVisibleHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isHeaderHiddenByUser", "isRowHiddenByUser", "isColHiddenByUser"];
|
|
3466
3755
|
private readonly hiddenHeaders;
|
|
3467
3756
|
allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements | CommandResult.InvalidHeaderIndex;
|
|
3468
3757
|
handle(cmd: Command): void;
|
|
3469
|
-
|
|
3758
|
+
checkElementsIncludeAllVisibleHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
|
|
3759
|
+
isHeaderHiddenByUser(sheetId: UID, dimension: Dimension, index: HeaderIndex): boolean;
|
|
3470
3760
|
isRowHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
|
|
3471
3761
|
isColHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
|
|
3472
3762
|
getHiddenColsGroups(sheetId: UID): ConsecutiveIndexes[];
|
|
@@ -3512,7 +3802,7 @@ interface MergeState {
|
|
|
3512
3802
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
3513
3803
|
}
|
|
3514
3804
|
declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
|
|
3515
|
-
static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "getBottomLeftCell", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "getSelectionRangeString"];
|
|
3805
|
+
static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "getBottomLeftCell", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "getSelectionRangeString", "isMainCellPosition"];
|
|
3516
3806
|
private nextId;
|
|
3517
3807
|
readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
|
|
3518
3808
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
@@ -3552,6 +3842,7 @@ declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
|
|
|
3552
3842
|
* Check if the zone represents a single cell or a single merge.
|
|
3553
3843
|
*/
|
|
3554
3844
|
isSingleCellOrMerge(sheetId: UID, zone: Zone): boolean;
|
|
3845
|
+
isMainCellPosition(position: CellPosition): boolean;
|
|
3555
3846
|
/**
|
|
3556
3847
|
* Return true if the current selection requires losing state if it is merged.
|
|
3557
3848
|
* This happens when there is some textual content in other cells than the
|
|
@@ -3596,14 +3887,14 @@ declare class SettingsPlugin extends CorePlugin {
|
|
|
3596
3887
|
export(data: WorkbookData): void;
|
|
3597
3888
|
}
|
|
3598
3889
|
|
|
3599
|
-
interface SheetState
|
|
3890
|
+
interface SheetState {
|
|
3600
3891
|
readonly sheets: Record<UID, Sheet | undefined>;
|
|
3601
3892
|
readonly orderedSheetIds: UID[];
|
|
3602
3893
|
readonly sheetIdsMapName: Record<string, UID | undefined>;
|
|
3603
3894
|
readonly cellPosition: Record<UID, CellPosition | undefined>;
|
|
3604
3895
|
}
|
|
3605
|
-
declare class SheetPlugin extends CorePlugin<SheetState
|
|
3606
|
-
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "isEmpty", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone"];
|
|
3896
|
+
declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
3897
|
+
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "isEmpty", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone", "checkElementsIncludeAllNonFrozenHeaders"];
|
|
3607
3898
|
readonly sheetIdsMapName: Record<string, UID | undefined>;
|
|
3608
3899
|
readonly orderedSheetIds: UID[];
|
|
3609
3900
|
readonly sheets: Record<UID, Sheet | undefined>;
|
|
@@ -3631,6 +3922,7 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
|
|
|
3631
3922
|
getVisibleSheetIds(): UID[];
|
|
3632
3923
|
getEvaluationSheets(): Record<UID, Sheet | undefined>;
|
|
3633
3924
|
doesHeaderExist(sheetId: UID, dimension: Dimension, index: number): boolean;
|
|
3925
|
+
doesHeadersExist(sheetId: UID, dimension: Dimension, headerIndexes: HeaderIndex[]): boolean;
|
|
3634
3926
|
getRow(sheetId: UID, index: HeaderIndex): Row;
|
|
3635
3927
|
getCell({ sheetId, col, row }: CellPosition): Cell | undefined;
|
|
3636
3928
|
getColsZone(sheetId: UID, start: HeaderIndex, end: HeaderIndex): Zone;
|
|
@@ -3646,6 +3938,11 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
|
|
|
3646
3938
|
getUnboundedZone(sheetId: UID, zone: Zone): UnboundedZone;
|
|
3647
3939
|
getPaneDivisions(sheetId: UID): Readonly<PaneDivision>;
|
|
3648
3940
|
private setPaneDivisions;
|
|
3941
|
+
/**
|
|
3942
|
+
* Checks if all non-frozen header indices are present in the provided elements of selected rows/columns.
|
|
3943
|
+
* This validation ensures that all rows or columns cannot be deleted when frozen panes exist.
|
|
3944
|
+
*/
|
|
3945
|
+
checkElementsIncludeAllNonFrozenHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
|
|
3649
3946
|
/**
|
|
3650
3947
|
* Check if a zone only contains empty cells
|
|
3651
3948
|
*/
|
|
@@ -3867,6 +4164,43 @@ declare class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
3867
4164
|
private rulePredicate;
|
|
3868
4165
|
}
|
|
3869
4166
|
|
|
4167
|
+
interface InvalidValidationResult {
|
|
4168
|
+
readonly isValid: false;
|
|
4169
|
+
readonly rule: DataValidationRule;
|
|
4170
|
+
readonly error: string;
|
|
4171
|
+
}
|
|
4172
|
+
interface ValidValidationResult {
|
|
4173
|
+
readonly isValid: true;
|
|
4174
|
+
}
|
|
4175
|
+
type ValidationResult = ValidValidationResult | InvalidValidationResult;
|
|
4176
|
+
type SheetValidationResult = {
|
|
4177
|
+
[col: HeaderIndex]: Array<Lazy<ValidationResult>>;
|
|
4178
|
+
};
|
|
4179
|
+
declare class EvaluationDataValidationPlugin extends UIPlugin {
|
|
4180
|
+
static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getDataValidationCheckBoxCellPositions", "getDataValidationListCellsPositions", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "isCellValidCheckbox", "isDataValidationInvalid"];
|
|
4181
|
+
validationResults: Record<UID, SheetValidationResult>;
|
|
4182
|
+
handle(cmd: CoreViewCommand): void;
|
|
4183
|
+
isDataValidationInvalid(cellPosition: CellPosition): boolean;
|
|
4184
|
+
getInvalidDataValidationMessage(cellPosition: CellPosition): string | undefined;
|
|
4185
|
+
/**
|
|
4186
|
+
* Check if the value is valid for the given criterion, and return an error message if not.
|
|
4187
|
+
*
|
|
4188
|
+
* The value must be canonicalized.
|
|
4189
|
+
*/
|
|
4190
|
+
getDataValidationInvalidCriterionValueMessage(criterionType: DataValidationCriterionType, value: string): string | undefined;
|
|
4191
|
+
isCellValidCheckbox(cellPosition: CellPosition): boolean;
|
|
4192
|
+
/** Get the validation result if the cell on the given position had the given value */
|
|
4193
|
+
getValidationResultForCellValue(cellValue: CellValue, cellPosition: CellPosition): ValidationResult;
|
|
4194
|
+
getDataValidationCheckBoxCellPositions(): CellPosition[];
|
|
4195
|
+
getDataValidationListCellsPositions(): CellPosition[];
|
|
4196
|
+
private getValidationResultForCell;
|
|
4197
|
+
private computeSheetValidationResults;
|
|
4198
|
+
private getRuleErrorForCellValue;
|
|
4199
|
+
/** Get the offset of the cell inside the ranges of the rule. Throws an error if the cell isn't inside the rule. */
|
|
4200
|
+
private getCellOffsetInRule;
|
|
4201
|
+
private getEvaluatedCriterionValues;
|
|
4202
|
+
}
|
|
4203
|
+
|
|
3870
4204
|
interface HeaderSizeState {
|
|
3871
4205
|
tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
3872
4206
|
}
|
|
@@ -3944,6 +4278,7 @@ declare class AutofillPlugin extends UIPlugin {
|
|
|
3944
4278
|
private getDirection;
|
|
3945
4279
|
private autoFillMerge;
|
|
3946
4280
|
private autofillCF;
|
|
4281
|
+
private autofillDV;
|
|
3947
4282
|
drawGrid(renderingContext: GridRenderingContext): void;
|
|
3948
4283
|
}
|
|
3949
4284
|
|
|
@@ -4210,8 +4545,7 @@ declare class SelectionInputPlugin extends UIPlugin implements StreamCallbacks<S
|
|
|
4210
4545
|
static getters: never[];
|
|
4211
4546
|
ranges: RangeInputValue[];
|
|
4212
4547
|
focusedRangeIndex: number | null;
|
|
4213
|
-
private
|
|
4214
|
-
private willAddNewRange;
|
|
4548
|
+
private inputSheetId;
|
|
4215
4549
|
constructor(config: UIPluginConfig, initialRanges: string[], inputHasSingleRange: boolean);
|
|
4216
4550
|
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4217
4551
|
handleEvent(event: SelectionEvent): void;
|
|
@@ -4224,7 +4558,6 @@ declare class SelectionInputPlugin extends UIPlugin implements StreamCallbacks<S
|
|
|
4224
4558
|
private focus;
|
|
4225
4559
|
private focusLast;
|
|
4226
4560
|
private unfocus;
|
|
4227
|
-
private add;
|
|
4228
4561
|
private setContent;
|
|
4229
4562
|
/**
|
|
4230
4563
|
* Insert new inputs after the given index.
|
|
@@ -4392,7 +4725,7 @@ declare class UIOptionsPlugin extends UIPlugin {
|
|
|
4392
4725
|
}
|
|
4393
4726
|
|
|
4394
4727
|
declare class SheetUIPlugin extends UIPlugin {
|
|
4395
|
-
static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getColDimensions", "getRowDimensions", "getColRowOffset"];
|
|
4728
|
+
static getters: readonly ["doesCellHaveGridIcon", "getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getColDimensions", "getRowDimensions", "getColRowOffset"];
|
|
4396
4729
|
private ctx;
|
|
4397
4730
|
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
4398
4731
|
handle(cmd: Command): void;
|
|
@@ -4420,6 +4753,7 @@ declare class SheetUIPlugin extends UIPlugin {
|
|
|
4420
4753
|
* i.e. The size from A to B is the distance between A.start and B.end
|
|
4421
4754
|
*/
|
|
4422
4755
|
getColRowOffset(dimension: Dimension, referenceIndex: HeaderIndex, index: HeaderIndex, sheetId?: UID): Pixel;
|
|
4756
|
+
doesCellHaveGridIcon(position: CellPosition): boolean;
|
|
4423
4757
|
private getColMaxWidth;
|
|
4424
4758
|
/**
|
|
4425
4759
|
* Check that any "sheetId" in the command matches an existing
|
|
@@ -4852,7 +5186,9 @@ type ConditionalFormatGetters = Pick<ConditionalFormatPlugin, GetterNames<typeof
|
|
|
4852
5186
|
type LocalHistoryGetters = Pick<HistoryPlugin, GetterNames<typeof HistoryPlugin>>;
|
|
4853
5187
|
type FiltersGetters = Pick<FiltersPlugin, GetterNames<typeof FiltersPlugin>>;
|
|
4854
5188
|
type SettingsGetters = Pick<SettingsPlugin, GetterNames<typeof SettingsPlugin>>;
|
|
4855
|
-
type
|
|
5189
|
+
type HeaderGroupingGetters = Pick<HeaderGroupingPlugin, GetterNames<typeof HeaderGroupingPlugin>>;
|
|
5190
|
+
type DataValidationGetters = Pick<DataValidationPlugin, GetterNames<typeof DataValidationPlugin>>;
|
|
5191
|
+
type CoreGetters = SheetGetters & HeaderSizeGetters & HeaderVisibilityGetters & CellGetters & MergeGetters & BordersGetters & ChartGetters & ImageGetters & ConditionalFormatGetters & FigureGetters & RangeAdapterGetters & FiltersGetters & SettingsGetters & HeaderGroupingGetters & DataValidationGetters;
|
|
4856
5192
|
type AutofillGetters = Pick<AutofillPlugin, GetterNames<typeof AutofillPlugin>>;
|
|
4857
5193
|
type AutomaticSumGetters = Pick<AutomaticSumPlugin, GetterNames<typeof AutomaticSumPlugin>>;
|
|
4858
5194
|
type ClipboardGetters = Pick<ClipboardPlugin, GetterNames<typeof ClipboardPlugin>>;
|
|
@@ -4876,10 +5212,11 @@ type CellPopoverPluginGetters = Pick<CellPopoverPlugin, GetterNames<typeof CellP
|
|
|
4876
5212
|
type FilterEvaluationGetters = Pick<FilterEvaluationPlugin, GetterNames<typeof FilterEvaluationPlugin>>;
|
|
4877
5213
|
type SplitToColumnsGetters = Pick<SplitToColumnsPlugin, GetterNames<typeof SplitToColumnsPlugin>>;
|
|
4878
5214
|
type UIRowSizeGetters = Pick<UIRowSizePlugin, GetterNames<typeof UIRowSizePlugin>>;
|
|
5215
|
+
type EvaluationDataValidationPluginGetters = Pick<EvaluationDataValidationPlugin, GetterNames<typeof EvaluationDataValidationPlugin>>;
|
|
4879
5216
|
type Getters = {
|
|
4880
5217
|
isReadonly: () => boolean;
|
|
4881
5218
|
isDashboard: () => boolean;
|
|
4882
|
-
} & LocalHistoryGetters & CoreGetters & AutofillGetters & AutomaticSumGetters & ClipboardGetters & EditionGetters & EvaluationGetters & EvaluationChartGetters & EvaluationConditionalFormatGetters & FindAndReplaceGetters & HighlightGetters & CustomColorsGetters & RendererGetters & SelectionGetters & SelectionInputGetters & CollaborativeGetters & SortGetters & UIOptionsGetters & SheetUIGetters & ViewportGetters & CellPopoverPluginGetters & FilterEvaluationGetters & HeaderVisibilityIUIGetters & SplitToColumnsGetters & UIRowSizeGetters;
|
|
5219
|
+
} & LocalHistoryGetters & CoreGetters & AutofillGetters & AutomaticSumGetters & ClipboardGetters & EditionGetters & EvaluationGetters & EvaluationChartGetters & EvaluationConditionalFormatGetters & FindAndReplaceGetters & HighlightGetters & CustomColorsGetters & RendererGetters & SelectionGetters & SelectionInputGetters & CollaborativeGetters & SortGetters & UIOptionsGetters & SheetUIGetters & ViewportGetters & CellPopoverPluginGetters & FilterEvaluationGetters & HeaderVisibilityIUIGetters & SplitToColumnsGetters & UIRowSizeGetters & EvaluationDataValidationPluginGetters;
|
|
4883
5220
|
|
|
4884
5221
|
interface HistoryChange {
|
|
4885
5222
|
root: any;
|
|
@@ -4909,9 +5246,6 @@ interface TransformationFactory<T = unknown> {
|
|
|
4909
5246
|
with: (operation: T) => Transformation<T>;
|
|
4910
5247
|
}
|
|
4911
5248
|
|
|
4912
|
-
type SelectionDirection = "up" | "down" | "left" | "right";
|
|
4913
|
-
type SelectionStep = number | "end";
|
|
4914
|
-
|
|
4915
5249
|
type CellPopoverType = "ErrorToolTip" | "LinkDisplay" | "FilterMenu" | "LinkEditor";
|
|
4916
5250
|
type PopoverPropsPosition = "TopRight" | "BottomLeft";
|
|
4917
5251
|
type MaxSizedComponentConstructor = ComponentConstructor & {
|
|
@@ -5061,7 +5395,7 @@ interface ChartBuilder {
|
|
|
5061
5395
|
sequence: number;
|
|
5062
5396
|
}
|
|
5063
5397
|
|
|
5064
|
-
interface Props$
|
|
5398
|
+
interface Props$K {
|
|
5065
5399
|
ranges: () => string[];
|
|
5066
5400
|
hasSingleRange?: boolean;
|
|
5067
5401
|
required?: boolean;
|
|
@@ -5083,7 +5417,7 @@ interface SelectionRange extends Omit<RangeInputValue, "color"> {
|
|
|
5083
5417
|
* onSelectionChanged is called every time the input value
|
|
5084
5418
|
* changes.
|
|
5085
5419
|
*/
|
|
5086
|
-
declare class SelectionInput extends Component<Props$
|
|
5420
|
+
declare class SelectionInput extends Component<Props$K, SpreadsheetChildEnv> {
|
|
5087
5421
|
static template: string;
|
|
5088
5422
|
private id;
|
|
5089
5423
|
private previousRanges;
|
|
@@ -5112,26 +5446,26 @@ declare class SelectionInput extends Component<Props$F, SpreadsheetChildEnv> {
|
|
|
5112
5446
|
confirm(): void;
|
|
5113
5447
|
}
|
|
5114
5448
|
|
|
5115
|
-
interface Props$
|
|
5449
|
+
interface Props$J {
|
|
5116
5450
|
messages: string[];
|
|
5117
5451
|
msgType: "warning" | "error";
|
|
5118
5452
|
}
|
|
5119
|
-
declare class
|
|
5453
|
+
declare class ValidationMessages extends Component<Props$J, SpreadsheetChildEnv> {
|
|
5120
5454
|
static template: string;
|
|
5121
|
-
get divClasses(): "o-
|
|
5455
|
+
get divClasses(): "o-validation-warning text-warning" | "o-validation-error text-danger";
|
|
5122
5456
|
}
|
|
5123
5457
|
|
|
5124
|
-
interface Props$
|
|
5458
|
+
interface Props$I {
|
|
5125
5459
|
figureId: UID;
|
|
5126
5460
|
definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
|
|
5127
5461
|
canUpdateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5128
5462
|
updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5129
5463
|
}
|
|
5130
|
-
declare class LineBarPieConfigPanel extends Component<Props$
|
|
5464
|
+
declare class LineBarPieConfigPanel extends Component<Props$I, SpreadsheetChildEnv> {
|
|
5131
5465
|
static template: string;
|
|
5132
5466
|
static components: {
|
|
5133
5467
|
SelectionInput: typeof SelectionInput;
|
|
5134
|
-
|
|
5468
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5135
5469
|
};
|
|
5136
5470
|
private state;
|
|
5137
5471
|
private dataSeriesRanges;
|
|
@@ -5168,6 +5502,7 @@ declare class BarConfigPanel extends LineBarPieConfigPanel {
|
|
|
5168
5502
|
declare enum ComponentsImportance {
|
|
5169
5503
|
Grid = 0,
|
|
5170
5504
|
Highlight = 5,
|
|
5505
|
+
HeaderGroupingButton = 6,
|
|
5171
5506
|
Figure = 10,
|
|
5172
5507
|
ScrollBar = 15,
|
|
5173
5508
|
GridPopover = 19,
|
|
@@ -5255,7 +5590,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
|
|
|
5255
5590
|
isSameColor(color1: Color, color2: Color): boolean;
|
|
5256
5591
|
}
|
|
5257
5592
|
|
|
5258
|
-
interface Props$
|
|
5593
|
+
interface Props$H {
|
|
5259
5594
|
currentColor: string | undefined;
|
|
5260
5595
|
toggleColorPicker: () => void;
|
|
5261
5596
|
showColorPicker: boolean;
|
|
@@ -5266,7 +5601,7 @@ interface Props$C {
|
|
|
5266
5601
|
dropdownMaxHeight?: Pixel;
|
|
5267
5602
|
class?: string;
|
|
5268
5603
|
}
|
|
5269
|
-
declare class ColorPickerWidget extends Component<Props$
|
|
5604
|
+
declare class ColorPickerWidget extends Component<Props$H, SpreadsheetChildEnv> {
|
|
5270
5605
|
static template: string;
|
|
5271
5606
|
static components: {
|
|
5272
5607
|
ColorPicker: typeof ColorPicker;
|
|
@@ -5278,13 +5613,13 @@ declare class ColorPickerWidget extends Component<Props$C, SpreadsheetChildEnv>
|
|
|
5278
5613
|
get colorPickerAnchorRect(): Rect;
|
|
5279
5614
|
}
|
|
5280
5615
|
|
|
5281
|
-
interface Props$
|
|
5616
|
+
interface Props$G {
|
|
5282
5617
|
figureId: UID;
|
|
5283
5618
|
definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
|
|
5284
5619
|
canUpdateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5285
5620
|
updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5286
5621
|
}
|
|
5287
|
-
declare class LineBarPieDesignPanel extends Component<Props$
|
|
5622
|
+
declare class LineBarPieDesignPanel extends Component<Props$G, SpreadsheetChildEnv> {
|
|
5288
5623
|
static template: string;
|
|
5289
5624
|
static components: {
|
|
5290
5625
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
@@ -5298,17 +5633,17 @@ declare class LineBarPieDesignPanel extends Component<Props$B, SpreadsheetChildE
|
|
|
5298
5633
|
updateSelect(attr: string, ev: any): void;
|
|
5299
5634
|
}
|
|
5300
5635
|
|
|
5301
|
-
interface Props$
|
|
5636
|
+
interface Props$F {
|
|
5302
5637
|
figureId: UID;
|
|
5303
5638
|
definition: GaugeChartDefinition;
|
|
5304
5639
|
canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5305
5640
|
updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5306
5641
|
}
|
|
5307
|
-
declare class GaugeChartConfigPanel extends Component<Props$
|
|
5642
|
+
declare class GaugeChartConfigPanel extends Component<Props$F, SpreadsheetChildEnv> {
|
|
5308
5643
|
static template: string;
|
|
5309
5644
|
static components: {
|
|
5310
5645
|
SelectionInput: typeof SelectionInput;
|
|
5311
|
-
|
|
5646
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5312
5647
|
};
|
|
5313
5648
|
private state;
|
|
5314
5649
|
private dataRange;
|
|
@@ -5320,17 +5655,17 @@ declare class GaugeChartConfigPanel extends Component<Props$A, SpreadsheetChildE
|
|
|
5320
5655
|
}
|
|
5321
5656
|
|
|
5322
5657
|
type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
|
|
5323
|
-
interface Props$
|
|
5658
|
+
interface Props$E {
|
|
5324
5659
|
figureId: UID;
|
|
5325
5660
|
definition: GaugeChartDefinition;
|
|
5326
5661
|
canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5327
5662
|
updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5328
5663
|
}
|
|
5329
|
-
declare class GaugeChartDesignPanel extends Component<Props$
|
|
5664
|
+
declare class GaugeChartDesignPanel extends Component<Props$E, SpreadsheetChildEnv> {
|
|
5330
5665
|
static template: string;
|
|
5331
5666
|
static components: {
|
|
5332
5667
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
5333
|
-
|
|
5668
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5334
5669
|
};
|
|
5335
5670
|
private state;
|
|
5336
5671
|
setup(): void;
|
|
@@ -5354,19 +5689,20 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
|
|
|
5354
5689
|
onUpdateLabelsAsText(ev: any): void;
|
|
5355
5690
|
onUpdateStacked(ev: any): void;
|
|
5356
5691
|
onUpdateAggregated(ev: any): void;
|
|
5692
|
+
onUpdateCumulative(ev: any): void;
|
|
5357
5693
|
}
|
|
5358
5694
|
|
|
5359
|
-
interface Props$
|
|
5695
|
+
interface Props$D {
|
|
5360
5696
|
figureId: UID;
|
|
5361
5697
|
definition: ScorecardChartDefinition;
|
|
5362
5698
|
canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5363
5699
|
updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5364
5700
|
}
|
|
5365
|
-
declare class ScorecardChartConfigPanel extends Component<Props$
|
|
5701
|
+
declare class ScorecardChartConfigPanel extends Component<Props$D, SpreadsheetChildEnv> {
|
|
5366
5702
|
static template: string;
|
|
5367
5703
|
static components: {
|
|
5368
5704
|
SelectionInput: typeof SelectionInput;
|
|
5369
|
-
|
|
5705
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5370
5706
|
};
|
|
5371
5707
|
private state;
|
|
5372
5708
|
private keyValue;
|
|
@@ -5384,13 +5720,13 @@ declare class ScorecardChartConfigPanel extends Component<Props$y, SpreadsheetCh
|
|
|
5384
5720
|
}
|
|
5385
5721
|
|
|
5386
5722
|
type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
|
|
5387
|
-
interface Props$
|
|
5723
|
+
interface Props$C {
|
|
5388
5724
|
figureId: UID;
|
|
5389
5725
|
definition: ScorecardChartDefinition;
|
|
5390
5726
|
canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5391
5727
|
updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5392
5728
|
}
|
|
5393
|
-
declare class ScorecardChartDesignPanel extends Component<Props$
|
|
5729
|
+
declare class ScorecardChartDesignPanel extends Component<Props$C, SpreadsheetChildEnv> {
|
|
5394
5730
|
static template: string;
|
|
5395
5731
|
static components: {
|
|
5396
5732
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
@@ -5398,6 +5734,7 @@ declare class ScorecardChartDesignPanel extends Component<Props$x, SpreadsheetCh
|
|
|
5398
5734
|
private state;
|
|
5399
5735
|
setup(): void;
|
|
5400
5736
|
updateTitle(): void;
|
|
5737
|
+
translate(term: any): string;
|
|
5401
5738
|
updateBaselineDescr(ev: any): void;
|
|
5402
5739
|
toggleColorPicker(colorPickerId: ColorPickerId): void;
|
|
5403
5740
|
setColor(color: Color, colorPickerId: ColorPickerId): void;
|
|
@@ -5478,6 +5815,8 @@ interface Action {
|
|
|
5478
5815
|
}
|
|
5479
5816
|
type ActionBuilder = (env: SpreadsheetChildEnv) => ActionSpec[];
|
|
5480
5817
|
type ActionChildren = (ActionSpec | ActionBuilder)[];
|
|
5818
|
+
declare function createActions(menuItems: ActionSpec[]): Action[];
|
|
5819
|
+
declare function createAction(item: ActionSpec): Action;
|
|
5481
5820
|
|
|
5482
5821
|
/**
|
|
5483
5822
|
* This registry is intended to map a type of figure (tag) to a class of
|
|
@@ -5531,10 +5870,10 @@ interface AutofillRule {
|
|
|
5531
5870
|
sequence: number;
|
|
5532
5871
|
}
|
|
5533
5872
|
|
|
5534
|
-
interface Props$
|
|
5873
|
+
interface Props$B {
|
|
5535
5874
|
figure: Figure;
|
|
5536
5875
|
}
|
|
5537
|
-
declare class ChartJsComponent extends Component<Props$
|
|
5876
|
+
declare class ChartJsComponent extends Component<Props$B, SpreadsheetChildEnv> {
|
|
5538
5877
|
static template: string;
|
|
5539
5878
|
private canvas;
|
|
5540
5879
|
private chart?;
|
|
@@ -5546,10 +5885,10 @@ declare class ChartJsComponent extends Component<Props$w, SpreadsheetChildEnv> {
|
|
|
5546
5885
|
private updateChartJs;
|
|
5547
5886
|
}
|
|
5548
5887
|
|
|
5549
|
-
interface Props$
|
|
5888
|
+
interface Props$A {
|
|
5550
5889
|
figure: Figure;
|
|
5551
5890
|
}
|
|
5552
|
-
declare class ScorecardChart extends Component<Props$
|
|
5891
|
+
declare class ScorecardChart extends Component<Props$A, SpreadsheetChildEnv> {
|
|
5553
5892
|
static template: string;
|
|
5554
5893
|
private ctx;
|
|
5555
5894
|
get runtime(): ScorecardChartRuntime;
|
|
@@ -5565,6 +5904,7 @@ declare class ScorecardChart extends Component<Props$v, SpreadsheetChildEnv> {
|
|
|
5565
5904
|
get chartStyle(): string;
|
|
5566
5905
|
get chartContentStyle(): string;
|
|
5567
5906
|
get chartPadding(): number;
|
|
5907
|
+
translate(term: any): string;
|
|
5568
5908
|
getTextStyles(): {
|
|
5569
5909
|
titleStyle: string;
|
|
5570
5910
|
keyStyle: string;
|
|
@@ -5581,7 +5921,7 @@ declare class ScorecardChart extends Component<Props$v, SpreadsheetChildEnv> {
|
|
|
5581
5921
|
}
|
|
5582
5922
|
|
|
5583
5923
|
type MenuItemOrSeparator = Action | "separator";
|
|
5584
|
-
interface Props$
|
|
5924
|
+
interface Props$z {
|
|
5585
5925
|
position: DOMCoordinates;
|
|
5586
5926
|
menuItems: Action[];
|
|
5587
5927
|
depth: number;
|
|
@@ -5597,7 +5937,7 @@ interface MenuState {
|
|
|
5597
5937
|
scrollOffset?: Pixel;
|
|
5598
5938
|
menuItems: Action[];
|
|
5599
5939
|
}
|
|
5600
|
-
declare class Menu extends Component<Props$
|
|
5940
|
+
declare class Menu extends Component<Props$z, SpreadsheetChildEnv> {
|
|
5601
5941
|
static template: string;
|
|
5602
5942
|
static components: {
|
|
5603
5943
|
Menu: typeof Menu;
|
|
@@ -5635,14 +5975,14 @@ declare class Menu extends Component<Props$u, SpreadsheetChildEnv> {
|
|
|
5635
5975
|
}
|
|
5636
5976
|
|
|
5637
5977
|
type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
|
|
5638
|
-
interface Props$
|
|
5978
|
+
interface Props$y {
|
|
5639
5979
|
figure: Figure;
|
|
5640
5980
|
style: string;
|
|
5641
5981
|
onFigureDeleted: () => void;
|
|
5642
5982
|
onMouseDown: (ev: MouseEvent) => void;
|
|
5643
5983
|
onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
|
|
5644
5984
|
}
|
|
5645
|
-
declare class FigureComponent extends Component<Props$
|
|
5985
|
+
declare class FigureComponent extends Component<Props$y, SpreadsheetChildEnv> {
|
|
5646
5986
|
static template: string;
|
|
5647
5987
|
static components: {
|
|
5648
5988
|
Menu: typeof Menu;
|
|
@@ -5672,11 +6012,11 @@ declare class FigureComponent extends Component<Props$t, SpreadsheetChildEnv> {
|
|
|
5672
6012
|
private openContextMenu;
|
|
5673
6013
|
}
|
|
5674
6014
|
|
|
5675
|
-
interface Props$
|
|
6015
|
+
interface Props$x {
|
|
5676
6016
|
figure: Figure;
|
|
5677
6017
|
onFigureDeleted: () => void;
|
|
5678
6018
|
}
|
|
5679
|
-
declare class ChartFigure extends Component<Props$
|
|
6019
|
+
declare class ChartFigure extends Component<Props$x, SpreadsheetChildEnv> {
|
|
5680
6020
|
static template: string;
|
|
5681
6021
|
static components: {};
|
|
5682
6022
|
onDoubleClick(): void;
|
|
@@ -5684,7 +6024,7 @@ declare class ChartFigure extends Component<Props$s, SpreadsheetChildEnv> {
|
|
|
5684
6024
|
get chartComponent(): new (...args: any) => Component;
|
|
5685
6025
|
}
|
|
5686
6026
|
|
|
5687
|
-
interface Props$
|
|
6027
|
+
interface Props$w {
|
|
5688
6028
|
isVisible: boolean;
|
|
5689
6029
|
position: Position;
|
|
5690
6030
|
}
|
|
@@ -5692,13 +6032,13 @@ interface Position {
|
|
|
5692
6032
|
top: HeaderIndex;
|
|
5693
6033
|
left: HeaderIndex;
|
|
5694
6034
|
}
|
|
5695
|
-
interface State$
|
|
6035
|
+
interface State$6 {
|
|
5696
6036
|
position: Position;
|
|
5697
6037
|
handler: boolean;
|
|
5698
6038
|
}
|
|
5699
|
-
declare class Autofill extends Component<Props$
|
|
6039
|
+
declare class Autofill extends Component<Props$w, SpreadsheetChildEnv> {
|
|
5700
6040
|
static template: string;
|
|
5701
|
-
state: State$
|
|
6041
|
+
state: State$6;
|
|
5702
6042
|
get style(): string;
|
|
5703
6043
|
get handlerStyle(): string;
|
|
5704
6044
|
get styleNextValue(): string;
|
|
@@ -5770,13 +6110,13 @@ declare class Ripple extends Component<RippleProps, SpreadsheetChildEnv> {
|
|
|
5770
6110
|
getRippleEffectProps(id: number): RippleEffectProps;
|
|
5771
6111
|
}
|
|
5772
6112
|
|
|
5773
|
-
interface Props$
|
|
6113
|
+
interface Props$v {
|
|
5774
6114
|
sheetId: string;
|
|
5775
6115
|
openContextMenu: (registry: MenuItemRegistry, ev: MouseEvent) => void;
|
|
5776
6116
|
style?: string;
|
|
5777
6117
|
onMouseDown: (ev: MouseEvent) => void;
|
|
5778
6118
|
}
|
|
5779
|
-
declare class BottomBarSheet extends Component<Props$
|
|
6119
|
+
declare class BottomBarSheet extends Component<Props$v, SpreadsheetChildEnv> {
|
|
5780
6120
|
static template: string;
|
|
5781
6121
|
static components: {
|
|
5782
6122
|
Ripple: typeof Ripple;
|
|
@@ -5810,11 +6150,11 @@ declare class BottomBarSheet extends Component<Props$q, SpreadsheetChildEnv> {
|
|
|
5810
6150
|
get sheetName(): string;
|
|
5811
6151
|
}
|
|
5812
6152
|
|
|
5813
|
-
interface Props$
|
|
6153
|
+
interface Props$u {
|
|
5814
6154
|
openContextMenu: (x: number, y: number, registry: MenuItemRegistry) => void;
|
|
5815
6155
|
closeContextMenu: () => void;
|
|
5816
6156
|
}
|
|
5817
|
-
declare class BottomBarStatistic extends Component<Props$
|
|
6157
|
+
declare class BottomBarStatistic extends Component<Props$u, SpreadsheetChildEnv> {
|
|
5818
6158
|
static template: string;
|
|
5819
6159
|
static components: {
|
|
5820
6160
|
Ripple: typeof Ripple;
|
|
@@ -5831,18 +6171,13 @@ interface BottomBarSheetItem {
|
|
|
5831
6171
|
id: UID;
|
|
5832
6172
|
name: string;
|
|
5833
6173
|
}
|
|
5834
|
-
interface
|
|
5835
|
-
sheetList: BottomBarSheetItem[];
|
|
5836
|
-
isDnd: boolean;
|
|
5837
|
-
sheetDndPositions: Record<UID, number> | undefined;
|
|
5838
|
-
}
|
|
5839
|
-
interface Props$o {
|
|
6174
|
+
interface Props$t {
|
|
5840
6175
|
onClick: () => void;
|
|
5841
6176
|
}
|
|
5842
6177
|
interface BottomBarMenuState extends MenuState {
|
|
5843
6178
|
menuId: UID | undefined;
|
|
5844
6179
|
}
|
|
5845
|
-
declare class BottomBar extends Component<Props$
|
|
6180
|
+
declare class BottomBar extends Component<Props$t, SpreadsheetChildEnv> {
|
|
5846
6181
|
static template: string;
|
|
5847
6182
|
static components: {
|
|
5848
6183
|
Menu: typeof Menu;
|
|
@@ -5852,17 +6187,15 @@ declare class BottomBar extends Component<Props$o, SpreadsheetChildEnv> {
|
|
|
5852
6187
|
};
|
|
5853
6188
|
private bottomBarRef;
|
|
5854
6189
|
private sheetListRef;
|
|
5855
|
-
private
|
|
6190
|
+
private dragAndDrop;
|
|
5856
6191
|
private targetScroll;
|
|
5857
6192
|
private state;
|
|
5858
6193
|
menuMaxHeight: number;
|
|
5859
6194
|
menuState: BottomBarMenuState;
|
|
5860
|
-
|
|
6195
|
+
sheetList: BottomBarSheetItem[];
|
|
5861
6196
|
setup(): void;
|
|
5862
|
-
isDragged(sheetId: UID): boolean;
|
|
5863
6197
|
clickAddSheet(ev: MouseEvent): void;
|
|
5864
|
-
|
|
5865
|
-
getSheets(): BottomBarSheetItem[];
|
|
6198
|
+
getVisibleSheets(): BottomBarSheetItem[];
|
|
5866
6199
|
clickListSheets(ev: MouseEvent): void;
|
|
5867
6200
|
openContextMenu(x: Pixel, y: Pixel, menuId: UID, registry: MenuItemRegistry): void;
|
|
5868
6201
|
onSheetContextMenu(sheetId: UID, registry: MenuItemRegistry, ev: MenuMouseEvent): void;
|
|
@@ -5877,32 +6210,44 @@ declare class BottomBar extends Component<Props$o, SpreadsheetChildEnv> {
|
|
|
5877
6210
|
onSheetMouseDown(sheetId: UID, event: MouseEvent): void;
|
|
5878
6211
|
private onDragEnd;
|
|
5879
6212
|
getSheetStyle(sheetId: UID): string;
|
|
5880
|
-
private stopDragging;
|
|
5881
6213
|
private getSheetItemRects;
|
|
5882
|
-
getSheetClasses(sheetId: UID): string;
|
|
5883
6214
|
get sheetListCurrentScroll(): number;
|
|
5884
6215
|
get sheetListWidth(): number;
|
|
5885
6216
|
get sheetListMaxScroll(): number;
|
|
5886
6217
|
}
|
|
5887
6218
|
|
|
5888
|
-
interface
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
6219
|
+
interface GridCellIconProps {
|
|
6220
|
+
cellPosition: CellPosition;
|
|
6221
|
+
horizontalAlign?: Align;
|
|
6222
|
+
verticalAlign?: VerticalAlign;
|
|
6223
|
+
offset?: DOMCoordinates;
|
|
5892
6224
|
}
|
|
5893
|
-
declare class
|
|
6225
|
+
declare class GridCellIcon extends Component<GridCellIconProps, SpreadsheetChildEnv> {
|
|
5894
6226
|
static style: string;
|
|
5895
6227
|
static template: string;
|
|
5896
|
-
get
|
|
6228
|
+
get iconStyle(): string;
|
|
6229
|
+
private getIconVerticalPosition;
|
|
6230
|
+
private getIconHorizontalPosition;
|
|
6231
|
+
isPositionVisible(position: CellPosition): boolean;
|
|
5897
6232
|
}
|
|
5898
6233
|
|
|
5899
|
-
interface Props$
|
|
5900
|
-
|
|
6234
|
+
interface Props$s {
|
|
6235
|
+
cellPosition: CellPosition;
|
|
5901
6236
|
}
|
|
5902
|
-
declare class
|
|
6237
|
+
declare class FilterIcon extends Component<Props$s, SpreadsheetChildEnv> {
|
|
5903
6238
|
static style: string;
|
|
6239
|
+
static template: string;
|
|
6240
|
+
onClick(): void;
|
|
6241
|
+
get isFilterActive(): boolean;
|
|
6242
|
+
}
|
|
6243
|
+
|
|
6244
|
+
interface Props$r {
|
|
6245
|
+
gridPosition: DOMCoordinates;
|
|
6246
|
+
}
|
|
6247
|
+
declare class FilterIconsOverlay extends Component<Props$r, SpreadsheetChildEnv> {
|
|
5904
6248
|
static template: string;
|
|
5905
6249
|
static components: {
|
|
6250
|
+
GridCellIcon: typeof GridCellIcon;
|
|
5906
6251
|
FilterIcon: typeof FilterIcon;
|
|
5907
6252
|
};
|
|
5908
6253
|
static defaultProps: {
|
|
@@ -5911,12 +6256,36 @@ declare class FilterIconsOverlay extends Component<Props$m, SpreadsheetChildEnv>
|
|
|
5911
6256
|
y: number;
|
|
5912
6257
|
};
|
|
5913
6258
|
};
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
6259
|
+
getFilterHeadersPositions(): CellPosition[];
|
|
6260
|
+
}
|
|
6261
|
+
|
|
6262
|
+
interface Props$q {
|
|
6263
|
+
cellPosition: CellPosition;
|
|
6264
|
+
}
|
|
6265
|
+
declare class DataValidationCheckbox extends Component<Props$q, SpreadsheetChildEnv> {
|
|
6266
|
+
static template: string;
|
|
6267
|
+
onCheckboxChange(ev: Event): void;
|
|
6268
|
+
get checkBoxValue(): boolean;
|
|
6269
|
+
get isDisabled(): boolean;
|
|
6270
|
+
}
|
|
6271
|
+
|
|
6272
|
+
interface Props$p {
|
|
6273
|
+
cellPosition: CellPosition;
|
|
6274
|
+
}
|
|
6275
|
+
declare class DataValidationListIcon extends Component<Props$p, SpreadsheetChildEnv> {
|
|
6276
|
+
static template: string;
|
|
6277
|
+
onClick(): void;
|
|
6278
|
+
}
|
|
6279
|
+
|
|
6280
|
+
declare class DataValidationOverlay extends Component<{}, SpreadsheetChildEnv> {
|
|
6281
|
+
static template: string;
|
|
6282
|
+
static components: {
|
|
6283
|
+
GridCellIcon: typeof GridCellIcon;
|
|
6284
|
+
DataValidationCheckbox: typeof DataValidationCheckbox;
|
|
6285
|
+
DataValidationListIcon: typeof DataValidationListIcon;
|
|
6286
|
+
};
|
|
6287
|
+
get checkBoxCellPositions(): CellPosition[];
|
|
6288
|
+
get listIconsCellPositions(): CellPosition[];
|
|
5920
6289
|
}
|
|
5921
6290
|
|
|
5922
6291
|
type HFigureAxisType = "top" | "bottom" | "vCenter";
|
|
@@ -5929,7 +6298,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
|
5929
6298
|
}
|
|
5930
6299
|
|
|
5931
6300
|
type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
|
|
5932
|
-
interface Props$
|
|
6301
|
+
interface Props$o {
|
|
5933
6302
|
onFigureDeleted: () => void;
|
|
5934
6303
|
}
|
|
5935
6304
|
interface Container {
|
|
@@ -6008,7 +6377,7 @@ interface DndState {
|
|
|
6008
6377
|
* that occurred during the drag & drop, and to position the figure on the correct pane.
|
|
6009
6378
|
*
|
|
6010
6379
|
*/
|
|
6011
|
-
declare class FiguresContainer extends Component<Props$
|
|
6380
|
+
declare class FiguresContainer extends Component<Props$o, SpreadsheetChildEnv> {
|
|
6012
6381
|
static template: string;
|
|
6013
6382
|
static components: {
|
|
6014
6383
|
FigureComponent: typeof FigureComponent;
|
|
@@ -6040,23 +6409,49 @@ declare class FiguresContainer extends Component<Props$l, SpreadsheetChildEnv> {
|
|
|
6040
6409
|
private getSnapLineStyle;
|
|
6041
6410
|
}
|
|
6042
6411
|
|
|
6043
|
-
interface Props$
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6412
|
+
interface Props$n {
|
|
6413
|
+
focusGrid: () => void;
|
|
6414
|
+
}
|
|
6415
|
+
declare class GridAddRowsFooter extends Component<Props$n, SpreadsheetChildEnv> {
|
|
6416
|
+
static template: string;
|
|
6417
|
+
static components: {
|
|
6418
|
+
ValidationMessages: typeof ValidationMessages;
|
|
6419
|
+
};
|
|
6420
|
+
inputRef: {
|
|
6421
|
+
el: HTMLInputElement | null;
|
|
6422
|
+
};
|
|
6423
|
+
state: {
|
|
6424
|
+
inputValue: string;
|
|
6425
|
+
errorFlag: boolean;
|
|
6426
|
+
};
|
|
6427
|
+
setup(): void;
|
|
6428
|
+
get addRowsPosition(): string;
|
|
6429
|
+
get errorMessages(): string[];
|
|
6430
|
+
onKeydown(ev: KeyboardEvent): void;
|
|
6431
|
+
onInput(ev: InputEvent): void;
|
|
6432
|
+
onConfirm(): void;
|
|
6433
|
+
private onExternalClick;
|
|
6434
|
+
}
|
|
6435
|
+
|
|
6436
|
+
interface Props$m {
|
|
6437
|
+
onCellHovered: (position: Partial<Position$1>) => void;
|
|
6438
|
+
onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
|
|
6439
|
+
onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
|
|
6440
|
+
ctrlKey: boolean;
|
|
6441
|
+
shiftKey: boolean;
|
|
6442
|
+
}) => void;
|
|
6443
|
+
onCellRightClicked: (col: HeaderIndex, row: HeaderIndex, coordinates: DOMCoordinates) => void;
|
|
6444
|
+
onGridResized: (dimension: Rect) => void;
|
|
6445
|
+
onGridMoved: (deltaX: Pixel, deltaY: Pixel) => void;
|
|
6053
6446
|
gridOverlayDimensions: string;
|
|
6054
6447
|
onFigureDeleted: () => void;
|
|
6055
6448
|
}
|
|
6056
|
-
declare class GridOverlay extends Component<Props$
|
|
6449
|
+
declare class GridOverlay extends Component<Props$m, SpreadsheetChildEnv> {
|
|
6057
6450
|
static template: string;
|
|
6058
6451
|
static components: {
|
|
6059
6452
|
FiguresContainer: typeof FiguresContainer;
|
|
6453
|
+
DataValidationOverlay: typeof DataValidationOverlay;
|
|
6454
|
+
GridAddRowsFooter: typeof GridAddRowsFooter;
|
|
6060
6455
|
};
|
|
6061
6456
|
static defaultProps: {
|
|
6062
6457
|
onCellHovered: () => void;
|
|
@@ -6067,6 +6462,7 @@ declare class GridOverlay extends Component<Props$k, SpreadsheetChildEnv> {
|
|
|
6067
6462
|
onFigureDeleted: () => void;
|
|
6068
6463
|
};
|
|
6069
6464
|
private gridOverlay;
|
|
6465
|
+
private gridOverlayRect;
|
|
6070
6466
|
setup(): void;
|
|
6071
6467
|
get gridOverlayEl(): HTMLElement;
|
|
6072
6468
|
get style(): string;
|
|
@@ -6077,13 +6473,13 @@ declare class GridOverlay extends Component<Props$k, SpreadsheetChildEnv> {
|
|
|
6077
6473
|
private getCartesianCoordinates;
|
|
6078
6474
|
}
|
|
6079
6475
|
|
|
6080
|
-
interface Props$
|
|
6476
|
+
interface Props$l {
|
|
6081
6477
|
hoveredCell: Partial<Position$1>;
|
|
6082
6478
|
gridRect: Rect;
|
|
6083
6479
|
onClosePopover: () => void;
|
|
6084
6480
|
onMouseWheel: (ev: WheelEvent) => void;
|
|
6085
6481
|
}
|
|
6086
|
-
declare class GridPopover extends Component<Props$
|
|
6482
|
+
declare class GridPopover extends Component<Props$l, SpreadsheetChildEnv> {
|
|
6087
6483
|
static template: string;
|
|
6088
6484
|
static components: {
|
|
6089
6485
|
Popover: typeof Popover;
|
|
@@ -6094,7 +6490,7 @@ declare class GridPopover extends Component<Props$j, SpreadsheetChildEnv> {
|
|
|
6094
6490
|
|
|
6095
6491
|
type ScrollDirection = "horizontal" | "vertical";
|
|
6096
6492
|
|
|
6097
|
-
interface Props$
|
|
6493
|
+
interface Props$k {
|
|
6098
6494
|
width: Pixel;
|
|
6099
6495
|
height: Pixel;
|
|
6100
6496
|
direction: ScrollDirection;
|
|
@@ -6102,7 +6498,7 @@ interface Props$i {
|
|
|
6102
6498
|
offset: Pixel;
|
|
6103
6499
|
onScroll: (offset: Pixel) => void;
|
|
6104
6500
|
}
|
|
6105
|
-
declare class ScrollBar extends Component<Props$
|
|
6501
|
+
declare class ScrollBar extends Component<Props$k> {
|
|
6106
6502
|
static template: string;
|
|
6107
6503
|
static defaultProps: {
|
|
6108
6504
|
width: number;
|
|
@@ -6116,10 +6512,10 @@ declare class ScrollBar extends Component<Props$i> {
|
|
|
6116
6512
|
onScroll(ev: any): void;
|
|
6117
6513
|
}
|
|
6118
6514
|
|
|
6119
|
-
interface Props$
|
|
6515
|
+
interface Props$j {
|
|
6120
6516
|
leftOffset: number;
|
|
6121
6517
|
}
|
|
6122
|
-
declare class HorizontalScrollBar extends Component<Props$
|
|
6518
|
+
declare class HorizontalScrollBar extends Component<Props$j, SpreadsheetChildEnv> {
|
|
6123
6519
|
static components: {
|
|
6124
6520
|
ScrollBar: typeof ScrollBar;
|
|
6125
6521
|
};
|
|
@@ -6139,10 +6535,10 @@ declare class HorizontalScrollBar extends Component<Props$h, SpreadsheetChildEnv
|
|
|
6139
6535
|
onScroll(offset: any): void;
|
|
6140
6536
|
}
|
|
6141
6537
|
|
|
6142
|
-
interface Props$
|
|
6538
|
+
interface Props$i {
|
|
6143
6539
|
topOffset: number;
|
|
6144
6540
|
}
|
|
6145
|
-
declare class VerticalScrollBar extends Component<Props$
|
|
6541
|
+
declare class VerticalScrollBar extends Component<Props$i, SpreadsheetChildEnv> {
|
|
6146
6542
|
static components: {
|
|
6147
6543
|
ScrollBar: typeof ScrollBar;
|
|
6148
6544
|
};
|
|
@@ -6162,7 +6558,7 @@ declare class VerticalScrollBar extends Component<Props$g, SpreadsheetChildEnv>
|
|
|
6162
6558
|
onScroll(offset: any): void;
|
|
6163
6559
|
}
|
|
6164
6560
|
|
|
6165
|
-
interface Props$
|
|
6561
|
+
interface Props$h {
|
|
6166
6562
|
}
|
|
6167
6563
|
interface ClickableCell {
|
|
6168
6564
|
coordinates: Rect;
|
|
@@ -6170,7 +6566,7 @@ interface ClickableCell {
|
|
|
6170
6566
|
action: (position: CellPosition, env: SpreadsheetChildEnv) => void;
|
|
6171
6567
|
tKey: string;
|
|
6172
6568
|
}
|
|
6173
|
-
declare class SpreadsheetDashboard extends Component<Props$
|
|
6569
|
+
declare class SpreadsheetDashboard extends Component<Props$h, SpreadsheetChildEnv> {
|
|
6174
6570
|
static template: string;
|
|
6175
6571
|
static components: {
|
|
6176
6572
|
GridOverlay: typeof GridOverlay;
|
|
@@ -6206,17 +6602,77 @@ declare class SpreadsheetDashboard extends Component<Props$f, SpreadsheetChildEn
|
|
|
6206
6602
|
private getGridRect;
|
|
6207
6603
|
}
|
|
6208
6604
|
|
|
6605
|
+
interface Props$g {
|
|
6606
|
+
group: HeaderGroup;
|
|
6607
|
+
layerOffset: number;
|
|
6608
|
+
openContextMenu(position: DOMCoordinates, menuItems: Action[]): void;
|
|
6609
|
+
}
|
|
6610
|
+
interface GroupBox {
|
|
6611
|
+
groupRect: Rect;
|
|
6612
|
+
headerRect: Rect;
|
|
6613
|
+
isEndHidden: boolean;
|
|
6614
|
+
}
|
|
6615
|
+
declare abstract class AbstractHeaderGroup extends Component<Props$g, SpreadsheetChildEnv> {
|
|
6616
|
+
static template: string;
|
|
6617
|
+
abstract dimension: Dimension;
|
|
6618
|
+
toggleGroup(): void;
|
|
6619
|
+
get groupBoxStyle(): string;
|
|
6620
|
+
abstract get groupBorderStyle(): string;
|
|
6621
|
+
abstract get groupHeaderStyle(): string;
|
|
6622
|
+
get groupButtonStyle(): string;
|
|
6623
|
+
get groupButtonIcon(): string;
|
|
6624
|
+
get isGroupFolded(): boolean;
|
|
6625
|
+
/** The box that will be used to draw the header group. */
|
|
6626
|
+
abstract get groupBox(): GroupBox;
|
|
6627
|
+
onContextMenu(ev: MouseEvent): void;
|
|
6628
|
+
}
|
|
6629
|
+
declare class RowGroup extends AbstractHeaderGroup {
|
|
6630
|
+
dimension: Dimension;
|
|
6631
|
+
get groupBorderStyle(): string;
|
|
6632
|
+
get groupHeaderStyle(): string;
|
|
6633
|
+
get groupBox(): GroupBox;
|
|
6634
|
+
}
|
|
6635
|
+
declare class ColGroup extends AbstractHeaderGroup {
|
|
6636
|
+
dimension: Dimension;
|
|
6637
|
+
get groupBorderStyle(): string;
|
|
6638
|
+
get groupHeaderStyle(): string;
|
|
6639
|
+
get groupBox(): GroupBox;
|
|
6640
|
+
}
|
|
6641
|
+
|
|
6642
|
+
interface Props$f {
|
|
6643
|
+
dimension: Dimension;
|
|
6644
|
+
layers: HeaderGroup[][];
|
|
6645
|
+
}
|
|
6646
|
+
declare class HeaderGroupContainer extends Component<Props$f, SpreadsheetChildEnv> {
|
|
6647
|
+
static template: string;
|
|
6648
|
+
static components: {
|
|
6649
|
+
RowGroup: typeof RowGroup;
|
|
6650
|
+
ColGroup: typeof ColGroup;
|
|
6651
|
+
Menu: typeof Menu;
|
|
6652
|
+
};
|
|
6653
|
+
menu: MenuState;
|
|
6654
|
+
getLayerOffset(layerIndex: number): number;
|
|
6655
|
+
onContextMenu(event: MouseEvent): void;
|
|
6656
|
+
openContextMenu(position: DOMCoordinates, menuItems: Action[]): void;
|
|
6657
|
+
closeMenu(): void;
|
|
6658
|
+
get groupComponent(): typeof RowGroup;
|
|
6659
|
+
get hasFrozenPane(): boolean;
|
|
6660
|
+
get scrollContainerStyle(): string;
|
|
6661
|
+
get frozenPaneContainerStyle(): string;
|
|
6662
|
+
get frozenPaneContainerSize(): Pixel;
|
|
6663
|
+
}
|
|
6664
|
+
|
|
6209
6665
|
interface Props$e {
|
|
6210
6666
|
component: string;
|
|
6211
6667
|
panelProps: any;
|
|
6212
6668
|
onCloseSidePanel: () => void;
|
|
6213
6669
|
}
|
|
6214
|
-
interface State$
|
|
6670
|
+
interface State$5 {
|
|
6215
6671
|
panel: SidePanelContent;
|
|
6216
6672
|
}
|
|
6217
6673
|
declare class SidePanel extends Component<Props$e, SpreadsheetChildEnv> {
|
|
6218
6674
|
static template: string;
|
|
6219
|
-
state: State$
|
|
6675
|
+
state: State$5;
|
|
6220
6676
|
setup(): void;
|
|
6221
6677
|
getTitle(): string;
|
|
6222
6678
|
}
|
|
@@ -6242,48 +6698,48 @@ declare const deleteCellShiftUp: ActionSpec;
|
|
|
6242
6698
|
declare const deleteCellShiftLeft: ActionSpec;
|
|
6243
6699
|
declare const mergeCells: ActionSpec;
|
|
6244
6700
|
|
|
6245
|
-
declare const
|
|
6246
|
-
declare const
|
|
6701
|
+
declare const ACTION_EDIT_clearCols: typeof clearCols;
|
|
6702
|
+
declare const ACTION_EDIT_clearRows: typeof clearRows;
|
|
6247
6703
|
declare const ACTION_EDIT_copy: typeof copy;
|
|
6248
6704
|
declare const ACTION_EDIT_cut: typeof cut;
|
|
6705
|
+
declare const ACTION_EDIT_deleteCellShiftLeft: typeof deleteCellShiftLeft;
|
|
6706
|
+
declare const ACTION_EDIT_deleteCellShiftUp: typeof deleteCellShiftUp;
|
|
6707
|
+
declare const ACTION_EDIT_deleteCells: typeof deleteCells;
|
|
6708
|
+
declare const ACTION_EDIT_deleteCol: typeof deleteCol;
|
|
6709
|
+
declare const ACTION_EDIT_deleteCols: typeof deleteCols;
|
|
6710
|
+
declare const ACTION_EDIT_deleteRow: typeof deleteRow;
|
|
6711
|
+
declare const ACTION_EDIT_deleteRows: typeof deleteRows;
|
|
6712
|
+
declare const ACTION_EDIT_deleteValues: typeof deleteValues;
|
|
6713
|
+
declare const ACTION_EDIT_findAndReplace: typeof findAndReplace;
|
|
6714
|
+
declare const ACTION_EDIT_mergeCells: typeof mergeCells;
|
|
6249
6715
|
declare const ACTION_EDIT_paste: typeof paste;
|
|
6250
6716
|
declare const ACTION_EDIT_pasteSpecial: typeof pasteSpecial;
|
|
6251
|
-
declare const ACTION_EDIT_pasteSpecialValue: typeof pasteSpecialValue;
|
|
6252
6717
|
declare const ACTION_EDIT_pasteSpecialFormat: typeof pasteSpecialFormat;
|
|
6253
|
-
declare const
|
|
6254
|
-
declare const
|
|
6255
|
-
declare const
|
|
6256
|
-
declare const ACTION_EDIT_deleteRow: typeof deleteRow;
|
|
6257
|
-
declare const ACTION_EDIT_clearRows: typeof clearRows;
|
|
6258
|
-
declare const ACTION_EDIT_deleteCols: typeof deleteCols;
|
|
6259
|
-
declare const ACTION_EDIT_deleteCol: typeof deleteCol;
|
|
6260
|
-
declare const ACTION_EDIT_clearCols: typeof clearCols;
|
|
6261
|
-
declare const ACTION_EDIT_deleteCells: typeof deleteCells;
|
|
6262
|
-
declare const ACTION_EDIT_deleteCellShiftUp: typeof deleteCellShiftUp;
|
|
6263
|
-
declare const ACTION_EDIT_deleteCellShiftLeft: typeof deleteCellShiftLeft;
|
|
6264
|
-
declare const ACTION_EDIT_mergeCells: typeof mergeCells;
|
|
6718
|
+
declare const ACTION_EDIT_pasteSpecialValue: typeof pasteSpecialValue;
|
|
6719
|
+
declare const ACTION_EDIT_redo: typeof redo;
|
|
6720
|
+
declare const ACTION_EDIT_undo: typeof undo;
|
|
6265
6721
|
declare namespace ACTION_EDIT {
|
|
6266
6722
|
export {
|
|
6267
|
-
|
|
6268
|
-
|
|
6723
|
+
ACTION_EDIT_clearCols as clearCols,
|
|
6724
|
+
ACTION_EDIT_clearRows as clearRows,
|
|
6269
6725
|
ACTION_EDIT_copy as copy,
|
|
6270
6726
|
ACTION_EDIT_cut as cut,
|
|
6727
|
+
ACTION_EDIT_deleteCellShiftLeft as deleteCellShiftLeft,
|
|
6728
|
+
ACTION_EDIT_deleteCellShiftUp as deleteCellShiftUp,
|
|
6729
|
+
ACTION_EDIT_deleteCells as deleteCells,
|
|
6730
|
+
ACTION_EDIT_deleteCol as deleteCol,
|
|
6731
|
+
ACTION_EDIT_deleteCols as deleteCols,
|
|
6732
|
+
ACTION_EDIT_deleteRow as deleteRow,
|
|
6733
|
+
ACTION_EDIT_deleteRows as deleteRows,
|
|
6734
|
+
ACTION_EDIT_deleteValues as deleteValues,
|
|
6735
|
+
ACTION_EDIT_findAndReplace as findAndReplace,
|
|
6736
|
+
ACTION_EDIT_mergeCells as mergeCells,
|
|
6271
6737
|
ACTION_EDIT_paste as paste,
|
|
6272
6738
|
ACTION_EDIT_pasteSpecial as pasteSpecial,
|
|
6273
|
-
ACTION_EDIT_pasteSpecialValue as pasteSpecialValue,
|
|
6274
6739
|
ACTION_EDIT_pasteSpecialFormat as pasteSpecialFormat,
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
ACTION_EDIT_deleteRow as deleteRow,
|
|
6279
|
-
ACTION_EDIT_clearRows as clearRows,
|
|
6280
|
-
ACTION_EDIT_deleteCols as deleteCols,
|
|
6281
|
-
ACTION_EDIT_deleteCol as deleteCol,
|
|
6282
|
-
ACTION_EDIT_clearCols as clearCols,
|
|
6283
|
-
ACTION_EDIT_deleteCells as deleteCells,
|
|
6284
|
-
ACTION_EDIT_deleteCellShiftUp as deleteCellShiftUp,
|
|
6285
|
-
ACTION_EDIT_deleteCellShiftLeft as deleteCellShiftLeft,
|
|
6286
|
-
ACTION_EDIT_mergeCells as mergeCells,
|
|
6740
|
+
ACTION_EDIT_pasteSpecialValue as pasteSpecialValue,
|
|
6741
|
+
ACTION_EDIT_redo as redo,
|
|
6742
|
+
ACTION_EDIT_undo as undo,
|
|
6287
6743
|
};
|
|
6288
6744
|
}
|
|
6289
6745
|
|
|
@@ -6324,80 +6780,80 @@ declare const fillColor: ActionSpec;
|
|
|
6324
6780
|
declare const formatCF: ActionSpec;
|
|
6325
6781
|
declare const clearFormat: ActionSpec;
|
|
6326
6782
|
|
|
6783
|
+
declare const ACTION_FORMAT_clearFormat: typeof clearFormat;
|
|
6784
|
+
declare const ACTION_FORMAT_decraseDecimalPlaces: typeof decraseDecimalPlaces;
|
|
6785
|
+
declare const ACTION_FORMAT_fillColor: typeof fillColor;
|
|
6786
|
+
declare const ACTION_FORMAT_formatAlignment: typeof formatAlignment;
|
|
6787
|
+
declare const ACTION_FORMAT_formatAlignmentBottom: typeof formatAlignmentBottom;
|
|
6788
|
+
declare const ACTION_FORMAT_formatAlignmentCenter: typeof formatAlignmentCenter;
|
|
6789
|
+
declare const ACTION_FORMAT_formatAlignmentHorizontal: typeof formatAlignmentHorizontal;
|
|
6790
|
+
declare const ACTION_FORMAT_formatAlignmentLeft: typeof formatAlignmentLeft;
|
|
6791
|
+
declare const ACTION_FORMAT_formatAlignmentMiddle: typeof formatAlignmentMiddle;
|
|
6792
|
+
declare const ACTION_FORMAT_formatAlignmentRight: typeof formatAlignmentRight;
|
|
6793
|
+
declare const ACTION_FORMAT_formatAlignmentTop: typeof formatAlignmentTop;
|
|
6794
|
+
declare const ACTION_FORMAT_formatAlignmentVertical: typeof formatAlignmentVertical;
|
|
6795
|
+
declare const ACTION_FORMAT_formatBold: typeof formatBold;
|
|
6796
|
+
declare const ACTION_FORMAT_formatCF: typeof formatCF;
|
|
6797
|
+
declare const ACTION_FORMAT_formatCustomCurrency: typeof formatCustomCurrency;
|
|
6798
|
+
declare const ACTION_FORMAT_formatFontSize: typeof formatFontSize;
|
|
6799
|
+
declare const ACTION_FORMAT_formatItalic: typeof formatItalic;
|
|
6327
6800
|
declare const ACTION_FORMAT_formatNumberAutomatic: typeof formatNumberAutomatic;
|
|
6328
|
-
declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
|
|
6329
|
-
declare const ACTION_FORMAT_formatPercent: typeof formatPercent;
|
|
6330
|
-
declare const ACTION_FORMAT_formatNumberPercent: typeof formatNumberPercent;
|
|
6331
6801
|
declare const ACTION_FORMAT_formatNumberCurrency: typeof formatNumberCurrency;
|
|
6332
6802
|
declare const ACTION_FORMAT_formatNumberCurrencyRounded: typeof formatNumberCurrencyRounded;
|
|
6333
|
-
declare const ACTION_FORMAT_formatCustomCurrency: typeof formatCustomCurrency;
|
|
6334
6803
|
declare const ACTION_FORMAT_formatNumberDate: typeof formatNumberDate;
|
|
6335
|
-
declare const ACTION_FORMAT_formatNumberTime: typeof formatNumberTime;
|
|
6336
6804
|
declare const ACTION_FORMAT_formatNumberDateTime: typeof formatNumberDateTime;
|
|
6337
6805
|
declare const ACTION_FORMAT_formatNumberDuration: typeof formatNumberDuration;
|
|
6338
|
-
declare const
|
|
6339
|
-
declare const
|
|
6340
|
-
declare const
|
|
6341
|
-
declare const
|
|
6342
|
-
declare const ACTION_FORMAT_formatUnderline: typeof formatUnderline;
|
|
6806
|
+
declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
|
|
6807
|
+
declare const ACTION_FORMAT_formatNumberPercent: typeof formatNumberPercent;
|
|
6808
|
+
declare const ACTION_FORMAT_formatNumberTime: typeof formatNumberTime;
|
|
6809
|
+
declare const ACTION_FORMAT_formatPercent: typeof formatPercent;
|
|
6343
6810
|
declare const ACTION_FORMAT_formatStrikethrough: typeof formatStrikethrough;
|
|
6344
|
-
declare const
|
|
6345
|
-
declare const ACTION_FORMAT_formatAlignment: typeof formatAlignment;
|
|
6346
|
-
declare const ACTION_FORMAT_formatAlignmentHorizontal: typeof formatAlignmentHorizontal;
|
|
6347
|
-
declare const ACTION_FORMAT_formatAlignmentLeft: typeof formatAlignmentLeft;
|
|
6348
|
-
declare const ACTION_FORMAT_formatAlignmentCenter: typeof formatAlignmentCenter;
|
|
6349
|
-
declare const ACTION_FORMAT_formatAlignmentRight: typeof formatAlignmentRight;
|
|
6350
|
-
declare const ACTION_FORMAT_formatAlignmentVertical: typeof formatAlignmentVertical;
|
|
6351
|
-
declare const ACTION_FORMAT_formatAlignmentTop: typeof formatAlignmentTop;
|
|
6352
|
-
declare const ACTION_FORMAT_formatAlignmentMiddle: typeof formatAlignmentMiddle;
|
|
6353
|
-
declare const ACTION_FORMAT_formatAlignmentBottom: typeof formatAlignmentBottom;
|
|
6354
|
-
declare const ACTION_FORMAT_formatWrappingIcon: typeof formatWrappingIcon;
|
|
6811
|
+
declare const ACTION_FORMAT_formatUnderline: typeof formatUnderline;
|
|
6355
6812
|
declare const ACTION_FORMAT_formatWrapping: typeof formatWrapping;
|
|
6813
|
+
declare const ACTION_FORMAT_formatWrappingClip: typeof formatWrappingClip;
|
|
6814
|
+
declare const ACTION_FORMAT_formatWrappingIcon: typeof formatWrappingIcon;
|
|
6356
6815
|
declare const ACTION_FORMAT_formatWrappingOverflow: typeof formatWrappingOverflow;
|
|
6357
6816
|
declare const ACTION_FORMAT_formatWrappingWrap: typeof formatWrappingWrap;
|
|
6358
|
-
declare const
|
|
6817
|
+
declare const ACTION_FORMAT_incraseDecimalPlaces: typeof incraseDecimalPlaces;
|
|
6359
6818
|
declare const ACTION_FORMAT_textColor: typeof textColor;
|
|
6360
|
-
declare const ACTION_FORMAT_fillColor: typeof fillColor;
|
|
6361
|
-
declare const ACTION_FORMAT_formatCF: typeof formatCF;
|
|
6362
|
-
declare const ACTION_FORMAT_clearFormat: typeof clearFormat;
|
|
6363
6819
|
declare namespace ACTION_FORMAT {
|
|
6364
6820
|
export {
|
|
6821
|
+
ACTION_FORMAT_clearFormat as clearFormat,
|
|
6822
|
+
ACTION_FORMAT_decraseDecimalPlaces as decraseDecimalPlaces,
|
|
6823
|
+
ACTION_FORMAT_fillColor as fillColor,
|
|
6824
|
+
ACTION_FORMAT_formatAlignment as formatAlignment,
|
|
6825
|
+
ACTION_FORMAT_formatAlignmentBottom as formatAlignmentBottom,
|
|
6826
|
+
ACTION_FORMAT_formatAlignmentCenter as formatAlignmentCenter,
|
|
6827
|
+
ACTION_FORMAT_formatAlignmentHorizontal as formatAlignmentHorizontal,
|
|
6828
|
+
ACTION_FORMAT_formatAlignmentLeft as formatAlignmentLeft,
|
|
6829
|
+
ACTION_FORMAT_formatAlignmentMiddle as formatAlignmentMiddle,
|
|
6830
|
+
ACTION_FORMAT_formatAlignmentRight as formatAlignmentRight,
|
|
6831
|
+
ACTION_FORMAT_formatAlignmentTop as formatAlignmentTop,
|
|
6832
|
+
ACTION_FORMAT_formatAlignmentVertical as formatAlignmentVertical,
|
|
6833
|
+
ACTION_FORMAT_formatBold as formatBold,
|
|
6834
|
+
ACTION_FORMAT_formatCF as formatCF,
|
|
6835
|
+
ACTION_FORMAT_formatCustomCurrency as formatCustomCurrency,
|
|
6836
|
+
ACTION_FORMAT_formatFontSize as formatFontSize,
|
|
6837
|
+
ACTION_FORMAT_formatItalic as formatItalic,
|
|
6365
6838
|
ACTION_FORMAT_formatNumberAutomatic as formatNumberAutomatic,
|
|
6366
|
-
ACTION_FORMAT_formatNumberNumber as formatNumberNumber,
|
|
6367
|
-
ACTION_FORMAT_formatPercent as formatPercent,
|
|
6368
|
-
ACTION_FORMAT_formatNumberPercent as formatNumberPercent,
|
|
6369
6839
|
ACTION_FORMAT_formatNumberCurrency as formatNumberCurrency,
|
|
6370
6840
|
ACTION_FORMAT_formatNumberCurrencyRounded as formatNumberCurrencyRounded,
|
|
6371
|
-
ACTION_FORMAT_formatCustomCurrency as formatCustomCurrency,
|
|
6372
6841
|
ACTION_FORMAT_formatNumberDate as formatNumberDate,
|
|
6373
|
-
ACTION_FORMAT_formatNumberTime as formatNumberTime,
|
|
6374
6842
|
ACTION_FORMAT_formatNumberDateTime as formatNumberDateTime,
|
|
6375
6843
|
ACTION_FORMAT_formatNumberDuration as formatNumberDuration,
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
ACTION_FORMAT_formatUnderline as formatUnderline,
|
|
6844
|
+
ACTION_FORMAT_formatNumberNumber as formatNumberNumber,
|
|
6845
|
+
ACTION_FORMAT_formatNumberPercent as formatNumberPercent,
|
|
6846
|
+
ACTION_FORMAT_formatNumberTime as formatNumberTime,
|
|
6847
|
+
ACTION_FORMAT_formatPercent as formatPercent,
|
|
6381
6848
|
ACTION_FORMAT_formatStrikethrough as formatStrikethrough,
|
|
6382
|
-
|
|
6383
|
-
ACTION_FORMAT_formatAlignment as formatAlignment,
|
|
6384
|
-
ACTION_FORMAT_formatAlignmentHorizontal as formatAlignmentHorizontal,
|
|
6385
|
-
ACTION_FORMAT_formatAlignmentLeft as formatAlignmentLeft,
|
|
6386
|
-
ACTION_FORMAT_formatAlignmentCenter as formatAlignmentCenter,
|
|
6387
|
-
ACTION_FORMAT_formatAlignmentRight as formatAlignmentRight,
|
|
6388
|
-
ACTION_FORMAT_formatAlignmentVertical as formatAlignmentVertical,
|
|
6389
|
-
ACTION_FORMAT_formatAlignmentTop as formatAlignmentTop,
|
|
6390
|
-
ACTION_FORMAT_formatAlignmentMiddle as formatAlignmentMiddle,
|
|
6391
|
-
ACTION_FORMAT_formatAlignmentBottom as formatAlignmentBottom,
|
|
6392
|
-
ACTION_FORMAT_formatWrappingIcon as formatWrappingIcon,
|
|
6849
|
+
ACTION_FORMAT_formatUnderline as formatUnderline,
|
|
6393
6850
|
ACTION_FORMAT_formatWrapping as formatWrapping,
|
|
6851
|
+
ACTION_FORMAT_formatWrappingClip as formatWrappingClip,
|
|
6852
|
+
ACTION_FORMAT_formatWrappingIcon as formatWrappingIcon,
|
|
6394
6853
|
ACTION_FORMAT_formatWrappingOverflow as formatWrappingOverflow,
|
|
6395
6854
|
ACTION_FORMAT_formatWrappingWrap as formatWrappingWrap,
|
|
6396
|
-
|
|
6855
|
+
ACTION_FORMAT_incraseDecimalPlaces as incraseDecimalPlaces,
|
|
6397
6856
|
ACTION_FORMAT_textColor as textColor,
|
|
6398
|
-
ACTION_FORMAT_fillColor as fillColor,
|
|
6399
|
-
ACTION_FORMAT_formatCF as formatCF,
|
|
6400
|
-
ACTION_FORMAT_clearFormat as clearFormat,
|
|
6401
6857
|
};
|
|
6402
6858
|
}
|
|
6403
6859
|
|
|
@@ -6420,47 +6876,62 @@ declare const freezeCurrentCol: ActionSpec;
|
|
|
6420
6876
|
declare const viewGridlines: ActionSpec;
|
|
6421
6877
|
declare const viewFormulas: ActionSpec;
|
|
6422
6878
|
declare const createRemoveFilter: ActionSpec;
|
|
6879
|
+
declare const groupColumns: ActionSpec;
|
|
6880
|
+
declare const groupRows: ActionSpec;
|
|
6881
|
+
declare const ungroupColumns: ActionSpec;
|
|
6882
|
+
declare const ungroupRows: ActionSpec;
|
|
6883
|
+
declare function canUngroupHeaders(env: SpreadsheetChildEnv, dimension: Dimension): boolean;
|
|
6423
6884
|
|
|
6885
|
+
declare const ACTION_VIEW_canUngroupHeaders: typeof canUngroupHeaders;
|
|
6886
|
+
declare const ACTION_VIEW_createRemoveFilter: typeof createRemoveFilter;
|
|
6887
|
+
declare const ACTION_VIEW_freezeCurrentCol: typeof freezeCurrentCol;
|
|
6888
|
+
declare const ACTION_VIEW_freezeCurrentRow: typeof freezeCurrentRow;
|
|
6889
|
+
declare const ACTION_VIEW_freezeFirstCol: typeof freezeFirstCol;
|
|
6890
|
+
declare const ACTION_VIEW_freezeFirstRow: typeof freezeFirstRow;
|
|
6891
|
+
declare const ACTION_VIEW_freezePane: typeof freezePane;
|
|
6892
|
+
declare const ACTION_VIEW_freezeSecondCol: typeof freezeSecondCol;
|
|
6893
|
+
declare const ACTION_VIEW_freezeSecondRow: typeof freezeSecondRow;
|
|
6894
|
+
declare const ACTION_VIEW_groupColumns: typeof groupColumns;
|
|
6895
|
+
declare const ACTION_VIEW_groupRows: typeof groupRows;
|
|
6424
6896
|
declare const ACTION_VIEW_hideCols: typeof hideCols;
|
|
6425
|
-
declare const ACTION_VIEW_unhideCols: typeof unhideCols;
|
|
6426
|
-
declare const ACTION_VIEW_unhideAllCols: typeof unhideAllCols;
|
|
6427
6897
|
declare const ACTION_VIEW_hideRows: typeof hideRows;
|
|
6428
|
-
declare const
|
|
6429
|
-
declare const ACTION_VIEW_unhideAllRows: typeof unhideAllRows;
|
|
6898
|
+
declare const ACTION_VIEW_unFreezeCols: typeof unFreezeCols;
|
|
6430
6899
|
declare const ACTION_VIEW_unFreezePane: typeof unFreezePane;
|
|
6431
|
-
declare const ACTION_VIEW_freezePane: typeof freezePane;
|
|
6432
6900
|
declare const ACTION_VIEW_unFreezeRows: typeof unFreezeRows;
|
|
6433
|
-
declare const
|
|
6434
|
-
declare const
|
|
6435
|
-
declare const
|
|
6436
|
-
declare const
|
|
6437
|
-
declare const
|
|
6438
|
-
declare const
|
|
6439
|
-
declare const ACTION_VIEW_freezeCurrentCol: typeof freezeCurrentCol;
|
|
6440
|
-
declare const ACTION_VIEW_viewGridlines: typeof viewGridlines;
|
|
6901
|
+
declare const ACTION_VIEW_ungroupColumns: typeof ungroupColumns;
|
|
6902
|
+
declare const ACTION_VIEW_ungroupRows: typeof ungroupRows;
|
|
6903
|
+
declare const ACTION_VIEW_unhideAllCols: typeof unhideAllCols;
|
|
6904
|
+
declare const ACTION_VIEW_unhideAllRows: typeof unhideAllRows;
|
|
6905
|
+
declare const ACTION_VIEW_unhideCols: typeof unhideCols;
|
|
6906
|
+
declare const ACTION_VIEW_unhideRows: typeof unhideRows;
|
|
6441
6907
|
declare const ACTION_VIEW_viewFormulas: typeof viewFormulas;
|
|
6442
|
-
declare const
|
|
6908
|
+
declare const ACTION_VIEW_viewGridlines: typeof viewGridlines;
|
|
6443
6909
|
declare namespace ACTION_VIEW {
|
|
6444
6910
|
export {
|
|
6911
|
+
ACTION_VIEW_canUngroupHeaders as canUngroupHeaders,
|
|
6912
|
+
ACTION_VIEW_createRemoveFilter as createRemoveFilter,
|
|
6913
|
+
ACTION_VIEW_freezeCurrentCol as freezeCurrentCol,
|
|
6914
|
+
ACTION_VIEW_freezeCurrentRow as freezeCurrentRow,
|
|
6915
|
+
ACTION_VIEW_freezeFirstCol as freezeFirstCol,
|
|
6916
|
+
ACTION_VIEW_freezeFirstRow as freezeFirstRow,
|
|
6917
|
+
ACTION_VIEW_freezePane as freezePane,
|
|
6918
|
+
ACTION_VIEW_freezeSecondCol as freezeSecondCol,
|
|
6919
|
+
ACTION_VIEW_freezeSecondRow as freezeSecondRow,
|
|
6920
|
+
ACTION_VIEW_groupColumns as groupColumns,
|
|
6921
|
+
ACTION_VIEW_groupRows as groupRows,
|
|
6445
6922
|
ACTION_VIEW_hideCols as hideCols,
|
|
6446
|
-
ACTION_VIEW_unhideCols as unhideCols,
|
|
6447
|
-
ACTION_VIEW_unhideAllCols as unhideAllCols,
|
|
6448
6923
|
ACTION_VIEW_hideRows as hideRows,
|
|
6449
|
-
|
|
6450
|
-
ACTION_VIEW_unhideAllRows as unhideAllRows,
|
|
6924
|
+
ACTION_VIEW_unFreezeCols as unFreezeCols,
|
|
6451
6925
|
ACTION_VIEW_unFreezePane as unFreezePane,
|
|
6452
|
-
ACTION_VIEW_freezePane as freezePane,
|
|
6453
6926
|
ACTION_VIEW_unFreezeRows as unFreezeRows,
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
ACTION_VIEW_freezeCurrentCol as freezeCurrentCol,
|
|
6461
|
-
ACTION_VIEW_viewGridlines as viewGridlines,
|
|
6927
|
+
ACTION_VIEW_ungroupColumns as ungroupColumns,
|
|
6928
|
+
ACTION_VIEW_ungroupRows as ungroupRows,
|
|
6929
|
+
ACTION_VIEW_unhideAllCols as unhideAllCols,
|
|
6930
|
+
ACTION_VIEW_unhideAllRows as unhideAllRows,
|
|
6931
|
+
ACTION_VIEW_unhideCols as unhideCols,
|
|
6932
|
+
ACTION_VIEW_unhideRows as unhideRows,
|
|
6462
6933
|
ACTION_VIEW_viewFormulas as viewFormulas,
|
|
6463
|
-
|
|
6934
|
+
ACTION_VIEW_viewGridlines as viewGridlines,
|
|
6464
6935
|
};
|
|
6465
6936
|
}
|
|
6466
6937
|
|
|
@@ -6485,7 +6956,7 @@ declare class ActionButton extends Component<Props$d, SpreadsheetChildEnv> {
|
|
|
6485
6956
|
}
|
|
6486
6957
|
|
|
6487
6958
|
type Tool = "borderColorTool" | "borderTypeTool";
|
|
6488
|
-
interface State$
|
|
6959
|
+
interface State$4 {
|
|
6489
6960
|
activeTool: Tool | undefined;
|
|
6490
6961
|
}
|
|
6491
6962
|
interface BorderEditorProps {
|
|
@@ -6510,7 +6981,7 @@ declare class BorderEditor extends Component<BorderEditorProps, SpreadsheetChild
|
|
|
6510
6981
|
el: HTMLElement | null;
|
|
6511
6982
|
};
|
|
6512
6983
|
borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
|
|
6513
|
-
state: State$
|
|
6984
|
+
state: State$4;
|
|
6514
6985
|
toggleDropdownTool(tool: Tool): void;
|
|
6515
6986
|
closeDropdown(): void;
|
|
6516
6987
|
setBorderPosition(position: BorderPosition): void;
|
|
@@ -6528,7 +6999,7 @@ interface Props$c {
|
|
|
6528
6999
|
dropdownMaxHeight?: Pixel;
|
|
6529
7000
|
class?: string;
|
|
6530
7001
|
}
|
|
6531
|
-
interface State$
|
|
7002
|
+
interface State$3 {
|
|
6532
7003
|
currentColor: Color;
|
|
6533
7004
|
currentStyle: BorderStyle;
|
|
6534
7005
|
currentPosition: BorderPosition | undefined;
|
|
@@ -6541,7 +7012,7 @@ declare class BorderEditorWidget extends Component<Props$c, SpreadsheetChildEnv>
|
|
|
6541
7012
|
borderEditorButtonRef: {
|
|
6542
7013
|
el: HTMLElement | null;
|
|
6543
7014
|
};
|
|
6544
|
-
state: State$
|
|
7015
|
+
state: State$3;
|
|
6545
7016
|
get borderEditorAnchorRect(): Rect;
|
|
6546
7017
|
onBorderPositionPicked(position: BorderPosition): void;
|
|
6547
7018
|
onBorderColorPicked(color: Color): void;
|
|
@@ -6551,8 +7022,10 @@ declare class BorderEditorWidget extends Component<Props$c, SpreadsheetChildEnv>
|
|
|
6551
7022
|
|
|
6552
7023
|
interface Props$b {
|
|
6553
7024
|
values: AutocompleteValue[];
|
|
6554
|
-
selectedIndex: number;
|
|
7025
|
+
selectedIndex: number | undefined;
|
|
7026
|
+
getHtmlContent: (value: string) => string;
|
|
6555
7027
|
onValueSelected: (value: string) => void;
|
|
7028
|
+
onValueHovered: (index: string) => void;
|
|
6556
7029
|
}
|
|
6557
7030
|
declare class TextValueProvider extends Component<Props$b> {
|
|
6558
7031
|
static template: string;
|
|
@@ -6658,8 +7131,10 @@ interface ComposerState$1 {
|
|
|
6658
7131
|
}
|
|
6659
7132
|
interface AutoCompleteState {
|
|
6660
7133
|
showProvider: boolean;
|
|
6661
|
-
selectedIndex: number;
|
|
7134
|
+
selectedIndex: number | undefined;
|
|
6662
7135
|
values: AutocompleteValue[];
|
|
7136
|
+
type: "function" | "dataValidation";
|
|
7137
|
+
getHtmlContent: (text: string) => HtmlContent[];
|
|
6663
7138
|
}
|
|
6664
7139
|
interface FunctionDescriptionState {
|
|
6665
7140
|
showDescription: boolean;
|
|
@@ -6706,15 +7181,16 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6706
7181
|
onCompositionEnd(): void;
|
|
6707
7182
|
onKeydown(ev: KeyboardEvent): void;
|
|
6708
7183
|
onInput(ev: InputEvent): void;
|
|
6709
|
-
onKeyup(): void;
|
|
6710
|
-
|
|
7184
|
+
onKeyup(ev: KeyboardEvent): void;
|
|
7185
|
+
showFunctionAutocomplete(searchTerm: string): void;
|
|
7186
|
+
updateAutoCompleteIndex(index: number): void;
|
|
6711
7187
|
/**
|
|
6712
7188
|
* This is required to ensure the content helper selection is
|
|
6713
7189
|
* properly updated on "onclick" events. Depending on the browser,
|
|
6714
7190
|
* the callback onClick from the composer will be executed before
|
|
6715
7191
|
* the selection was updated in the dom, which means we capture an
|
|
6716
7192
|
* wrong selection which is then forced upon the content helper on
|
|
6717
|
-
*
|
|
7193
|
+
* processContent.
|
|
6718
7194
|
*/
|
|
6719
7195
|
onMousedown(ev: MouseEvent): void;
|
|
6720
7196
|
onClick(): void;
|
|
@@ -6739,6 +7215,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6739
7215
|
*/
|
|
6740
7216
|
private processTokenAtCursor;
|
|
6741
7217
|
private autoComplete;
|
|
7218
|
+
private showDataValidationAutocomplete;
|
|
6742
7219
|
}
|
|
6743
7220
|
|
|
6744
7221
|
interface Props$9 {
|
|
@@ -6754,7 +7231,7 @@ declare class TopBarComposer extends Component<Props$9, SpreadsheetChildEnv> {
|
|
|
6754
7231
|
get containerStyle(): string;
|
|
6755
7232
|
}
|
|
6756
7233
|
|
|
6757
|
-
interface State$
|
|
7234
|
+
interface State$2 {
|
|
6758
7235
|
isOpen: boolean;
|
|
6759
7236
|
}
|
|
6760
7237
|
interface Props$8 {
|
|
@@ -6766,7 +7243,7 @@ declare class FontSizeEditor extends Component<Props$8, SpreadsheetChildEnv> {
|
|
|
6766
7243
|
static template: string;
|
|
6767
7244
|
static components: {};
|
|
6768
7245
|
fontSizes: number[];
|
|
6769
|
-
dropdown: State$
|
|
7246
|
+
dropdown: State$2;
|
|
6770
7247
|
private inputRef;
|
|
6771
7248
|
private rootEditorRef;
|
|
6772
7249
|
setup(): void;
|
|
@@ -6791,7 +7268,7 @@ declare class PaintFormatButton extends Component<Props$7, SpreadsheetChildEnv>
|
|
|
6791
7268
|
togglePaintFormat(): void;
|
|
6792
7269
|
}
|
|
6793
7270
|
|
|
6794
|
-
interface State {
|
|
7271
|
+
interface State$1 {
|
|
6795
7272
|
menuState: MenuState;
|
|
6796
7273
|
activeTool: string;
|
|
6797
7274
|
fillColor: string;
|
|
@@ -6816,7 +7293,7 @@ declare class TopBar extends Component<Props$6, SpreadsheetChildEnv> {
|
|
|
6816
7293
|
PaintFormatButton: typeof PaintFormatButton;
|
|
6817
7294
|
BorderEditorWidget: typeof BorderEditorWidget;
|
|
6818
7295
|
};
|
|
6819
|
-
state: State;
|
|
7296
|
+
state: State$1;
|
|
6820
7297
|
isSelectingMenu: boolean;
|
|
6821
7298
|
openedEl: HTMLElement | null;
|
|
6822
7299
|
menus: Action[];
|
|
@@ -6861,8 +7338,8 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
|
|
|
6861
7338
|
BottomBar: typeof BottomBar;
|
|
6862
7339
|
SidePanel: typeof SidePanel;
|
|
6863
7340
|
SpreadsheetDashboard: typeof SpreadsheetDashboard;
|
|
7341
|
+
HeaderGroupContainer: typeof HeaderGroupContainer;
|
|
6864
7342
|
};
|
|
6865
|
-
static _t: (s: string) => string;
|
|
6866
7343
|
sidePanel: SidePanelState;
|
|
6867
7344
|
composer: ComposerState;
|
|
6868
7345
|
private _focusGrid?;
|
|
@@ -6876,7 +7353,6 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
|
|
|
6876
7353
|
private bindModelEvents;
|
|
6877
7354
|
private unbindModelEvents;
|
|
6878
7355
|
private checkViewportSize;
|
|
6879
|
-
private onNotifyUI;
|
|
6880
7356
|
openSidePanel(panel: string, panelProps: any): void;
|
|
6881
7357
|
closeSidePanel(): void;
|
|
6882
7358
|
toggleSidePanel(panel: string, panelProps: any): void;
|
|
@@ -6890,6 +7366,9 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
|
|
|
6890
7366
|
*/
|
|
6891
7367
|
private setComposerContent;
|
|
6892
7368
|
get gridHeight(): Pixel;
|
|
7369
|
+
get gridContainerStyle(): string;
|
|
7370
|
+
get rowLayers(): HeaderGroup[][];
|
|
7371
|
+
get colLayers(): HeaderGroup[][];
|
|
6893
7372
|
}
|
|
6894
7373
|
|
|
6895
7374
|
interface Props$5 {
|
|
@@ -7088,7 +7567,7 @@ declare class Highlight extends Component<Props$2, SpreadsheetChildEnv> {
|
|
|
7088
7567
|
* - a horizontal resizer (to resize columns)
|
|
7089
7568
|
* - a vertical resizer (same, for rows)
|
|
7090
7569
|
*/
|
|
7091
|
-
type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER";
|
|
7570
|
+
type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER" | "GROUP_HEADERS" | "UNGROUP_HEADERS";
|
|
7092
7571
|
interface Props$1 {
|
|
7093
7572
|
sidePanelIsOpen: boolean;
|
|
7094
7573
|
exposeFocus: (focus: () => void) => void;
|
|
@@ -7158,7 +7637,34 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7158
7637
|
private clearFormatting;
|
|
7159
7638
|
private setHorizontalAlign;
|
|
7160
7639
|
closeMenu(): void;
|
|
7640
|
+
private processHeaderGroupingKey;
|
|
7641
|
+
private processHeaderGroupingEventOnHeaders;
|
|
7642
|
+
private processHeaderGroupingEventOnWholeSheet;
|
|
7643
|
+
private processHeaderGroupingEventOnGrid;
|
|
7644
|
+
}
|
|
7645
|
+
|
|
7646
|
+
type Direction = "horizontal" | "vertical";
|
|
7647
|
+
interface DragAndDropItemsPartial {
|
|
7648
|
+
id: UID;
|
|
7649
|
+
size: Pixel;
|
|
7650
|
+
position: Pixel;
|
|
7651
|
+
}
|
|
7652
|
+
interface DndPartialArgs {
|
|
7653
|
+
draggedItemId: UID;
|
|
7654
|
+
initialMousePosition: Pixel;
|
|
7655
|
+
items: DragAndDropItemsPartial[];
|
|
7656
|
+
containerEl: HTMLElement;
|
|
7657
|
+
onChange?: () => void;
|
|
7658
|
+
onCancel?: () => void;
|
|
7659
|
+
onDragEnd?: (itemId: UID, indexAtEnd: Pixel) => void;
|
|
7161
7660
|
}
|
|
7661
|
+
interface State {
|
|
7662
|
+
itemsStyle: Record<UID, string>;
|
|
7663
|
+
draggedItemId: UID | undefined;
|
|
7664
|
+
start: (direction: Direction, args: DndPartialArgs) => void;
|
|
7665
|
+
cancel: () => void;
|
|
7666
|
+
}
|
|
7667
|
+
declare function useDragAndDropListItems(): State;
|
|
7162
7668
|
|
|
7163
7669
|
interface Props {
|
|
7164
7670
|
onCloseSidePanel: () => void;
|
|
@@ -7197,7 +7703,7 @@ declare function chartFontColor(backgroundColor: Color | undefined): Color;
|
|
|
7197
7703
|
/**
|
|
7198
7704
|
* Get a default chart js configuration
|
|
7199
7705
|
*/
|
|
7200
|
-
declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale }: LocaleFormat): ChartConfiguration
|
|
7706
|
+
declare function getDefaultChartJsRuntime(chart: AbstractChart, labels: string[], fontColor: Color, { format, locale }: LocaleFormat): Required<ChartConfiguration>;
|
|
7201
7707
|
/** See https://www.chartjs.org/docs/latest/charts/area.html#filling-modes */
|
|
7202
7708
|
declare function getFillingMode(index: number): "origin" | number;
|
|
7203
7709
|
|
|
@@ -7215,6 +7721,17 @@ declare function createEmptyExcelSheet(sheetId: UID, name: string): ExcelSheetDa
|
|
|
7215
7721
|
|
|
7216
7722
|
declare function genericRepeat<T extends Command>(getters: Getters, command: T): T;
|
|
7217
7723
|
|
|
7724
|
+
type SprintfValues = (string | String | number)[] | [{
|
|
7725
|
+
[key: string]: string | number;
|
|
7726
|
+
}];
|
|
7727
|
+
type TranslationFunction = (string: string, ...values: SprintfValues) => string;
|
|
7728
|
+
/***
|
|
7729
|
+
* Allow to inject a translation function from outside o-spreadsheet.
|
|
7730
|
+
* @param tfn the function that will do the translation
|
|
7731
|
+
* @param loaded a function that returns true when the translation is loaded
|
|
7732
|
+
*/
|
|
7733
|
+
declare function setTranslationMethod(tfn: TranslationFunction, loaded?: () => boolean): void;
|
|
7734
|
+
|
|
7218
7735
|
/**
|
|
7219
7736
|
* We export here all entities that needs to be accessed publicly by Odoo.
|
|
7220
7737
|
*
|
|
@@ -7242,7 +7759,7 @@ declare const registries: {
|
|
|
7242
7759
|
linkMenuRegistry: MenuItemRegistry;
|
|
7243
7760
|
functionRegistry: {
|
|
7244
7761
|
mapping: {
|
|
7245
|
-
[key: string]: ComputeFunction<Arg,
|
|
7762
|
+
[key: string]: ComputeFunction<Arg, ValueAndFormat | Matrix<ValueAndFormat>>;
|
|
7246
7763
|
};
|
|
7247
7764
|
add(name: string, addDescr: AddFunctionDescription): any;
|
|
7248
7765
|
content: {
|
|
@@ -7318,6 +7835,8 @@ declare const helpers: {
|
|
|
7318
7835
|
isDefined: typeof isDefined;
|
|
7319
7836
|
lazy: typeof lazy;
|
|
7320
7837
|
genericRepeat: typeof genericRepeat;
|
|
7838
|
+
createAction: typeof createAction;
|
|
7839
|
+
createActions: typeof createActions;
|
|
7321
7840
|
};
|
|
7322
7841
|
declare const links: {
|
|
7323
7842
|
isMarkdownLink: typeof isMarkdownLink;
|
|
@@ -7342,10 +7861,16 @@ declare const components: {
|
|
|
7342
7861
|
ScorecardChartConfigPanel: typeof ScorecardChartConfigPanel;
|
|
7343
7862
|
ScorecardChartDesignPanel: typeof ScorecardChartDesignPanel;
|
|
7344
7863
|
FigureComponent: typeof FigureComponent;
|
|
7864
|
+
Menu: typeof Menu;
|
|
7865
|
+
};
|
|
7866
|
+
declare const hooks: {
|
|
7867
|
+
useDragAndDropListItems: typeof useDragAndDropListItems;
|
|
7868
|
+
};
|
|
7869
|
+
declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
|
|
7870
|
+
addFunction: (fName: string, fDescription: AddFunctionDescription) => any;
|
|
7345
7871
|
};
|
|
7346
|
-
declare function addFunction(functionName: string, functionDescription: FunctionDescription): void;
|
|
7347
7872
|
declare const constants: {
|
|
7348
7873
|
DEFAULT_LOCALE: Locale;
|
|
7349
7874
|
};
|
|
7350
7875
|
|
|
7351
|
-
export { AbstractChart, CancelledReason, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, TransportService, UIPlugin, __info__, addFunction, astToFormula, compile, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
7876
|
+
export { AbstractChart, CancelledReason, Client, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, CollaborationMessage, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, RemoteRevisionMessage, Revision, RevisionRedoneMessage, RevisionUndoneMessage, SPREADSHEET_DIMENSIONS, Spreadsheet, TransportService, UIPlugin, __info__, addFunction, astToFormula, compile, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|