@univerjs/core 0.12.4 → 0.13.0

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.
@@ -16,8 +16,10 @@
16
16
  export declare const DOCS_NORMAL_EDITOR_UNIT_ID_KEY = "__INTERNAL_EDITOR__DOCS_NORMAL";
17
17
  export declare const DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY = "__INTERNAL_EDITOR__DOCS_FORMULA_BAR";
18
18
  export declare const DOCS_ZEN_EDITOR_UNIT_ID_KEY = "__INTERNAL_EDITOR__ZEN_EDITOR";
19
+ export declare const DOCS_COMMENT_EDITOR_UNIT_ID_KEY = "__INTERNAL_EDITOR__COMMENT_EDITOR";
19
20
  export declare const DEFAULT_EMPTY_DOCUMENT_VALUE = "\r\n";
20
21
  export declare const IS_ROW_STYLE_PRECEDE_COLUMN_STYLE = "isRowStylePrecedeColumnStyle";
21
22
  export declare const AUTO_HEIGHT_FOR_MERGED_CELLS: unique symbol;
22
23
  export declare function createInternalEditorID(id: string): string;
23
24
  export declare function isInternalEditorID(id: string): boolean;
25
+ export declare function isCommentEditorID(id: string): id is "__INTERNAL_EDITOR__COMMENT_EDITOR";
@@ -105,7 +105,7 @@ export { DEFAULT_WORKSHEET_COLUMN_COUNT, DEFAULT_WORKSHEET_COLUMN_COUNT_KEY, DEF
105
105
  export { Styles } from './sheets/styles';
106
106
  export * from './sheets/typedef';
107
107
  export type { IPosition } from './sheets/typedef';
108
- export { addLinkToDocumentModel, isNotNullOrUndefined, isRangesEqual, isUnitRangesEqual } from './sheets/util';
108
+ export { addLinkToDocumentModel, getEmptyCell, isNotNullOrUndefined, isRangesEqual, isUnitRangesEqual } from './sheets/util';
109
109
  export { createDocumentModelWithStyle } from './sheets/util';
110
110
  export { SheetViewModel } from './sheets/view-model';
111
111
  export { getWorksheetUID, Workbook } from './sheets/workbook';
@@ -1,7 +1,7 @@
1
1
  import { IActionInfo, IAllowedRequest, IBatchAllowedResponse, ICollaborator, ICreateRequest, IListPermPointRequest, IPermissionPoint, IPutCollaboratorsRequest, IUnitRoleKV, IUpdatePermPointRequest, UnitAction } from '@univerjs/protocol';
2
+ import { IAuthzIoService } from './type';
2
3
  import { IResourceManagerService } from '../resource-manager/type';
3
4
  import { UserManagerService } from '../user-manager/user-manager.service';
4
- import { IAuthzIoService } from './type';
5
5
  /**
6
6
  * Do not use the mock implementation in a production environment as it is a minimal version.
7
7
  */
@@ -14,8 +14,8 @@ export declare class AuthzIoLocalService implements IAuthzIoService {
14
14
  private _getRole;
15
15
  private _initSnapshot;
16
16
  create(config: ICreateRequest): Promise<string>;
17
- allowed(_config: IAllowedRequest): Promise<IActionInfo[]>;
18
- batchAllowed(_config: IAllowedRequest[]): Promise<IBatchAllowedResponse['objectActions']>;
17
+ allowed(config: IAllowedRequest): Promise<IActionInfo[]>;
18
+ batchAllowed(configs: IAllowedRequest[]): Promise<IBatchAllowedResponse['objectActions']>;
19
19
  list(config: IListPermPointRequest): Promise<IPermissionPoint[]>;
20
20
  listCollaborators(): Promise<ICollaborator[]>;
21
21
  listRoles(): Promise<{
@@ -26,6 +26,8 @@ export declare const FOCUSING_FX_BAR_EDITOR = "FOCUSING_FX_BAR_EDITOR";
26
26
  /** The focusing state of the cell editor. */
27
27
  export declare const FOCUSING_UNIVER_EDITOR = "FOCUSING_UNIVER_EDITOR";
28
28
  export declare const FOCUSING_EDITOR_STANDALONE = "FOCUSING_EDITOR_INPUT_FORMULA";
29
+ /** The focusing state of the comment editor. */
30
+ export declare const FOCUSING_COMMENT_EDITOR = "FOCUSING_COMMENT_EDITOR";
29
31
  /** The focusing state of the editor in side panel, such as Chart Editor Panel. */
30
32
  export declare const FOCUSING_PANEL_EDITOR = "FOCUSING_PANEL_EDITOR";
31
33
  export declare const FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE = "FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE";
@@ -6,6 +6,7 @@ import { DocumentDataModel } from '../../docs/data-model/document-data-model';
6
6
  import { Disposable } from '../../shared/lifecycle';
7
7
  import { Workbook } from '../../sheets/workbook';
8
8
  import { IContextService } from '../context/context.service';
9
+ import { ILogService } from '../log/log.service';
9
10
  export type UnitCtor = new (...args: any[]) => UnitModel;
10
11
  export interface ICreateUnitOptions {
11
12
  /**
@@ -70,8 +71,9 @@ export declare const IUniverInstanceService: import('@wendellhu/redi').Identifie
70
71
  export declare class UniverInstanceService extends Disposable implements IUniverInstanceService {
71
72
  private readonly _injector;
72
73
  private readonly _contextService;
74
+ private readonly _logService;
73
75
  private readonly _unitsByType;
74
- constructor(_injector: Injector, _contextService: IContextService);
76
+ constructor(_injector: Injector, _contextService: IContextService, _logService: ILogService);
75
77
  dispose(): void;
76
78
  private _createHandler;
77
79
  __setCreateHandler(handler: (type: UnitType, data: unknown, ctor: UnitCtor, options?: ICreateUnitOptions) => UnitModel): void;
@@ -113,7 +113,7 @@ export declare class SheetSkeleton extends Skeleton {
113
113
  * @param range
114
114
  * @returns {IRange} expanded range because merge info.
115
115
  */
116
- expandRangeByMerge(range: IRange): IRange;
116
+ expandRangeByMerge(range: IRange, inRefSelectionMode?: boolean): IRange;
117
117
  getColumnCount(): number;
118
118
  getRowCount(): number;
119
119
  /**
@@ -1,7 +1,7 @@
1
1
  import { Nullable } from '../shared';
2
2
  import { CellValueType, TextDirection, HorizontalAlign, VerticalAlign, WrapStrategy } from '../types/enum';
3
3
  import { IPaddingData, IStyleBase, IStyleData, ITextRotation, ITextStyle } from '../types/interfaces';
4
- import { IRange, IUnitRange } from './typedef';
4
+ import { ICellData, IRange, IUnitRange } from './typedef';
5
5
  import { DocumentDataModel } from '../docs';
6
6
  export interface IFontLocale {
7
7
  fontList: string[];
@@ -41,3 +41,4 @@ export declare function extractOtherStyle(style?: Nullable<IStyleData>): ICellSt
41
41
  export declare function getFontFormat(format?: Nullable<IStyleData>): IStyleBase;
42
42
  export declare function addLinkToDocumentModel(documentModel: DocumentDataModel, linkUrl: string, linkId: string): void;
43
43
  export declare function isNotNullOrUndefined<T>(value: T | null | undefined): value is T;
44
+ export declare function getEmptyCell(): ICellData;
@@ -68,6 +68,7 @@ export declare class Workbook extends UnitModel<IWorkbookData, UniverInstanceTyp
68
68
  */
69
69
  addWorksheet(id: string, index: number, worksheetSnapshot: Partial<IWorksheetData>): boolean;
70
70
  getSheetOrders(): Readonly<string[]>;
71
+ ensureSheetOrderUnique(): void;
71
72
  getWorksheets(): Map<string, Worksheet>;
72
73
  getActiveSpreadsheet(): Workbook;
73
74
  getStyles(): Styles;
@@ -92,6 +93,7 @@ export declare class Workbook extends UnitModel<IWorkbookData, UniverInstanceTyp
92
93
  * @param worksheet
93
94
  */
94
95
  setActiveSheet(worksheet: Worksheet): void;
96
+ private _removeSheet;
95
97
  removeSheet(sheetId: string): boolean;
96
98
  getActiveSheetIndex(): number;
97
99
  getSheetSize(): number;