@odoo/o-spreadsheet 16.0.60 → 16.0.63

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.
@@ -339,6 +339,20 @@ declare class UuidGenerator {
339
339
  private isFastIdStrategy;
340
340
  private fastIdStart;
341
341
  setIsFastStrategy(isFast: boolean): void;
342
+ /**
343
+ * Generates a custom UUID using a simple 26^8 method (8-character alphanumeric string with lowercase letters)
344
+ * This has a higher chance of collision than a UUIDv4, but not only faster to generate than an UUIDV4,
345
+ * it also has a smaller size, which is preferable to alleviate the overall data size.
346
+ *
347
+ * This method is preferable when generating uuids for the core data (sheetId, figureId, etc)
348
+ * as they will appear several times in the revisions and local history.
349
+ *
350
+ */
351
+ smallUuid(): string;
352
+ /**
353
+ * Generates an UUIDV4, has astronomically low chance of collision, but is larger in size than the smallUuid.
354
+ * This method should be used when you need to avoid collisions at all costs, like the id of a revision.
355
+ */
342
356
  uuidv4(): string;
343
357
  }
344
358
 
@@ -925,14 +939,10 @@ interface NewLocalStateUpdateEvent {
925
939
  type: "new-local-state-update";
926
940
  id: UID;
927
941
  }
928
- interface RevisionsDroppedEvent {
929
- type: "pending-revisions-dropped";
930
- revisionIds: UID[];
931
- }
932
942
  interface SnapshotEvent {
933
943
  type: "snapshot";
934
944
  }
935
- type CollaborativeEvent = NewLocalStateUpdateEvent | UnexpectedRevisionIdEvent | RemoteRevisionReceivedEvent | RevisionAcknowledgedEvent | RevisionUndone | RevisionRedone | RevisionsDroppedEvent | SnapshotEvent | CollaborativeEventReceived;
945
+ type CollaborativeEvent = NewLocalStateUpdateEvent | UnexpectedRevisionIdEvent | RemoteRevisionReceivedEvent | RevisionAcknowledgedEvent | RevisionUndone | RevisionRedone | SnapshotEvent | CollaborativeEventReceived;
936
946
 
