@odoo/o-spreadsheet 16.3.0-alpha.2 → 16.3.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/o-spreadsheet.cjs.js +466 -260
- package/dist/o-spreadsheet.d.ts +130 -115
- package/dist/o-spreadsheet.esm.js +466 -260
- package/dist/o-spreadsheet.iife.js +466 -260
- package/dist/o-spreadsheet.iife.min.js +251 -256
- package/package.json +2 -2
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -294,10 +294,10 @@ declare function toZone(xc: string): Zone;
|
|
|
294
294
|
*/
|
|
295
295
|
declare function findCellInNewZone(oldZone: Zone, currentZone: Zone): Position$1;
|
|
296
296
|
declare function positionToZone(position: Position$1): {
|
|
297
|
-
left:
|
|
298
|
-
right:
|
|
299
|
-
top:
|
|
300
|
-
bottom:
|
|
297
|
+
left: HeaderIndex;
|
|
298
|
+
right: HeaderIndex;
|
|
299
|
+
top: HeaderIndex;
|
|
300
|
+
bottom: HeaderIndex;
|
|
301
301
|
};
|
|
302
302
|
|
|
303
303
|
interface SelectionEventPayload {
|
|
@@ -406,9 +406,9 @@ interface SectionRule {
|
|
|
406
406
|
readonly upperInflectionPoint: SectionThreshold;
|
|
407
407
|
}
|
|
408
408
|
interface ColorSet {
|
|
409
|
-
readonly lowerColor:
|
|
410
|
-
readonly middleColor:
|
|
411
|
-
readonly upperColor:
|
|
409
|
+
readonly lowerColor: Color;
|
|
410
|
+
readonly middleColor: Color;
|
|
411
|
+
readonly upperColor: Color;
|
|
412
412
|
}
|
|
413
413
|
interface SectionThreshold {
|
|
414
414
|
readonly type: "number" | "percentage";
|
|
@@ -435,13 +435,13 @@ interface GaugeChartOptions extends ChartOptions {
|
|
|
435
435
|
radiusPercentage: number;
|
|
436
436
|
widthPercentage: number;
|
|
437
437
|
lengthPercentage: number;
|
|
438
|
-
color:
|
|
438
|
+
color: Color;
|
|
439
439
|
};
|
|
440
440
|
valueLabel?: {
|
|
441
441
|
formatter: (() => string) | null;
|
|
442
442
|
display: boolean;
|
|
443
|
-
color:
|
|
444
|
-
backgroundColor:
|
|
443
|
+
color: Color;
|
|
444
|
+
backgroundColor: Color;
|
|
445
445
|
borderRadius: number;
|
|
446
446
|
fontSize: number;
|
|
447
447
|
padding: {
|
|
@@ -986,6 +986,7 @@ declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
|
986
986
|
uuidGenerator: UuidGenerator;
|
|
987
987
|
constructor(data?: any, config?: Partial<ModelConfig>, stateUpdateMessages?: StateUpdateMessage[], uuidGenerator?: UuidGenerator, verboseImport?: boolean);
|
|
988
988
|
get handlers(): CommandHandler<Command>[];
|
|
989
|
+
get coreHandlers(): CommandHandler<Command>[];
|
|
989
990
|
get allUIPlugins(): UIPlugin[];
|
|
990
991
|
joinSession(): void;
|
|
991
992
|
leaveSession(): void;
|
|
@@ -1007,7 +1008,14 @@ declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
|
1007
1008
|
* Check if the given command is allowed by all the plugins and the history.
|
|
1008
1009
|
*/
|
|
1009
1010
|
private checkDispatchAllowed;
|
|
1011
|
+
private checkDispatchAllowedCoreCommand;
|
|
1012
|
+
private checkDispatchAllowedLocalCommand;
|
|
1010
1013
|
private finalize;
|
|
1014
|
+
/**
|
|
1015
|
+
* Check if a command can be dispatched, and returns a DispatchResult object with the possible
|
|
1016
|
+
* reasons the dispatch failed.
|
|
1017
|
+
*/
|
|
1018
|
+
canDispatch: CommandDispatcher["canDispatch"];
|
|
1011
1019
|
/**
|
|
1012
1020
|
* The dispatch method is the only entry point to manipulate data in the model.
|
|
1013
1021
|
* This is through this method that commands are dispatched most of the time
|
|
@@ -1260,7 +1268,7 @@ interface ComposerSelection {
|
|
|
1260
1268
|
end: number;
|
|
1261
1269
|
}
|
|
1262
1270
|
declare class EditionPlugin extends UIPlugin {
|
|
1263
|
-
static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "
|
|
1271
|
+
static getters: readonly ["getEditionMode", "isSelectingForComposer", "showSelectionIndicator", "getCurrentContent", "getComposerSelection", "getCurrentTokens", "getTokenAtCursor", "getComposerHighlights", "getCurrentEditedCell"];
|
|
1264
1272
|
private col;
|
|
1265
1273
|
private row;
|
|
1266
1274
|
private mode;
|
|
@@ -1274,12 +1282,11 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1274
1282
|
private previousRef;
|
|
1275
1283
|
private previousRange;
|
|
1276
1284
|
private colorIndexByRange;
|
|
1277
|
-
allowDispatch(cmd:
|
|
1285
|
+
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
1278
1286
|
private handleEvent;
|
|
1279
1287
|
handle(cmd: Command): void;
|
|
1280
1288
|
getEditionMode(): EditionMode;
|
|
1281
1289
|
getCurrentContent(): string;
|
|
1282
|
-
getEditionSheet(): string;
|
|
1283
1290
|
getComposerSelection(): ComposerSelection;
|
|
1284
1291
|
getCurrentEditedCell(): CellPosition;
|
|
1285
1292
|
isSelectingForComposer(): boolean;
|
|
@@ -1622,8 +1629,8 @@ interface CreateChartCommand extends SheetDependentCommand {
|
|
|
1622
1629
|
type: "CREATE_CHART";
|
|
1623
1630
|
id: UID;
|
|
1624
1631
|
position?: {
|
|
1625
|
-
x:
|
|
1626
|
-
y:
|
|
1632
|
+
x: Pixel;
|
|
1633
|
+
y: Pixel;
|
|
1627
1634
|
};
|
|
1628
1635
|
size?: FigureSize;
|
|
1629
1636
|
definition: ChartDefinition;
|
|
@@ -1637,8 +1644,8 @@ interface CreateImageOverCommand extends SheetDependentCommand {
|
|
|
1637
1644
|
type: "CREATE_IMAGE";
|
|
1638
1645
|
figureId: UID;
|
|
1639
1646
|
position: {
|
|
1640
|
-
x:
|
|
1641
|
-
y:
|
|
1647
|
+
x: Pixel;
|
|
1648
|
+
y: Pixel;
|
|
1642
1649
|
};
|
|
1643
1650
|
size: FigureSize;
|
|
1644
1651
|
definition: Image;
|
|
@@ -1742,7 +1749,7 @@ interface StopSelectionCommand {
|
|
|
1742
1749
|
*/
|
|
1743
1750
|
interface SetColorCommand {
|
|
1744
1751
|
type: "SET_HIGHLIGHT_COLOR";
|
|
1745
|
-
color:
|
|
1752
|
+
color: Color;
|
|
1746
1753
|
}
|
|
1747
1754
|
interface EvaluateCellsCommand {
|
|
1748
1755
|
type: "EVALUATE_CELLS";
|
|
@@ -2150,6 +2157,9 @@ interface CommandDispatcher {
|
|
|
2150
2157
|
dispatch<T extends CommandTypes, C extends Extract<Command, {
|
|
2151
2158
|
type: T;
|
|
2152
2159
|
}>>(type: T, r: Omit<C, "type">): DispatchResult;
|
|
2160
|
+
canDispatch<T extends CommandTypes, C extends Extract<Command, {
|
|
2161
|
+
type: T;
|
|
2162
|
+
}>>(type: T, r: Omit<C, "type">): DispatchResult;
|
|
2153
2163
|
}
|
|
2154
2164
|
interface CoreCommandDispatcher {
|
|
2155
2165
|
dispatch<T extends CoreCommandTypes, C extends Extract<CoreCommand, {
|
|
@@ -2158,6 +2168,9 @@ interface CoreCommandDispatcher {
|
|
|
2158
2168
|
dispatch<T extends CoreCommandTypes, C extends Extract<CoreCommand, {
|
|
2159
2169
|
type: T;
|
|
2160
2170
|
}>>(type: T, r: Omit<C, "type">): DispatchResult;
|
|
2171
|
+
canDispatch<T extends CoreCommandTypes, C extends Extract<CoreCommand, {
|
|
2172
|
+
type: T;
|
|
2173
|
+
}>>(type: T, r: Omit<C, "type">): DispatchResult;
|
|
2161
2174
|
}
|
|
2162
2175
|
declare type CommandTypes = Command["type"];
|
|
2163
2176
|
declare type CoreCommandTypes = CoreCommand["type"];
|
|
@@ -2167,7 +2180,7 @@ declare type CoreCommandTypes = CoreCommand["type"];
|
|
|
2167
2180
|
* Intellisense from resolving it.
|
|
2168
2181
|
* See https://github.com/microsoft/TypeScript/issues/31940#issuecomment-841712377
|
|
2169
2182
|
*/
|
|
2170
|
-
declare type Alias = {};
|
|
2183
|
+
declare type Alias = {} & {};
|
|
2171
2184
|
declare type HeaderIndex = number & Alias;
|
|
2172
2185
|
declare type Pixel = number & Alias;
|
|
2173
2186
|
declare type UID = string & Alias;
|
|
@@ -2231,8 +2244,8 @@ interface Style {
|
|
|
2231
2244
|
align?: Align;
|
|
2232
2245
|
wrapping?: Wrapping;
|
|
2233
2246
|
verticalAlign?: VerticalAlign;
|
|
2234
|
-
fillColor?:
|
|
2235
|
-
textColor?:
|
|
2247
|
+
fillColor?: Color;
|
|
2248
|
+
textColor?: Color;
|
|
2236
2249
|
fontSize?: number;
|
|
2237
2250
|
}
|
|
2238
2251
|
interface UpdateCellData {
|
|
@@ -2315,7 +2328,7 @@ interface Merge extends Zone {
|
|
|
2315
2328
|
interface Highlight$1 {
|
|
2316
2329
|
zone: Zone;
|
|
2317
2330
|
sheetId: UID;
|
|
2318
|
-
color:
|
|
2331
|
+
color: Color | null;
|
|
2319
2332
|
}
|
|
2320
2333
|
interface PaneDivision {
|
|
2321
2334
|
/** Represents the number of frozen columns */
|
|
@@ -3277,6 +3290,9 @@ declare class FigurePlugin extends CorePlugin<FigureState> implements FigureStat
|
|
|
3277
3290
|
};
|
|
3278
3291
|
allowDispatch(cmd: CoreCommand): CommandResult;
|
|
3279
3292
|
handle(cmd: CoreCommand): void;
|
|
3293
|
+
private onRowColDelete;
|
|
3294
|
+
private onRowDeletion;
|
|
3295
|
+
private onColDeletion;
|
|
3280
3296
|
private updateFigure;
|
|
3281
3297
|
private addFigure;
|
|
3282
3298
|
private deleteSheet;
|
|
@@ -3305,7 +3321,7 @@ declare class Filter {
|
|
|
3305
3321
|
readonly id: UID;
|
|
3306
3322
|
readonly zoneWithHeaders: Zone;
|
|
3307
3323
|
constructor(id: UID, zone: Zone);
|
|
3308
|
-
get col():
|
|
3324
|
+
get col(): HeaderIndex;
|
|
3309
3325
|
/** Filtered zone, ie. zone of the filter without the header */
|
|
3310
3326
|
get filteredZone(): Zone | undefined;
|
|
3311
3327
|
}
|
|
@@ -3776,7 +3792,7 @@ declare class FilterEvaluationPlugin extends UIPlugin {
|
|
|
3776
3792
|
private filterValues;
|
|
3777
3793
|
hiddenRows: Set<number>;
|
|
3778
3794
|
isEvaluationDirty: boolean;
|
|
3779
|
-
allowDispatch(cmd:
|
|
3795
|
+
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
3780
3796
|
handle(cmd: Command): void;
|
|
3781
3797
|
finalize(): void;
|
|
3782
3798
|
isRowFiltered(sheetId: UID, row: number): boolean;
|
|
@@ -3811,8 +3827,8 @@ declare class InternalViewport {
|
|
|
3811
3827
|
offsetScrollbarY: Pixel;
|
|
3812
3828
|
canScrollVertically: boolean;
|
|
3813
3829
|
canScrollHorizontally: boolean;
|
|
3814
|
-
|
|
3815
|
-
|
|
3830
|
+
viewportWidth: Pixel;
|
|
3831
|
+
viewportHeight: Pixel;
|
|
3816
3832
|
offsetCorrectionX: Pixel;
|
|
3817
3833
|
offsetCorrectionY: Pixel;
|
|
3818
3834
|
constructor(getters: Getters, sheetId: UID, boundaries: Zone, sizeInGrid: {
|
|
@@ -3825,6 +3841,10 @@ declare class InternalViewport {
|
|
|
3825
3841
|
x: Pixel;
|
|
3826
3842
|
y: Pixel;
|
|
3827
3843
|
});
|
|
3844
|
+
/** Returns the maximum size (in Pixels) of the viewport relative to its allocated client size
|
|
3845
|
+
* When the viewport grid size is smaller than its client width (resp. height), it will return
|
|
3846
|
+
* the client width (resp. height).
|
|
3847
|
+
*/
|
|
3828
3848
|
getMaxSize(): DOMDimension;
|
|
3829
3849
|
/**
|
|
3830
3850
|
* Return the index of a column given an offset x, based on the pane left
|
|
@@ -3936,7 +3956,7 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
3936
3956
|
private gridOffsetX;
|
|
3937
3957
|
private gridOffsetY;
|
|
3938
3958
|
private sheetsWithDirtyViewports;
|
|
3939
|
-
allowDispatch(cmd:
|
|
3959
|
+
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
3940
3960
|
private handleEvent;
|
|
3941
3961
|
handle(cmd: Command): void;
|
|
3942
3962
|
finalize(): void;
|
|
@@ -3970,8 +3990,7 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
3970
3990
|
getSheetViewVisibleCols(): HeaderIndex[];
|
|
3971
3991
|
getSheetViewVisibleRows(): HeaderIndex[];
|
|
3972
3992
|
/**
|
|
3973
|
-
* Return the main viewport maximum size
|
|
3974
|
-
* with some bottom and right padding.
|
|
3993
|
+
* Return the main viewport maximum size relative to the client size.
|
|
3975
3994
|
*/
|
|
3976
3995
|
getMainViewportRect(): Rect;
|
|
3977
3996
|
private getMaximumSheetOffset;
|
|
@@ -4042,7 +4061,7 @@ declare class AutofillPlugin extends UIPlugin {
|
|
|
4042
4061
|
private lastCellSelected;
|
|
4043
4062
|
private direction;
|
|
4044
4063
|
private tooltip;
|
|
4045
|
-
allowDispatch(cmd:
|
|
4064
|
+
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4046
4065
|
handle(cmd: Command): void;
|
|
4047
4066
|
getAutofillTooltip(): Tooltip | undefined;
|
|
4048
4067
|
/**
|
|
@@ -4187,7 +4206,7 @@ declare class AutomaticSumPlugin extends UIPlugin {
|
|
|
4187
4206
|
declare class CellPopoverPlugin extends UIPlugin {
|
|
4188
4207
|
static getters: readonly ["getCellPopover", "getPersistentPopoverTypeAtPosition", "hasOpenedPopover"];
|
|
4189
4208
|
private persistentPopover?;
|
|
4190
|
-
allowDispatch(cmd:
|
|
4209
|
+
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4191
4210
|
handle(cmd: Command): void;
|
|
4192
4211
|
getCellPopover({ col, row }: Partial<Position$1>): ClosedCellPopover | PositionedCellPopover;
|
|
4193
4212
|
hasOpenedPopover(): boolean;
|
|
@@ -4266,7 +4285,7 @@ declare class RendererPlugin extends UIPlugin {
|
|
|
4266
4285
|
interface RangeInputValue {
|
|
4267
4286
|
id: number;
|
|
4268
4287
|
xc: string;
|
|
4269
|
-
color:
|
|
4288
|
+
color: Color;
|
|
4270
4289
|
}
|
|
4271
4290
|
/**
|
|
4272
4291
|
* Selection input Plugin
|
|
@@ -4284,7 +4303,7 @@ declare class SelectionInputPlugin extends UIPlugin implements StreamCallbacks<S
|
|
|
4284
4303
|
private activeSheet;
|
|
4285
4304
|
private willAddNewRange;
|
|
4286
4305
|
constructor(config: UIPluginConfig, initialRanges: string[], inputHasSingleRange: boolean);
|
|
4287
|
-
allowDispatch(cmd:
|
|
4306
|
+
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4288
4307
|
handleEvent(event: SelectionEvent): void;
|
|
4289
4308
|
handle(cmd: Command): void;
|
|
4290
4309
|
getSelectionInputValue(): string[];
|
|
@@ -4345,7 +4364,7 @@ declare class SelectionInputsManagerPlugin extends UIPlugin {
|
|
|
4345
4364
|
private focusedInputId;
|
|
4346
4365
|
get currentInput(): SelectionInputPlugin | null;
|
|
4347
4366
|
constructor(config: UIPluginConfig);
|
|
4348
|
-
allowDispatch(cmd:
|
|
4367
|
+
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4349
4368
|
handle(cmd: Command): void;
|
|
4350
4369
|
/**
|
|
4351
4370
|
* Return a list of all valid XCs.
|
|
@@ -4362,7 +4381,7 @@ declare class SelectionInputsManagerPlugin extends UIPlugin {
|
|
|
4362
4381
|
}
|
|
4363
4382
|
|
|
4364
4383
|
interface ClientToDisplay extends Required<Client> {
|
|
4365
|
-
color:
|
|
4384
|
+
color: Color;
|
|
4366
4385
|
}
|
|
4367
4386
|
declare class SelectionMultiUserPlugin extends UIPlugin {
|
|
4368
4387
|
static getters: readonly ["getClientsToDisplay"];
|
|
@@ -4381,7 +4400,7 @@ declare class SelectionMultiUserPlugin extends UIPlugin {
|
|
|
4381
4400
|
|
|
4382
4401
|
declare class SortPlugin extends UIPlugin {
|
|
4383
4402
|
static getters: readonly ["getContiguousZone"];
|
|
4384
|
-
allowDispatch(cmd:
|
|
4403
|
+
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
4385
4404
|
handle(cmd: Command): void;
|
|
4386
4405
|
private checkMerge;
|
|
4387
4406
|
private checkMergeSizes;
|
|
@@ -4463,7 +4482,7 @@ declare class UIOptionsPlugin extends UIPlugin {
|
|
|
4463
4482
|
declare class SheetUIPlugin extends UIPlugin {
|
|
4464
4483
|
static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getColDimensions", "getRowDimensions", "getColRowOffset"];
|
|
4465
4484
|
private ctx;
|
|
4466
|
-
allowDispatch(cmd:
|
|
4485
|
+
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4467
4486
|
handle(cmd: Command): void;
|
|
4468
4487
|
getCellWidth(position: CellPosition): number;
|
|
4469
4488
|
getTextWidth(text: string, style: Style): Pixel;
|
|
@@ -4505,7 +4524,7 @@ declare class ClipboardPlugin extends UIPlugin {
|
|
|
4505
4524
|
private status;
|
|
4506
4525
|
private state?;
|
|
4507
4526
|
private _isPaintingFormat;
|
|
4508
|
-
allowDispatch(cmd:
|
|
4527
|
+
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4509
4528
|
handle(cmd: Command): void;
|
|
4510
4529
|
/**
|
|
4511
4530
|
* Format the current clipboard to a string suitable for being pasted in other
|
|
@@ -4544,7 +4563,7 @@ declare class GridSelectionPlugin extends UIPlugin {
|
|
|
4544
4563
|
private moveClient;
|
|
4545
4564
|
activeSheet: Sheet;
|
|
4546
4565
|
constructor(config: UIPluginConfig);
|
|
4547
|
-
allowDispatch(cmd:
|
|
4566
|
+
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
4548
4567
|
private handleEvent;
|
|
4549
4568
|
handle(cmd: Command): void;
|
|
4550
4569
|
getActiveSheet(): Readonly<Sheet>;
|
|
@@ -4873,7 +4892,7 @@ interface Props$B {
|
|
|
4873
4892
|
interface SelectionRange extends Omit<RangeInputValue, "color"> {
|
|
4874
4893
|
isFocused: boolean;
|
|
4875
4894
|
isValidRange: boolean;
|
|
4876
|
-
color?:
|
|
4895
|
+
color?: Color;
|
|
4877
4896
|
}
|
|
4878
4897
|
/**
|
|
4879
4898
|
* This component can be used when the user needs to input some
|
|
@@ -4939,6 +4958,7 @@ declare class LineBarPieConfigPanel extends Component<Props$A, SpreadsheetChildE
|
|
|
4939
4958
|
onLabelRangeChanged(ranges: string[]): void;
|
|
4940
4959
|
onLabelRangeConfirmed(): void;
|
|
4941
4960
|
onUpdateAggregated(ev: any): void;
|
|
4961
|
+
calculateHeaderPosition(): number | undefined;
|
|
4942
4962
|
}
|
|
4943
4963
|
|
|
4944
4964
|
declare class BarConfigPanel extends LineBarPieConfigPanel {
|
|
@@ -4994,7 +5014,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
|
|
|
4994
5014
|
static components: {
|
|
4995
5015
|
Popover: typeof Popover;
|
|
4996
5016
|
};
|
|
4997
|
-
COLORS:
|
|
5017
|
+
COLORS: Color[];
|
|
4998
5018
|
private state;
|
|
4999
5019
|
get colorPickerStyle(): string;
|
|
5000
5020
|
get popoverProps(): PopoverProps;
|
|
@@ -5008,6 +5028,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
|
|
|
5008
5028
|
showMagnifier(_ev: MouseEvent): void;
|
|
5009
5029
|
moveMagnifier(ev: MouseEvent): void;
|
|
5010
5030
|
get magnifyingGlassStyle(): string;
|
|
5031
|
+
isSameColor(color1: Color, color2: Color): boolean;
|
|
5011
5032
|
}
|
|
5012
5033
|
|
|
5013
5034
|
interface Props$z {
|
|
@@ -5047,7 +5068,7 @@ declare class LineBarPieDesignPanel extends Component<Props$y, SpreadsheetChildE
|
|
|
5047
5068
|
onClick(ev: MouseEvent): void;
|
|
5048
5069
|
setup(): void;
|
|
5049
5070
|
toggleColorPicker(): void;
|
|
5050
|
-
updateBackgroundColor(color:
|
|
5071
|
+
updateBackgroundColor(color: Color): void;
|
|
5051
5072
|
updateTitle(ev: any): void;
|
|
5052
5073
|
updateSelect(attr: string, ev: any): void;
|
|
5053
5074
|
}
|
|
@@ -5084,7 +5105,7 @@ declare class GaugeChartDesignPanel extends Component<Props$w, SpreadsheetChildE
|
|
|
5084
5105
|
private state;
|
|
5085
5106
|
setup(): void;
|
|
5086
5107
|
get designErrorMessages(): string[];
|
|
5087
|
-
updateBackgroundColor(color:
|
|
5108
|
+
updateBackgroundColor(color: Color): void;
|
|
5088
5109
|
updateTitle(ev: any): void;
|
|
5089
5110
|
isRangeMinInvalid(): boolean;
|
|
5090
5111
|
isRangeMaxInvalid(): boolean;
|
|
@@ -5092,7 +5113,7 @@ declare class GaugeChartDesignPanel extends Component<Props$w, SpreadsheetChildE
|
|
|
5092
5113
|
get isUpperInflectionPointInvalid(): boolean;
|
|
5093
5114
|
updateInflectionPointValue(attr: string, ev: any): void;
|
|
5094
5115
|
updateInflectionPointType(attr: string, ev: any): void;
|
|
5095
|
-
updateSectionColor(target: string, color:
|
|
5116
|
+
updateSectionColor(target: string, color: Color): void;
|
|
5096
5117
|
updateRangeMin(ev: any): void;
|
|
5097
5118
|
updateRangeMax(ev: any): void;
|
|
5098
5119
|
toggleMenu(menu: GaugeMenu): void;
|
|
@@ -5147,7 +5168,7 @@ declare class ScorecardChartDesignPanel extends Component<Props$u, SpreadsheetCh
|
|
|
5147
5168
|
updateTitle(ev: any): void;
|
|
5148
5169
|
updateBaselineDescr(ev: any): void;
|
|
5149
5170
|
toggleColorPicker(colorPickerId: ColorPickerId): void;
|
|
5150
|
-
setColor(color:
|
|
5171
|
+
setColor(color: Color, colorPickerId: ColorPickerId): void;
|
|
5151
5172
|
private closeMenus;
|
|
5152
5173
|
}
|
|
5153
5174
|
|
|
@@ -5187,7 +5208,7 @@ interface MenuItemSpec {
|
|
|
5187
5208
|
children?: MenuChildren;
|
|
5188
5209
|
separator?: boolean;
|
|
5189
5210
|
icon?: string;
|
|
5190
|
-
textColor?:
|
|
5211
|
+
textColor?: Color;
|
|
5191
5212
|
}
|
|
5192
5213
|
interface MenuItem {
|
|
5193
5214
|
id: string;
|
|
@@ -5284,8 +5305,8 @@ declare class ScorecardChart extends Component<Props$s, SpreadsheetChildEnv> {
|
|
|
5284
5305
|
get baseline(): string;
|
|
5285
5306
|
get baselineDescr(): string;
|
|
5286
5307
|
get baselineArrowDirection(): BaselineArrowDirection;
|
|
5287
|
-
get backgroundColor():
|
|
5288
|
-
get primaryFontColor():
|
|
5308
|
+
get backgroundColor(): Color;
|
|
5309
|
+
get primaryFontColor(): Color;
|
|
5289
5310
|
get secondaryFontColor(): "#525252" | "#C8C8C8";
|
|
5290
5311
|
get figure(): Figure;
|
|
5291
5312
|
get chartStyle(): string;
|
|
@@ -5306,6 +5327,7 @@ declare class ScorecardChart extends Component<Props$s, SpreadsheetChildEnv> {
|
|
|
5306
5327
|
private getWidestElement;
|
|
5307
5328
|
}
|
|
5308
5329
|
|
|
5330
|
+
declare type MenuItemOrSeparator = MenuItem | "separator";
|
|
5309
5331
|
interface Props$r {
|
|
5310
5332
|
position: DOMCoordinates;
|
|
5311
5333
|
menuItems: MenuItem[];
|
|
@@ -5335,20 +5357,13 @@ declare class Menu extends Component<Props$r, SpreadsheetChildEnv> {
|
|
|
5335
5357
|
private menuRef;
|
|
5336
5358
|
private position;
|
|
5337
5359
|
setup(): void;
|
|
5338
|
-
get
|
|
5360
|
+
get menuItemsAndSeparators(): MenuItemOrSeparator[];
|
|
5339
5361
|
get subMenuPosition(): DOMCoordinates;
|
|
5340
|
-
get menuHeight(): Pixel;
|
|
5341
5362
|
get popoverProps(): PopoverProps;
|
|
5342
5363
|
getColor(menu: MenuItem): string | undefined;
|
|
5343
5364
|
activateMenu(menu: MenuItem): Promise<void>;
|
|
5344
5365
|
private close;
|
|
5345
|
-
/**
|
|
5346
|
-
* Return the number of pixels between the top of the menu
|
|
5347
|
-
* and the menu item at a given index.
|
|
5348
|
-
*/
|
|
5349
|
-
private subMenuVerticalPosition;
|
|
5350
5366
|
private onExternalClick;
|
|
5351
|
-
private getMenuItemsHeight;
|
|
5352
5367
|
getName(menu: MenuItem): string;
|
|
5353
5368
|
isRoot(menu: MenuItem): boolean;
|
|
5354
5369
|
isEnabled(menu: MenuItem): boolean;
|
|
@@ -5357,11 +5372,11 @@ declare class Menu extends Component<Props$r, SpreadsheetChildEnv> {
|
|
|
5357
5372
|
* If the given menu is not disabled, open it's submenu at the
|
|
5358
5373
|
* correct position according to available surrounding space.
|
|
5359
5374
|
*/
|
|
5360
|
-
openSubMenu(menu: MenuItem, menuIndex: number): void;
|
|
5375
|
+
openSubMenu(menu: MenuItem, menuIndex: number, ev: MouseEvent): void;
|
|
5361
5376
|
isParentMenu(subMenu: MenuState, menuItem: MenuItem): boolean;
|
|
5362
5377
|
closeSubMenu(): void;
|
|
5363
|
-
onClickMenu(menu: MenuItem, menuIndex: number): void;
|
|
5364
|
-
onMouseOver(menu: MenuItem, position: Pixel): void;
|
|
5378
|
+
onClickMenu(menu: MenuItem, menuIndex: number, ev: MouseEvent): void;
|
|
5379
|
+
onMouseOver(menu: MenuItem, position: Pixel, ev: MouseEvent): void;
|
|
5365
5380
|
}
|
|
5366
5381
|
|
|
5367
5382
|
declare type ResizeAnchor = "top left" | "top" | "top right" | "right" | "bottom right" | "bottom" | "bottom left" | "left";
|
|
@@ -5440,7 +5455,7 @@ declare class Autofill extends Component<Props$o, SpreadsheetChildEnv> {
|
|
|
5440
5455
|
interface ClientTagProps {
|
|
5441
5456
|
active: boolean;
|
|
5442
5457
|
name: string;
|
|
5443
|
-
color:
|
|
5458
|
+
color: Color;
|
|
5444
5459
|
col: HeaderIndex;
|
|
5445
5460
|
row: HeaderIndex;
|
|
5446
5461
|
}
|
|
@@ -5615,6 +5630,39 @@ declare class BottomBar extends Component<Props$l, SpreadsheetChildEnv> {
|
|
|
5615
5630
|
get sheetListMaxScroll(): number;
|
|
5616
5631
|
}
|
|
5617
5632
|
|
|
5633
|
+
interface Props$k {
|
|
5634
|
+
position: DOMCoordinates;
|
|
5635
|
+
isActive: boolean;
|
|
5636
|
+
onClick: () => void;
|
|
5637
|
+
}
|
|
5638
|
+
declare class FilterIcon extends Component<Props$k, SpreadsheetEnv> {
|
|
5639
|
+
static style: string;
|
|
5640
|
+
static template: string;
|
|
5641
|
+
get style(): string;
|
|
5642
|
+
}
|
|
5643
|
+
|
|
5644
|
+
interface Props$j {
|
|
5645
|
+
gridPosition: DOMCoordinates;
|
|
5646
|
+
}
|
|
5647
|
+
declare class FilterIconsOverlay extends Component<Props$j, SpreadsheetChildEnv> {
|
|
5648
|
+
static style: string;
|
|
5649
|
+
static template: string;
|
|
5650
|
+
static components: {
|
|
5651
|
+
FilterIcon: typeof FilterIcon;
|
|
5652
|
+
};
|
|
5653
|
+
static defaultProps: {
|
|
5654
|
+
gridPosition: {
|
|
5655
|
+
x: number;
|
|
5656
|
+
y: number;
|
|
5657
|
+
};
|
|
5658
|
+
};
|
|
5659
|
+
getVisibleFilterHeaders(): Position$1[];
|
|
5660
|
+
getFilterHeaderPosition(position: Position$1): DOMCoordinates;
|
|
5661
|
+
isFilterActive(position: Position$1): boolean;
|
|
5662
|
+
toggleFilterMenu(position: Position$1): void;
|
|
5663
|
+
private isPositionVisible;
|
|
5664
|
+
}
|
|
5665
|
+
|
|
5618
5666
|
declare type HFigureAxisType = "top" | "bottom" | "vCenter";
|
|
5619
5667
|
declare type VFigureAxisType = "right" | "left" | "hCenter";
|
|
5620
5668
|
interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
@@ -5625,7 +5673,7 @@ interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
|
|
|
5625
5673
|
}
|
|
5626
5674
|
|
|
5627
5675
|
declare type ContainerType = "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "dnd";
|
|
5628
|
-
interface Props$
|
|
5676
|
+
interface Props$i {
|
|
5629
5677
|
onFigureDeleted: () => void;
|
|
5630
5678
|
}
|
|
5631
5679
|
interface Container {
|
|
@@ -5704,7 +5752,7 @@ interface DndState {
|
|
|
5704
5752
|
* that occurred during the drag & drop, and to position the figure on the correct pane.
|
|
5705
5753
|
*
|
|
5706
5754
|
*/
|
|
5707
|
-
declare class FiguresContainer extends Component<Props$
|
|
5755
|
+
declare class FiguresContainer extends Component<Props$i, SpreadsheetChildEnv> {
|
|
5708
5756
|
static template: string;
|
|
5709
5757
|
static components: {
|
|
5710
5758
|
FigureComponent: typeof FigureComponent;
|
|
@@ -5736,7 +5784,7 @@ declare class FiguresContainer extends Component<Props$k, SpreadsheetChildEnv> {
|
|
|
5736
5784
|
private getSnapLineStyle;
|
|
5737
5785
|
}
|
|
5738
5786
|
|
|
5739
|
-
interface Props$
|
|
5787
|
+
interface Props$h {
|
|
5740
5788
|
onCellHovered: (position: Partial<Position$1>) => void;
|
|
5741
5789
|
onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
|
|
5742
5790
|
onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
|
|
@@ -5749,7 +5797,7 @@ interface Props$j {
|
|
|
5749
5797
|
gridOverlayDimensions: string;
|
|
5750
5798
|
onFigureDeleted: () => void;
|
|
5751
5799
|
}
|
|
5752
|
-
declare class GridOverlay extends Component<Props$
|
|
5800
|
+
declare class GridOverlay extends Component<Props$h, SpreadsheetChildEnv> {
|
|
5753
5801
|
static template: string;
|
|
5754
5802
|
static components: {
|
|
5755
5803
|
FiguresContainer: typeof FiguresContainer;
|
|
@@ -5771,13 +5819,13 @@ declare class GridOverlay extends Component<Props$j, SpreadsheetChildEnv> {
|
|
|
5771
5819
|
private getCartesianCoordinates;
|
|
5772
5820
|
}
|
|
5773
5821
|
|
|
5774
|
-
interface Props$
|
|
5822
|
+
interface Props$g {
|
|
5775
5823
|
hoveredCell: Partial<Position$1>;
|
|
5776
5824
|
gridRect: Rect;
|
|
5777
5825
|
onClosePopover: () => void;
|
|
5778
5826
|
onMouseWheel: (ev: WheelEvent) => void;
|
|
5779
5827
|
}
|
|
5780
|
-
declare class GridPopover extends Component<Props$
|
|
5828
|
+
declare class GridPopover extends Component<Props$g, SpreadsheetChildEnv> {
|
|
5781
5829
|
static template: string;
|
|
5782
5830
|
static components: {
|
|
5783
5831
|
Popover: typeof Popover;
|
|
@@ -5787,7 +5835,7 @@ declare class GridPopover extends Component<Props$i, SpreadsheetChildEnv> {
|
|
|
5787
5835
|
|
|
5788
5836
|
declare type ScrollDirection = "horizontal" | "vertical";
|
|
5789
5837
|
|
|
5790
|
-
interface Props$
|
|
5838
|
+
interface Props$f {
|
|
5791
5839
|
width: Pixel;
|
|
5792
5840
|
height: Pixel;
|
|
5793
5841
|
direction: ScrollDirection;
|
|
@@ -5795,7 +5843,7 @@ interface Props$h {
|
|
|
5795
5843
|
offset: Pixel;
|
|
5796
5844
|
onScroll: (offset: Pixel) => void;
|
|
5797
5845
|
}
|
|
5798
|
-
declare class ScrollBar extends Component<Props$
|
|
5846
|
+
declare class ScrollBar extends Component<Props$f> {
|
|
5799
5847
|
static template: string;
|
|
5800
5848
|
static defaultProps: {
|
|
5801
5849
|
width: number;
|
|
@@ -5809,10 +5857,10 @@ declare class ScrollBar extends Component<Props$h> {
|
|
|
5809
5857
|
onScroll(ev: any): void;
|
|
5810
5858
|
}
|
|
5811
5859
|
|
|
5812
|
-
interface Props$
|
|
5860
|
+
interface Props$e {
|
|
5813
5861
|
leftOffset: number;
|
|
5814
5862
|
}
|
|
5815
|
-
declare class HorizontalScrollBar extends Component<Props$
|
|
5863
|
+
declare class HorizontalScrollBar extends Component<Props$e, SpreadsheetChildEnv> {
|
|
5816
5864
|
static components: {
|
|
5817
5865
|
ScrollBar: typeof ScrollBar;
|
|
5818
5866
|
};
|
|
@@ -5820,8 +5868,8 @@ declare class HorizontalScrollBar extends Component<Props$g, SpreadsheetChildEnv
|
|
|
5820
5868
|
static defaultProps: {
|
|
5821
5869
|
leftOffset: number;
|
|
5822
5870
|
};
|
|
5823
|
-
get offset():
|
|
5824
|
-
get width():
|
|
5871
|
+
get offset(): Pixel;
|
|
5872
|
+
get width(): Pixel;
|
|
5825
5873
|
get isDisplayed(): boolean;
|
|
5826
5874
|
get position(): {
|
|
5827
5875
|
left: string;
|
|
@@ -5832,10 +5880,10 @@ declare class HorizontalScrollBar extends Component<Props$g, SpreadsheetChildEnv
|
|
|
5832
5880
|
onScroll(offset: any): void;
|
|
5833
5881
|
}
|
|
5834
5882
|
|
|
5835
|
-
interface Props$
|
|
5883
|
+
interface Props$d {
|
|
5836
5884
|
topOffset: number;
|
|
5837
5885
|
}
|
|
5838
|
-
declare class VerticalScrollBar extends Component<Props$
|
|
5886
|
+
declare class VerticalScrollBar extends Component<Props$d, SpreadsheetChildEnv> {
|
|
5839
5887
|
static components: {
|
|
5840
5888
|
ScrollBar: typeof ScrollBar;
|
|
5841
5889
|
};
|
|
@@ -5843,8 +5891,8 @@ declare class VerticalScrollBar extends Component<Props$f, SpreadsheetChildEnv>
|
|
|
5843
5891
|
static defaultProps: {
|
|
5844
5892
|
topOffset: number;
|
|
5845
5893
|
};
|
|
5846
|
-
get offset():
|
|
5847
|
-
get height():
|
|
5894
|
+
get offset(): Pixel;
|
|
5895
|
+
get height(): Pixel;
|
|
5848
5896
|
get isDisplayed(): boolean;
|
|
5849
5897
|
get position(): {
|
|
5850
5898
|
top: string;
|
|
@@ -5855,39 +5903,6 @@ declare class VerticalScrollBar extends Component<Props$f, SpreadsheetChildEnv>
|
|
|
5855
5903
|
onScroll(offset: any): void;
|
|
5856
5904
|
}
|
|
5857
5905
|
|
|
5858
|
-
interface Props$e {
|
|
5859
|
-
position: DOMCoordinates;
|
|
5860
|
-
isActive: boolean;
|
|
5861
|
-
onClick: () => void;
|
|
5862
|
-
}
|
|
5863
|
-
declare class FilterIcon extends Component<Props$e, SpreadsheetEnv> {
|
|
5864
|
-
static style: string;
|
|
5865
|
-
static template: string;
|
|
5866
|
-
get style(): string;
|
|
5867
|
-
}
|
|
5868
|
-
|
|
5869
|
-
interface Props$d {
|
|
5870
|
-
gridPosition: DOMCoordinates;
|
|
5871
|
-
}
|
|
5872
|
-
declare class FilterIconsOverlay extends Component<Props$d, SpreadsheetChildEnv> {
|
|
5873
|
-
static style: string;
|
|
5874
|
-
static template: string;
|
|
5875
|
-
static components: {
|
|
5876
|
-
FilterIcon: typeof FilterIcon;
|
|
5877
|
-
};
|
|
5878
|
-
static defaultProps: {
|
|
5879
|
-
gridPosition: {
|
|
5880
|
-
x: number;
|
|
5881
|
-
y: number;
|
|
5882
|
-
};
|
|
5883
|
-
};
|
|
5884
|
-
getVisibleFilterHeaders(): Position$1[];
|
|
5885
|
-
getFilterHeaderPosition(position: Position$1): DOMCoordinates;
|
|
5886
|
-
isFilterActive(position: Position$1): boolean;
|
|
5887
|
-
toggleFilterMenu(position: Position$1): void;
|
|
5888
|
-
private isPositionVisible;
|
|
5889
|
-
}
|
|
5890
|
-
|
|
5891
5906
|
interface Props$c {
|
|
5892
5907
|
}
|
|
5893
5908
|
interface ClickableCell {
|
|
@@ -6012,7 +6027,7 @@ declare class FunctionDescriptionProvider extends Component<Props$9> {
|
|
|
6012
6027
|
|
|
6013
6028
|
declare type HtmlContent = {
|
|
6014
6029
|
value: string;
|
|
6015
|
-
color?:
|
|
6030
|
+
color?: Color;
|
|
6016
6031
|
class?: string;
|
|
6017
6032
|
};
|
|
6018
6033
|
interface AutocompleteValue {
|
|
@@ -6189,8 +6204,8 @@ declare class TopBar extends Component<Props$6, SpreadsheetChildEnv> {
|
|
|
6189
6204
|
undoTool: boolean;
|
|
6190
6205
|
redoTool: boolean;
|
|
6191
6206
|
paintFormatTool: boolean;
|
|
6192
|
-
fillColor:
|
|
6193
|
-
textColor:
|
|
6207
|
+
fillColor: Color;
|
|
6208
|
+
textColor: Color;
|
|
6194
6209
|
menus: MenuItem[];
|
|
6195
6210
|
setup(): void;
|
|
6196
6211
|
get topbarComponents(): TopbarComponent[];
|
|
@@ -6209,7 +6224,7 @@ declare class TopBar extends Component<Props$6, SpreadsheetChildEnv> {
|
|
|
6209
6224
|
updateCellState(): void;
|
|
6210
6225
|
getMenuName(menu: MenuItem): string;
|
|
6211
6226
|
toggleMerge(): void;
|
|
6212
|
-
setColor(target: string, color:
|
|
6227
|
+
setColor(target: string, color: Color): void;
|
|
6213
6228
|
setBorder(command: BorderCommand): void;
|
|
6214
6229
|
setFormat(format: Format, custom: boolean): void;
|
|
6215
6230
|
openCustomFormatSidePanel(custom: string): void;
|
|
@@ -6432,7 +6447,7 @@ declare class Border extends Component<Props$4, SpreadsheetChildEnv> {
|
|
|
6432
6447
|
declare type Orientation = "nw" | "ne" | "sw" | "se";
|
|
6433
6448
|
interface Props$3 {
|
|
6434
6449
|
zone: Zone;
|
|
6435
|
-
color:
|
|
6450
|
+
color: Color;
|
|
6436
6451
|
orientation: Orientation;
|
|
6437
6452
|
isResizing: boolean;
|
|
6438
6453
|
onResizeHighlight: (isLeft: boolean, isRight: boolean) => void;
|
|
@@ -6447,7 +6462,7 @@ declare class Corner extends Component<Props$3, SpreadsheetChildEnv> {
|
|
|
6447
6462
|
|
|
6448
6463
|
interface Props$2 {
|
|
6449
6464
|
zone: Zone;
|
|
6450
|
-
color:
|
|
6465
|
+
color: Color;
|
|
6451
6466
|
}
|
|
6452
6467
|
interface HighlightState {
|
|
6453
6468
|
shiftingMode: "isMoving" | "isResizing" | "none";
|