@odoo/o-spreadsheet 17.1.0-alpha.4 → 17.1.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 +121 -107
- package/dist/o-spreadsheet.d.ts +16 -26
- package/dist/o-spreadsheet.esm.js +121 -107
- package/dist/o-spreadsheet.iife.js +121 -107
- package/dist/o-spreadsheet.iife.min.js +267 -269
- package/dist/o_spreadsheet.xml +4 -4
- package/package.json +1 -1
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
|
|
@@ -1703,6 +1704,7 @@ interface MoveColumnsRowsCommand extends HeadersDependentCommand {
|
|
|
1703
1704
|
type: "MOVE_COLUMNS_ROWS";
|
|
1704
1705
|
base: HeaderIndex;
|
|
1705
1706
|
elements: HeaderIndex[];
|
|
1707
|
+
position: "before" | "after";
|
|
1706
1708
|
}
|
|
1707
1709
|
interface ResizeColumnsRowsCommand extends HeadersDependentCommand {
|
|
1708
1710
|
type: "RESIZE_COLUMNS_ROWS";
|
|
@@ -1825,10 +1827,7 @@ interface DeleteFigureCommand extends SheetDependentCommand {
|
|
|
1825
1827
|
interface CreateChartCommand extends SheetDependentCommand {
|
|
1826
1828
|
type: "CREATE_CHART";
|
|
1827
1829
|
id: UID;
|
|
1828
|
-
position?:
|
|
1829
|
-
x: Pixel;
|
|
1830
|
-
y: Pixel;
|
|
1831
|
-
};
|
|
1830
|
+
position?: DOMCoordinates;
|
|
1832
1831
|
size?: FigureSize;
|
|
1833
1832
|
definition: ChartDefinition;
|
|
1834
1833
|
}
|
|
@@ -1840,10 +1839,7 @@ interface UpdateChartCommand extends SheetDependentCommand {
|
|
|
1840
1839
|
interface CreateImageOverCommand extends SheetDependentCommand {
|
|
1841
1840
|
type: "CREATE_IMAGE";
|
|
1842
1841
|
figureId: UID;
|
|
1843
|
-
position:
|
|
1844
|
-
x: Pixel;
|
|
1845
|
-
y: Pixel;
|
|
1846
|
-
};
|
|
1842
|
+
position: DOMCoordinates;
|
|
1847
1843
|
size: FigureSize;
|
|
1848
1844
|
definition: Image;
|
|
1849
1845
|
}
|
|
@@ -4891,18 +4887,12 @@ declare class InternalViewport {
|
|
|
4891
4887
|
canScrollHorizontally: boolean;
|
|
4892
4888
|
viewportWidth: Pixel;
|
|
4893
4889
|
viewportHeight: Pixel;
|
|
4894
|
-
offsetCorrectionX
|
|
4895
|
-
offsetCorrectionY
|
|
4896
|
-
constructor(getters: Getters, sheetId: UID, boundaries: Zone, sizeInGrid: {
|
|
4897
|
-
width: Pixel;
|
|
4898
|
-
height: Pixel;
|
|
4899
|
-
}, options: {
|
|
4890
|
+
private offsetCorrectionX;
|
|
4891
|
+
private offsetCorrectionY;
|
|
4892
|
+
constructor(getters: Getters, sheetId: UID, boundaries: Zone, sizeInGrid: DOMDimension, options: {
|
|
4900
4893
|
canScrollVertically: boolean;
|
|
4901
4894
|
canScrollHorizontally: boolean;
|
|
4902
|
-
}, offsets:
|
|
4903
|
-
x: Pixel;
|
|
4904
|
-
y: Pixel;
|
|
4905
|
-
});
|
|
4895
|
+
}, offsets: DOMCoordinates);
|
|
4906
4896
|
/** Returns the maximum size (in Pixels) of the viewport relative to its allocated client size
|
|
4907
4897
|
* When the viewport grid size is smaller than its client width (resp. height), it will return
|
|
4908
4898
|
* the client width (resp. height).
|
|
@@ -4925,9 +4915,9 @@ declare class InternalViewport {
|
|
|
4925
4915
|
* the pane that is actually displayed on the client. We therefore adjust the offset of the pane
|
|
4926
4916
|
* until it contains the cell completely.
|
|
4927
4917
|
*/
|
|
4928
|
-
adjustPosition(position
|
|
4929
|
-
adjustPositionX
|
|
4930
|
-
adjustPositionY
|
|
4918
|
+
adjustPosition(position: Position$1): void;
|
|
4919
|
+
private adjustPositionX;
|
|
4920
|
+
private adjustPositionY;
|
|
4931
4921
|
setViewportOffset(offsetX: Pixel, offsetY: Pixel): void;
|
|
4932
4922
|
adjustViewportZone(): void;
|
|
4933
4923
|
/**
|
|
@@ -4938,7 +4928,6 @@ declare class InternalViewport {
|
|
|
4938
4928
|
getRect(zone: Zone): Rect | undefined;
|
|
4939
4929
|
isVisible(col: HeaderIndex, row: HeaderIndex): boolean;
|
|
4940
4930
|
private searchHeaderIndex;
|
|
4941
|
-
private get zone();
|
|
4942
4931
|
private setViewportOffsetX;
|
|
4943
4932
|
private setViewportOffsetY;
|
|
4944
4933
|
/** Corrects the viewport's horizontal offset based on the current structure
|
|
@@ -7420,6 +7409,7 @@ interface ResizerState {
|
|
|
7420
7409
|
draggerShadowThickness: number;
|
|
7421
7410
|
delta: number;
|
|
7422
7411
|
base: number;
|
|
7412
|
+
position: "before" | "after";
|
|
7423
7413
|
}
|
|
7424
7414
|
interface ResizerProps {
|
|
7425
7415
|
onOpenContextMenu: (type: ContextMenuType, x: Pixel, y: Pixel) => void;
|