@univerjs/core 0.5.5 → 0.6.0-alpha.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 +1105 -1044
- package/lib/types/docs/data-model/rich-text-builder.d.ts +3 -4
- package/lib/types/facade/f-base.d.ts +17 -3
- package/lib/types/facade/f-blob.d.ts +3 -0
- package/lib/types/facade/f-doc.d.ts +4 -0
- package/lib/types/facade/f-enum.d.ts +9 -0
- package/lib/types/facade/f-event.d.ts +28 -18
- package/lib/types/facade/f-hooks.d.ts +3 -0
- package/lib/types/facade/f-univer.d.ts +36 -21
- package/lib/types/facade/f-usermanager.d.ts +3 -0
- package/lib/types/facade/f-util.d.ts +9 -0
- package/lib/types/services/log/log.service.d.ts +4 -0
- package/lib/types/shared/types.d.ts +3 -0
- package/lib/types/types/enum/border-style-types.d.ts +3 -0
- package/lib/types/types/enum/text-style.d.ts +3 -0
- package/lib/types/types/enum/theme-color-type.d.ts +3 -0
- package/lib/types/univer.d.ts +6 -0
- package/lib/umd/index.js +9 -9
- package/package.json +6 -6
- package/lib/types/common/__tests__/array.spec.d.ts +0 -16
- package/lib/types/common/__tests__/interceptor.spec.d.ts +0 -16
- package/lib/types/common/__tests__/url.spec.d.ts +0 -16
- package/lib/types/docs/data-model/__tests__/replacement.spec.d.ts +0 -16
- package/lib/types/docs/data-model/__tests__/rich-text-builder.test.d.ts +0 -16
- package/lib/types/docs/data-model/json-x/__tests__/json-x.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/action-iterator.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/apply-consistency.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/apply-utils.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/apply.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/common.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/compose.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/delete-apply.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/invert.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/text-x.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/transform-custom-decorations.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/transform-custom-range.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/transform-paragraph.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/transform-position.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/transform-textrun.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/transform.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/__tests__/utils.spec.d.ts +0 -16
- package/lib/types/observer/__tests__/observable.spec.d.ts +0 -16
- package/lib/types/services/__tests__/index.d.ts +0 -18
- package/lib/types/services/__tests__/permission.spec.d.ts +0 -16
- package/lib/types/services/__tests__/resources.spec.d.ts +0 -16
- package/lib/types/services/command/__tests__/command.service.spec.d.ts +0 -16
- package/lib/types/services/context/__tests__/context.service.spec.d.ts +0 -16
- package/lib/types/services/lifecycle/__tests__/lifecycle.service.spec.d.ts +0 -16
- package/lib/types/services/locale/__tests__/locale.service.spec.d.ts +0 -16
- package/lib/types/services/plugin/__tests__/plugin-override.spec.d.ts +0 -16
- package/lib/types/shared/__tests__/array-search.spec.d.ts +0 -16
- package/lib/types/shared/__tests__/common.spec.d.ts +0 -16
- package/lib/types/shared/__tests__/compose.spec.d.ts +0 -16
- package/lib/types/shared/__tests__/doc-tool.spec.d.ts +0 -16
- package/lib/types/shared/__tests__/name.spec.d.ts +0 -16
- package/lib/types/shared/__tests__/object-matrix.spec.d.ts +0 -16
- package/lib/types/shared/__tests__/range.spec.d.ts +0 -16
- package/lib/types/shared/__tests__/rectangle.spec.d.ts +0 -16
- package/lib/types/shared/__tests__/ref-alias.spec.d.ts +0 -16
- package/lib/types/shared/__tests__/rxjs.spec.d.ts +0 -16
- package/lib/types/shared/lru/__tests__/lru-map.spec.d.ts +0 -16
- package/lib/types/sheets/__tests__/cell-data.spec.d.ts +0 -16
- package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +0 -14
- package/lib/types/sheets/__tests__/ranges.spec.d.ts +0 -16
- package/lib/types/sheets/__tests__/span-mode.spec.d.ts +0 -16
- package/lib/types/sheets/__tests__/styles.spec.d.ts +0 -16
- package/lib/types/sheets/__tests__/workbook.spec.d.ts +0 -16
- package/lib/types/sheets/__tests__/worksheet.spec.d.ts +0 -16
|
@@ -1223,10 +1223,10 @@ export declare class RichTextBuilder extends RichTextValue {
|
|
|
1223
1223
|
* @example
|
|
1224
1224
|
* ```ts
|
|
1225
1225
|
* const richText = RichTextValue.create({ body: { dataStream: 'Hello World\r\n' } });
|
|
1226
|
-
* const newRichText = richText.insertText(
|
|
1226
|
+
* const newRichText = richText.insertText('World');
|
|
1227
1227
|
* ```
|
|
1228
1228
|
*/
|
|
1229
|
-
insertText(
|
|
1229
|
+
insertText(text: string, style?: TextStyleBuilder | ITextStyle): RichTextBuilder;
|
|
1230
1230
|
/**
|
|
1231
1231
|
* Inserts text into the rich text builder at the specified start position
|
|
1232
1232
|
* @param start The start position of the text to insert
|
|
@@ -1361,8 +1361,7 @@ export declare class RichTextBuilder extends RichTextValue {
|
|
|
1361
1361
|
cancelLink(start: number, end: number): RichTextBuilder;
|
|
1362
1362
|
updateLink(id: string, url: string): RichTextBuilder;
|
|
1363
1363
|
/**
|
|
1364
|
-
* Inserts a new paragraph
|
|
1365
|
-
* @param {number} start The start position of the paragraph to insert
|
|
1364
|
+
* Inserts a new paragraph to the end
|
|
1366
1365
|
* @param {ParagraphStyleBuilder} paragraphStyle The style of the paragraph to insert
|
|
1367
1366
|
* @returns {RichTextBuilder} The current RichTextBuilder instance
|
|
1368
1367
|
* @example
|
|
@@ -4,19 +4,33 @@ import { Disposable } from '../shared';
|
|
|
4
4
|
* `FBase` is a base class for all facade classes.
|
|
5
5
|
* It provides a way to extend classes with static and instance methods.
|
|
6
6
|
* The `_initialize` as a special method that will be called after the constructor. You should never call it directly.
|
|
7
|
+
* @ignore
|
|
7
8
|
*/
|
|
8
|
-
/** @ignore */
|
|
9
9
|
export declare abstract class FBase extends Disposable {
|
|
10
|
+
/**
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
10
13
|
static extend(source: any): void;
|
|
11
14
|
}
|
|
12
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* @ignore
|
|
17
|
+
*/
|
|
13
18
|
declare const InitializerSymbol: unique symbol;
|
|
14
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* @ignore
|
|
21
|
+
* @hideconstructor
|
|
22
|
+
*/
|
|
15
23
|
export declare class FBaseInitialable extends Disposable {
|
|
16
24
|
protected _injector: Injector;
|
|
17
25
|
private [InitializerSymbol];
|
|
18
26
|
constructor(_injector: Injector);
|
|
27
|
+
/**
|
|
28
|
+
* @ignore
|
|
29
|
+
*/
|
|
19
30
|
_initialize(injector: Injector): void;
|
|
31
|
+
/**
|
|
32
|
+
* @ignore
|
|
33
|
+
*/
|
|
20
34
|
static extend(source: any): void;
|
|
21
35
|
}
|
|
22
36
|
export {};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { DocumentDataModel } from '../docs';
|
|
2
2
|
import { Injector } from '../common/di';
|
|
3
3
|
import { FBaseInitialable } from './f-base';
|
|
4
|
+
/**
|
|
5
|
+
* @ignore
|
|
6
|
+
* @hideconstructor
|
|
7
|
+
*/
|
|
4
8
|
export declare class FDoc extends FBaseInitialable {
|
|
5
9
|
protected doc: DocumentDataModel;
|
|
6
10
|
constructor(doc: DocumentDataModel, _injector: Injector);
|
|
@@ -22,9 +22,18 @@ import { ProtectionType } from '../types/enum/protection-type';
|
|
|
22
22
|
import { RelativeDate } from '../types/enum/relative-date';
|
|
23
23
|
import { SheetTypes } from '../types/enum/sheet-types';
|
|
24
24
|
import { ThemeColorType } from '../types/enum/theme-color-type';
|
|
25
|
+
/**
|
|
26
|
+
* @hideconstructor
|
|
27
|
+
*/
|
|
25
28
|
export declare class FEnum {
|
|
29
|
+
/**
|
|
30
|
+
* @ignore
|
|
31
|
+
*/
|
|
26
32
|
static _instance: FEnum | null;
|
|
27
33
|
static get(): FEnum;
|
|
34
|
+
/**
|
|
35
|
+
* @ignore
|
|
36
|
+
*/
|
|
28
37
|
static extend(source: any): void;
|
|
29
38
|
constructor();
|
|
30
39
|
/**
|
|
@@ -6,6 +6,7 @@ import { FDoc } from './f-doc';
|
|
|
6
6
|
/**
|
|
7
7
|
* Base interface for all event parameters
|
|
8
8
|
* @interface IEventBase
|
|
9
|
+
* @ignore
|
|
9
10
|
*/
|
|
10
11
|
export interface IEventBase {
|
|
11
12
|
/** Flag to cancel the event if supported */
|
|
@@ -61,9 +62,18 @@ export interface ICommandEvent extends IEventBase {
|
|
|
61
62
|
/** Type of the command */
|
|
62
63
|
type: CommandType;
|
|
63
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* @hideconstructor
|
|
67
|
+
*/
|
|
64
68
|
export declare class FEventName {
|
|
69
|
+
/**
|
|
70
|
+
* @ignore
|
|
71
|
+
*/
|
|
65
72
|
static _instance: FEventName | null;
|
|
66
73
|
static get(): FEventName;
|
|
74
|
+
/**
|
|
75
|
+
* @ignore
|
|
76
|
+
*/
|
|
67
77
|
static extend(source: any): void;
|
|
68
78
|
constructor();
|
|
69
79
|
/**
|
|
@@ -72,8 +82,8 @@ export declare class FEventName {
|
|
|
72
82
|
* @example
|
|
73
83
|
* ```ts
|
|
74
84
|
* univerAPI.addEvent(univerAPI.event.DocCreated, (params) => {
|
|
75
|
-
*
|
|
76
|
-
*
|
|
85
|
+
* const { unitId, type, doc, unit } = params;
|
|
86
|
+
* console.log('doc created', params);
|
|
77
87
|
* });
|
|
78
88
|
* ```
|
|
79
89
|
*/
|
|
@@ -84,8 +94,8 @@ export declare class FEventName {
|
|
|
84
94
|
* @example
|
|
85
95
|
* ```ts
|
|
86
96
|
* univerAPI.addEvent(univerAPI.event.DocDisposed, (params) => {
|
|
87
|
-
*
|
|
88
|
-
*
|
|
97
|
+
* const { unitId, unitType, snapshot } = params;
|
|
98
|
+
* console.log('doc disposed', params);
|
|
89
99
|
* });
|
|
90
100
|
* ```
|
|
91
101
|
*/
|
|
@@ -96,8 +106,8 @@ export declare class FEventName {
|
|
|
96
106
|
* @example
|
|
97
107
|
* ```ts
|
|
98
108
|
* univerAPI.addEvent(univerAPI.event.LifeCycleChanged, (params) => {
|
|
99
|
-
*
|
|
100
|
-
*
|
|
109
|
+
* const { stage } = params;
|
|
110
|
+
* console.log('life cycle changed', params);
|
|
101
111
|
* });
|
|
102
112
|
* ```
|
|
103
113
|
*/
|
|
@@ -108,8 +118,8 @@ export declare class FEventName {
|
|
|
108
118
|
* @example
|
|
109
119
|
* ```ts
|
|
110
120
|
* univerAPI.addEvent(univerAPI.event.Redo, (event) => {
|
|
111
|
-
*
|
|
112
|
-
*
|
|
121
|
+
* const { params, id, type } = event;
|
|
122
|
+
* console.log('command executed', event);
|
|
113
123
|
* });
|
|
114
124
|
* ```
|
|
115
125
|
*/
|
|
@@ -120,8 +130,8 @@ export declare class FEventName {
|
|
|
120
130
|
* @example
|
|
121
131
|
* ```ts
|
|
122
132
|
* univerAPI.addEvent(univerAPI.event.Undo, (event) => {
|
|
123
|
-
*
|
|
124
|
-
*
|
|
133
|
+
* const { params, id, type } = event;
|
|
134
|
+
* console.log('command executed', event);
|
|
125
135
|
* });
|
|
126
136
|
* ```
|
|
127
137
|
*/
|
|
@@ -132,8 +142,8 @@ export declare class FEventName {
|
|
|
132
142
|
* @example
|
|
133
143
|
* ```ts
|
|
134
144
|
* univerAPI.addEvent(univerAPI.event.BeforeRedo, (event) => {
|
|
135
|
-
*
|
|
136
|
-
*
|
|
145
|
+
* const { params, id, type } = event;
|
|
146
|
+
* console.log('command executed', event);
|
|
137
147
|
* });
|
|
138
148
|
* ```
|
|
139
149
|
*/
|
|
@@ -144,8 +154,8 @@ export declare class FEventName {
|
|
|
144
154
|
* @example
|
|
145
155
|
* ```ts
|
|
146
156
|
* univerAPI.addEvent(univerAPI.event.BeforeUndo, (event) => {
|
|
147
|
-
*
|
|
148
|
-
*
|
|
157
|
+
* const { params, id, type } = event;
|
|
158
|
+
* console.log('command executed', event);
|
|
149
159
|
* });
|
|
150
160
|
* ```
|
|
151
161
|
*/
|
|
@@ -156,8 +166,8 @@ export declare class FEventName {
|
|
|
156
166
|
* @example
|
|
157
167
|
* ```ts
|
|
158
168
|
* univerAPI.addEvent(univerAPI.event.CommandExecuted, (event) => {
|
|
159
|
-
*
|
|
160
|
-
*
|
|
169
|
+
* const { params, id, type } = event;
|
|
170
|
+
* console.log('command executed', event);
|
|
161
171
|
* });
|
|
162
172
|
* ```
|
|
163
173
|
*/
|
|
@@ -168,8 +178,8 @@ export declare class FEventName {
|
|
|
168
178
|
* @example
|
|
169
179
|
* ```ts
|
|
170
180
|
* univerAPI.addEvent(univerAPI.event.BeforeCommandExecute, (event) => {
|
|
171
|
-
*
|
|
172
|
-
*
|
|
181
|
+
* const { params, id, type } = event;
|
|
182
|
+
* console.log('command executed', event);
|
|
173
183
|
* });
|
|
174
184
|
* ```
|
|
175
185
|
*/
|
|
@@ -2,6 +2,9 @@ import { IDisposable, Injector } from '../common/di';
|
|
|
2
2
|
import { IUndoRedoItem } from '../services/undoredo/undoredo.service';
|
|
3
3
|
import { LifecycleService } from '../services/lifecycle/lifecycle.service';
|
|
4
4
|
import { FBase } from './f-base';
|
|
5
|
+
/**
|
|
6
|
+
* @hideconstructor
|
|
7
|
+
*/
|
|
5
8
|
export declare class FHooks extends FBase {
|
|
6
9
|
protected readonly _injector: Injector;
|
|
7
10
|
private readonly _lifecycleService;
|
|
@@ -15,6 +15,12 @@ import { FEnum } from './f-enum';
|
|
|
15
15
|
import { FHooks } from './f-hooks';
|
|
16
16
|
import { FUserManager } from './f-usermanager';
|
|
17
17
|
import { FUtil } from './f-util';
|
|
18
|
+
/**
|
|
19
|
+
* The root Facade API object to interact with Univer. Please use `newAPI` static method
|
|
20
|
+
* to create a new instance.
|
|
21
|
+
*
|
|
22
|
+
* @hideconstructor
|
|
23
|
+
*/
|
|
18
24
|
export declare class FUniver extends FBaseInitialable {
|
|
19
25
|
protected readonly _injector: Injector;
|
|
20
26
|
protected readonly _commandService: ICommandService;
|
|
@@ -94,21 +100,21 @@ export declare class FUniver extends FBaseInitialable {
|
|
|
94
100
|
get Util(): FUtil;
|
|
95
101
|
/**
|
|
96
102
|
* Add an event listener
|
|
97
|
-
* @param event key of event
|
|
98
|
-
* @param callback callback when event triggered
|
|
103
|
+
* @param {string} event key of event
|
|
104
|
+
* @param {(params: IEventParamConfig[typeof event]) => void} callback callback when event triggered
|
|
99
105
|
* @returns {Disposable} The Disposable instance, for remove the listener
|
|
100
106
|
* @example
|
|
101
107
|
* ```ts
|
|
102
108
|
* univerAPI.addEvent(univerAPI.event.UnitCreated, (params) => {
|
|
103
|
-
*
|
|
109
|
+
* console.log('unit created', params);
|
|
104
110
|
* });
|
|
105
111
|
* ```
|
|
106
112
|
*/
|
|
107
|
-
addEvent(event:
|
|
113
|
+
addEvent<T extends keyof IEventParamConfig>(event: T, callback: (params: IEventParamConfig[T]) => void): IDisposable;
|
|
108
114
|
/**
|
|
109
115
|
* Fire an event, used in internal only.
|
|
110
|
-
* @param
|
|
111
|
-
* @param
|
|
116
|
+
* @param {string} event key of event
|
|
117
|
+
* @param {any} params params of event
|
|
112
118
|
* @returns {boolean} should cancel
|
|
113
119
|
* @example
|
|
114
120
|
* ```ts
|
|
@@ -118,7 +124,7 @@ export declare class FUniver extends FBaseInitialable {
|
|
|
118
124
|
protected fireEvent<T extends keyof IEventParamConfig>(event: T, params: IEventParamConfig[T]): boolean | undefined;
|
|
119
125
|
/**
|
|
120
126
|
* Get the callback map corresponding to the event
|
|
121
|
-
* @param event
|
|
127
|
+
* @param {keyof IEventParamConfig} event
|
|
122
128
|
* @returns {number} The number of callbacks
|
|
123
129
|
*/
|
|
124
130
|
protected hasEventCallback(event: keyof IEventParamConfig): boolean;
|
|
@@ -128,7 +134,7 @@ export declare class FUniver extends FBaseInitialable {
|
|
|
128
134
|
* @returns {FBlob} The new blob instance
|
|
129
135
|
* @example
|
|
130
136
|
* ```ts
|
|
131
|
-
* const blob =
|
|
137
|
+
* const blob = univerAPI.newBlob();
|
|
132
138
|
* ```
|
|
133
139
|
*/
|
|
134
140
|
newBlob(): FBlob;
|
|
@@ -137,69 +143,78 @@ export declare class FUniver extends FBaseInitialable {
|
|
|
137
143
|
* @returns {ColorBuilder} The new color instance
|
|
138
144
|
* @example
|
|
139
145
|
* ```ts
|
|
140
|
-
* const color =
|
|
146
|
+
* const color = univerAPI.newColor();
|
|
141
147
|
* ```
|
|
142
148
|
*/
|
|
143
149
|
newColor(): ColorBuilder;
|
|
144
150
|
/**
|
|
145
151
|
* Create a new rich text.
|
|
146
|
-
* @param data
|
|
152
|
+
* @param {IDocumentData} data
|
|
147
153
|
* @returns {RichTextBuilder} The new rich text instance
|
|
148
154
|
* @example
|
|
149
155
|
* ```ts
|
|
150
|
-
* const richText =
|
|
156
|
+
* const richText = univerAPI.newRichText();
|
|
151
157
|
* ```
|
|
152
158
|
*/
|
|
153
159
|
newRichText(data?: IDocumentData): RichTextBuilder;
|
|
154
160
|
/**
|
|
155
161
|
* Create a new rich text value.
|
|
156
|
-
* @param data - The rich text data
|
|
162
|
+
* @param {IDocumentData} data - The rich text data
|
|
157
163
|
* @returns {RichTextValue} The new rich text value instance
|
|
158
164
|
* @example
|
|
159
165
|
* ```ts
|
|
160
|
-
* const richTextValue =
|
|
166
|
+
* const richTextValue = univerAPI.newRichTextValue();
|
|
161
167
|
* ```
|
|
162
168
|
*/
|
|
163
169
|
newRichTextValue(data: IDocumentData): RichTextValue;
|
|
164
170
|
/**
|
|
165
171
|
* Create a new paragraph style.
|
|
166
|
-
* @param style - The paragraph style
|
|
172
|
+
* @param {IParagraphStyle} style - The paragraph style
|
|
167
173
|
* @returns {ParagraphStyleBuilder} The new paragraph style instance
|
|
168
174
|
* @example
|
|
169
175
|
* ```ts
|
|
170
|
-
* const paragraphStyle =
|
|
176
|
+
* const paragraphStyle = univerAPI.newParagraphStyle();
|
|
171
177
|
* ```
|
|
172
178
|
*/
|
|
173
179
|
newParagraphStyle(style?: IParagraphStyle): ParagraphStyleBuilder;
|
|
174
180
|
/**
|
|
175
181
|
* Create a new paragraph style value.
|
|
176
|
-
* @param style - The paragraph style
|
|
182
|
+
* @param {IParagraphStyle} style - The paragraph style
|
|
177
183
|
* @returns {ParagraphStyleValue} The new paragraph style value instance
|
|
178
184
|
* @example
|
|
179
185
|
* ```ts
|
|
180
|
-
* const paragraphStyleValue =
|
|
186
|
+
* const paragraphStyleValue = univerAPI.newParagraphStyleValue();
|
|
181
187
|
* ```
|
|
182
188
|
*/
|
|
183
189
|
newParagraphStyleValue(style?: IParagraphStyle): ParagraphStyleValue;
|
|
184
190
|
/**
|
|
185
191
|
* Create a new text style.
|
|
186
|
-
* @param style - The text style
|
|
192
|
+
* @param {ITextStyle} style - The text style
|
|
187
193
|
* @returns {TextStyleBuilder} The new text style instance
|
|
188
194
|
* @example
|
|
189
195
|
* ```ts
|
|
190
|
-
* const textStyle =
|
|
196
|
+
* const textStyle = univerAPI.newTextStyle();
|
|
191
197
|
* ```
|
|
192
198
|
*/
|
|
193
199
|
newTextStyle(style?: ITextStyle): TextStyleBuilder;
|
|
194
200
|
/**
|
|
195
201
|
* Create a new text style value.
|
|
196
|
-
* @param style - The text style
|
|
202
|
+
* @param {ITextStyle} style - The text style
|
|
197
203
|
* @returns {TextStyleValue} The new text style value instance
|
|
198
204
|
* @example
|
|
199
205
|
* ```ts
|
|
200
|
-
* const textStyleValue =
|
|
206
|
+
* const textStyleValue = univerAPI.newTextStyleValue();
|
|
201
207
|
* ```
|
|
202
208
|
*/
|
|
203
209
|
newTextStyleValue(style?: ITextStyle): TextStyleValue;
|
|
210
|
+
/**
|
|
211
|
+
* Create a new text decoration.
|
|
212
|
+
* @param {ITextDecoration} decoration - The text decoration
|
|
213
|
+
* @returns {TextDecorationBuilder} The new text decoration instance
|
|
214
|
+
* @example
|
|
215
|
+
* ```ts
|
|
216
|
+
* const decoration = univerAPI.newTextDecoration();
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
204
219
|
newTextDecoration(decoration?: ITextDecoration): TextDecorationBuilder;
|
|
205
220
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { IUser, UserManagerService } from '../services/user-manager/user-manager.service';
|
|
2
2
|
import { Injector } from '../common/di';
|
|
3
3
|
import { FBase } from './f-base';
|
|
4
|
+
/**
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
4
7
|
export declare class FUserManager extends FBase {
|
|
5
8
|
protected readonly _injector: Injector;
|
|
6
9
|
private readonly _userManagerService;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { Rectangle, Tools } from '../shared';
|
|
2
|
+
/**
|
|
3
|
+
* @ignore
|
|
4
|
+
*/
|
|
2
5
|
export declare class FUtil {
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
3
9
|
static _instance: FUtil | null;
|
|
4
10
|
static get(): FUtil;
|
|
11
|
+
/**
|
|
12
|
+
* @ignore
|
|
13
|
+
*/
|
|
5
14
|
static extend(source: any): void;
|
|
6
15
|
/**
|
|
7
16
|
* Rectangle utils, including range operations likes merge, subtract, split
|
|
@@ -12,16 +12,20 @@ export interface ILogService {
|
|
|
12
12
|
log(...args: ArgsType): void;
|
|
13
13
|
warn(...args: ArgsType): void;
|
|
14
14
|
error(...args: ArgsType): void;
|
|
15
|
+
deprecate(...args: ArgsType): void;
|
|
15
16
|
setLogLevel(enabled: LogLevel): void;
|
|
16
17
|
}
|
|
17
18
|
export declare const ILogService: import('@wendellhu/redi').IdentifierDecorator<ILogService>;
|
|
18
19
|
export declare class DesktopLogService extends Disposable implements ILogService {
|
|
19
20
|
private _logLevel;
|
|
21
|
+
private _deduction;
|
|
20
22
|
debug(...args: ArgsType): void;
|
|
21
23
|
log(...args: ArgsType): void;
|
|
22
24
|
warn(...args: ArgsType): void;
|
|
23
25
|
error(...args: ArgsType): void;
|
|
26
|
+
deprecate(...args: ArgsType): void;
|
|
24
27
|
setLogLevel(logLevel: LogLevel): void;
|
|
25
28
|
private _log;
|
|
29
|
+
private _logWithDeduplication;
|
|
26
30
|
}
|
|
27
31
|
export {};
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/**
|
|
17
|
+
* An enum that specifies the text direction of a cell.
|
|
18
|
+
*/
|
|
16
19
|
export declare enum TextDirection {
|
|
17
20
|
UNSPECIFIED = 0,
|
|
18
21
|
LEFT_TO_RIGHT = 1,
|
package/lib/types/univer.d.ts
CHANGED
|
@@ -18,6 +18,9 @@ export interface IUniverConfig {
|
|
|
18
18
|
logLevel: LogLevel;
|
|
19
19
|
override?: DependencyOverride;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @hideconstructor
|
|
23
|
+
*/
|
|
21
24
|
export declare class Univer implements IDisposable {
|
|
22
25
|
private _startedTypes;
|
|
23
26
|
private _injector;
|
|
@@ -30,6 +33,9 @@ export declare class Univer implements IDisposable {
|
|
|
30
33
|
* @param parentInjector An optional parent injector of the Univer injector. For more information, see https://redi.wendell.fun/docs/hierarchy.
|
|
31
34
|
*/
|
|
32
35
|
constructor(config?: Partial<IUniverConfig>, parentInjector?: Injector);
|
|
36
|
+
/**
|
|
37
|
+
* @ignore
|
|
38
|
+
*/
|
|
33
39
|
__getInjector(): Injector;
|
|
34
40
|
/**
|
|
35
41
|
* Register a callback function which will be called when this Univer instance is disposing.
|