@odoo/o-spreadsheet 16.2.9 → 16.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/o-spreadsheet.cjs.js +48 -37
- package/dist/o-spreadsheet.d.ts +163 -161
- package/dist/o-spreadsheet.esm.js +48 -37
- package/dist/o-spreadsheet.iife.js +48 -37
- package/dist/o-spreadsheet.iife.min.js +243 -242
- package/package.json +4 -4
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;
|
|
@@ -314,7 +314,7 @@ interface HeadersSelected extends SelectionEventPayload {
|
|
|
314
314
|
interface AlterZone extends SelectionEventPayload {
|
|
315
315
|
type: "AlterZone";
|
|
316
316
|
}
|
|
317
|
-
|
|
317
|
+
type SelectionEvent = Readonly<ZonesSelected | HeadersSelected | AlterZone>;
|
|
318
318
|
|
|
319
319
|
interface StreamCallbacks<Event> {
|
|
320
320
|
handleEvent: (event: Event) => void;
|
|
@@ -323,7 +323,7 @@ interface StreamCallbacks<Event> {
|
|
|
323
323
|
release?: () => void;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
|
|
326
|
+
type StatefulStream<Event, State> = {
|
|
327
327
|
capture(owner: unknown, state: State, callbacks: StreamCallbacks<Event>): void;
|
|
328
328
|
registerAsDefault: (owner: unknown, state: State, callbacks: StreamCallbacks<Event>) => void;
|
|
329
329
|
resetDefaultAnchor: (owner: unknown, state: State) => void;
|
|
@@ -348,9 +348,9 @@ interface SelectionProcessor {
|
|
|
348
348
|
loopSelection(): DispatchResult;
|
|
349
349
|
selectTableAroundSelection(): DispatchResult;
|
|
350
350
|
}
|
|
351
|
-
|
|
351
|
+
type SelectionStreamProcessor = SelectionProcessor & StatefulStream<SelectionEvent, AnchorZone>;
|
|
352
352
|
|
|
353
|
-
|
|
353
|
+
type XLSXExportFile = XLSXExportImageFile | XLSXExportXMLFile;
|
|
354
354
|
interface XLSXExportXMLFile {
|
|
355
355
|
path: string;
|
|
356
356
|
content: string;
|
|
@@ -369,10 +369,10 @@ interface XLSXExport {
|
|
|
369
369
|
* Note that the alpha channel goes first! AARRGGBB
|
|
370
370
|
* e.g. "1E5010" or "331E5010"
|
|
371
371
|
*/
|
|
372
|
-
|
|
372
|
+
type XlsxHexColor = string & Alias;
|
|
373
373
|
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
type VerticalAxisPosition = "left" | "right";
|
|
375
|
+
type LegendPosition = "top" | "bottom" | "left" | "right" | "none";
|
|
376
376
|
|
|
377
377
|
interface BarChartDefinition {
|
|
378
378
|
readonly type: "bar";
|
|
@@ -386,7 +386,7 @@ interface BarChartDefinition {
|
|
|
386
386
|
readonly stacked: boolean;
|
|
387
387
|
readonly aggregated?: boolean;
|
|
388
388
|
}
|
|
389
|
-
|
|
389
|
+
type BarChartRuntime = {
|
|
390
390
|
chartJsConfig: ChartConfiguration;
|
|
391
391
|
background: Color;
|
|
392
392
|
};
|
|
@@ -467,7 +467,7 @@ interface LineChartDefinition {
|
|
|
467
467
|
readonly stacked: boolean;
|
|
468
468
|
readonly aggregated?: boolean;
|
|
469
469
|
}
|
|
470
|
-
|
|
470
|
+
type LineChartRuntime = {
|
|
471
471
|
chartJsConfig: ChartConfiguration;
|
|
472
472
|
background: Color;
|
|
473
473
|
};
|
|
@@ -482,7 +482,7 @@ interface PieChartDefinition {
|
|
|
482
482
|
readonly legendPosition: LegendPosition;
|
|
483
483
|
readonly aggregated?: boolean;
|
|
484
484
|
}
|
|
485
|
-
|
|
485
|
+
type PieChartRuntime = {
|
|
486
486
|
chartJsConfig: ChartConfiguration;
|
|
487
487
|
background: Color;
|
|
488
488
|
};
|
|
@@ -498,8 +498,8 @@ interface ScorecardChartDefinition {
|
|
|
498
498
|
readonly baselineColorUp: Color;
|
|
499
499
|
readonly baselineColorDown: Color;
|
|
500
500
|
}
|
|
501
|
-
|
|
502
|
-
|
|
501
|
+
type BaselineMode = "text" | "difference" | "percentage";
|
|
502
|
+
type BaselineArrowDirection = "neutral" | "up" | "down";
|
|
503
503
|
interface ScorecardChartRuntime {
|
|
504
504
|
readonly title: string;
|
|
505
505
|
readonly keyValue: string;
|
|
@@ -513,15 +513,15 @@ interface ScorecardChartRuntime {
|
|
|
513
513
|
readonly baselineStyle?: Style;
|
|
514
514
|
}
|
|
515
515
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
516
|
+
type ChartType = "line" | "bar" | "pie" | "scorecard" | "gauge";
|
|
517
|
+
type ChartDefinition = LineChartDefinition | PieChartDefinition | BarChartDefinition | ScorecardChartDefinition | GaugeChartDefinition;
|
|
518
|
+
type ChartJSRuntime = LineChartRuntime | PieChartRuntime | BarChartRuntime | GaugeChartRuntime;
|
|
519
|
+
type ChartRuntime = ChartJSRuntime | ScorecardChartRuntime;
|
|
520
520
|
interface ExcelChartDataset {
|
|
521
521
|
readonly label?: string;
|
|
522
522
|
readonly range: string;
|
|
523
523
|
}
|
|
524
|
-
|
|
524
|
+
type ExcelChartType = "line" | "bar" | "pie";
|
|
525
525
|
interface ExcelChartDefinition {
|
|
526
526
|
readonly title?: string;
|
|
527
527
|
readonly type: ExcelChartType;
|
|
@@ -572,8 +572,8 @@ interface ConditionalFormat {
|
|
|
572
572
|
interface ConditionalFormatInternal extends Omit<ConditionalFormat, "ranges"> {
|
|
573
573
|
ranges: Range[];
|
|
574
574
|
}
|
|
575
|
-
|
|
576
|
-
|
|
575
|
+
type ConditionalFormatRule = SingleColorRules | ColorScaleRule | IconSetRule;
|
|
576
|
+
type SingleColorRules = CellIsRule;
|
|
577
577
|
interface SingleColorRule {
|
|
578
578
|
style: Style;
|
|
579
579
|
}
|
|
@@ -582,18 +582,18 @@ interface CellIsRule extends SingleColorRule {
|
|
|
582
582
|
operator: ConditionalFormattingOperatorValues;
|
|
583
583
|
values: string[];
|
|
584
584
|
}
|
|
585
|
-
|
|
586
|
-
|
|
585
|
+
type ThresholdType = "value" | "number" | "percentage" | "percentile" | "formula";
|
|
586
|
+
type ColorScaleThreshold = {
|
|
587
587
|
color: number;
|
|
588
588
|
type: ThresholdType;
|
|
589
589
|
value?: string;
|
|
590
590
|
};
|
|
591
|
-
|
|
591
|
+
type ColorScaleMidPointThreshold = {
|
|
592
592
|
color: number;
|
|
593
593
|
type: Exclude<ThresholdType, "value">;
|
|
594
594
|
value: string;
|
|
595
595
|
};
|
|
596
|
-
|
|
596
|
+
type IconThreshold = {
|
|
597
597
|
type: Exclude<ThresholdType, "value">;
|
|
598
598
|
operator: "gt" | "ge";
|
|
599
599
|
value: string;
|
|
@@ -615,8 +615,8 @@ interface IconSetRule {
|
|
|
615
615
|
upperInflectionPoint: IconThreshold;
|
|
616
616
|
lowerInflectionPoint: IconThreshold;
|
|
617
617
|
}
|
|
618
|
-
|
|
619
|
-
|
|
618
|
+
type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";
|
|
619
|
+
type UpDown = "up" | "down";
|
|
620
620
|
|
|
621
621
|
interface Figure {
|
|
622
622
|
id: UID;
|
|
@@ -630,7 +630,7 @@ interface FigureSize {
|
|
|
630
630
|
width: Pixel;
|
|
631
631
|
height: Pixel;
|
|
632
632
|
}
|
|
633
|
-
|
|
633
|
+
type ResizeDirection = -1 | 0 | 1;
|
|
634
634
|
|
|
635
635
|
interface Image {
|
|
636
636
|
path: string;
|
|
@@ -724,10 +724,11 @@ interface ExcelFilterTableData {
|
|
|
724
724
|
}
|
|
725
725
|
interface ExcelFilterData {
|
|
726
726
|
colId: number;
|
|
727
|
-
|
|
727
|
+
displayedValues: string[];
|
|
728
|
+
displayBlanks?: boolean;
|
|
728
729
|
}
|
|
729
730
|
|
|
730
|
-
|
|
731
|
+
type ClientId = string;
|
|
731
732
|
interface Client {
|
|
732
733
|
id: ClientId;
|
|
733
734
|
name: string;
|
|
@@ -773,7 +774,7 @@ interface RevisionsDroppedEvent {
|
|
|
773
774
|
interface SnapshotEvent {
|
|
774
775
|
type: "snapshot";
|
|
775
776
|
}
|
|
776
|
-
|
|
777
|
+
type CollaborativeEvent = NewLocalStateUpdateEvent | UnexpectedRevisionIdEvent | RemoteRevisionReceivedEvent | RevisionAcknowledgedEvent | RevisionUndone | RevisionRedone | RevisionsDroppedEvent | SnapshotEvent | CollaborativeEventReceived;
|
|
777
778
|
|
|
778
779
|
interface AbstractMessage {
|
|
779
780
|
version: number;
|
|
@@ -827,11 +828,11 @@ interface SnapshotCreatedMessage extends AbstractMessage {
|
|
|
827
828
|
serverRevisionId: UID;
|
|
828
829
|
nextRevisionId: UID;
|
|
829
830
|
}
|
|
830
|
-
|
|
831
|
-
|
|
831
|
+
type CollaborationMessage = RevisionUndoneMessage | RevisionRedoneMessage | RemoteRevisionMessage | SnapshotMessage | SnapshotCreatedMessage | ClientMovedMessage | ClientJoinedMessage | ClientLeftMessage;
|
|
832
|
+
type StateUpdateMessage = Extract<CollaborationMessage, {
|
|
832
833
|
nextRevisionId: UID;
|
|
833
834
|
}>;
|
|
834
|
-
|
|
835
|
+
type NewMessageCallback<T = any> = (message: T) => void;
|
|
835
836
|
/**
|
|
836
837
|
* The transport service allows to communicate between multiple clients.
|
|
837
838
|
* A client can send any message to others.
|
|
@@ -861,7 +862,7 @@ interface TransportService<T = any> {
|
|
|
861
862
|
leave: (id: UID) => void;
|
|
862
863
|
}
|
|
863
864
|
|
|
864
|
-
|
|
865
|
+
type FilePath = string;
|
|
865
866
|
/**
|
|
866
867
|
* FileStore manage the transfer of file with the server.
|
|
867
868
|
*/
|
|
@@ -914,7 +915,7 @@ interface NotifyUIEvent {
|
|
|
914
915
|
* Note that the Model can be used in a standalone way to manipulate
|
|
915
916
|
* programmatically a spreadsheet.
|
|
916
917
|
*/
|
|
917
|
-
|
|
918
|
+
type Mode = "normal" | "readonly" | "dashboard";
|
|
918
919
|
interface ModelConfig {
|
|
919
920
|
readonly mode: Mode;
|
|
920
921
|
/**
|
|
@@ -1155,7 +1156,7 @@ declare class BasePlugin<State = any, C = any> implements CommandHandler<C>, Val
|
|
|
1155
1156
|
checkValidations<T>(command: T, ...validations: Validation<T>[]): CommandResult | CommandResult[];
|
|
1156
1157
|
}
|
|
1157
1158
|
|
|
1158
|
-
|
|
1159
|
+
type UIActions = Pick<ModelConfig, "notifyUI">;
|
|
1159
1160
|
interface UIPluginConfig {
|
|
1160
1161
|
readonly getters: Getters;
|
|
1161
1162
|
readonly stateObserver: StateObserver;
|
|
@@ -1255,7 +1256,7 @@ declare class FindAndReplacePlugin extends UIPlugin {
|
|
|
1255
1256
|
drawGrid(renderingContext: GridRenderingContext): void;
|
|
1256
1257
|
}
|
|
1257
1258
|
|
|
1258
|
-
|
|
1259
|
+
type EditionMode = "editing" | "selecting" | "inactive";
|
|
1259
1260
|
interface ComposerSelection {
|
|
1260
1261
|
start: number;
|
|
1261
1262
|
end: number;
|
|
@@ -1369,12 +1370,12 @@ interface DOMDimension {
|
|
|
1369
1370
|
width: Pixel;
|
|
1370
1371
|
height: Pixel;
|
|
1371
1372
|
}
|
|
1372
|
-
|
|
1373
|
+
type Rect = DOMCoordinates & DOMDimension;
|
|
1373
1374
|
/**
|
|
1374
1375
|
* The viewport is the visible area of a sheet.
|
|
1375
1376
|
* Column and row headers are not included in the viewport.
|
|
1376
1377
|
*/
|
|
1377
|
-
|
|
1378
|
+
type Viewport = Zone & Alias;
|
|
1378
1379
|
interface SheetScrollInfo {
|
|
1379
1380
|
/**
|
|
1380
1381
|
* The offset in the X coordinate between the viewport left side and
|
|
@@ -1419,16 +1420,16 @@ interface EdgeScrollInfo {
|
|
|
1419
1420
|
direction: ScrollDirection$1;
|
|
1420
1421
|
delay: number;
|
|
1421
1422
|
}
|
|
1422
|
-
|
|
1423
|
+
type ScrollDirection$1 = 1 | 0 | -1 | "reset";
|
|
1423
1424
|
|
|
1424
1425
|
declare enum ClipboardMIMEType {
|
|
1425
1426
|
PlainText = "text/plain",
|
|
1426
1427
|
Html = "text/html"
|
|
1427
1428
|
}
|
|
1428
|
-
|
|
1429
|
+
type ClipboardContent = {
|
|
1429
1430
|
[type in ClipboardMIMEType]?: string;
|
|
1430
1431
|
};
|
|
1431
|
-
|
|
1432
|
+
type ClipboardPasteOptions = "onlyFormat" | "onlyValue";
|
|
1432
1433
|
|
|
1433
1434
|
/**
|
|
1434
1435
|
* There are two kinds of commands: CoreCommands and LocalCommands
|
|
@@ -1942,7 +1943,7 @@ interface SortCommand {
|
|
|
1942
1943
|
sortDirection: SortDirection;
|
|
1943
1944
|
sortOptions?: SortOptions;
|
|
1944
1945
|
}
|
|
1945
|
-
|
|
1946
|
+
type SortDirection = "ascending" | "descending";
|
|
1946
1947
|
interface ResizeViewportCommand {
|
|
1947
1948
|
type: "RESIZE_SHEETVIEW";
|
|
1948
1949
|
width: Pixel;
|
|
@@ -2005,7 +2006,7 @@ interface OpenCellPopoverCommand {
|
|
|
2005
2006
|
interface CloseCellPopoverCommand {
|
|
2006
2007
|
type: "CLOSE_CELL_POPOVER";
|
|
2007
2008
|
}
|
|
2008
|
-
|
|
2009
|
+
type CoreCommand =
|
|
2009
2010
|
/** CELLS */
|
|
2010
2011
|
UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContentCommand
|
|
2011
2012
|
/** GRID SHAPE */
|
|
@@ -2028,8 +2029,8 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
|
|
|
2028
2029
|
| CreateImageOverCommand
|
|
2029
2030
|
/** FILTERS */
|
|
2030
2031
|
| CreateFilterTableCommand | RemoveFilterTableCommand;
|
|
2031
|
-
|
|
2032
|
-
|
|
2032
|
+
type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | 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;
|
|
2033
|
+
type Command = CoreCommand | LocalCommand;
|
|
2033
2034
|
/**
|
|
2034
2035
|
* Holds the result of a command dispatch.
|
|
2035
2036
|
* The command may have been successfully dispatched or cancelled
|
|
@@ -2049,7 +2050,7 @@ declare class DispatchResult {
|
|
|
2049
2050
|
*/
|
|
2050
2051
|
isCancelledBecause(reason: CancelledReason): boolean;
|
|
2051
2052
|
}
|
|
2052
|
-
|
|
2053
|
+
type CancelledReason = Exclude<CommandResult, CommandResult.Success>;
|
|
2053
2054
|
declare const enum CommandResult {
|
|
2054
2055
|
Success = 0,
|
|
2055
2056
|
CancelledForUnknownReason = 1,
|
|
@@ -2162,26 +2163,26 @@ interface CoreCommandDispatcher {
|
|
|
2162
2163
|
type: T;
|
|
2163
2164
|
}>>(type: T, r: Omit<C, "type">): DispatchResult;
|
|
2164
2165
|
}
|
|
2165
|
-
|
|
2166
|
-
|
|
2166
|
+
type CommandTypes = Command["type"];
|
|
2167
|
+
type CoreCommandTypes = CoreCommand["type"];
|
|
2167
2168
|
|
|
2168
2169
|
/**
|
|
2169
2170
|
* The following type is meant to be used in union with other aliases to prevent
|
|
2170
2171
|
* Intellisense from resolving it.
|
|
2171
2172
|
* See https://github.com/microsoft/TypeScript/issues/31940#issuecomment-841712377
|
|
2172
2173
|
*/
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2174
|
+
type Alias = {} & {};
|
|
2175
|
+
type HeaderIndex = number & Alias;
|
|
2176
|
+
type Pixel = number & Alias;
|
|
2177
|
+
type UID = string & Alias;
|
|
2178
|
+
type SetDecimalStep = 1 | -1;
|
|
2179
|
+
type FilterId = UID & Alias;
|
|
2180
|
+
type FilterTableId = UID & Alias;
|
|
2180
2181
|
/**
|
|
2181
2182
|
* CSS style color string
|
|
2182
2183
|
* e.g. "#ABC", "#AAAFFF", "rgb(30, 80, 16)"
|
|
2183
2184
|
*/
|
|
2184
|
-
|
|
2185
|
+
type Color = string & Alias;
|
|
2185
2186
|
interface RGBA {
|
|
2186
2187
|
a: number;
|
|
2187
2188
|
r: number;
|
|
@@ -2223,9 +2224,9 @@ interface ZoneDimension {
|
|
|
2223
2224
|
numberOfRows: HeaderIndex;
|
|
2224
2225
|
numberOfCols: HeaderIndex;
|
|
2225
2226
|
}
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2227
|
+
type Align = "left" | "right" | "center" | undefined;
|
|
2228
|
+
type VerticalAlign = "top" | "middle" | "bottom" | undefined;
|
|
2229
|
+
type Wrapping = "overflow" | "wrap" | "clip" | undefined;
|
|
2229
2230
|
interface Style {
|
|
2230
2231
|
bold?: boolean;
|
|
2231
2232
|
italic?: boolean;
|
|
@@ -2258,35 +2259,35 @@ interface CellPosition {
|
|
|
2258
2259
|
row: HeaderIndex;
|
|
2259
2260
|
sheetId: UID;
|
|
2260
2261
|
}
|
|
2261
|
-
|
|
2262
|
-
|
|
2262
|
+
type BorderStyle = "thin" | "medium" | "thick" | "dashed" | "dotted" | "double";
|
|
2263
|
+
type BorderDescr = [BorderStyle, Color];
|
|
2263
2264
|
interface Border$1 {
|
|
2264
2265
|
top?: BorderDescr;
|
|
2265
2266
|
left?: BorderDescr;
|
|
2266
2267
|
bottom?: BorderDescr;
|
|
2267
2268
|
right?: BorderDescr;
|
|
2268
2269
|
}
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2270
|
+
type ReferenceDenormalizer = (range: Range, isMeta: boolean, functionName: string, paramNumber: number) => any | any[][];
|
|
2271
|
+
type EnsureRange = (range: Range) => any[][];
|
|
2272
|
+
type _CompiledFormula = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => FormulaReturn;
|
|
2272
2273
|
interface CompiledFormula {
|
|
2273
2274
|
execute: _CompiledFormula;
|
|
2274
2275
|
tokens: Token[];
|
|
2275
2276
|
dependencies: string[];
|
|
2276
2277
|
}
|
|
2277
|
-
|
|
2278
|
-
|
|
2278
|
+
type Arg = MatrixArg | PrimitiveArg;
|
|
2279
|
+
type MatrixArg = ({
|
|
2279
2280
|
value: CellValue;
|
|
2280
2281
|
format?: Format;
|
|
2281
2282
|
} | undefined)[][];
|
|
2282
|
-
|
|
2283
|
+
type PrimitiveArg = {
|
|
2283
2284
|
value: PrimitiveArgValue;
|
|
2284
2285
|
format?: Format;
|
|
2285
2286
|
};
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2287
|
+
type ArgValue = PrimitiveArgValue | MatrixArgValue;
|
|
2288
|
+
type MatrixArgValue = (CellValue | undefined)[][];
|
|
2289
|
+
type PrimitiveArgValue = string | number | boolean | null;
|
|
2290
|
+
type FunctionReturn = {
|
|
2290
2291
|
value: FunctionReturnValue;
|
|
2291
2292
|
format?: Format;
|
|
2292
2293
|
};
|
|
@@ -2294,7 +2295,7 @@ interface FormulaReturn extends Omit<FunctionReturn, "value"> {
|
|
|
2294
2295
|
value: FunctionReturnValue | null;
|
|
2295
2296
|
format?: Format;
|
|
2296
2297
|
}
|
|
2297
|
-
|
|
2298
|
+
type FunctionReturnValue = string | number | boolean;
|
|
2298
2299
|
interface HeaderDimensions {
|
|
2299
2300
|
start: Pixel;
|
|
2300
2301
|
size: Pixel;
|
|
@@ -2322,8 +2323,8 @@ interface PaneDivision {
|
|
|
2322
2323
|
/** Represents the number of frozen rows */
|
|
2323
2324
|
ySplit: number;
|
|
2324
2325
|
}
|
|
2325
|
-
|
|
2326
|
-
|
|
2326
|
+
type BorderCommand = "all" | "hv" | "h" | "v" | "external" | "left" | "top" | "right" | "bottom" | "clear";
|
|
2327
|
+
type BorderDescription = {
|
|
2327
2328
|
vertical?: BorderDescr;
|
|
2328
2329
|
horizontal?: BorderDescr;
|
|
2329
2330
|
} | undefined;
|
|
@@ -2333,24 +2334,24 @@ declare const enum DIRECTION {
|
|
|
2333
2334
|
LEFT = "left",
|
|
2334
2335
|
RIGHT = "right"
|
|
2335
2336
|
}
|
|
2336
|
-
|
|
2337
|
-
|
|
2337
|
+
type ChangeType = "REMOVE" | "RESIZE" | "MOVE" | "CHANGE" | "NONE";
|
|
2338
|
+
type ApplyRangeChangeResult = {
|
|
2338
2339
|
changeType: Exclude<ChangeType, "NONE">;
|
|
2339
2340
|
range: Range;
|
|
2340
2341
|
} | {
|
|
2341
2342
|
changeType: "NONE";
|
|
2342
2343
|
};
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2344
|
+
type ApplyRangeChange = (range: Range) => ApplyRangeChangeResult;
|
|
2345
|
+
type Dimension = "COL" | "ROW";
|
|
2346
|
+
type ConsecutiveIndexes = HeaderIndex[];
|
|
2346
2347
|
interface RangeProvider {
|
|
2347
2348
|
adaptRanges: (applyChange: ApplyRangeChange, sheetId?: UID) => void;
|
|
2348
2349
|
}
|
|
2349
|
-
|
|
2350
|
+
type Validation<T> = (toValidate: T) => CommandResult | CommandResult[];
|
|
2350
2351
|
/**
|
|
2351
2352
|
* Return the prop's type of a component
|
|
2352
2353
|
*/
|
|
2353
|
-
|
|
2354
|
+
type PropsOf<C> = C extends ComponentConstructor<infer Props> ? Props : never;
|
|
2354
2355
|
/**
|
|
2355
2356
|
* Container for a lazy computed value
|
|
2356
2357
|
*/
|
|
@@ -2376,7 +2377,7 @@ interface Lazy<T> {
|
|
|
2376
2377
|
interface Cloneable<T> {
|
|
2377
2378
|
clone: (args?: Partial<T>) => T;
|
|
2378
2379
|
}
|
|
2379
|
-
|
|
2380
|
+
type CSSProperties<P extends string = string> = Record<P, string | undefined>;
|
|
2380
2381
|
interface SortOptions {
|
|
2381
2382
|
/** If true sort the headers of the range along with the rest */
|
|
2382
2383
|
sortHeaders?: boolean;
|
|
@@ -2387,8 +2388,8 @@ interface MenuMouseEvent extends MouseEvent {
|
|
|
2387
2388
|
closedMenuId?: UID;
|
|
2388
2389
|
}
|
|
2389
2390
|
|
|
2390
|
-
|
|
2391
|
-
|
|
2391
|
+
type Format = string & Alias;
|
|
2392
|
+
type FormattedValue = string & Alias;
|
|
2392
2393
|
|
|
2393
2394
|
interface CellAttributes {
|
|
2394
2395
|
readonly id: UID;
|
|
@@ -2407,7 +2408,7 @@ interface FormulaCell extends CellAttributes {
|
|
|
2407
2408
|
readonly compiledFormula: CompiledFormula;
|
|
2408
2409
|
readonly dependencies: Range[];
|
|
2409
2410
|
}
|
|
2410
|
-
|
|
2411
|
+
type Cell = LiteralCell | FormulaCell;
|
|
2411
2412
|
interface EvaluatedCellProperties {
|
|
2412
2413
|
readonly format?: Format;
|
|
2413
2414
|
/**
|
|
@@ -2421,8 +2422,8 @@ interface EvaluatedCellProperties {
|
|
|
2421
2422
|
readonly isAutoSummable: boolean;
|
|
2422
2423
|
readonly link?: Link;
|
|
2423
2424
|
}
|
|
2424
|
-
|
|
2425
|
-
|
|
2425
|
+
type CellValue = string | number | boolean;
|
|
2426
|
+
type EvaluatedCell = NumberCell | TextCell | BooleanCell | EmptyCell | ErrorCell;
|
|
2426
2427
|
interface NumberCell extends EvaluatedCellProperties {
|
|
2427
2428
|
readonly type: CellValueType.number;
|
|
2428
2429
|
readonly value: number;
|
|
@@ -2482,7 +2483,7 @@ interface FormulaModifier {
|
|
|
2482
2483
|
increment: number;
|
|
2483
2484
|
current: number;
|
|
2484
2485
|
}
|
|
2485
|
-
|
|
2486
|
+
type AutofillModifier = IncrementModifier | AlphanumericIncrementModifier | CopyModifier | FormulaModifier;
|
|
2486
2487
|
interface Tooltip {
|
|
2487
2488
|
props: any;
|
|
2488
2489
|
component?: any;
|
|
@@ -2523,7 +2524,7 @@ interface Currency {
|
|
|
2523
2524
|
position: "before" | "after";
|
|
2524
2525
|
}
|
|
2525
2526
|
|
|
2526
|
-
|
|
2527
|
+
type ClipboardReadResult = {
|
|
2527
2528
|
status: "ok";
|
|
2528
2529
|
content: string;
|
|
2529
2530
|
} | {
|
|
@@ -2535,7 +2536,7 @@ interface ClipboardInterface {
|
|
|
2535
2536
|
readText(): Promise<ClipboardReadResult>;
|
|
2536
2537
|
}
|
|
2537
2538
|
|
|
2538
|
-
|
|
2539
|
+
type TranslationFunction = (string: string, ...values: string[] | [{
|
|
2539
2540
|
[key: string]: string;
|
|
2540
2541
|
}]) => string;
|
|
2541
2542
|
/***
|
|
@@ -2570,7 +2571,7 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
|
|
|
2570
2571
|
loadCurrencies?: () => Promise<Currency[]>;
|
|
2571
2572
|
}
|
|
2572
2573
|
|
|
2573
|
-
|
|
2574
|
+
type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "META";
|
|
2574
2575
|
interface ArgDefinition {
|
|
2575
2576
|
repeating?: boolean;
|
|
2576
2577
|
optional?: boolean;
|
|
@@ -2581,8 +2582,8 @@ interface ArgDefinition {
|
|
|
2581
2582
|
default?: boolean;
|
|
2582
2583
|
defaultValue?: any;
|
|
2583
2584
|
}
|
|
2584
|
-
|
|
2585
|
-
|
|
2585
|
+
type ComputeFunctionArg<T> = T | (() => T) | undefined;
|
|
2586
|
+
type ComputeFunction<T, R> = (this: EvalContext, ...args: ComputeFunctionArg<T>[]) => R;
|
|
2586
2587
|
interface AddFunctionDescription {
|
|
2587
2588
|
description: string;
|
|
2588
2589
|
compute: ComputeFunction<ArgValue, FunctionReturnValue>;
|
|
@@ -2599,7 +2600,7 @@ interface FunctionDescription extends AddFunctionDescription {
|
|
|
2599
2600
|
nbrArgRepeating: number;
|
|
2600
2601
|
getArgToFocus: (argPosition: number) => number;
|
|
2601
2602
|
}
|
|
2602
|
-
|
|
2603
|
+
type EvalContext = {
|
|
2603
2604
|
__lastFnCalled?: string;
|
|
2604
2605
|
__originCellXC?: () => string;
|
|
2605
2606
|
[key: string]: any;
|
|
@@ -3432,7 +3433,7 @@ declare class ImagePlugin extends CorePlugin<ImageState> implements ImageState {
|
|
|
3432
3433
|
private getAllImages;
|
|
3433
3434
|
}
|
|
3434
3435
|
|
|
3435
|
-
|
|
3436
|
+
type SheetMergeCellMap = Record<number, Record<number, number | undefined> | undefined>;
|
|
3436
3437
|
interface MergeState {
|
|
3437
3438
|
readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
|
|
3438
3439
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
@@ -3881,7 +3882,7 @@ declare class InternalViewport {
|
|
|
3881
3882
|
private adjustViewportZoneY;
|
|
3882
3883
|
}
|
|
3883
3884
|
|
|
3884
|
-
|
|
3885
|
+
type SheetViewports = {
|
|
3885
3886
|
topLeft: InternalViewport | undefined;
|
|
3886
3887
|
bottomLeft: InternalViewport | undefined;
|
|
3887
3888
|
topRight: InternalViewport | undefined;
|
|
@@ -4639,53 +4640,53 @@ declare class GridSelectionPlugin extends UIPlugin {
|
|
|
4639
4640
|
* This can be generalized because the union of all indices `0 | 1 | 2 | 3 | ...`
|
|
4640
4641
|
* is actually the type `number`.
|
|
4641
4642
|
*/
|
|
4642
|
-
|
|
4643
|
+
type GetterNames<Plugin extends {
|
|
4643
4644
|
getters: readonly string[];
|
|
4644
4645
|
}> = Plugin["getters"][number];
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4646
|
+
type SheetGetters = Pick<SheetPlugin, GetterNames<typeof SheetPlugin>>;
|
|
4647
|
+
type HeaderSizeGetters = Pick<HeaderSizePlugin, GetterNames<typeof HeaderSizePlugin>>;
|
|
4648
|
+
type HeaderVisibilityGetters = Pick<HeaderVisibilityPlugin, GetterNames<typeof HeaderVisibilityPlugin>>;
|
|
4649
|
+
type CellGetters = Pick<CellPlugin, GetterNames<typeof CellPlugin>>;
|
|
4650
|
+
type MergeGetters = Pick<MergePlugin, GetterNames<typeof MergePlugin>>;
|
|
4651
|
+
type BordersGetters = Pick<BordersPlugin, GetterNames<typeof BordersPlugin>>;
|
|
4652
|
+
type ChartGetters = Pick<ChartPlugin, GetterNames<typeof ChartPlugin>>;
|
|
4653
|
+
type ImageGetters = Pick<ImagePlugin, GetterNames<typeof ImagePlugin>>;
|
|
4654
|
+
type FigureGetters = Pick<FigurePlugin, GetterNames<typeof FigurePlugin>>;
|
|
4655
|
+
type RangeAdapterGetters = Pick<RangeAdapter, GetterNames<typeof RangeAdapter>>;
|
|
4656
|
+
type ConditionalFormatGetters = Pick<ConditionalFormatPlugin, GetterNames<typeof ConditionalFormatPlugin>>;
|
|
4657
|
+
type LocalHistoryGetters = {
|
|
4657
4658
|
canUndo: LocalHistory["canUndo"];
|
|
4658
4659
|
canRedo: LocalHistory["canRedo"];
|
|
4659
4660
|
};
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4661
|
+
type FiltersGetters = Pick<FiltersPlugin, GetterNames<typeof FiltersPlugin>>;
|
|
4662
|
+
type CoreGetters = SheetGetters & HeaderSizeGetters & HeaderVisibilityGetters & CellGetters & MergeGetters & BordersGetters & ChartGetters & ImageGetters & ConditionalFormatGetters & FigureGetters & RangeAdapterGetters & FiltersGetters;
|
|
4663
|
+
type AutofillGetters = Pick<AutofillPlugin, GetterNames<typeof AutofillPlugin>>;
|
|
4664
|
+
type AutomaticSumGetters = Pick<AutomaticSumPlugin, GetterNames<typeof AutomaticSumPlugin>>;
|
|
4665
|
+
type ClipboardGetters = Pick<ClipboardPlugin, GetterNames<typeof ClipboardPlugin>>;
|
|
4666
|
+
type EditionGetters = Pick<EditionPlugin, GetterNames<typeof EditionPlugin>>;
|
|
4667
|
+
type EvaluationGetters = Pick<EvaluationPlugin, GetterNames<typeof EvaluationPlugin>>;
|
|
4668
|
+
type EvaluationChartGetters = Pick<EvaluationChartPlugin, GetterNames<typeof EvaluationChartPlugin>>;
|
|
4669
|
+
type EvaluationConditionalFormatGetters = Pick<EvaluationConditionalFormatPlugin, GetterNames<typeof EvaluationConditionalFormatPlugin>>;
|
|
4670
|
+
type FindAndReplaceGetters = Pick<FindAndReplacePlugin, GetterNames<typeof FindAndReplacePlugin>>;
|
|
4671
|
+
type HeaderVisibilityIUIGetters = Pick<HeaderVisibilityUIPlugin, GetterNames<typeof HeaderVisibilityUIPlugin>>;
|
|
4672
|
+
type HighlightGetters = Pick<HighlightPlugin, GetterNames<typeof HighlightPlugin>>;
|
|
4673
|
+
type CustomColorsGetters = Pick<CustomColorsPlugin, GetterNames<typeof CustomColorsPlugin>>;
|
|
4674
|
+
type RendererGetters = Pick<RendererPlugin, GetterNames<typeof RendererPlugin>>;
|
|
4675
|
+
type SelectionGetters = Pick<GridSelectionPlugin, GetterNames<typeof GridSelectionPlugin>>;
|
|
4676
|
+
type SelectionInputGetters = Pick<SelectionInputsManagerPlugin, GetterNames<typeof SelectionInputsManagerPlugin>>;
|
|
4677
|
+
type SelectionMultiUserGetters = Pick<SelectionMultiUserPlugin, GetterNames<typeof SelectionMultiUserPlugin>>;
|
|
4678
|
+
type SortGetters = Pick<SortPlugin, GetterNames<typeof SortPlugin>>;
|
|
4679
|
+
type UIOptionsGetters = Pick<UIOptionsPlugin, GetterNames<typeof UIOptionsPlugin>>;
|
|
4680
|
+
type SheetUIGetters = Pick<SheetUIPlugin, GetterNames<typeof SheetUIPlugin>>;
|
|
4681
|
+
type ViewportGetters = Pick<SheetViewPlugin, GetterNames<typeof SheetViewPlugin>>;
|
|
4682
|
+
type SessionGetters = {
|
|
4682
4683
|
getClient: Session["getClient"];
|
|
4683
4684
|
getConnectedClients: Session["getConnectedClients"];
|
|
4684
4685
|
isFullySynchronized: Session["isFullySynchronized"];
|
|
4685
4686
|
};
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4687
|
+
type CellPopoverPluginGetters = Pick<CellPopoverPlugin, GetterNames<typeof CellPopoverPlugin>>;
|
|
4688
|
+
type FilterEvaluationGetters = Pick<FilterEvaluationPlugin, GetterNames<typeof FilterEvaluationPlugin>>;
|
|
4689
|
+
type Getters = {
|
|
4689
4690
|
isReadonly: () => boolean;
|
|
4690
4691
|
isDashboard: () => boolean;
|
|
4691
4692
|
} & LocalHistoryGetters & CoreGetters & SessionGetters & AutofillGetters & AutomaticSumGetters & ClipboardGetters & EditionGetters & EvaluationGetters & EvaluationChartGetters & EvaluationConditionalFormatGetters & FindAndReplaceGetters & HighlightGetters & CustomColorsGetters & RendererGetters & SelectionGetters & SelectionInputGetters & SelectionMultiUserGetters & SortGetters & UIOptionsGetters & SheetUIGetters & ViewportGetters & CellPopoverPluginGetters & FilterEvaluationGetters & HeaderVisibilityIUIGetters;
|
|
@@ -4704,7 +4705,7 @@ interface WorkbookHistory<Plugin> {
|
|
|
4704
4705
|
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;
|
|
4705
4706
|
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;
|
|
4706
4707
|
}
|
|
4707
|
-
|
|
4708
|
+
type Transformation<T = unknown> = (dataToTransform: T) => T;
|
|
4708
4709
|
interface TransformationFactory<T = unknown> {
|
|
4709
4710
|
/**
|
|
4710
4711
|
* Build a transformation function to transform any operation as if the execution of
|
|
@@ -4718,12 +4719,12 @@ interface TransformationFactory<T = unknown> {
|
|
|
4718
4719
|
with: (operation: T) => Transformation<T>;
|
|
4719
4720
|
}
|
|
4720
4721
|
|
|
4721
|
-
|
|
4722
|
-
|
|
4722
|
+
type SelectionDirection = "up" | "down" | "left" | "right";
|
|
4723
|
+
type SelectionStep = number | "end";
|
|
4723
4724
|
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4725
|
+
type CellPopoverType = "ErrorToolTip" | "LinkDisplay" | "FilterMenu" | "LinkEditor";
|
|
4726
|
+
type PopoverPropsPosition = "TopRight" | "BottomLeft";
|
|
4727
|
+
type MaxSizedComponentConstructor = ComponentConstructor & {
|
|
4727
4728
|
maxSize?: {
|
|
4728
4729
|
maxWidth?: number;
|
|
4729
4730
|
maxHeight?: number;
|
|
@@ -4733,7 +4734,7 @@ declare type MaxSizedComponentConstructor = ComponentConstructor & {
|
|
|
4733
4734
|
* If the cell at the given position have an associated component (linkDisplay, errorTooltip, ...),
|
|
4734
4735
|
* returns the parameters to display the component
|
|
4735
4736
|
*/
|
|
4736
|
-
|
|
4737
|
+
type CellPopoverBuilder = (position: CellPosition, getters: Getters) => CellPopoverComponent<MaxSizedComponentConstructor>;
|
|
4737
4738
|
interface PopoverBuilders {
|
|
4738
4739
|
onOpen?: CellPopoverBuilder;
|
|
4739
4740
|
onHover?: CellPopoverBuilder;
|
|
@@ -4746,14 +4747,14 @@ interface ClosedCellPopover {
|
|
|
4746
4747
|
* i.e. which component class, which props and where to
|
|
4747
4748
|
* display it relative to the cell
|
|
4748
4749
|
*/
|
|
4749
|
-
|
|
4750
|
+
type OpenCellPopover<C extends ComponentConstructor> = {
|
|
4750
4751
|
isOpen: true;
|
|
4751
4752
|
Component: C;
|
|
4752
4753
|
props: PropsOf<C>;
|
|
4753
4754
|
cellCorner: PopoverPropsPosition;
|
|
4754
4755
|
};
|
|
4755
|
-
|
|
4756
|
-
|
|
4756
|
+
type CellPopoverComponent<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = ClosedCellPopover | OpenCellPopover<C>;
|
|
4757
|
+
type PositionedCellPopover<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = {
|
|
4757
4758
|
isOpen: true;
|
|
4758
4759
|
Component: C;
|
|
4759
4760
|
props: PropsOf<C>;
|
|
@@ -4822,7 +4823,7 @@ interface LinkSpec {
|
|
|
4822
4823
|
declare function urlRepresentation(link: Link, getters: Getters): string;
|
|
4823
4824
|
declare function openLink(link: Link, env: SpreadsheetChildEnv): void;
|
|
4824
4825
|
|
|
4825
|
-
|
|
4826
|
+
type TransformationFunction<U extends CoreCommandTypes, V extends CoreCommandTypes> = (toTransform: Extract<CoreCommand, {
|
|
4826
4827
|
type: U;
|
|
4827
4828
|
}>, executed: Extract<CoreCommand, {
|
|
4828
4829
|
type: V;
|
|
@@ -5100,7 +5101,7 @@ declare class GaugeChartConfigPanel extends Component<Props$x, SpreadsheetChildE
|
|
|
5100
5101
|
updateDataRange(): void;
|
|
5101
5102
|
}
|
|
5102
5103
|
|
|
5103
|
-
|
|
5104
|
+
type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
|
|
5104
5105
|
interface Props$w {
|
|
5105
5106
|
figureId: UID;
|
|
5106
5107
|
definition: GaugeChartDefinition;
|
|
@@ -5161,7 +5162,7 @@ declare class ScorecardChartConfigPanel extends Component<Props$v, SpreadsheetCh
|
|
|
5161
5162
|
updateBaselineMode(ev: any): void;
|
|
5162
5163
|
}
|
|
5163
5164
|
|
|
5164
|
-
|
|
5165
|
+
type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
|
|
5165
5166
|
interface Props$u {
|
|
5166
5167
|
figureId: UID;
|
|
5167
5168
|
definition: ScorecardChartDefinition;
|
|
@@ -5233,8 +5234,8 @@ interface MenuItem {
|
|
|
5233
5234
|
textColor?: string;
|
|
5234
5235
|
icon?: string;
|
|
5235
5236
|
}
|
|
5236
|
-
|
|
5237
|
-
|
|
5237
|
+
type MenuItemsBuilder = (env: SpreadsheetChildEnv) => MenuItemSpec[];
|
|
5238
|
+
type MenuChildren = (MenuItemSpec | MenuItemsBuilder)[];
|
|
5238
5239
|
/**
|
|
5239
5240
|
* The class Registry is extended in order to add the function addChild
|
|
5240
5241
|
*
|
|
@@ -5394,7 +5395,7 @@ declare class Menu extends Component<Props$r, SpreadsheetChildEnv> {
|
|
|
5394
5395
|
onMouseOver(menu: MenuItem, position: Pixel): void;
|
|
5395
5396
|
}
|
|
5396
5397
|
|
|
5397
|
-
|
|
5398
|
+
type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
|
|
5398
5399
|
interface Props$q {
|
|
5399
5400
|
figure: Figure;
|
|
5400
5401
|
style: string;
|
|
@@ -5677,7 +5678,7 @@ declare class FilterIconsOverlay extends Component<Props$j, SpreadsheetChildEnv>
|
|
|
5677
5678
|
private isPositionVisible;
|
|
5678
5679
|
}
|
|
5679
5680
|
|
|
5680
|
-
|
|
5681
|
+
type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
|
|
5681
5682
|
interface DndState {
|
|
5682
5683
|
figId: string | undefined;
|
|
5683
5684
|
x: Pixel;
|
|
@@ -5824,7 +5825,7 @@ declare class GridPopover extends Component<Props$g, SpreadsheetChildEnv> {
|
|
|
5824
5825
|
get cellPopover(): PositionedCellPopover | ClosedCellPopover;
|
|
5825
5826
|
}
|
|
5826
5827
|
|
|
5827
|
-
|
|
5828
|
+
type ScrollDirection = "horizontal" | "vertical";
|
|
5828
5829
|
|
|
5829
5830
|
interface Props$f {
|
|
5830
5831
|
width: Pixel;
|
|
@@ -6033,7 +6034,7 @@ declare class FunctionDescriptionProvider extends Component<Props$9> {
|
|
|
6033
6034
|
onMouseMove(): void;
|
|
6034
6035
|
}
|
|
6035
6036
|
|
|
6036
|
-
|
|
6037
|
+
type HtmlContent = {
|
|
6037
6038
|
value: string;
|
|
6038
6039
|
color?: Color;
|
|
6039
6040
|
class?: string;
|
|
@@ -6147,6 +6148,7 @@ interface State$1 {
|
|
|
6147
6148
|
interface Props$7 {
|
|
6148
6149
|
onToggle: () => void;
|
|
6149
6150
|
dropdownStyle: string;
|
|
6151
|
+
class: string;
|
|
6150
6152
|
}
|
|
6151
6153
|
declare class FontSizeEditor extends Component<Props$7, SpreadsheetChildEnv> {
|
|
6152
6154
|
static template: string;
|
|
@@ -6167,7 +6169,7 @@ declare class FontSizeEditor extends Component<Props$7, SpreadsheetChildEnv> {
|
|
|
6167
6169
|
onInputKeydown(ev: KeyboardEvent): void;
|
|
6168
6170
|
}
|
|
6169
6171
|
|
|
6170
|
-
|
|
6172
|
+
type Tool = "" | "formatTool" | "alignTool" | "textColorTool" | "fillColorTool" | "borderTool";
|
|
6171
6173
|
interface State {
|
|
6172
6174
|
menuState: MenuState;
|
|
6173
6175
|
activeTool: Tool;
|
|
@@ -6249,7 +6251,7 @@ declare class TopBar extends Component<Props$6, SpreadsheetChildEnv> {
|
|
|
6249
6251
|
removeFilter(): void;
|
|
6250
6252
|
}
|
|
6251
6253
|
|
|
6252
|
-
|
|
6254
|
+
type ComposerFocusType = "inactive" | "cellFocus" | "contentFocus";
|
|
6253
6255
|
interface SpreadsheetProps {
|
|
6254
6256
|
model: Model;
|
|
6255
6257
|
}
|
|
@@ -6440,7 +6442,7 @@ declare class HeadersOverlay extends Component<any, SpreadsheetChildEnv> {
|
|
|
6440
6442
|
selectAll(): void;
|
|
6441
6443
|
}
|
|
6442
6444
|
|
|
6443
|
-
|
|
6445
|
+
type Orientation$1 = "n" | "s" | "w" | "e";
|
|
6444
6446
|
interface Props$4 {
|
|
6445
6447
|
zone: Zone;
|
|
6446
6448
|
orientation: Orientation$1;
|
|
@@ -6453,7 +6455,7 @@ declare class Border extends Component<Props$4, SpreadsheetChildEnv> {
|
|
|
6453
6455
|
onMouseDown(ev: MouseEvent): void;
|
|
6454
6456
|
}
|
|
6455
6457
|
|
|
6456
|
-
|
|
6458
|
+
type Orientation = "nw" | "ne" | "sw" | "se";
|
|
6457
6459
|
interface Props$3 {
|
|
6458
6460
|
zone: Zone;
|
|
6459
6461
|
color: Color;
|
|
@@ -6497,7 +6499,7 @@ declare class Highlight extends Component<Props$2, SpreadsheetChildEnv> {
|
|
|
6497
6499
|
* - a horizontal resizer (to resize columns)
|
|
6498
6500
|
* - a vertical resizer (same, for rows)
|
|
6499
6501
|
*/
|
|
6500
|
-
|
|
6502
|
+
type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER";
|
|
6501
6503
|
interface Props$1 {
|
|
6502
6504
|
sidePanelIsOpen: boolean;
|
|
6503
6505
|
exposeFocus: (focus: () => void) => void;
|