@odoo/o-spreadsheet 17.0.4 → 17.0.6
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 +970 -220
- package/dist/o-spreadsheet.d.ts +24 -21
- package/dist/o-spreadsheet.esm.js +970 -220
- package/dist/o-spreadsheet.iife.js +970 -220
- package/dist/o-spreadsheet.iife.min.js +274 -276
- package/dist/o_spreadsheet.xml +4 -4
- package/package.json +6 -2
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -776,7 +776,7 @@ interface TransportService<T = any> {
|
|
|
776
776
|
}
|
|
777
777
|
|
|
778
778
|
declare class Revision implements RevisionData {
|
|
779
|
-
readonly rootCommand?: Command |
|
|
779
|
+
readonly rootCommand?: Command | undefined;
|
|
780
780
|
readonly timestamp?: number | undefined;
|
|
781
781
|
readonly id: UID;
|
|
782
782
|
readonly clientId: ClientId;
|
|
@@ -791,7 +791,7 @@ declare class Revision implements RevisionData {
|
|
|
791
791
|
* - clientId: Client who initiated the action
|
|
792
792
|
* - changes: List of changes applied on the state.
|
|
793
793
|
*/
|
|
794
|
-
constructor(id: UID, clientId: ClientId, commands: readonly CoreCommand[], rootCommand?: Command |
|
|
794
|
+
constructor(id: UID, clientId: ClientId, commands: readonly CoreCommand[], rootCommand?: Command | undefined, changes?: readonly HistoryChange[], timestamp?: number | undefined);
|
|
795
795
|
setChanges(changes: readonly HistoryChange[]): void;
|
|
796
796
|
get commands(): readonly CoreCommand[];
|
|
797
797
|
get changes(): readonly HistoryChange[];
|
|
@@ -820,6 +820,7 @@ declare class Session extends EventBus<CollaborativeEvent> {
|
|
|
820
820
|
private isReplayingInitialRevisions;
|
|
821
821
|
private processedRevisions;
|
|
822
822
|
private uuidGenerator;
|
|
823
|
+
private lastLocalOperation;
|
|
823
824
|
/**
|
|
824
825
|
* Manages the collaboration between multiple users on the same spreadsheet.
|
|
825
826
|
* It can forward local state changes to other users to ensure they all eventually
|
|
@@ -861,9 +862,9 @@ declare class Session extends EventBus<CollaborativeEvent> {
|
|
|
861
862
|
getRevisionId(): UID;
|
|
862
863
|
isFullySynchronized(): boolean;
|
|
863
864
|
/**
|
|
864
|
-
* Get the last local revision
|
|
865
|
+
* Get the last local revision
|
|
865
866
|
* */
|
|
866
|
-
getLastLocalNonEmptyRevision(
|
|
867
|
+
getLastLocalNonEmptyRevision(): Revision | undefined;
|
|
867
868
|
private _move;
|
|
868
869
|
/**
|
|
869
870
|
* Handles messages received from other clients in the collaborative
|
|
@@ -1769,6 +1770,7 @@ interface MoveColumnsRowsCommand extends HeadersDependentCommand {
|
|
|
1769
1770
|
type: "MOVE_COLUMNS_ROWS";
|
|
1770
1771
|
base: HeaderIndex;
|
|
1771
1772
|
elements: HeaderIndex[];
|
|
1773
|
+
position: "before" | "after";
|
|
1772
1774
|
}
|
|
1773
1775
|
interface ResizeColumnsRowsCommand extends HeadersDependentCommand {
|
|
1774
1776
|
type: "RESIZE_COLUMNS_ROWS";
|
|
@@ -2665,6 +2667,7 @@ type ValueAndFormat = {
|
|
|
2665
2667
|
};
|
|
2666
2668
|
type Arg = Maybe<ValueAndFormat> | Matrix<ValueAndFormat>;
|
|
2667
2669
|
type ArgValue = Maybe<CellValue> | Matrix<CellValue>;
|
|
2670
|
+
declare function isMatrix(x: any): x is Matrix<any>;
|
|
2668
2671
|
interface HeaderDimensions {
|
|
2669
2672
|
start: Pixel;
|
|
2670
2673
|
size: Pixel;
|
|
@@ -4139,25 +4142,23 @@ declare class CustomColorsPlugin extends UIPlugin<CustomColorState> {
|
|
|
4139
4142
|
private tryToAddColor;
|
|
4140
4143
|
}
|
|
4141
4144
|
|
|
4145
|
+
interface EvaluationChartStyle {
|
|
4146
|
+
background: Color;
|
|
4147
|
+
fontColor: Color;
|
|
4148
|
+
}
|
|
4142
4149
|
interface EvaluationChartState {
|
|
4143
4150
|
charts: Record<UID, ChartRuntime | undefined>;
|
|
4144
4151
|
}
|
|
4145
4152
|
declare class EvaluationChartPlugin extends UIPlugin<EvaluationChartState> {
|
|
4146
|
-
static getters: readonly ["getChartRuntime", "
|
|
4153
|
+
static getters: readonly ["getChartRuntime", "getStyleOfSingleCellChart"];
|
|
4147
4154
|
charts: Record<UID, ChartRuntime | undefined>;
|
|
4148
4155
|
private createRuntimeChart;
|
|
4149
4156
|
handle(cmd: CoreViewCommand): void;
|
|
4150
4157
|
getChartRuntime(figureId: UID): ChartRuntime;
|
|
4151
4158
|
/**
|
|
4152
|
-
* Get the background
|
|
4153
|
-
* of the chart. In order of priority, it will return :
|
|
4154
|
-
*
|
|
4155
|
-
* - the chart background color if one is defined
|
|
4156
|
-
* - the fill color of the cell if one is defined
|
|
4157
|
-
* - the fill color of the cell from conditional formats if one is defined
|
|
4158
|
-
* - the default chart color if no other color is defined
|
|
4159
|
+
* Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
|
|
4159
4160
|
*/
|
|
4160
|
-
|
|
4161
|
+
getStyleOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined): EvaluationChartStyle;
|
|
4161
4162
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
4162
4163
|
}
|
|
4163
4164
|
|
|
@@ -6442,8 +6443,8 @@ interface Props$m {
|
|
|
6442
6443
|
onCellHovered: (position: Partial<Position$1>) => void;
|
|
6443
6444
|
onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
|
|
6444
6445
|
onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
|
|
6445
|
-
|
|
6446
|
-
|
|
6446
|
+
addZone: boolean;
|
|
6447
|
+
expandZone: boolean;
|
|
6447
6448
|
}) => void;
|
|
6448
6449
|
onCellRightClicked: (col: HeaderIndex, row: HeaderIndex, coordinates: DOMCoordinates) => void;
|
|
6449
6450
|
onGridResized: (dimension: Rect) => void;
|
|
@@ -7440,6 +7441,7 @@ interface ResizerState {
|
|
|
7440
7441
|
draggerShadowThickness: number;
|
|
7441
7442
|
delta: number;
|
|
7442
7443
|
base: number;
|
|
7444
|
+
position: "before" | "after";
|
|
7443
7445
|
}
|
|
7444
7446
|
interface ResizerProps {
|
|
7445
7447
|
onOpenContextMenu: (type: ContextMenuType, x: Pixel, y: Pixel) => void;
|
|
@@ -7462,7 +7464,7 @@ declare abstract class AbstractResizer extends Component<ResizerProps, Spreadshe
|
|
|
7462
7464
|
abstract _getMaxSize(): Pixel;
|
|
7463
7465
|
abstract _updateSize(): void;
|
|
7464
7466
|
abstract _moveElements(): void;
|
|
7465
|
-
abstract _selectElement(index: HeaderIndex,
|
|
7467
|
+
abstract _selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
7466
7468
|
abstract _increaseSelection(index: HeaderIndex): void;
|
|
7467
7469
|
abstract _fitElementSize(index: HeaderIndex): void;
|
|
7468
7470
|
abstract _getType(): ContextMenuType;
|
|
@@ -7496,7 +7498,7 @@ declare class ColResizer extends AbstractResizer {
|
|
|
7496
7498
|
_getMaxSize(): Pixel;
|
|
7497
7499
|
_updateSize(): void;
|
|
7498
7500
|
_moveElements(): void;
|
|
7499
|
-
_selectElement(index: HeaderIndex,
|
|
7501
|
+
_selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
7500
7502
|
_increaseSelection(index: HeaderIndex): void;
|
|
7501
7503
|
_fitElementSize(index: HeaderIndex): void;
|
|
7502
7504
|
_getType(): ContextMenuType;
|
|
@@ -7521,7 +7523,7 @@ declare class RowResizer extends AbstractResizer {
|
|
|
7521
7523
|
_getMaxSize(): Pixel;
|
|
7522
7524
|
_updateSize(): void;
|
|
7523
7525
|
_moveElements(): void;
|
|
7524
|
-
_selectElement(index: HeaderIndex,
|
|
7526
|
+
_selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
7525
7527
|
_increaseSelection(index: HeaderIndex): void;
|
|
7526
7528
|
_fitElementSize(index: HeaderIndex): void;
|
|
7527
7529
|
_getType(): ContextMenuType;
|
|
@@ -7648,9 +7650,9 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7648
7650
|
getClientPositionKey(client: Client): string;
|
|
7649
7651
|
isCellHovered(col: HeaderIndex, row: HeaderIndex): boolean;
|
|
7650
7652
|
private getGridRect;
|
|
7651
|
-
onCellClicked(col: HeaderIndex, row: HeaderIndex, {
|
|
7652
|
-
|
|
7653
|
-
|
|
7653
|
+
onCellClicked(col: HeaderIndex, row: HeaderIndex, { addZone, expandZone }: {
|
|
7654
|
+
addZone: boolean;
|
|
7655
|
+
expandZone: boolean;
|
|
7654
7656
|
}): void;
|
|
7655
7657
|
onCellDoubleClicked(col: HeaderIndex, row: HeaderIndex): void;
|
|
7656
7658
|
closeOpenedPopover(): void;
|
|
@@ -7864,6 +7866,7 @@ declare const helpers: {
|
|
|
7864
7866
|
colorToRGBA: typeof colorToRGBA;
|
|
7865
7867
|
positionToZone: typeof positionToZone;
|
|
7866
7868
|
isDefined: typeof isDefined;
|
|
7869
|
+
isMatrix: typeof isMatrix;
|
|
7867
7870
|
lazy: typeof lazy;
|
|
7868
7871
|
genericRepeat: typeof genericRepeat;
|
|
7869
7872
|
createAction: typeof createAction;
|