@odoo/o-spreadsheet 16.3.2 → 16.3.4
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 +90 -54
- package/dist/o-spreadsheet.d.ts +168 -165
- package/dist/o-spreadsheet.esm.js +90 -54
- package/dist/o-spreadsheet.iife.js +90 -54
- package/dist/o-spreadsheet.iife.min.js +266 -264
- package/package.json +4 -4
- package/readme.md +8 -7
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ interface EnrichedToken extends Token {
|
|
|
40
40
|
functionContext?: FunctionContext;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
type TokenType = "OPERATOR" | "NUMBER" | "STRING" | "BOOLEAN" | "FUNCTION" | "SYMBOL" | "SPACE" | "DEBUGGER" | "COMMA" | "LEFT_PAREN" | "RIGHT_PAREN" | "REFERENCE" | "INVALID_REFERENCE" | "UNKNOWN";
|
|
44
44
|
interface Token {
|
|
45
45
|
type: TokenType;
|
|
46
46
|
value: string;
|
|
@@ -87,7 +87,7 @@ interface ASTEmpty extends ASTBase {
|
|
|
87
87
|
type: "EMPTY";
|
|
88
88
|
value: "";
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
type AST = ASTOperation | ASTUnaryOperation | ASTFuncall | ASTNumber | ASTBoolean | ASTString | ASTReference | ASTEmpty;
|
|
91
91
|
/**
|
|
92
92
|
* Parse an expression (as a string) into an AST.
|
|
93
93
|
*/
|
|
@@ -154,7 +154,7 @@ declare class EventBus<Event extends {
|
|
|
154
154
|
*/
|
|
155
155
|
clear(): void;
|
|
156
156
|
}
|
|
157
|
-
|
|
157
|
+
type Callback = (...args: any[]) => void;
|
|
158
158
|
interface Subscription {
|
|
159
159
|
owner: any;
|
|
160
160
|
callback: Callback;
|
|
@@ -241,7 +241,7 @@ declare class SelectiveHistory<T = unknown> {
|
|
|
241
241
|
private fastForward;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
type ClientId = string;
|
|
245
245
|
interface Client {
|
|
246
246
|
id: ClientId;
|
|
247
247
|
name: string;
|
|
@@ -287,9 +287,9 @@ interface RevisionsDroppedEvent {
|
|
|
287
287
|
interface SnapshotEvent {
|
|
288
288
|
type: "snapshot";
|
|
289
289
|
}
|
|
290
|
-
|
|
290
|
+
type CollaborativeEvent = NewLocalStateUpdateEvent | UnexpectedRevisionIdEvent | RemoteRevisionReceivedEvent | RevisionAcknowledgedEvent | RevisionUndone | RevisionRedone | RevisionsDroppedEvent | SnapshotEvent | CollaborativeEventReceived;
|
|
291
291
|
|
|
292
|
-
|
|
292
|
+
type XLSXExportFile = XLSXExportImageFile | XLSXExportXMLFile;
|
|
293
293
|
interface XLSXExportXMLFile {
|
|
294
294
|
path: string;
|
|
295
295
|
content: string;
|
|
@@ -308,10 +308,10 @@ interface XLSXExport {
|
|
|
308
308
|
* Note that the alpha channel goes first! AARRGGBB
|
|
309
309
|
* e.g. "1E5010" or "331E5010"
|
|
310
310
|
*/
|
|
311
|
-
|
|
311
|
+
type XlsxHexColor = string & Alias;
|
|
312
312
|
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
type VerticalAxisPosition = "left" | "right";
|
|
314
|
+
type LegendPosition = "top" | "bottom" | "left" | "right" | "none";
|
|
315
315
|
|
|
316
316
|
interface BarChartDefinition {
|
|
317
317
|
readonly type: "bar";
|
|
@@ -325,7 +325,7 @@ interface BarChartDefinition {
|
|
|
325
325
|
readonly stacked: boolean;
|
|
326
326
|
readonly aggregated?: boolean;
|
|
327
327
|
}
|
|
328
|
-
|
|
328
|
+
type BarChartRuntime = {
|
|
329
329
|
chartJsConfig: ChartConfiguration;
|
|
330
330
|
background: Color;
|
|
331
331
|
};
|
|
@@ -406,7 +406,7 @@ interface LineChartDefinition {
|
|
|
406
406
|
readonly stacked: boolean;
|
|
407
407
|
readonly aggregated?: boolean;
|
|
408
408
|
}
|
|
409
|
-
|
|
409
|
+
type LineChartRuntime = {
|
|
410
410
|
chartJsConfig: ChartConfiguration;
|
|
411
411
|
background: Color;
|
|
412
412
|
};
|
|
@@ -421,7 +421,7 @@ interface PieChartDefinition {
|
|
|
421
421
|
readonly legendPosition: LegendPosition;
|
|
422
422
|
readonly aggregated?: boolean;
|
|
423
423
|
}
|
|
424
|
-
|
|
424
|
+
type PieChartRuntime = {
|
|
425
425
|
chartJsConfig: ChartConfiguration;
|
|
426
426
|
background: Color;
|
|
427
427
|
};
|
|
@@ -437,8 +437,8 @@ interface ScorecardChartDefinition {
|
|
|
437
437
|
readonly baselineColorUp: Color;
|
|
438
438
|
readonly baselineColorDown: Color;
|
|
439
439
|
}
|
|
440
|
-
|
|
441
|
-
|
|
440
|
+
type BaselineMode = "text" | "difference" | "percentage";
|
|
441
|
+
type BaselineArrowDirection = "neutral" | "up" | "down";
|
|
442
442
|
interface ScorecardChartRuntime {
|
|
443
443
|
readonly title: string;
|
|
444
444
|
readonly keyValue: string;
|
|
@@ -452,15 +452,15 @@ interface ScorecardChartRuntime {
|
|
|
452
452
|
readonly baselineStyle?: Style;
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
455
|
+
type ChartType = "line" | "bar" | "pie" | "scorecard" | "gauge";
|
|
456
|
+
type ChartDefinition = LineChartDefinition | PieChartDefinition | BarChartDefinition | ScorecardChartDefinition | GaugeChartDefinition;
|
|
457
|
+
type ChartJSRuntime = LineChartRuntime | PieChartRuntime | BarChartRuntime | GaugeChartRuntime;
|
|
458
|
+
type ChartRuntime = ChartJSRuntime | ScorecardChartRuntime;
|
|
459
459
|
interface ExcelChartDataset {
|
|
460
460
|
readonly label?: string;
|
|
461
461
|
readonly range: string;
|
|
462
462
|
}
|
|
463
|
-
|
|
463
|
+
type ExcelChartType = "line" | "bar" | "pie";
|
|
464
464
|
interface ExcelChartDefinition {
|
|
465
465
|
readonly title?: string;
|
|
466
466
|
readonly type: ExcelChartType;
|
|
@@ -511,8 +511,8 @@ interface ConditionalFormat {
|
|
|
511
511
|
interface ConditionalFormatInternal extends Omit<ConditionalFormat, "ranges"> {
|
|
512
512
|
ranges: Range[];
|
|
513
513
|
}
|
|
514
|
-
|
|
515
|
-
|
|
514
|
+
type ConditionalFormatRule = SingleColorRules | ColorScaleRule | IconSetRule;
|
|
515
|
+
type SingleColorRules = CellIsRule;
|
|
516
516
|
interface SingleColorRule {
|
|
517
517
|
style: Style;
|
|
518
518
|
}
|
|
@@ -521,18 +521,18 @@ interface CellIsRule extends SingleColorRule {
|
|
|
521
521
|
operator: ConditionalFormattingOperatorValues;
|
|
522
522
|
values: string[];
|
|
523
523
|
}
|
|
524
|
-
|
|
525
|
-
|
|
524
|
+
type ThresholdType = "value" | "number" | "percentage" | "percentile" | "formula";
|
|
525
|
+
type ColorScaleThreshold = {
|
|
526
526
|
color: number;
|
|
527
527
|
type: ThresholdType;
|
|
528
528
|
value?: string;
|
|
529
529
|
};
|
|
530
|
-
|
|
530
|
+
type ColorScaleMidPointThreshold = {
|
|
531
531
|
color: number;
|
|
532
532
|
type: Exclude<ThresholdType, "value">;
|
|
533
533
|
value: string;
|
|
534
534
|
};
|
|
535
|
-
|
|
535
|
+
type IconThreshold = {
|
|
536
536
|
type: Exclude<ThresholdType, "value">;
|
|
537
537
|
operator: "gt" | "ge";
|
|
538
538
|
value: string;
|
|
@@ -554,8 +554,8 @@ interface IconSetRule {
|
|
|
554
554
|
upperInflectionPoint: IconThreshold;
|
|
555
555
|
lowerInflectionPoint: IconThreshold;
|
|
556
556
|
}
|
|
557
|
-
|
|
558
|
-
|
|
557
|
+
type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";
|
|
558
|
+
type UpDown = "up" | "down";
|
|
559
559
|
|
|
560
560
|
interface Figure {
|
|
561
561
|
id: UID;
|
|
@@ -569,7 +569,7 @@ interface FigureSize {
|
|
|
569
569
|
width: Pixel;
|
|
570
570
|
height: Pixel;
|
|
571
571
|
}
|
|
572
|
-
|
|
572
|
+
type ResizeDirection = -1 | 0 | 1;
|
|
573
573
|
|
|
574
574
|
interface Image {
|
|
575
575
|
path: string;
|
|
@@ -663,7 +663,8 @@ interface ExcelFilterTableData {
|
|
|
663
663
|
}
|
|
664
664
|
interface ExcelFilterData {
|
|
665
665
|
colId: number;
|
|
666
|
-
|
|
666
|
+
displayedValues: string[];
|
|
667
|
+
displayBlanks?: boolean;
|
|
667
668
|
}
|
|
668
669
|
|
|
669
670
|
interface AbstractMessage {
|
|
@@ -719,11 +720,11 @@ interface SnapshotCreatedMessage extends AbstractMessage {
|
|
|
719
720
|
serverRevisionId: UID;
|
|
720
721
|
nextRevisionId: UID;
|
|
721
722
|
}
|
|
722
|
-
|
|
723
|
-
|
|
723
|
+
type CollaborationMessage = RevisionUndoneMessage | RevisionRedoneMessage | RemoteRevisionMessage | SnapshotMessage | SnapshotCreatedMessage | ClientMovedMessage | ClientJoinedMessage | ClientLeftMessage;
|
|
724
|
+
type StateUpdateMessage = Extract<CollaborationMessage, {
|
|
724
725
|
nextRevisionId: UID;
|
|
725
726
|
}>;
|
|
726
|
-
|
|
727
|
+
type NewMessageCallback<T = any> = (message: T) => void;
|
|
727
728
|
/**
|
|
728
729
|
* The transport service allows to communicate between multiple clients.
|
|
729
730
|
* A client can send any message to others.
|
|
@@ -1020,7 +1021,7 @@ interface HeadersSelected extends SelectionEventPayload {
|
|
|
1020
1021
|
interface AlterZone extends SelectionEventPayload {
|
|
1021
1022
|
type: "AlterZone";
|
|
1022
1023
|
}
|
|
1023
|
-
|
|
1024
|
+
type SelectionEvent = Readonly<ZonesSelected | HeadersSelected | AlterZone>;
|
|
1024
1025
|
|
|
1025
1026
|
interface StreamCallbacks<Event> {
|
|
1026
1027
|
handleEvent: (event: Event) => void;
|
|
@@ -1029,7 +1030,7 @@ interface StreamCallbacks<Event> {
|
|
|
1029
1030
|
release?: () => void;
|
|
1030
1031
|
}
|
|
1031
1032
|
|
|
1032
|
-
|
|
1033
|
+
type StatefulStream<Event, State> = {
|
|
1033
1034
|
capture(owner: unknown, state: State, callbacks: StreamCallbacks<Event>): void;
|
|
1034
1035
|
registerAsDefault: (owner: unknown, state: State, callbacks: StreamCallbacks<Event>) => void;
|
|
1035
1036
|
resetDefaultAnchor: (owner: unknown, state: State) => void;
|
|
@@ -1054,9 +1055,9 @@ interface SelectionProcessor {
|
|
|
1054
1055
|
loopSelection(): DispatchResult;
|
|
1055
1056
|
selectTableAroundSelection(): DispatchResult;
|
|
1056
1057
|
}
|
|
1057
|
-
|
|
1058
|
+
type SelectionStreamProcessor = SelectionProcessor & StatefulStream<SelectionEvent, AnchorZone>;
|
|
1058
1059
|
|
|
1059
|
-
|
|
1060
|
+
type FilePath = string;
|
|
1060
1061
|
/**
|
|
1061
1062
|
* FileStore manage the transfer of file with the server.
|
|
1062
1063
|
*/
|
|
@@ -1109,7 +1110,7 @@ interface NotifyUIEvent {
|
|
|
1109
1110
|
* Note that the Model can be used in a standalone way to manipulate
|
|
1110
1111
|
* programmatically a spreadsheet.
|
|
1111
1112
|
*/
|
|
1112
|
-
|
|
1113
|
+
type Mode = "normal" | "readonly" | "dashboard";
|
|
1113
1114
|
interface ModelConfig {
|
|
1114
1115
|
readonly mode: Mode;
|
|
1115
1116
|
/**
|
|
@@ -1357,7 +1358,7 @@ declare class BasePlugin<State = any, C = any> implements CommandHandler<C>, Val
|
|
|
1357
1358
|
checkValidations<T>(command: T, ...validations: Validation<T>[]): CommandResult | CommandResult[];
|
|
1358
1359
|
}
|
|
1359
1360
|
|
|
1360
|
-
|
|
1361
|
+
type UIActions = Pick<ModelConfig, "notifyUI">;
|
|
1361
1362
|
interface UIPluginConfig {
|
|
1362
1363
|
readonly getters: Getters;
|
|
1363
1364
|
readonly stateObserver: StateObserver;
|
|
@@ -1458,7 +1459,7 @@ declare class FindAndReplacePlugin extends UIPlugin {
|
|
|
1458
1459
|
drawGrid(renderingContext: GridRenderingContext): void;
|
|
1459
1460
|
}
|
|
1460
1461
|
|
|
1461
|
-
|
|
1462
|
+
type EditionMode = "editing" | "selecting" | "inactive";
|
|
1462
1463
|
interface ComposerSelection {
|
|
1463
1464
|
start: number;
|
|
1464
1465
|
end: number;
|
|
@@ -1571,12 +1572,12 @@ interface DOMDimension {
|
|
|
1571
1572
|
width: Pixel;
|
|
1572
1573
|
height: Pixel;
|
|
1573
1574
|
}
|
|
1574
|
-
|
|
1575
|
+
type Rect = DOMCoordinates & DOMDimension;
|
|
1575
1576
|
/**
|
|
1576
1577
|
* The viewport is the visible area of a sheet.
|
|
1577
1578
|
* Column and row headers are not included in the viewport.
|
|
1578
1579
|
*/
|
|
1579
|
-
|
|
1580
|
+
type Viewport = Zone & Alias;
|
|
1580
1581
|
interface SheetScrollInfo {
|
|
1581
1582
|
/**
|
|
1582
1583
|
* The offset in the X coordinate between the viewport left side and
|
|
@@ -1621,16 +1622,16 @@ interface EdgeScrollInfo {
|
|
|
1621
1622
|
direction: ScrollDirection$1;
|
|
1622
1623
|
delay: number;
|
|
1623
1624
|
}
|
|
1624
|
-
|
|
1625
|
+
type ScrollDirection$1 = 1 | 0 | -1 | "reset";
|
|
1625
1626
|
|
|
1626
1627
|
declare enum ClipboardMIMEType {
|
|
1627
1628
|
PlainText = "text/plain",
|
|
1628
1629
|
Html = "text/html"
|
|
1629
1630
|
}
|
|
1630
|
-
|
|
1631
|
+
type ClipboardContent = {
|
|
1631
1632
|
[type in ClipboardMIMEType]?: string;
|
|
1632
1633
|
};
|
|
1633
|
-
|
|
1634
|
+
type ClipboardPasteOptions = "onlyFormat" | "onlyValue";
|
|
1634
1635
|
|
|
1635
1636
|
/**
|
|
1636
1637
|
* There are two kinds of commands: CoreCommands and LocalCommands
|
|
@@ -2149,7 +2150,7 @@ interface SortCommand {
|
|
|
2149
2150
|
sortDirection: SortDirection;
|
|
2150
2151
|
sortOptions?: SortOptions;
|
|
2151
2152
|
}
|
|
2152
|
-
|
|
2153
|
+
type SortDirection = "ascending" | "descending";
|
|
2153
2154
|
interface ResizeViewportCommand {
|
|
2154
2155
|
type: "RESIZE_SHEETVIEW";
|
|
2155
2156
|
width: Pixel;
|
|
@@ -2218,7 +2219,7 @@ interface SplitTextIntoColumnsCommand {
|
|
|
2218
2219
|
addNewColumns: boolean;
|
|
2219
2220
|
force?: boolean;
|
|
2220
2221
|
}
|
|
2221
|
-
|
|
2222
|
+
type CoreCommand =
|
|
2222
2223
|
/** CELLS */
|
|
2223
2224
|
UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContentCommand
|
|
2224
2225
|
/** GRID SHAPE */
|
|
@@ -2241,8 +2242,8 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
|
|
|
2241
2242
|
| CreateImageOverCommand
|
|
2242
2243
|
/** FILTERS */
|
|
2243
2244
|
| CreateFilterTableCommand | RemoveFilterTableCommand;
|
|
2244
|
-
|
|
2245
|
-
|
|
2245
|
+
type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | PasteCFCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | PrepareExpansionCommand | StopSelectionCommand | EvaluateCellsCommand | ChangeHighlightCommand | StartChangeHighlightCommand | SetColorCommand | StopComposerSelectionCommand | StartEditionCommand | StopEditionCommand | SetCurrentContentCommand | ChangeComposerSelectionCommand | ReplaceComposerSelectionCommand | CycleEditionReferencesCommand | StartCommand | AutofillCommand | AutofillSelectCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | UpdateSearchCommand | RefreshSearchCommand | ClearSearchCommand | SelectSearchPreviousCommand | SelectSearchNextCommand | ReplaceSearchCommand | ReplaceAllSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | OpenCellPopoverCommand | CloseCellPopoverCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand;
|
|
2246
|
+
type Command = CoreCommand | LocalCommand;
|
|
2246
2247
|
/**
|
|
2247
2248
|
* Holds the result of a command dispatch.
|
|
2248
2249
|
* The command may have been successfully dispatched or cancelled
|
|
@@ -2262,7 +2263,7 @@ declare class DispatchResult {
|
|
|
2262
2263
|
*/
|
|
2263
2264
|
isCancelledBecause(reason: CancelledReason): boolean;
|
|
2264
2265
|
}
|
|
2265
|
-
|
|
2266
|
+
type CancelledReason = Exclude<CommandResult, CommandResult.Success>;
|
|
2266
2267
|
declare const enum CommandResult {
|
|
2267
2268
|
Success = 0,
|
|
2268
2269
|
CancelledForUnknownReason = 1,
|
|
@@ -2386,26 +2387,26 @@ interface CoreCommandDispatcher {
|
|
|
2386
2387
|
type: T;
|
|
2387
2388
|
}>>(type: T, r: Omit<C, "type">): DispatchResult;
|
|
2388
2389
|
}
|
|
2389
|
-
|
|
2390
|
-
|
|
2390
|
+
type CommandTypes = Command["type"];
|
|
2391
|
+
type CoreCommandTypes = CoreCommand["type"];
|
|
2391
2392
|
|
|
2392
2393
|
/**
|
|
2393
2394
|
* The following type is meant to be used in union with other aliases to prevent
|
|
2394
2395
|
* Intellisense from resolving it.
|
|
2395
2396
|
* See https://github.com/microsoft/TypeScript/issues/31940#issuecomment-841712377
|
|
2396
2397
|
*/
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2398
|
+
type Alias = {} & {};
|
|
2399
|
+
type HeaderIndex = number & Alias;
|
|
2400
|
+
type Pixel = number & Alias;
|
|
2401
|
+
type UID = string & Alias;
|
|
2402
|
+
type SetDecimalStep = 1 | -1;
|
|
2403
|
+
type FilterId = UID & Alias;
|
|
2404
|
+
type FilterTableId = UID & Alias;
|
|
2404
2405
|
/**
|
|
2405
2406
|
* CSS style color string
|
|
2406
2407
|
* e.g. "#ABC", "#AAAFFF", "rgb(30, 80, 16)"
|
|
2407
2408
|
*/
|
|
2408
|
-
|
|
2409
|
+
type Color = string & Alias;
|
|
2409
2410
|
interface RGBA {
|
|
2410
2411
|
a: number;
|
|
2411
2412
|
r: number;
|
|
@@ -2447,9 +2448,9 @@ interface ZoneDimension {
|
|
|
2447
2448
|
numberOfRows: HeaderIndex;
|
|
2448
2449
|
numberOfCols: HeaderIndex;
|
|
2449
2450
|
}
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2451
|
+
type Align = "left" | "right" | "center" | undefined;
|
|
2452
|
+
type VerticalAlign = "top" | "middle" | "bottom" | undefined;
|
|
2453
|
+
type Wrapping = "overflow" | "wrap" | "clip" | undefined;
|
|
2453
2454
|
interface Style {
|
|
2454
2455
|
bold?: boolean;
|
|
2455
2456
|
italic?: boolean;
|
|
@@ -2483,15 +2484,15 @@ interface CellPosition {
|
|
|
2483
2484
|
sheetId: UID;
|
|
2484
2485
|
}
|
|
2485
2486
|
declare const borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
|
|
2486
|
-
|
|
2487
|
-
|
|
2487
|
+
type BorderStyle = typeof borderStyles[number];
|
|
2488
|
+
type BorderDescr = {
|
|
2488
2489
|
style: BorderStyle;
|
|
2489
2490
|
color: Color;
|
|
2490
2491
|
};
|
|
2491
2492
|
/**
|
|
2492
2493
|
* A complete border(s) data is a set of position-color-style information
|
|
2493
2494
|
*/
|
|
2494
|
-
|
|
2495
|
+
type BorderData = {
|
|
2495
2496
|
position: BorderPosition;
|
|
2496
2497
|
color?: Color;
|
|
2497
2498
|
style?: BorderStyle;
|
|
@@ -2502,27 +2503,27 @@ interface Border$1 {
|
|
|
2502
2503
|
bottom?: BorderDescr;
|
|
2503
2504
|
right?: BorderDescr;
|
|
2504
2505
|
}
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2506
|
+
type ReferenceDenormalizer = (range: Range, isMeta: boolean, functionName: string, paramNumber: number) => any | any[][];
|
|
2507
|
+
type EnsureRange = (range: Range) => any[][];
|
|
2508
|
+
type _CompiledFormula = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => FormulaReturn;
|
|
2508
2509
|
interface CompiledFormula {
|
|
2509
2510
|
execute: _CompiledFormula;
|
|
2510
2511
|
tokens: Token[];
|
|
2511
2512
|
dependencies: string[];
|
|
2512
2513
|
}
|
|
2513
|
-
|
|
2514
|
-
|
|
2514
|
+
type Arg = MatrixArg | PrimitiveArg;
|
|
2515
|
+
type MatrixArg = ({
|
|
2515
2516
|
value: CellValue;
|
|
2516
2517
|
format?: Format;
|
|
2517
2518
|
} | undefined)[][];
|
|
2518
|
-
|
|
2519
|
+
type PrimitiveArg = {
|
|
2519
2520
|
value: PrimitiveArgValue;
|
|
2520
2521
|
format?: Format;
|
|
2521
2522
|
};
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2523
|
+
type ArgValue = PrimitiveArgValue | MatrixArgValue;
|
|
2524
|
+
type MatrixArgValue = (CellValue | undefined)[][];
|
|
2525
|
+
type PrimitiveArgValue = string | number | boolean | null;
|
|
2526
|
+
type FunctionReturn = {
|
|
2526
2527
|
value: FunctionReturnValue;
|
|
2527
2528
|
format?: Format;
|
|
2528
2529
|
};
|
|
@@ -2530,7 +2531,7 @@ interface FormulaReturn extends Omit<FunctionReturn, "value"> {
|
|
|
2530
2531
|
value: FunctionReturnValue | null;
|
|
2531
2532
|
format?: Format;
|
|
2532
2533
|
}
|
|
2533
|
-
|
|
2534
|
+
type FunctionReturnValue = string | number | boolean;
|
|
2534
2535
|
interface HeaderDimensions {
|
|
2535
2536
|
start: Pixel;
|
|
2536
2537
|
size: Pixel;
|
|
@@ -2562,8 +2563,8 @@ interface PaneDivision {
|
|
|
2562
2563
|
/** Represents the number of frozen rows */
|
|
2563
2564
|
ySplit: number;
|
|
2564
2565
|
}
|
|
2565
|
-
|
|
2566
|
-
|
|
2566
|
+
type BorderPosition = "all" | "hv" | "h" | "v" | "external" | "left" | "top" | "right" | "bottom" | "clear";
|
|
2567
|
+
type BorderDescription = {
|
|
2567
2568
|
vertical?: BorderDescr;
|
|
2568
2569
|
horizontal?: BorderDescr;
|
|
2569
2570
|
} | undefined;
|
|
@@ -2573,24 +2574,24 @@ declare const enum DIRECTION {
|
|
|
2573
2574
|
LEFT = "left",
|
|
2574
2575
|
RIGHT = "right"
|
|
2575
2576
|
}
|
|
2576
|
-
|
|
2577
|
-
|
|
2577
|
+
type ChangeType = "REMOVE" | "RESIZE" | "MOVE" | "CHANGE" | "NONE";
|
|
2578
|
+
type ApplyRangeChangeResult = {
|
|
2578
2579
|
changeType: Exclude<ChangeType, "NONE">;
|
|
2579
2580
|
range: Range;
|
|
2580
2581
|
} | {
|
|
2581
2582
|
changeType: "NONE";
|
|
2582
2583
|
};
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2584
|
+
type ApplyRangeChange = (range: Range) => ApplyRangeChangeResult;
|
|
2585
|
+
type Dimension = "COL" | "ROW";
|
|
2586
|
+
type ConsecutiveIndexes = HeaderIndex[];
|
|
2586
2587
|
interface RangeProvider {
|
|
2587
2588
|
adaptRanges: (applyChange: ApplyRangeChange, sheetId?: UID) => void;
|
|
2588
2589
|
}
|
|
2589
|
-
|
|
2590
|
+
type Validation<T> = (toValidate: T) => CommandResult | CommandResult[];
|
|
2590
2591
|
/**
|
|
2591
2592
|
* Return the prop's type of a component
|
|
2592
2593
|
*/
|
|
2593
|
-
|
|
2594
|
+
type PropsOf<C> = C extends ComponentConstructor<infer Props> ? Props : never;
|
|
2594
2595
|
/**
|
|
2595
2596
|
* Container for a lazy computed value
|
|
2596
2597
|
*/
|
|
@@ -2616,7 +2617,7 @@ interface Lazy<T> {
|
|
|
2616
2617
|
interface Cloneable<T> {
|
|
2617
2618
|
clone: (args?: Partial<T>) => T;
|
|
2618
2619
|
}
|
|
2619
|
-
|
|
2620
|
+
type CSSProperties<P extends string = string> = Record<P, string | undefined>;
|
|
2620
2621
|
interface SortOptions {
|
|
2621
2622
|
/** If true sort the headers of the range along with the rest */
|
|
2622
2623
|
sortHeaders?: boolean;
|
|
@@ -2627,8 +2628,8 @@ interface MenuMouseEvent extends MouseEvent {
|
|
|
2627
2628
|
closedMenuId?: UID;
|
|
2628
2629
|
}
|
|
2629
2630
|
|
|
2630
|
-
|
|
2631
|
-
|
|
2631
|
+
type Format = string & Alias;
|
|
2632
|
+
type FormattedValue = string & Alias;
|
|
2632
2633
|
|
|
2633
2634
|
interface CellAttributes {
|
|
2634
2635
|
readonly id: UID;
|
|
@@ -2647,7 +2648,7 @@ interface FormulaCell extends CellAttributes {
|
|
|
2647
2648
|
readonly compiledFormula: CompiledFormula;
|
|
2648
2649
|
readonly dependencies: Range[];
|
|
2649
2650
|
}
|
|
2650
|
-
|
|
2651
|
+
type Cell = LiteralCell | FormulaCell;
|
|
2651
2652
|
interface EvaluatedCellProperties {
|
|
2652
2653
|
readonly format?: Format;
|
|
2653
2654
|
/**
|
|
@@ -2661,8 +2662,8 @@ interface EvaluatedCellProperties {
|
|
|
2661
2662
|
readonly isAutoSummable: boolean;
|
|
2662
2663
|
readonly link?: Link;
|
|
2663
2664
|
}
|
|
2664
|
-
|
|
2665
|
-
|
|
2665
|
+
type CellValue = string | number | boolean;
|
|
2666
|
+
type EvaluatedCell = NumberCell | TextCell | BooleanCell | EmptyCell | ErrorCell;
|
|
2666
2667
|
interface NumberCell extends EvaluatedCellProperties {
|
|
2667
2668
|
readonly type: CellValueType.number;
|
|
2668
2669
|
readonly value: number;
|
|
@@ -2722,7 +2723,7 @@ interface FormulaModifier {
|
|
|
2722
2723
|
increment: number;
|
|
2723
2724
|
current: number;
|
|
2724
2725
|
}
|
|
2725
|
-
|
|
2726
|
+
type AutofillModifier = IncrementModifier | AlphanumericIncrementModifier | CopyModifier | FormulaModifier;
|
|
2726
2727
|
interface Tooltip {
|
|
2727
2728
|
props: any;
|
|
2728
2729
|
component?: any;
|
|
@@ -2763,7 +2764,7 @@ interface Currency {
|
|
|
2763
2764
|
position: "before" | "after";
|
|
2764
2765
|
}
|
|
2765
2766
|
|
|
2766
|
-
|
|
2767
|
+
type ClipboardReadResult = {
|
|
2767
2768
|
status: "ok";
|
|
2768
2769
|
content: string;
|
|
2769
2770
|
} | {
|
|
@@ -2775,7 +2776,7 @@ interface ClipboardInterface {
|
|
|
2775
2776
|
readText(): Promise<ClipboardReadResult>;
|
|
2776
2777
|
}
|
|
2777
2778
|
|
|
2778
|
-
|
|
2779
|
+
type TranslationFunction = (string: string, ...values: string[] | [{
|
|
2779
2780
|
[key: string]: string;
|
|
2780
2781
|
}]) => string;
|
|
2781
2782
|
/***
|
|
@@ -2810,7 +2811,7 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
|
|
|
2810
2811
|
loadCurrencies?: () => Promise<Currency[]>;
|
|
2811
2812
|
}
|
|
2812
2813
|
|
|
2813
|
-
|
|
2814
|
+
type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "META";
|
|
2814
2815
|
interface ArgDefinition {
|
|
2815
2816
|
repeating?: boolean;
|
|
2816
2817
|
optional?: boolean;
|
|
@@ -2821,8 +2822,8 @@ interface ArgDefinition {
|
|
|
2821
2822
|
default?: boolean;
|
|
2822
2823
|
defaultValue?: any;
|
|
2823
2824
|
}
|
|
2824
|
-
|
|
2825
|
-
|
|
2825
|
+
type ComputeFunctionArg<T> = T | (() => T) | undefined;
|
|
2826
|
+
type ComputeFunction<T, R> = (this: EvalContext, ...args: ComputeFunctionArg<T>[]) => R;
|
|
2826
2827
|
interface AddFunctionDescription {
|
|
2827
2828
|
description: string;
|
|
2828
2829
|
compute: ComputeFunction<ArgValue, FunctionReturnValue>;
|
|
@@ -2839,7 +2840,7 @@ interface FunctionDescription extends AddFunctionDescription {
|
|
|
2839
2840
|
nbrArgRepeating: number;
|
|
2840
2841
|
getArgToFocus: (argPosition: number) => number;
|
|
2841
2842
|
}
|
|
2842
|
-
|
|
2843
|
+
type EvalContext = {
|
|
2843
2844
|
__lastFnCalled?: string;
|
|
2844
2845
|
__originCellXC?: () => string;
|
|
2845
2846
|
[key: string]: any;
|
|
@@ -3463,7 +3464,7 @@ declare class ImagePlugin extends CorePlugin<ImageState> implements ImageState {
|
|
|
3463
3464
|
private getAllImages;
|
|
3464
3465
|
}
|
|
3465
3466
|
|
|
3466
|
-
|
|
3467
|
+
type SheetMergeCellMap = Record<number, Record<number, number | undefined> | undefined>;
|
|
3467
3468
|
interface MergeState {
|
|
3468
3469
|
readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
|
|
3469
3470
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
@@ -3918,7 +3919,7 @@ declare class InternalViewport {
|
|
|
3918
3919
|
private adjustViewportZoneY;
|
|
3919
3920
|
}
|
|
3920
3921
|
|
|
3921
|
-
|
|
3922
|
+
type SheetViewports = {
|
|
3922
3923
|
topLeft: InternalViewport | undefined;
|
|
3923
3924
|
bottomLeft: InternalViewport | undefined;
|
|
3924
3925
|
topRight: InternalViewport | undefined;
|
|
@@ -4752,46 +4753,46 @@ declare class GridSelectionPlugin extends UIPlugin {
|
|
|
4752
4753
|
* This can be generalized because the union of all indices `0 | 1 | 2 | 3 | ...`
|
|
4753
4754
|
* is actually the type `number`.
|
|
4754
4755
|
*/
|
|
4755
|
-
|
|
4756
|
+
type GetterNames<Plugin extends {
|
|
4756
4757
|
getters: readonly string[];
|
|
4757
4758
|
}> = Plugin["getters"][number];
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4759
|
+
type SheetGetters = Pick<SheetPlugin, GetterNames<typeof SheetPlugin>>;
|
|
4760
|
+
type HeaderSizeGetters = Pick<HeaderSizePlugin, GetterNames<typeof HeaderSizePlugin>>;
|
|
4761
|
+
type HeaderVisibilityGetters = Pick<HeaderVisibilityPlugin, GetterNames<typeof HeaderVisibilityPlugin>>;
|
|
4762
|
+
type CellGetters = Pick<CellPlugin, GetterNames<typeof CellPlugin>>;
|
|
4763
|
+
type MergeGetters = Pick<MergePlugin, GetterNames<typeof MergePlugin>>;
|
|
4764
|
+
type BordersGetters = Pick<BordersPlugin, GetterNames<typeof BordersPlugin>>;
|
|
4765
|
+
type ChartGetters = Pick<ChartPlugin, GetterNames<typeof ChartPlugin>>;
|
|
4766
|
+
type ImageGetters = Pick<ImagePlugin, GetterNames<typeof ImagePlugin>>;
|
|
4767
|
+
type FigureGetters = Pick<FigurePlugin, GetterNames<typeof FigurePlugin>>;
|
|
4768
|
+
type RangeAdapterGetters = Pick<RangeAdapter, GetterNames<typeof RangeAdapter>>;
|
|
4769
|
+
type ConditionalFormatGetters = Pick<ConditionalFormatPlugin, GetterNames<typeof ConditionalFormatPlugin>>;
|
|
4770
|
+
type LocalHistoryGetters = Pick<HistoryPlugin, GetterNames<typeof HistoryPlugin>>;
|
|
4771
|
+
type FiltersGetters = Pick<FiltersPlugin, GetterNames<typeof FiltersPlugin>>;
|
|
4772
|
+
type CoreGetters = SheetGetters & HeaderSizeGetters & HeaderVisibilityGetters & CellGetters & MergeGetters & BordersGetters & ChartGetters & ImageGetters & ConditionalFormatGetters & FigureGetters & RangeAdapterGetters & FiltersGetters;
|
|
4773
|
+
type AutofillGetters = Pick<AutofillPlugin, GetterNames<typeof AutofillPlugin>>;
|
|
4774
|
+
type AutomaticSumGetters = Pick<AutomaticSumPlugin, GetterNames<typeof AutomaticSumPlugin>>;
|
|
4775
|
+
type ClipboardGetters = Pick<ClipboardPlugin, GetterNames<typeof ClipboardPlugin>>;
|
|
4776
|
+
type EditionGetters = Pick<EditionPlugin, GetterNames<typeof EditionPlugin>>;
|
|
4777
|
+
type EvaluationGetters = Pick<EvaluationPlugin, GetterNames<typeof EvaluationPlugin>>;
|
|
4778
|
+
type EvaluationChartGetters = Pick<EvaluationChartPlugin, GetterNames<typeof EvaluationChartPlugin>>;
|
|
4779
|
+
type EvaluationConditionalFormatGetters = Pick<EvaluationConditionalFormatPlugin, GetterNames<typeof EvaluationConditionalFormatPlugin>>;
|
|
4780
|
+
type FindAndReplaceGetters = Pick<FindAndReplacePlugin, GetterNames<typeof FindAndReplacePlugin>>;
|
|
4781
|
+
type HeaderVisibilityIUIGetters = Pick<HeaderVisibilityUIPlugin, GetterNames<typeof HeaderVisibilityUIPlugin>>;
|
|
4782
|
+
type HighlightGetters = Pick<HighlightPlugin, GetterNames<typeof HighlightPlugin>>;
|
|
4783
|
+
type CustomColorsGetters = Pick<CustomColorsPlugin, GetterNames<typeof CustomColorsPlugin>>;
|
|
4784
|
+
type RendererGetters = Pick<RendererPlugin, GetterNames<typeof RendererPlugin>>;
|
|
4785
|
+
type SelectionGetters = Pick<GridSelectionPlugin, GetterNames<typeof GridSelectionPlugin>>;
|
|
4786
|
+
type SelectionInputGetters = Pick<SelectionInputsManagerPlugin, GetterNames<typeof SelectionInputsManagerPlugin>>;
|
|
4787
|
+
type CollaborativeGetters = Pick<CollaborativePlugin, GetterNames<typeof CollaborativePlugin>>;
|
|
4788
|
+
type SortGetters = Pick<SortPlugin, GetterNames<typeof SortPlugin>>;
|
|
4789
|
+
type UIOptionsGetters = Pick<UIOptionsPlugin, GetterNames<typeof UIOptionsPlugin>>;
|
|
4790
|
+
type SheetUIGetters = Pick<SheetUIPlugin, GetterNames<typeof SheetUIPlugin>>;
|
|
4791
|
+
type ViewportGetters = Pick<SheetViewPlugin, GetterNames<typeof SheetViewPlugin>>;
|
|
4792
|
+
type CellPopoverPluginGetters = Pick<CellPopoverPlugin, GetterNames<typeof CellPopoverPlugin>>;
|
|
4793
|
+
type FilterEvaluationGetters = Pick<FilterEvaluationPlugin, GetterNames<typeof FilterEvaluationPlugin>>;
|
|
4794
|
+
type SplitToColumnsGetters = Pick<SplitToColumnsPlugin, GetterNames<typeof SplitToColumnsPlugin>>;
|
|
4795
|
+
type Getters = {
|
|
4795
4796
|
isReadonly: () => boolean;
|
|
4796
4797
|
isDashboard: () => boolean;
|
|
4797
4798
|
} & LocalHistoryGetters & CoreGetters & AutofillGetters & AutomaticSumGetters & ClipboardGetters & EditionGetters & EvaluationGetters & EvaluationChartGetters & EvaluationConditionalFormatGetters & FindAndReplaceGetters & HighlightGetters & CustomColorsGetters & RendererGetters & SelectionGetters & SelectionInputGetters & CollaborativeGetters & SortGetters & UIOptionsGetters & SheetUIGetters & ViewportGetters & CellPopoverPluginGetters & FilterEvaluationGetters & HeaderVisibilityIUIGetters & SplitToColumnsGetters;
|
|
@@ -4810,7 +4811,7 @@ interface WorkbookHistory<Plugin> {
|
|
|
4810
4811
|
update<T extends keyof Plugin, U extends keyof NonNullable<Plugin[T]>, K extends keyof NonNullable<NonNullable<Plugin[T]>[U]>, V extends keyof NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>, W extends keyof NonNullable<NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>[V]>>(key1: T, key2: U, key3: K, key4: V, key5: W, val: NonNullable<NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>[V]>[W]): void;
|
|
4811
4812
|
update<T extends keyof Plugin, U extends keyof NonNullable<Plugin[T]>, K extends keyof NonNullable<NonNullable<Plugin[T]>[U]>, V extends keyof NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>, W extends keyof NonNullable<NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>[V]>, Y extends keyof NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>[V]>[W]>>(key1: T, key2: U, key3: K, key4: V, key5: W, key6: Y, val: NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<Plugin[T]>[U]>[K]>[V]>[W]>[Y]): void;
|
|
4812
4813
|
}
|
|
4813
|
-
|
|
4814
|
+
type Transformation<T = unknown> = (dataToTransform: T) => T;
|
|
4814
4815
|
interface TransformationFactory<T = unknown> {
|
|
4815
4816
|
/**
|
|
4816
4817
|
* Build a transformation function to transform any operation as if the execution of
|
|
@@ -4824,12 +4825,12 @@ interface TransformationFactory<T = unknown> {
|
|
|
4824
4825
|
with: (operation: T) => Transformation<T>;
|
|
4825
4826
|
}
|
|
4826
4827
|
|
|
4827
|
-
|
|
4828
|
-
|
|
4828
|
+
type SelectionDirection = "up" | "down" | "left" | "right";
|
|
4829
|
+
type SelectionStep = number | "end";
|
|
4829
4830
|
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4831
|
+
type CellPopoverType = "ErrorToolTip" | "LinkDisplay" | "FilterMenu" | "LinkEditor";
|
|
4832
|
+
type PopoverPropsPosition = "TopRight" | "BottomLeft";
|
|
4833
|
+
type MaxSizedComponentConstructor = ComponentConstructor & {
|
|
4833
4834
|
maxSize?: {
|
|
4834
4835
|
maxWidth?: number;
|
|
4835
4836
|
maxHeight?: number;
|
|
@@ -4839,7 +4840,7 @@ declare type MaxSizedComponentConstructor = ComponentConstructor & {
|
|
|
4839
4840
|
* If the cell at the given position have an associated component (linkDisplay, errorTooltip, ...),
|
|
4840
4841
|
* returns the parameters to display the component
|
|
4841
4842
|
*/
|
|
4842
|
-
|
|
4843
|
+
type CellPopoverBuilder = (position: CellPosition, getters: Getters) => CellPopoverComponent<MaxSizedComponentConstructor>;
|
|
4843
4844
|
interface PopoverBuilders {
|
|
4844
4845
|
onOpen?: CellPopoverBuilder;
|
|
4845
4846
|
onHover?: CellPopoverBuilder;
|
|
@@ -4852,14 +4853,14 @@ interface ClosedCellPopover {
|
|
|
4852
4853
|
* i.e. which component class, which props and where to
|
|
4853
4854
|
* display it relative to the cell
|
|
4854
4855
|
*/
|
|
4855
|
-
|
|
4856
|
+
type OpenCellPopover<C extends ComponentConstructor> = {
|
|
4856
4857
|
isOpen: true;
|
|
4857
4858
|
Component: C;
|
|
4858
4859
|
props: PropsOf<C>;
|
|
4859
4860
|
cellCorner: PopoverPropsPosition;
|
|
4860
4861
|
};
|
|
4861
|
-
|
|
4862
|
-
|
|
4862
|
+
type CellPopoverComponent<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = ClosedCellPopover | OpenCellPopover<C>;
|
|
4863
|
+
type PositionedCellPopover<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = {
|
|
4863
4864
|
isOpen: true;
|
|
4864
4865
|
Component: C;
|
|
4865
4866
|
props: PropsOf<C>;
|
|
@@ -4928,7 +4929,7 @@ interface LinkSpec {
|
|
|
4928
4929
|
declare function urlRepresentation(link: Link, getters: Getters): string;
|
|
4929
4930
|
declare function openLink(link: Link, env: SpreadsheetChildEnv): void;
|
|
4930
4931
|
|
|
4931
|
-
|
|
4932
|
+
type TransformationFunction<U extends CoreCommandTypes, V extends CoreCommandTypes> = (toTransform: Extract<CoreCommand, {
|
|
4932
4933
|
type: U;
|
|
4933
4934
|
}>, executed: Extract<CoreCommand, {
|
|
4934
4935
|
type: V;
|
|
@@ -5208,7 +5209,7 @@ declare class GaugeChartConfigPanel extends Component<Props$z, SpreadsheetChildE
|
|
|
5208
5209
|
updateDataRange(): void;
|
|
5209
5210
|
}
|
|
5210
5211
|
|
|
5211
|
-
|
|
5212
|
+
type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
|
|
5212
5213
|
interface Props$y {
|
|
5213
5214
|
figureId: UID;
|
|
5214
5215
|
definition: GaugeChartDefinition;
|
|
@@ -5269,7 +5270,7 @@ declare class ScorecardChartConfigPanel extends Component<Props$x, SpreadsheetCh
|
|
|
5269
5270
|
updateBaselineMode(ev: any): void;
|
|
5270
5271
|
}
|
|
5271
5272
|
|
|
5272
|
-
|
|
5273
|
+
type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
|
|
5273
5274
|
interface Props$w {
|
|
5274
5275
|
figureId: UID;
|
|
5275
5276
|
definition: ScorecardChartDefinition;
|
|
@@ -5361,8 +5362,8 @@ interface Action {
|
|
|
5361
5362
|
separator: boolean;
|
|
5362
5363
|
textColor?: Color;
|
|
5363
5364
|
}
|
|
5364
|
-
|
|
5365
|
-
|
|
5365
|
+
type ActionBuilder = (env: SpreadsheetChildEnv) => ActionSpec[];
|
|
5366
|
+
type ActionChildren = (ActionSpec | ActionBuilder)[];
|
|
5366
5367
|
|
|
5367
5368
|
/**
|
|
5368
5369
|
* This registry is intended to map a type of figure (tag) to a class of
|
|
@@ -5465,7 +5466,7 @@ declare class ScorecardChart extends Component<Props$u, SpreadsheetChildEnv> {
|
|
|
5465
5466
|
private getWidestElement;
|
|
5466
5467
|
}
|
|
5467
5468
|
|
|
5468
|
-
|
|
5469
|
+
type MenuItemOrSeparator = Action | "separator";
|
|
5469
5470
|
interface Props$t {
|
|
5470
5471
|
position: DOMCoordinates;
|
|
5471
5472
|
menuItems: Action[];
|
|
@@ -5519,7 +5520,7 @@ declare class Menu extends Component<Props$t, SpreadsheetChildEnv> {
|
|
|
5519
5520
|
onMouseOver(menu: Action, position: Pixel, ev: MouseEvent): void;
|
|
5520
5521
|
}
|
|
5521
5522
|
|
|
5522
|
-
|
|
5523
|
+
type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
|
|
5523
5524
|
interface Props$s {
|
|
5524
5525
|
figure: Figure;
|
|
5525
5526
|
style: string;
|
|
@@ -5804,8 +5805,8 @@ declare class FilterIconsOverlay extends Component<Props$l, SpreadsheetChildEnv>
|
|
|
5804
5805
|
private isPositionVisible;
|
|
5805
5806
|
}
|
|
5806
5807
|
|
|
5807
|
-
|
|
5808
|
-
|
|
5808
|
+
type HFigureAxisType = "top" | "bottom" | "vCenter";
|
|
5809
|
+
type VFigureAxisType = "right" | "left" | "hCenter";
|
|
5809
5810
|
interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
5810
5811
|
matchedFigIds: UID[];
|
|
5811
5812
|
snapOffset: number;
|
|
@@ -5813,7 +5814,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
|
5813
5814
|
position: Pixel;
|
|
5814
5815
|
}
|
|
5815
5816
|
|
|
5816
|
-
|
|
5817
|
+
type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
|
|
5817
5818
|
interface Props$k {
|
|
5818
5819
|
onFigureDeleted: () => void;
|
|
5819
5820
|
}
|
|
@@ -5975,7 +5976,7 @@ declare class GridPopover extends Component<Props$i, SpreadsheetChildEnv> {
|
|
|
5975
5976
|
get cellPopover(): PositionedCellPopover | ClosedCellPopover;
|
|
5976
5977
|
}
|
|
5977
5978
|
|
|
5978
|
-
|
|
5979
|
+
type ScrollDirection = "horizontal" | "vertical";
|
|
5979
5980
|
|
|
5980
5981
|
interface Props$h {
|
|
5981
5982
|
width: Pixel;
|
|
@@ -6367,7 +6368,7 @@ declare class ActionButton extends Component<Props$c, SpreadsheetChildEnv> {
|
|
|
6367
6368
|
get buttonStyle(): string;
|
|
6368
6369
|
}
|
|
6369
6370
|
|
|
6370
|
-
|
|
6371
|
+
type Tool = "borderColorTool" | "borderTypeTool";
|
|
6371
6372
|
interface State$3 {
|
|
6372
6373
|
activeTool: Tool | undefined;
|
|
6373
6374
|
}
|
|
@@ -6512,7 +6513,7 @@ declare class FunctionDescriptionProvider extends Component<Props$9> {
|
|
|
6512
6513
|
onMouseMove(): void;
|
|
6513
6514
|
}
|
|
6514
6515
|
|
|
6515
|
-
|
|
6516
|
+
type HtmlContent = {
|
|
6516
6517
|
value: string;
|
|
6517
6518
|
color?: Color;
|
|
6518
6519
|
class?: string;
|
|
@@ -6578,6 +6579,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6578
6579
|
onCompositionStart(): void;
|
|
6579
6580
|
onCompositionEnd(): void;
|
|
6580
6581
|
onKeydown(ev: KeyboardEvent): void;
|
|
6582
|
+
private updateCursorIfNeeded;
|
|
6581
6583
|
onInput(): void;
|
|
6582
6584
|
onKeyup(ev: KeyboardEvent): void;
|
|
6583
6585
|
showAutocomplete(searchTerm: string): void;
|
|
@@ -6625,6 +6627,7 @@ interface State$1 {
|
|
|
6625
6627
|
interface Props$7 {
|
|
6626
6628
|
onToggle: () => void;
|
|
6627
6629
|
dropdownStyle: string;
|
|
6630
|
+
class: string;
|
|
6628
6631
|
}
|
|
6629
6632
|
declare class FontSizeEditor extends Component<Props$7, SpreadsheetChildEnv> {
|
|
6630
6633
|
static template: string;
|
|
@@ -6693,7 +6696,7 @@ declare class TopBar extends Component<Props$6, SpreadsheetChildEnv> {
|
|
|
6693
6696
|
setColor(target: string, color: Color): void;
|
|
6694
6697
|
}
|
|
6695
6698
|
|
|
6696
|
-
|
|
6699
|
+
type ComposerFocusType = "inactive" | "cellFocus" | "contentFocus";
|
|
6697
6700
|
interface SpreadsheetProps {
|
|
6698
6701
|
model: Model;
|
|
6699
6702
|
}
|
|
@@ -6884,7 +6887,7 @@ declare class HeadersOverlay extends Component<any, SpreadsheetChildEnv> {
|
|
|
6884
6887
|
selectAll(): void;
|
|
6885
6888
|
}
|
|
6886
6889
|
|
|
6887
|
-
|
|
6890
|
+
type Orientation$1 = "n" | "s" | "w" | "e";
|
|
6888
6891
|
interface Props$4 {
|
|
6889
6892
|
zone: Zone;
|
|
6890
6893
|
orientation: Orientation$1;
|
|
@@ -6897,7 +6900,7 @@ declare class Border extends Component<Props$4, SpreadsheetChildEnv> {
|
|
|
6897
6900
|
onMouseDown(ev: MouseEvent): void;
|
|
6898
6901
|
}
|
|
6899
6902
|
|
|
6900
|
-
|
|
6903
|
+
type Orientation = "nw" | "ne" | "sw" | "se";
|
|
6901
6904
|
interface Props$3 {
|
|
6902
6905
|
zone: Zone;
|
|
6903
6906
|
color: Color;
|
|
@@ -6941,7 +6944,7 @@ declare class Highlight extends Component<Props$2, SpreadsheetChildEnv> {
|
|
|
6941
6944
|
* - a horizontal resizer (to resize columns)
|
|
6942
6945
|
* - a vertical resizer (same, for rows)
|
|
6943
6946
|
*/
|
|
6944
|
-
|
|
6947
|
+
type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER";
|
|
6945
6948
|
interface Props$1 {
|
|
6946
6949
|
sidePanelIsOpen: boolean;
|
|
6947
6950
|
exposeFocus: (focus: () => void) => void;
|