@odoo/o-spreadsheet 16.5.0-alpha.8 → 17.0.0
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 +7262 -4322
- package/dist/o-spreadsheet.d.ts +545 -208
- package/dist/o-spreadsheet.esm.js +7263 -4324
- package/dist/o-spreadsheet.iife.js +7260 -4320
- package/dist/o-spreadsheet.iife.min.js +582 -552
- package/package.json +2 -2
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -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: {
|
|
@@ -585,7 +586,6 @@ interface IconSetRule {
|
|
|
585
586
|
lowerInflectionPoint: IconThreshold;
|
|
586
587
|
}
|
|
587
588
|
type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";
|
|
588
|
-
type UpDown = "up" | "down";
|
|
589
589
|
|
|
590
590
|
interface CellData {
|
|
591
591
|
content?: string;
|
|
@@ -623,6 +623,7 @@ interface SheetData {
|
|
|
623
623
|
[key: number]: HeaderData;
|
|
624
624
|
};
|
|
625
625
|
conditionalFormats: ConditionalFormat[];
|
|
626
|
+
dataValidationRules?: DataValidationRuleData[];
|
|
626
627
|
filterTables: FilterTableData[];
|
|
627
628
|
areGridLinesVisible?: boolean;
|
|
628
629
|
isVisible: boolean;
|
|
@@ -672,6 +673,9 @@ interface ExcelSheetData extends Omit<SheetData, "figureTables"> {
|
|
|
672
673
|
interface FilterTableData {
|
|
673
674
|
range: string;
|
|
674
675
|
}
|
|
676
|
+
interface DataValidationRuleData extends Omit<DataValidationRule, "ranges"> {
|
|
677
|
+
ranges: string[];
|
|
678
|
+
}
|
|
675
679
|
interface ExcelFilterTableData {
|
|
676
680
|
range: string;
|
|
677
681
|
filters: ExcelFilterData[];
|
|
@@ -903,6 +907,15 @@ declare function colorToRGBA(color: Color): RGBA;
|
|
|
903
907
|
* 27 => 'AB'
|
|
904
908
|
*/
|
|
905
909
|
declare function numberToLetters(n: number): string;
|
|
910
|
+
/**
|
|
911
|
+
* Convert a string (describing a column) to its number value.
|
|
912
|
+
*
|
|
913
|
+
* Examples:
|
|
914
|
+
* 'A' => 0
|
|
915
|
+
* 'Z' => 25
|
|
916
|
+
* 'AA' => 26
|
|
917
|
+
*/
|
|
918
|
+
declare function lettersToNumber(letters: string): number;
|
|
906
919
|
/**
|
|
907
920
|
* Convert a "XC" coordinate to cartesian coordinates.
|
|
908
921
|
*
|
|
@@ -971,7 +984,7 @@ declare class RangeImpl implements Range {
|
|
|
971
984
|
constructor(args: ConstructorArgs, getSheetSize: (sheetId: UID) => ZoneDimension);
|
|
972
985
|
static fromRange(range: Range, getters: CoreGetters): RangeImpl;
|
|
973
986
|
get unboundedZone(): UnboundedZone;
|
|
974
|
-
get zone(): Zone
|
|
987
|
+
get zone(): Readonly<Zone>;
|
|
975
988
|
static getRangeParts(xc: string, zone: UnboundedZone): RangePart[];
|
|
976
989
|
get isFullCol(): boolean;
|
|
977
990
|
get isFullRow(): boolean;
|
|
@@ -998,6 +1011,21 @@ declare class UuidGenerator {
|
|
|
998
1011
|
uuidv4(): string;
|
|
999
1012
|
}
|
|
1000
1013
|
|
|
1014
|
+
/**
|
|
1015
|
+
* Convert from a cartesian reference to a (possibly unbounded) Zone
|
|
1016
|
+
*
|
|
1017
|
+
* Examples:
|
|
1018
|
+
* "A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
|
|
1019
|
+
* "B1:B3" ==> Top 0, Bottom 3, Left: 1, Right: 1
|
|
1020
|
+
* "B:B" ==> Top 0, Bottom undefined, Left: 1, Right: 1
|
|
1021
|
+
* "B2:B" ==> Top 1, Bottom undefined, Left: 1, Right: 1, hasHeader: 1
|
|
1022
|
+
* "Sheet1!A1" ==> Top 0, Bottom 0, Left: 0, Right: 0
|
|
1023
|
+
* "Sheet1!B1:B3" ==> Top 0, Bottom 3, Left: 1, Right: 1
|
|
1024
|
+
*
|
|
1025
|
+
* @param xc the string reference to convert
|
|
1026
|
+
*
|
|
1027
|
+
*/
|
|
1028
|
+
declare function toUnboundedZone(xc: string): UnboundedZone;
|
|
1001
1029
|
/**
|
|
1002
1030
|
* Convert from a cartesian reference to a Zone.
|
|
1003
1031
|
* Will return throw an error if given a unbounded zone (eg : A:A).
|
|
@@ -1057,15 +1085,16 @@ type StatefulStream<Event, State> = {
|
|
|
1057
1085
|
interface SelectionProcessor {
|
|
1058
1086
|
selectZone(anchor: AnchorZone, options?: SelectionEventOptions): DispatchResult;
|
|
1059
1087
|
selectCell(col: number, row: number): DispatchResult;
|
|
1060
|
-
moveAnchorCell(direction: Direction, step: SelectionStep): DispatchResult;
|
|
1088
|
+
moveAnchorCell(direction: Direction$1, step: SelectionStep): DispatchResult;
|
|
1061
1089
|
setAnchorCorner(col: number, row: number): DispatchResult;
|
|
1062
1090
|
addCellToSelection(col: number, row: number): DispatchResult;
|
|
1063
|
-
resizeAnchorZone(direction: Direction, step: SelectionStep): DispatchResult;
|
|
1091
|
+
resizeAnchorZone(direction: Direction$1, step: SelectionStep): DispatchResult;
|
|
1064
1092
|
selectColumn(index: number, mode: SelectionEvent["mode"]): DispatchResult;
|
|
1065
1093
|
selectRow(index: number, mode: SelectionEvent["mode"]): DispatchResult;
|
|
1066
1094
|
selectAll(): DispatchResult;
|
|
1067
1095
|
loopSelection(): DispatchResult;
|
|
1068
1096
|
selectTableAroundSelection(): DispatchResult;
|
|
1097
|
+
isListening(owner: unknown): boolean;
|
|
1069
1098
|
}
|
|
1070
1099
|
type SelectionStreamProcessor = SelectionProcessor & StatefulStream<SelectionEvent, AnchorZone>;
|
|
1071
1100
|
|
|
@@ -1479,7 +1508,7 @@ interface ComposerSelection {
|
|
|
1479
1508
|
end: number;
|
|
1480
1509
|
}
|
|
1481
1510
|
declare class EditionPlugin extends UIPlugin {
|
|
1482
|
-
static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell", "getCycledReference"];
|
|
1511
|
+
static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell", "getCycledReference", "getAutoCompleteDataValidationValues"];
|
|
1483
1512
|
private col;
|
|
1484
1513
|
private row;
|
|
1485
1514
|
private mode;
|
|
@@ -1517,6 +1546,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1517
1546
|
end: number;
|
|
1518
1547
|
};
|
|
1519
1548
|
} | undefined;
|
|
1549
|
+
getInitialComposerContent(): string | undefined;
|
|
1520
1550
|
private cycleReferences;
|
|
1521
1551
|
private validateSelection;
|
|
1522
1552
|
private onColumnsRemoved;
|
|
@@ -1534,6 +1564,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1534
1564
|
*/
|
|
1535
1565
|
private startEdition;
|
|
1536
1566
|
private stopEdition;
|
|
1567
|
+
private getCurrentCanonicalContent;
|
|
1537
1568
|
private cancelEditionAndActivateSheet;
|
|
1538
1569
|
private getComposerContent;
|
|
1539
1570
|
private numberComposerContent;
|
|
@@ -1574,6 +1605,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1574
1605
|
* Return ranges currently referenced in the composer
|
|
1575
1606
|
*/
|
|
1576
1607
|
getReferencedRanges(): Range[];
|
|
1608
|
+
getAutoCompleteDataValidationValues(): string[];
|
|
1577
1609
|
/**
|
|
1578
1610
|
* Function used to determine when composer selection can start.
|
|
1579
1611
|
* Three conditions are necessary:
|
|
@@ -1582,6 +1614,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1582
1614
|
* - Previous and next tokens can be separated by spaces
|
|
1583
1615
|
*/
|
|
1584
1616
|
private canStartComposerRangeSelection;
|
|
1617
|
+
private checkDataValidation;
|
|
1585
1618
|
}
|
|
1586
1619
|
|
|
1587
1620
|
/**
|
|
@@ -1701,11 +1734,11 @@ interface ZoneDependentCommand {
|
|
|
1701
1734
|
sheetId: UID;
|
|
1702
1735
|
zone: Zone;
|
|
1703
1736
|
}
|
|
1704
|
-
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" | "
|
|
1705
|
-
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" | "
|
|
1706
|
-
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" | "
|
|
1707
|
-
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" | "
|
|
1708
|
-
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" | "
|
|
1737
|
+
declare const invalidateEvaluationCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "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" | "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">;
|
|
1738
|
+
declare const invalidateDependenciesCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "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" | "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">;
|
|
1739
|
+
declare const invalidateCFEvaluationCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "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" | "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">;
|
|
1740
|
+
declare const readonlyAllowedCommands: Set<"SORT_CELLS" | "UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "COPY_PASTE_CELLS_ABOVE" | "COPY_PASTE_CELLS_ON_LEFT" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "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" | "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">;
|
|
1741
|
+
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">;
|
|
1709
1742
|
interface UpdateCellCommand extends PositionDependentCommand {
|
|
1710
1743
|
type: "UPDATE_CELL";
|
|
1711
1744
|
content?: string;
|
|
@@ -1837,9 +1870,9 @@ interface RemoveConditionalFormatCommand extends SheetDependentCommand {
|
|
|
1837
1870
|
id: string;
|
|
1838
1871
|
}
|
|
1839
1872
|
interface MoveConditionalFormatCommand extends SheetDependentCommand {
|
|
1840
|
-
type: "
|
|
1873
|
+
type: "CHANGE_CONDITIONAL_FORMAT_PRIORITY";
|
|
1841
1874
|
cfId: UID;
|
|
1842
|
-
|
|
1875
|
+
delta: number;
|
|
1843
1876
|
}
|
|
1844
1877
|
interface CreateFigureCommand extends SheetDependentCommand {
|
|
1845
1878
|
type: "CREATE_FIGURE";
|
|
@@ -1960,6 +1993,14 @@ interface FoldHeaderGroupsInZoneCommand extends ZoneDependentCommand {
|
|
|
1960
1993
|
type: "FOLD_HEADER_GROUPS_IN_ZONE";
|
|
1961
1994
|
dimension: Dimension;
|
|
1962
1995
|
}
|
|
1996
|
+
interface AddDataValidationCommand extends SheetDependentCommand, RangesDependentCommand {
|
|
1997
|
+
type: "ADD_DATA_VALIDATION_RULE";
|
|
1998
|
+
rule: Omit<DataValidationRule, "ranges">;
|
|
1999
|
+
}
|
|
2000
|
+
interface RemoveDataValidationCommand extends SheetDependentCommand {
|
|
2001
|
+
type: "REMOVE_DATA_VALIDATION_RULE";
|
|
2002
|
+
id: string;
|
|
2003
|
+
}
|
|
1963
2004
|
interface CopyCommand {
|
|
1964
2005
|
type: "COPY";
|
|
1965
2006
|
}
|
|
@@ -1971,6 +2012,12 @@ interface PasteCommand {
|
|
|
1971
2012
|
target: Zone[];
|
|
1972
2013
|
pasteOption?: ClipboardPasteOptions;
|
|
1973
2014
|
}
|
|
2015
|
+
interface CopyPasteCellsAboveCommand {
|
|
2016
|
+
type: "COPY_PASTE_CELLS_ABOVE";
|
|
2017
|
+
}
|
|
2018
|
+
interface CopyPasteCellsOnLeftCommand {
|
|
2019
|
+
type: "COPY_PASTE_CELLS_ON_LEFT";
|
|
2020
|
+
}
|
|
1974
2021
|
interface RepeatPasteCommand {
|
|
1975
2022
|
type: "REPEAT_PASTE";
|
|
1976
2023
|
target: Zone[];
|
|
@@ -2043,7 +2090,9 @@ interface StartEditionCommand {
|
|
|
2043
2090
|
}
|
|
2044
2091
|
interface StopEditionCommand {
|
|
2045
2092
|
type: "STOP_EDITION";
|
|
2046
|
-
|
|
2093
|
+
}
|
|
2094
|
+
interface CancelEditionCommand {
|
|
2095
|
+
type: "CANCEL_EDITION";
|
|
2047
2096
|
}
|
|
2048
2097
|
interface SetCurrentContentCommand {
|
|
2049
2098
|
type: "SET_CURRENT_CONTENT";
|
|
@@ -2306,13 +2355,17 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
|
|
|
2306
2355
|
| SetFormattingCommand | ClearFormattingCommand | SetZoneBordersCommand | SetBorderCommand
|
|
2307
2356
|
/** CHART */
|
|
2308
2357
|
| CreateChartCommand | UpdateChartCommand
|
|
2309
|
-
/**
|
|
2358
|
+
/** IMAGE */
|
|
2310
2359
|
| CreateImageOverCommand
|
|
2311
2360
|
/** FILTERS */
|
|
2312
|
-
| CreateFilterTableCommand | RemoveFilterTableCommand
|
|
2313
|
-
/**
|
|
2314
|
-
| GroupHeadersCommand | UnGroupHeadersCommand | UnfoldHeaderGroupCommand | FoldHeaderGroupCommand | FoldAllHeaderGroupsCommand | UnfoldAllHeaderGroupsCommand | UnfoldHeaderGroupsInZoneCommand | FoldHeaderGroupsInZoneCommand
|
|
2315
|
-
|
|
2361
|
+
| CreateFilterTableCommand | RemoveFilterTableCommand
|
|
2362
|
+
/** HEADER GROUP */
|
|
2363
|
+
| GroupHeadersCommand | UnGroupHeadersCommand | UnfoldHeaderGroupCommand | FoldHeaderGroupCommand | FoldAllHeaderGroupsCommand | UnfoldAllHeaderGroupsCommand | UnfoldHeaderGroupsInZoneCommand | FoldHeaderGroupsInZoneCommand
|
|
2364
|
+
/** DATA VALIDATION */
|
|
2365
|
+
| AddDataValidationCommand | RemoveDataValidationCommand
|
|
2366
|
+
/** MISC */
|
|
2367
|
+
| UpdateLocaleCommand;
|
|
2368
|
+
type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | AddRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | CopyPasteCellsAboveCommand | CopyPasteCellsOnLeftCommand | 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;
|
|
2316
2369
|
type Command = CoreCommand | LocalCommand;
|
|
2317
2370
|
/**
|
|
2318
2371
|
* Holds the result of a command dispatch.
|
|
@@ -2437,7 +2490,13 @@ declare const enum CommandResult {
|
|
|
2437
2490
|
DuplicatesColumnsSelected = "DuplicatesColumnsSelected",
|
|
2438
2491
|
InvalidHeaderGroupStartEnd = "InvalidHeaderGroupStartEnd",
|
|
2439
2492
|
HeaderGroupAlreadyExists = "HeaderGroupAlreadyExists",
|
|
2440
|
-
UnknownHeaderGroup = "UnknownHeaderGroup"
|
|
2493
|
+
UnknownHeaderGroup = "UnknownHeaderGroup",
|
|
2494
|
+
UnknownDataValidationRule = "UnknownDataValidationRule",
|
|
2495
|
+
UnknownDataValidationCriterionType = "UnknownDataValidationCriterionType",
|
|
2496
|
+
InvalidDataValidationCriterionValue = "InvalidDataValidationCriterionValue",
|
|
2497
|
+
InvalidNumberOfCriterionValues = "InvalidNumberOfCriterionValues",
|
|
2498
|
+
BlockingValidationRule = "BlockingValidationRule",
|
|
2499
|
+
InvalidCopyPasteSelection = "InvalidCopyPasteSelection"
|
|
2441
2500
|
}
|
|
2442
2501
|
interface CommandHandler<T> {
|
|
2443
2502
|
allowDispatch(command: T): CommandResult | CommandResult[];
|
|
@@ -2708,7 +2767,7 @@ interface HeaderGroup {
|
|
|
2708
2767
|
end: HeaderIndex;
|
|
2709
2768
|
isFolded?: boolean;
|
|
2710
2769
|
}
|
|
2711
|
-
type Direction = "up" | "down" | "left" | "right";
|
|
2770
|
+
type Direction$1 = "up" | "down" | "left" | "right";
|
|
2712
2771
|
type SelectionStep = number | "end";
|
|
2713
2772
|
|
|
2714
2773
|
type LocaleCode = string & Alias;
|
|
@@ -2862,6 +2921,123 @@ interface Currency {
|
|
|
2862
2921
|
position: "before" | "after";
|
|
2863
2922
|
}
|
|
2864
2923
|
|
|
2924
|
+
interface DataValidationRule {
|
|
2925
|
+
id: UID;
|
|
2926
|
+
criterion: DataValidationCriterion;
|
|
2927
|
+
ranges: Range[];
|
|
2928
|
+
isBlocking?: boolean;
|
|
2929
|
+
}
|
|
2930
|
+
type TextContainsCriterion = {
|
|
2931
|
+
type: "textContains";
|
|
2932
|
+
values: string[];
|
|
2933
|
+
};
|
|
2934
|
+
type TextNotContainsCriterion = {
|
|
2935
|
+
type: "textNotContains";
|
|
2936
|
+
values: string[];
|
|
2937
|
+
};
|
|
2938
|
+
type TextIsCriterion = {
|
|
2939
|
+
type: "textIs";
|
|
2940
|
+
values: string[];
|
|
2941
|
+
};
|
|
2942
|
+
type TextIsEmailCriterion = {
|
|
2943
|
+
type: "textIsEmail";
|
|
2944
|
+
values: string[];
|
|
2945
|
+
};
|
|
2946
|
+
type TextIsLinkCriterion = {
|
|
2947
|
+
type: "textIsLink";
|
|
2948
|
+
values: string[];
|
|
2949
|
+
};
|
|
2950
|
+
type DateIsCriterion = {
|
|
2951
|
+
type: "dateIs";
|
|
2952
|
+
dateValue: DateCriterionValue;
|
|
2953
|
+
values: string[];
|
|
2954
|
+
};
|
|
2955
|
+
type DateIsBeforeCriterion = {
|
|
2956
|
+
type: "dateIsBefore";
|
|
2957
|
+
dateValue: DateCriterionValue;
|
|
2958
|
+
values: string[];
|
|
2959
|
+
};
|
|
2960
|
+
type DateIsOnOrBeforeCriterion = {
|
|
2961
|
+
type: "dateIsOnOrBefore";
|
|
2962
|
+
dateValue: DateCriterionValue;
|
|
2963
|
+
values: string[];
|
|
2964
|
+
};
|
|
2965
|
+
type DateIsAfterCriterion = {
|
|
2966
|
+
type: "dateIsAfter";
|
|
2967
|
+
dateValue: DateCriterionValue;
|
|
2968
|
+
values: string[];
|
|
2969
|
+
};
|
|
2970
|
+
type DateIsOnOrAfterCriterion = {
|
|
2971
|
+
type: "dateIsOnOrAfter";
|
|
2972
|
+
dateValue: DateCriterionValue;
|
|
2973
|
+
values: string[];
|
|
2974
|
+
};
|
|
2975
|
+
type DateIsBetweenCriterion = {
|
|
2976
|
+
type: "dateIsBetween";
|
|
2977
|
+
values: string[];
|
|
2978
|
+
};
|
|
2979
|
+
type DateIsNotBetweenCriterion = {
|
|
2980
|
+
type: "dateIsNotBetween";
|
|
2981
|
+
values: string[];
|
|
2982
|
+
};
|
|
2983
|
+
type DateIsValidCriterion = {
|
|
2984
|
+
type: "dateIsValid";
|
|
2985
|
+
values: string[];
|
|
2986
|
+
};
|
|
2987
|
+
type IsEqualCriterion = {
|
|
2988
|
+
type: "isEqual";
|
|
2989
|
+
values: string[];
|
|
2990
|
+
};
|
|
2991
|
+
type IsNotEqualCriterion = {
|
|
2992
|
+
type: "isNotEqual";
|
|
2993
|
+
values: string[];
|
|
2994
|
+
};
|
|
2995
|
+
type IsGreaterThanCriterion = {
|
|
2996
|
+
type: "isGreaterThan";
|
|
2997
|
+
values: string[];
|
|
2998
|
+
};
|
|
2999
|
+
type IsGreaterOrEqualToCriterion = {
|
|
3000
|
+
type: "isGreaterOrEqualTo";
|
|
3001
|
+
values: string[];
|
|
3002
|
+
};
|
|
3003
|
+
type IsLessThanCriterion = {
|
|
3004
|
+
type: "isLessThan";
|
|
3005
|
+
values: string[];
|
|
3006
|
+
};
|
|
3007
|
+
type IsLessOrEqualToCriterion = {
|
|
3008
|
+
type: "isLessOrEqualTo";
|
|
3009
|
+
values: string[];
|
|
3010
|
+
};
|
|
3011
|
+
type IsBetweenCriterion = {
|
|
3012
|
+
type: "isBetween";
|
|
3013
|
+
values: string[];
|
|
3014
|
+
};
|
|
3015
|
+
type IsNotBetweenCriterion = {
|
|
3016
|
+
type: "isNotBetween";
|
|
3017
|
+
values: string[];
|
|
3018
|
+
};
|
|
3019
|
+
type IsCheckboxCriterion = {
|
|
3020
|
+
type: "isBoolean";
|
|
3021
|
+
values: string[];
|
|
3022
|
+
};
|
|
3023
|
+
type IsValueInListCriterion = {
|
|
3024
|
+
type: "isValueInList";
|
|
3025
|
+
values: string[];
|
|
3026
|
+
displayStyle: "arrow" | "plainText";
|
|
3027
|
+
};
|
|
3028
|
+
type IsValueInRangeCriterion = {
|
|
3029
|
+
type: "isValueInRange";
|
|
3030
|
+
values: string[];
|
|
3031
|
+
displayStyle: "arrow" | "plainText";
|
|
3032
|
+
};
|
|
3033
|
+
type CustomFormulaCriterion = {
|
|
3034
|
+
type: "customFormula";
|
|
3035
|
+
values: string[];
|
|
3036
|
+
};
|
|
3037
|
+
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;
|
|
3038
|
+
type DateCriterionValue = "today" | "tomorrow" | "yesterday" | "lastWeek" | "lastMonth" | "lastYear" | "exactDate";
|
|
3039
|
+
type DataValidationCriterionType = DataValidationCriterion["type"];
|
|
3040
|
+
|
|
2865
3041
|
type ClipboardReadResult = {
|
|
2866
3042
|
status: "ok";
|
|
2867
3043
|
content: string;
|
|
@@ -2892,7 +3068,7 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
|
|
|
2892
3068
|
openSidePanel: (panel: string, panelProps?: any) => void;
|
|
2893
3069
|
toggleSidePanel: (panel: string, panelProps?: any) => void;
|
|
2894
3070
|
clipboard: ClipboardInterface;
|
|
2895
|
-
startCellEdition: (content
|
|
3071
|
+
startCellEdition: (content?: string) => void;
|
|
2896
3072
|
loadCurrencies?: () => Promise<Currency[]>;
|
|
2897
3073
|
loadLocales: () => Promise<Locale[]>;
|
|
2898
3074
|
}
|
|
@@ -3326,7 +3502,6 @@ declare class ChartPlugin extends CorePlugin<ChartState> implements ChartState {
|
|
|
3326
3502
|
getChartDefinition(figureId: UID): ChartDefinition;
|
|
3327
3503
|
import(data: WorkbookData): void;
|
|
3328
3504
|
export(data: WorkbookData): void;
|
|
3329
|
-
exportForExcel(data: ExcelWorkbookData): void;
|
|
3330
3505
|
/**
|
|
3331
3506
|
* Add a figure with tag chart with the given id at the given position
|
|
3332
3507
|
*/
|
|
@@ -3374,7 +3549,7 @@ declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState>
|
|
|
3374
3549
|
* Add or replace a conditional format rule
|
|
3375
3550
|
*/
|
|
3376
3551
|
private addConditionalFormatting;
|
|
3377
|
-
private
|
|
3552
|
+
private checkValidPriorityChange;
|
|
3378
3553
|
private checkEmptyRange;
|
|
3379
3554
|
private checkCFRule;
|
|
3380
3555
|
private checkOperatorArgsNumber;
|
|
@@ -3387,7 +3562,36 @@ declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState>
|
|
|
3387
3562
|
private checkMidBiggerThanMax;
|
|
3388
3563
|
private checkMinBiggerThanMid;
|
|
3389
3564
|
private removeConditionalFormatting;
|
|
3390
|
-
private
|
|
3565
|
+
private changeCFPriority;
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3568
|
+
interface DataValidationState {
|
|
3569
|
+
readonly rules: {
|
|
3570
|
+
[sheet: string]: DataValidationRule[];
|
|
3571
|
+
};
|
|
3572
|
+
}
|
|
3573
|
+
declare class DataValidationPlugin extends CorePlugin<DataValidationState> implements DataValidationState {
|
|
3574
|
+
static getters: readonly ["cellHasListDataValidationIcon", "getDataValidationRule", "getDataValidationRules", "getValidationRuleForCell"];
|
|
3575
|
+
readonly rules: {
|
|
3576
|
+
[sheet: string]: DataValidationRule[];
|
|
3577
|
+
};
|
|
3578
|
+
adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
|
|
3579
|
+
private loopThroughRangesOfSheet;
|
|
3580
|
+
allowDispatch(cmd: Command): CommandResult | CommandResult[];
|
|
3581
|
+
handle(cmd: CoreCommand): void;
|
|
3582
|
+
getDataValidationRules(sheetId: UID): DataValidationRule[];
|
|
3583
|
+
getDataValidationRule(sheetId: UID, id: UID): DataValidationRule | undefined;
|
|
3584
|
+
getValidationRuleForCell({ sheetId, col, row }: CellPosition): DataValidationRule | undefined;
|
|
3585
|
+
cellHasListDataValidationIcon(cellPosition: CellPosition): boolean;
|
|
3586
|
+
private addDataValidationRule;
|
|
3587
|
+
private removeRangesFromRules;
|
|
3588
|
+
private removeDataValidationRule;
|
|
3589
|
+
private setCenterStyleToBooleanCells;
|
|
3590
|
+
import(data: WorkbookData): void;
|
|
3591
|
+
export(data: Partial<WorkbookData>): void;
|
|
3592
|
+
private checkCriterionTypeIsValid;
|
|
3593
|
+
private checkCriterionHasValidNumberOfValues;
|
|
3594
|
+
private checkCriterionValuesAreValid;
|
|
3391
3595
|
}
|
|
3392
3596
|
|
|
3393
3597
|
interface FigureState {
|
|
@@ -3478,10 +3682,10 @@ declare class FiltersPlugin extends CorePlugin<FiltersState> implements FiltersS
|
|
|
3478
3682
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
3479
3683
|
}
|
|
3480
3684
|
|
|
3481
|
-
interface State$
|
|
3685
|
+
interface State$7 {
|
|
3482
3686
|
groups: Record<UID, Record<Dimension, HeaderGroup[]>>;
|
|
3483
3687
|
}
|
|
3484
|
-
declare class HeaderGroupingPlugin extends CorePlugin<State$
|
|
3688
|
+
declare class HeaderGroupingPlugin extends CorePlugin<State$7> {
|
|
3485
3689
|
static getters: readonly ["getHeaderGroups", "getGroupsLayers", "getVisibleGroupLayers", "getHeaderGroup", "getHeaderGroupsInZone", "isGroupFolded", "isRowFolded", "isColFolded"];
|
|
3486
3690
|
private readonly groups;
|
|
3487
3691
|
allowDispatch(cmd: CoreCommand): CommandResult;
|
|
@@ -3629,7 +3833,7 @@ interface MergeState {
|
|
|
3629
3833
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
3630
3834
|
}
|
|
3631
3835
|
declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
|
|
3632
|
-
static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "getBottomLeftCell", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "getSelectionRangeString"];
|
|
3836
|
+
static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "getBottomLeftCell", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "getSelectionRangeString", "isMainCellPosition"];
|
|
3633
3837
|
private nextId;
|
|
3634
3838
|
readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
|
|
3635
3839
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
@@ -3669,6 +3873,7 @@ declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
|
|
|
3669
3873
|
* Check if the zone represents a single cell or a single merge.
|
|
3670
3874
|
*/
|
|
3671
3875
|
isSingleCellOrMerge(sheetId: UID, zone: Zone): boolean;
|
|
3876
|
+
isMainCellPosition(position: CellPosition): boolean;
|
|
3672
3877
|
/**
|
|
3673
3878
|
* Return true if the current selection requires losing state if it is merged.
|
|
3674
3879
|
* This happens when there is some textual content in other cells than the
|
|
@@ -3713,13 +3918,13 @@ declare class SettingsPlugin extends CorePlugin {
|
|
|
3713
3918
|
export(data: WorkbookData): void;
|
|
3714
3919
|
}
|
|
3715
3920
|
|
|
3716
|
-
interface SheetState
|
|
3921
|
+
interface SheetState {
|
|
3717
3922
|
readonly sheets: Record<UID, Sheet | undefined>;
|
|
3718
3923
|
readonly orderedSheetIds: UID[];
|
|
3719
3924
|
readonly sheetIdsMapName: Record<string, UID | undefined>;
|
|
3720
3925
|
readonly cellPosition: Record<UID, CellPosition | undefined>;
|
|
3721
3926
|
}
|
|
3722
|
-
declare class SheetPlugin extends CorePlugin<SheetState
|
|
3927
|
+
declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
3723
3928
|
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"];
|
|
3724
3929
|
readonly sheetIdsMapName: Record<string, UID | undefined>;
|
|
3725
3930
|
readonly orderedSheetIds: UID[];
|
|
@@ -3877,7 +4082,7 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
|
|
|
3877
4082
|
|
|
3878
4083
|
declare class EvaluationPlugin extends UIPlugin {
|
|
3879
4084
|
private config;
|
|
3880
|
-
static getters: readonly ["evaluateFormula", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone"];
|
|
4085
|
+
static getters: readonly ["evaluateFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone"];
|
|
3881
4086
|
private shouldRebuildDependenciesGraph;
|
|
3882
4087
|
private evaluator;
|
|
3883
4088
|
private compilationParams;
|
|
@@ -3886,7 +4091,7 @@ declare class EvaluationPlugin extends UIPlugin {
|
|
|
3886
4091
|
beforeHandle(cmd: Command): void;
|
|
3887
4092
|
handle(cmd: CoreViewCommand): void;
|
|
3888
4093
|
finalize(): void;
|
|
3889
|
-
evaluateFormula(sheetId: UID, formulaString: string):
|
|
4094
|
+
evaluateFormula(sheetId: UID, formulaString: string): CellValue | Matrix<CellValue>;
|
|
3890
4095
|
/**
|
|
3891
4096
|
* Return the value of each cell in the range as they are displayed in the grid.
|
|
3892
4097
|
*/
|
|
@@ -3908,7 +4113,7 @@ declare class EvaluationPlugin extends UIPlugin {
|
|
|
3908
4113
|
* It could be the formula present in the cell itself or the
|
|
3909
4114
|
* formula of the array formula that spreads to the cell
|
|
3910
4115
|
*/
|
|
3911
|
-
|
|
4116
|
+
getCorrespondingFormulaCell(position: CellPosition): FormulaCell | undefined;
|
|
3912
4117
|
private getCompilationParameters;
|
|
3913
4118
|
}
|
|
3914
4119
|
|
|
@@ -3953,6 +4158,7 @@ declare class EvaluationChartPlugin extends UIPlugin<EvaluationChartState> {
|
|
|
3953
4158
|
* - the default chart color if no other color is defined
|
|
3954
4159
|
*/
|
|
3955
4160
|
getBackgroundOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined): Color;
|
|
4161
|
+
exportForExcel(data: ExcelWorkbookData): void;
|
|
3956
4162
|
}
|
|
3957
4163
|
|
|
3958
4164
|
declare class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
@@ -3990,6 +4196,43 @@ declare class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
3990
4196
|
private rulePredicate;
|
|
3991
4197
|
}
|
|
3992
4198
|
|
|
4199
|
+
interface InvalidValidationResult {
|
|
4200
|
+
readonly isValid: false;
|
|
4201
|
+
readonly rule: DataValidationRule;
|
|
4202
|
+
readonly error: string;
|
|
4203
|
+
}
|
|
4204
|
+
interface ValidValidationResult {
|
|
4205
|
+
readonly isValid: true;
|
|
4206
|
+
}
|
|
4207
|
+
type ValidationResult = ValidValidationResult | InvalidValidationResult;
|
|
4208
|
+
type SheetValidationResult = {
|
|
4209
|
+
[col: HeaderIndex]: Array<Lazy<ValidationResult>>;
|
|
4210
|
+
};
|
|
4211
|
+
declare class EvaluationDataValidationPlugin extends UIPlugin {
|
|
4212
|
+
static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getDataValidationCheckBoxCellPositions", "getDataValidationListCellsPositions", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "isCellValidCheckbox", "isDataValidationInvalid"];
|
|
4213
|
+
validationResults: Record<UID, SheetValidationResult>;
|
|
4214
|
+
handle(cmd: CoreViewCommand): void;
|
|
4215
|
+
isDataValidationInvalid(cellPosition: CellPosition): boolean;
|
|
4216
|
+
getInvalidDataValidationMessage(cellPosition: CellPosition): string | undefined;
|
|
4217
|
+
/**
|
|
4218
|
+
* Check if the value is valid for the given criterion, and return an error message if not.
|
|
4219
|
+
*
|
|
4220
|
+
* The value must be canonicalized.
|
|
4221
|
+
*/
|
|
4222
|
+
getDataValidationInvalidCriterionValueMessage(criterionType: DataValidationCriterionType, value: string): string | undefined;
|
|
4223
|
+
isCellValidCheckbox(cellPosition: CellPosition): boolean;
|
|
4224
|
+
/** Get the validation result if the cell on the given position had the given value */
|
|
4225
|
+
getValidationResultForCellValue(cellValue: CellValue, cellPosition: CellPosition): ValidationResult;
|
|
4226
|
+
getDataValidationCheckBoxCellPositions(): CellPosition[];
|
|
4227
|
+
getDataValidationListCellsPositions(): CellPosition[];
|
|
4228
|
+
private getValidationResultForCell;
|
|
4229
|
+
private computeSheetValidationResults;
|
|
4230
|
+
private getRuleErrorForCellValue;
|
|
4231
|
+
/** Get the offset of the cell inside the ranges of the rule. Throws an error if the cell isn't inside the rule. */
|
|
4232
|
+
private getCellOffsetInRule;
|
|
4233
|
+
private getEvaluatedCriterionValues;
|
|
4234
|
+
}
|
|
4235
|
+
|
|
3993
4236
|
interface HeaderSizeState {
|
|
3994
4237
|
tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
3995
4238
|
}
|
|
@@ -3997,12 +4240,13 @@ interface CellWithSize {
|
|
|
3997
4240
|
cell: CellPosition;
|
|
3998
4241
|
size: Pixel;
|
|
3999
4242
|
}
|
|
4000
|
-
declare class
|
|
4001
|
-
static getters: readonly ["getRowSize"];
|
|
4243
|
+
declare class HeaderSizeUIPlugin extends UIPlugin<HeaderSizeState> implements HeaderSizeState {
|
|
4244
|
+
static getters: readonly ["getRowSize", "getHeaderSize"];
|
|
4002
4245
|
readonly tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
4003
4246
|
private ctx;
|
|
4004
4247
|
handle(cmd: Command): void;
|
|
4005
4248
|
getRowSize(sheetId: UID, row: HeaderIndex): Pixel;
|
|
4249
|
+
getHeaderSize(sheetId: UID, dimension: Dimension, index: HeaderIndex): Pixel;
|
|
4006
4250
|
private updateRowSizeForCellChange;
|
|
4007
4251
|
private initializeSheet;
|
|
4008
4252
|
/**
|
|
@@ -4067,6 +4311,7 @@ declare class AutofillPlugin extends UIPlugin {
|
|
|
4067
4311
|
private getDirection;
|
|
4068
4312
|
private autoFillMerge;
|
|
4069
4313
|
private autofillCF;
|
|
4314
|
+
private autofillDV;
|
|
4070
4315
|
drawGrid(renderingContext: GridRenderingContext): void;
|
|
4071
4316
|
}
|
|
4072
4317
|
|
|
@@ -4513,7 +4758,7 @@ declare class UIOptionsPlugin extends UIPlugin {
|
|
|
4513
4758
|
}
|
|
4514
4759
|
|
|
4515
4760
|
declare class SheetUIPlugin extends UIPlugin {
|
|
4516
|
-
static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText"
|
|
4761
|
+
static getters: readonly ["doesCellHaveGridIcon", "getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText"];
|
|
4517
4762
|
private ctx;
|
|
4518
4763
|
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
4519
4764
|
handle(cmd: Command): void;
|
|
@@ -4525,22 +4770,7 @@ declare class SheetUIPlugin extends UIPlugin {
|
|
|
4525
4770
|
* line if it contains NEWLINE characters, or if it's longer than the given width.
|
|
4526
4771
|
*/
|
|
4527
4772
|
getCellMultiLineText(position: CellPosition, width: number | undefined): string[];
|
|
4528
|
-
|
|
4529
|
-
* Returns the size, start and end coordinates of a column on an unfolded sheet
|
|
4530
|
-
*/
|
|
4531
|
-
getColDimensions(sheetId: UID, col: HeaderIndex): HeaderDimensions;
|
|
4532
|
-
/**
|
|
4533
|
-
* Returns the size, start and end coordinates of a row an unfolded sheet
|
|
4534
|
-
*/
|
|
4535
|
-
getRowDimensions(sheetId: UID, row: HeaderIndex): HeaderDimensions;
|
|
4536
|
-
/**
|
|
4537
|
-
* Returns the offset of a header (determined by the dimension) at the given index
|
|
4538
|
-
* based on the referenceIndex given. If start === 0, this method will return
|
|
4539
|
-
* the start attribute of the header.
|
|
4540
|
-
*
|
|
4541
|
-
* i.e. The size from A to B is the distance between A.start and B.end
|
|
4542
|
-
*/
|
|
4543
|
-
getColRowOffset(dimension: Dimension, referenceIndex: HeaderIndex, index: HeaderIndex, sheetId?: UID): Pixel;
|
|
4773
|
+
doesCellHaveGridIcon(position: CellPosition): boolean;
|
|
4544
4774
|
private getColMaxWidth;
|
|
4545
4775
|
/**
|
|
4546
4776
|
* Check that any "sheetId" in the command matches an existing
|
|
@@ -4619,12 +4849,38 @@ declare class FilterEvaluationPlugin extends UIPlugin {
|
|
|
4619
4849
|
private getUniqueColNameForExcel;
|
|
4620
4850
|
}
|
|
4621
4851
|
|
|
4852
|
+
declare class HeaderPositionsUIPlugin extends UIPlugin {
|
|
4853
|
+
static getters: readonly ["getColDimensions", "getRowDimensions", "getColRowOffset"];
|
|
4854
|
+
private headerPositions;
|
|
4855
|
+
private isDirty;
|
|
4856
|
+
handle(cmd: Command): void;
|
|
4857
|
+
finalize(): void;
|
|
4858
|
+
/**
|
|
4859
|
+
* Returns the size, start and end coordinates of a column on an unfolded sheet
|
|
4860
|
+
*/
|
|
4861
|
+
getColDimensions(sheetId: UID, col: HeaderIndex): HeaderDimensions;
|
|
4862
|
+
/**
|
|
4863
|
+
* Returns the size, start and end coordinates of a row an unfolded sheet
|
|
4864
|
+
*/
|
|
4865
|
+
getRowDimensions(sheetId: UID, row: HeaderIndex): HeaderDimensions;
|
|
4866
|
+
/**
|
|
4867
|
+
* Returns the offset of a header (determined by the dimension) at the given index
|
|
4868
|
+
* based on the referenceIndex given. If start === 0, this method will return
|
|
4869
|
+
* the start attribute of the header.
|
|
4870
|
+
*
|
|
4871
|
+
* i.e. The size from A to B is the distance between A.start and B.end
|
|
4872
|
+
*/
|
|
4873
|
+
getColRowOffset(dimension: Dimension, referenceIndex: HeaderIndex, index: HeaderIndex, sheetId?: UID): Pixel;
|
|
4874
|
+
private computeHeaderPositionsOfSheet;
|
|
4875
|
+
private computePositions;
|
|
4876
|
+
}
|
|
4877
|
+
|
|
4622
4878
|
/**
|
|
4623
4879
|
* SelectionPlugin
|
|
4624
4880
|
*/
|
|
4625
4881
|
declare class GridSelectionPlugin extends UIPlugin {
|
|
4626
4882
|
static layers: LAYERS[];
|
|
4627
|
-
static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getSelectedCells", "getStatisticFnResults", "getAggregate", "getSelectedFigureId", "getSelection", "getActivePosition", "getSheetPosition", "isSelected", "isSingleColSelected", "getElementsFromSelection", "tryGetActiveSheetId"];
|
|
4883
|
+
static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getSelectedCells", "getStatisticFnResults", "getAggregate", "getSelectedFigureId", "getSelection", "getActivePosition", "getSheetPosition", "isSelected", "isSingleColSelected", "getElementsFromSelection", "tryGetActiveSheetId", "isGridSelectionActive"];
|
|
4628
4884
|
private gridSelection;
|
|
4629
4885
|
private selectedFigureId;
|
|
4630
4886
|
private sheetsData;
|
|
@@ -4634,6 +4890,7 @@ declare class GridSelectionPlugin extends UIPlugin {
|
|
|
4634
4890
|
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4635
4891
|
private handleEvent;
|
|
4636
4892
|
handle(cmd: Command): void;
|
|
4893
|
+
isGridSelectionActive(): boolean;
|
|
4637
4894
|
getActiveSheet(): Readonly<Sheet>;
|
|
4638
4895
|
getActiveSheetId(): UID;
|
|
4639
4896
|
tryGetActiveSheetId(): UID | undefined;
|
|
@@ -4665,6 +4922,7 @@ declare class GridSelectionPlugin extends UIPlugin {
|
|
|
4665
4922
|
* if dimension === "ROW" => [2,3,4,5]
|
|
4666
4923
|
*/
|
|
4667
4924
|
getElementsFromSelection(dimension: Dimension): number[];
|
|
4925
|
+
private activateSheet;
|
|
4668
4926
|
/**
|
|
4669
4927
|
* Ensure selections are not outside sheet boundaries.
|
|
4670
4928
|
* They are clipped to fit inside the sheet if needed.
|
|
@@ -4730,13 +4988,13 @@ declare class InternalViewport {
|
|
|
4730
4988
|
* visible cell.
|
|
4731
4989
|
* It returns -1 if no column is found.
|
|
4732
4990
|
*/
|
|
4733
|
-
getColIndex(x: Pixel
|
|
4991
|
+
getColIndex(x: Pixel): HeaderIndex;
|
|
4734
4992
|
/**
|
|
4735
4993
|
* Return the index of a row given an offset y, based on the pane top
|
|
4736
4994
|
* visible cell.
|
|
4737
4995
|
* It returns -1 if no row is found.
|
|
4738
4996
|
*/
|
|
4739
|
-
getRowIndex(y: Pixel
|
|
4997
|
+
getRowIndex(y: Pixel): HeaderIndex;
|
|
4740
4998
|
/**
|
|
4741
4999
|
* This function will make sure that the provided cell position (or current selected position) is part of
|
|
4742
5000
|
* the pane that is actually displayed on the client. We therefore adjust the offset of the pane
|
|
@@ -4835,6 +5093,7 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
4835
5093
|
private gridOffsetX;
|
|
4836
5094
|
private gridOffsetY;
|
|
4837
5095
|
private sheetsWithDirtyViewports;
|
|
5096
|
+
private shouldAdjustViewports;
|
|
4838
5097
|
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
4839
5098
|
private handleEvent;
|
|
4840
5099
|
handle(cmd: Command): void;
|
|
@@ -4899,7 +5158,6 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
4899
5158
|
private getMainInternalViewport;
|
|
4900
5159
|
/** gets rid of deprecated sheetIds */
|
|
4901
5160
|
private cleanViewports;
|
|
4902
|
-
private resetSheetViews;
|
|
4903
5161
|
private resizeSheetView;
|
|
4904
5162
|
private recomputeViewports;
|
|
4905
5163
|
private setSheetViewOffset;
|
|
@@ -4959,49 +5217,34 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
4959
5217
|
type GetterNames<Plugin extends {
|
|
4960
5218
|
getters: readonly string[];
|
|
4961
5219
|
}> = Plugin["getters"][number];
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
5220
|
+
/**
|
|
5221
|
+
* Extract getter methods from a plugin, based on its `getters` static array.
|
|
5222
|
+
* @example
|
|
5223
|
+
* class MyPlugin {
|
|
5224
|
+
* static getters = [
|
|
5225
|
+
* "getCell",
|
|
5226
|
+
* "getCellValue",
|
|
5227
|
+
* ] as const;
|
|
5228
|
+
* getCell() { ... }
|
|
5229
|
+
* getCellValue() { ... }
|
|
5230
|
+
* }
|
|
5231
|
+
* type MyPluginGetters = PluginGetters<typeof MyPlugin>;
|
|
5232
|
+
* // MyPluginGetters is equivalent to:
|
|
5233
|
+
* // {
|
|
5234
|
+
* // getCell: () => ...,
|
|
5235
|
+
* // getCellValue: () => ...,
|
|
5236
|
+
* // }
|
|
5237
|
+
*/
|
|
5238
|
+
type PluginGetters<Plugin extends {
|
|
5239
|
+
new (...args: unknown[]): any;
|
|
5240
|
+
getters: readonly string[];
|
|
5241
|
+
}> = Pick<InstanceType<Plugin>, GetterNames<Plugin>>;
|
|
4971
5242
|
type RangeAdapterGetters = Pick<RangeAdapter, GetterNames<typeof RangeAdapter>>;
|
|
4972
|
-
type
|
|
4973
|
-
type LocalHistoryGetters = Pick<HistoryPlugin, GetterNames<typeof HistoryPlugin>>;
|
|
4974
|
-
type FiltersGetters = Pick<FiltersPlugin, GetterNames<typeof FiltersPlugin>>;
|
|
4975
|
-
type SettingsGetters = Pick<SettingsPlugin, GetterNames<typeof SettingsPlugin>>;
|
|
4976
|
-
type HeaderGroupingGetters = Pick<HeaderGroupingPlugin, GetterNames<typeof HeaderGroupingPlugin>>;
|
|
4977
|
-
type CoreGetters = SheetGetters & HeaderSizeGetters & HeaderVisibilityGetters & CellGetters & MergeGetters & BordersGetters & ChartGetters & ImageGetters & ConditionalFormatGetters & FigureGetters & RangeAdapterGetters & FiltersGetters & SettingsGetters & HeaderGroupingGetters;
|
|
4978
|
-
type AutofillGetters = Pick<AutofillPlugin, GetterNames<typeof AutofillPlugin>>;
|
|
4979
|
-
type AutomaticSumGetters = Pick<AutomaticSumPlugin, GetterNames<typeof AutomaticSumPlugin>>;
|
|
4980
|
-
type ClipboardGetters = Pick<ClipboardPlugin, GetterNames<typeof ClipboardPlugin>>;
|
|
4981
|
-
type EditionGetters = Pick<EditionPlugin, GetterNames<typeof EditionPlugin>>;
|
|
4982
|
-
type EvaluationGetters = Pick<EvaluationPlugin, GetterNames<typeof EvaluationPlugin>>;
|
|
4983
|
-
type EvaluationChartGetters = Pick<EvaluationChartPlugin, GetterNames<typeof EvaluationChartPlugin>>;
|
|
4984
|
-
type EvaluationConditionalFormatGetters = Pick<EvaluationConditionalFormatPlugin, GetterNames<typeof EvaluationConditionalFormatPlugin>>;
|
|
4985
|
-
type FindAndReplaceGetters = Pick<FindAndReplacePlugin, GetterNames<typeof FindAndReplacePlugin>>;
|
|
4986
|
-
type HeaderVisibilityIUIGetters = Pick<HeaderVisibilityUIPlugin, GetterNames<typeof HeaderVisibilityUIPlugin>>;
|
|
4987
|
-
type HighlightGetters = Pick<HighlightPlugin, GetterNames<typeof HighlightPlugin>>;
|
|
4988
|
-
type CustomColorsGetters = Pick<CustomColorsPlugin, GetterNames<typeof CustomColorsPlugin>>;
|
|
4989
|
-
type RendererGetters = Pick<RendererPlugin, GetterNames<typeof RendererPlugin>>;
|
|
4990
|
-
type SelectionGetters = Pick<GridSelectionPlugin, GetterNames<typeof GridSelectionPlugin>>;
|
|
4991
|
-
type SelectionInputGetters = Pick<SelectionInputsManagerPlugin, GetterNames<typeof SelectionInputsManagerPlugin>>;
|
|
4992
|
-
type CollaborativeGetters = Pick<CollaborativePlugin, GetterNames<typeof CollaborativePlugin>>;
|
|
4993
|
-
type SortGetters = Pick<SortPlugin, GetterNames<typeof SortPlugin>>;
|
|
4994
|
-
type UIOptionsGetters = Pick<UIOptionsPlugin, GetterNames<typeof UIOptionsPlugin>>;
|
|
4995
|
-
type SheetUIGetters = Pick<SheetUIPlugin, GetterNames<typeof SheetUIPlugin>>;
|
|
4996
|
-
type ViewportGetters = Pick<SheetViewPlugin, GetterNames<typeof SheetViewPlugin>>;
|
|
4997
|
-
type CellPopoverPluginGetters = Pick<CellPopoverPlugin, GetterNames<typeof CellPopoverPlugin>>;
|
|
4998
|
-
type FilterEvaluationGetters = Pick<FilterEvaluationPlugin, GetterNames<typeof FilterEvaluationPlugin>>;
|
|
4999
|
-
type SplitToColumnsGetters = Pick<SplitToColumnsPlugin, GetterNames<typeof SplitToColumnsPlugin>>;
|
|
5000
|
-
type UIRowSizeGetters = Pick<UIRowSizePlugin, GetterNames<typeof UIRowSizePlugin>>;
|
|
5243
|
+
type CoreGetters = PluginGetters<typeof SheetPlugin> & PluginGetters<typeof HeaderSizePlugin> & PluginGetters<typeof HeaderVisibilityPlugin> & PluginGetters<typeof CellPlugin> & PluginGetters<typeof MergePlugin> & PluginGetters<typeof BordersPlugin> & PluginGetters<typeof ChartPlugin> & PluginGetters<typeof ImagePlugin> & PluginGetters<typeof FigurePlugin> & RangeAdapterGetters & PluginGetters<typeof ConditionalFormatPlugin> & PluginGetters<typeof FiltersPlugin> & PluginGetters<typeof SettingsPlugin> & PluginGetters<typeof HeaderGroupingPlugin> & PluginGetters<typeof DataValidationPlugin>;
|
|
5001
5244
|
type Getters = {
|
|
5002
5245
|
isReadonly: () => boolean;
|
|
5003
5246
|
isDashboard: () => boolean;
|
|
5004
|
-
} &
|
|
5247
|
+
} & CoreGetters & PluginGetters<typeof AutofillPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EditionPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof FindAndReplacePlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof HighlightPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof RendererPlugin> & PluginGetters<typeof GridSelectionPlugin> & PluginGetters<typeof SelectionInputsManagerPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof SheetViewPlugin> & PluginGetters<typeof CellPopoverPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin>;
|
|
5005
5248
|
|
|
5006
5249
|
interface HistoryChange {
|
|
5007
5250
|
root: any;
|
|
@@ -5180,7 +5423,7 @@ interface ChartBuilder {
|
|
|
5180
5423
|
sequence: number;
|
|
5181
5424
|
}
|
|
5182
5425
|
|
|
5183
|
-
interface Props$
|
|
5426
|
+
interface Props$K {
|
|
5184
5427
|
ranges: () => string[];
|
|
5185
5428
|
hasSingleRange?: boolean;
|
|
5186
5429
|
required?: boolean;
|
|
@@ -5202,7 +5445,7 @@ interface SelectionRange extends Omit<RangeInputValue, "color"> {
|
|
|
5202
5445
|
* onSelectionChanged is called every time the input value
|
|
5203
5446
|
* changes.
|
|
5204
5447
|
*/
|
|
5205
|
-
declare class SelectionInput extends Component<Props$
|
|
5448
|
+
declare class SelectionInput extends Component<Props$K, SpreadsheetChildEnv> {
|
|
5206
5449
|
static template: string;
|
|
5207
5450
|
private id;
|
|
5208
5451
|
private previousRanges;
|
|
@@ -5231,26 +5474,26 @@ declare class SelectionInput extends Component<Props$H, SpreadsheetChildEnv> {
|
|
|
5231
5474
|
confirm(): void;
|
|
5232
5475
|
}
|
|
5233
5476
|
|
|
5234
|
-
interface Props$
|
|
5477
|
+
interface Props$J {
|
|
5235
5478
|
messages: string[];
|
|
5236
5479
|
msgType: "warning" | "error";
|
|
5237
5480
|
}
|
|
5238
|
-
declare class
|
|
5481
|
+
declare class ValidationMessages extends Component<Props$J, SpreadsheetChildEnv> {
|
|
5239
5482
|
static template: string;
|
|
5240
|
-
get divClasses(): "o-
|
|
5483
|
+
get divClasses(): "o-validation-warning text-warning" | "o-validation-error text-danger";
|
|
5241
5484
|
}
|
|
5242
5485
|
|
|
5243
|
-
interface Props$
|
|
5486
|
+
interface Props$I {
|
|
5244
5487
|
figureId: UID;
|
|
5245
5488
|
definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
|
|
5246
5489
|
canUpdateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5247
5490
|
updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5248
5491
|
}
|
|
5249
|
-
declare class LineBarPieConfigPanel extends Component<Props$
|
|
5492
|
+
declare class LineBarPieConfigPanel extends Component<Props$I, SpreadsheetChildEnv> {
|
|
5250
5493
|
static template: string;
|
|
5251
5494
|
static components: {
|
|
5252
5495
|
SelectionInput: typeof SelectionInput;
|
|
5253
|
-
|
|
5496
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5254
5497
|
};
|
|
5255
5498
|
private state;
|
|
5256
5499
|
private dataSeriesRanges;
|
|
@@ -5375,7 +5618,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
|
|
|
5375
5618
|
isSameColor(color1: Color, color2: Color): boolean;
|
|
5376
5619
|
}
|
|
5377
5620
|
|
|
5378
|
-
interface Props$
|
|
5621
|
+
interface Props$H {
|
|
5379
5622
|
currentColor: string | undefined;
|
|
5380
5623
|
toggleColorPicker: () => void;
|
|
5381
5624
|
showColorPicker: boolean;
|
|
@@ -5386,7 +5629,7 @@ interface Props$E {
|
|
|
5386
5629
|
dropdownMaxHeight?: Pixel;
|
|
5387
5630
|
class?: string;
|
|
5388
5631
|
}
|
|
5389
|
-
declare class ColorPickerWidget extends Component<Props$
|
|
5632
|
+
declare class ColorPickerWidget extends Component<Props$H, SpreadsheetChildEnv> {
|
|
5390
5633
|
static template: string;
|
|
5391
5634
|
static components: {
|
|
5392
5635
|
ColorPicker: typeof ColorPicker;
|
|
@@ -5398,13 +5641,13 @@ declare class ColorPickerWidget extends Component<Props$E, SpreadsheetChildEnv>
|
|
|
5398
5641
|
get colorPickerAnchorRect(): Rect;
|
|
5399
5642
|
}
|
|
5400
5643
|
|
|
5401
|
-
interface Props$
|
|
5644
|
+
interface Props$G {
|
|
5402
5645
|
figureId: UID;
|
|
5403
5646
|
definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
|
|
5404
5647
|
canUpdateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5405
5648
|
updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5406
5649
|
}
|
|
5407
|
-
declare class LineBarPieDesignPanel extends Component<Props$
|
|
5650
|
+
declare class LineBarPieDesignPanel extends Component<Props$G, SpreadsheetChildEnv> {
|
|
5408
5651
|
static template: string;
|
|
5409
5652
|
static components: {
|
|
5410
5653
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
@@ -5418,17 +5661,17 @@ declare class LineBarPieDesignPanel extends Component<Props$D, SpreadsheetChildE
|
|
|
5418
5661
|
updateSelect(attr: string, ev: any): void;
|
|
5419
5662
|
}
|
|
5420
5663
|
|
|
5421
|
-
interface Props$
|
|
5664
|
+
interface Props$F {
|
|
5422
5665
|
figureId: UID;
|
|
5423
5666
|
definition: GaugeChartDefinition;
|
|
5424
5667
|
canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5425
5668
|
updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5426
5669
|
}
|
|
5427
|
-
declare class GaugeChartConfigPanel extends Component<Props$
|
|
5670
|
+
declare class GaugeChartConfigPanel extends Component<Props$F, SpreadsheetChildEnv> {
|
|
5428
5671
|
static template: string;
|
|
5429
5672
|
static components: {
|
|
5430
5673
|
SelectionInput: typeof SelectionInput;
|
|
5431
|
-
|
|
5674
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5432
5675
|
};
|
|
5433
5676
|
private state;
|
|
5434
5677
|
private dataRange;
|
|
@@ -5440,17 +5683,17 @@ declare class GaugeChartConfigPanel extends Component<Props$C, SpreadsheetChildE
|
|
|
5440
5683
|
}
|
|
5441
5684
|
|
|
5442
5685
|
type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
|
|
5443
|
-
interface Props$
|
|
5686
|
+
interface Props$E {
|
|
5444
5687
|
figureId: UID;
|
|
5445
5688
|
definition: GaugeChartDefinition;
|
|
5446
5689
|
canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5447
5690
|
updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5448
5691
|
}
|
|
5449
|
-
declare class GaugeChartDesignPanel extends Component<Props$
|
|
5692
|
+
declare class GaugeChartDesignPanel extends Component<Props$E, SpreadsheetChildEnv> {
|
|
5450
5693
|
static template: string;
|
|
5451
5694
|
static components: {
|
|
5452
5695
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
5453
|
-
|
|
5696
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5454
5697
|
};
|
|
5455
5698
|
private state;
|
|
5456
5699
|
setup(): void;
|
|
@@ -5477,17 +5720,17 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
|
|
|
5477
5720
|
onUpdateCumulative(ev: any): void;
|
|
5478
5721
|
}
|
|
5479
5722
|
|
|
5480
|
-
interface Props$
|
|
5723
|
+
interface Props$D {
|
|
5481
5724
|
figureId: UID;
|
|
5482
5725
|
definition: ScorecardChartDefinition;
|
|
5483
5726
|
canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5484
5727
|
updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5485
5728
|
}
|
|
5486
|
-
declare class ScorecardChartConfigPanel extends Component<Props$
|
|
5729
|
+
declare class ScorecardChartConfigPanel extends Component<Props$D, SpreadsheetChildEnv> {
|
|
5487
5730
|
static template: string;
|
|
5488
5731
|
static components: {
|
|
5489
5732
|
SelectionInput: typeof SelectionInput;
|
|
5490
|
-
|
|
5733
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5491
5734
|
};
|
|
5492
5735
|
private state;
|
|
5493
5736
|
private keyValue;
|
|
@@ -5505,13 +5748,13 @@ declare class ScorecardChartConfigPanel extends Component<Props$A, SpreadsheetCh
|
|
|
5505
5748
|
}
|
|
5506
5749
|
|
|
5507
5750
|
type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
|
|
5508
|
-
interface Props$
|
|
5751
|
+
interface Props$C {
|
|
5509
5752
|
figureId: UID;
|
|
5510
5753
|
definition: ScorecardChartDefinition;
|
|
5511
5754
|
canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5512
5755
|
updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5513
5756
|
}
|
|
5514
|
-
declare class ScorecardChartDesignPanel extends Component<Props$
|
|
5757
|
+
declare class ScorecardChartDesignPanel extends Component<Props$C, SpreadsheetChildEnv> {
|
|
5515
5758
|
static template: string;
|
|
5516
5759
|
static components: {
|
|
5517
5760
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
@@ -5655,10 +5898,12 @@ interface AutofillRule {
|
|
|
5655
5898
|
sequence: number;
|
|
5656
5899
|
}
|
|
5657
5900
|
|
|
5658
|
-
|
|
5901
|
+
declare function transformRangeData(range: RangeData, executed: CoreCommand): RangeData | undefined;
|
|
5902
|
+
|
|
5903
|
+
interface Props$B {
|
|
5659
5904
|
figure: Figure;
|
|
5660
5905
|
}
|
|
5661
|
-
declare class ChartJsComponent extends Component<Props$
|
|
5906
|
+
declare class ChartJsComponent extends Component<Props$B, SpreadsheetChildEnv> {
|
|
5662
5907
|
static template: string;
|
|
5663
5908
|
private canvas;
|
|
5664
5909
|
private chart?;
|
|
@@ -5670,43 +5915,19 @@ declare class ChartJsComponent extends Component<Props$y, SpreadsheetChildEnv> {
|
|
|
5670
5915
|
private updateChartJs;
|
|
5671
5916
|
}
|
|
5672
5917
|
|
|
5673
|
-
interface Props$
|
|
5918
|
+
interface Props$A {
|
|
5674
5919
|
figure: Figure;
|
|
5675
5920
|
}
|
|
5676
|
-
declare class ScorecardChart extends Component<Props$
|
|
5921
|
+
declare class ScorecardChart extends Component<Props$A, SpreadsheetChildEnv> {
|
|
5677
5922
|
static template: string;
|
|
5678
|
-
private
|
|
5923
|
+
private canvas;
|
|
5679
5924
|
get runtime(): ScorecardChartRuntime;
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
get baseline(): string;
|
|
5683
|
-
get baselineDescr(): string;
|
|
5684
|
-
get baselineArrowDirection(): BaselineArrowDirection;
|
|
5685
|
-
get backgroundColor(): Color;
|
|
5686
|
-
get primaryFontColor(): Color;
|
|
5687
|
-
get secondaryFontColor(): "#525252" | "#C8C8C8";
|
|
5688
|
-
get figure(): Figure;
|
|
5689
|
-
get chartStyle(): string;
|
|
5690
|
-
get chartContentStyle(): string;
|
|
5691
|
-
get chartPadding(): number;
|
|
5692
|
-
translate(term: any): string;
|
|
5693
|
-
getTextStyles(): {
|
|
5694
|
-
titleStyle: string;
|
|
5695
|
-
keyStyle: string;
|
|
5696
|
-
baselineStyle: string;
|
|
5697
|
-
baselineValueStyle: string;
|
|
5698
|
-
baselineDescrStyle: string;
|
|
5699
|
-
};
|
|
5700
|
-
/** Return an CSS style string corresponding to the given arguments */
|
|
5701
|
-
private getTextStyle;
|
|
5702
|
-
/** Get the height of the chart minus all the vertical paddings */
|
|
5703
|
-
private getDrawableHeight;
|
|
5704
|
-
/** Return the element with he widest text in the chart */
|
|
5705
|
-
private getWidestElement;
|
|
5925
|
+
setup(): void;
|
|
5926
|
+
private createChart;
|
|
5706
5927
|
}
|
|
5707
5928
|
|
|
5708
5929
|
type MenuItemOrSeparator = Action | "separator";
|
|
5709
|
-
interface Props$
|
|
5930
|
+
interface Props$z {
|
|
5710
5931
|
position: DOMCoordinates;
|
|
5711
5932
|
menuItems: Action[];
|
|
5712
5933
|
depth: number;
|
|
@@ -5722,7 +5943,7 @@ interface MenuState {
|
|
|
5722
5943
|
scrollOffset?: Pixel;
|
|
5723
5944
|
menuItems: Action[];
|
|
5724
5945
|
}
|
|
5725
|
-
declare class Menu extends Component<Props$
|
|
5946
|
+
declare class Menu extends Component<Props$z, SpreadsheetChildEnv> {
|
|
5726
5947
|
static template: string;
|
|
5727
5948
|
static components: {
|
|
5728
5949
|
Menu: typeof Menu;
|
|
@@ -5760,14 +5981,14 @@ declare class Menu extends Component<Props$w, SpreadsheetChildEnv> {
|
|
|
5760
5981
|
}
|
|
5761
5982
|
|
|
5762
5983
|
type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
|
|
5763
|
-
interface Props$
|
|
5984
|
+
interface Props$y {
|
|
5764
5985
|
figure: Figure;
|
|
5765
5986
|
style: string;
|
|
5766
5987
|
onFigureDeleted: () => void;
|
|
5767
5988
|
onMouseDown: (ev: MouseEvent) => void;
|
|
5768
5989
|
onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
|
|
5769
5990
|
}
|
|
5770
|
-
declare class FigureComponent extends Component<Props$
|
|
5991
|
+
declare class FigureComponent extends Component<Props$y, SpreadsheetChildEnv> {
|
|
5771
5992
|
static template: string;
|
|
5772
5993
|
static components: {
|
|
5773
5994
|
Menu: typeof Menu;
|
|
@@ -5797,11 +6018,11 @@ declare class FigureComponent extends Component<Props$v, SpreadsheetChildEnv> {
|
|
|
5797
6018
|
private openContextMenu;
|
|
5798
6019
|
}
|
|
5799
6020
|
|
|
5800
|
-
interface Props$
|
|
6021
|
+
interface Props$x {
|
|
5801
6022
|
figure: Figure;
|
|
5802
6023
|
onFigureDeleted: () => void;
|
|
5803
6024
|
}
|
|
5804
|
-
declare class ChartFigure extends Component<Props$
|
|
6025
|
+
declare class ChartFigure extends Component<Props$x, SpreadsheetChildEnv> {
|
|
5805
6026
|
static template: string;
|
|
5806
6027
|
static components: {};
|
|
5807
6028
|
onDoubleClick(): void;
|
|
@@ -5809,7 +6030,7 @@ declare class ChartFigure extends Component<Props$u, SpreadsheetChildEnv> {
|
|
|
5809
6030
|
get chartComponent(): new (...args: any) => Component;
|
|
5810
6031
|
}
|
|
5811
6032
|
|
|
5812
|
-
interface Props$
|
|
6033
|
+
interface Props$w {
|
|
5813
6034
|
isVisible: boolean;
|
|
5814
6035
|
position: Position;
|
|
5815
6036
|
}
|
|
@@ -5817,13 +6038,13 @@ interface Position {
|
|
|
5817
6038
|
top: HeaderIndex;
|
|
5818
6039
|
left: HeaderIndex;
|
|
5819
6040
|
}
|
|
5820
|
-
interface State$
|
|
6041
|
+
interface State$6 {
|
|
5821
6042
|
position: Position;
|
|
5822
6043
|
handler: boolean;
|
|
5823
6044
|
}
|
|
5824
|
-
declare class Autofill extends Component<Props$
|
|
6045
|
+
declare class Autofill extends Component<Props$w, SpreadsheetChildEnv> {
|
|
5825
6046
|
static template: string;
|
|
5826
|
-
state: State$
|
|
6047
|
+
state: State$6;
|
|
5827
6048
|
get style(): string;
|
|
5828
6049
|
get handlerStyle(): string;
|
|
5829
6050
|
get styleNextValue(): string;
|
|
@@ -5895,13 +6116,13 @@ declare class Ripple extends Component<RippleProps, SpreadsheetChildEnv> {
|
|
|
5895
6116
|
getRippleEffectProps(id: number): RippleEffectProps;
|
|
5896
6117
|
}
|
|
5897
6118
|
|
|
5898
|
-
interface Props$
|
|
6119
|
+
interface Props$v {
|
|
5899
6120
|
sheetId: string;
|
|
5900
6121
|
openContextMenu: (registry: MenuItemRegistry, ev: MouseEvent) => void;
|
|
5901
6122
|
style?: string;
|
|
5902
6123
|
onMouseDown: (ev: MouseEvent) => void;
|
|
5903
6124
|
}
|
|
5904
|
-
declare class BottomBarSheet extends Component<Props$
|
|
6125
|
+
declare class BottomBarSheet extends Component<Props$v, SpreadsheetChildEnv> {
|
|
5905
6126
|
static template: string;
|
|
5906
6127
|
static components: {
|
|
5907
6128
|
Ripple: typeof Ripple;
|
|
@@ -5935,11 +6156,11 @@ declare class BottomBarSheet extends Component<Props$s, SpreadsheetChildEnv> {
|
|
|
5935
6156
|
get sheetName(): string;
|
|
5936
6157
|
}
|
|
5937
6158
|
|
|
5938
|
-
interface Props$
|
|
6159
|
+
interface Props$u {
|
|
5939
6160
|
openContextMenu: (x: number, y: number, registry: MenuItemRegistry) => void;
|
|
5940
6161
|
closeContextMenu: () => void;
|
|
5941
6162
|
}
|
|
5942
|
-
declare class BottomBarStatistic extends Component<Props$
|
|
6163
|
+
declare class BottomBarStatistic extends Component<Props$u, SpreadsheetChildEnv> {
|
|
5943
6164
|
static template: string;
|
|
5944
6165
|
static components: {
|
|
5945
6166
|
Ripple: typeof Ripple;
|
|
@@ -5956,18 +6177,13 @@ interface BottomBarSheetItem {
|
|
|
5956
6177
|
id: UID;
|
|
5957
6178
|
name: string;
|
|
5958
6179
|
}
|
|
5959
|
-
interface
|
|
5960
|
-
sheetList: BottomBarSheetItem[];
|
|
5961
|
-
isDnd: boolean;
|
|
5962
|
-
sheetDndPositions: Record<UID, number> | undefined;
|
|
5963
|
-
}
|
|
5964
|
-
interface Props$q {
|
|
6180
|
+
interface Props$t {
|
|
5965
6181
|
onClick: () => void;
|
|
5966
6182
|
}
|
|
5967
6183
|
interface BottomBarMenuState extends MenuState {
|
|
5968
6184
|
menuId: UID | undefined;
|
|
5969
6185
|
}
|
|
5970
|
-
declare class BottomBar extends Component<Props$
|
|
6186
|
+
declare class BottomBar extends Component<Props$t, SpreadsheetChildEnv> {
|
|
5971
6187
|
static template: string;
|
|
5972
6188
|
static components: {
|
|
5973
6189
|
Menu: typeof Menu;
|
|
@@ -5977,17 +6193,15 @@ declare class BottomBar extends Component<Props$q, SpreadsheetChildEnv> {
|
|
|
5977
6193
|
};
|
|
5978
6194
|
private bottomBarRef;
|
|
5979
6195
|
private sheetListRef;
|
|
5980
|
-
private
|
|
6196
|
+
private dragAndDrop;
|
|
5981
6197
|
private targetScroll;
|
|
5982
6198
|
private state;
|
|
5983
6199
|
menuMaxHeight: number;
|
|
5984
6200
|
menuState: BottomBarMenuState;
|
|
5985
|
-
|
|
6201
|
+
sheetList: BottomBarSheetItem[];
|
|
5986
6202
|
setup(): void;
|
|
5987
|
-
isDragged(sheetId: UID): boolean;
|
|
5988
6203
|
clickAddSheet(ev: MouseEvent): void;
|
|
5989
|
-
|
|
5990
|
-
getSheets(): BottomBarSheetItem[];
|
|
6204
|
+
getVisibleSheets(): BottomBarSheetItem[];
|
|
5991
6205
|
clickListSheets(ev: MouseEvent): void;
|
|
5992
6206
|
openContextMenu(x: Pixel, y: Pixel, menuId: UID, registry: MenuItemRegistry): void;
|
|
5993
6207
|
onSheetContextMenu(sheetId: UID, registry: MenuItemRegistry, ev: MenuMouseEvent): void;
|
|
@@ -6002,32 +6216,44 @@ declare class BottomBar extends Component<Props$q, SpreadsheetChildEnv> {
|
|
|
6002
6216
|
onSheetMouseDown(sheetId: UID, event: MouseEvent): void;
|
|
6003
6217
|
private onDragEnd;
|
|
6004
6218
|
getSheetStyle(sheetId: UID): string;
|
|
6005
|
-
private stopDragging;
|
|
6006
6219
|
private getSheetItemRects;
|
|
6007
|
-
getSheetClasses(sheetId: UID): string;
|
|
6008
6220
|
get sheetListCurrentScroll(): number;
|
|
6009
6221
|
get sheetListWidth(): number;
|
|
6010
6222
|
get sheetListMaxScroll(): number;
|
|
6011
6223
|
}
|
|
6012
6224
|
|
|
6013
|
-
interface
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6225
|
+
interface GridCellIconProps {
|
|
6226
|
+
cellPosition: CellPosition;
|
|
6227
|
+
horizontalAlign?: Align;
|
|
6228
|
+
verticalAlign?: VerticalAlign;
|
|
6229
|
+
offset?: DOMCoordinates;
|
|
6017
6230
|
}
|
|
6018
|
-
declare class
|
|
6231
|
+
declare class GridCellIcon extends Component<GridCellIconProps, SpreadsheetChildEnv> {
|
|
6019
6232
|
static style: string;
|
|
6020
6233
|
static template: string;
|
|
6021
|
-
get
|
|
6234
|
+
get iconStyle(): string;
|
|
6235
|
+
private getIconVerticalPosition;
|
|
6236
|
+
private getIconHorizontalPosition;
|
|
6237
|
+
isPositionVisible(position: CellPosition): boolean;
|
|
6022
6238
|
}
|
|
6023
6239
|
|
|
6024
|
-
interface Props$
|
|
6025
|
-
|
|
6240
|
+
interface Props$s {
|
|
6241
|
+
cellPosition: CellPosition;
|
|
6026
6242
|
}
|
|
6027
|
-
declare class
|
|
6243
|
+
declare class FilterIcon extends Component<Props$s, SpreadsheetChildEnv> {
|
|
6028
6244
|
static style: string;
|
|
6245
|
+
static template: string;
|
|
6246
|
+
onClick(): void;
|
|
6247
|
+
get isFilterActive(): boolean;
|
|
6248
|
+
}
|
|
6249
|
+
|
|
6250
|
+
interface Props$r {
|
|
6251
|
+
gridPosition: DOMCoordinates;
|
|
6252
|
+
}
|
|
6253
|
+
declare class FilterIconsOverlay extends Component<Props$r, SpreadsheetChildEnv> {
|
|
6029
6254
|
static template: string;
|
|
6030
6255
|
static components: {
|
|
6256
|
+
GridCellIcon: typeof GridCellIcon;
|
|
6031
6257
|
FilterIcon: typeof FilterIcon;
|
|
6032
6258
|
};
|
|
6033
6259
|
static defaultProps: {
|
|
@@ -6036,12 +6262,36 @@ declare class FilterIconsOverlay extends Component<Props$o, SpreadsheetChildEnv>
|
|
|
6036
6262
|
y: number;
|
|
6037
6263
|
};
|
|
6038
6264
|
};
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6265
|
+
getFilterHeadersPositions(): CellPosition[];
|
|
6266
|
+
}
|
|
6267
|
+
|
|
6268
|
+
interface Props$q {
|
|
6269
|
+
cellPosition: CellPosition;
|
|
6270
|
+
}
|
|
6271
|
+
declare class DataValidationCheckbox extends Component<Props$q, SpreadsheetChildEnv> {
|
|
6272
|
+
static template: string;
|
|
6273
|
+
onCheckboxChange(ev: Event): void;
|
|
6274
|
+
get checkBoxValue(): boolean;
|
|
6275
|
+
get isDisabled(): boolean;
|
|
6276
|
+
}
|
|
6277
|
+
|
|
6278
|
+
interface Props$p {
|
|
6279
|
+
cellPosition: CellPosition;
|
|
6280
|
+
}
|
|
6281
|
+
declare class DataValidationListIcon extends Component<Props$p, SpreadsheetChildEnv> {
|
|
6282
|
+
static template: string;
|
|
6283
|
+
onClick(): void;
|
|
6284
|
+
}
|
|
6285
|
+
|
|
6286
|
+
declare class DataValidationOverlay extends Component<{}, SpreadsheetChildEnv> {
|
|
6287
|
+
static template: string;
|
|
6288
|
+
static components: {
|
|
6289
|
+
GridCellIcon: typeof GridCellIcon;
|
|
6290
|
+
DataValidationCheckbox: typeof DataValidationCheckbox;
|
|
6291
|
+
DataValidationListIcon: typeof DataValidationListIcon;
|
|
6292
|
+
};
|
|
6293
|
+
get checkBoxCellPositions(): CellPosition[];
|
|
6294
|
+
get listIconsCellPositions(): CellPosition[];
|
|
6045
6295
|
}
|
|
6046
6296
|
|
|
6047
6297
|
type HFigureAxisType = "top" | "bottom" | "vCenter";
|
|
@@ -6054,7 +6304,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
|
6054
6304
|
}
|
|
6055
6305
|
|
|
6056
6306
|
type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
|
|
6057
|
-
interface Props$
|
|
6307
|
+
interface Props$o {
|
|
6058
6308
|
onFigureDeleted: () => void;
|
|
6059
6309
|
}
|
|
6060
6310
|
interface Container {
|
|
@@ -6133,7 +6383,7 @@ interface DndState {
|
|
|
6133
6383
|
* that occurred during the drag & drop, and to position the figure on the correct pane.
|
|
6134
6384
|
*
|
|
6135
6385
|
*/
|
|
6136
|
-
declare class FiguresContainer extends Component<Props$
|
|
6386
|
+
declare class FiguresContainer extends Component<Props$o, SpreadsheetChildEnv> {
|
|
6137
6387
|
static template: string;
|
|
6138
6388
|
static components: {
|
|
6139
6389
|
FigureComponent: typeof FigureComponent;
|
|
@@ -6165,6 +6415,30 @@ declare class FiguresContainer extends Component<Props$n, SpreadsheetChildEnv> {
|
|
|
6165
6415
|
private getSnapLineStyle;
|
|
6166
6416
|
}
|
|
6167
6417
|
|
|
6418
|
+
interface Props$n {
|
|
6419
|
+
focusGrid: () => void;
|
|
6420
|
+
}
|
|
6421
|
+
declare class GridAddRowsFooter extends Component<Props$n, SpreadsheetChildEnv> {
|
|
6422
|
+
static template: string;
|
|
6423
|
+
static components: {
|
|
6424
|
+
ValidationMessages: typeof ValidationMessages;
|
|
6425
|
+
};
|
|
6426
|
+
inputRef: {
|
|
6427
|
+
el: HTMLInputElement | null;
|
|
6428
|
+
};
|
|
6429
|
+
state: {
|
|
6430
|
+
inputValue: string;
|
|
6431
|
+
errorFlag: boolean;
|
|
6432
|
+
};
|
|
6433
|
+
setup(): void;
|
|
6434
|
+
get addRowsPosition(): string;
|
|
6435
|
+
get errorMessages(): string[];
|
|
6436
|
+
onKeydown(ev: KeyboardEvent): void;
|
|
6437
|
+
onInput(ev: InputEvent): void;
|
|
6438
|
+
onConfirm(): void;
|
|
6439
|
+
private onExternalClick;
|
|
6440
|
+
}
|
|
6441
|
+
|
|
6168
6442
|
interface Props$m {
|
|
6169
6443
|
onCellHovered: (position: Partial<Position$1>) => void;
|
|
6170
6444
|
onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
|
|
@@ -6182,6 +6456,8 @@ declare class GridOverlay extends Component<Props$m, SpreadsheetChildEnv> {
|
|
|
6182
6456
|
static template: string;
|
|
6183
6457
|
static components: {
|
|
6184
6458
|
FiguresContainer: typeof FiguresContainer;
|
|
6459
|
+
DataValidationOverlay: typeof DataValidationOverlay;
|
|
6460
|
+
GridAddRowsFooter: typeof GridAddRowsFooter;
|
|
6185
6461
|
};
|
|
6186
6462
|
static defaultProps: {
|
|
6187
6463
|
onCellHovered: () => void;
|
|
@@ -6192,6 +6468,7 @@ declare class GridOverlay extends Component<Props$m, SpreadsheetChildEnv> {
|
|
|
6192
6468
|
onFigureDeleted: () => void;
|
|
6193
6469
|
};
|
|
6194
6470
|
private gridOverlay;
|
|
6471
|
+
private gridOverlayRect;
|
|
6195
6472
|
setup(): void;
|
|
6196
6473
|
get gridOverlayEl(): HTMLElement;
|
|
6197
6474
|
get style(): string;
|
|
@@ -6396,12 +6673,12 @@ interface Props$e {
|
|
|
6396
6673
|
panelProps: any;
|
|
6397
6674
|
onCloseSidePanel: () => void;
|
|
6398
6675
|
}
|
|
6399
|
-
interface State$
|
|
6676
|
+
interface State$5 {
|
|
6400
6677
|
panel: SidePanelContent;
|
|
6401
6678
|
}
|
|
6402
6679
|
declare class SidePanel extends Component<Props$e, SpreadsheetChildEnv> {
|
|
6403
6680
|
static template: string;
|
|
6404
|
-
state: State$
|
|
6681
|
+
state: State$5;
|
|
6405
6682
|
setup(): void;
|
|
6406
6683
|
getTitle(): string;
|
|
6407
6684
|
}
|
|
@@ -6483,6 +6760,14 @@ declare const formatNumberDate: ActionSpec;
|
|
|
6483
6760
|
declare const formatNumberTime: ActionSpec;
|
|
6484
6761
|
declare const formatNumberDateTime: ActionSpec;
|
|
6485
6762
|
declare const formatNumberDuration: ActionSpec;
|
|
6763
|
+
declare const moreFormats: ActionSpec;
|
|
6764
|
+
declare const formatNumberFullDateTime: ActionSpec;
|
|
6765
|
+
declare const formatNumberFullWeekDayAndMonth: ActionSpec;
|
|
6766
|
+
declare const formatNumberDayAndFullMonth: ActionSpec;
|
|
6767
|
+
declare const formatNumberShortWeekDay: ActionSpec;
|
|
6768
|
+
declare const formatNumberDayAndShortMonth: ActionSpec;
|
|
6769
|
+
declare const formatNumberFullMonth: ActionSpec;
|
|
6770
|
+
declare const formatNumberShortMonth: ActionSpec;
|
|
6486
6771
|
declare const incraseDecimalPlaces: ActionSpec;
|
|
6487
6772
|
declare const decraseDecimalPlaces: ActionSpec;
|
|
6488
6773
|
declare const formatBold: ActionSpec;
|
|
@@ -6531,9 +6816,16 @@ declare const ACTION_FORMAT_formatNumberCurrency: typeof formatNumberCurrency;
|
|
|
6531
6816
|
declare const ACTION_FORMAT_formatNumberCurrencyRounded: typeof formatNumberCurrencyRounded;
|
|
6532
6817
|
declare const ACTION_FORMAT_formatNumberDate: typeof formatNumberDate;
|
|
6533
6818
|
declare const ACTION_FORMAT_formatNumberDateTime: typeof formatNumberDateTime;
|
|
6819
|
+
declare const ACTION_FORMAT_formatNumberDayAndFullMonth: typeof formatNumberDayAndFullMonth;
|
|
6820
|
+
declare const ACTION_FORMAT_formatNumberDayAndShortMonth: typeof formatNumberDayAndShortMonth;
|
|
6534
6821
|
declare const ACTION_FORMAT_formatNumberDuration: typeof formatNumberDuration;
|
|
6822
|
+
declare const ACTION_FORMAT_formatNumberFullDateTime: typeof formatNumberFullDateTime;
|
|
6823
|
+
declare const ACTION_FORMAT_formatNumberFullMonth: typeof formatNumberFullMonth;
|
|
6824
|
+
declare const ACTION_FORMAT_formatNumberFullWeekDayAndMonth: typeof formatNumberFullWeekDayAndMonth;
|
|
6535
6825
|
declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
|
|
6536
6826
|
declare const ACTION_FORMAT_formatNumberPercent: typeof formatNumberPercent;
|
|
6827
|
+
declare const ACTION_FORMAT_formatNumberShortMonth: typeof formatNumberShortMonth;
|
|
6828
|
+
declare const ACTION_FORMAT_formatNumberShortWeekDay: typeof formatNumberShortWeekDay;
|
|
6537
6829
|
declare const ACTION_FORMAT_formatNumberTime: typeof formatNumberTime;
|
|
6538
6830
|
declare const ACTION_FORMAT_formatPercent: typeof formatPercent;
|
|
6539
6831
|
declare const ACTION_FORMAT_formatStrikethrough: typeof formatStrikethrough;
|
|
@@ -6544,6 +6836,7 @@ declare const ACTION_FORMAT_formatWrappingIcon: typeof formatWrappingIcon;
|
|
|
6544
6836
|
declare const ACTION_FORMAT_formatWrappingOverflow: typeof formatWrappingOverflow;
|
|
6545
6837
|
declare const ACTION_FORMAT_formatWrappingWrap: typeof formatWrappingWrap;
|
|
6546
6838
|
declare const ACTION_FORMAT_incraseDecimalPlaces: typeof incraseDecimalPlaces;
|
|
6839
|
+
declare const ACTION_FORMAT_moreFormats: typeof moreFormats;
|
|
6547
6840
|
declare const ACTION_FORMAT_textColor: typeof textColor;
|
|
6548
6841
|
declare namespace ACTION_FORMAT {
|
|
6549
6842
|
export {
|
|
@@ -6569,9 +6862,16 @@ declare namespace ACTION_FORMAT {
|
|
|
6569
6862
|
ACTION_FORMAT_formatNumberCurrencyRounded as formatNumberCurrencyRounded,
|
|
6570
6863
|
ACTION_FORMAT_formatNumberDate as formatNumberDate,
|
|
6571
6864
|
ACTION_FORMAT_formatNumberDateTime as formatNumberDateTime,
|
|
6865
|
+
ACTION_FORMAT_formatNumberDayAndFullMonth as formatNumberDayAndFullMonth,
|
|
6866
|
+
ACTION_FORMAT_formatNumberDayAndShortMonth as formatNumberDayAndShortMonth,
|
|
6572
6867
|
ACTION_FORMAT_formatNumberDuration as formatNumberDuration,
|
|
6868
|
+
ACTION_FORMAT_formatNumberFullDateTime as formatNumberFullDateTime,
|
|
6869
|
+
ACTION_FORMAT_formatNumberFullMonth as formatNumberFullMonth,
|
|
6870
|
+
ACTION_FORMAT_formatNumberFullWeekDayAndMonth as formatNumberFullWeekDayAndMonth,
|
|
6573
6871
|
ACTION_FORMAT_formatNumberNumber as formatNumberNumber,
|
|
6574
6872
|
ACTION_FORMAT_formatNumberPercent as formatNumberPercent,
|
|
6873
|
+
ACTION_FORMAT_formatNumberShortMonth as formatNumberShortMonth,
|
|
6874
|
+
ACTION_FORMAT_formatNumberShortWeekDay as formatNumberShortWeekDay,
|
|
6575
6875
|
ACTION_FORMAT_formatNumberTime as formatNumberTime,
|
|
6576
6876
|
ACTION_FORMAT_formatPercent as formatPercent,
|
|
6577
6877
|
ACTION_FORMAT_formatStrikethrough as formatStrikethrough,
|
|
@@ -6582,6 +6882,7 @@ declare namespace ACTION_FORMAT {
|
|
|
6582
6882
|
ACTION_FORMAT_formatWrappingOverflow as formatWrappingOverflow,
|
|
6583
6883
|
ACTION_FORMAT_formatWrappingWrap as formatWrappingWrap,
|
|
6584
6884
|
ACTION_FORMAT_incraseDecimalPlaces as incraseDecimalPlaces,
|
|
6885
|
+
ACTION_FORMAT_moreFormats as moreFormats,
|
|
6585
6886
|
ACTION_FORMAT_textColor as textColor,
|
|
6586
6887
|
};
|
|
6587
6888
|
}
|
|
@@ -6685,7 +6986,7 @@ declare class ActionButton extends Component<Props$d, SpreadsheetChildEnv> {
|
|
|
6685
6986
|
}
|
|
6686
6987
|
|
|
6687
6988
|
type Tool = "borderColorTool" | "borderTypeTool";
|
|
6688
|
-
interface State$
|
|
6989
|
+
interface State$4 {
|
|
6689
6990
|
activeTool: Tool | undefined;
|
|
6690
6991
|
}
|
|
6691
6992
|
interface BorderEditorProps {
|
|
@@ -6710,7 +7011,7 @@ declare class BorderEditor extends Component<BorderEditorProps, SpreadsheetChild
|
|
|
6710
7011
|
el: HTMLElement | null;
|
|
6711
7012
|
};
|
|
6712
7013
|
borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
|
|
6713
|
-
state: State$
|
|
7014
|
+
state: State$4;
|
|
6714
7015
|
toggleDropdownTool(tool: Tool): void;
|
|
6715
7016
|
closeDropdown(): void;
|
|
6716
7017
|
setBorderPosition(position: BorderPosition): void;
|
|
@@ -6728,7 +7029,7 @@ interface Props$c {
|
|
|
6728
7029
|
dropdownMaxHeight?: Pixel;
|
|
6729
7030
|
class?: string;
|
|
6730
7031
|
}
|
|
6731
|
-
interface State$
|
|
7032
|
+
interface State$3 {
|
|
6732
7033
|
currentColor: Color;
|
|
6733
7034
|
currentStyle: BorderStyle;
|
|
6734
7035
|
currentPosition: BorderPosition | undefined;
|
|
@@ -6741,7 +7042,7 @@ declare class BorderEditorWidget extends Component<Props$c, SpreadsheetChildEnv>
|
|
|
6741
7042
|
borderEditorButtonRef: {
|
|
6742
7043
|
el: HTMLElement | null;
|
|
6743
7044
|
};
|
|
6744
|
-
state: State$
|
|
7045
|
+
state: State$3;
|
|
6745
7046
|
get borderEditorAnchorRect(): Rect;
|
|
6746
7047
|
onBorderPositionPicked(position: BorderPosition): void;
|
|
6747
7048
|
onBorderColorPicked(color: Color): void;
|
|
@@ -6751,8 +7052,10 @@ declare class BorderEditorWidget extends Component<Props$c, SpreadsheetChildEnv>
|
|
|
6751
7052
|
|
|
6752
7053
|
interface Props$b {
|
|
6753
7054
|
values: AutocompleteValue[];
|
|
6754
|
-
selectedIndex: number;
|
|
7055
|
+
selectedIndex: number | undefined;
|
|
7056
|
+
getHtmlContent: (value: string) => string;
|
|
6755
7057
|
onValueSelected: (value: string) => void;
|
|
7058
|
+
onValueHovered: (index: string) => void;
|
|
6756
7059
|
}
|
|
6757
7060
|
declare class TextValueProvider extends Component<Props$b> {
|
|
6758
7061
|
static template: string;
|
|
@@ -6858,8 +7161,10 @@ interface ComposerState$1 {
|
|
|
6858
7161
|
}
|
|
6859
7162
|
interface AutoCompleteState {
|
|
6860
7163
|
showProvider: boolean;
|
|
6861
|
-
selectedIndex: number;
|
|
7164
|
+
selectedIndex: number | undefined;
|
|
6862
7165
|
values: AutocompleteValue[];
|
|
7166
|
+
type: "function" | "dataValidation";
|
|
7167
|
+
getHtmlContent: (text: string) => HtmlContent[];
|
|
6863
7168
|
}
|
|
6864
7169
|
interface FunctionDescriptionState {
|
|
6865
7170
|
showDescription: boolean;
|
|
@@ -6907,14 +7212,15 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6907
7212
|
onKeydown(ev: KeyboardEvent): void;
|
|
6908
7213
|
onInput(ev: InputEvent): void;
|
|
6909
7214
|
onKeyup(ev: KeyboardEvent): void;
|
|
6910
|
-
|
|
7215
|
+
showFunctionAutocomplete(searchTerm: string): void;
|
|
7216
|
+
updateAutoCompleteIndex(index: number): void;
|
|
6911
7217
|
/**
|
|
6912
7218
|
* This is required to ensure the content helper selection is
|
|
6913
7219
|
* properly updated on "onclick" events. Depending on the browser,
|
|
6914
7220
|
* the callback onClick from the composer will be executed before
|
|
6915
7221
|
* the selection was updated in the dom, which means we capture an
|
|
6916
7222
|
* wrong selection which is then forced upon the content helper on
|
|
6917
|
-
*
|
|
7223
|
+
* processContent.
|
|
6918
7224
|
*/
|
|
6919
7225
|
onMousedown(ev: MouseEvent): void;
|
|
6920
7226
|
onClick(): void;
|
|
@@ -6939,6 +7245,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6939
7245
|
*/
|
|
6940
7246
|
private processTokenAtCursor;
|
|
6941
7247
|
private autoComplete;
|
|
7248
|
+
private showDataValidationAutocomplete;
|
|
6942
7249
|
}
|
|
6943
7250
|
|
|
6944
7251
|
interface Props$9 {
|
|
@@ -6954,7 +7261,7 @@ declare class TopBarComposer extends Component<Props$9, SpreadsheetChildEnv> {
|
|
|
6954
7261
|
get containerStyle(): string;
|
|
6955
7262
|
}
|
|
6956
7263
|
|
|
6957
|
-
interface State$
|
|
7264
|
+
interface State$2 {
|
|
6958
7265
|
isOpen: boolean;
|
|
6959
7266
|
}
|
|
6960
7267
|
interface Props$8 {
|
|
@@ -6966,7 +7273,7 @@ declare class FontSizeEditor extends Component<Props$8, SpreadsheetChildEnv> {
|
|
|
6966
7273
|
static template: string;
|
|
6967
7274
|
static components: {};
|
|
6968
7275
|
fontSizes: number[];
|
|
6969
|
-
dropdown: State$
|
|
7276
|
+
dropdown: State$2;
|
|
6970
7277
|
private inputRef;
|
|
6971
7278
|
private rootEditorRef;
|
|
6972
7279
|
setup(): void;
|
|
@@ -6991,7 +7298,7 @@ declare class PaintFormatButton extends Component<Props$7, SpreadsheetChildEnv>
|
|
|
6991
7298
|
togglePaintFormat(): void;
|
|
6992
7299
|
}
|
|
6993
7300
|
|
|
6994
|
-
interface State {
|
|
7301
|
+
interface State$1 {
|
|
6995
7302
|
menuState: MenuState;
|
|
6996
7303
|
activeTool: string;
|
|
6997
7304
|
fillColor: string;
|
|
@@ -7016,7 +7323,7 @@ declare class TopBar extends Component<Props$6, SpreadsheetChildEnv> {
|
|
|
7016
7323
|
PaintFormatButton: typeof PaintFormatButton;
|
|
7017
7324
|
BorderEditorWidget: typeof BorderEditorWidget;
|
|
7018
7325
|
};
|
|
7019
|
-
state: State;
|
|
7326
|
+
state: State$1;
|
|
7020
7327
|
isSelectingMenu: boolean;
|
|
7021
7328
|
openedEl: HTMLElement | null;
|
|
7022
7329
|
menus: Action[];
|
|
@@ -7366,6 +7673,29 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7366
7673
|
private processHeaderGroupingEventOnGrid;
|
|
7367
7674
|
}
|
|
7368
7675
|
|
|
7676
|
+
type Direction = "horizontal" | "vertical";
|
|
7677
|
+
interface DragAndDropItemsPartial {
|
|
7678
|
+
id: UID;
|
|
7679
|
+
size: Pixel;
|
|
7680
|
+
position: Pixel;
|
|
7681
|
+
}
|
|
7682
|
+
interface DndPartialArgs {
|
|
7683
|
+
draggedItemId: UID;
|
|
7684
|
+
initialMousePosition: Pixel;
|
|
7685
|
+
items: DragAndDropItemsPartial[];
|
|
7686
|
+
containerEl: HTMLElement;
|
|
7687
|
+
onChange?: () => void;
|
|
7688
|
+
onCancel?: () => void;
|
|
7689
|
+
onDragEnd?: (itemId: UID, indexAtEnd: Pixel) => void;
|
|
7690
|
+
}
|
|
7691
|
+
interface State {
|
|
7692
|
+
itemsStyle: Record<UID, string>;
|
|
7693
|
+
draggedItemId: UID | undefined;
|
|
7694
|
+
start: (direction: Direction, args: DndPartialArgs) => void;
|
|
7695
|
+
cancel: () => void;
|
|
7696
|
+
}
|
|
7697
|
+
declare function useDragAndDropListItems(): State;
|
|
7698
|
+
|
|
7369
7699
|
interface Props {
|
|
7370
7700
|
onCloseSidePanel: () => void;
|
|
7371
7701
|
}
|
|
@@ -7514,8 +7844,10 @@ declare const helpers: {
|
|
|
7514
7844
|
toString: typeof toString;
|
|
7515
7845
|
toXC: typeof toXC;
|
|
7516
7846
|
toZone: typeof toZone;
|
|
7847
|
+
toUnboundedZone: typeof toUnboundedZone;
|
|
7517
7848
|
toCartesian: typeof toCartesian;
|
|
7518
7849
|
numberToLetters: typeof numberToLetters;
|
|
7850
|
+
lettersToNumber: typeof lettersToNumber;
|
|
7519
7851
|
UuidGenerator: typeof UuidGenerator;
|
|
7520
7852
|
formatValue: typeof formatValue;
|
|
7521
7853
|
createCurrencyFormat: typeof createCurrencyFormat;
|
|
@@ -7537,6 +7869,7 @@ declare const helpers: {
|
|
|
7537
7869
|
genericRepeat: typeof genericRepeat;
|
|
7538
7870
|
createAction: typeof createAction;
|
|
7539
7871
|
createActions: typeof createActions;
|
|
7872
|
+
transformRangeData: typeof transformRangeData;
|
|
7540
7873
|
};
|
|
7541
7874
|
declare const links: {
|
|
7542
7875
|
isMarkdownLink: typeof isMarkdownLink;
|
|
@@ -7562,6 +7895,10 @@ declare const components: {
|
|
|
7562
7895
|
ScorecardChartDesignPanel: typeof ScorecardChartDesignPanel;
|
|
7563
7896
|
FigureComponent: typeof FigureComponent;
|
|
7564
7897
|
Menu: typeof Menu;
|
|
7898
|
+
SelectionInput: typeof SelectionInput;
|
|
7899
|
+
};
|
|
7900
|
+
declare const hooks: {
|
|
7901
|
+
useDragAndDropListItems: typeof useDragAndDropListItems;
|
|
7565
7902
|
};
|
|
7566
7903
|
declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
|
|
7567
7904
|
addFunction: (fName: string, fDescription: AddFunctionDescription) => any;
|
|
@@ -7570,4 +7907,4 @@ declare const constants: {
|
|
|
7570
7907
|
DEFAULT_LOCALE: Locale;
|
|
7571
7908
|
};
|
|
7572
7909
|
|
|
7573
|
-
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 };
|
|
7910
|
+
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 };
|