@univerjs/core 0.1.4 → 0.1.5
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 +1075 -1058
- package/lib/types/basics/plugin-holder.d.ts +5 -19
- package/lib/types/basics/univer-doc.d.ts +5 -19
- package/lib/types/basics/univer-sheet.d.ts +5 -20
- package/lib/types/basics/univer-slide.d.ts +5 -19
- package/lib/types/basics/univer.d.ts +9 -23
- package/lib/types/common/interceptor.d.ts +2 -16
- package/lib/types/docs/data-model/action-types.d.ts +3 -17
- package/lib/types/docs/data-model/apply-utils/common.d.ts +2 -16
- package/lib/types/docs/data-model/apply-utils/delete-apply.d.ts +2 -16
- package/lib/types/docs/data-model/apply-utils/insert-apply.d.ts +2 -16
- package/lib/types/docs/data-model/apply-utils/update-apply.d.ts +2 -16
- package/lib/types/docs/data-model/document-data-model.d.ts +8 -22
- package/lib/types/docs/data-model/empty-snapshot.d.ts +2 -16
- package/lib/types/docs/data-model/preset-list-type.d.ts +1 -15
- package/lib/types/docs/data-model/replacement.d.ts +2 -16
- package/lib/types/docs/data-model/text-x/action-iterator.d.ts +2 -17
- package/lib/types/docs/data-model/text-x/text-x.d.ts +4 -18
- package/lib/types/docs/data-model/text-x/utils.d.ts +3 -17
- package/lib/types/index.d.ts +1 -0
- package/lib/types/observer/observable-hooks.d.ts +3 -18
- package/lib/types/observer/observable.d.ts +2 -16
- package/lib/types/plugin/plugin.d.ts +2 -16
- package/lib/types/services/command/command.service.d.ts +6 -21
- package/lib/types/services/config/config.service.d.ts +3 -17
- package/lib/types/services/context/context.service.d.ts +3 -17
- package/lib/types/services/error/error.service.d.ts +2 -16
- package/lib/types/services/floating-object/floating-object-manager.service.d.ts +6 -20
- package/lib/types/services/instance/instance.service.d.ts +9 -23
- package/lib/types/services/lifecycle/lifecycle.d.ts +2 -16
- package/lib/types/services/lifecycle/lifecycle.service.d.ts +5 -19
- package/lib/types/services/local-storage/local-storage.service.d.ts +1 -1
- package/lib/types/services/locale/locale.service.d.ts +5 -18
- package/lib/types/services/log/log.service.d.ts +2 -16
- package/lib/types/services/permission/permission-point.d.ts +1 -15
- package/lib/types/services/permission/permission.service.d.ts +6 -21
- package/lib/types/services/permission/univer.permission.service.d.ts +3 -17
- package/lib/types/services/resource-manager/resource-manager.service.d.ts +4 -18
- package/lib/types/services/resource-manager/type.d.ts +7 -21
- package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +5 -19
- package/lib/types/services/snapshot/snapshot-server.service.d.ts +4 -18
- package/lib/types/services/snapshot/snapshot-transform.d.ts +6 -20
- package/lib/types/services/snapshot/snapshot-utils.d.ts +7 -21
- package/lib/types/services/theme/theme.service.d.ts +2 -16
- package/lib/types/services/undoredo/undoredo.service.d.ts +8 -24
- package/lib/types/shared/__test__/common.spec.d.ts +16 -0
- package/lib/types/shared/color/color.d.ts +2 -16
- package/lib/types/shared/common.d.ts +15 -22
- package/lib/types/shared/compare.d.ts +2 -16
- package/lib/types/shared/doc-tool.d.ts +2 -16
- package/lib/types/shared/lifecycle.d.ts +5 -20
- package/lib/types/shared/lru/lru-map.d.ts +2 -16
- package/lib/types/shared/object-matrix.d.ts +3 -17
- package/lib/types/shared/props-from.d.ts +2 -16
- package/lib/types/shared/rectangle.d.ts +4 -18
- package/lib/types/shared/ref-alias.d.ts +8 -1
- package/lib/types/shared/rxjs.d.ts +2 -16
- package/lib/types/shared/tools.d.ts +2 -16
- package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +9 -23
- package/lib/types/sheets/column-manager.d.ts +4 -18
- package/lib/types/sheets/range.d.ts +6 -22
- package/lib/types/sheets/row-manager.d.ts +4 -18
- package/lib/types/sheets/sheet-snapshot-utils.d.ts +2 -16
- package/lib/types/sheets/styles.d.ts +3 -17
- package/lib/types/sheets/view-model.d.ts +4 -18
- package/lib/types/sheets/workbook.d.ts +9 -23
- package/lib/types/sheets/worksheet.d.ts +8 -23
- package/lib/types/slides/domain/slide-model.d.ts +5 -19
- package/lib/types/types/const/const.d.ts +2 -16
- package/lib/types/types/enum/interpolation-point-type.d.ts +3 -3
- package/lib/types/types/interfaces/i-cell-data.d.ts +4 -18
- package/lib/types/types/interfaces/i-column-data.d.ts +2 -16
- package/lib/types/types/interfaces/i-document-data.d.ts +5 -19
- package/lib/types/types/interfaces/i-placeholder.d.ts +2 -16
- package/lib/types/types/interfaces/i-row-data.d.ts +2 -16
- package/lib/types/types/interfaces/i-selection-data.d.ts +3 -17
- package/lib/types/types/interfaces/i-shape-properties.d.ts +3 -17
- package/lib/types/types/interfaces/i-slide-data.d.ts +12 -26
- package/lib/types/types/interfaces/i-style-data.d.ts +5 -19
- package/lib/types/types/interfaces/i-univer-data.d.ts +5 -19
- package/lib/types/types/interfaces/i-workbook-data.d.ts +6 -20
- package/lib/types/types/interfaces/i-worksheet-data.d.ts +8 -22
- package/lib/umd/index.js +8 -8
- package/package.json +6 -7
|
@@ -1,20 +1,6 @@
|
|
|
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
|
-
import type { Nullable } from '../../common/type-utils';
|
|
17
1
|
import { ColorType, ThemeColors, ThemeColorType } from '../../types/enum';
|
|
2
|
+
import { Nullable } from '../../common/type-utils';
|
|
3
|
+
|
|
18
4
|
export declare class ColorBuilder {
|
|
19
5
|
private _themeValue;
|
|
20
6
|
private _themeColors;
|
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 '../types/interfaces';
|
|
17
|
-
import type { ICellData } from '../types/interfaces/i-cell-data';
|
|
18
|
-
import type { IDocumentData } from '../types/interfaces/i-document-data';
|
|
19
|
-
import type { IRangeWithCoord, ISelectionCell, ISelectionCellWithCoord } from '../types/interfaces/i-selection-data';
|
|
20
|
-
import type { IColorStyle, IStyleData } from '../types/interfaces/i-style-data';
|
|
21
|
-
import type { Nullable } from './types';
|
|
1
|
+
import { Nullable } from './types';
|
|
2
|
+
import { IColorStyle, IStyleData } from '../types/interfaces/i-style-data';
|
|
3
|
+
import { IRangeWithCoord, ISelectionCell, ISelectionCellWithCoord } from '../types/interfaces/i-selection-data';
|
|
4
|
+
import { IDocumentData } from '../types/interfaces/i-document-data';
|
|
5
|
+
import { ICellData } from '../types/interfaces/i-cell-data';
|
|
6
|
+
import { IRange } from '../types/interfaces';
|
|
7
|
+
|
|
22
8
|
export declare function makeCellToSelection(cellInfo: Nullable<ISelectionCellWithCoord>): Nullable<IRangeWithCoord>;
|
|
23
9
|
export declare function makeCellRangeToRangeData(cellInfo: Nullable<ISelectionCell>): Nullable<IRange>;
|
|
24
10
|
export declare function isEmptyCell(cell: Nullable<ICellData>): boolean;
|
|
@@ -37,5 +23,12 @@ export declare function handleJsonToDom(p: IDocumentData): string;
|
|
|
37
23
|
*/
|
|
38
24
|
export declare function handleStyleToString(style: IStyleData, isCell?: boolean): string;
|
|
39
25
|
export declare function getBorderStyleType(type: string): number;
|
|
40
|
-
export declare function getDocsUpdateBody(model: IDocumentData, segmentId?: string): import(
|
|
26
|
+
export declare function getDocsUpdateBody(model: IDocumentData, segmentId?: string): import('../types/interfaces').IDocumentBody | undefined;
|
|
41
27
|
export declare function isValidRange(range: IRange): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Covert row/column to range object
|
|
30
|
+
* @param row
|
|
31
|
+
* @param col
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
export declare function cellToRange(row: number, col: number): IRange;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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';
|
|
1
|
+
import { ITextRun } from '../types/interfaces/i-document-data';
|
|
2
|
+
|
|
17
3
|
interface AnyObject {
|
|
18
4
|
[key: number | string]: AnyObject | AnyObject[] | Array<[number | string]> | any;
|
|
19
5
|
}
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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';
|
|
1
|
+
import { IParagraph, IParagraphStyle } from '../types/interfaces/i-document-data';
|
|
2
|
+
|
|
17
3
|
export declare function horizontalLineSegmentsSubtraction(A1: number, A2: number, B1: number, B2: number): number[];
|
|
18
4
|
export declare function checkParagraphHasBullet(paragraph: IParagraph): boolean;
|
|
19
5
|
export declare function checkParagraphHasIndent(paragraph: IParagraph): boolean;
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 '@wendellhu/redi';
|
|
17
|
-
import type { Subscription, SubscriptionLike } from 'rxjs';
|
|
18
|
-
import { Subject } from 'rxjs';
|
|
19
|
-
import type { Nullable } from '../common/type-utils';
|
|
20
|
-
import type { Observer } from '../observer/observable';
|
|
1
|
+
import { Observer } from '../observer/observable';
|
|
2
|
+
import { Nullable } from '../common/type-utils';
|
|
3
|
+
import { Subscription, SubscriptionLike, Subject } from 'rxjs';
|
|
4
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
5
|
+
|
|
21
6
|
export declare function toDisposable(observer: Nullable<Observer<any>>): IDisposable;
|
|
22
7
|
export declare function toDisposable(subscription: SubscriptionLike): IDisposable;
|
|
23
8
|
export declare function toDisposable(callback: () => void): IDisposable;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 '@wendellhu/redi';
|
|
1
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
|
+
|
|
17
3
|
declare const NEWER: unique symbol;
|
|
18
4
|
declare const OLDER: unique symbol;
|
|
19
5
|
export declare class KeyIterator<K, V> implements IterableIterator<K> {
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 '../types/interfaces/i-range';
|
|
17
|
-
import type { Nullable } from './types';
|
|
1
|
+
import { Nullable } from './types';
|
|
2
|
+
import { IRange } from '../types/interfaces/i-range';
|
|
3
|
+
|
|
18
4
|
/**
|
|
19
5
|
* Object Matrix Primitive Type
|
|
20
6
|
*/
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { Observable } from '../observer';
|
|
1
|
+
import { Observable } from '../observer';
|
|
2
|
+
|
|
17
3
|
/**
|
|
18
4
|
* Get the type of the generic type of T
|
|
19
5
|
*/
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 '../types/interfaces/i-range';
|
|
17
|
-
import type { Nullable } from './types';
|
|
1
|
+
import { Nullable } from './types';
|
|
2
|
+
import { IRange } from '../types/interfaces/i-range';
|
|
3
|
+
|
|
18
4
|
/**
|
|
19
5
|
* This class provides a set of methods to calculate `IRange`.
|
|
20
6
|
*/
|
|
@@ -27,7 +13,7 @@ export declare class Rectangle {
|
|
|
27
13
|
static realContain(src: IRange, target: IRange): boolean;
|
|
28
14
|
static union(...ranges: IRange[]): IRange;
|
|
29
15
|
static getRelativeRange: (range: IRange, originRange: IRange) => IRange;
|
|
30
|
-
static getPositionRange: (relativeRange: IRange, originRange: IRange) => IRange;
|
|
16
|
+
static getPositionRange: (relativeRange: IRange, originRange: IRange, absoluteRange?: IRange) => IRange;
|
|
31
17
|
static moveHorizontal: (range: IRange, step?: number, length?: number) => IRange;
|
|
32
18
|
static moveVertical: (range: IRange, step?: number, length?: number) => IRange;
|
|
33
19
|
static moveOffset: (range: IRange, offsetX: number, offsetY: number) => IRange;
|
|
@@ -19,7 +19,14 @@ export declare class RefAlias<T extends Record<string, unknown>, K extends keyof
|
|
|
19
19
|
private _keyMaps;
|
|
20
20
|
constructor(values: T[], keys: K[]);
|
|
21
21
|
_initKeyMap(item: T): void;
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* If a key group is specified, the order of values is determined by the key group, otherwise it depends on the keys at initialization
|
|
24
|
+
* @param {string} key
|
|
25
|
+
* @param {K[]} [keyGroup]
|
|
26
|
+
* @return {*}
|
|
27
|
+
* @memberof RefAlias
|
|
28
|
+
*/
|
|
29
|
+
getValue(key: string, keyGroup?: K[]): T | null | undefined;
|
|
23
30
|
hasValue(key: string): boolean;
|
|
24
31
|
addValue(item: T): void;
|
|
25
32
|
setValue(key: string, attr: keyof T, value: unknown): void;
|
|
@@ -1,20 +1,6 @@
|
|
|
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
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
17
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
3
|
+
|
|
18
4
|
type CallbackFn<T extends readonly unknown[]> = (cb: (...args: T) => void) => IDisposable;
|
|
19
5
|
export declare function fromCallback<T extends readonly unknown[]>(callback: CallbackFn<T>): Observable<T>;
|
|
20
6
|
export {};
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { Class, IKeyValue } from './types';
|
|
1
|
+
import { Class, IKeyValue } from './types';
|
|
2
|
+
|
|
17
3
|
/**
|
|
18
4
|
* Universal tool library
|
|
19
5
|
*/
|
|
@@ -1,29 +1,15 @@
|
|
|
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
|
-
*/
|
|
1
|
+
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
16
2
|
import { Univer } from '../../basics/univer';
|
|
17
|
-
|
|
3
|
+
|
|
18
4
|
export declare function createCoreTestBed(workbookConfig?: IWorkbookData): {
|
|
19
5
|
univer: Univer;
|
|
20
6
|
get: {
|
|
21
|
-
<T>(id: import(
|
|
22
|
-
<T_1>(id: import(
|
|
23
|
-
<T_2>(id: import(
|
|
24
|
-
<T_3>(id: import(
|
|
25
|
-
<T_4>(id: import(
|
|
26
|
-
<T_5>(id: import(
|
|
7
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp | undefined): T;
|
|
8
|
+
<T_1>(id: import('@wendellhu/redi').DependencyIdentifier<T_1>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_1[];
|
|
9
|
+
<T_2>(id: import('@wendellhu/redi').DependencyIdentifier<T_2>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_2 | null;
|
|
10
|
+
<T_3>(id: import('@wendellhu/redi').DependencyIdentifier<T_3>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_3;
|
|
11
|
+
<T_4>(id: import('@wendellhu/redi').DependencyIdentifier<T_4>, quantity?: import('@wendellhu/redi').Quantity | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_4 | T_4[] | null;
|
|
12
|
+
<T_5>(id: import('@wendellhu/redi').DependencyIdentifier<T_5>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_5 | T_5[] | null;
|
|
27
13
|
};
|
|
28
|
-
sheet: import(
|
|
14
|
+
sheet: import('../workbook').Workbook;
|
|
29
15
|
};
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 { Nullable } from '../common/type-utils';
|
|
17
|
-
import type { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
18
|
-
import type { IColumnData, IRange, IWorksheetData } from '../types/interfaces';
|
|
1
|
+
import { IColumnData, IRange, IWorksheetData } from '../types/interfaces';
|
|
2
|
+
import { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
3
|
+
import { Nullable } from '../common/type-utils';
|
|
4
|
+
|
|
19
5
|
/**
|
|
20
6
|
* Manage configuration information of all columns, get column width, column length, set column width, etc.
|
|
21
7
|
*/
|
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 { ObjectMatrix } from '../shared';
|
|
18
|
-
import type { HorizontalAlign, VerticalAlign, WrapStrategy } from '../types/enum';
|
|
19
|
-
import { BooleanNumber, FontItalic, FontWeight } from '../types/enum';
|
|
20
|
-
import type { IBorderData, ICellData, IDocumentBody, IDocumentData, IRange, IStyleBase, IStyleData, ITextDecoration, ITextRotation } from '../types/interfaces';
|
|
21
|
-
import type { Styles } from './styles';
|
|
22
|
-
import type { Worksheet } from './worksheet';
|
|
1
|
+
import { Worksheet } from './worksheet';
|
|
2
|
+
import { Styles } from './styles';
|
|
3
|
+
import { IBorderData, ICellData, IDocumentBody, IDocumentData, IRange, IStyleBase, IStyleData, ITextDecoration, ITextRotation } from '../types/interfaces';
|
|
4
|
+
import { HorizontalAlign, VerticalAlign, WrapStrategy, BooleanNumber, FontItalic, FontWeight } from '../types/enum';
|
|
5
|
+
import { IObjectMatrixPrimitiveType, Nullable, ObjectMatrix } from '../shared';
|
|
6
|
+
|
|
23
7
|
/**
|
|
24
8
|
* getObjectValues options type
|
|
25
9
|
*/
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 { IRange, IRowData, IWorksheetData } from '../types/interfaces';
|
|
1
|
+
import { IRange, IRowData, IWorksheetData } from '../types/interfaces';
|
|
2
|
+
import { Nullable } from '../shared/types';
|
|
3
|
+
import { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
4
|
+
|
|
19
5
|
/**
|
|
20
6
|
* Manage configuration information of all rows, get row height, row length, set row height, etc.
|
|
21
7
|
*/
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { IWorksheetData } from '../types/interfaces/i-worksheet-data';
|
|
1
|
+
import { IWorksheetData } from '../types/interfaces/i-worksheet-data';
|
|
2
|
+
|
|
17
3
|
export declare const DEFAULT_WORKSHEET_ROW_COUNT_KEY = "DEFAULT_WORKSHEET_ROW_COUNT";
|
|
18
4
|
export declare const DEFAULT_WORKSHEET_ROW_COUNT = 1000;
|
|
19
5
|
export declare const DEFAULT_WORKSHEET_COLUMN_COUNT_KEY = "DEFAULT_WORKSHEET_COLUMN_COUNT";
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { IKeyType, Nullable } from '../shared';
|
|
17
|
-
import type { ICellDataForSheetInterceptor, IStyleData } from '../types/interfaces';
|
|
1
|
+
import { ICellDataForSheetInterceptor, IStyleData } from '../types/interfaces';
|
|
2
|
+
import { IKeyType, Nullable } from '../shared';
|
|
3
|
+
|
|
18
4
|
/**
|
|
19
5
|
* Styles in a workbook, cells locate styles based on style IDs
|
|
20
6
|
*
|
|
@@ -1,22 +1,8 @@
|
|
|
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
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
17
|
-
import type { Nullable } from '../common/type-utils';
|
|
1
|
+
import { ICellDataForSheetInterceptor } from '../types/interfaces/i-cell-data';
|
|
18
2
|
import { Disposable } from '../shared/lifecycle';
|
|
19
|
-
import
|
|
3
|
+
import { Nullable } from '../common/type-utils';
|
|
4
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
5
|
+
|
|
20
6
|
export interface ICellContentInterceptor {
|
|
21
7
|
getCell(row: number, col: number): Nullable<ICellDataForSheetInterceptor>;
|
|
22
8
|
}
|
|
@@ -1,24 +1,10 @@
|
|
|
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
|
-
import { ILogService } from '../services/log/log.service';
|
|
17
|
-
import type { Nullable } from '../shared';
|
|
18
|
-
import { Disposable } from '../shared/lifecycle';
|
|
19
|
-
import type { IGridRange, IRangeType, IWorkbookData, IWorksheetData } from '../types/interfaces';
|
|
20
|
-
import { Styles } from './styles';
|
|
21
1
|
import { Worksheet } from './worksheet';
|
|
2
|
+
import { Styles } from './styles';
|
|
3
|
+
import { IGridRange, IRangeType, IWorkbookData, IWorksheetData } from '../types/interfaces';
|
|
4
|
+
import { Disposable } from '../shared/lifecycle';
|
|
5
|
+
import { Nullable } from '../shared';
|
|
6
|
+
import { ILogService } from '../services/log/log.service';
|
|
7
|
+
|
|
22
8
|
export declare function getWorksheetUID(workbook: Workbook, worksheet: Worksheet): string;
|
|
23
9
|
/**
|
|
24
10
|
* Access and create Univer Sheets files
|
|
@@ -26,12 +12,12 @@ export declare function getWorksheetUID(workbook: Workbook, worksheet: Worksheet
|
|
|
26
12
|
export declare class Workbook extends Disposable {
|
|
27
13
|
private readonly _logService;
|
|
28
14
|
private readonly _sheetCreated$;
|
|
29
|
-
readonly sheetCreated$: import(
|
|
15
|
+
readonly sheetCreated$: import('rxjs').Observable<Worksheet>;
|
|
30
16
|
private readonly _sheetDisposed$;
|
|
31
|
-
readonly sheetDisposed$: import(
|
|
17
|
+
readonly sheetDisposed$: import('rxjs').Observable<Worksheet>;
|
|
32
18
|
private readonly _activeSheet$;
|
|
33
19
|
private get _activeSheet();
|
|
34
|
-
readonly activeSheet$: import(
|
|
20
|
+
readonly activeSheet$: import('rxjs').Observable<Nullable<Worksheet>>;
|
|
35
21
|
/**
|
|
36
22
|
* sheets list
|
|
37
23
|
* @private
|
|
@@ -1,27 +1,12 @@
|
|
|
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
|
-
import type { Nullable } from '../shared';
|
|
17
|
-
import { ObjectMatrix } from '../shared';
|
|
18
|
-
import type { BooleanNumber } from '../types/enum';
|
|
19
|
-
import type { ICellData, ICellDataForSheetInterceptor, IFreeze, IRange, IWorksheetData } from '../types/interfaces';
|
|
20
|
-
import { ColumnManager } from './column-manager';
|
|
21
|
-
import { Range } from './range';
|
|
22
|
-
import { RowManager } from './row-manager';
|
|
23
|
-
import type { Styles } from './styles';
|
|
24
1
|
import { SheetViewModel } from './view-model';
|
|
2
|
+
import { Styles } from './styles';
|
|
3
|
+
import { RowManager } from './row-manager';
|
|
4
|
+
import { Range } from './range';
|
|
5
|
+
import { ColumnManager } from './column-manager';
|
|
6
|
+
import { ICellData, ICellDataForSheetInterceptor, IFreeze, IRange, IWorksheetData } from '../types/interfaces';
|
|
7
|
+
import { BooleanNumber } from '../types/enum';
|
|
8
|
+
import { Nullable, ObjectMatrix } from '../shared';
|
|
9
|
+
|
|
25
10
|
/**
|
|
26
11
|
* The model of a Worksheet.
|
|
27
12
|
*/
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { ISlideData, ISlidePage } from '../../types/interfaces';
|
|
1
|
+
import { ISlideData, ISlidePage } from '../../types/interfaces';
|
|
2
|
+
|
|
17
3
|
export declare class SlideDataModel {
|
|
18
4
|
private _snapshot;
|
|
19
5
|
private _unitId;
|
|
@@ -28,9 +14,9 @@ export declare class SlideDataModel {
|
|
|
28
14
|
getPageOrder(): string[] | undefined;
|
|
29
15
|
getPage(pageId: string): ISlidePage | undefined;
|
|
30
16
|
getElementsByPage(pageId: string): {
|
|
31
|
-
[elementId: string]: import(
|
|
17
|
+
[elementId: string]: import('../../types/interfaces').IPageElement;
|
|
32
18
|
} | undefined;
|
|
33
|
-
getElement(pageId: string, elementId: string): import(
|
|
34
|
-
getPageSize(): import(
|
|
19
|
+
getElement(pageId: string, elementId: string): import('../../types/interfaces').IPageElement | undefined;
|
|
20
|
+
getPageSize(): import('../..').ISize;
|
|
35
21
|
addPage(): ISlidePage;
|
|
36
22
|
}
|