@odoo/o-spreadsheet 16.5.0-alpha.1 → 16.5.0-alpha.3
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 +1744 -1650
- package/dist/o-spreadsheet.d.ts +42 -54
- package/dist/o-spreadsheet.esm.js +1744 -1650
- package/dist/o-spreadsheet.iife.js +1744 -1650
- package/dist/o-spreadsheet.iife.min.js +249 -249
- package/package.json +1 -1
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1083,11 +1083,6 @@ interface ImageProviderInterface {
|
|
|
1083
1083
|
getImageOriginalSize(path: string): Promise<FigureSize>;
|
|
1084
1084
|
}
|
|
1085
1085
|
|
|
1086
|
-
interface NotifyUIEvent {
|
|
1087
|
-
type: "ERROR";
|
|
1088
|
-
text: string;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
1086
|
/**
|
|
1092
1087
|
* Model
|
|
1093
1088
|
*
|
|
@@ -1133,7 +1128,8 @@ interface ModelConfig {
|
|
|
1133
1128
|
readonly transportService: TransportService;
|
|
1134
1129
|
readonly client: Client;
|
|
1135
1130
|
readonly snapshotRequested: boolean;
|
|
1136
|
-
readonly notifyUI: (payload:
|
|
1131
|
+
readonly notifyUI: (payload: InformationNotification) => void;
|
|
1132
|
+
readonly raiseBlockingErrorUI: (text: string) => void;
|
|
1137
1133
|
}
|
|
1138
1134
|
interface ModelExternalConfig {
|
|
1139
1135
|
readonly fileStore?: FileStore;
|
|
@@ -1363,7 +1359,7 @@ declare class BasePlugin<State = any, C = any> implements CommandHandler<C>, Val
|
|
|
1363
1359
|
checkValidations<T>(command: T, ...validations: Validation<T>[]): CommandResult | CommandResult[];
|
|
1364
1360
|
}
|
|
1365
1361
|
|
|
1366
|
-
type UIActions = Pick<ModelConfig, "notifyUI">;
|
|
1362
|
+
type UIActions = Pick<ModelConfig, "notifyUI" | "raiseBlockingErrorUI">;
|
|
1367
1363
|
interface UIPluginConfig {
|
|
1368
1364
|
readonly getters: Getters;
|
|
1369
1365
|
readonly stateObserver: StateObserver;
|
|
@@ -1383,7 +1379,7 @@ interface UIPluginConstructor {
|
|
|
1383
1379
|
* UI plugins handle any transient data required to display a spreadsheet.
|
|
1384
1380
|
* They can draw on the grid canvas.
|
|
1385
1381
|
*/
|
|
1386
|
-
declare class UIPlugin<State = any
|
|
1382
|
+
declare class UIPlugin<State = any> extends BasePlugin<State, Command> {
|
|
1387
1383
|
static layers: LAYERS[];
|
|
1388
1384
|
protected getters: Getters;
|
|
1389
1385
|
protected ui: UIActions;
|
|
@@ -1453,6 +1449,7 @@ declare class FindAndReplacePlugin extends UIPlugin {
|
|
|
1453
1449
|
*/
|
|
1454
1450
|
private selectNextCell;
|
|
1455
1451
|
private clearSearch;
|
|
1452
|
+
private replaceMatch;
|
|
1456
1453
|
/**
|
|
1457
1454
|
* Replace the value of the currently selected match
|
|
1458
1455
|
*/
|
|
@@ -1471,7 +1468,7 @@ interface ComposerSelection {
|
|
|
1471
1468
|
end: number;
|
|
1472
1469
|
}
|
|
1473
1470
|
declare class EditionPlugin extends UIPlugin {
|
|
1474
|
-
static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell"];
|
|
1471
|
+
static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell", "getCycledReference"];
|
|
1475
1472
|
private col;
|
|
1476
1473
|
private row;
|
|
1477
1474
|
private mode;
|
|
@@ -1480,10 +1477,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1480
1477
|
private currentTokens;
|
|
1481
1478
|
private selectionStart;
|
|
1482
1479
|
private selectionEnd;
|
|
1483
|
-
private selectionInitialStart;
|
|
1484
1480
|
private initialContent;
|
|
1485
|
-
private previousRef;
|
|
1486
|
-
private previousRange;
|
|
1487
1481
|
private colorIndexByRange;
|
|
1488
1482
|
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
1489
1483
|
private handleEvent;
|
|
@@ -1499,6 +1493,19 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1499
1493
|
* Return the (enriched) token just before the cursor.
|
|
1500
1494
|
*/
|
|
1501
1495
|
getTokenAtCursor(): EnrichedToken | undefined;
|
|
1496
|
+
/**
|
|
1497
|
+
* Return the cycled reference if any (A1 -> $A$1 -> A$1 -> $A1 -> A1)
|
|
1498
|
+
*/
|
|
1499
|
+
getCycledReference(selection: {
|
|
1500
|
+
start: number;
|
|
1501
|
+
end: number;
|
|
1502
|
+
}, content: string): {
|
|
1503
|
+
content: string;
|
|
1504
|
+
selection: {
|
|
1505
|
+
start: number;
|
|
1506
|
+
end: number;
|
|
1507
|
+
};
|
|
1508
|
+
} | undefined;
|
|
1502
1509
|
private cycleReferences;
|
|
1503
1510
|
private validateSelection;
|
|
1504
1511
|
private onColumnsRemoved;
|
|
@@ -1529,7 +1536,11 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1529
1536
|
/**
|
|
1530
1537
|
* Replace the current reference selected by the new one.
|
|
1531
1538
|
* */
|
|
1532
|
-
private
|
|
1539
|
+
private replaceSelectedRange;
|
|
1540
|
+
/**
|
|
1541
|
+
* Replace the reference of the old zone by the new one.
|
|
1542
|
+
*/
|
|
1543
|
+
private updateComposerRange;
|
|
1533
1544
|
private getZoneReference;
|
|
1534
1545
|
private getRangeReference;
|
|
1535
1546
|
/**
|
|
@@ -1560,11 +1571,6 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1560
1571
|
* - Previous and next tokens can be separated by spaces
|
|
1561
1572
|
*/
|
|
1562
1573
|
private canStartComposerRangeSelection;
|
|
1563
|
-
/**
|
|
1564
|
-
* Return all the tokens between selectionStart and selectionEnd.
|
|
1565
|
-
* Includes token that begin right on selectionStart or end right on selectionEnd.
|
|
1566
|
-
*/
|
|
1567
|
-
private getTokensInSelection;
|
|
1568
1574
|
}
|
|
1569
1575
|
|
|
1570
1576
|
/**
|
|
@@ -1680,9 +1686,9 @@ interface PositionDependentCommand {
|
|
|
1680
1686
|
row: number;
|
|
1681
1687
|
}
|
|
1682
1688
|
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" | "MOVE_CONDITIONAL_FORMAT" | "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" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
|
|
1683
|
-
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" | "MOVE_CONDITIONAL_FORMAT" | "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" | "UPDATE_LOCALE" | "SORT_CELLS" | "SET_DECIMAL" | "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" | "ACTIVATE_SHEET" | "
|
|
1689
|
+
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" | "MOVE_CONDITIONAL_FORMAT" | "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" | "UPDATE_LOCALE" | "SORT_CELLS" | "SET_DECIMAL" | "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" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "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" | "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">;
|
|
1684
1690
|
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" | "MOVE_CONDITIONAL_FORMAT" | "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" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
|
|
1685
|
-
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" | "MOVE_CONDITIONAL_FORMAT" | "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" | "UPDATE_LOCALE" | "SORT_CELLS" | "SET_DECIMAL" | "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" | "ACTIVATE_SHEET" | "
|
|
1691
|
+
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" | "MOVE_CONDITIONAL_FORMAT" | "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" | "UPDATE_LOCALE" | "SORT_CELLS" | "SET_DECIMAL" | "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" | "ACTIVATE_SHEET" | "EVALUATE_CELLS" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "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" | "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">;
|
|
1686
1692
|
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" | "MOVE_CONDITIONAL_FORMAT" | "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" | "UPDATE_LOCALE">;
|
|
1687
1693
|
interface UpdateCellCommand extends PositionDependentCommand {
|
|
1688
1694
|
type: "UPDATE_CELL";
|
|
@@ -1949,22 +1955,6 @@ interface ActivateSheetCommand {
|
|
|
1949
1955
|
sheetIdFrom: UID;
|
|
1950
1956
|
sheetIdTo: UID;
|
|
1951
1957
|
}
|
|
1952
|
-
/**
|
|
1953
|
-
* Set the selection mode to `readyToExpand`.
|
|
1954
|
-
* The user is ready to expand the selected zones with a new
|
|
1955
|
-
* selection (i.e. add an other zone the to currently selected zones).
|
|
1956
|
-
* In other words, the next selection will be added to the
|
|
1957
|
-
* current selection if this mode is active.
|
|
1958
|
-
*/
|
|
1959
|
-
interface PrepareExpansionCommand {
|
|
1960
|
-
type: "PREPARE_SELECTION_INPUT_EXPANSION";
|
|
1961
|
-
}
|
|
1962
|
-
/**
|
|
1963
|
-
* Set the selection mode to `idle`.
|
|
1964
|
-
*/
|
|
1965
|
-
interface StopSelectionCommand {
|
|
1966
|
-
type: "STOP_SELECTION_INPUT";
|
|
1967
|
-
}
|
|
1968
1958
|
/**
|
|
1969
1959
|
* Set a color to be used for the next selection to highlight.
|
|
1970
1960
|
* The color is only used when selection highlight is enabled.
|
|
@@ -1978,11 +1968,7 @@ interface EvaluateCellsCommand {
|
|
|
1978
1968
|
}
|
|
1979
1969
|
interface StartChangeHighlightCommand {
|
|
1980
1970
|
type: "START_CHANGE_HIGHLIGHT";
|
|
1981
|
-
|
|
1982
|
-
}
|
|
1983
|
-
interface ChangeHighlightCommand {
|
|
1984
|
-
type: "CHANGE_HIGHLIGHT";
|
|
1985
|
-
range: RangeData;
|
|
1971
|
+
zone: Zone;
|
|
1986
1972
|
}
|
|
1987
1973
|
interface StopComposerSelectionCommand {
|
|
1988
1974
|
type: "STOP_COMPOSER_RANGE_SELECTION";
|
|
@@ -2261,7 +2247,7 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
|
|
|
2261
2247
|
| CreateImageOverCommand
|
|
2262
2248
|
/** FILTERS */
|
|
2263
2249
|
| CreateFilterTableCommand | RemoveFilterTableCommand | UpdateLocaleCommand;
|
|
2264
|
-
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 |
|
|
2250
|
+
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 | 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;
|
|
2265
2251
|
type Command = CoreCommand | LocalCommand;
|
|
2266
2252
|
/**
|
|
2267
2253
|
* Holds the result of a command dispatch.
|
|
@@ -2838,16 +2824,19 @@ type TranslationFunction = (string: string, ...values: string[] | [{
|
|
|
2838
2824
|
/***
|
|
2839
2825
|
* Allow to inject a translation function from outside o-spreadsheet.
|
|
2840
2826
|
* @param tfn the function that will do the translation
|
|
2827
|
+
* @param loaded a function that returns true when the translation is loaded
|
|
2841
2828
|
*/
|
|
2842
|
-
declare function setTranslationMethod(tfn: TranslationFunction): void;
|
|
2829
|
+
declare function setTranslationMethod(tfn: TranslationFunction, loaded?: () => boolean): void;
|
|
2843
2830
|
|
|
2844
2831
|
interface EditTextOptions {
|
|
2845
2832
|
error?: string;
|
|
2846
2833
|
placeholder?: string;
|
|
2847
2834
|
}
|
|
2835
|
+
type NotificationType = "danger" | "info" | "success" | "warning";
|
|
2848
2836
|
interface InformationNotification {
|
|
2849
2837
|
text: string;
|
|
2850
|
-
|
|
2838
|
+
type: NotificationType;
|
|
2839
|
+
sticky: boolean;
|
|
2851
2840
|
}
|
|
2852
2841
|
interface SpreadsheetEnv {
|
|
2853
2842
|
notifyUser: (notification: InformationNotification) => any;
|
|
@@ -2977,7 +2966,7 @@ interface CorePluginConstructor {
|
|
|
2977
2966
|
* persisted state.
|
|
2978
2967
|
* They should not be concerned about UI parts or transient state.
|
|
2979
2968
|
*/
|
|
2980
|
-
declare class CorePlugin<State = any
|
|
2969
|
+
declare class CorePlugin<State = any> extends BasePlugin<State, CoreCommand> implements RangeProvider {
|
|
2981
2970
|
protected getters: CoreGetters;
|
|
2982
2971
|
protected uuidGenerator: UuidGenerator;
|
|
2983
2972
|
constructor({ getters, stateObserver, range, dispatch, uuidGenerator }: CorePluginConfig);
|
|
@@ -3127,7 +3116,7 @@ interface CoreState {
|
|
|
3127
3116
|
* cell and sheet content.
|
|
3128
3117
|
*/
|
|
3129
3118
|
declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
|
|
3130
|
-
static getters: readonly ["zoneToXC", "getCells", "getFormulaCellContent", "
|
|
3119
|
+
static getters: readonly ["zoneToXC", "getCells", "getFormulaCellContent", "getTranslatedCellFormula", "getCellStyle", "getCellById"];
|
|
3131
3120
|
readonly nextId = 1;
|
|
3132
3121
|
readonly cells: {
|
|
3133
3122
|
[sheetId: string]: {
|
|
@@ -3163,8 +3152,8 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
|
|
|
3163
3152
|
* starting an async evaluation even if it has been moved or re-allocated
|
|
3164
3153
|
*/
|
|
3165
3154
|
getCellById(cellId: UID): Cell | undefined;
|
|
3166
|
-
|
|
3167
|
-
|
|
3155
|
+
getFormulaCellContent(sheetId: UID, cell: Pick<FormulaCell, "dependencies" | "compiledFormula">, dependencies?: Range[]): string;
|
|
3156
|
+
getTranslatedCellFormula(sheetId: UID, offsetX: number, offsetY: number, compiledFormula: CompiledFormula, dependencies: Range[]): string;
|
|
3168
3157
|
getCellStyle(position: CellPosition): Style;
|
|
3169
3158
|
/**
|
|
3170
3159
|
* Converts a zone to a XC coordinate system
|
|
@@ -4209,8 +4198,7 @@ declare class SelectionInputPlugin extends UIPlugin implements StreamCallbacks<S
|
|
|
4209
4198
|
static getters: never[];
|
|
4210
4199
|
ranges: RangeInputValue[];
|
|
4211
4200
|
focusedRangeIndex: number | null;
|
|
4212
|
-
private
|
|
4213
|
-
private willAddNewRange;
|
|
4201
|
+
private inputSheetId;
|
|
4214
4202
|
constructor(config: UIPluginConfig, initialRanges: string[], inputHasSingleRange: boolean);
|
|
4215
4203
|
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4216
4204
|
handleEvent(event: SelectionEvent): void;
|
|
@@ -4223,7 +4211,6 @@ declare class SelectionInputPlugin extends UIPlugin implements StreamCallbacks<S
|
|
|
4223
4211
|
private focus;
|
|
4224
4212
|
private focusLast;
|
|
4225
4213
|
private unfocus;
|
|
4226
|
-
private add;
|
|
4227
4214
|
private setContent;
|
|
4228
4215
|
/**
|
|
4229
4216
|
* Insert new inputs after the given index.
|
|
@@ -6705,7 +6692,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6705
6692
|
onCompositionEnd(): void;
|
|
6706
6693
|
onKeydown(ev: KeyboardEvent): void;
|
|
6707
6694
|
onInput(ev: InputEvent): void;
|
|
6708
|
-
onKeyup(): void;
|
|
6695
|
+
onKeyup(ev: KeyboardEvent): void;
|
|
6709
6696
|
showAutocomplete(searchTerm: string): void;
|
|
6710
6697
|
/**
|
|
6711
6698
|
* This is required to ensure the content helper selection is
|
|
@@ -6875,7 +6862,6 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
|
|
|
6875
6862
|
private bindModelEvents;
|
|
6876
6863
|
private unbindModelEvents;
|
|
6877
6864
|
private checkViewportSize;
|
|
6878
|
-
private onNotifyUI;
|
|
6879
6865
|
openSidePanel(panel: string, panelProps: any): void;
|
|
6880
6866
|
closeSidePanel(): void;
|
|
6881
6867
|
toggleSidePanel(panel: string, panelProps: any): void;
|
|
@@ -7342,7 +7328,9 @@ declare const components: {
|
|
|
7342
7328
|
ScorecardChartDesignPanel: typeof ScorecardChartDesignPanel;
|
|
7343
7329
|
FigureComponent: typeof FigureComponent;
|
|
7344
7330
|
};
|
|
7345
|
-
declare function addFunction(functionName: string, functionDescription:
|
|
7331
|
+
declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
|
|
7332
|
+
addFunction: (fName: string, fDescription: AddFunctionDescription) => any;
|
|
7333
|
+
};
|
|
7346
7334
|
declare const constants: {
|
|
7347
7335
|
DEFAULT_LOCALE: Locale;
|
|
7348
7336
|
};
|