@univerjs/core 0.1.16 → 0.2.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.
- package/lib/cjs/index.js +8 -8
- package/lib/es/index.js +2541 -2500
- package/lib/types/common/array.d.ts +1 -0
- package/lib/types/common/const.d.ts +2 -2
- package/lib/types/common/interceptor.d.ts +1 -1
- package/lib/types/{observer/index.d.ts → common/url.d.ts} +1 -2
- package/lib/types/docs/data-model/document-data-model.d.ts +3 -3
- package/lib/types/docs/data-model/json-x/json-x.d.ts +1 -1
- package/lib/types/docs/data-model/text-x/apply-utils/common.d.ts +4 -1
- package/lib/types/docs/data-model/text-x/utils.d.ts +13 -1
- package/lib/types/docs/data-model/types.d.ts +2 -2
- package/lib/types/index.d.ts +7 -2
- package/lib/types/observer/observable.d.ts +21 -125
- package/lib/types/services/__tests__/index.d.ts +18 -0
- package/lib/types/services/command/command.service.d.ts +1 -0
- package/lib/types/services/instance/instance.service.d.ts +1 -1
- package/lib/types/services/resource-loader/resource-loader.service.d.ts +2 -0
- package/lib/types/services/resource-loader/type.d.ts +3 -0
- package/lib/types/services/resource-manager/resource-manager.service.d.ts +5 -0
- package/lib/types/services/resource-manager/type.d.ts +1 -0
- package/lib/types/services/undoredo/undoredo.service.d.ts +1 -1
- package/lib/types/services/user-manager/user-manager.service.d.ts +2 -2
- package/lib/types/shared/__tests__/name.spec.d.ts +16 -0
- package/lib/types/shared/common.d.ts +2 -7
- package/lib/types/shared/lifecycle.d.ts +1 -4
- package/lib/types/shared/name.d.ts +26 -0
- package/lib/types/shared/rxjs.d.ts +9 -0
- package/lib/types/shared/tools.d.ts +2 -0
- package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +6 -6
- package/lib/types/sheets/range.d.ts +1 -5
- package/lib/types/sheets/workbook.d.ts +1 -0
- package/lib/types/types/const/clipboard.d.ts +16 -0
- package/lib/types/types/interfaces/i-cell-custom-render.d.ts +3 -3
- package/lib/types/types/interfaces/i-cell-data.d.ts +1 -1
- package/lib/types/types/interfaces/i-document-data.d.ts +24 -1
- package/lib/types/types/interfaces/i-selection-data.d.ts +7 -2
- package/lib/types/types/interfaces/i-style-data.d.ts +4 -0
- package/lib/umd/index.js +8 -8
- package/package.json +7 -7
- package/lib/types/observer/observable-hooks.d.ts +0 -18
- package/lib/types/services/__test__/index.d.ts +0 -18
- package/lib/types/shared/props-from.d.ts +0 -6
- /package/lib/types/services/{__test__ → __tests__}/permission.spec.d.ts +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Nullable } from '../../shared';
|
|
2
2
|
import { Worksheet } from '../../sheets/worksheet';
|
|
3
3
|
import { Workbook } from '../../sheets/workbook';
|
|
4
|
-
import {
|
|
4
|
+
import { ISelectionCellWithMergeInfo } from './i-selection-data';
|
|
5
5
|
import { IStyleData } from './i-style-data';
|
|
6
6
|
import { ICellDataForSheetInterceptor } from './i-cell-data';
|
|
7
7
|
|
|
8
8
|
export interface ICellRenderContext {
|
|
9
9
|
data: ICellDataForSheetInterceptor;
|
|
10
10
|
style: Nullable<IStyleData>;
|
|
11
|
-
primaryWithCoord:
|
|
12
|
-
unitId
|
|
11
|
+
primaryWithCoord: ISelectionCellWithMergeInfo;
|
|
12
|
+
unitId: string;
|
|
13
13
|
subUnitId: string;
|
|
14
14
|
row: number;
|
|
15
15
|
col: number;
|
|
@@ -64,4 +64,4 @@ export interface ICellDataForSheetInterceptor extends ICellData {
|
|
|
64
64
|
export declare function isICellData(value: any): value is ICellData;
|
|
65
65
|
export declare function getCellValueType(cell: ICellData): CellValueType | null | undefined;
|
|
66
66
|
export declare function isNullCell(cell: Nullable<ICellData>): boolean;
|
|
67
|
-
export declare function isCellV(cell: Nullable<ICellData | CellValue>): boolean;
|
|
67
|
+
export declare function isCellV(cell: Nullable<ICellData | CellValue>): cell is string | number | boolean;
|
|
@@ -98,6 +98,7 @@ export interface IDocumentBody {
|
|
|
98
98
|
customBlocks?: ICustomBlock[];
|
|
99
99
|
tables?: ITable[];
|
|
100
100
|
customRanges?: ICustomRange[];
|
|
101
|
+
customDecorations?: ICustomDecoration[];
|
|
101
102
|
}
|
|
102
103
|
export interface IDocStyle {
|
|
103
104
|
name: string;
|
|
@@ -202,6 +203,14 @@ export interface ICustomRange {
|
|
|
202
203
|
rangeId: string;
|
|
203
204
|
rangeType: CustomRangeType;
|
|
204
205
|
}
|
|
206
|
+
export interface ICustomRangeForInterceptor extends ICustomRange {
|
|
207
|
+
active?: boolean;
|
|
208
|
+
show?: boolean;
|
|
209
|
+
}
|
|
210
|
+
export interface ICustomDecorationForInterceptor extends ICustomDecoration {
|
|
211
|
+
active?: boolean;
|
|
212
|
+
show?: boolean;
|
|
213
|
+
}
|
|
205
214
|
export declare enum CustomRangeType {
|
|
206
215
|
HYPERLINK = 0,
|
|
207
216
|
FIELD = 1,// 17.16 Fields and Hyperlinks
|
|
@@ -219,6 +228,15 @@ export interface ICustomBlock {
|
|
|
219
228
|
blockType?: BlockType;
|
|
220
229
|
blockId: string;
|
|
221
230
|
}
|
|
231
|
+
export declare enum CustomDecorationType {
|
|
232
|
+
COMMENT = 0
|
|
233
|
+
}
|
|
234
|
+
export interface ICustomDecoration {
|
|
235
|
+
startIndex: number;
|
|
236
|
+
endIndex: number;
|
|
237
|
+
id: string;
|
|
238
|
+
type: CustomDecorationType;
|
|
239
|
+
}
|
|
222
240
|
/**
|
|
223
241
|
* Type of block
|
|
224
242
|
*/
|
|
@@ -234,7 +252,11 @@ export interface IHeaderAndFooterBase {
|
|
|
234
252
|
firstPageHeaderId?: string;
|
|
235
253
|
firstPageFooterId?: string;
|
|
236
254
|
useFirstPageHeaderFooter?: BooleanNumber;
|
|
237
|
-
|
|
255
|
+
evenAndOddHeaders?: BooleanNumber;
|
|
256
|
+
}
|
|
257
|
+
export declare enum DocumentFlavor {
|
|
258
|
+
TRADITIONAL = 0,
|
|
259
|
+
MODERN = 1
|
|
238
260
|
}
|
|
239
261
|
/**
|
|
240
262
|
* Basics properties of doc style
|
|
@@ -243,6 +265,7 @@ export interface IDocStyleBase extends IMargin {
|
|
|
243
265
|
pageNumberStart?: number;
|
|
244
266
|
pageSize?: ISize;
|
|
245
267
|
pageOrient?: PageOrientType;
|
|
268
|
+
documentFlavor?: DocumentFlavor;
|
|
246
269
|
marginHeader?: number;
|
|
247
270
|
marginFooter?: number;
|
|
248
271
|
renderConfig?: IDocumentRenderConfig;
|
|
@@ -20,7 +20,7 @@ export interface IRangeWithCoord extends IPosition, IRange {
|
|
|
20
20
|
}
|
|
21
21
|
export interface ISelectionCell extends IRange, ISingleCell {
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
23
|
+
export interface ISelectionCellWithMergeInfo extends IPosition, ISingleCell {
|
|
24
24
|
mergeInfo: IRangeWithCoord;
|
|
25
25
|
}
|
|
26
26
|
export interface ISelection {
|
|
@@ -33,9 +33,13 @@ export interface ISelection {
|
|
|
33
33
|
*/
|
|
34
34
|
primary: Nullable<ISelectionCell>;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Selection range Info, contains selectionrange & primaryrange
|
|
38
|
+
* primaryrange is the range of the highlighted cell.
|
|
39
|
+
*/
|
|
36
40
|
export interface ISelectionWithCoord {
|
|
37
41
|
rangeWithCoord: IRangeWithCoord;
|
|
38
|
-
primaryWithCoord: Nullable<
|
|
42
|
+
primaryWithCoord: Nullable<ISelectionCellWithMergeInfo>;
|
|
39
43
|
}
|
|
40
44
|
export interface ITextRangeStart {
|
|
41
45
|
startOffset: number;
|
|
@@ -46,6 +50,7 @@ export interface ITextRange extends ITextRangeStart {
|
|
|
46
50
|
}
|
|
47
51
|
export interface ITextRangeParam extends ITextRange {
|
|
48
52
|
segmentId?: string;
|
|
53
|
+
segmentPage?: number;
|
|
49
54
|
isActive?: boolean;
|
|
50
55
|
}
|
|
51
56
|
/**
|