937
947
  interface AbstractMessage {
938
948
  version: number;
@@ -2167,67 +2177,68 @@ declare const enum CommandResult {
2167
2177
  InvalidRange = 25,
2168
2178
  InvalidZones = 26,
2169
2179
  InvalidSheetId = 27,
2170
- InputAlreadyFocused = 28,
2171
- MaximumRangesReached = 29,
2172
- InvalidInputId = 30,
2173
- InvalidChartDefinition = 31,
2174
- InvalidDataSet = 32,
2175
- InvalidLabelRange = 33,
2176
- InvalidScorecardKeyValue = 34,
2177
- InvalidScorecardBaseline = 35,
2178
- InvalidGaugeDataRange = 36,
2179
- EmptyGaugeRangeMin = 37,
2180
- GaugeRangeMinNaN = 38,
2181
- EmptyGaugeRangeMax = 39,
2182
- GaugeRangeMaxNaN = 40,
2183
- GaugeRangeMinBiggerThanRangeMax = 41,
2184
- GaugeLowerInflectionPointNaN = 42,
2185
- GaugeUpperInflectionPointNaN = 43,
2186
- GaugeLowerBiggerThanUpper = 44,
2187
- InvalidAutofillSelection = 45,
2188
- WrongComposerSelection = 46,
2189
- MinBiggerThanMax = 47,
2190
- LowerBiggerThanUpper = 48,
2191
- MidBiggerThanMax = 49,
2192
- MinBiggerThanMid = 50,
2193
- FirstArgMissing = 51,
2194
- SecondArgMissing = 52,
2195
- MinNaN = 53,
2196
- MidNaN = 54,
2197
- MaxNaN = 55,
2198
- ValueUpperInflectionNaN = 56,
2199
- ValueLowerInflectionNaN = 57,
2200
- MinInvalidFormula = 58,
2201
- MidInvalidFormula = 59,
2202
- MaxInvalidFormula = 60,
2203
- ValueUpperInvalidFormula = 61,
2204
- ValueLowerInvalidFormula = 62,
2205
- InvalidSortZone = 63,
2206
- WaitingSessionConfirmation = 64,
2207
- MergeOverlap = 65,
2208
- TooManyHiddenElements = 66,
2209
- Readonly = 67,
2210
- InvalidViewportSize = 68,
2211
- InvalidScrollingDirection = 69,
2212
- FigureDoesNotExist = 70,
2213
- InvalidConditionalFormatId = 71,
2214
- InvalidCellPopover = 72,
2215
- EmptyTarget = 73,
2216
- InvalidFreezeQuantity = 74,
2217
- FrozenPaneOverlap = 75,
2218
- ValuesNotChanged = 76,
2219
- InvalidFilterZone = 77,
2220
- FilterOverlap = 78,
2221
- FilterNotFound = 79,
2222
- MergeInFilter = 80,
2223
- NonContinuousTargets = 81,
2224
- DuplicatedFigureId = 82,
2225
- InvalidSelectionStep = 83,
2226
- DuplicatedChartId = 84,
2227
- ChartDoesNotExist = 85,
2228
- InvalidHeaderIndex = 86,
2229
- InvalidQuantity = 87,
2230
- NoChanges = 88
2180
+ InvalidCellId = 28,
2181
+ InputAlreadyFocused = 29,
2182
+ MaximumRangesReached = 30,
2183
+ InvalidInputId = 31,
2184
+ InvalidChartDefinition = 32,
2185
+ InvalidDataSet = 33,
2186
+ InvalidLabelRange = 34,
2187
+ InvalidScorecardKeyValue = 35,
2188
+ InvalidScorecardBaseline = 36,
2189
+ InvalidGaugeDataRange = 37,
2190
+ EmptyGaugeRangeMin = 38,
2191
+ GaugeRangeMinNaN = 39,
2192
+ EmptyGaugeRangeMax = 40,
2193
+ GaugeRangeMaxNaN = 41,
2194
+ GaugeRangeMinBiggerThanRangeMax = 42,
2195
+ GaugeLowerInflectionPointNaN = 43,
2196
+ GaugeUpperInflectionPointNaN = 44,
2197
+ GaugeLowerBiggerThanUpper = 45,
2198
+ InvalidAutofillSelection = 46,
2199
+ WrongComposerSelection = 47,
2200
+ MinBiggerThanMax = 48,
2201
+ LowerBiggerThanUpper = 49,
2202
+ MidBiggerThanMax = 50,
2203
+ MinBiggerThanMid = 51,
2204
+ FirstArgMissing = 52,
2205
+ SecondArgMissing = 53,
2206
+ MinNaN = 54,
2207
+ MidNaN = 55,
2208
+ MaxNaN = 56,
2209
+ ValueUpperInflectionNaN = 57,
2210
+ ValueLowerInflectionNaN = 58,
2211
+ MinInvalidFormula = 59,
2212
+ MidInvalidFormula = 60,
2213
+ MaxInvalidFormula = 61,
2214
+ ValueUpperInvalidFormula = 62,
2215
+ ValueLowerInvalidFormula = 63,
2216
+ InvalidSortZone = 64,
2217
+ WaitingSessionConfirmation = 65,
2218
+ MergeOverlap = 66,
2219
+ TooManyHiddenElements = 67,
2220
+ Readonly = 68,
2221
+ InvalidViewportSize = 69,
2222
+ InvalidScrollingDirection = 70,
2223
+ FigureDoesNotExist = 71,
2224
+ InvalidConditionalFormatId = 72,
2225
+ InvalidCellPopover = 73,
2226
+ EmptyTarget = 74,
2227
+ InvalidFreezeQuantity = 75,
2228
+ FrozenPaneOverlap = 76,
2229
+ ValuesNotChanged = 77,
2230
+ InvalidFilterZone = 78,
2231
+ FilterOverlap = 79,
2232
+ FilterNotFound = 80,
2233
+ MergeInFilter = 81,
2234
+ NonContinuousTargets = 82,
2235
+ DuplicatedFigureId = 83,
2236
+ InvalidSelectionStep = 84,
2237
+ DuplicatedChartId = 85,
2238
+ ChartDoesNotExist = 86,
2239
+ InvalidHeaderIndex = 87,
2240
+ InvalidQuantity = 88,
2241
+ NoChanges = 89
2231
2242
  }
2232
2243
  interface CommandHandler<T> {
2233
2244
  allowDispatch(command: T): CommandResult | CommandResult[];
@@ -2733,7 +2744,7 @@ declare class SelectiveHistory<T = unknown> {
2733
2744
  * @param insertAfter the id of the operation after which to insert the redo
2734
2745
  */
2735
2746
  redo(operationId: UID, redoId: UID, insertAfter: UID): void;
2736
- drop(operationId: UID): void;
2747
+ rebase(operationId: UID): void;
2737
2748
  /**
2738
2749
  * Revert the state as it was *before* the given operation was executed.
2739
2750
  */
@@ -2885,7 +2896,6 @@ declare class LocalHistory extends EventBus$1 implements CommandHandler<Command>
2885
2896
  private requestHistoryChange;
2886
2897
  canUndo(): boolean;
2887
2898
  canRedo(): boolean;
2888
- private drop;
2889
2899
  private onNewLocalStateUpdate;
2890
2900
  private selectiveUndo;
2891
2901
  private selectiveRedo;
@@ -3105,7 +3115,7 @@ declare class BordersPlugin extends CorePlugin<BordersPluginState> implements Bo
3105
3115
  }
3106
3116
 
3107
3117
  interface CoreState {
3108
- cells: Record<UID, Record<UID, Cell | undefined>>;
3118
+ cells: Record<UID, Record<UID, Cell | undefined> | undefined>;
3109
3119
  nextId: number;
3110
3120
  }
3111
3121
  /**
@@ -4160,6 +4170,7 @@ declare class GridSelectionPlugin extends UIPlugin {
4160
4170
  private onAddElements;
4161
4171
  private onMoveElements;
4162
4172
  private isMoveElementAllowed;
4173
+ private fallbackToVisibleSheet;
4163
4174
  /**
4164
4175
  * Clip the selection if it spans outside the sheet
4165
4176
  */