@odoo/o-spreadsheet 16.4.0-alpha.2 → 16.4.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 +262 -192
- package/dist/o-spreadsheet.d.ts +31 -29
- package/dist/o-spreadsheet.esm.js +262 -192
- package/dist/o-spreadsheet.iife.js +262 -192
- package/dist/o-spreadsheet.iife.min.js +233 -230
- package/package.json +1 -1
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -297,7 +297,7 @@ interface XLSXExportXMLFile {
|
|
|
297
297
|
}
|
|
298
298
|
interface XLSXExportImageFile {
|
|
299
299
|
path: string;
|
|
300
|
-
|
|
300
|
+
imageSrc: string;
|
|
301
301
|
}
|
|
302
302
|
interface XLSXExport {
|
|
303
303
|
name: string;
|
|
@@ -493,6 +493,7 @@ interface Range extends Cloneable<Range> {
|
|
|
493
493
|
readonly invalidSheetName?: string;
|
|
494
494
|
/** the sheet on which the range is defined */
|
|
495
495
|
readonly sheetId: UID;
|
|
496
|
+
readonly rangeData: RangeData;
|
|
496
497
|
}
|
|
497
498
|
interface RangeData {
|
|
498
499
|
_zone: Zone | UnboundedZone;
|
|
@@ -574,6 +575,7 @@ declare type ResizeDirection = -1 | 0 | 1;
|
|
|
574
575
|
interface Image {
|
|
575
576
|
path: string;
|
|
576
577
|
size: FigureSize;
|
|
578
|
+
mimetype?: string;
|
|
577
579
|
}
|
|
578
580
|
|
|
579
581
|
interface CellData {
|
|
@@ -2869,7 +2871,7 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
|
|
|
2869
2871
|
private getters;
|
|
2870
2872
|
private providers;
|
|
2871
2873
|
constructor(getters: CoreGetters);
|
|
2872
|
-
static getters: readonly ["getRangeString", "
|
|
2874
|
+
static getters: readonly ["getRangeString", "getRangeFromSheetXC", "createAdaptedRanges", "getRangeDataFromXc", "getRangeDataFromZone", "getRangeFromRangeData", "getRangeFromZone"];
|
|
2873
2875
|
allowDispatch(cmd: Command): CommandResult;
|
|
2874
2876
|
beforeHandle(command: Command): void;
|
|
2875
2877
|
handle(cmd: Command): void;
|
|
@@ -2899,10 +2901,6 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
|
|
|
2899
2901
|
* @param sheetXC the string description of a range, in the form SheetName!XC:XC
|
|
2900
2902
|
*/
|
|
2901
2903
|
getRangeFromSheetXC(defaultSheetId: UID, sheetXC: string): RangeImpl;
|
|
2902
|
-
/**
|
|
2903
|
-
* Same as `getRangeString` but add all necessary merge to the range to make it a valid selection
|
|
2904
|
-
*/
|
|
2905
|
-
getSelectionRangeString(range: Range, forSheetId: UID): string;
|
|
2906
2904
|
/**
|
|
2907
2905
|
* Gets the string that represents the range as it is at the moment of the call.
|
|
2908
2906
|
* The string will be prefixed with the sheet name if the call specified a sheet id in `forSheetId`
|
|
@@ -2913,7 +2911,8 @@ declare class RangeAdapter implements CommandHandler<CoreCommand> {
|
|
|
2913
2911
|
*/
|
|
2914
2912
|
getRangeString(range: Range, forSheetId: UID): string;
|
|
2915
2913
|
getRangeDataFromXc(sheetId: UID, xc: string): RangeData;
|
|
2916
|
-
getRangeDataFromZone(sheetId: UID, zone: Zone): RangeData;
|
|
2914
|
+
getRangeDataFromZone(sheetId: UID, zone: Zone | UnboundedZone): RangeData;
|
|
2915
|
+
getRangeFromZone(sheetId: UID, zone: Zone | UnboundedZone): Range;
|
|
2917
2916
|
getRangeFromRangeData(data: RangeData): Range;
|
|
2918
2917
|
/**
|
|
2919
2918
|
* Get a Xc string that represent a part of a range
|
|
@@ -3488,7 +3487,7 @@ interface MergeState {
|
|
|
3488
3487
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
3489
3488
|
}
|
|
3490
3489
|
declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
|
|
3491
|
-
static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "getBottomLeftCell", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge"];
|
|
3490
|
+
static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "getBottomLeftCell", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "getSelectionRangeString"];
|
|
3492
3491
|
private nextId;
|
|
3493
3492
|
readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
|
|
3494
3493
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
@@ -3498,6 +3497,10 @@ declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
|
|
|
3498
3497
|
getMerges(sheetId: UID): Merge[];
|
|
3499
3498
|
getMerge({ sheetId, col, row }: CellPosition): Merge | undefined;
|
|
3500
3499
|
getMergesInZone(sheetId: UID, zone: Zone): Merge[];
|
|
3500
|
+
/**
|
|
3501
|
+
* Same as `getRangeString` but add all necessary merge to the range to make it a valid selection
|
|
3502
|
+
*/
|
|
3503
|
+
getSelectionRangeString(range: Range, forSheetId: UID): string;
|
|
3501
3504
|
/**
|
|
3502
3505
|
* Return true if the zone intersects an existing merge:
|
|
3503
3506
|
* if they have at least a common cell
|
|
@@ -3565,7 +3568,7 @@ interface SheetState$1 {
|
|
|
3565
3568
|
readonly cellPosition: Record<UID, CellPosition | undefined>;
|
|
3566
3569
|
}
|
|
3567
3570
|
declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState$1 {
|
|
3568
|
-
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "isEmpty", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones"];
|
|
3571
|
+
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "isEmpty", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone"];
|
|
3569
3572
|
readonly sheetIdsMapName: Record<string, UID | undefined>;
|
|
3570
3573
|
readonly orderedSheetIds: UID[];
|
|
3571
3574
|
readonly sheets: Record<UID, Sheet | undefined>;
|
|
@@ -3605,6 +3608,7 @@ declare class SheetPlugin extends CorePlugin<SheetState$1> implements SheetState
|
|
|
3605
3608
|
getNextSheetName(baseName?: string): string;
|
|
3606
3609
|
getSheetSize(sheetId: UID): ZoneDimension;
|
|
3607
3610
|
getSheetZone(sheetId: UID): Zone;
|
|
3611
|
+
getUnboundedZone(sheetId: UID, zone: Zone): UnboundedZone;
|
|
3608
3612
|
getPaneDivisions(sheetId: UID): Readonly<PaneDivision>;
|
|
3609
3613
|
private setPaneDivisions;
|
|
3610
3614
|
/**
|
|
@@ -5041,7 +5045,7 @@ declare class SelectionInput extends Component<Props$D, SpreadsheetChildEnv> {
|
|
|
5041
5045
|
interface Props$C {
|
|
5042
5046
|
figureId: UID;
|
|
5043
5047
|
definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
|
|
5044
|
-
updateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5048
|
+
updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
|
|
5045
5049
|
}
|
|
5046
5050
|
declare class LineBarPieConfigPanel extends Component<Props$C, SpreadsheetChildEnv> {
|
|
5047
5051
|
static template: string;
|
|
@@ -5190,7 +5194,7 @@ declare class ColorPickerWidget extends Component<Props$B, SpreadsheetChildEnv>
|
|
|
5190
5194
|
interface Props$A {
|
|
5191
5195
|
figureId: UID;
|
|
5192
5196
|
definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
|
|
5193
|
-
updateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => CommandResult | CommandResult[];
|
|
5197
|
+
updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => CommandResult | CommandResult[];
|
|
5194
5198
|
}
|
|
5195
5199
|
declare class LineBarPieDesignPanel extends Component<Props$A, SpreadsheetChildEnv> {
|
|
5196
5200
|
static template: string;
|
|
@@ -5209,7 +5213,7 @@ declare class LineBarPieDesignPanel extends Component<Props$A, SpreadsheetChildE
|
|
|
5209
5213
|
interface Props$z {
|
|
5210
5214
|
figureId: UID;
|
|
5211
5215
|
definition: GaugeChartDefinition;
|
|
5212
|
-
updateChart: (definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5216
|
+
updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5213
5217
|
}
|
|
5214
5218
|
declare class GaugeChartConfigPanel extends Component<Props$z, SpreadsheetChildEnv> {
|
|
5215
5219
|
static template: string;
|
|
@@ -5229,7 +5233,7 @@ declare type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectio
|
|
|
5229
5233
|
interface Props$y {
|
|
5230
5234
|
figureId: UID;
|
|
5231
5235
|
definition: GaugeChartDefinition;
|
|
5232
|
-
updateChart: (definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5236
|
+
updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
|
|
5233
5237
|
}
|
|
5234
5238
|
declare class GaugeChartDesignPanel extends Component<Props$y, SpreadsheetChildEnv> {
|
|
5235
5239
|
static template: string;
|
|
@@ -5266,7 +5270,7 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
|
|
|
5266
5270
|
interface Props$x {
|
|
5267
5271
|
figureId: UID;
|
|
5268
5272
|
definition: ScorecardChartDefinition;
|
|
5269
|
-
updateChart: (definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5273
|
+
updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5270
5274
|
}
|
|
5271
5275
|
declare class ScorecardChartConfigPanel extends Component<Props$x, SpreadsheetChildEnv> {
|
|
5272
5276
|
static template: string;
|
|
@@ -5292,7 +5296,7 @@ declare type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" |
|
|
|
5292
5296
|
interface Props$w {
|
|
5293
5297
|
figureId: UID;
|
|
5294
5298
|
definition: ScorecardChartDefinition;
|
|
5295
|
-
updateChart: (definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5299
|
+
updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
|
|
5296
5300
|
}
|
|
5297
5301
|
declare class ScorecardChartDesignPanel extends Component<Props$w, SpreadsheetChildEnv> {
|
|
5298
5302
|
static template: string;
|
|
@@ -6473,18 +6477,20 @@ declare class ContentEditableHelper {
|
|
|
6473
6477
|
*/
|
|
6474
6478
|
private findChildAtCharacterIndex;
|
|
6475
6479
|
/**
|
|
6476
|
-
* Sets (or Replaces all) the text inside the root element in the form of distinctive
|
|
6480
|
+
* Sets (or Replaces all) the text inside the root element in the form of distinctive paragraphs and
|
|
6477
6481
|
* span for each element provided in `contents`.
|
|
6478
6482
|
*
|
|
6483
|
+
* The function will apply the diff between the current content and the new content to avoid the systematic
|
|
6484
|
+
* destruction of DOM elements which interferes with IME[1]
|
|
6485
|
+
*
|
|
6486
|
+
* Each line of text will be encapsulated in a paragraph element.
|
|
6479
6487
|
* Each span will have its own fontcolor and specific class if provided in the HtmlContent object.
|
|
6488
|
+
*
|
|
6489
|
+
* [1] https://developer.mozilla.org/en-US/docs/Glossary/Input_method_editor
|
|
6480
6490
|
*/
|
|
6481
6491
|
setText(contents: HtmlContent[][]): void;
|
|
6482
6492
|
scrollSelectionIntoView(): void;
|
|
6483
|
-
|
|
6484
|
-
* remove the current selection of the user
|
|
6485
|
-
* */
|
|
6486
|
-
removeSelection(): void;
|
|
6487
|
-
removeAll(): void;
|
|
6493
|
+
private removeAll;
|
|
6488
6494
|
/**
|
|
6489
6495
|
* finds the indexes of the current selection.
|
|
6490
6496
|
* */
|
|
@@ -6579,7 +6585,6 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6579
6585
|
composerState: ComposerState$1;
|
|
6580
6586
|
autoCompleteState: AutoCompleteState;
|
|
6581
6587
|
functionDescriptionState: FunctionDescriptionState;
|
|
6582
|
-
private isKeyStillDown;
|
|
6583
6588
|
private compositionActive;
|
|
6584
6589
|
get assistantStyle(): string;
|
|
6585
6590
|
shouldProcessInputEvents: boolean;
|
|
@@ -6591,18 +6596,17 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6591
6596
|
private processArrowKeys;
|
|
6592
6597
|
private handleArrowKeysForAutocomplete;
|
|
6593
6598
|
private processTabKey;
|
|
6599
|
+
processSpaceKey(ev: KeyboardEvent): void;
|
|
6594
6600
|
private processEnterKey;
|
|
6595
6601
|
private processEscapeKey;
|
|
6596
6602
|
private processF4Key;
|
|
6597
6603
|
onCompositionStart(): void;
|
|
6598
6604
|
onCompositionEnd(): void;
|
|
6599
6605
|
onKeydown(ev: KeyboardEvent): void;
|
|
6600
|
-
onInput(): void;
|
|
6601
|
-
onKeyup(
|
|
6606
|
+
onInput(ev: InputEvent): void;
|
|
6607
|
+
onKeyup(): void;
|
|
6602
6608
|
showAutocomplete(searchTerm: string): void;
|
|
6603
|
-
onMousedown(ev: MouseEvent): void;
|
|
6604
6609
|
onClick(): void;
|
|
6605
|
-
onBlur(): void;
|
|
6606
6610
|
private processContent;
|
|
6607
6611
|
/**
|
|
6608
6612
|
* Get the HTML content corresponding to the current composer token, divided by lines.
|
|
@@ -7038,11 +7042,9 @@ interface Props {
|
|
|
7038
7042
|
declare class ChartPanel extends Component<Props, SpreadsheetChildEnv> {
|
|
7039
7043
|
static template: string;
|
|
7040
7044
|
private state;
|
|
7041
|
-
private shouldUpdateChart;
|
|
7042
7045
|
get figureId(): UID;
|
|
7043
|
-
get sheetId(): UID;
|
|
7044
7046
|
setup(): void;
|
|
7045
|
-
updateChart<T extends ChartDefinition>(updateDefinition: Partial<T>): DispatchResult | undefined;
|
|
7047
|
+
updateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
|
|
7046
7048
|
onTypeChange(type: ChartType): void;
|
|
7047
7049
|
get chartPanel(): ChartSidePanel;
|
|
7048
7050
|
private getChartDefinition;
|