@univerjs/sheets 0.6.1 → 0.6.2-nightly.202503031606

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.
@@ -6,3 +6,7 @@ export interface ISelectionConfig {
6
6
  export interface ISelectionsConfig {
7
7
  [subUnitId: string]: ISelectionConfig[];
8
8
  }
9
+ export interface IDiscreteRange {
10
+ rows: number[];
11
+ cols: number[];
12
+ }
@@ -1,5 +1,6 @@
1
- import { ICellData, IObjectMatrixPrimitiveType, IRange, Nullable, UniverInstanceService, Workbook, Worksheet } from '@univerjs/core';
1
+ import { IAccessor, ICellData, IObjectMatrixPrimitiveType, IRange, Nullable, UniverInstanceService, Workbook, Worksheet } from '@univerjs/core';
2
2
  import { IExpandParams } from '../commands/commands/utils/selection-utils';
3
+ import { IDiscreteRange } from './interfaces';
3
4
  export declare const groupByKey: <T = Record<string, unknown>>(arr: T[], key: string, blankKey?: string) => Record<string, T[]>;
4
5
  export declare const createUniqueKey: (initValue?: number) => () => number;
5
6
  export declare function expandToContinuousRange(startRange: IRange, directions: IExpandParams, worksheet: Worksheet): IRange;
@@ -17,3 +18,5 @@ export declare function generateNullCell(range: IRange[]): IObjectMatrixPrimitiv
17
18
  export declare function generateNullCellValue(range: IRange[]): IObjectMatrixPrimitiveType<ICellData>;
18
19
  export declare function generateNullCellStyle(ranges: IRange[]): IObjectMatrixPrimitiveType<ICellData>;
19
20
  export declare function getActiveWorksheet(instanceService: UniverInstanceService): [Nullable<Workbook>, Nullable<Worksheet>];
21
+ export declare function rangeToDiscreteRange(range: IRange, accessor: IAccessor, unitId?: string, subUnitId?: string, considerHide?: boolean): IDiscreteRange | null;
22
+ export declare function getVisibleRanges(ranges: IRange[], accessor: IAccessor, unitId?: string, subUnitId?: string): IRange[];
@@ -0,0 +1,17 @@
1
+ import { ICellData, ICommand, IObjectMatrixPrimitiveType } from '@univerjs/core';
2
+ export interface IAppendRowCommandParams {
3
+ unitId: string;
4
+ subUnitId: string;
5
+ cellValue: IObjectMatrixPrimitiveType<ICellData>;
6
+ insertRowNums?: number;
7
+ insertColumnNums?: number;
8
+ maxRows?: number;
9
+ maxColumns?: number;
10
+ }
11
+ export declare const AppendRowCommandId = "sheet.command.append-row";
12
+ /**
13
+ * this command and its interface should not be exported from index.ts
14
+ *
15
+ * @internal
16
+ */
17
+ export declare const AppendRowCommand: ICommand<IAppendRowCommandParams>;
@@ -24,6 +24,11 @@ export declare const InsertRowCommand: ICommand;
24
24
  export declare const InsertRowByRangeCommand: ICommand;
25
25
  export declare const InsertRowBeforeCommand: ICommand;
26
26
  export declare const InsertRowAfterCommand: ICommand;
27
+ export interface IInsertMultiRowsCommandParams {
28
+ value: number;
29
+ }
30
+ export declare const InsertMultiRowsAboveCommand: ICommand;
31
+ export declare const InsertMultiRowsAfterCommand: ICommand;
27
32
  export interface IInsertColCommandParams {
28
33
  unitId: string;
29
34
  subUnitId: string;
@@ -36,3 +41,8 @@ export declare const InsertColCommand: ICommand<IInsertColCommandParams>;
36
41
  export declare const InsertColByRangeCommand: ICommand<IInsertColCommandParams>;
37
42
  export declare const InsertColBeforeCommand: ICommand;
38
43
  export declare const InsertColAfterCommand: ICommand;
44
+ export interface IInsertMultiColsCommandParams {
45
+ value: number;
46
+ }
47
+ export declare const InsertMultiColsLeftCommand: ICommand;
48
+ export declare const InsertMultiColsRightCommand: ICommand;
@@ -64,7 +64,7 @@ export interface ISetTextWrapCommandParams extends ISetStyleCommonParams {
64
64
  value: WrapStrategy;
65
65
  }
66
66
  export declare const SetTextWrapCommand: ICommand<ISetTextWrapCommandParams>;
67
- export interface ISetTextRotationCommandParams {
67
+ export interface ISetTextRotationCommandParams extends ISetStyleCommonParams {
68
68
  value: number | string;
69
69
  }
70
70
  export declare const SetTextRotationCommand: ICommand<ISetTextRotationCommandParams>;
@@ -57,7 +57,7 @@ export declare function createRangeIteratorWithSkipFilteredRows(sheet: Worksheet
57
57
  * @param startColumn
58
58
  * @param endColumn
59
59
  * @param isRow
60
- * @param styleRowOrColumn
60
+ * @param sourceRangeIndex
61
61
  */
62
- export declare function copyRangeStyles(worksheet: Worksheet, startRow: number, endRow: number, startColumn: number, endColumn: number, isRow: boolean, styleRowOrColumn: number): IObjectMatrixPrimitiveType<ICellData>;
62
+ export declare function copyRangeStyles(worksheet: Worksheet, startRow: number, endRow: number, startColumn: number, endColumn: number, isRow: boolean, sourceRangeIndex: number): IObjectMatrixPrimitiveType<ICellData>;
63
63
  export declare function copyRangeStylesWithoutBorder(worksheet: Worksheet, startRow: number, endRow: number, startColumn: number, endColumn: number, isRow: boolean, styleRowOrColumn: number): IObjectMatrixPrimitiveType<ICellData>;
@@ -1,4 +1,4 @@
1
- import { IOperation } from '@univerjs/core';
1
+ import { ICommand, IOperation, IRange } from '@univerjs/core';
2
2
  import { ISelectionWithStyle } from '../../basics/selection';
3
3
  import { SelectionMoveType } from '../../services/selections/type';
4
4
  export interface ISetSelectionsOperationParams {
@@ -14,3 +14,12 @@ export interface ISetSelectionsOperationParams {
14
14
  * Set selections to SelectionModel(WorkbookSelectionModel) by selectionManagerService.
15
15
  */
16
16
  export declare const SetSelectionsOperation: IOperation<ISetSelectionsOperationParams>;
17
+ export interface ISelectRangeCommandParams {
18
+ unitId: string;
19
+ subUnit: string;
20
+ range: IRange;
21
+ /** If should scroll to the selected range. */
22
+ reveal?: boolean;
23
+ extra?: string;
24
+ }
25
+ export declare const SelectRangeCommand: ICommand<ISelectRangeCommandParams>;