@univerjs/core 0.1.14 → 0.1.15
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.
- package/lib/cjs/index.js +8 -8
- package/lib/es/index.js +1410 -1334
- package/lib/types/index.d.ts +2 -1
- package/lib/types/services/user-manager/const.d.ts +1 -1
- package/lib/types/services/user-manager/user-manager.service.d.ts +24 -6
- package/lib/types/sheets/range.d.ts +1 -0
- package/lib/types/sheets/worksheet.d.ts +4 -0
- package/lib/types/types/interfaces/i-cell-custom-render.d.ts +4 -0
- package/lib/types/types/interfaces/i-row-data.d.ts +4 -0
- package/lib/types/types/interfaces/i-selection-data.d.ts +4 -0
- package/lib/umd/index.js +8 -8
- package/package.json +8 -7
- package/lib/types/services/user-manager/index.d.ts +0 -16
package/lib/types/index.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export { type IStyleSheet, ThemeService } from './services/theme/theme.service';
|
|
|
62
62
|
export { type IUndoRedoCommandInfos, type IUndoRedoCommandInfosByInterceptor, type IUndoRedoItem, IUndoRedoService, type IUndoRedoStatus, LocalUndoRedoService, RedoCommand, UndoCommand, RedoCommandId, UndoCommandId, } from './services/undoredo/undoredo.service';
|
|
63
63
|
export * from './shared';
|
|
64
64
|
export { fromCallback } from './shared/rxjs';
|
|
65
|
-
export { UserManagerService } from './services/user-manager/user-manager.service';
|
|
65
|
+
export { UserManagerService, type IUser } from './services/user-manager/user-manager.service';
|
|
66
66
|
export type { IComposeInterceptors, IInterceptor, InterceptorHandler } from './common/interceptor';
|
|
67
67
|
export { composeInterceptors, createInterceptorKey, InterceptorManager } from './common/interceptor';
|
|
68
68
|
export { normalizeTextRuns } from './docs/data-model/text-x/apply-utils/common';
|
|
@@ -101,6 +101,7 @@ export { DataValidationOperator } from './types/enum/data-validation-operator';
|
|
|
101
101
|
export { DataValidationType } from './types/enum/data-validation-type';
|
|
102
102
|
export { DataValidationStatus } from './types/enum/data-validation-status';
|
|
103
103
|
export type { IPermissionTypes, WorkbookPermissionPointConstructor } from './services/permission/type';
|
|
104
|
+
export { PermissionService } from './services/permission/permission.service';
|
|
104
105
|
export { AuthzIoLocalService } from './services/authz-io/authz-io-local.service';
|
|
105
106
|
export { IAuthzIoService } from './services/authz-io/type';
|
|
106
107
|
export { createDefaultUser } from './services/user-manager/const';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IUser, UnitRole } from '@univerjs/protocol';
|
|
2
2
|
|
|
3
|
-
export declare const createDefaultUser: (type
|
|
3
|
+
export declare const createDefaultUser: (type?: UnitRole) => IUser;
|
|
4
4
|
export declare const isDevRole: (userId: string, type: UnitRole) => boolean;
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export interface IUser {
|
|
17
|
+
userID: string;
|
|
18
|
+
name: string;
|
|
19
|
+
avatar?: string;
|
|
20
|
+
}
|
|
3
21
|
export declare class UserManagerService {
|
|
4
22
|
private _model;
|
|
5
23
|
private _userChange$;
|
|
@@ -15,10 +33,10 @@ export declare class UserManagerService {
|
|
|
15
33
|
* @memberof UserManagerService
|
|
16
34
|
*/
|
|
17
35
|
currentUser$: import('rxjs').Observable<IUser>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
addUser(user:
|
|
21
|
-
getUser(userId: string, callBack?: () => void):
|
|
36
|
+
getCurrentUser<T extends IUser>(): T;
|
|
37
|
+
setCurrentUser<T extends IUser>(user: T): void;
|
|
38
|
+
addUser<T extends IUser>(user: T): void;
|
|
39
|
+
getUser<T extends IUser>(userId: string, callBack?: () => void): T | undefined;
|
|
22
40
|
delete(userId: string): void;
|
|
23
41
|
clear(): void;
|
|
24
42
|
}
|
|
@@ -33,6 +33,7 @@ export declare class Range {
|
|
|
33
33
|
private _worksheet;
|
|
34
34
|
constructor(workSheet: Worksheet, range: IRange, _deps: IRangeDependencies);
|
|
35
35
|
static foreach(range: IRange, action: (row: number, column: number) => void): void;
|
|
36
|
+
static transformRange: (range: IRange, worksheet: Worksheet) => IRange;
|
|
36
37
|
/**
|
|
37
38
|
* get current range data
|
|
38
39
|
*
|
|
@@ -89,6 +89,10 @@ export declare class Worksheet {
|
|
|
89
89
|
getRange(range: IRange): Range;
|
|
90
90
|
getRange(startRow: number, startColumn: number): Range;
|
|
91
91
|
getRange(startRow: number, startColumn: number, endRow: number, endColumn: number): Range;
|
|
92
|
+
getScrollLeftTopFromSnapshot(): {
|
|
93
|
+
scrollLeft: number;
|
|
94
|
+
scrollTop: number;
|
|
95
|
+
};
|
|
92
96
|
/**
|
|
93
97
|
* Return WorkSheetZoomRatio
|
|
94
98
|
* @return zoomRatio
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Nullable } from '../../shared';
|
|
2
|
+
import { Worksheet } from '../../sheets/worksheet';
|
|
3
|
+
import { Workbook } from '../../sheets/workbook';
|
|
2
4
|
import { ISelectionCellWithCoord } from './i-selection-data';
|
|
3
5
|
import { IStyleData } from './i-style-data';
|
|
4
6
|
import { ICellDataForSheetInterceptor } from './i-cell-data';
|
|
@@ -11,6 +13,8 @@ export interface ICellRenderContext {
|
|
|
11
13
|
subUnitId: string;
|
|
12
14
|
row: number;
|
|
13
15
|
col: number;
|
|
16
|
+
worksheet: Worksheet;
|
|
17
|
+
workbook?: Workbook;
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
16
20
|
* @debt This shouldn't exist in core package.
|
|
@@ -48,3 +48,7 @@ export interface ITextRangeParam extends ITextRange {
|
|
|
48
48
|
segmentId?: string;
|
|
49
49
|
isActive?: boolean;
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Determines whether the cell(row, column) is within the range of the merged cells.
|
|
53
|
+
*/
|
|
54
|
+
export declare function getCellInfoInMergeData(row: number, column: number, mergeData?: IRange[]): ISelectionCell;
|