@univerjs/core 0.2.7 → 0.2.9
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 +987 -185
- package/lib/types/common/equal.d.ts +15 -4
- package/lib/types/common/interceptor.d.ts +1 -2
- package/lib/types/{types/interfaces/i-freeze.d.ts → common/mixin.d.ts} +9 -5
- package/lib/types/common/unit.d.ts +2 -2
- package/lib/types/docs/data-model/document-data-model.d.ts +2 -4
- package/lib/types/docs/data-model/empty-snapshot.d.ts +0 -1
- package/lib/types/docs/data-model/json-x/json-x.d.ts +0 -1
- package/lib/types/docs/data-model/preset-list-type.d.ts +0 -1
- package/lib/types/docs/data-model/replacement.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/action-iterator.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/action-types.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/apply-utils/common.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/apply-utils/delete-apply.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/apply-utils/insert-apply.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/apply-utils/update-apply.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/apply.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/text-x.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/transform-utils.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/utils.d.ts +0 -1
- package/lib/types/index.d.ts +5 -2
- package/lib/types/observer/observable.d.ts +0 -1
- package/lib/types/services/__tests__/index.d.ts +0 -1
- package/lib/types/services/authz-io/authz-io-local.service.d.ts +2 -3
- package/lib/types/services/authz-io/type.d.ts +0 -1
- package/lib/types/services/command/command.service.d.ts +0 -1
- package/lib/types/services/config/config.service.d.ts +0 -1
- package/lib/types/services/context/context.service.d.ts +0 -1
- package/lib/types/services/error/error.service.d.ts +0 -1
- package/lib/types/services/instance/instance.service.d.ts +0 -1
- package/lib/types/services/lifecycle/lifecycle.d.ts +5 -1
- package/lib/types/services/lifecycle/lifecycle.service.d.ts +0 -1
- package/lib/types/services/locale/locale.service.d.ts +0 -1
- package/lib/types/services/log/log.service.d.ts +0 -1
- package/lib/types/services/permission/permission.service.d.ts +0 -1
- package/lib/types/services/permission/type.d.ts +2 -3
- package/lib/types/services/plugin/plugin-override.d.ts +0 -1
- package/lib/types/services/plugin/plugin.d.ts +0 -1
- package/lib/types/services/plugin/plugin.service.d.ts +0 -1
- package/lib/types/services/resource-loader/resource-loader.service.d.ts +3 -6
- package/lib/types/services/resource-loader/type.d.ts +4 -7
- package/lib/types/services/resource-manager/resource-manager.service.d.ts +4 -5
- package/lib/types/services/resource-manager/type.d.ts +9 -6
- package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +1 -2
- package/lib/types/services/snapshot/snapshot-server.service.d.ts +0 -1
- package/lib/types/services/snapshot/snapshot-transform.d.ts +1 -2
- package/lib/types/services/snapshot/snapshot-utils.d.ts +1 -4
- package/lib/types/services/theme/theme.service.d.ts +0 -1
- package/lib/types/services/undoredo/undoredo.service.d.ts +1 -2
- package/lib/types/services/user-manager/const.d.ts +0 -1
- package/lib/types/shared/after-init-apply.d.ts +0 -1
- package/lib/types/shared/check-if-move.d.ts +1 -2
- package/lib/types/shared/clipboard.d.ts +0 -1
- package/lib/types/shared/color/color.d.ts +1 -2
- package/lib/types/shared/common.d.ts +2 -5
- package/lib/types/shared/compare.d.ts +0 -1
- package/lib/types/shared/doc-tool.d.ts +0 -1
- package/lib/types/shared/index.d.ts +1 -0
- package/lib/types/shared/lifecycle.d.ts +0 -1
- package/lib/types/shared/lru/lru-map.d.ts +0 -1
- package/lib/types/shared/numfmt.d.ts +2 -0
- package/lib/types/shared/object-matrix-query.d.ts +1 -2
- package/lib/types/shared/object-matrix.d.ts +7 -2
- package/lib/types/shared/range.d.ts +1 -2
- package/lib/types/shared/rectangle.d.ts +1 -2
- package/lib/types/shared/rxjs.d.ts +0 -1
- package/lib/types/shared/tools.d.ts +1 -3
- package/lib/types/shared/types.d.ts +4 -13
- package/lib/types/{types/interfaces/i-service-data.d.ts → sheets/__tests__/cell-data.spec.d.ts} +1 -2
- package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +1 -2
- package/lib/types/sheets/column-manager.d.ts +2 -3
- package/lib/types/sheets/empty-snapshot.d.ts +1 -2
- package/lib/types/sheets/range.d.ts +2 -2
- package/lib/types/sheets/row-manager.d.ts +1 -2
- package/lib/types/sheets/sheet-snapshot-utils.d.ts +1 -2
- package/lib/types/sheets/styles.d.ts +2 -2
- package/lib/types/sheets/typedef.d.ts +451 -0
- package/lib/types/sheets/util.d.ts +3 -0
- package/lib/types/sheets/view-model.d.ts +2 -3
- package/lib/types/sheets/workbook.d.ts +13 -5
- package/lib/types/sheets/worksheet.d.ts +11 -2
- package/lib/types/slides/slide-model.d.ts +0 -2
- package/lib/types/types/const/const.d.ts +1 -1
- package/lib/types/types/enum/locale-type.d.ts +3 -1
- package/lib/types/types/enum/text-style.d.ts +1 -1
- package/lib/types/types/interfaces/i-cell-custom-render.d.ts +2 -3
- package/lib/types/types/interfaces/i-cell-validation-data.d.ts +0 -1
- package/lib/types/types/interfaces/i-data-validation.d.ts +1 -2
- package/lib/types/types/interfaces/i-document-data-interceptor.d.ts +0 -1
- package/lib/types/types/interfaces/i-document-data.d.ts +2 -5
- package/lib/types/types/interfaces/i-placeholder.d.ts +0 -1
- package/lib/types/types/interfaces/i-shape-properties.d.ts +0 -1
- package/lib/types/types/interfaces/i-slide-data.d.ts +5 -4
- package/lib/types/types/interfaces/i-style-data.d.ts +0 -1
- package/lib/types/types/interfaces/index.d.ts +0 -11
- package/lib/types/univer.d.ts +14 -3
- package/lib/umd/index.js +8 -8
- package/package.json +7 -6
- package/lib/types/common/type-util.d.ts +0 -16
- package/lib/types/common/type-utils.d.ts +0 -16
- package/lib/types/types/interfaces/i-cell-data.d.ts +0 -67
- package/lib/types/types/interfaces/i-column-data.d.ts +0 -15
- package/lib/types/types/interfaces/i-extra-model-data.d.ts +0 -27
- package/lib/types/types/interfaces/i-range.d.ts +0 -208
- package/lib/types/types/interfaces/i-row-data.d.ts +0 -27
- package/lib/types/types/interfaces/i-selection-data.d.ts +0 -59
- package/lib/types/types/interfaces/i-univer-data.d.ts +0 -14
- package/lib/types/types/interfaces/i-workbook-data.d.ts +0 -40
- package/lib/types/types/interfaces/i-worksheet-data.d.ts +0 -55
- package/lib/types/types/interfaces/i-worksheet-order-data.d.ts +0 -17
- /package/lib/types/{types/interfaces/__tests__/i-cell-data.spec.d.ts → services/__tests__/resources.spec.d.ts} +0 -0
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { IRange } from '../
|
|
2
|
-
import { ICellData, ICellDataForSheetInterceptor } from '../types/interfaces/i-cell-data';
|
|
1
|
+
import { ICellData, ICellDataForSheetInterceptor, IRange, IRangeWithCoord, ISelectionCell, ISelectionCellWithMergeInfo } from '../sheets/typedef';
|
|
3
2
|
import { IDocumentData } from '../types/interfaces/i-document-data';
|
|
4
|
-
import { IRangeWithCoord, ISelectionCell, ISelectionCellWithMergeInfo } from '../types/interfaces/i-selection-data';
|
|
5
3
|
import { IColorStyle, IStyleData } from '../types/interfaces/i-style-data';
|
|
6
4
|
import { Nullable } from './types';
|
|
7
|
-
|
|
8
5
|
export declare function makeCellToSelection(cellInfo: ISelectionCellWithMergeInfo): IRangeWithCoord;
|
|
9
6
|
export declare function makeCellRangeToRangeData(cellInfo: Nullable<ISelectionCell>): Nullable<IRange>;
|
|
10
7
|
export declare function isEmptyCell(cell: Nullable<ICellData>): boolean;
|
|
@@ -29,7 +26,7 @@ export declare function isFormulaId(value: any): boolean;
|
|
|
29
26
|
*/
|
|
30
27
|
export declare function handleStyleToString(style: IStyleData, isCell?: boolean): string;
|
|
31
28
|
export declare function getBorderStyleType(type: string): number;
|
|
32
|
-
export declare function getDocsUpdateBody(model: IDocumentData, segmentId?: string): import('../types/interfaces').IDocumentBody | undefined;
|
|
29
|
+
export declare function getDocsUpdateBody(model: IDocumentData, segmentId?: string): import('../types/interfaces/i-document-data').IDocumentBody | undefined;
|
|
33
30
|
export declare function isValidRange(range: IRange): boolean;
|
|
34
31
|
/**
|
|
35
32
|
* Covert row/column to range object
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IParagraph, IParagraphStyle } from '../types/interfaces/i-document-data';
|
|
2
|
-
|
|
3
2
|
export declare function horizontalLineSegmentsSubtraction(A1: number, A2: number, B1: number, B2: number): number[];
|
|
4
3
|
export declare function checkParagraphHasBullet(paragraph: IParagraph): boolean;
|
|
5
4
|
export declare function checkParagraphHasIndent(paragraph: IParagraph): boolean;
|
|
@@ -38,6 +38,7 @@ export * from './tools';
|
|
|
38
38
|
export * from './types';
|
|
39
39
|
export * from './debounce';
|
|
40
40
|
export * from './clipboard';
|
|
41
|
+
export { numfmt } from './numfmt';
|
|
41
42
|
export { queryObjectMatrix } from './object-matrix-query';
|
|
42
43
|
export { moveRangeByOffset } from './range';
|
|
43
44
|
export { afterInitApply } from './after-init-apply';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Subscription, SubscriptionLike, Subject } from 'rxjs';
|
|
2
2
|
import { IDisposable } from '../common/di';
|
|
3
|
-
|
|
4
3
|
type DisposableLike = IDisposable | SubscriptionLike | (() => void);
|
|
5
4
|
export declare function toDisposable(disposable: IDisposable): IDisposable;
|
|
6
5
|
export declare function toDisposable(subscription: SubscriptionLike): IDisposable;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IRange } from '../
|
|
1
|
+
import { IRange } from '../sheets/typedef';
|
|
2
2
|
import { Nullable } from './types';
|
|
3
|
-
|
|
4
3
|
/**
|
|
5
4
|
* Object Matrix Primitive Type
|
|
6
5
|
*/
|
|
@@ -92,6 +91,12 @@ export declare class ObjectMatrix<T> {
|
|
|
92
91
|
*/
|
|
93
92
|
getData(): IObjectMatrixPrimitiveType<T>;
|
|
94
93
|
getArrayData(): IObjectMatrixPrimitiveType<T>;
|
|
94
|
+
/**
|
|
95
|
+
* the function can only be used in all the row and column are positive integer
|
|
96
|
+
* @description the positive integer in V8 Object is stored in a fast memory space and it is sorted when we get the keys
|
|
97
|
+
* @returns {IRange} the start and end scope of the matrix
|
|
98
|
+
*/
|
|
99
|
+
getStartEndScope(): IRange;
|
|
95
100
|
getDataRange(): IRange;
|
|
96
101
|
getDiscreteRanges(): IRange[];
|
|
97
102
|
merge(newObject: ObjectMatrix<T>): void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { IKeyValue } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* Universal tool library
|
|
5
4
|
*/
|
|
@@ -24,7 +23,6 @@ export declare class Tools {
|
|
|
24
23
|
static getValueType(value: any): string;
|
|
25
24
|
static isDefine<T>(value?: T | void): value is T;
|
|
26
25
|
static isBlank(value: any): boolean;
|
|
27
|
-
static isAssignableFrom<T>(object: any, clazz: Class<T>): object is T;
|
|
28
26
|
static isBoolean(value?: any): value is boolean;
|
|
29
27
|
static isPlainObject(value: any): value is object;
|
|
30
28
|
static isFunction(value?: any): value is boolean;
|
|
@@ -14,28 +14,19 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export type Nullable<T> = T | null | undefined | void;
|
|
17
|
-
/**
|
|
18
|
-
* wrap any
|
|
19
|
-
*/
|
|
20
|
-
export type NoNeedCheckedType = any;
|
|
21
|
-
/**
|
|
22
|
-
* Class type
|
|
23
|
-
*/
|
|
24
|
-
export interface Class<T> {
|
|
25
|
-
new (...param: any): T;
|
|
26
|
-
}
|
|
27
17
|
/**
|
|
28
18
|
* Key value object
|
|
29
19
|
*
|
|
30
|
-
* @
|
|
20
|
+
* @ignore
|
|
21
|
+
* @deprecated As it has
|
|
31
22
|
*/
|
|
32
23
|
export interface IKeyValue {
|
|
33
24
|
[key: string]: any;
|
|
34
25
|
}
|
|
35
26
|
/**
|
|
36
|
-
*
|
|
27
|
+
* @ignore
|
|
28
|
+
* @deprecated, use {@link Record} instead.
|
|
37
29
|
*/
|
|
38
30
|
export interface IKeyType<T> {
|
|
39
31
|
[key: string]: T;
|
|
40
32
|
}
|
|
41
|
-
export type AsyncFunction<T = void, R = void> = (value: T) => Promise<R>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Nullable } from '../common/type-util';
|
|
2
1
|
import { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { Nullable } from '../shared/types';
|
|
3
|
+
import { IColumnData, IRange, IWorksheetData } from './typedef';
|
|
5
4
|
/**
|
|
6
5
|
* Manage configuration information of all columns, get column width, column length, set column width, etc.
|
|
7
6
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IObjectMatrixPrimitiveType, Nullable, ObjectMatrix } from '../shared';
|
|
2
2
|
import { HorizontalAlign, VerticalAlign, BooleanNumber, FontItalic, FontWeight, WrapStrategy } from '../types/enum';
|
|
3
|
-
import { IBorderData,
|
|
3
|
+
import { IBorderData, IDocumentBody, IDocumentData, IStyleBase, IStyleData, ITextDecoration, ITextRotation } from '../types/interfaces';
|
|
4
4
|
import { Styles } from './styles';
|
|
5
|
+
import { ICellData, IRange } from './typedef';
|
|
5
6
|
import { Worksheet } from './worksheet';
|
|
6
|
-
|
|
7
7
|
/**
|
|
8
8
|
* getObjectValues options type
|
|
9
9
|
*/
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
2
2
|
import { Nullable } from '../shared/types';
|
|
3
|
-
import { IRange, IRowData, IWorksheetData } from '
|
|
3
|
+
import { IRange, IRowData, IWorksheetData } from './typedef';
|
|
4
4
|
import { SheetViewModel } from './view-model';
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Manage configuration information of all rows, get row height, row length, set row height, etc.
|
|
8
7
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IWorksheetData } from '
|
|
2
|
-
|
|
1
|
+
import { IWorksheetData } from './typedef';
|
|
3
2
|
export declare const DEFAULT_WORKSHEET_ROW_COUNT_KEY = "DEFAULT_WORKSHEET_ROW_COUNT";
|
|
4
3
|
export declare const DEFAULT_WORKSHEET_ROW_COUNT = 1000;
|
|
5
4
|
export declare const DEFAULT_WORKSHEET_COLUMN_COUNT_KEY = "DEFAULT_WORKSHEET_COLUMN_COUNT";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IKeyType, Nullable } from '../shared';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { IStyleData } from '../types/interfaces';
|
|
3
|
+
import { ICellDataForSheetInterceptor } from './typedef';
|
|
4
4
|
/**
|
|
5
5
|
* Styles in a workbook, cells locate styles based on style IDs
|
|
6
6
|
*
|