@odoo/o-spreadsheet 16.4.0-alpha.4 → 16.4.0-alpha.5
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 +2127 -1106
- package/dist/o-spreadsheet.d.ts +285 -266
- package/dist/o-spreadsheet.esm.js +2127 -1106
- package/dist/o-spreadsheet.iife.js +2127 -1106
- package/dist/o-spreadsheet.iife.min.js +294 -293
- 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;
|
|
@@ -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;
|
|
@@ -512,8 +512,8 @@ interface ConditionalFormat {
|
|
|
512
512
|
interface ConditionalFormatInternal extends Omit<ConditionalFormat, "ranges"> {
|
|
513
513
|
ranges: Range[];
|
|
514
514
|
}
|
|
515
|
-
|
|
516
|
-
|
|
515
|
+
type ConditionalFormatRule = SingleColorRules | ColorScaleRule | IconSetRule;
|
|
516
|
+
type SingleColorRules = CellIsRule;
|
|
517
517
|
interface SingleColorRule {
|
|
518
518
|
style: Style;
|
|
519
519
|
}
|
|
@@ -522,18 +522,18 @@ interface CellIsRule extends SingleColorRule {
|
|
|
522
522
|
operator: ConditionalFormattingOperatorValues;
|
|
523
523
|
values: string[];
|
|
524
524
|
}
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
type ThresholdType = "value" | "number" | "percentage" | "percentile" | "formula";
|
|
526
|
+
type ColorScaleThreshold = {
|
|
527
527
|
color: number;
|
|
528
528
|
type: ThresholdType;
|
|
529
529
|
value?: string;
|
|
530
530
|
};
|
|
531
|
-
|
|
531
|
+
type ColorScaleMidPointThreshold = {
|
|
532
532
|
color: number;
|
|
533
533
|
type: Exclude<ThresholdType, "value">;
|
|
534
534
|
value: string;
|
|
535
535
|
};
|
|
536
|
-
|
|
536
|
+
type IconThreshold = {
|
|
537
537
|
type: Exclude<ThresholdType, "value">;
|
|
538
538
|
operator: "gt" | "ge";
|
|
539
539
|
value: string;
|
|
@@ -555,8 +555,8 @@ interface IconSetRule {
|
|
|
555
555
|
upperInflectionPoint: IconThreshold;
|
|
556
556
|
lowerInflectionPoint: IconThreshold;
|
|
557
557
|
}
|
|
558
|
-
|
|
559
|
-
|
|
558
|
+
type ConditionalFormattingOperatorValues = "BeginsWith" | "Between" | "ContainsText" | "IsEmpty" | "IsNotEmpty" | "EndsWith" | "Equal" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "NotBetween" | "NotContains" | "NotEqual";
|
|
559
|
+
type UpDown = "up" | "down";
|
|
560
560
|
|
|
561
561
|
interface Figure {
|
|
562
562
|
id: UID;
|
|
@@ -570,7 +570,7 @@ interface FigureSize {
|
|
|
570
570
|
width: Pixel;
|
|
571
571
|
height: Pixel;
|
|
572
572
|
}
|
|
573
|
-
|
|
573
|
+
type ResizeDirection = -1 | 0 | 1;
|
|
574
574
|
|
|
575
575
|
interface Image {
|
|
576
576
|
path: string;
|
|
@@ -664,7 +664,8 @@ interface ExcelFilterTableData {
|
|
|
664
664
|
}
|
|
665
665
|
interface ExcelFilterData {
|
|
666
666
|
colId: number;
|
|
667
|
-
|
|
667
|
+
displayedValues: string[];
|
|
668
|
+
displayBlanks?: boolean;
|
|
668
669
|
}
|
|
669
670
|
|
|
670
671
|
interface AbstractMessage {
|
|
@@ -720,11 +721,11 @@ interface SnapshotCreatedMessage extends AbstractMessage {
|
|
|
720
721
|
serverRevisionId: UID;
|
|
721
722
|
nextRevisionId: UID;
|
|
722
723
|
}
|
|
723
|
-
|
|
724
|
-
|
|
724
|
+
type CollaborationMessage = RevisionUndoneMessage | RevisionRedoneMessage | RemoteRevisionMessage | SnapshotMessage | SnapshotCreatedMessage | ClientMovedMessage | ClientJoinedMessage | ClientLeftMessage;
|
|
725
|
+
type StateUpdateMessage = Extract<CollaborationMessage, {
|
|
725
726
|
nextRevisionId: UID;
|
|
726
727
|
}>;
|
|
727
|
-
|
|
728
|
+
type NewMessageCallback<T = any> = (message: T) => void;
|
|
728
729
|
/**
|
|
729
730
|
* The transport service allows to communicate between multiple clients.
|
|
730
731
|
* A client can send any message to others.
|
|
@@ -1007,7 +1008,7 @@ declare function positionToZone(position: Position$1): {
|
|
|
1007
1008
|
bottom: HeaderIndex;
|
|
1008
1009
|
};
|
|
1009
1010
|
|
|
1010
|
-
|
|
1011
|
+
type SelectionEventOptions = {
|
|
1011
1012
|
scrollIntoView?: boolean;
|
|
1012
1013
|
unbounded?: boolean;
|
|
1013
1014
|
};
|
|
@@ -1025,7 +1026,7 @@ interface StreamCallbacks<Event> {
|
|
|
1025
1026
|
release?: () => void;
|
|
1026
1027
|
}
|
|
1027
1028
|
|
|
1028
|
-
|
|
1029
|
+
type StatefulStream<Event, State> = {
|
|
1029
1030
|
capture(owner: unknown, state: State, callbacks: StreamCallbacks<Event>): void;
|
|
1030
1031
|
registerAsDefault: (owner: unknown, state: State, callbacks: StreamCallbacks<Event>) => void;
|
|
1031
1032
|
resetDefaultAnchor: (owner: unknown, state: State) => void;
|
|
@@ -1050,9 +1051,9 @@ interface SelectionProcessor {
|
|
|
1050
1051
|
loopSelection(): DispatchResult;
|
|
1051
1052
|
selectTableAroundSelection(): DispatchResult;
|
|
1052
1053
|
}
|
|
1053
|
-
|
|
1054
|
+
type SelectionStreamProcessor = SelectionProcessor & StatefulStream<SelectionEvent, AnchorZone>;
|
|
1054
1055
|
|
|
1055
|
-
|
|
1056
|
+
type FilePath = string;
|
|
1056
1057
|
/**
|
|
1057
1058
|
* FileStore manage the transfer of file with the server.
|
|
1058
1059
|
*/
|
|
@@ -1105,7 +1106,7 @@ interface NotifyUIEvent {
|
|
|
1105
1106
|
* Note that the Model can be used in a standalone way to manipulate
|
|
1106
1107
|
* programmatically a spreadsheet.
|
|
1107
1108
|
*/
|
|
1108
|
-
|
|
1109
|
+
type Mode = "normal" | "readonly" | "dashboard";
|
|
1109
1110
|
interface ModelConfig {
|
|
1110
1111
|
readonly mode: Mode;
|
|
1111
1112
|
/**
|
|
@@ -1352,7 +1353,7 @@ declare class BasePlugin<State = any, C = any> implements CommandHandler<C>, Val
|
|
|
1352
1353
|
checkValidations<T>(command: T, ...validations: Validation<T>[]): CommandResult | CommandResult[];
|
|
1353
1354
|
}
|
|
1354
1355
|
|
|
1355
|
-
|
|
1356
|
+
type UIActions = Pick<ModelConfig, "notifyUI">;
|
|
1356
1357
|
interface UIPluginConfig {
|
|
1357
1358
|
readonly getters: Getters;
|
|
1358
1359
|
readonly stateObserver: StateObserver;
|
|
@@ -1452,7 +1453,7 @@ declare class FindAndReplacePlugin extends UIPlugin {
|
|
|
1452
1453
|
drawGrid(renderingContext: GridRenderingContext): void;
|
|
1453
1454
|
}
|
|
1454
1455
|
|
|
1455
|
-
|
|
1456
|
+
type EditionMode = "editing" | "selecting" | "inactive";
|
|
1456
1457
|
interface ComposerSelection {
|
|
1457
1458
|
start: number;
|
|
1458
1459
|
end: number;
|
|
@@ -1565,12 +1566,12 @@ interface DOMDimension {
|
|
|
1565
1566
|
width: Pixel;
|
|
1566
1567
|
height: Pixel;
|
|
1567
1568
|
}
|
|
1568
|
-
|
|
1569
|
+
type Rect = DOMCoordinates & DOMDimension;
|
|
1569
1570
|
/**
|
|
1570
1571
|
* The viewport is the visible area of a sheet.
|
|
1571
1572
|
* Column and row headers are not included in the viewport.
|
|
1572
1573
|
*/
|
|
1573
|
-
|
|
1574
|
+
type Viewport = Zone & Alias;
|
|
1574
1575
|
interface SheetScrollInfo {
|
|
1575
1576
|
/**
|
|
1576
1577
|
* The offset in the X coordinate between the viewport left side and
|
|
@@ -1615,16 +1616,16 @@ interface EdgeScrollInfo {
|
|
|
1615
1616
|
direction: ScrollDirection$1;
|
|
1616
1617
|
delay: number;
|
|
1617
1618
|
}
|
|
1618
|
-
|
|
1619
|
+
type ScrollDirection$1 = 1 | 0 | -1 | "reset";
|
|
1619
1620
|
|
|
1620
1621
|
declare enum ClipboardMIMEType {
|
|
1621
1622
|
PlainText = "text/plain",
|
|
1622
1623
|
Html = "text/html"
|
|
1623
1624
|
}
|
|
1624
|
-
|
|
1625
|
+
type ClipboardContent = {
|
|
1625
1626
|
[type in ClipboardMIMEType]?: string;
|
|
1626
1627
|
};
|
|
1627
|
-
|
|
1628
|
+
type ClipboardPasteOptions = "onlyFormat" | "onlyValue";
|
|
1628
1629
|
|
|
1629
1630
|
/**
|
|
1630
1631
|
* There are two kinds of commands: CoreCommands and LocalCommands
|
|
@@ -1911,6 +1912,7 @@ interface PasteFromOSClipboardCommand {
|
|
|
1911
1912
|
type: "PASTE_FROM_OS_CLIPBOARD";
|
|
1912
1913
|
target: Zone[];
|
|
1913
1914
|
text: string;
|
|
1915
|
+
pasteOption?: ClipboardPasteOptions;
|
|
1914
1916
|
}
|
|
1915
1917
|
interface AutoresizeColumnsCommand {
|
|
1916
1918
|
type: "AUTORESIZE_COLUMNS";
|
|
@@ -2156,7 +2158,7 @@ interface SortCommand {
|
|
|
2156
2158
|
sortDirection: SortDirection;
|
|
2157
2159
|
sortOptions?: SortOptions;
|
|
2158
2160
|
}
|
|
2159
|
-
|
|
2161
|
+
type SortDirection = "ascending" | "descending";
|
|
2160
2162
|
interface ResizeViewportCommand {
|
|
2161
2163
|
type: "RESIZE_SHEETVIEW";
|
|
2162
2164
|
width: Pixel;
|
|
@@ -2219,7 +2221,7 @@ interface SplitTextIntoColumnsCommand {
|
|
|
2219
2221
|
addNewColumns: boolean;
|
|
2220
2222
|
force?: boolean;
|
|
2221
2223
|
}
|
|
2222
|
-
|
|
2224
|
+
type CoreCommand =
|
|
2223
2225
|
/** CELLS */
|
|
2224
2226
|
UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContentCommand
|
|
2225
2227
|
/** GRID SHAPE */
|
|
@@ -2242,8 +2244,8 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
|
|
|
2242
2244
|
| CreateImageOverCommand
|
|
2243
2245
|
/** FILTERS */
|
|
2244
2246
|
| CreateFilterTableCommand | RemoveFilterTableCommand;
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
+
type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | AddRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | 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;
|
|
2248
|
+
type Command = CoreCommand | LocalCommand;
|
|
2247
2249
|
/**
|
|
2248
2250
|
* Holds the result of a command dispatch.
|
|
2249
2251
|
* The command may have been successfully dispatched or cancelled
|
|
@@ -2263,7 +2265,7 @@ declare class DispatchResult {
|
|
|
2263
2265
|
*/
|
|
2264
2266
|
isCancelledBecause(reason: CancelledReason): boolean;
|
|
2265
2267
|
}
|
|
2266
|
-
|
|
2268
|
+
type CancelledReason = Exclude<CommandResult, CommandResult.Success>;
|
|
2267
2269
|
declare const enum CommandResult {
|
|
2268
2270
|
Success = 0,
|
|
2269
2271
|
CancelledForUnknownReason = 1,
|
|
@@ -2276,88 +2278,89 @@ declare const enum CommandResult {
|
|
|
2276
2278
|
NotEnoughElements = 8,
|
|
2277
2279
|
NotEnoughSheets = 9,
|
|
2278
2280
|
MissingSheetName = 10,
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2281
|
+
UnchangedSheetName = 11,
|
|
2282
|
+
DuplicatedSheetName = 12,
|
|
2283
|
+
DuplicatedSheetId = 13,
|
|
2284
|
+
ForbiddenCharactersInSheetName = 14,
|
|
2285
|
+
WrongSheetMove = 15,
|
|
2286
|
+
WrongSheetPosition = 16,
|
|
2287
|
+
InvalidAnchorZone = 17,
|
|
2288
|
+
SelectionOutOfBound = 18,
|
|
2289
|
+
TargetOutOfSheet = 19,
|
|
2290
|
+
WrongCutSelection = 20,
|
|
2291
|
+
WrongPasteSelection = 21,
|
|
2292
|
+
WrongPasteOption = 22,
|
|
2293
|
+
WrongFigurePasteOption = 23,
|
|
2294
|
+
EmptyClipboard = 24,
|
|
2295
|
+
EmptyRange = 25,
|
|
2296
|
+
InvalidRange = 26,
|
|
2297
|
+
InvalidZones = 27,
|
|
2298
|
+
InvalidSheetId = 28,
|
|
2299
|
+
InvalidFigureId = 29,
|
|
2300
|
+
InputAlreadyFocused = 30,
|
|
2301
|
+
MaximumRangesReached = 31,
|
|
2302
|
+
InvalidChartDefinition = 32,
|
|
2303
|
+
InvalidDataSet = 33,
|
|
2304
|
+
InvalidLabelRange = 34,
|
|
2305
|
+
InvalidScorecardKeyValue = 35,
|
|
2306
|
+
InvalidScorecardBaseline = 36,
|
|
2307
|
+
InvalidGaugeDataRange = 37,
|
|
2308
|
+
EmptyGaugeRangeMin = 38,
|
|
2309
|
+
GaugeRangeMinNaN = 39,
|
|
2310
|
+
EmptyGaugeRangeMax = 40,
|
|
2311
|
+
GaugeRangeMaxNaN = 41,
|
|
2312
|
+
GaugeRangeMinBiggerThanRangeMax = 42,
|
|
2313
|
+
GaugeLowerInflectionPointNaN = 43,
|
|
2314
|
+
GaugeUpperInflectionPointNaN = 44,
|
|
2315
|
+
GaugeLowerBiggerThanUpper = 45,
|
|
2316
|
+
InvalidAutofillSelection = 46,
|
|
2317
|
+
WrongComposerSelection = 47,
|
|
2318
|
+
MinBiggerThanMax = 48,
|
|
2319
|
+
LowerBiggerThanUpper = 49,
|
|
2320
|
+
MidBiggerThanMax = 50,
|
|
2321
|
+
MinBiggerThanMid = 51,
|
|
2322
|
+
FirstArgMissing = 52,
|
|
2323
|
+
SecondArgMissing = 53,
|
|
2324
|
+
MinNaN = 54,
|
|
2325
|
+
MidNaN = 55,
|
|
2326
|
+
MaxNaN = 56,
|
|
2327
|
+
ValueUpperInflectionNaN = 57,
|
|
2328
|
+
ValueLowerInflectionNaN = 58,
|
|
2329
|
+
MinInvalidFormula = 59,
|
|
2330
|
+
MidInvalidFormula = 60,
|
|
2331
|
+
MaxInvalidFormula = 61,
|
|
2332
|
+
ValueUpperInvalidFormula = 62,
|
|
2333
|
+
ValueLowerInvalidFormula = 63,
|
|
2334
|
+
InvalidSortZone = 64,
|
|
2335
|
+
WaitingSessionConfirmation = 65,
|
|
2336
|
+
MergeOverlap = 66,
|
|
2337
|
+
TooManyHiddenElements = 67,
|
|
2338
|
+
Readonly = 68,
|
|
2339
|
+
InvalidViewportSize = 69,
|
|
2340
|
+
InvalidScrollingDirection = 70,
|
|
2341
|
+
FigureDoesNotExist = 71,
|
|
2342
|
+
InvalidConditionalFormatId = 72,
|
|
2343
|
+
InvalidCellPopover = 73,
|
|
2344
|
+
EmptyTarget = 74,
|
|
2345
|
+
InvalidFreezeQuantity = 75,
|
|
2346
|
+
FrozenPaneOverlap = 76,
|
|
2347
|
+
ValuesNotChanged = 77,
|
|
2348
|
+
InvalidFilterZone = 78,
|
|
2349
|
+
FilterOverlap = 79,
|
|
2350
|
+
FilterNotFound = 80,
|
|
2351
|
+
MergeInFilter = 81,
|
|
2352
|
+
NonContinuousTargets = 82,
|
|
2353
|
+
DuplicatedFigureId = 83,
|
|
2354
|
+
InvalidSelectionStep = 84,
|
|
2355
|
+
DuplicatedChartId = 85,
|
|
2356
|
+
ChartDoesNotExist = 86,
|
|
2357
|
+
InvalidHeaderIndex = 87,
|
|
2358
|
+
InvalidQuantity = 88,
|
|
2359
|
+
MoreThanOneColumnSelected = 89,
|
|
2360
|
+
EmptySplitSeparator = 90,
|
|
2361
|
+
SplitWillOverwriteContent = 91,
|
|
2362
|
+
NoSplitSeparatorInSelection = 92,
|
|
2363
|
+
NoActiveSheet = 93
|
|
2361
2364
|
}
|
|
2362
2365
|
interface CommandHandler<T> {
|
|
2363
2366
|
allowDispatch(command: T): CommandResult | CommandResult[];
|
|
@@ -2387,27 +2390,27 @@ interface CoreCommandDispatcher {
|
|
|
2387
2390
|
type: T;
|
|
2388
2391
|
}>>(type: T, r: Omit<C, "type">): DispatchResult;
|
|
2389
2392
|
}
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
+
type CommandTypes = Command["type"];
|
|
2394
|
+
type CoreCommandTypes = CoreCommand["type"];
|
|
2395
|
+
type CoreViewCommand = CoreCommand | EvaluateCellsCommand | UndoCommand | RedoCommand;
|
|
2393
2396
|
|
|
2394
2397
|
/**
|
|
2395
2398
|
* The following type is meant to be used in union with other aliases to prevent
|
|
2396
2399
|
* Intellisense from resolving it.
|
|
2397
2400
|
* See https://github.com/microsoft/TypeScript/issues/31940#issuecomment-841712377
|
|
2398
2401
|
*/
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2402
|
+
type Alias = {} & {};
|
|
2403
|
+
type HeaderIndex = number & Alias;
|
|
2404
|
+
type Pixel = number & Alias;
|
|
2405
|
+
type UID = string & Alias;
|
|
2406
|
+
type SetDecimalStep = 1 | -1;
|
|
2407
|
+
type FilterId = UID & Alias;
|
|
2408
|
+
type FilterTableId = UID & Alias;
|
|
2406
2409
|
/**
|
|
2407
2410
|
* CSS style color string
|
|
2408
2411
|
* e.g. "#ABC", "#AAAFFF", "rgb(30, 80, 16)"
|
|
2409
2412
|
*/
|
|
2410
|
-
|
|
2413
|
+
type Color = string & Alias;
|
|
2411
2414
|
interface RGBA {
|
|
2412
2415
|
a: number;
|
|
2413
2416
|
r: number;
|
|
@@ -2449,9 +2452,9 @@ interface ZoneDimension {
|
|
|
2449
2452
|
numberOfRows: HeaderIndex;
|
|
2450
2453
|
numberOfCols: HeaderIndex;
|
|
2451
2454
|
}
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
+
type Align = "left" | "right" | "center" | undefined;
|
|
2456
|
+
type VerticalAlign = "top" | "middle" | "bottom" | undefined;
|
|
2457
|
+
type Wrapping = "overflow" | "wrap" | "clip" | undefined;
|
|
2455
2458
|
interface Style {
|
|
2456
2459
|
bold?: boolean;
|
|
2457
2460
|
italic?: boolean;
|
|
@@ -2485,15 +2488,15 @@ interface CellPosition {
|
|
|
2485
2488
|
sheetId: UID;
|
|
2486
2489
|
}
|
|
2487
2490
|
declare const borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
|
|
2488
|
-
|
|
2489
|
-
|
|
2491
|
+
type BorderStyle = typeof borderStyles[number];
|
|
2492
|
+
type BorderDescr = {
|
|
2490
2493
|
style: BorderStyle;
|
|
2491
2494
|
color: Color;
|
|
2492
2495
|
};
|
|
2493
2496
|
/**
|
|
2494
2497
|
* A complete border(s) data is a set of position-color-style information
|
|
2495
2498
|
*/
|
|
2496
|
-
|
|
2499
|
+
type BorderData = {
|
|
2497
2500
|
position: BorderPosition;
|
|
2498
2501
|
color?: Color;
|
|
2499
2502
|
style?: BorderStyle;
|
|
@@ -2504,42 +2507,42 @@ interface Border$1 {
|
|
|
2504
2507
|
bottom?: BorderDescr;
|
|
2505
2508
|
right?: BorderDescr;
|
|
2506
2509
|
}
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
+
type ReferenceDenormalizer = (range: Range, isMeta: boolean, functionName: string, paramNumber: number) => any | any[][];
|
|
2511
|
+
type EnsureRange = (range: Range) => MatrixArg;
|
|
2512
|
+
type _CompiledFormula = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => FormulaReturn;
|
|
2510
2513
|
interface CompiledFormula {
|
|
2511
2514
|
execute: _CompiledFormula;
|
|
2512
2515
|
tokens: Token[];
|
|
2513
2516
|
dependencies: string[];
|
|
2514
2517
|
}
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
+
type Matrix<T = unknown> = T[][];
|
|
2519
|
+
type Arg = MatrixArg | PrimitiveArg;
|
|
2520
|
+
type MatrixArg = {
|
|
2518
2521
|
value: MatrixArgValue;
|
|
2519
2522
|
format?: MatrixArgFormat;
|
|
2520
2523
|
};
|
|
2521
|
-
|
|
2524
|
+
type PrimitiveArg = {
|
|
2522
2525
|
value: PrimitiveArgValue;
|
|
2523
2526
|
format?: PrimitiveFormat;
|
|
2524
2527
|
};
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2528
|
+
type ArgValue = PrimitiveArgValue | MatrixArgValue;
|
|
2529
|
+
type MatrixArgValue = Matrix<CellValue | undefined>;
|
|
2530
|
+
type PrimitiveArgValue = CellValue | null;
|
|
2531
|
+
type MatrixArgFormat = Matrix<PrimitiveFormat>;
|
|
2532
|
+
type PrimitiveFormat = Format | undefined;
|
|
2533
|
+
type FunctionReturn = MatrixFunctionReturn | PrimitiveFunctionReturn;
|
|
2534
|
+
type FunctionReturnValue = CellValue | Matrix<CellValue>;
|
|
2535
|
+
type FunctionReturnFormat = PrimitiveFormat | MatrixArgFormat;
|
|
2536
|
+
type MatrixFunctionReturn = {
|
|
2534
2537
|
value: Matrix<CellValue>;
|
|
2535
2538
|
format?: FunctionReturnFormat;
|
|
2536
2539
|
};
|
|
2537
|
-
|
|
2540
|
+
type PrimitiveFunctionReturn = {
|
|
2538
2541
|
value: CellValue;
|
|
2539
2542
|
format?: PrimitiveFormat;
|
|
2540
2543
|
};
|
|
2541
|
-
|
|
2542
|
-
|
|
2544
|
+
type FormulaReturn = MatrixFunctionReturn | PrimitiveFormulaReturn;
|
|
2545
|
+
type PrimitiveFormulaReturn = {
|
|
2543
2546
|
value: CellValue | null;
|
|
2544
2547
|
format?: PrimitiveFormat;
|
|
2545
2548
|
};
|
|
@@ -2574,8 +2577,8 @@ interface PaneDivision {
|
|
|
2574
2577
|
/** Represents the number of frozen rows */
|
|
2575
2578
|
ySplit: number;
|
|
2576
2579
|
}
|
|
2577
|
-
|
|
2578
|
-
|
|
2580
|
+
type BorderPosition = "all" | "hv" | "h" | "v" | "external" | "left" | "top" | "right" | "bottom" | "clear";
|
|
2581
|
+
type BorderDescription = {
|
|
2579
2582
|
vertical?: BorderDescr;
|
|
2580
2583
|
horizontal?: BorderDescr;
|
|
2581
2584
|
} | undefined;
|
|
@@ -2585,24 +2588,24 @@ declare const enum DIRECTION {
|
|
|
2585
2588
|
LEFT = "left",
|
|
2586
2589
|
RIGHT = "right"
|
|
2587
2590
|
}
|
|
2588
|
-
|
|
2589
|
-
|
|
2591
|
+
type ChangeType = "REMOVE" | "RESIZE" | "MOVE" | "CHANGE" | "NONE";
|
|
2592
|
+
type ApplyRangeChangeResult = {
|
|
2590
2593
|
changeType: Exclude<ChangeType, "NONE">;
|
|
2591
2594
|
range: Range;
|
|
2592
2595
|
} | {
|
|
2593
2596
|
changeType: "NONE";
|
|
2594
2597
|
};
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
+
type ApplyRangeChange = (range: Range) => ApplyRangeChangeResult;
|
|
2599
|
+
type Dimension = "COL" | "ROW";
|
|
2600
|
+
type ConsecutiveIndexes = HeaderIndex[];
|
|
2598
2601
|
interface RangeProvider {
|
|
2599
2602
|
adaptRanges: (applyChange: ApplyRangeChange, sheetId?: UID) => void;
|
|
2600
2603
|
}
|
|
2601
|
-
|
|
2604
|
+
type Validation<T> = (toValidate: T) => CommandResult | CommandResult[];
|
|
2602
2605
|
/**
|
|
2603
2606
|
* Return the prop's type of a component
|
|
2604
2607
|
*/
|
|
2605
|
-
|
|
2608
|
+
type PropsOf<C> = C extends ComponentConstructor<infer Props> ? Props : never;
|
|
2606
2609
|
/**
|
|
2607
2610
|
* Container for a lazy computed value
|
|
2608
2611
|
*/
|
|
@@ -2628,7 +2631,7 @@ interface Lazy<T> {
|
|
|
2628
2631
|
interface Cloneable<T> {
|
|
2629
2632
|
clone: (args?: Partial<T>) => T;
|
|
2630
2633
|
}
|
|
2631
|
-
|
|
2634
|
+
type CSSProperties<P extends string = string> = Record<P, string | undefined>;
|
|
2632
2635
|
interface SortOptions {
|
|
2633
2636
|
/** If true sort the headers of the range along with the rest */
|
|
2634
2637
|
sortHeaders?: boolean;
|
|
@@ -2638,17 +2641,17 @@ interface SortOptions {
|
|
|
2638
2641
|
interface MenuMouseEvent extends MouseEvent {
|
|
2639
2642
|
closedMenuId?: UID;
|
|
2640
2643
|
}
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2644
|
+
type Immutable<T> = T extends ImmutablePrimitive ? T : T extends Array<infer U> ? ImmutableArray<U> : T extends Map<infer K, infer V> ? ImmutableMap<K, V> : T extends Set<infer M> ? ImmutableSet<M> : ImmutableObject<T>;
|
|
2645
|
+
type ImmutablePrimitive = undefined | null | boolean | string | number | Function;
|
|
2646
|
+
type ImmutableArray<T> = ReadonlyArray<Immutable<T>>;
|
|
2647
|
+
type ImmutableMap<K, V> = ReadonlyMap<Immutable<K>, Immutable<V>>;
|
|
2648
|
+
type ImmutableSet<T> = ReadonlySet<Immutable<T>>;
|
|
2649
|
+
type ImmutableObject<T> = {
|
|
2647
2650
|
readonly [K in keyof T]: Immutable<T[K]>;
|
|
2648
2651
|
};
|
|
2649
2652
|
|
|
2650
|
-
|
|
2651
|
-
|
|
2653
|
+
type Format = string & Alias;
|
|
2654
|
+
type FormattedValue = string & Alias;
|
|
2652
2655
|
|
|
2653
2656
|
interface CellAttributes {
|
|
2654
2657
|
readonly id: UID;
|
|
@@ -2667,7 +2670,7 @@ interface FormulaCell extends CellAttributes {
|
|
|
2667
2670
|
readonly compiledFormula: CompiledFormula;
|
|
2668
2671
|
readonly dependencies: Range[];
|
|
2669
2672
|
}
|
|
2670
|
-
|
|
2673
|
+
type Cell = LiteralCell | FormulaCell;
|
|
2671
2674
|
interface EvaluatedCellProperties {
|
|
2672
2675
|
readonly format?: Format;
|
|
2673
2676
|
/**
|
|
@@ -2681,8 +2684,8 @@ interface EvaluatedCellProperties {
|
|
|
2681
2684
|
readonly isAutoSummable: boolean;
|
|
2682
2685
|
readonly link?: Link;
|
|
2683
2686
|
}
|
|
2684
|
-
|
|
2685
|
-
|
|
2687
|
+
type CellValue = string | number | boolean;
|
|
2688
|
+
type EvaluatedCell = NumberCell | TextCell | BooleanCell | EmptyCell | ErrorCell;
|
|
2686
2689
|
interface NumberCell extends EvaluatedCellProperties {
|
|
2687
2690
|
readonly type: CellValueType.number;
|
|
2688
2691
|
readonly value: number;
|
|
@@ -2742,7 +2745,7 @@ interface FormulaModifier {
|
|
|
2742
2745
|
increment: number;
|
|
2743
2746
|
current: number;
|
|
2744
2747
|
}
|
|
2745
|
-
|
|
2748
|
+
type AutofillModifier = IncrementModifier | AlphanumericIncrementModifier | CopyModifier | FormulaModifier;
|
|
2746
2749
|
interface Tooltip {
|
|
2747
2750
|
props: any;
|
|
2748
2751
|
component?: any;
|
|
@@ -2783,7 +2786,7 @@ interface Currency {
|
|
|
2783
2786
|
position: "before" | "after";
|
|
2784
2787
|
}
|
|
2785
2788
|
|
|
2786
|
-
|
|
2789
|
+
type ClipboardReadResult = {
|
|
2787
2790
|
status: "ok";
|
|
2788
2791
|
content: string;
|
|
2789
2792
|
} | {
|
|
@@ -2795,7 +2798,7 @@ interface ClipboardInterface {
|
|
|
2795
2798
|
readText(): Promise<ClipboardReadResult>;
|
|
2796
2799
|
}
|
|
2797
2800
|
|
|
2798
|
-
|
|
2801
|
+
type TranslationFunction = (string: string, ...values: string[] | [{
|
|
2799
2802
|
[key: string]: string;
|
|
2800
2803
|
}]) => string;
|
|
2801
2804
|
/***
|
|
@@ -2830,7 +2833,7 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
|
|
|
2830
2833
|
loadCurrencies?: () => Promise<Currency[]>;
|
|
2831
2834
|
}
|
|
2832
2835
|
|
|
2833
|
-
|
|
2836
|
+
type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "RANGE<ANY>" | "META";
|
|
2834
2837
|
interface ArgDefinition {
|
|
2835
2838
|
repeating?: boolean;
|
|
2836
2839
|
optional?: boolean;
|
|
@@ -2841,8 +2844,8 @@ interface ArgDefinition {
|
|
|
2841
2844
|
default?: boolean;
|
|
2842
2845
|
defaultValue?: any;
|
|
2843
2846
|
}
|
|
2844
|
-
|
|
2845
|
-
|
|
2847
|
+
type ComputeFunctionArg<T> = T | (() => T) | undefined;
|
|
2848
|
+
type ComputeFunction<T, R> = (this: EvalContext, ...args: ComputeFunctionArg<T>[]) => R;
|
|
2846
2849
|
interface AddFunctionDescription {
|
|
2847
2850
|
description: string;
|
|
2848
2851
|
compute: ComputeFunction<ArgValue, FunctionReturnValue>;
|
|
@@ -2859,7 +2862,7 @@ interface FunctionDescription extends AddFunctionDescription {
|
|
|
2859
2862
|
nbrArgRepeating: number;
|
|
2860
2863
|
getArgToFocus: (argPosition: number) => number;
|
|
2861
2864
|
}
|
|
2862
|
-
|
|
2865
|
+
type EvalContext = {
|
|
2863
2866
|
__lastFnCalled?: string;
|
|
2864
2867
|
__originCellXC?: () => string;
|
|
2865
2868
|
[key: string]: any;
|
|
@@ -3485,7 +3488,7 @@ declare class ImagePlugin extends CorePlugin<ImageState> implements ImageState {
|
|
|
3485
3488
|
private getAllImages;
|
|
3486
3489
|
}
|
|
3487
3490
|
|
|
3488
|
-
|
|
3491
|
+
type SheetMergeCellMap = Record<number, Record<number, number | undefined> | undefined>;
|
|
3489
3492
|
interface MergeState {
|
|
3490
3493
|
readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
|
|
3491
3494
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
@@ -4387,6 +4390,7 @@ declare class ClipboardPlugin extends UIPlugin {
|
|
|
4387
4390
|
private state?;
|
|
4388
4391
|
private lastPasteState?;
|
|
4389
4392
|
private _isPaintingFormat;
|
|
4393
|
+
private originSheetId?;
|
|
4390
4394
|
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4391
4395
|
handle(cmd: Command): void;
|
|
4392
4396
|
/**
|
|
@@ -4593,7 +4597,7 @@ declare class InternalViewport {
|
|
|
4593
4597
|
private adjustViewportZoneY;
|
|
4594
4598
|
}
|
|
4595
4599
|
|
|
4596
|
-
|
|
4600
|
+
type SheetViewports = {
|
|
4597
4601
|
topLeft: InternalViewport | undefined;
|
|
4598
4602
|
bottomLeft: InternalViewport | undefined;
|
|
4599
4603
|
topRight: InternalViewport | undefined;
|
|
@@ -4775,46 +4779,46 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
4775
4779
|
* This can be generalized because the union of all indices `0 | 1 | 2 | 3 | ...`
|
|
4776
4780
|
* is actually the type `number`.
|
|
4777
4781
|
*/
|
|
4778
|
-
|
|
4782
|
+
type GetterNames<Plugin extends {
|
|
4779
4783
|
getters: readonly string[];
|
|
4780
4784
|
}> = Plugin["getters"][number];
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4785
|
+
type SheetGetters = Pick<SheetPlugin, GetterNames<typeof SheetPlugin>>;
|
|
4786
|
+
type HeaderSizeGetters = Pick<HeaderSizePlugin, GetterNames<typeof HeaderSizePlugin>>;
|
|
4787
|
+
type HeaderVisibilityGetters = Pick<HeaderVisibilityPlugin, GetterNames<typeof HeaderVisibilityPlugin>>;
|
|
4788
|
+
type CellGetters = Pick<CellPlugin, GetterNames<typeof CellPlugin>>;
|
|
4789
|
+
type MergeGetters = Pick<MergePlugin, GetterNames<typeof MergePlugin>>;
|
|
4790
|
+
type BordersGetters = Pick<BordersPlugin, GetterNames<typeof BordersPlugin>>;
|
|
4791
|
+
type ChartGetters = Pick<ChartPlugin, GetterNames<typeof ChartPlugin>>;
|
|
4792
|
+
type ImageGetters = Pick<ImagePlugin, GetterNames<typeof ImagePlugin>>;
|
|
4793
|
+
type FigureGetters = Pick<FigurePlugin, GetterNames<typeof FigurePlugin>>;
|
|
4794
|
+
type RangeAdapterGetters = Pick<RangeAdapter, GetterNames<typeof RangeAdapter>>;
|
|
4795
|
+
type ConditionalFormatGetters = Pick<ConditionalFormatPlugin, GetterNames<typeof ConditionalFormatPlugin>>;
|
|
4796
|
+
type LocalHistoryGetters = Pick<HistoryPlugin, GetterNames<typeof HistoryPlugin>>;
|
|
4797
|
+
type FiltersGetters = Pick<FiltersPlugin, GetterNames<typeof FiltersPlugin>>;
|
|
4798
|
+
type CoreGetters = SheetGetters & HeaderSizeGetters & HeaderVisibilityGetters & CellGetters & MergeGetters & BordersGetters & ChartGetters & ImageGetters & ConditionalFormatGetters & FigureGetters & RangeAdapterGetters & FiltersGetters;
|
|
4799
|
+
type AutofillGetters = Pick<AutofillPlugin, GetterNames<typeof AutofillPlugin>>;
|
|
4800
|
+
type AutomaticSumGetters = Pick<AutomaticSumPlugin, GetterNames<typeof AutomaticSumPlugin>>;
|
|
4801
|
+
type ClipboardGetters = Pick<ClipboardPlugin, GetterNames<typeof ClipboardPlugin>>;
|
|
4802
|
+
type EditionGetters = Pick<EditionPlugin, GetterNames<typeof EditionPlugin>>;
|
|
4803
|
+
type EvaluationGetters = Pick<EvaluationPlugin, GetterNames<typeof EvaluationPlugin>>;
|
|
4804
|
+
type EvaluationChartGetters = Pick<EvaluationChartPlugin, GetterNames<typeof EvaluationChartPlugin>>;
|
|
4805
|
+
type EvaluationConditionalFormatGetters = Pick<EvaluationConditionalFormatPlugin, GetterNames<typeof EvaluationConditionalFormatPlugin>>;
|
|
4806
|
+
type FindAndReplaceGetters = Pick<FindAndReplacePlugin, GetterNames<typeof FindAndReplacePlugin>>;
|
|
4807
|
+
type HeaderVisibilityIUIGetters = Pick<HeaderVisibilityUIPlugin, GetterNames<typeof HeaderVisibilityUIPlugin>>;
|
|
4808
|
+
type HighlightGetters = Pick<HighlightPlugin, GetterNames<typeof HighlightPlugin>>;
|
|
4809
|
+
type CustomColorsGetters = Pick<CustomColorsPlugin, GetterNames<typeof CustomColorsPlugin>>;
|
|
4810
|
+
type RendererGetters = Pick<RendererPlugin, GetterNames<typeof RendererPlugin>>;
|
|
4811
|
+
type SelectionGetters = Pick<GridSelectionPlugin, GetterNames<typeof GridSelectionPlugin>>;
|
|
4812
|
+
type SelectionInputGetters = Pick<SelectionInputsManagerPlugin, GetterNames<typeof SelectionInputsManagerPlugin>>;
|
|
4813
|
+
type CollaborativeGetters = Pick<CollaborativePlugin, GetterNames<typeof CollaborativePlugin>>;
|
|
4814
|
+
type SortGetters = Pick<SortPlugin, GetterNames<typeof SortPlugin>>;
|
|
4815
|
+
type UIOptionsGetters = Pick<UIOptionsPlugin, GetterNames<typeof UIOptionsPlugin>>;
|
|
4816
|
+
type SheetUIGetters = Pick<SheetUIPlugin, GetterNames<typeof SheetUIPlugin>>;
|
|
4817
|
+
type ViewportGetters = Pick<SheetViewPlugin, GetterNames<typeof SheetViewPlugin>>;
|
|
4818
|
+
type CellPopoverPluginGetters = Pick<CellPopoverPlugin, GetterNames<typeof CellPopoverPlugin>>;
|
|
4819
|
+
type FilterEvaluationGetters = Pick<FilterEvaluationPlugin, GetterNames<typeof FilterEvaluationPlugin>>;
|
|
4820
|
+
type SplitToColumnsGetters = Pick<SplitToColumnsPlugin, GetterNames<typeof SplitToColumnsPlugin>>;
|
|
4821
|
+
type Getters = {
|
|
4818
4822
|
isReadonly: () => boolean;
|
|
4819
4823
|
isDashboard: () => boolean;
|
|
4820
4824
|
} & LocalHistoryGetters & CoreGetters & AutofillGetters & AutomaticSumGetters & ClipboardGetters & EditionGetters & EvaluationGetters & EvaluationChartGetters & EvaluationConditionalFormatGetters & FindAndReplaceGetters & HighlightGetters & CustomColorsGetters & RendererGetters & SelectionGetters & SelectionInputGetters & CollaborativeGetters & SortGetters & UIOptionsGetters & SheetUIGetters & ViewportGetters & CellPopoverPluginGetters & FilterEvaluationGetters & HeaderVisibilityIUIGetters & SplitToColumnsGetters;
|
|
@@ -4833,7 +4837,7 @@ interface WorkbookHistory<Plugin> {
|
|
|
4833
4837
|
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;
|
|
4834
4838
|
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;
|
|
4835
4839
|
}
|
|
4836
|
-
|
|
4840
|
+
type Transformation<T = unknown> = (dataToTransform: T) => T;
|
|
4837
4841
|
interface TransformationFactory<T = unknown> {
|
|
4838
4842
|
/**
|
|
4839
4843
|
* Build a transformation function to transform any operation as if the execution of
|
|
@@ -4847,12 +4851,12 @@ interface TransformationFactory<T = unknown> {
|
|
|
4847
4851
|
with: (operation: T) => Transformation<T>;
|
|
4848
4852
|
}
|
|
4849
4853
|
|
|
4850
|
-
|
|
4851
|
-
|
|
4854
|
+
type SelectionDirection = "up" | "down" | "left" | "right";
|
|
4855
|
+
type SelectionStep = number | "end";
|
|
4852
4856
|
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4857
|
+
type CellPopoverType = "ErrorToolTip" | "LinkDisplay" | "FilterMenu" | "LinkEditor";
|
|
4858
|
+
type PopoverPropsPosition = "TopRight" | "BottomLeft";
|
|
4859
|
+
type MaxSizedComponentConstructor = ComponentConstructor & {
|
|
4856
4860
|
maxSize?: {
|
|
4857
4861
|
maxWidth?: number;
|
|
4858
4862
|
maxHeight?: number;
|
|
@@ -4862,7 +4866,7 @@ declare type MaxSizedComponentConstructor = ComponentConstructor & {
|
|
|
4862
4866
|
* If the cell at the given position have an associated component (linkDisplay, errorTooltip, ...),
|
|
4863
4867
|
* returns the parameters to display the component
|
|
4864
4868
|
*/
|
|
4865
|
-
|
|
4869
|
+
type CellPopoverBuilder = (position: CellPosition, getters: Getters) => CellPopoverComponent<MaxSizedComponentConstructor>;
|
|
4866
4870
|
interface PopoverBuilders {
|
|
4867
4871
|
onOpen?: CellPopoverBuilder;
|
|
4868
4872
|
onHover?: CellPopoverBuilder;
|
|
@@ -4875,14 +4879,14 @@ interface ClosedCellPopover {
|
|
|
4875
4879
|
* i.e. which component class, which props and where to
|
|
4876
4880
|
* display it relative to the cell
|
|
4877
4881
|
*/
|
|
4878
|
-
|
|
4882
|
+
type OpenCellPopover<C extends ComponentConstructor> = {
|
|
4879
4883
|
isOpen: true;
|
|
4880
4884
|
Component: C;
|
|
4881
4885
|
props: PropsOf<C>;
|
|
4882
4886
|
cellCorner: PopoverPropsPosition;
|
|
4883
4887
|
};
|
|
4884
|
-
|
|
4885
|
-
|
|
4888
|
+
type CellPopoverComponent<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = ClosedCellPopover | OpenCellPopover<C>;
|
|
4889
|
+
type PositionedCellPopover<C extends MaxSizedComponentConstructor = MaxSizedComponentConstructor> = {
|
|
4886
4890
|
isOpen: true;
|
|
4887
4891
|
Component: C;
|
|
4888
4892
|
props: PropsOf<C>;
|
|
@@ -4951,7 +4955,7 @@ interface LinkSpec {
|
|
|
4951
4955
|
declare function urlRepresentation(link: Link, getters: Getters): string;
|
|
4952
4956
|
declare function openLink(link: Link, env: SpreadsheetChildEnv): void;
|
|
4953
4957
|
|
|
4954
|
-
|
|
4958
|
+
type TransformationFunction<U extends CoreCommandTypes, V extends CoreCommandTypes> = (toTransform: Extract<CoreCommand, {
|
|
4955
4959
|
type: U;
|
|
4956
4960
|
}>, executed: Extract<CoreCommand, {
|
|
4957
4961
|
type: V;
|
|
@@ -5232,7 +5236,7 @@ declare class LineBarPieDesignPanel extends Component<Props$A, SpreadsheetChildE
|
|
|
5232
5236
|
setup(): void;
|
|
5233
5237
|
toggleColorPicker(): void;
|
|
5234
5238
|
updateBackgroundColor(color: Color): void;
|
|
5235
|
-
updateTitle(
|
|
5239
|
+
updateTitle(): void;
|
|
5236
5240
|
updateSelect(attr: string, ev: any): void;
|
|
5237
5241
|
}
|
|
5238
5242
|
|
|
@@ -5257,7 +5261,7 @@ declare class GaugeChartConfigPanel extends Component<Props$z, SpreadsheetChildE
|
|
|
5257
5261
|
getDataRange(): string;
|
|
5258
5262
|
}
|
|
5259
5263
|
|
|
5260
|
-
|
|
5264
|
+
type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectionColor-middleColor" | "sectionColor-upperColor";
|
|
5261
5265
|
interface Props$y {
|
|
5262
5266
|
figureId: UID;
|
|
5263
5267
|
definition: GaugeChartDefinition;
|
|
@@ -5274,7 +5278,7 @@ declare class GaugeChartDesignPanel extends Component<Props$y, SpreadsheetChildE
|
|
|
5274
5278
|
setup(): void;
|
|
5275
5279
|
get designErrorMessages(): string[];
|
|
5276
5280
|
updateBackgroundColor(color: Color): void;
|
|
5277
|
-
updateTitle(
|
|
5281
|
+
updateTitle(): void;
|
|
5278
5282
|
isRangeMinInvalid(): boolean;
|
|
5279
5283
|
isRangeMaxInvalid(): boolean;
|
|
5280
5284
|
get isLowerInflectionPointInvalid(): boolean;
|
|
@@ -5321,7 +5325,7 @@ declare class ScorecardChartConfigPanel extends Component<Props$x, SpreadsheetCh
|
|
|
5321
5325
|
updateBaselineMode(ev: any): void;
|
|
5322
5326
|
}
|
|
5323
5327
|
|
|
5324
|
-
|
|
5328
|
+
type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" | "baselineColorDown";
|
|
5325
5329
|
interface Props$w {
|
|
5326
5330
|
figureId: UID;
|
|
5327
5331
|
definition: ScorecardChartDefinition;
|
|
@@ -5335,7 +5339,7 @@ declare class ScorecardChartDesignPanel extends Component<Props$w, SpreadsheetCh
|
|
|
5335
5339
|
};
|
|
5336
5340
|
private state;
|
|
5337
5341
|
setup(): void;
|
|
5338
|
-
updateTitle(
|
|
5342
|
+
updateTitle(): void;
|
|
5339
5343
|
updateBaselineDescr(ev: any): void;
|
|
5340
5344
|
toggleColorPicker(colorPickerId: ColorPickerId): void;
|
|
5341
5345
|
setColor(color: Color, colorPickerId: ColorPickerId): void;
|
|
@@ -5414,8 +5418,8 @@ interface Action {
|
|
|
5414
5418
|
separator: boolean;
|
|
5415
5419
|
textColor?: Color;
|
|
5416
5420
|
}
|
|
5417
|
-
|
|
5418
|
-
|
|
5421
|
+
type ActionBuilder = (env: SpreadsheetChildEnv) => ActionSpec[];
|
|
5422
|
+
type ActionChildren = (ActionSpec | ActionBuilder)[];
|
|
5419
5423
|
|
|
5420
5424
|
/**
|
|
5421
5425
|
* This registry is intended to map a type of figure (tag) to a class of
|
|
@@ -5518,7 +5522,7 @@ declare class ScorecardChart extends Component<Props$u, SpreadsheetChildEnv> {
|
|
|
5518
5522
|
private getWidestElement;
|
|
5519
5523
|
}
|
|
5520
5524
|
|
|
5521
|
-
|
|
5525
|
+
type MenuItemOrSeparator = Action | "separator";
|
|
5522
5526
|
interface Props$t {
|
|
5523
5527
|
position: DOMCoordinates;
|
|
5524
5528
|
menuItems: Action[];
|
|
@@ -5572,7 +5576,7 @@ declare class Menu extends Component<Props$t, SpreadsheetChildEnv> {
|
|
|
5572
5576
|
onMouseOver(menu: Action, position: Pixel, ev: MouseEvent): void;
|
|
5573
5577
|
}
|
|
5574
5578
|
|
|
5575
|
-
|
|
5579
|
+
type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
|
|
5576
5580
|
interface Props$s {
|
|
5577
5581
|
figure: Figure;
|
|
5578
5582
|
style: string;
|
|
@@ -5857,8 +5861,8 @@ declare class FilterIconsOverlay extends Component<Props$l, SpreadsheetChildEnv>
|
|
|
5857
5861
|
private isPositionVisible;
|
|
5858
5862
|
}
|
|
5859
5863
|
|
|
5860
|
-
|
|
5861
|
-
|
|
5864
|
+
type HFigureAxisType = "top" | "bottom" | "vCenter";
|
|
5865
|
+
type VFigureAxisType = "right" | "left" | "hCenter";
|
|
5862
5866
|
interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
5863
5867
|
matchedFigIds: UID[];
|
|
5864
5868
|
snapOffset: number;
|
|
@@ -5866,7 +5870,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
|
5866
5870
|
position: Pixel;
|
|
5867
5871
|
}
|
|
5868
5872
|
|
|
5869
|
-
|
|
5873
|
+
type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
|
|
5870
5874
|
interface Props$k {
|
|
5871
5875
|
onFigureDeleted: () => void;
|
|
5872
5876
|
}
|
|
@@ -6028,7 +6032,7 @@ declare class GridPopover extends Component<Props$i, SpreadsheetChildEnv> {
|
|
|
6028
6032
|
get cellPopover(): PositionedCellPopover | ClosedCellPopover;
|
|
6029
6033
|
}
|
|
6030
6034
|
|
|
6031
|
-
|
|
6035
|
+
type ScrollDirection = "horizontal" | "vertical";
|
|
6032
6036
|
|
|
6033
6037
|
interface Props$h {
|
|
6034
6038
|
width: Pixel;
|
|
@@ -6420,7 +6424,7 @@ declare class ActionButton extends Component<Props$c, SpreadsheetChildEnv> {
|
|
|
6420
6424
|
get buttonStyle(): string;
|
|
6421
6425
|
}
|
|
6422
6426
|
|
|
6423
|
-
|
|
6427
|
+
type Tool = "borderColorTool" | "borderTypeTool";
|
|
6424
6428
|
interface State$3 {
|
|
6425
6429
|
activeTool: Tool | undefined;
|
|
6426
6430
|
}
|
|
@@ -6520,6 +6524,10 @@ declare class ContentEditableHelper {
|
|
|
6520
6524
|
*/
|
|
6521
6525
|
setText(contents: HtmlContent[][]): void;
|
|
6522
6526
|
scrollSelectionIntoView(): void;
|
|
6527
|
+
/**
|
|
6528
|
+
* remove the current selection of the user
|
|
6529
|
+
* */
|
|
6530
|
+
removeSelection(): void;
|
|
6523
6531
|
private removeAll;
|
|
6524
6532
|
/**
|
|
6525
6533
|
* finds the indexes of the current selection.
|
|
@@ -6567,7 +6575,7 @@ declare class FunctionDescriptionProvider extends Component<Props$9> {
|
|
|
6567
6575
|
onMouseMove(): void;
|
|
6568
6576
|
}
|
|
6569
6577
|
|
|
6570
|
-
|
|
6578
|
+
type HtmlContent = {
|
|
6571
6579
|
value: string;
|
|
6572
6580
|
color?: Color;
|
|
6573
6581
|
class?: string;
|
|
@@ -6636,7 +6644,17 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6636
6644
|
onInput(ev: InputEvent): void;
|
|
6637
6645
|
onKeyup(): void;
|
|
6638
6646
|
showAutocomplete(searchTerm: string): void;
|
|
6647
|
+
/**
|
|
6648
|
+
* This is required to ensure the content helper selection is
|
|
6649
|
+
* properly updated on "onclick" events. Depending on the browser,
|
|
6650
|
+
* the callback onClick from the composer will be executed before
|
|
6651
|
+
* the selection was updated in the dom, which means we capture an
|
|
6652
|
+
* wrong selection which is then forced upon the content helper on
|
|
6653
|
+
* patchContent.
|
|
6654
|
+
*/
|
|
6655
|
+
onMousedown(ev: MouseEvent): void;
|
|
6639
6656
|
onClick(): void;
|
|
6657
|
+
onDblClick(): void;
|
|
6640
6658
|
private processContent;
|
|
6641
6659
|
/**
|
|
6642
6660
|
* Get the HTML content corresponding to the current composer token, divided by lines.
|
|
@@ -6678,6 +6696,7 @@ interface State$1 {
|
|
|
6678
6696
|
interface Props$7 {
|
|
6679
6697
|
onToggle: () => void;
|
|
6680
6698
|
dropdownStyle: string;
|
|
6699
|
+
class: string;
|
|
6681
6700
|
}
|
|
6682
6701
|
declare class FontSizeEditor extends Component<Props$7, SpreadsheetChildEnv> {
|
|
6683
6702
|
static template: string;
|
|
@@ -6746,7 +6765,7 @@ declare class TopBar extends Component<Props$6, SpreadsheetChildEnv> {
|
|
|
6746
6765
|
setColor(target: string, color: Color): void;
|
|
6747
6766
|
}
|
|
6748
6767
|
|
|
6749
|
-
|
|
6768
|
+
type ComposerFocusType = "inactive" | "cellFocus" | "contentFocus";
|
|
6750
6769
|
interface SpreadsheetProps {
|
|
6751
6770
|
model: Model;
|
|
6752
6771
|
}
|
|
@@ -6937,7 +6956,7 @@ declare class HeadersOverlay extends Component<any, SpreadsheetChildEnv> {
|
|
|
6937
6956
|
selectAll(): void;
|
|
6938
6957
|
}
|
|
6939
6958
|
|
|
6940
|
-
|
|
6959
|
+
type Orientation$1 = "n" | "s" | "w" | "e";
|
|
6941
6960
|
interface Props$4 {
|
|
6942
6961
|
zone: Zone;
|
|
6943
6962
|
orientation: Orientation$1;
|
|
@@ -6950,7 +6969,7 @@ declare class Border extends Component<Props$4, SpreadsheetChildEnv> {
|
|
|
6950
6969
|
onMouseDown(ev: MouseEvent): void;
|
|
6951
6970
|
}
|
|
6952
6971
|
|
|
6953
|
-
|
|
6972
|
+
type Orientation = "nw" | "ne" | "sw" | "se";
|
|
6954
6973
|
interface Props$3 {
|
|
6955
6974
|
zone: Zone;
|
|
6956
6975
|
color: Color;
|
|
@@ -6994,7 +7013,7 @@ declare class Highlight extends Component<Props$2, SpreadsheetChildEnv> {
|
|
|
6994
7013
|
* - a horizontal resizer (to resize columns)
|
|
6995
7014
|
* - a vertical resizer (same, for rows)
|
|
6996
7015
|
*/
|
|
6997
|
-
|
|
7016
|
+
type ContextMenuType = "ROW" | "COL" | "CELL" | "FILTER";
|
|
6998
7017
|
interface Props$1 {
|
|
6999
7018
|
sidePanelIsOpen: boolean;
|
|
7000
7019
|
exposeFocus: (focus: () => void) => void;
|
|
@@ -7059,7 +7078,7 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7059
7078
|
onCellRightClicked(col: HeaderIndex, row: HeaderIndex, { x, y }: DOMCoordinates): void;
|
|
7060
7079
|
toggleContextMenu(type: ContextMenuType, x: Pixel, y: Pixel): void;
|
|
7061
7080
|
copy(cut: boolean, ev: ClipboardEvent): void;
|
|
7062
|
-
paste(ev: ClipboardEvent): void
|
|
7081
|
+
paste(ev: ClipboardEvent): Promise<void>;
|
|
7063
7082
|
private displayWarningCopyPasteNotSupported;
|
|
7064
7083
|
private clearFormatting;
|
|
7065
7084
|
private setHorizontalAlign;
|