@odoo/o-spreadsheet 16.1.19 → 16.1.23

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.
@@ -245,7 +245,7 @@ declare class RangeImpl implements Range {
245
245
  constructor(args: ConstructorArgs, getSheetSize: (sheetId: UID) => ZoneDimension);
246
246
  static fromRange(range: Range, getters: CoreGetters): RangeImpl;
247
247
  get unboundedZone(): UnboundedZone;
248
- get zone(): Zone;
248
+ get zone(): Readonly<Zone>;
249
249
  static getRangeParts(xc: string, zone: UnboundedZone): RangePart[];
250
250
  get isFullCol(): boolean;
251
251
  get isFullRow(): boolean;
@@ -340,6 +340,7 @@ interface SelectionProcessor {
340
340
  selectAll(): DispatchResult;
341
341
  loopSelection(): DispatchResult;
342
342
  selectTableAroundSelection(): DispatchResult;
343
+ isListening(owner: unknown): boolean;
343
344
  }
344
345
  /**
345
346
  * Processes all selection updates (usually from user inputs) and emits an event
@@ -412,6 +413,7 @@ declare class SelectionStreamProcessor implements SelectionProcessor, StatefulSt
412
413
  * Select the entire sheet
413
414
  */
414
415
  selectAll(): DispatchResult;
416
+ isListening(owner: unknown): boolean;
415
417
  /**
416
418
  * Process a new anchor selection event. If the new anchor is inside
417
419
  * the sheet boundaries, the event is pushed to the event stream to
@@ -581,6 +583,7 @@ interface LineChartDefinition {
581
583
  readonly labelsAsText: boolean;
582
584
  readonly stacked: boolean;
583
585
  readonly aggregated?: boolean;
586
+ readonly cumulative: boolean;
584
587
  }
585
588
  type LineChartRuntime = {
586
589
  chartJsConfig: ChartConfiguration;
@@ -647,6 +650,7 @@ interface ExcelChartDefinition {
647
650
  readonly verticalAxisPosition: VerticalAxisPosition;
648
651
  readonly legendPosition: LegendPosition;
649
652
  readonly stacked?: boolean;
653
+ readonly cumulative?: boolean;
650
654
  }
651
655
  interface ChartCreationContext {
652
656
  readonly range?: string[];
@@ -1798,8 +1802,6 @@ interface CopyCommand {
1798
1802
  }
1799
1803
  interface CutCommand {
1800
1804
  type: "CUT";
1801
- /** Zones to cut. If none were given, will copy the zones in the selection*/
1802
- target?: Zone[];
1803
1805
  }
1804
1806
  interface PasteCommand {
1805
1807
  type: "PASTE";
@@ -3498,11 +3500,11 @@ declare class HeaderSizePlugin extends CorePlugin<HeaderSizeState> implements He
3498
3500
  }
3499
3501
 
3500
3502
  declare class HeaderVisibilityPlugin extends CorePlugin {
3501
- static getters: readonly ["canRemoveHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isRowHiddenByUser", "isColHiddenByUser"];
3503
+ static getters: readonly ["checkElementsIncludeAllVisibleHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isRowHiddenByUser", "isColHiddenByUser"];
3502
3504
  private readonly hiddenHeaders;
3503
3505
  allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements | CommandResult.InvalidHeaderIndex;
3504
3506
  handle(cmd: Command): void;
3505
- canRemoveHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
3507
+ checkElementsIncludeAllVisibleHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
3506
3508
  isRowHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
3507
3509
  isColHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
3508
3510
  getHiddenColsGroups(sheetId: UID): ConsecutiveIndexes[];
@@ -3624,7 +3626,7 @@ interface SheetState {
3624
3626
  readonly cellPosition: Record<UID, CellPosition | undefined>;
3625
3627
  }
3626
3628
  declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
3627
- 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"];
3629
+ 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", "checkElementsIncludeAllNonFrozenHeaders"];
3628
3630
  readonly sheetIdsMapName: Record<string, UID | undefined>;
3629
3631
  readonly orderedSheetIds: UID[];
3630
3632
  readonly sheets: Record<UID, Sheet | undefined>;
@@ -3666,6 +3668,11 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
3666
3668
  getSheetZone(sheetId: UID): Zone;
3667
3669
  getPaneDivisions(sheetId: UID): Readonly<PaneDivision>;
3668
3670
  private setPaneDivisions;
3671
+ /**
3672
+ * Checks if all non-frozen header indices are present in the provided elements of selected rows/columns.
3673
+ * This validation ensures that all rows or columns cannot be deleted when frozen panes exist.
3674
+ */
3675
+ checkElementsIncludeAllNonFrozenHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
3669
3676
  /**
3670
3677
  * Check if a zone only contains empty cells
3671
3678
  */
@@ -3847,6 +3854,7 @@ declare class EvaluationConditionalFormatPlugin extends UIPlugin {
3847
3854
  private isStale;
3848
3855
  private computedStyles;
3849
3856
  private computedIcons;
3857
+ private uuidGenerator;
3850
3858
  handle(cmd: Command): void;
3851
3859
  finalize(): void;
3852
3860
  getCellComputedStyle(position: CellPosition): Style;
@@ -3877,6 +3885,7 @@ declare class EvaluationConditionalFormatPlugin extends UIPlugin {
3877
3885
  */
3878
3886
  private adaptRules;
3879
3887
  private pasteCf;
3888
+ private getCFToCopyTo;
3880
3889
  }
3881
3890
 
3882
3891
  declare class FilterEvaluationPlugin extends UIPlugin {
@@ -4653,7 +4662,7 @@ declare class ClipboardPlugin extends UIPlugin {
4653
4662
  */
4654
4663
  declare class GridSelectionPlugin extends UIPlugin {
4655
4664
  static layers: LAYERS[];
4656
- static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getStatisticFnResults", "getAggregate", "getSelectedFigureId", "getSelection", "getActivePosition", "getSheetPosition", "isSelected", "getElementsFromSelection"];
4665
+ static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getStatisticFnResults", "getAggregate", "getSelectedFigureId", "getSelection", "getActivePosition", "getSheetPosition", "isSelected", "getElementsFromSelection", "isGridSelectionActive"];
4657
4666
  private gridSelection;
4658
4667
  private selectedFigureId;
4659
4668
  private sheetsData;
@@ -4663,6 +4672,7 @@ declare class GridSelectionPlugin extends UIPlugin {
4663
4672
  allowDispatch(cmd: Command): CommandResult;
4664
4673
  private handleEvent;
4665
4674
  handle(cmd: Command): void;
4675
+ isGridSelectionActive(): boolean;
4666
4676
  getActiveSheet(): Readonly<Sheet>;
4667
4677
  getActiveSheetId(): UID;
4668
4678
  getActiveCell(): EvaluatedCell;
@@ -5163,6 +5173,7 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
5163
5173
  onUpdateLabelsAsText(ev: any): void;
5164
5174
  onUpdateStacked(ev: any): void;
5165
5175
  onUpdateAggregated(ev: any): void;
5176
+ onUpdateCumulative(ev: any): void;
5166
5177
  }
5167
5178
 
5168
5179
  interface Props$s {