@odoo/o-spreadsheet 16.5.0-alpha.8 → 16.5.0-alpha.9
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 +5603 -3366
- package/dist/o-spreadsheet.d.ts +415 -116
- package/dist/o-spreadsheet.esm.js +5603 -3367
- package/dist/o-spreadsheet.iife.js +5601 -3364
- package/dist/o-spreadsheet.iife.min.js +553 -496
- package/package.json +1 -1
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[];
|
|
@@ -1057,10 +1061,10 @@ type StatefulStream<Event, State> = {
|
|
|
1057
1061
|
interface SelectionProcessor {
|
|
1058
1062
|
selectZone(anchor: AnchorZone, options?: SelectionEventOptions): DispatchResult;
|
|
1059
1063
|
selectCell(col: number, row: number): DispatchResult;
|
|
1060
|
-
moveAnchorCell(direction: Direction, step: SelectionStep): DispatchResult;
|
|
1064
|
+
moveAnchorCell(direction: Direction$1, step: SelectionStep): DispatchResult;
|
|
1061
1065
|
setAnchorCorner(col: number, row: number): DispatchResult;
|
|
1062
1066
|
addCellToSelection(col: number, row: number): DispatchResult;
|
|
1063
|
-
resizeAnchorZone(direction: Direction, step: SelectionStep): DispatchResult;
|
|
1067
|
+
resizeAnchorZone(direction: Direction$1, step: SelectionStep): DispatchResult;
|
|
1064
1068
|
selectColumn(index: number, mode: SelectionEvent["mode"]): DispatchResult;
|
|
1065
1069
|
selectRow(index: number, mode: SelectionEvent["mode"]): DispatchResult;
|
|
1066
1070
|
selectAll(): DispatchResult;
|
|
@@ -1479,7 +1483,7 @@ interface ComposerSelection {
|
|
|
1479
1483
|
end: number;
|
|
1480
1484
|
}
|
|
1481
1485
|
declare class EditionPlugin extends UIPlugin {
|
|
1482
|
-
static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell", "getCycledReference"];
|
|
1486
|
+
static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell", "getCycledReference", "getAutoCompleteDataValidationValues"];
|
|
1483
1487
|
private col;
|
|
1484
1488
|
private row;
|
|
1485
1489
|
private mode;
|
|
@@ -1517,6 +1521,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1517
1521
|
end: number;
|
|
1518
1522
|
};
|
|
1519
1523
|
} | undefined;
|
|
1524
|
+
getInitialComposerContent(): string | undefined;
|
|
1520
1525
|
private cycleReferences;
|
|
1521
1526
|
private validateSelection;
|
|
1522
1527
|
private onColumnsRemoved;
|
|
@@ -1534,6 +1539,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1534
1539
|
*/
|
|
1535
1540
|
private startEdition;
|
|
1536
1541
|
private stopEdition;
|
|
1542
|
+
private getCurrentCanonicalContent;
|
|
1537
1543
|
private cancelEditionAndActivateSheet;
|
|
1538
1544
|
private getComposerContent;
|
|
1539
1545
|
private numberComposerContent;
|
|
@@ -1574,6 +1580,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1574
1580
|
* Return ranges currently referenced in the composer
|
|
1575
1581
|
*/
|
|
1576
1582
|
getReferencedRanges(): Range[];
|
|
1583
|
+
getAutoCompleteDataValidationValues(): string[];
|
|
1577
1584
|
/**
|
|
1578
1585
|
* Function used to determine when composer selection can start.
|
|
1579
1586
|
* Three conditions are necessary:
|
|
@@ -1582,6 +1589,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1582
1589
|
* - Previous and next tokens can be separated by spaces
|
|
1583
1590
|
*/
|
|
1584
1591
|
private canStartComposerRangeSelection;
|
|
1592
|
+
private checkDataValidation;
|
|
1585
1593
|
}
|
|
1586
1594
|
|
|
1587
1595
|
/**
|
|
@@ -1701,11 +1709,11 @@ interface ZoneDependentCommand {
|
|
|
1701
1709
|
sheetId: UID;
|
|
1702
1710
|
zone: Zone;
|
|
1703
1711
|
}
|
|
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" | "
|
|
1712
|
+
declare const invalidateEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
|
|
1713
|
+
declare const invalidateDependenciesCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "CANCEL_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE">;
|
|
1714
|
+
declare const invalidateCFEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
|
|
1715
|
+
declare const readonlyAllowedCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE" | "ACTIVATE_SHEET" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "CANCEL_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER" | "SPLIT_TEXT_INTO_COLUMNS" | "REMOVE_DUPLICATES" | "TRIM_WHITESPACE">;
|
|
1716
|
+
declare const coreTypes: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "CHANGE_CONDITIONAL_FORMAT_PRIORITY" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "GROUP_HEADERS" | "UNGROUP_HEADERS" | "UNFOLD_HEADER_GROUP" | "FOLD_HEADER_GROUP" | "FOLD_ALL_HEADER_GROUPS" | "UNFOLD_ALL_HEADER_GROUPS" | "UNFOLD_HEADER_GROUPS_IN_ZONE" | "FOLD_HEADER_GROUPS_IN_ZONE" | "ADD_DATA_VALIDATION_RULE" | "REMOVE_DATA_VALIDATION_RULE" | "UPDATE_LOCALE">;
|
|
1709
1717
|
interface UpdateCellCommand extends PositionDependentCommand {
|
|
1710
1718
|
type: "UPDATE_CELL";
|
|
1711
1719
|
content?: string;
|
|
@@ -1837,9 +1845,9 @@ interface RemoveConditionalFormatCommand extends SheetDependentCommand {
|
|
|
1837
1845
|
id: string;
|
|
1838
1846
|
}
|
|
1839
1847
|
interface MoveConditionalFormatCommand extends SheetDependentCommand {
|
|
1840
|
-
type: "
|
|
1848
|
+
type: "CHANGE_CONDITIONAL_FORMAT_PRIORITY";
|
|
1841
1849
|
cfId: UID;
|
|
1842
|
-
|
|
1850
|
+
delta: number;
|
|
1843
1851
|
}
|
|
1844
1852
|
interface CreateFigureCommand extends SheetDependentCommand {
|
|
1845
1853
|
type: "CREATE_FIGURE";
|
|
@@ -1960,6 +1968,14 @@ interface FoldHeaderGroupsInZoneCommand extends ZoneDependentCommand {
|
|
|
1960
1968
|
type: "FOLD_HEADER_GROUPS_IN_ZONE";
|
|
1961
1969
|
dimension: Dimension;
|
|
1962
1970
|
}
|
|
1971
|
+
interface AddDataValidationCommand extends SheetDependentCommand, RangesDependentCommand {
|
|
1972
|
+
type: "ADD_DATA_VALIDATION_RULE";
|
|
1973
|
+
rule: Omit<DataValidationRule, "ranges">;
|
|
1974
|
+
}
|
|
1975
|
+
interface RemoveDataValidationCommand extends SheetDependentCommand {
|
|
1976
|
+
type: "REMOVE_DATA_VALIDATION_RULE";
|
|
1977
|
+
id: string;
|
|
1978
|
+
}
|
|
1963
1979
|
interface CopyCommand {
|
|
1964
1980
|
type: "COPY";
|
|
1965
1981
|
}
|
|
@@ -2043,7 +2059,9 @@ interface StartEditionCommand {
|
|
|
2043
2059
|
}
|
|
2044
2060
|
interface StopEditionCommand {
|
|
2045
2061
|
type: "STOP_EDITION";
|
|
2046
|
-
|
|
2062
|
+
}
|
|
2063
|
+
interface CancelEditionCommand {
|
|
2064
|
+
type: "CANCEL_EDITION";
|
|
2047
2065
|
}
|
|
2048
2066
|
interface SetCurrentContentCommand {
|
|
2049
2067
|
type: "SET_CURRENT_CONTENT";
|
|
@@ -2306,13 +2324,17 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
|
|
|
2306
2324
|
| SetFormattingCommand | ClearFormattingCommand | SetZoneBordersCommand | SetBorderCommand
|
|
2307
2325
|
/** CHART */
|
|
2308
2326
|
| CreateChartCommand | UpdateChartCommand
|
|
2309
|
-
/**
|
|
2327
|
+
/** IMAGE */
|
|
2310
2328
|
| CreateImageOverCommand
|
|
2311
2329
|
/** FILTERS */
|
|
2312
|
-
| CreateFilterTableCommand | RemoveFilterTableCommand
|
|
2313
|
-
/**
|
|
2314
|
-
| GroupHeadersCommand | UnGroupHeadersCommand | UnfoldHeaderGroupCommand | FoldHeaderGroupCommand | FoldAllHeaderGroupsCommand | UnfoldAllHeaderGroupsCommand | UnfoldHeaderGroupsInZoneCommand | FoldHeaderGroupsInZoneCommand
|
|
2315
|
-
|
|
2330
|
+
| CreateFilterTableCommand | RemoveFilterTableCommand
|
|
2331
|
+
/** HEADER GROUP */
|
|
2332
|
+
| GroupHeadersCommand | UnGroupHeadersCommand | UnfoldHeaderGroupCommand | FoldHeaderGroupCommand | FoldAllHeaderGroupsCommand | UnfoldAllHeaderGroupsCommand | UnfoldHeaderGroupsInZoneCommand | FoldHeaderGroupsInZoneCommand
|
|
2333
|
+
/** DATA VALIDATION */
|
|
2334
|
+
| AddDataValidationCommand | RemoveDataValidationCommand
|
|
2335
|
+
/** MISC */
|
|
2336
|
+
| UpdateLocaleCommand;
|
|
2337
|
+
type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | AddRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | CancelPaintFormatCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | StartChangeHighlightCommand | SetColorCommand | StopComposerSelectionCommand | StartEditionCommand | StopEditionCommand | CancelEditionCommand | SetCurrentContentCommand | ChangeComposerSelectionCommand | ReplaceComposerSelectionCommand | CycleEditionReferencesCommand | StartCommand | AutofillCommand | AutofillSelectCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | UpdateSearchCommand | ClearSearchCommand | SelectSearchPreviousCommand | SelectSearchNextCommand | ReplaceSearchCommand | ReplaceAllSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | OpenCellPopoverCommand | CloseCellPopoverCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand;
|
|
2316
2338
|
type Command = CoreCommand | LocalCommand;
|
|
2317
2339
|
/**
|
|
2318
2340
|
* Holds the result of a command dispatch.
|
|
@@ -2437,7 +2459,12 @@ declare const enum CommandResult {
|
|
|
2437
2459
|
DuplicatesColumnsSelected = "DuplicatesColumnsSelected",
|
|
2438
2460
|
InvalidHeaderGroupStartEnd = "InvalidHeaderGroupStartEnd",
|
|
2439
2461
|
HeaderGroupAlreadyExists = "HeaderGroupAlreadyExists",
|
|
2440
|
-
UnknownHeaderGroup = "UnknownHeaderGroup"
|
|
2462
|
+
UnknownHeaderGroup = "UnknownHeaderGroup",
|
|
2463
|
+
UnknownDataValidationRule = "UnknownDataValidationRule",
|
|
2464
|
+
UnknownDataValidationCriterionType = "UnknownDataValidationCriterionType",
|
|
2465
|
+
InvalidDataValidationCriterionValue = "InvalidDataValidationCriterionValue",
|
|
2466
|
+
InvalidNumberOfCriterionValues = "InvalidNumberOfCriterionValues",
|
|
2467
|
+
BlockingValidationRule = "BlockingValidationRule"
|
|
2441
2468
|
}
|
|
2442
2469
|
interface CommandHandler<T> {
|
|
2443
2470
|
allowDispatch(command: T): CommandResult | CommandResult[];
|
|
@@ -2708,7 +2735,7 @@ interface HeaderGroup {
|
|
|
2708
2735
|
end: HeaderIndex;
|
|
2709
2736
|
isFolded?: boolean;
|
|
2710
2737
|
}
|
|
2711
|
-
type Direction = "up" | "down" | "left" | "right";
|
|
2738
|
+
type Direction$1 = "up" | "down" | "left" | "right";
|
|
2712
2739
|
type SelectionStep = number | "end";
|
|
2713
2740
|
|
|
2714
2741
|
type LocaleCode = string & Alias;
|
|
@@ -2862,6 +2889,123 @@ interface Currency {
|
|
|
2862
2889
|
position: "before" | "after";
|
|
2863
2890
|
}
|
|
2864
2891
|
|
|
2892
|
+
interface DataValidationRule {
|
|
2893
|
+
id: UID;
|
|
2894
|
+
criterion: DataValidationCriterion;
|
|
2895
|
+
ranges: Range[];
|
|
2896
|
+
isBlocking?: boolean;
|
|
2897
|
+
}
|
|
2898
|
+
type TextContainsCriterion = {
|
|
2899
|
+
type: "textContains";
|
|
2900
|
+
values: string[];
|
|
2901
|
+
};
|
|
2902
|
+
type TextNotContainsCriterion = {
|
|
2903
|
+
type: "textNotContains";
|
|
2904
|
+
values: string[];
|
|
2905
|
+
};
|
|
2906
|
+
type TextIsCriterion = {
|
|
2907
|
+
type: "textIs";
|
|
2908
|
+
values: string[];
|
|
2909
|
+
};
|
|
2910
|
+
type TextIsEmailCriterion = {
|
|
2911
|
+
type: "textIsEmail";
|
|
2912
|
+
values: string[];
|
|
2913
|
+
};
|
|
2914
|
+
type TextIsLinkCriterion = {
|
|
2915
|
+
type: "textIsLink";
|
|
2916
|
+
values: string[];
|
|
2917
|
+
};
|
|
2918
|
+
type DateIsCriterion = {
|
|
2919
|
+
type: "dateIs";
|
|
2920
|
+
dateValue: DateCriterionValue;
|
|
2921
|
+
values: string[];
|
|
2922
|
+
};
|
|
2923
|
+
type DateIsBeforeCriterion = {
|
|
2924
|
+
type: "dateIsBefore";
|
|
2925
|
+
dateValue: DateCriterionValue;
|
|
2926
|
+
values: string[];
|
|
2927
|
+
};
|
|
2928
|
+
type DateIsOnOrBeforeCriterion = {
|
|
2929
|
+
type: "dateIsOnOrBefore";
|
|
2930
|
+
dateValue: DateCriterionValue;
|
|
2931
|
+
values: string[];
|
|
2932
|
+
};
|
|
2933
|
+
type DateIsAfterCriterion = {
|
|
2934
|
+
type: "dateIsAfter";
|
|
2935
|
+
dateValue: DateCriterionValue;
|
|
2936
|
+
values: string[];
|
|
2937
|
+
};
|
|
2938
|
+
type DateIsOnOrAfterCriterion = {
|
|
2939
|
+
type: "dateIsOnOrAfter";
|
|
2940
|
+
dateValue: DateCriterionValue;
|
|
2941
|
+
values: string[];
|
|
2942
|
+
};
|
|
2943
|
+
type DateIsBetweenCriterion = {
|
|
2944
|
+
type: "dateIsBetween";
|
|
2945
|
+
values: string[];
|
|
2946
|
+
};
|
|
2947
|
+
type DateIsNotBetweenCriterion = {
|
|
2948
|
+
type: "dateIsNotBetween";
|
|
2949
|
+
values: string[];
|
|
2950
|
+
};
|
|
2951
|
+
type DateIsValidCriterion = {
|
|
2952
|
+
type: "dateIsValid";
|
|
2953
|
+
values: string[];
|
|
2954
|
+
};
|
|
2955
|
+
type IsEqualCriterion = {
|
|
2956
|
+
type: "isEqual";
|
|
2957
|
+
values: string[];
|
|
2958
|
+
};
|
|
2959
|
+
type IsNotEqualCriterion = {
|
|
2960
|
+
type: "isNotEqual";
|
|
2961
|
+
values: string[];
|
|
2962
|
+
};
|
|
2963
|
+
type IsGreaterThanCriterion = {
|
|
2964
|
+
type: "isGreaterThan";
|
|
2965
|
+
values: string[];
|
|
2966
|
+
};
|
|
2967
|
+
type IsGreaterOrEqualToCriterion = {
|
|
2968
|
+
type: "isGreaterOrEqualTo";
|
|
2969
|
+
values: string[];
|
|
2970
|
+
};
|
|
2971
|
+
type IsLessThanCriterion = {
|
|
2972
|
+
type: "isLessThan";
|
|
2973
|
+
values: string[];
|
|
2974
|
+
};
|
|
2975
|
+
type IsLessOrEqualToCriterion = {
|
|
2976
|
+
type: "isLessOrEqualTo";
|
|
2977
|
+
values: string[];
|
|
2978
|
+
};
|
|
2979
|
+
type IsBetweenCriterion = {
|
|
2980
|
+
type: "isBetween";
|
|
2981
|
+
values: string[];
|
|
2982
|
+
};
|
|
2983
|
+
type IsNotBetweenCriterion = {
|
|
2984
|
+
type: "isNotBetween";
|
|
2985
|
+
values: string[];
|
|
2986
|
+
};
|
|
2987
|
+
type IsCheckboxCriterion = {
|
|
2988
|
+
type: "isBoolean";
|
|
2989
|
+
values: string[];
|
|
2990
|
+
};
|
|
2991
|
+
type IsValueInListCriterion = {
|
|
2992
|
+
type: "isValueInList";
|
|
2993
|
+
values: string[];
|
|
2994
|
+
displayStyle: "arrow" | "plainText";
|
|
2995
|
+
};
|
|
2996
|
+
type IsValueInRangeCriterion = {
|
|
2997
|
+
type: "isValueInRange";
|
|
2998
|
+
values: string[];
|
|
2999
|
+
displayStyle: "arrow" | "plainText";
|
|
3000
|
+
};
|
|
3001
|
+
type CustomFormulaCriterion = {
|
|
3002
|
+
type: "customFormula";
|
|
3003
|
+
values: string[];
|
|
3004
|
+
};
|
|
3005
|
+
type DataValidationCriterion = TextContainsCriterion | TextNotContainsCriterion | TextIsCriterion | TextIsEmailCriterion | TextIsLinkCriterion | IsBetweenCriterion | DateIsCriterion | DateIsBeforeCriterion | DateIsOnOrBeforeCriterion | DateIsAfterCriterion | DateIsOnOrAfterCriterion | DateIsBetweenCriterion | DateIsNotBetweenCriterion | DateIsValidCriterion | IsEqualCriterion | IsNotEqualCriterion | IsGreaterThanCriterion | IsGreaterOrEqualToCriterion | IsLessThanCriterion | IsLessOrEqualToCriterion | IsNotBetweenCriterion | IsCheckboxCriterion | IsValueInListCriterion | IsValueInRangeCriterion | CustomFormulaCriterion;
|
|
3006
|
+
type DateCriterionValue = "today" | "tomorrow" | "yesterday" | "lastWeek" | "lastMonth" | "lastYear" | "exactDate";
|
|
3007
|
+
type DataValidationCriterionType = DataValidationCriterion["type"];
|
|
3008
|
+
|
|
2865
3009
|
type ClipboardReadResult = {
|
|
2866
3010
|
status: "ok";
|
|
2867
3011
|
content: string;
|
|
@@ -2892,7 +3036,7 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
|
|
|
2892
3036
|
openSidePanel: (panel: string, panelProps?: any) => void;
|
|
2893
3037
|
toggleSidePanel: (panel: string, panelProps?: any) => void;
|
|
2894
3038
|
clipboard: ClipboardInterface;
|
|
2895
|
-
startCellEdition: (content
|
|
3039
|
+
startCellEdition: (content?: string) => void;
|
|
2896
3040
|
loadCurrencies?: () => Promise<Currency[]>;
|
|
2897
3041
|
loadLocales: () => Promise<Locale[]>;
|
|
2898
3042
|
}
|
|
@@ -3374,7 +3518,7 @@ declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState>
|
|
|
3374
3518
|
* Add or replace a conditional format rule
|
|
3375
3519
|
*/
|
|
3376
3520
|
private addConditionalFormatting;
|
|
3377
|
-
private
|
|
3521
|
+
private checkValidPriorityChange;
|
|
3378
3522
|
private checkEmptyRange;
|
|
3379
3523
|
private checkCFRule;
|
|
3380
3524
|
private checkOperatorArgsNumber;
|
|
@@ -3387,7 +3531,36 @@ declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState>
|
|
|
3387
3531
|
private checkMidBiggerThanMax;
|
|
3388
3532
|
private checkMinBiggerThanMid;
|
|
3389
3533
|
private removeConditionalFormatting;
|
|
3390
|
-
private
|
|
3534
|
+
private changeCFPriority;
|
|
3535
|
+
}
|
|
3536
|
+
|
|
3537
|
+
interface DataValidationState {
|
|
3538
|
+
readonly rules: {
|
|
3539
|
+
[sheet: string]: DataValidationRule[];
|
|
3540
|
+
};
|
|
3541
|
+
}
|
|
3542
|
+
declare class DataValidationPlugin extends CorePlugin<DataValidationState> implements DataValidationState {
|
|
3543
|
+
static getters: readonly ["cellHasListDataValidationIcon", "getDataValidationRule", "getDataValidationRules", "getValidationRuleForCell"];
|
|
3544
|
+
readonly rules: {
|
|
3545
|
+
[sheet: string]: DataValidationRule[];
|
|
3546
|
+
};
|
|
3547
|
+
adaptRanges(applyChange: ApplyRangeChange, sheetId?: UID): void;
|
|
3548
|
+
private loopThroughRangesOfSheet;
|
|
3549
|
+
allowDispatch(cmd: Command): CommandResult | CommandResult[];
|
|
3550
|
+
handle(cmd: CoreCommand): void;
|
|
3551
|
+
getDataValidationRules(sheetId: UID): DataValidationRule[];
|
|
3552
|
+
getDataValidationRule(sheetId: UID, id: UID): DataValidationRule | undefined;
|
|
3553
|
+
getValidationRuleForCell({ sheetId, col, row }: CellPosition): DataValidationRule | undefined;
|
|
3554
|
+
cellHasListDataValidationIcon(cellPosition: CellPosition): boolean;
|
|
3555
|
+
private addDataValidationRule;
|
|
3556
|
+
private removeRangesFromRules;
|
|
3557
|
+
private removeDataValidationRule;
|
|
3558
|
+
private setCenterStyleToBooleanCells;
|
|
3559
|
+
import(data: WorkbookData): void;
|
|
3560
|
+
export(data: Partial<WorkbookData>): void;
|
|
3561
|
+
private checkCriterionTypeIsValid;
|
|
3562
|
+
private checkCriterionHasValidNumberOfValues;
|
|
3563
|
+
private checkCriterionValuesAreValid;
|
|
3391
3564
|
}
|
|
3392
3565
|
|
|
3393
3566
|
interface FigureState {
|
|
@@ -3478,10 +3651,10 @@ declare class FiltersPlugin extends CorePlugin<FiltersState> implements FiltersS
|
|
|
3478
3651
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
3479
3652
|
}
|
|
3480
3653
|
|
|
3481
|
-
interface State$
|
|
3654
|
+
interface State$7 {
|
|
3482
3655
|
groups: Record<UID, Record<Dimension, HeaderGroup[]>>;
|
|
3483
3656
|
}
|
|
3484
|
-
declare class HeaderGroupingPlugin extends CorePlugin<State$
|
|
3657
|
+
declare class HeaderGroupingPlugin extends CorePlugin<State$7> {
|
|
3485
3658
|
static getters: readonly ["getHeaderGroups", "getGroupsLayers", "getVisibleGroupLayers", "getHeaderGroup", "getHeaderGroupsInZone", "isGroupFolded", "isRowFolded", "isColFolded"];
|
|
3486
3659
|
private readonly groups;
|
|
3487
3660
|
allowDispatch(cmd: CoreCommand): CommandResult;
|
|
@@ -3629,7 +3802,7 @@ interface MergeState {
|
|
|
3629
3802
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
3630
3803
|
}
|
|
3631
3804
|
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"];
|
|
3805
|
+
static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "getBottomLeftCell", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "getSelectionRangeString", "isMainCellPosition"];
|
|
3633
3806
|
private nextId;
|
|
3634
3807
|
readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
|
|
3635
3808
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
@@ -3669,6 +3842,7 @@ declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
|
|
|
3669
3842
|
* Check if the zone represents a single cell or a single merge.
|
|
3670
3843
|
*/
|
|
3671
3844
|
isSingleCellOrMerge(sheetId: UID, zone: Zone): boolean;
|
|
3845
|
+
isMainCellPosition(position: CellPosition): boolean;
|
|
3672
3846
|
/**
|
|
3673
3847
|
* Return true if the current selection requires losing state if it is merged.
|
|
3674
3848
|
* This happens when there is some textual content in other cells than the
|
|
@@ -3713,13 +3887,13 @@ declare class SettingsPlugin extends CorePlugin {
|
|
|
3713
3887
|
export(data: WorkbookData): void;
|
|
3714
3888
|
}
|
|
3715
3889
|
|
|
3716
|
-
interface SheetState
|
|
3890
|
+
interface SheetState {
|
|
3717
3891
|
readonly sheets: Record<UID, Sheet | undefined>;
|
|
3718
3892
|
readonly orderedSheetIds: UID[];
|
|
3719
3893
|
readonly sheetIdsMapName: Record<string, UID | undefined>;
|
|
3720
3894
|
readonly cellPosition: Record<UID, CellPosition | undefined>;
|
|
3721
3895
|
}
|
|
3722
|
-
declare class SheetPlugin extends CorePlugin<SheetState
|
|
3896
|
+
declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
3723
3897
|
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "isEmpty", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone", "checkElementsIncludeAllNonFrozenHeaders"];
|
|
3724
3898
|
readonly sheetIdsMapName: Record<string, UID | undefined>;
|
|
3725
3899
|
readonly orderedSheetIds: UID[];
|
|
@@ -3990,6 +4164,43 @@ declare class EvaluationConditionalFormatPlugin extends UIPlugin {
|
|
|
3990
4164
|
private rulePredicate;
|
|
3991
4165
|
}
|
|
3992
4166
|
|
|
4167
|
+
interface InvalidValidationResult {
|
|
4168
|
+
readonly isValid: false;
|
|
4169
|
+
readonly rule: DataValidationRule;
|
|
4170
|
+
readonly error: string;
|
|
4171
|
+
}
|
|
4172
|
+
interface ValidValidationResult {
|
|
4173
|
+
readonly isValid: true;
|
|
4174
|
+
}
|
|
4175
|
+
type ValidationResult = ValidValidationResult | InvalidValidationResult;
|
|
4176
|
+
type SheetValidationResult = {
|
|
4177
|
+
[col: HeaderIndex]: Array<Lazy<ValidationResult>>;
|
|
4178
|
+
};
|
|
4179
|
+
declare class EvaluationDataValidationPlugin extends UIPlugin {
|
|
4180
|
+
static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getDataValidationCheckBoxCellPositions", "getDataValidationListCellsPositions", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "isCellValidCheckbox", "isDataValidationInvalid"];
|
|
4181
|
+
validationResults: Record<UID, SheetValidationResult>;
|
|
4182
|
+
handle(cmd: CoreViewCommand): void;
|
|
4183
|
+
isDataValidationInvalid(cellPosition: CellPosition): boolean;
|
|
4184
|
+
getInvalidDataValidationMessage(cellPosition: CellPosition): string | undefined;
|
|
4185
|
+
/**
|
|
4186
|
+
* Check if the value is valid for the given criterion, and return an error message if not.
|
|
4187
|
+
*
|
|
4188
|
+
* The value must be canonicalized.
|
|
4189
|
+
*/
|
|
4190
|
+
getDataValidationInvalidCriterionValueMessage(criterionType: DataValidationCriterionType, value: string): string | undefined;
|
|
4191
|
+
isCellValidCheckbox(cellPosition: CellPosition): boolean;
|
|
4192
|
+
/** Get the validation result if the cell on the given position had the given value */
|
|
4193
|
+
getValidationResultForCellValue(cellValue: CellValue, cellPosition: CellPosition): ValidationResult;
|
|
4194
|
+
getDataValidationCheckBoxCellPositions(): CellPosition[];
|
|
4195
|
+
getDataValidationListCellsPositions(): CellPosition[];
|
|
4196
|
+
private getValidationResultForCell;
|
|
4197
|
+
private computeSheetValidationResults;
|
|
4198
|
+
private getRuleErrorForCellValue;
|
|
4199
|
+
/** Get the offset of the cell inside the ranges of the rule. Throws an error if the cell isn't inside the rule. */
|
|
4200
|
+
private getCellOffsetInRule;
|
|
4201
|
+
private getEvaluatedCriterionValues;
|
|
4202
|
+
}
|
|
4203
|
+
|
|
3993
4204
|
interface HeaderSizeState {
|
|
3994
4205
|
tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
3995
4206
|
}
|
|
@@ -4067,6 +4278,7 @@ declare class AutofillPlugin extends UIPlugin {
|
|
|
4067
4278
|
private getDirection;
|
|
4068
4279
|
private autoFillMerge;
|
|
4069
4280
|
private autofillCF;
|
|
4281
|
+
private autofillDV;
|
|
4070
4282
|
drawGrid(renderingContext: GridRenderingContext): void;
|
|
4071
4283
|
}
|
|
4072
4284
|
|
|
@@ -4513,7 +4725,7 @@ declare class UIOptionsPlugin extends UIPlugin {
|
|
|
4513
4725
|
}
|
|
4514
4726
|
|
|
4515
4727
|
declare class SheetUIPlugin extends UIPlugin {
|
|
4516
|
-
static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getColDimensions", "getRowDimensions", "getColRowOffset"];
|
|
4728
|
+
static getters: readonly ["doesCellHaveGridIcon", "getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getColDimensions", "getRowDimensions", "getColRowOffset"];
|
|
4517
4729
|
private ctx;
|
|
4518
4730
|
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
4519
4731
|
handle(cmd: Command): void;
|
|
@@ -4541,6 +4753,7 @@ declare class SheetUIPlugin extends UIPlugin {
|
|
|
4541
4753
|
* i.e. The size from A to B is the distance between A.start and B.end
|
|
4542
4754
|
*/
|
|
4543
4755
|
getColRowOffset(dimension: Dimension, referenceIndex: HeaderIndex, index: HeaderIndex, sheetId?: UID): Pixel;
|
|
4756
|
+
doesCellHaveGridIcon(position: CellPosition): boolean;
|
|
4544
4757
|
private getColMaxWidth;
|
|
4545
4758
|
/**
|
|
4546
4759
|
* Check that any "sheetId" in the command matches an existing
|
|
@@ -4974,7 +5187,8 @@ type LocalHistoryGetters = Pick<HistoryPlugin, GetterNames<typeof HistoryPlugin>
|
|
|
4974
5187
|
type FiltersGetters = Pick<FiltersPlugin, GetterNames<typeof FiltersPlugin>>;
|
|
4975
5188
|
type SettingsGetters = Pick<SettingsPlugin, GetterNames<typeof SettingsPlugin>>;
|
|
4976
5189
|
type HeaderGroupingGetters = Pick<HeaderGroupingPlugin, GetterNames<typeof HeaderGroupingPlugin>>;
|
|
4977
|
-
type
|
|
5190
|
+
type DataValidationGetters = Pick<DataValidationPlugin, GetterNames<typeof DataValidationPlugin>>;
|
|
5191
|
+
type CoreGetters = SheetGetters & HeaderSizeGetters & HeaderVisibilityGetters & CellGetters & MergeGetters & BordersGetters & ChartGetters & ImageGetters & ConditionalFormatGetters & FigureGetters & RangeAdapterGetters & FiltersGetters & SettingsGetters & HeaderGroupingGetters & DataValidationGetters;
|
|
4978
5192
|
type AutofillGetters = Pick<AutofillPlugin, GetterNames<typeof AutofillPlugin>>;
|
|
4979
5193
|
type AutomaticSumGetters = Pick<AutomaticSumPlugin, GetterNames<typeof AutomaticSumPlugin>>;
|
|
4980
5194
|
type ClipboardGetters = Pick<ClipboardPlugin, GetterNames<typeof ClipboardPlugin>>;
|
|
@@ -4998,10 +5212,11 @@ type CellPopoverPluginGetters = Pick<CellPopoverPlugin, GetterNames<typeof CellP
|
|
|
4998
5212
|
type FilterEvaluationGetters = Pick<FilterEvaluationPlugin, GetterNames<typeof FilterEvaluationPlugin>>;
|
|
4999
5213
|
type SplitToColumnsGetters = Pick<SplitToColumnsPlugin, GetterNames<typeof SplitToColumnsPlugin>>;
|
|
5000
5214
|
type UIRowSizeGetters = Pick<UIRowSizePlugin, GetterNames<typeof UIRowSizePlugin>>;
|
|
5215
|
+
type EvaluationDataValidationPluginGetters = Pick<EvaluationDataValidationPlugin, GetterNames<typeof EvaluationDataValidationPlugin>>;
|
|
5001
5216
|
type Getters = {
|
|
5002
5217
|
isReadonly: () => boolean;
|
|
5003
5218
|
isDashboard: () => boolean;
|
|
5004
|
-
} & LocalHistoryGetters & CoreGetters & AutofillGetters & AutomaticSumGetters & ClipboardGetters & EditionGetters & EvaluationGetters & EvaluationChartGetters & EvaluationConditionalFormatGetters & FindAndReplaceGetters & HighlightGetters & CustomColorsGetters & RendererGetters & SelectionGetters & SelectionInputGetters & CollaborativeGetters & SortGetters & UIOptionsGetters & SheetUIGetters & ViewportGetters & CellPopoverPluginGetters & FilterEvaluationGetters & HeaderVisibilityIUIGetters & SplitToColumnsGetters & UIRowSizeGetters;
|
|
5219
|
+
} & LocalHistoryGetters & CoreGetters & AutofillGetters & AutomaticSumGetters & ClipboardGetters & EditionGetters & EvaluationGetters & EvaluationChartGetters & EvaluationConditionalFormatGetters & FindAndReplaceGetters & HighlightGetters & CustomColorsGetters & RendererGetters & SelectionGetters & SelectionInputGetters & CollaborativeGetters & SortGetters & UIOptionsGetters & SheetUIGetters & ViewportGetters & CellPopoverPluginGetters & FilterEvaluationGetters & HeaderVisibilityIUIGetters & SplitToColumnsGetters & UIRowSizeGetters & EvaluationDataValidationPluginGetters;
|
|
5005
5220
|
|
|
5006
5221
|
interface HistoryChange {
|
|
5007
5222
|
root: any;
|
|
@@ -5180,7 +5395,7 @@ interface ChartBuilder {
|
|
|
5180
5395
|
sequence: number;
|
|
5181
5396
|
}
|
|
5182
5397
|
|
|
5183
|
-
interface Props$
|
|
5398
|
+
interface Props$K {
|
|
5184
5399
|
ranges: () => string[];
|
|
5185
5400
|
hasSingleRange?: boolean;
|
|
5186
5401
|
required?: boolean;
|
|
@@ -5202,7 +5417,7 @@ interface SelectionRange extends Omit<RangeInputValue, "color"> {
|
|
|
5202
5417
|
* onSelectionChanged is called every time the input value
|
|
5203
5418
|
* changes.
|
|
5204
5419
|
*/
|
|
5205
|
-
declare class SelectionInput extends Component<Props$
|
|
5420
|
+
declare class SelectionInput extends Component<Props$K, SpreadsheetChildEnv> {
|
|
5206
5421
|
static template: string;
|
|
5207
5422
|
private id;
|
|
5208
5423
|
private previousRanges;
|
|
@@ -5231,26 +5446,26 @@ declare class SelectionInput extends Component<Props$H, SpreadsheetChildEnv> {
|
|
|
5231
5446
|
confirm(): void;
|
|
5232
5447
|
}
|
|
5233
5448
|
|
|
5234
|
-
interface Props$
|
|
5449
|
+
interface Props$J {
|
|
5235
5450
|
messages: string[];
|
|
5236
5451
|
msgType: "warning" | "error";
|
|
5237
5452
|
}
|
|
5238
|
-
declare class
|
|
5453
|
+
declare class ValidationMessages extends Component<Props$J, SpreadsheetChildEnv> {
|
|
5239
5454
|
static template: string;
|
|
5240
|
-
get divClasses(): "o-
|
|
5455
|
+
get divClasses(): "o-validation-warning text-warning" | "o-validation-error text-danger";
|
|
5241
5456
|
}
|
|
5242
5457
|
|
|
5243
|
-
interface Props$
|
|
5458
|
+
interface Props$I {
|
|
5244
5459
|
figureId: UID;
|
|
5245
5460
|
definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
|
|
5246
5461
|
canUpdateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5247
5462
|
updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5248
5463
|
}
|
|
5249
|
-
declare class LineBarPieConfigPanel extends Component<Props$
|
|
5464
|
+
declare class LineBarPieConfigPanel extends Component<Props$I, SpreadsheetChildEnv> {
|
|
5250
5465
|
static template: string;
|
|
5251
5466
|
static components: {
|
|
5252
5467
|
SelectionInput: typeof SelectionInput;
|
|
5253
|
-
|
|
5468
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5254
5469
|
};
|
|
5255
5470
|
private state;
|
|
5256
5471
|
private dataSeriesRanges;
|
|
@@ -5375,7 +5590,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
|
|
|
5375
5590
|
isSameColor(color1: Color, color2: Color): boolean;
|
|
5376
5591
|
}
|
|
5377
5592
|
|
|
5378
|
-
interface Props$
|
|
5593
|
+
interface Props$H {
|
|
5379
5594
|
currentColor: string | undefined;
|
|
5380
5595
|
toggleColorPicker: () => void;
|
|
5381
5596
|
showColorPicker: boolean;
|
|
@@ -5386,7 +5601,7 @@ interface Props$E {
|
|
|
5386
5601
|
dropdownMaxHeight?: Pixel;
|
|
5387
5602
|
class?: string;
|
|
5388
5603
|
}
|
|
5389
|
-
declare class ColorPickerWidget extends Component<Props$
|
|
5604
|
+
declare class ColorPickerWidget extends Component<Props$H, SpreadsheetChildEnv> {
|
|
5390
5605
|
static template: string;
|
|
5391
5606
|
static components: {
|
|
5392
5607
|
ColorPicker: typeof ColorPicker;
|
|
@@ -5398,13 +5613,13 @@ declare class ColorPickerWidget extends Component<Props$E, SpreadsheetChildEnv>
|
|
|
5398
5613
|
get colorPickerAnchorRect(): Rect;
|
|
5399
5614
|
}
|
|
5400
5615
|
|
|
5401
|
-
interface Props$
|
|
5616
|
+
interface Props$G {
|
|
5402
5617
|
figureId: UID;
|
|
5403
5618
|
definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
|
|
5404
5619
|
canUpdateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5405
5620
|
updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5406
5621
|
}
|
|
5407
|
-
declare class LineBarPieDesignPanel extends Component<Props$
|
|
5622
|
+
declare class LineBarPieDesignPanel extends Component<Props$G, SpreadsheetChildEnv> {
|
|
5408
5623
|
static template: string;
|
|
5409
5624
|
static components: {
|
|
5410
5625
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
@@ -5418,17 +5633,17 @@ declare class LineBarPieDesignPanel extends Component<Props$D, SpreadsheetChildE
|
|
|
5418
5633
|
updateSelect(attr: string, ev: any): void;
|
|
5419
5634
|
}
|
|
5420
5635
|
|
|
5421
|
-
interface Props$
|
|
5636
|
+
interface Props$F {
|
|
5422
5637
|
figureId: UID;
|
|
5423
5638
|
definition: GaugeChartDefinition;
|
|
5424
5639
|
canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5425
5640
|
updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5426
5641
|
}
|
|
5427
|
-
declare class GaugeChartConfigPanel extends Component<Props$
|
|
5642
|
+
declare class GaugeChartConfigPanel extends Component<Props$F, SpreadsheetChildEnv> {
|
|
5428
5643
|
static template: string;
|
|
5429
5644
|
static components: {
|
|
5430
5645
|
SelectionInput: typeof SelectionInput;
|
|
5431
|
-
|
|
5646
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5432
5647
|
};
|
|
5433
5648
|
private state;
|
|
5434
5649
|
private dataRange;
|
|
@@ -5440,17 +5655,17 @@ declare class GaugeChartConfigPanel extends Component<Props$C, SpreadsheetChildE
|
|
|
5440
5655
|
}
|
|
5441
5656
|
|
|
5442
5657
|
type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
|
|
5443
|
-
interface Props$
|
|
5658
|
+
interface Props$E {
|
|
5444
5659
|
figureId: UID;
|
|
5445
5660
|
definition: GaugeChartDefinition;
|
|
5446
5661
|
canUpdateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5447
5662
|
updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5448
5663
|
}
|
|
5449
|
-
declare class GaugeChartDesignPanel extends Component<Props$
|
|
5664
|
+
declare class GaugeChartDesignPanel extends Component<Props$E, SpreadsheetChildEnv> {
|
|
5450
5665
|
static template: string;
|
|
5451
5666
|
static components: {
|
|
5452
5667
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
5453
|
-
|
|
5668
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5454
5669
|
};
|
|
5455
5670
|
private state;
|
|
5456
5671
|
setup(): void;
|
|
@@ -5477,17 +5692,17 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
|
|
|
5477
5692
|
onUpdateCumulative(ev: any): void;
|
|
5478
5693
|
}
|
|
5479
5694
|
|
|
5480
|
-
interface Props$
|
|
5695
|
+
interface Props$D {
|
|
5481
5696
|
figureId: UID;
|
|
5482
5697
|
definition: ScorecardChartDefinition;
|
|
5483
5698
|
canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5484
5699
|
updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5485
5700
|
}
|
|
5486
|
-
declare class ScorecardChartConfigPanel extends Component<Props$
|
|
5701
|
+
declare class ScorecardChartConfigPanel extends Component<Props$D, SpreadsheetChildEnv> {
|
|
5487
5702
|
static template: string;
|
|
5488
5703
|
static components: {
|
|
5489
5704
|
SelectionInput: typeof SelectionInput;
|
|
5490
|
-
|
|
5705
|
+
ValidationMessages: typeof ValidationMessages;
|
|
5491
5706
|
};
|
|
5492
5707
|
private state;
|
|
5493
5708
|
private keyValue;
|
|
@@ -5505,13 +5720,13 @@ declare class ScorecardChartConfigPanel extends Component<Props$A, SpreadsheetCh
|
|
|
5505
5720
|
}
|
|
5506
5721
|
|
|
5507
5722
|
type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
|
|
5508
|
-
interface Props$
|
|
5723
|
+
interface Props$C {
|
|
5509
5724
|
figureId: UID;
|
|
5510
5725
|
definition: ScorecardChartDefinition;
|
|
5511
5726
|
canUpdateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5512
5727
|
updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5513
5728
|
}
|
|
5514
|
-
declare class ScorecardChartDesignPanel extends Component<Props$
|
|
5729
|
+
declare class ScorecardChartDesignPanel extends Component<Props$C, SpreadsheetChildEnv> {
|
|
5515
5730
|
static template: string;
|
|
5516
5731
|
static components: {
|
|
5517
5732
|
ColorPickerWidget: typeof ColorPickerWidget;
|
|
@@ -5655,10 +5870,10 @@ interface AutofillRule {
|
|
|
5655
5870
|
sequence: number;
|
|
5656
5871
|
}
|
|
5657
5872
|
|
|
5658
|
-
interface Props$
|
|
5873
|
+
interface Props$B {
|
|
5659
5874
|
figure: Figure;
|
|
5660
5875
|
}
|
|
5661
|
-
declare class ChartJsComponent extends Component<Props$
|
|
5876
|
+
declare class ChartJsComponent extends Component<Props$B, SpreadsheetChildEnv> {
|
|
5662
5877
|
static template: string;
|
|
5663
5878
|
private canvas;
|
|
5664
5879
|
private chart?;
|
|
@@ -5670,10 +5885,10 @@ declare class ChartJsComponent extends Component<Props$y, SpreadsheetChildEnv> {
|
|
|
5670
5885
|
private updateChartJs;
|
|
5671
5886
|
}
|
|
5672
5887
|
|
|
5673
|
-
interface Props$
|
|
5888
|
+
interface Props$A {
|
|
5674
5889
|
figure: Figure;
|
|
5675
5890
|
}
|
|
5676
|
-
declare class ScorecardChart extends Component<Props$
|
|
5891
|
+
declare class ScorecardChart extends Component<Props$A, SpreadsheetChildEnv> {
|
|
5677
5892
|
static template: string;
|
|
5678
5893
|
private ctx;
|
|
5679
5894
|
get runtime(): ScorecardChartRuntime;
|
|
@@ -5706,7 +5921,7 @@ declare class ScorecardChart extends Component<Props$x, SpreadsheetChildEnv> {
|
|
|
5706
5921
|
}
|
|
5707
5922
|
|
|
5708
5923
|
type MenuItemOrSeparator = Action | "separator";
|
|
5709
|
-
interface Props$
|
|
5924
|
+
interface Props$z {
|
|
5710
5925
|
position: DOMCoordinates;
|
|
5711
5926
|
menuItems: Action[];
|
|
5712
5927
|
depth: number;
|
|
@@ -5722,7 +5937,7 @@ interface MenuState {
|
|
|
5722
5937
|
scrollOffset?: Pixel;
|
|
5723
5938
|
menuItems: Action[];
|
|
5724
5939
|
}
|
|
5725
|
-
declare class Menu extends Component<Props$
|
|
5940
|
+
declare class Menu extends Component<Props$z, SpreadsheetChildEnv> {
|
|
5726
5941
|
static template: string;
|
|
5727
5942
|
static components: {
|
|
5728
5943
|
Menu: typeof Menu;
|
|
@@ -5760,14 +5975,14 @@ declare class Menu extends Component<Props$w, SpreadsheetChildEnv> {
|
|
|
5760
5975
|
}
|
|
5761
5976
|
|
|
5762
5977
|
type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
|
|
5763
|
-
interface Props$
|
|
5978
|
+
interface Props$y {
|
|
5764
5979
|
figure: Figure;
|
|
5765
5980
|
style: string;
|
|
5766
5981
|
onFigureDeleted: () => void;
|
|
5767
5982
|
onMouseDown: (ev: MouseEvent) => void;
|
|
5768
5983
|
onClickAnchor(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
|
|
5769
5984
|
}
|
|
5770
|
-
declare class FigureComponent extends Component<Props$
|
|
5985
|
+
declare class FigureComponent extends Component<Props$y, SpreadsheetChildEnv> {
|
|
5771
5986
|
static template: string;
|
|
5772
5987
|
static components: {
|
|
5773
5988
|
Menu: typeof Menu;
|
|
@@ -5797,11 +6012,11 @@ declare class FigureComponent extends Component<Props$v, SpreadsheetChildEnv> {
|
|
|
5797
6012
|
private openContextMenu;
|
|
5798
6013
|
}
|
|
5799
6014
|
|
|
5800
|
-
interface Props$
|
|
6015
|
+
interface Props$x {
|
|
5801
6016
|
figure: Figure;
|
|
5802
6017
|
onFigureDeleted: () => void;
|
|
5803
6018
|
}
|
|
5804
|
-
declare class ChartFigure extends Component<Props$
|
|
6019
|
+
declare class ChartFigure extends Component<Props$x, SpreadsheetChildEnv> {
|
|
5805
6020
|
static template: string;
|
|
5806
6021
|
static components: {};
|
|
5807
6022
|
onDoubleClick(): void;
|
|
@@ -5809,7 +6024,7 @@ declare class ChartFigure extends Component<Props$u, SpreadsheetChildEnv> {
|
|
|
5809
6024
|
get chartComponent(): new (...args: any) => Component;
|
|
5810
6025
|
}
|
|
5811
6026
|
|
|
5812
|
-
interface Props$
|
|
6027
|
+
interface Props$w {
|
|
5813
6028
|
isVisible: boolean;
|
|
5814
6029
|
position: Position;
|
|
5815
6030
|
}
|
|
@@ -5817,13 +6032,13 @@ interface Position {
|
|
|
5817
6032
|
top: HeaderIndex;
|
|
5818
6033
|
left: HeaderIndex;
|
|
5819
6034
|
}
|
|
5820
|
-
interface State$
|
|
6035
|
+
interface State$6 {
|
|
5821
6036
|
position: Position;
|
|
5822
6037
|
handler: boolean;
|
|
5823
6038
|
}
|
|
5824
|
-
declare class Autofill extends Component<Props$
|
|
6039
|
+
declare class Autofill extends Component<Props$w, SpreadsheetChildEnv> {
|
|
5825
6040
|
static template: string;
|
|
5826
|
-
state: State$
|
|
6041
|
+
state: State$6;
|
|
5827
6042
|
get style(): string;
|
|
5828
6043
|
get handlerStyle(): string;
|
|
5829
6044
|
get styleNextValue(): string;
|
|
@@ -5895,13 +6110,13 @@ declare class Ripple extends Component<RippleProps, SpreadsheetChildEnv> {
|
|
|
5895
6110
|
getRippleEffectProps(id: number): RippleEffectProps;
|
|
5896
6111
|
}
|
|
5897
6112
|
|
|
5898
|
-
interface Props$
|
|
6113
|
+
interface Props$v {
|
|
5899
6114
|
sheetId: string;
|
|
5900
6115
|
openContextMenu: (registry: MenuItemRegistry, ev: MouseEvent) => void;
|
|
5901
6116
|
style?: string;
|
|
5902
6117
|
onMouseDown: (ev: MouseEvent) => void;
|
|
5903
6118
|
}
|
|
5904
|
-
declare class BottomBarSheet extends Component<Props$
|
|
6119
|
+
declare class BottomBarSheet extends Component<Props$v, SpreadsheetChildEnv> {
|
|
5905
6120
|
static template: string;
|
|
5906
6121
|
static components: {
|
|
5907
6122
|
Ripple: typeof Ripple;
|
|
@@ -5935,11 +6150,11 @@ declare class BottomBarSheet extends Component<Props$s, SpreadsheetChildEnv> {
|
|
|
5935
6150
|
get sheetName(): string;
|
|
5936
6151
|
}
|
|
5937
6152
|
|
|
5938
|
-
interface Props$
|
|
6153
|
+
interface Props$u {
|
|
5939
6154
|
openContextMenu: (x: number, y: number, registry: MenuItemRegistry) => void;
|
|
5940
6155
|
closeContextMenu: () => void;
|
|
5941
6156
|
}
|
|
5942
|
-
declare class BottomBarStatistic extends Component<Props$
|
|
6157
|
+
declare class BottomBarStatistic extends Component<Props$u, SpreadsheetChildEnv> {
|
|
5943
6158
|
static template: string;
|
|
5944
6159
|
static components: {
|
|
5945
6160
|
Ripple: typeof Ripple;
|
|
@@ -5956,18 +6171,13 @@ interface BottomBarSheetItem {
|
|
|
5956
6171
|
id: UID;
|
|
5957
6172
|
name: string;
|
|
5958
6173
|
}
|
|
5959
|
-
interface
|
|
5960
|
-
sheetList: BottomBarSheetItem[];
|
|
5961
|
-
isDnd: boolean;
|
|
5962
|
-
sheetDndPositions: Record<UID, number> | undefined;
|
|
5963
|
-
}
|
|
5964
|
-
interface Props$q {
|
|
6174
|
+
interface Props$t {
|
|
5965
6175
|
onClick: () => void;
|
|
5966
6176
|
}
|
|
5967
6177
|
interface BottomBarMenuState extends MenuState {
|
|
5968
6178
|
menuId: UID | undefined;
|
|
5969
6179
|
}
|
|
5970
|
-
declare class BottomBar extends Component<Props$
|
|
6180
|
+
declare class BottomBar extends Component<Props$t, SpreadsheetChildEnv> {
|
|
5971
6181
|
static template: string;
|
|
5972
6182
|
static components: {
|
|
5973
6183
|
Menu: typeof Menu;
|
|
@@ -5977,17 +6187,15 @@ declare class BottomBar extends Component<Props$q, SpreadsheetChildEnv> {
|
|
|
5977
6187
|
};
|
|
5978
6188
|
private bottomBarRef;
|
|
5979
6189
|
private sheetListRef;
|
|
5980
|
-
private
|
|
6190
|
+
private dragAndDrop;
|
|
5981
6191
|
private targetScroll;
|
|
5982
6192
|
private state;
|
|
5983
6193
|
menuMaxHeight: number;
|
|
5984
6194
|
menuState: BottomBarMenuState;
|
|
5985
|
-
|
|
6195
|
+
sheetList: BottomBarSheetItem[];
|
|
5986
6196
|
setup(): void;
|
|
5987
|
-
isDragged(sheetId: UID): boolean;
|
|
5988
6197
|
clickAddSheet(ev: MouseEvent): void;
|
|
5989
|
-
|
|
5990
|
-
getSheets(): BottomBarSheetItem[];
|
|
6198
|
+
getVisibleSheets(): BottomBarSheetItem[];
|
|
5991
6199
|
clickListSheets(ev: MouseEvent): void;
|
|
5992
6200
|
openContextMenu(x: Pixel, y: Pixel, menuId: UID, registry: MenuItemRegistry): void;
|
|
5993
6201
|
onSheetContextMenu(sheetId: UID, registry: MenuItemRegistry, ev: MenuMouseEvent): void;
|
|
@@ -6002,32 +6210,44 @@ declare class BottomBar extends Component<Props$q, SpreadsheetChildEnv> {
|
|
|
6002
6210
|
onSheetMouseDown(sheetId: UID, event: MouseEvent): void;
|
|
6003
6211
|
private onDragEnd;
|
|
6004
6212
|
getSheetStyle(sheetId: UID): string;
|
|
6005
|
-
private stopDragging;
|
|
6006
6213
|
private getSheetItemRects;
|
|
6007
|
-
getSheetClasses(sheetId: UID): string;
|
|
6008
6214
|
get sheetListCurrentScroll(): number;
|
|
6009
6215
|
get sheetListWidth(): number;
|
|
6010
6216
|
get sheetListMaxScroll(): number;
|
|
6011
6217
|
}
|
|
6012
6218
|
|
|
6013
|
-
interface
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6219
|
+
interface GridCellIconProps {
|
|
6220
|
+
cellPosition: CellPosition;
|
|
6221
|
+
horizontalAlign?: Align;
|
|
6222
|
+
verticalAlign?: VerticalAlign;
|
|
6223
|
+
offset?: DOMCoordinates;
|
|
6017
6224
|
}
|
|
6018
|
-
declare class
|
|
6225
|
+
declare class GridCellIcon extends Component<GridCellIconProps, SpreadsheetChildEnv> {
|
|
6019
6226
|
static style: string;
|
|
6020
6227
|
static template: string;
|
|
6021
|
-
get
|
|
6228
|
+
get iconStyle(): string;
|
|
6229
|
+
private getIconVerticalPosition;
|
|
6230
|
+
private getIconHorizontalPosition;
|
|
6231
|
+
isPositionVisible(position: CellPosition): boolean;
|
|
6022
6232
|
}
|
|
6023
6233
|
|
|
6024
|
-
interface Props$
|
|
6025
|
-
|
|
6234
|
+
interface Props$s {
|
|
6235
|
+
cellPosition: CellPosition;
|
|
6026
6236
|
}
|
|
6027
|
-
declare class
|
|
6237
|
+
declare class FilterIcon extends Component<Props$s, SpreadsheetChildEnv> {
|
|
6028
6238
|
static style: string;
|
|
6239
|
+
static template: string;
|
|
6240
|
+
onClick(): void;
|
|
6241
|
+
get isFilterActive(): boolean;
|
|
6242
|
+
}
|
|
6243
|
+
|
|
6244
|
+
interface Props$r {
|
|
6245
|
+
gridPosition: DOMCoordinates;
|
|
6246
|
+
}
|
|
6247
|
+
declare class FilterIconsOverlay extends Component<Props$r, SpreadsheetChildEnv> {
|
|
6029
6248
|
static template: string;
|
|
6030
6249
|
static components: {
|
|
6250
|
+
GridCellIcon: typeof GridCellIcon;
|
|
6031
6251
|
FilterIcon: typeof FilterIcon;
|
|
6032
6252
|
};
|
|
6033
6253
|
static defaultProps: {
|
|
@@ -6036,12 +6256,36 @@ declare class FilterIconsOverlay extends Component<Props$o, SpreadsheetChildEnv>
|
|
|
6036
6256
|
y: number;
|
|
6037
6257
|
};
|
|
6038
6258
|
};
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6259
|
+
getFilterHeadersPositions(): CellPosition[];
|
|
6260
|
+
}
|
|
6261
|
+
|
|
6262
|
+
interface Props$q {
|
|
6263
|
+
cellPosition: CellPosition;
|
|
6264
|
+
}
|
|
6265
|
+
declare class DataValidationCheckbox extends Component<Props$q, SpreadsheetChildEnv> {
|
|
6266
|
+
static template: string;
|
|
6267
|
+
onCheckboxChange(ev: Event): void;
|
|
6268
|
+
get checkBoxValue(): boolean;
|
|
6269
|
+
get isDisabled(): boolean;
|
|
6270
|
+
}
|
|
6271
|
+
|
|
6272
|
+
interface Props$p {
|
|
6273
|
+
cellPosition: CellPosition;
|
|
6274
|
+
}
|
|
6275
|
+
declare class DataValidationListIcon extends Component<Props$p, SpreadsheetChildEnv> {
|
|
6276
|
+
static template: string;
|
|
6277
|
+
onClick(): void;
|
|
6278
|
+
}
|
|
6279
|
+
|
|
6280
|
+
declare class DataValidationOverlay extends Component<{}, SpreadsheetChildEnv> {
|
|
6281
|
+
static template: string;
|
|
6282
|
+
static components: {
|
|
6283
|
+
GridCellIcon: typeof GridCellIcon;
|
|
6284
|
+
DataValidationCheckbox: typeof DataValidationCheckbox;
|
|
6285
|
+
DataValidationListIcon: typeof DataValidationListIcon;
|
|
6286
|
+
};
|
|
6287
|
+
get checkBoxCellPositions(): CellPosition[];
|
|
6288
|
+
get listIconsCellPositions(): CellPosition[];
|
|
6045
6289
|
}
|
|
6046
6290
|
|
|
6047
6291
|
type HFigureAxisType = "top" | "bottom" | "vCenter";
|
|
@@ -6054,7 +6298,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
|
6054
6298
|
}
|
|
6055
6299
|
|
|
6056
6300
|
type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
|
|
6057
|
-
interface Props$
|
|
6301
|
+
interface Props$o {
|
|
6058
6302
|
onFigureDeleted: () => void;
|
|
6059
6303
|
}
|
|
6060
6304
|
interface Container {
|
|
@@ -6133,7 +6377,7 @@ interface DndState {
|
|
|
6133
6377
|
* that occurred during the drag & drop, and to position the figure on the correct pane.
|
|
6134
6378
|
*
|
|
6135
6379
|
*/
|
|
6136
|
-
declare class FiguresContainer extends Component<Props$
|
|
6380
|
+
declare class FiguresContainer extends Component<Props$o, SpreadsheetChildEnv> {
|
|
6137
6381
|
static template: string;
|
|
6138
6382
|
static components: {
|
|
6139
6383
|
FigureComponent: typeof FigureComponent;
|
|
@@ -6165,6 +6409,30 @@ declare class FiguresContainer extends Component<Props$n, SpreadsheetChildEnv> {
|
|
|
6165
6409
|
private getSnapLineStyle;
|
|
6166
6410
|
}
|
|
6167
6411
|
|
|
6412
|
+
interface Props$n {
|
|
6413
|
+
focusGrid: () => void;
|
|
6414
|
+
}
|
|
6415
|
+
declare class GridAddRowsFooter extends Component<Props$n, SpreadsheetChildEnv> {
|
|
6416
|
+
static template: string;
|
|
6417
|
+
static components: {
|
|
6418
|
+
ValidationMessages: typeof ValidationMessages;
|
|
6419
|
+
};
|
|
6420
|
+
inputRef: {
|
|
6421
|
+
el: HTMLInputElement | null;
|
|
6422
|
+
};
|
|
6423
|
+
state: {
|
|
6424
|
+
inputValue: string;
|
|
6425
|
+
errorFlag: boolean;
|
|
6426
|
+
};
|
|
6427
|
+
setup(): void;
|
|
6428
|
+
get addRowsPosition(): string;
|
|
6429
|
+
get errorMessages(): string[];
|
|
6430
|
+
onKeydown(ev: KeyboardEvent): void;
|
|
6431
|
+
onInput(ev: InputEvent): void;
|
|
6432
|
+
onConfirm(): void;
|
|
6433
|
+
private onExternalClick;
|
|
6434
|
+
}
|
|
6435
|
+
|
|
6168
6436
|
interface Props$m {
|
|
6169
6437
|
onCellHovered: (position: Partial<Position$1>) => void;
|
|
6170
6438
|
onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
|
|
@@ -6182,6 +6450,8 @@ declare class GridOverlay extends Component<Props$m, SpreadsheetChildEnv> {
|
|
|
6182
6450
|
static template: string;
|
|
6183
6451
|
static components: {
|
|
6184
6452
|
FiguresContainer: typeof FiguresContainer;
|
|
6453
|
+
DataValidationOverlay: typeof DataValidationOverlay;
|
|
6454
|
+
GridAddRowsFooter: typeof GridAddRowsFooter;
|
|
6185
6455
|
};
|
|
6186
6456
|
static defaultProps: {
|
|
6187
6457
|
onCellHovered: () => void;
|
|
@@ -6192,6 +6462,7 @@ declare class GridOverlay extends Component<Props$m, SpreadsheetChildEnv> {
|
|
|
6192
6462
|
onFigureDeleted: () => void;
|
|
6193
6463
|
};
|
|
6194
6464
|
private gridOverlay;
|
|
6465
|
+
private gridOverlayRect;
|
|
6195
6466
|
setup(): void;
|
|
6196
6467
|
get gridOverlayEl(): HTMLElement;
|
|
6197
6468
|
get style(): string;
|
|
@@ -6396,12 +6667,12 @@ interface Props$e {
|
|
|
6396
6667
|
panelProps: any;
|
|
6397
6668
|
onCloseSidePanel: () => void;
|
|
6398
6669
|
}
|
|
6399
|
-
interface State$
|
|
6670
|
+
interface State$5 {
|
|
6400
6671
|
panel: SidePanelContent;
|
|
6401
6672
|
}
|
|
6402
6673
|
declare class SidePanel extends Component<Props$e, SpreadsheetChildEnv> {
|
|
6403
6674
|
static template: string;
|
|
6404
|
-
state: State$
|
|
6675
|
+
state: State$5;
|
|
6405
6676
|
setup(): void;
|
|
6406
6677
|
getTitle(): string;
|
|
6407
6678
|
}
|
|
@@ -6685,7 +6956,7 @@ declare class ActionButton extends Component<Props$d, SpreadsheetChildEnv> {
|
|
|
6685
6956
|
}
|
|
6686
6957
|
|
|
6687
6958
|
type Tool = "borderColorTool" | "borderTypeTool";
|
|
6688
|
-
interface State$
|
|
6959
|
+
interface State$4 {
|
|
6689
6960
|
activeTool: Tool | undefined;
|
|
6690
6961
|
}
|
|
6691
6962
|
interface BorderEditorProps {
|
|
@@ -6710,7 +6981,7 @@ declare class BorderEditor extends Component<BorderEditorProps, SpreadsheetChild
|
|
|
6710
6981
|
el: HTMLElement | null;
|
|
6711
6982
|
};
|
|
6712
6983
|
borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
|
|
6713
|
-
state: State$
|
|
6984
|
+
state: State$4;
|
|
6714
6985
|
toggleDropdownTool(tool: Tool): void;
|
|
6715
6986
|
closeDropdown(): void;
|
|
6716
6987
|
setBorderPosition(position: BorderPosition): void;
|
|
@@ -6728,7 +6999,7 @@ interface Props$c {
|
|
|
6728
6999
|
dropdownMaxHeight?: Pixel;
|
|
6729
7000
|
class?: string;
|
|
6730
7001
|
}
|
|
6731
|
-
interface State$
|
|
7002
|
+
interface State$3 {
|
|
6732
7003
|
currentColor: Color;
|
|
6733
7004
|
currentStyle: BorderStyle;
|
|
6734
7005
|
currentPosition: BorderPosition | undefined;
|
|
@@ -6741,7 +7012,7 @@ declare class BorderEditorWidget extends Component<Props$c, SpreadsheetChildEnv>
|
|
|
6741
7012
|
borderEditorButtonRef: {
|
|
6742
7013
|
el: HTMLElement | null;
|
|
6743
7014
|
};
|
|
6744
|
-
state: State$
|
|
7015
|
+
state: State$3;
|
|
6745
7016
|
get borderEditorAnchorRect(): Rect;
|
|
6746
7017
|
onBorderPositionPicked(position: BorderPosition): void;
|
|
6747
7018
|
onBorderColorPicked(color: Color): void;
|
|
@@ -6751,7 +7022,7 @@ declare class BorderEditorWidget extends Component<Props$c, SpreadsheetChildEnv>
|
|
|
6751
7022
|
|
|
6752
7023
|
interface Props$b {
|
|
6753
7024
|
values: AutocompleteValue[];
|
|
6754
|
-
selectedIndex: number;
|
|
7025
|
+
selectedIndex: number | undefined;
|
|
6755
7026
|
onValueSelected: (value: string) => void;
|
|
6756
7027
|
}
|
|
6757
7028
|
declare class TextValueProvider extends Component<Props$b> {
|
|
@@ -6858,8 +7129,9 @@ interface ComposerState$1 {
|
|
|
6858
7129
|
}
|
|
6859
7130
|
interface AutoCompleteState {
|
|
6860
7131
|
showProvider: boolean;
|
|
6861
|
-
selectedIndex: number;
|
|
7132
|
+
selectedIndex: number | undefined;
|
|
6862
7133
|
values: AutocompleteValue[];
|
|
7134
|
+
type: "function" | "dataValidation";
|
|
6863
7135
|
}
|
|
6864
7136
|
interface FunctionDescriptionState {
|
|
6865
7137
|
showDescription: boolean;
|
|
@@ -6907,7 +7179,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6907
7179
|
onKeydown(ev: KeyboardEvent): void;
|
|
6908
7180
|
onInput(ev: InputEvent): void;
|
|
6909
7181
|
onKeyup(ev: KeyboardEvent): void;
|
|
6910
|
-
|
|
7182
|
+
showFunctionAutocomplete(searchTerm: string): void;
|
|
6911
7183
|
/**
|
|
6912
7184
|
* This is required to ensure the content helper selection is
|
|
6913
7185
|
* properly updated on "onclick" events. Depending on the browser,
|
|
@@ -6939,6 +7211,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6939
7211
|
*/
|
|
6940
7212
|
private processTokenAtCursor;
|
|
6941
7213
|
private autoComplete;
|
|
7214
|
+
private showDataValidationAutocomplete;
|
|
6942
7215
|
}
|
|
6943
7216
|
|
|
6944
7217
|
interface Props$9 {
|
|
@@ -6954,7 +7227,7 @@ declare class TopBarComposer extends Component<Props$9, SpreadsheetChildEnv> {
|
|
|
6954
7227
|
get containerStyle(): string;
|
|
6955
7228
|
}
|
|
6956
7229
|
|
|
6957
|
-
interface State$
|
|
7230
|
+
interface State$2 {
|
|
6958
7231
|
isOpen: boolean;
|
|
6959
7232
|
}
|
|
6960
7233
|
interface Props$8 {
|
|
@@ -6966,7 +7239,7 @@ declare class FontSizeEditor extends Component<Props$8, SpreadsheetChildEnv> {
|
|
|
6966
7239
|
static template: string;
|
|
6967
7240
|
static components: {};
|
|
6968
7241
|
fontSizes: number[];
|
|
6969
|
-
dropdown: State$
|
|
7242
|
+
dropdown: State$2;
|
|
6970
7243
|
private inputRef;
|
|
6971
7244
|
private rootEditorRef;
|
|
6972
7245
|
setup(): void;
|
|
@@ -6991,7 +7264,7 @@ declare class PaintFormatButton extends Component<Props$7, SpreadsheetChildEnv>
|
|
|
6991
7264
|
togglePaintFormat(): void;
|
|
6992
7265
|
}
|
|
6993
7266
|
|
|
6994
|
-
interface State {
|
|
7267
|
+
interface State$1 {
|
|
6995
7268
|
menuState: MenuState;
|
|
6996
7269
|
activeTool: string;
|
|
6997
7270
|
fillColor: string;
|
|
@@ -7016,7 +7289,7 @@ declare class TopBar extends Component<Props$6, SpreadsheetChildEnv> {
|
|
|
7016
7289
|
PaintFormatButton: typeof PaintFormatButton;
|
|
7017
7290
|
BorderEditorWidget: typeof BorderEditorWidget;
|
|
7018
7291
|
};
|
|
7019
|
-
state: State;
|
|
7292
|
+
state: State$1;
|
|
7020
7293
|
isSelectingMenu: boolean;
|
|
7021
7294
|
openedEl: HTMLElement | null;
|
|
7022
7295
|
menus: Action[];
|
|
@@ -7366,6 +7639,29 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7366
7639
|
private processHeaderGroupingEventOnGrid;
|
|
7367
7640
|
}
|
|
7368
7641
|
|
|
7642
|
+
type Direction = "horizontal" | "vertical";
|
|
7643
|
+
interface DragAndDropItemsPartial {
|
|
7644
|
+
id: UID;
|
|
7645
|
+
size: Pixel;
|
|
7646
|
+
position: Pixel;
|
|
7647
|
+
}
|
|
7648
|
+
interface DndPartialArgs {
|
|
7649
|
+
draggedItemId: UID;
|
|
7650
|
+
initialMousePosition: Pixel;
|
|
7651
|
+
items: DragAndDropItemsPartial[];
|
|
7652
|
+
containerEl: HTMLElement;
|
|
7653
|
+
onChange?: () => void;
|
|
7654
|
+
onCancel?: () => void;
|
|
7655
|
+
onDragEnd?: (itemId: UID, indexAtEnd: Pixel) => void;
|
|
7656
|
+
}
|
|
7657
|
+
interface State {
|
|
7658
|
+
itemsStyle: Record<UID, string>;
|
|
7659
|
+
draggedItemId: UID | undefined;
|
|
7660
|
+
start: (direction: Direction, args: DndPartialArgs) => void;
|
|
7661
|
+
cancel: () => void;
|
|
7662
|
+
}
|
|
7663
|
+
declare function useDragAndDropListItems(): State;
|
|
7664
|
+
|
|
7369
7665
|
interface Props {
|
|
7370
7666
|
onCloseSidePanel: () => void;
|
|
7371
7667
|
}
|
|
@@ -7563,6 +7859,9 @@ declare const components: {
|
|
|
7563
7859
|
FigureComponent: typeof FigureComponent;
|
|
7564
7860
|
Menu: typeof Menu;
|
|
7565
7861
|
};
|
|
7862
|
+
declare const hooks: {
|
|
7863
|
+
useDragAndDropListItems: typeof useDragAndDropListItems;
|
|
7864
|
+
};
|
|
7566
7865
|
declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
|
|
7567
7866
|
addFunction: (fName: string, fDescription: AddFunctionDescription) => any;
|
|
7568
7867
|
};
|
|
@@ -7570,4 +7869,4 @@ declare const constants: {
|
|
|
7570
7869
|
DEFAULT_LOCALE: Locale;
|
|
7571
7870
|
};
|
|
7572
7871
|
|
|
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 };
|
|
7872
|
+
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 };
|