@odoo/o-spreadsheet 17.0.49 → 17.0.50
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 +258 -132
- package/dist/o-spreadsheet.d.ts +21 -8
- package/dist/o-spreadsheet.esm.js +258 -132
- package/dist/o-spreadsheet.iife.js +258 -132
- package/dist/o-spreadsheet.iife.min.js +249 -249
- package/dist/o_spreadsheet.xml +4 -3
- package/package.json +2 -1
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -223,7 +223,7 @@ declare class SelectiveHistory<T = unknown> {
|
|
|
223
223
|
* @param insertAfter the id of the operation after which to insert the redo
|
|
224
224
|
*/
|
|
225
225
|
redo(operationId: UID, redoId: UID, insertAfter: UID): void;
|
|
226
|
-
|
|
226
|
+
rebase(operationId: UID): void;
|
|
227
227
|
getRevertedExecution(): T[];
|
|
228
228
|
/**
|
|
229
229
|
* Revert the state as it was *before* the given operation was executed.
|
|
@@ -282,14 +282,10 @@ interface NewLocalStateUpdateEvent {
|
|
|
282
282
|
type: "new-local-state-update";
|
|
283
283
|
id: UID;
|
|
284
284
|
}
|
|
285
|
-
interface RevisionsDroppedEvent {
|
|
286
|
-
type: "pending-revisions-dropped";
|
|
287
|
-
revisionIds: UID[];
|
|
288
|
-
}
|
|
289
285
|
interface SnapshotEvent {
|
|
290
286
|
type: "snapshot";
|
|
291
287
|
}
|
|
292
|
-
type CollaborativeEvent = NewLocalStateUpdateEvent | UnexpectedRevisionIdEvent | RemoteRevisionReceivedEvent | RevisionAcknowledgedEvent | RevisionUndone | RevisionRedone |
|
|
288
|
+
type CollaborativeEvent = NewLocalStateUpdateEvent | UnexpectedRevisionIdEvent | RemoteRevisionReceivedEvent | RevisionAcknowledgedEvent | RevisionUndone | RevisionRedone | SnapshotEvent | CollaborativeEventReceived;
|
|
293
289
|
|
|
294
290
|
interface Figure {
|
|
295
291
|
id: UID;
|
|
@@ -1052,6 +1048,20 @@ declare class UuidGenerator {
|
|
|
1052
1048
|
private isFastIdStrategy;
|
|
1053
1049
|
private fastIdStart;
|
|
1054
1050
|
setIsFastStrategy(isFast: boolean): void;
|
|
1051
|
+
/**
|
|
1052
|
+
* Generates a custom UUID using a simple 26^8 method (8-character alphanumeric string with lowercase letters)
|
|
1053
|
+
* This has a higher chance of collision than a UUIDv4, but not only faster to generate than an UUIDV4,
|
|
1054
|
+
* it also has a smaller size, which is preferable to alleviate the overall data size.
|
|
1055
|
+
*
|
|
1056
|
+
* This method is preferable when generating uuids for the core data (sheetId, figureId, etc)
|
|
1057
|
+
* as they will appear several times in the revisions and local history.
|
|
1058
|
+
*
|
|
1059
|
+
*/
|
|
1060
|
+
smallUuid(): string;
|
|
1061
|
+
/**
|
|
1062
|
+
* Generates an UUIDV4, has astronomically low chance of collision, but is larger in size than the smallUuid.
|
|
1063
|
+
* This method should be used when you need to avoid collisions at all costs, like the id of a revision.
|
|
1064
|
+
*/
|
|
1055
1065
|
uuidv4(): string;
|
|
1056
1066
|
}
|
|
1057
1067
|
|
|
@@ -2466,6 +2476,7 @@ declare const enum CommandResult {
|
|
|
2466
2476
|
InvalidRange = "InvalidRange",
|
|
2467
2477
|
InvalidZones = "InvalidZones",
|
|
2468
2478
|
InvalidSheetId = "InvalidSheetId",
|
|
2479
|
+
InvalidCellId = "InvalidCellId",
|
|
2469
2480
|
InvalidFigureId = "InvalidFigureId",
|
|
2470
2481
|
InputAlreadyFocused = "InputAlreadyFocused",
|
|
2471
2482
|
MaximumRangesReached = "MaximumRangesReached",
|
|
@@ -3407,7 +3418,7 @@ declare class BordersPlugin extends CorePlugin<BordersPluginState> implements Bo
|
|
|
3407
3418
|
}
|
|
3408
3419
|
|
|
3409
3420
|
interface CoreState {
|
|
3410
|
-
cells: Record<UID, Record<UID, Cell | undefined
|
|
3421
|
+
cells: Record<UID, Record<UID, Cell | undefined> | undefined>;
|
|
3411
3422
|
nextId: number;
|
|
3412
3423
|
}
|
|
3413
3424
|
/**
|
|
@@ -3681,12 +3692,14 @@ interface FigureState {
|
|
|
3681
3692
|
readonly figures: {
|
|
3682
3693
|
[sheet: string]: Record<UID, Figure | undefined> | undefined;
|
|
3683
3694
|
};
|
|
3695
|
+
readonly insertionOrders: UID[];
|
|
3684
3696
|
}
|
|
3685
3697
|
declare class FigurePlugin extends CorePlugin<FigureState> implements FigureState {
|
|
3686
3698
|
static getters: readonly ["getFigures", "getFigure", "getFigureSheetId"];
|
|
3687
3699
|
readonly figures: {
|
|
3688
3700
|
[sheet: string]: Record<UID, Figure | undefined> | undefined;
|
|
3689
3701
|
};
|
|
3702
|
+
readonly insertionOrders: UID[];
|
|
3690
3703
|
allowDispatch(cmd: CoreCommand): CommandResult;
|
|
3691
3704
|
beforeHandle(cmd: CoreCommand): void;
|
|
3692
3705
|
handle(cmd: CoreCommand): void;
|
|
@@ -4579,7 +4592,6 @@ declare class HistoryPlugin extends UIPlugin {
|
|
|
4579
4592
|
private requestHistoryChange;
|
|
4580
4593
|
canUndo(): boolean;
|
|
4581
4594
|
canRedo(): boolean;
|
|
4582
|
-
private drop;
|
|
4583
4595
|
private onNewLocalStateUpdate;
|
|
4584
4596
|
/**
|
|
4585
4597
|
* Fetch the last revision which is not empty and not a repeated command
|
|
@@ -5016,6 +5028,7 @@ declare class GridSelectionPlugin extends UIPlugin {
|
|
|
5016
5028
|
private onAddElements;
|
|
5017
5029
|
private onMoveElements;
|
|
5018
5030
|
private isMoveElementAllowed;
|
|
5031
|
+
private fallbackToVisibleSheet;
|
|
5019
5032
|
/**
|
|
5020
5033
|
* Clip the selection if it spans outside the sheet
|
|
5021
5034
|
*/
|