@univerjs/sheets 0.6.1 → 0.6.2

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>;
@@ -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>;
@@ -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>;