@univerjs/core 0.17.0 → 0.18.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/facade.js +1 -1
- package/lib/cjs/index.js +9 -8
- package/lib/es/facade.js +1 -1479
- package/lib/es/index.js +9 -20335
- package/lib/facade.js +1 -1479
- package/lib/index.js +9 -20335
- package/lib/types/common/async.d.ts +16 -1
- package/lib/types/common/di.d.ts +18 -2
- package/lib/types/common/interceptor.d.ts +16 -1
- package/lib/types/common/invert-color/invert-hsl.d.ts +16 -1
- package/lib/types/common/invert-color/invert-rgb.d.ts +16 -1
- package/lib/types/common/unit.d.ts +17 -2
- package/lib/types/docs/data-model/document-data-model.d.ts +24 -9
- package/lib/types/docs/data-model/empty-snapshot.d.ts +16 -1
- package/lib/types/docs/data-model/json-x/json-x.d.ts +19 -4
- package/lib/types/docs/data-model/preset-list-type.d.ts +16 -1
- package/lib/types/docs/data-model/replacement.d.ts +16 -1
- package/lib/types/docs/data-model/rich-text-builder.d.ts +21 -5
- package/lib/types/docs/data-model/text-x/action-iterator.d.ts +17 -1
- package/lib/types/docs/data-model/text-x/action-types.d.ts +17 -2
- package/lib/types/docs/data-model/text-x/apply-utils/common.d.ts +16 -1
- package/lib/types/docs/data-model/text-x/apply-utils/delete-apply.d.ts +16 -1
- package/lib/types/docs/data-model/text-x/apply-utils/insert-apply.d.ts +16 -1
- package/lib/types/docs/data-model/text-x/apply-utils/update-apply.d.ts +16 -1
- package/lib/types/docs/data-model/text-x/apply.d.ts +17 -2
- package/lib/types/docs/data-model/text-x/build-utils/custom-decoration.d.ts +17 -2
- package/lib/types/docs/data-model/text-x/build-utils/custom-range.d.ts +17 -2
- package/lib/types/docs/data-model/text-x/build-utils/drawings.d.ts +19 -4
- package/lib/types/docs/data-model/text-x/build-utils/index.d.ts +24 -9
- package/lib/types/docs/data-model/text-x/build-utils/paragraph.d.ts +18 -3
- package/lib/types/docs/data-model/text-x/build-utils/parse.d.ts +16 -1
- package/lib/types/docs/data-model/text-x/build-utils/selection.d.ts +17 -2
- package/lib/types/docs/data-model/text-x/build-utils/text-x-utils.d.ts +23 -7
- package/lib/types/docs/data-model/text-x/text-x.d.ts +18 -3
- package/lib/types/docs/data-model/text-x/transform-utils.d.ts +17 -2
- package/lib/types/docs/data-model/text-x/utils.d.ts +34 -19
- package/lib/types/docs/data-model/utils.d.ts +16 -1
- package/lib/types/facade/f-base.d.ts +17 -1
- package/lib/types/facade/f-blob.d.ts +17 -1
- package/lib/types/facade/f-doc.d.ts +17 -1
- package/lib/types/facade/f-enum.d.ts +15 -0
- package/lib/types/facade/f-event-registry.d.ts +19 -3
- package/lib/types/facade/f-event.d.ts +17 -2
- package/lib/types/facade/f-hooks.d.ts +17 -1
- package/lib/types/facade/f-univer.d.ts +20 -3
- package/lib/types/facade/f-usermanager.d.ts +17 -1
- package/lib/types/facade/f-util.d.ts +15 -0
- package/lib/types/observer/observable.d.ts +17 -1
- package/lib/types/services/authz-io/authz-io-local.service.d.ts +17 -2
- package/lib/types/services/authz-io/type.d.ts +18 -3
- package/lib/types/services/command/command.service.d.ts +20 -4
- package/lib/types/services/config/config.service.d.ts +18 -3
- package/lib/types/services/confirm/confirm.service.d.ts +17 -2
- package/lib/types/services/context/context.service.d.ts +16 -1
- package/lib/types/services/error/error.service.d.ts +16 -1
- package/lib/types/services/image-io/image-io.service.d.ts +18 -3
- package/lib/types/services/image-io/url-image.service.d.ts +17 -2
- package/lib/types/services/instance/instance.service.d.ts +22 -5
- package/lib/types/services/lifecycle/lifecycle.service.d.ts +16 -1
- package/lib/types/services/local-storage/local-storage.service.d.ts +1 -1
- package/lib/types/services/locale/locale.service.d.ts +17 -2
- package/lib/types/services/log/log.service.d.ts +16 -1
- package/lib/types/services/mention-io/mention-io-local.service.d.ts +16 -1
- package/lib/types/services/mention-io/type.d.ts +18 -3
- package/lib/types/services/permission/permission.service.d.ts +18 -2
- package/lib/types/services/permission/type.d.ts +20 -5
- package/lib/types/services/plugin/plugin-override.d.ts +16 -1
- package/lib/types/services/plugin/plugin.service.d.ts +18 -2
- package/lib/types/services/resource-loader/resource-loader.service.d.ts +17 -2
- package/lib/types/services/resource-loader/type.d.ts +17 -2
- package/lib/types/services/resource-manager/resource-manager.service.d.ts +19 -4
- package/lib/types/services/resource-manager/type.d.ts +19 -4
- package/lib/types/services/theme/theme.service.d.ts +16 -1
- package/lib/types/services/undoredo/undoredo.service.d.ts +22 -5
- package/lib/types/services/user-manager/const.d.ts +17 -1
- package/lib/types/services/user-manager/user-manager.service.d.ts +17 -2
- package/lib/types/shared/after-init-apply.d.ts +16 -1
- package/lib/types/shared/cache/image-cache.d.ts +16 -1
- package/lib/types/shared/check-if-move.d.ts +17 -2
- package/lib/types/shared/common.d.ts +22 -7
- package/lib/types/shared/compare.d.ts +16 -1
- package/lib/types/shared/dayjs.d.ts +16 -1
- package/lib/types/shared/doc-tool.d.ts +16 -1
- package/lib/types/shared/generate.d.ts +17 -2
- package/lib/types/shared/lifecycle.d.ts +18 -2
- package/lib/types/shared/lru/lru-map.d.ts +16 -1
- package/lib/types/shared/object-matrix-query.d.ts +16 -1
- package/lib/types/shared/object-matrix.d.ts +17 -2
- package/lib/types/shared/r-tree.d.ts +18 -2
- package/lib/types/shared/range.d.ts +17 -2
- package/lib/types/shared/rectangle.d.ts +17 -2
- package/lib/types/shared/rxjs.d.ts +18 -2
- package/lib/types/shared/tools.d.ts +17 -23
- package/lib/types/sheets/clone.d.ts +17 -2
- package/lib/types/sheets/column-manager.d.ts +19 -4
- package/lib/types/sheets/empty-snapshot.d.ts +16 -1
- package/lib/types/sheets/range.d.ts +23 -6
- package/lib/types/sheets/row-manager.d.ts +20 -5
- package/lib/types/sheets/sheet-skeleton.d.ts +21 -5
- package/lib/types/sheets/sheet-snapshot-utils.d.ts +16 -1
- package/lib/types/sheets/span-model.d.ts +16 -1
- package/lib/types/sheets/styles.d.ts +18 -3
- package/lib/types/sheets/typedef.d.ts +23 -7
- package/lib/types/sheets/util.d.ts +20 -4
- package/lib/types/sheets/workbook.d.ts +19 -4
- package/lib/types/sheets/worksheet.d.ts +25 -7
- package/lib/types/skeleton.d.ts +16 -1
- package/lib/types/slides/slide-model.d.ts +22 -6
- package/lib/types/types/const/const.d.ts +18 -2
- package/lib/types/types/const/page-size.d.ts +16 -1
- package/lib/types/types/interfaces/i-cell-custom-render.d.ts +20 -5
- package/lib/types/types/interfaces/i-cell-validation-data.d.ts +17 -2
- package/lib/types/types/interfaces/i-data-validation.d.ts +21 -6
- package/lib/types/types/interfaces/i-document-data-interceptor.d.ts +16 -1
- package/lib/types/types/interfaces/i-document-data.d.ts +20 -5
- package/lib/types/types/interfaces/i-drawing.d.ts +56 -3
- package/lib/types/types/interfaces/i-mention.d.ts +16 -1
- package/lib/types/types/interfaces/i-need-check-disposable.d.ts +16 -1
- package/lib/types/types/interfaces/i-placeholder.d.ts +16 -1
- package/lib/types/types/interfaces/i-shape-properties.d.ts +17 -2
- package/lib/types/types/interfaces/i-slide-data.d.ts +26 -11
- package/lib/types/types/interfaces/i-style-data.d.ts +19 -4
- package/lib/types/univer.d.ts +26 -10
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +9 -8
- package/package.json +9 -9
- package/lib/types/docs/data-model/text-x/build-utils/__test__/custom-range.spec.d.ts +0 -16
- package/lib/types/docs/data-model/text-x/build-utils/__test__/selection.spec.d.ts +0 -16
|
@@ -1,3 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IUser } from '@univerjs/protocol';
|
|
17
|
+
import { UnitRole } from '@univerjs/protocol';
|
|
2
18
|
export declare const createDefaultUser: (type?: UnitRole) => IUser;
|
|
3
19
|
export declare const isDevRole: (userId: string, type: UnitRole) => boolean;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
*/
|
|
1
16
|
import { Disposable } from '../../shared/lifecycle';
|
|
2
17
|
export interface IUser {
|
|
3
18
|
userID: string;
|
|
@@ -7,7 +22,7 @@ export interface IUser {
|
|
|
7
22
|
export declare class UserManagerService extends Disposable {
|
|
8
23
|
private _model;
|
|
9
24
|
private _userChange$;
|
|
10
|
-
userChange$: import(
|
|
25
|
+
userChange$: import("rxjs").Observable<{
|
|
11
26
|
type: "add" | "delete";
|
|
12
27
|
user: IUser;
|
|
13
28
|
} | {
|
|
@@ -18,7 +33,7 @@ export declare class UserManagerService extends Disposable {
|
|
|
18
33
|
* When the current user undergoes a switch or change
|
|
19
34
|
* @memberof UserManagerService
|
|
20
35
|
*/
|
|
21
|
-
currentUser$: import(
|
|
36
|
+
currentUser$: import("rxjs").Observable<IUser>;
|
|
22
37
|
dispose(): void;
|
|
23
38
|
getCurrentUser<T extends IUser>(): T;
|
|
24
39
|
setCurrentUser<T extends IUser>(user: T): void;
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { ICommandService } from '../services/command/command.service';
|
|
2
17
|
export declare const afterInitApply: (commandService: ICommandService) => Promise<void>;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { Injector } from '@wendellhu/redi';
|
|
2
17
|
import { ImageSourceType } from '../../services/image-io/image-io.service';
|
|
3
18
|
export declare class ImageCacheMap {
|
|
4
19
|
private _injector;
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { ITransformState } from '../types/interfaces/i-drawing';
|
|
17
|
+
import type { Nullable } from './types';
|
|
3
18
|
export declare const MOVE_BUFFER_VALUE = 2;
|
|
4
19
|
export declare const ROTATE_BUFFER_VALUE = 1;
|
|
5
20
|
export declare function checkIfMove(transform: Nullable<ITransformState>, previousTransform: Nullable<ITransformState>): boolean;
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { CellValue, ICellData, ICellDataForSheetInterceptor, ICellWithCoord, IRange, IRangeWithCoord, ISelectionCell } from '../sheets/typedef';
|
|
17
|
+
import type { Worksheet } from '../sheets/worksheet';
|
|
18
|
+
import type { IDocumentData } from '../types/interfaces/i-document-data';
|
|
19
|
+
import type { IColorStyle, IStyleData } from '../types/interfaces/i-style-data';
|
|
20
|
+
import type { IObjectMatrixPrimitiveType } from './object-matrix';
|
|
21
|
+
import type { Nullable } from './types';
|
|
7
22
|
/**
|
|
8
23
|
* Data type convert, convert ICellWithCoord to IRangeWithCoord
|
|
9
24
|
* @param cellInfo
|
|
@@ -38,7 +53,7 @@ export declare function isFormulaId(value: any): boolean;
|
|
|
38
53
|
*/
|
|
39
54
|
export declare function handleStyleToString(style: IStyleData, isCell?: boolean): string;
|
|
40
55
|
export declare function getBorderStyleType(type: string): number;
|
|
41
|
-
export declare function getDocsUpdateBody(model: IDocumentData, segmentId?: string): import(
|
|
56
|
+
export declare function getDocsUpdateBody(model: IDocumentData, segmentId?: string): import("..").IDocumentBody | undefined;
|
|
42
57
|
export declare function isValidRange(range: IRange, worksheet?: Worksheet): boolean;
|
|
43
58
|
/**
|
|
44
59
|
* Covert row/column to range object
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { ITextRun } from '../types/interfaces/i-document-data';
|
|
2
17
|
interface IAnyObject {
|
|
3
18
|
[key: number | string]: IAnyObject | IAnyObject[] | Array<[number | string]> | any;
|
|
4
19
|
}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import dayjs from 'dayjs';
|
|
2
17
|
export { dayjs };
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IParagraph, IParagraphStyle } from '../types/interfaces/i-document-data';
|
|
2
17
|
export declare function horizontalLineSegmentsSubtraction(aStart: number, aEnd: number, bStart: number, bEnd: number): number[];
|
|
3
18
|
export declare function checkParagraphHasBullet(paragraph: IParagraph): boolean;
|
|
4
19
|
export declare function checkParagraphHasIndent(paragraph: IParagraph): boolean;
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { CellValue } from '../sheets/typedef';
|
|
17
|
+
import type { Nullable } from './types';
|
|
3
18
|
/**
|
|
4
19
|
* Determine whether it is a pure number, "12" and "12e+3" are both true
|
|
5
20
|
* @param val The number or string to be judged
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { SubscriptionLike } from 'rxjs';
|
|
17
|
+
import type { IDisposable } from '../common/di';
|
|
18
|
+
import { Subject } from 'rxjs';
|
|
3
19
|
type DisposableLike = IDisposable | SubscriptionLike | (() => void);
|
|
4
20
|
export declare function toDisposable(disposable: IDisposable): IDisposable;
|
|
5
21
|
export declare function toDisposable(subscription: SubscriptionLike): IDisposable;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IDisposable } from '../../common/di';
|
|
2
17
|
declare const NEWER: unique symbol;
|
|
3
18
|
declare const OLDER: unique symbol;
|
|
4
19
|
export declare class KeyIterator<K, V> implements IterableIterator<K> {
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IRange } from '../sheets/typedef';
|
|
2
17
|
import { ObjectMatrix } from './object-matrix';
|
|
3
18
|
/**
|
|
4
19
|
* @deprecated this function could cause memory out of use in large range.
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IRange } from '../sheets/typedef';
|
|
17
|
+
import type { Nullable } from './types';
|
|
3
18
|
/**
|
|
4
19
|
* Object Matrix Primitive Type
|
|
5
20
|
*/
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { BBox } from 'rbush';
|
|
17
|
+
import type { IUnitRange } from '../sheets/typedef';
|
|
18
|
+
import RBush from 'rbush';
|
|
3
19
|
type StringOrNumber = string | number;
|
|
4
20
|
export interface IRTreeItem extends IUnitRange {
|
|
5
21
|
id: StringOrNumber;
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IRange } from '../sheets/typedef';
|
|
17
|
+
import type { Nullable } from './types';
|
|
3
18
|
export declare function moveRangeByOffset(range: IRange, refOffsetX: number, refOffsetY: number, ignoreAbsolute?: boolean): IRange;
|
|
4
19
|
/**
|
|
5
20
|
* Split ranges into aligned smaller ranges
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IRange, IRectLTRB } from '../sheets/typedef';
|
|
17
|
+
import type { Nullable } from './types';
|
|
3
18
|
/**
|
|
4
19
|
* This class provides a set of methods to calculate and manipulate rectangular ranges (IRange).
|
|
5
20
|
* A range represents a rectangular area in a grid, defined by start/end rows and columns.
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { OperatorFunction } from 'rxjs';
|
|
17
|
+
import type { IDisposable } from '../common/di';
|
|
18
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
19
|
type CallbackFn<T extends readonly unknown[]> = (cb: (...args: T) => void) => IDisposable;
|
|
4
20
|
/**
|
|
5
21
|
* Creates an observable from a callback function.
|
|
@@ -1,22 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IStyleData } from '../types/interfaces';
|
|
17
|
+
import type { IKeyValue, Nullable } from './types';
|
|
3
18
|
/**
|
|
4
19
|
* Universal tool library
|
|
5
20
|
*/
|
|
6
21
|
export declare class Tools {
|
|
7
22
|
static deleteNull(obj: any): any;
|
|
8
|
-
static stringAt(index: number): string;
|
|
9
|
-
static indexAt(code: string): number;
|
|
10
|
-
static deleteBlank(value?: string): string | undefined;
|
|
11
23
|
static getSystemType(): string;
|
|
12
24
|
static getBrowserType(): string;
|
|
13
|
-
static getClassName(instance: object): string;
|
|
14
25
|
/** @deprecated This method is deprecated, please use `import { merge } from '@univerjs/core` instead */
|
|
15
26
|
static deepMerge(target: any, ...sources: any[]): any;
|
|
16
|
-
static numberFixed(value: number, digit: number): number;
|
|
17
27
|
static diffValue(one: any, two: any): boolean;
|
|
18
28
|
static deepClone<T = unknown>(value: T): T;
|
|
19
|
-
static getLanguage(): string;
|
|
20
29
|
static getValueType(value: any): string;
|
|
21
30
|
static isDefine<T>(value?: T | void): value is T;
|
|
22
31
|
static isBlank(value: any): boolean;
|
|
@@ -40,21 +49,6 @@ export declare class Tools {
|
|
|
40
49
|
* @returns
|
|
41
50
|
*/
|
|
42
51
|
static removeNull(value: IKeyValue): object;
|
|
43
|
-
/**
|
|
44
|
-
* Generate a two-dimensional array with the specified number of rows and columns, and fill in the values
|
|
45
|
-
* @param rows row length
|
|
46
|
-
* @param columns column length
|
|
47
|
-
* @param value value to be set
|
|
48
|
-
* @returns
|
|
49
|
-
*/
|
|
50
|
-
static fillTwoDimensionalArray(rows: number, columns: number, value: any): any[][];
|
|
51
|
-
/**
|
|
52
|
-
* Generate a two-dimensional array with the specified number of rows and columns, and fill in the values
|
|
53
|
-
* @param rows row length
|
|
54
|
-
* @param columns column length
|
|
55
|
-
* @param value value to be set
|
|
56
|
-
* @returns
|
|
57
|
-
*/
|
|
58
52
|
static numToWord(x: number): string;
|
|
59
53
|
/**
|
|
60
54
|
* Column subscript letter to number
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IObjectMatrixPrimitiveType, Nullable } from '../shared';
|
|
17
|
+
import type { ICellData, ICellDataWithSpanAndDisplay, IWorksheetData } from './typedef';
|
|
3
18
|
/**
|
|
4
19
|
* Fast clone for primitive values and simple objects.
|
|
5
20
|
* Avoids type checking overhead when we know the structure.
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
17
|
+
import type { Nullable } from '../shared/types';
|
|
18
|
+
import type { IStyleData } from '../types/interfaces';
|
|
19
|
+
import type { CustomData, IColumnData, IRange, IWorksheetData } from './typedef';
|
|
5
20
|
/**
|
|
6
21
|
* Manage configuration information of all columns, get column width, column length, set column width, etc.
|
|
7
22
|
*/
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IWorkbookData } from './typedef';
|
|
2
17
|
import { LocaleType } from '../types/enum/locale-type';
|
|
3
18
|
export declare function getEmptySnapshot(unitID?: string, locale?: LocaleType, name?: string): IWorkbookData;
|
|
@@ -1,9 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IObjectMatrixPrimitiveType, Nullable } from '../shared';
|
|
17
|
+
import type { HorizontalAlign, VerticalAlign } from '../types/enum';
|
|
18
|
+
import type { IBorderData, IDocumentBody, IDocumentData, IStyleBase, IStyleData, ITextDecoration, ITextRotation } from '../types/interfaces';
|
|
19
|
+
import type { Styles } from './styles';
|
|
20
|
+
import type { ICellData, IRange } from './typedef';
|
|
21
|
+
import type { Worksheet } from './worksheet';
|
|
22
|
+
import { ObjectMatrix } from '../shared';
|
|
23
|
+
import { BooleanNumber, FontItalic, FontWeight, WrapStrategy } from '../types/enum';
|
|
7
24
|
/**
|
|
8
25
|
* getObjectValues options type
|
|
9
26
|
*/
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
17
|
+
import type { Nullable } from '../shared/types';
|
|
18
|
+
import type { IStyleData } from '../types/interfaces';
|
|
19
|
+
import type { CustomData, IRange, IRowData, IWorksheetData } from './typedef';
|
|
20
|
+
import type { SheetViewModel } from './view-model';
|
|
6
21
|
/**
|
|
7
22
|
* Manage configuration information of all rows, get row height, row length, set row height, etc.
|
|
8
23
|
*/
|