@univerjs/core 0.2.6 → 0.2.8
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 +9 -9
- package/lib/es/index.js +2025 -244
- package/lib/types/common/const.d.ts +1 -1
- package/lib/types/common/equal.d.ts +0 -1
- package/lib/types/common/error.d.ts +18 -0
- package/lib/types/common/interceptor.d.ts +0 -1
- package/lib/types/common/unit.d.ts +3 -1
- package/lib/types/docs/data-model/document-data-model.d.ts +4 -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 +2 -2
- package/lib/types/docs/data-model/preset-list-type.d.ts +54 -5
- package/lib/types/docs/data-model/replacement.d.ts +0 -1
- package/lib/types/docs/data-model/text-x/__tests__/transform-position.spec.d.ts +16 -0
- package/lib/types/docs/data-model/text-x/__tests__/transform.spec.d.ts +16 -0
- 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 +2 -3
- 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 +31 -2
- package/lib/types/docs/data-model/text-x/transform-utils.d.ts +2 -0
- package/lib/types/docs/data-model/text-x/utils.d.ts +0 -1
- package/lib/types/docs/data-model/types.d.ts +12 -10
- package/lib/types/index.d.ts +2 -1
- 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.d.ts +3 -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 +18 -7
- package/lib/types/services/lifecycle/lifecycle.d.ts +0 -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 +0 -1
- 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 +0 -1
- package/lib/types/services/resource-loader/type.d.ts +0 -1
- package/lib/types/services/resource-manager/resource-manager.service.d.ts +4 -7
- package/lib/types/services/resource-manager/type.d.ts +8 -5
- package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +0 -1
- package/lib/types/services/snapshot/snapshot-server.service.d.ts +0 -1
- package/lib/types/services/snapshot/snapshot-transform.d.ts +3 -1
- package/lib/types/services/snapshot/snapshot-utils.d.ts +0 -1
- package/lib/types/services/theme/theme.service.d.ts +0 -1
- package/lib/types/services/undoredo/undoredo.service.d.ts +0 -1
- 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 +0 -1
- package/lib/types/shared/clipboard.d.ts +0 -1
- package/lib/types/shared/color/color.d.ts +0 -1
- package/lib/types/shared/common.d.ts +0 -1
- 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 +0 -1
- package/lib/types/shared/object-matrix.d.ts +6 -1
- package/lib/types/shared/range.d.ts +0 -1
- package/lib/types/shared/rectangle.d.ts +0 -1
- package/lib/types/shared/rxjs.d.ts +0 -1
- package/lib/types/shared/shape.d.ts +6 -0
- package/lib/types/shared/tools.d.ts +11 -1
- package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +0 -1
- package/lib/types/sheets/column-manager.d.ts +0 -1
- package/lib/types/sheets/empty-snapshot.d.ts +0 -1
- package/lib/types/sheets/range.d.ts +0 -1
- package/lib/types/sheets/row-manager.d.ts +0 -1
- package/lib/types/sheets/sheet-snapshot-utils.d.ts +0 -1
- package/lib/types/sheets/styles.d.ts +0 -1
- package/lib/types/sheets/view-model.d.ts +0 -1
- package/lib/types/sheets/workbook.d.ts +1 -1
- package/lib/types/sheets/worksheet.d.ts +0 -1
- package/lib/types/slides/slide-model.d.ts +18 -4
- package/lib/types/types/const/const.d.ts +1 -1
- package/lib/types/types/interfaces/i-cell-custom-render.d.ts +0 -1
- package/lib/types/types/interfaces/i-cell-data.d.ts +0 -1
- package/lib/types/types/interfaces/i-cell-validation-data.d.ts +0 -1
- package/lib/types/types/interfaces/i-column-data.d.ts +0 -1
- package/lib/types/types/interfaces/i-data-validation.d.ts +0 -1
- package/lib/types/types/interfaces/i-document-data-interceptor.d.ts +5 -2
- package/lib/types/types/interfaces/i-document-data.d.ts +93 -47
- package/lib/types/types/interfaces/i-placeholder.d.ts +0 -1
- package/lib/types/types/interfaces/i-row-data.d.ts +0 -1
- package/lib/types/types/interfaces/i-selection-data.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 +0 -1
- package/lib/types/types/interfaces/i-style-data.d.ts +0 -1
- package/lib/types/types/interfaces/i-univer-data.d.ts +0 -1
- package/lib/types/types/interfaces/i-workbook-data.d.ts +6 -6
- package/lib/types/types/interfaces/i-worksheet-data.d.ts +0 -1
- package/lib/types/univer.d.ts +0 -1
- package/lib/umd/index.js +9 -9
- package/package.json +11 -7
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Ctor, Injector } from '../../common/di';
|
|
2
2
|
import { Disposable } from '../../shared';
|
|
3
3
|
import { UniverInstanceType } from '../../common/unit';
|
|
4
|
-
|
|
5
4
|
export declare const DependentOnSymbol: unique symbol;
|
|
6
5
|
export type PluginCtor<T extends Plugin = Plugin> = Ctor<T> & {
|
|
7
6
|
type: UniverInstanceType;
|
|
@@ -4,7 +4,6 @@ import { UniverInstanceType } from '../../common/unit';
|
|
|
4
4
|
import { LifecycleInitializerService, LifecycleService } from '../lifecycle/lifecycle.service';
|
|
5
5
|
import { ILogService } from '../log/log.service';
|
|
6
6
|
import { Plugin, PluginCtor, PluginRegistry, PluginStore } from './plugin';
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* Use this decorator to declare dependencies among plugins. If a dependent plugin is not registered yet,
|
|
10
9
|
* Univer will automatically register it with no configuration.
|
|
@@ -5,7 +5,6 @@ import { IUniverInstanceService } from '../instance/instance.service';
|
|
|
5
5
|
import { Disposable } from '../../shared/lifecycle';
|
|
6
6
|
import { DocumentDataModel } from '../../docs';
|
|
7
7
|
import { IResourceLoaderService } from './type';
|
|
8
|
-
|
|
9
8
|
export declare class ResourceLoaderService extends Disposable implements IResourceLoaderService {
|
|
10
9
|
private readonly _resourceManagerService;
|
|
11
10
|
private readonly _univerInstanceService;
|
|
@@ -2,7 +2,6 @@ import { Workbook } from '../../sheets/workbook';
|
|
|
2
2
|
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
3
3
|
import { IDocumentData } from '../../types/interfaces';
|
|
4
4
|
import { DocumentDataModel } from '../../docs';
|
|
5
|
-
|
|
6
5
|
export interface IResourceLoaderService {
|
|
7
6
|
saveWorkbook: (workbook: Workbook) => IWorkbookData;
|
|
8
7
|
saveDoc: (doc: DocumentDataModel) => IDocumentData;
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import { Disposable } from '../../shared/lifecycle';
|
|
2
|
-
import {
|
|
2
|
+
import { Resources } from '../../types/interfaces/i-workbook-data';
|
|
3
3
|
import { UniverInstanceType } from '../../common/unit';
|
|
4
4
|
import { IResourceHook, IResourceManagerService, IResourceName } from './type';
|
|
5
|
-
|
|
6
5
|
export declare class ResourceManagerService extends Disposable implements IResourceManagerService {
|
|
7
6
|
private _resourceMap;
|
|
8
7
|
private _register$;
|
|
9
8
|
register$: import('rxjs').Observable<IResourceHook<any>>;
|
|
10
9
|
getAllResourceHooks(): IResourceHook<any>[];
|
|
11
|
-
getResources(unitId: string):
|
|
12
|
-
|
|
13
|
-
data: string;
|
|
14
|
-
}[];
|
|
10
|
+
getResources(unitId: string): Resources;
|
|
11
|
+
getResources(unitId: string, type: UniverInstanceType): Resources;
|
|
15
12
|
getResourcesByType(unitId: string, type: UniverInstanceType): {
|
|
16
13
|
name: `SHEET_${string}_PLUGIN` | `DOC_${string}_PLUGIN`;
|
|
17
14
|
data: string;
|
|
18
15
|
}[];
|
|
19
16
|
registerPluginResource<T = unknown>(hook: IResourceHook<T>): import('@wendellhu/redi').IDisposable;
|
|
20
17
|
disposePluginResource(pluginName: IResourceName): void;
|
|
21
|
-
loadResources(unitId: string, resources
|
|
18
|
+
loadResources(unitId: string, resources?: Resources): void;
|
|
22
19
|
unloadResources(unitId: string): void;
|
|
23
20
|
dispose(): void;
|
|
24
21
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { UniverInstanceType } from '@univerjs/core';
|
|
3
3
|
import { IDisposable } from '../../common/di';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { Resources } from '../../types/interfaces/i-workbook-data';
|
|
6
5
|
type IBusinessName = 'SHEET' | 'DOC';
|
|
7
6
|
export type IResourceName = `${IBusinessName}_${string}_PLUGIN`;
|
|
8
7
|
export interface IResourceHook<T = any> {
|
|
@@ -18,9 +17,13 @@ export interface IResourceManagerService {
|
|
|
18
17
|
registerPluginResource: <T = any>(hook: IResourceHook<T>) => IDisposable;
|
|
19
18
|
disposePluginResource: (pluginName: IResourceName) => void;
|
|
20
19
|
getAllResourceHooks: () => IResourceHook[];
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated You should get resource with type specified.
|
|
22
|
+
*/
|
|
23
|
+
getResources(unitId: string): Resources;
|
|
24
|
+
getResources(unitId: string, type: UniverInstanceType): Resources;
|
|
25
|
+
getResourcesByType: (unitId: string, type: UniverInstanceType) => Resources;
|
|
26
|
+
loadResources: (unitId: string, resources?: Resources) => void;
|
|
24
27
|
unloadResources(unitId: string): void;
|
|
25
28
|
}
|
|
26
29
|
export declare const IResourceManagerService: import('@univerjs/core').IdentifierDecorator<IResourceManagerService>;
|
|
@@ -2,7 +2,6 @@ import { IFetchMissingChangesetsRequest, IFetchMissingChangesetsResponse, IGetRe
|
|
|
2
2
|
import { IWorkbookData } from '../../../types/interfaces/i-workbook-data';
|
|
3
3
|
import { ILogContext } from '../../log/context';
|
|
4
4
|
import { ISnapshotServerService } from '../snapshot-server.service';
|
|
5
|
-
|
|
6
5
|
export declare const testSnapshot: () => ISnapshot;
|
|
7
6
|
export declare const testSheetBlocks: () => ISheetBlock[];
|
|
8
7
|
export declare const testWorkbookData: () => IWorkbookData;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IFetchMissingChangesetsRequest, IFetchMissingChangesetsResponse, IGetResourcesRequest, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetRequest, ISaveChangesetResponse, ISaveSheetBlockRequest, ISaveSheetBlockResponse, ISaveSnapshotRequest, ISaveSnapshotResponse } from '@univerjs/protocol';
|
|
2
2
|
import { ILogContext } from '../log/context';
|
|
3
|
-
|
|
4
3
|
/**
|
|
5
4
|
* It provides implementations for server side controllers to load or save
|
|
6
5
|
* or load snapshots. This service should be implemented by the host environment.
|
|
@@ -3,7 +3,9 @@ import { ILogContext } from '../log/context';
|
|
|
3
3
|
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
4
4
|
import { IDocumentData } from '../../types/interfaces/i-document-data';
|
|
5
5
|
import { ISnapshotServerService } from './snapshot-server.service';
|
|
6
|
-
|
|
6
|
+
export declare function generateTempDocumentSnapshot(_context: ILogContext, document: IDocumentData, unitID: string, rev: number): Promise<{
|
|
7
|
+
snapshot: ISnapshot;
|
|
8
|
+
}>;
|
|
7
9
|
export declare function generateTemporarySnap(context: ILogContext, workbook: IWorkbookData, unitID: string, rev: number, snapshotService: ISnapshotServerService): Promise<{
|
|
8
10
|
snapshotRes: ISnapshot;
|
|
9
11
|
}>;
|
|
@@ -4,7 +4,6 @@ import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
|
4
4
|
import { IDocumentData } from '../../types/interfaces/i-document-data';
|
|
5
5
|
import { ICellData } from '../../types/interfaces/i-cell-data';
|
|
6
6
|
import { IObjectMatrixPrimitiveType } from '../../shared/object-matrix';
|
|
7
|
-
|
|
8
7
|
export declare const textEncoder: TextEncoder;
|
|
9
8
|
export declare const textDecoder: TextDecoder;
|
|
10
9
|
/**
|
|
@@ -5,7 +5,6 @@ import { IMutationInfo, CommandType, ICommandService } from '../command/command.
|
|
|
5
5
|
import { IContextService } from '../context/context.service';
|
|
6
6
|
import { IUniverInstanceService } from '../instance/instance.service';
|
|
7
7
|
import { Nullable } from '../../common/type-util';
|
|
8
|
-
|
|
9
8
|
export interface IUndoRedoItem {
|
|
10
9
|
/** unitID maps to unitId for UniverSheet / UniverDoc / UniverSlide */
|
|
11
10
|
unitID: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Nullable } from '../common/type-util';
|
|
2
2
|
import { ITransformState } from '../types/interfaces/i-document-data';
|
|
3
|
-
|
|
4
3
|
export declare const MOVE_BUFFER_VALUE = 2;
|
|
5
4
|
export declare const ROTATE_BUFFER_VALUE = 1;
|
|
6
5
|
export declare function checkIfMove(transform: Nullable<ITransformState>, previousTransform: Nullable<ITransformState>): boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IDocumentBody, ITextRun } from '../types/interfaces';
|
|
2
|
-
|
|
3
2
|
export declare function getBodySliceHtml(body: IDocumentBody, startIndex: number, endIndex: number): string;
|
|
4
3
|
export declare function convertBodyToHtml(body: IDocumentBody, withParagraphInfo?: boolean): string;
|
|
5
4
|
export declare function covertTextRunToHtml(dataStream: string, textRun: ITextRun): string;
|
|
@@ -4,7 +4,6 @@ import { IDocumentData } from '../types/interfaces/i-document-data';
|
|
|
4
4
|
import { IRangeWithCoord, ISelectionCell, ISelectionCellWithMergeInfo } from '../types/interfaces/i-selection-data';
|
|
5
5
|
import { IColorStyle, IStyleData } from '../types/interfaces/i-style-data';
|
|
6
6
|
import { Nullable } from './types';
|
|
7
|
-
|
|
8
7
|
export declare function makeCellToSelection(cellInfo: ISelectionCellWithMergeInfo): IRangeWithCoord;
|
|
9
8
|
export declare function makeCellRangeToRangeData(cellInfo: Nullable<ISelectionCell>): Nullable<IRange>;
|
|
10
9
|
export declare function isEmptyCell(cell: Nullable<ICellData>): boolean;
|
|
@@ -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
1
|
import { IRange } from '../types/interfaces/i-range';
|
|
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
1
|
import { Class, IKeyValue } from './types';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* Universal tool library
|
|
5
4
|
*/
|
|
@@ -113,5 +112,16 @@ export declare class Tools {
|
|
|
113
112
|
*/
|
|
114
113
|
static set(data: Record<string, any>, propertyPath: string, value: any): void;
|
|
115
114
|
static clamp(value: number, min: number, max: number): number;
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
*
|
|
118
|
+
* @static
|
|
119
|
+
* @param {unknown} object Modify the property while leaving the reference unchanged.
|
|
120
|
+
* @param {unknown} source The source being merged in object.
|
|
121
|
+
* @param {(value: unknown, originValue: unknown, key: string, object: unknown, source: unknown, stack: string[]) => {}} [customizer]
|
|
122
|
+
* @return {*}
|
|
123
|
+
* @memberof Tools
|
|
124
|
+
*/
|
|
125
|
+
static mergeWith(object: unknown, source: unknown, customizer?: (value: unknown, originValue: unknown, key: string, object: unknown, source: unknown, stack: string[]) => {}): any;
|
|
116
126
|
}
|
|
117
127
|
export declare function generateRandomId(n?: number, alphabet?: string): string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Nullable } from '../common/type-util';
|
|
2
2
|
import { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
3
3
|
import { IColumnData, IRange, IWorksheetData } from '../types/interfaces';
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Manage configuration information of all columns, get column width, column length, set column width, etc.
|
|
7
6
|
*/
|
|
@@ -3,7 +3,6 @@ import { HorizontalAlign, VerticalAlign, BooleanNumber, FontItalic, FontWeight,
|
|
|
3
3
|
import { IBorderData, ICellData, IDocumentBody, IDocumentData, IRange, IStyleBase, IStyleData, ITextDecoration, ITextRotation } from '../types/interfaces';
|
|
4
4
|
import { Styles } from './styles';
|
|
5
5
|
import { Worksheet } from './worksheet';
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* getObjectValues options type
|
|
9
8
|
*/
|
|
@@ -2,7 +2,6 @@ import { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
|
2
2
|
import { Nullable } from '../shared/types';
|
|
3
3
|
import { IRange, IRowData, IWorksheetData } from '../types/interfaces';
|
|
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
1
|
import { IWorksheetData } from '../types/interfaces/i-worksheet-data';
|
|
2
|
-
|
|
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";
|
|
@@ -5,7 +5,6 @@ import { IRangeType, IWorkbookData, IWorksheetData } from '../types/interfaces';
|
|
|
5
5
|
import { UnitModel, UniverInstanceType } from '../common/unit';
|
|
6
6
|
import { Styles } from './styles';
|
|
7
7
|
import { Worksheet } from './worksheet';
|
|
8
|
-
|
|
9
8
|
export declare function getWorksheetUID(workbook: Workbook, worksheet: Worksheet): string;
|
|
10
9
|
/**
|
|
11
10
|
* Access and create Univer Sheets files
|
|
@@ -45,6 +44,7 @@ export declare class Workbook extends UnitModel<IWorkbookData, UniverInstanceTyp
|
|
|
45
44
|
save(): IWorkbookData;
|
|
46
45
|
static isIRangeType(range: IRangeType | IRangeType[]): boolean;
|
|
47
46
|
getSnapshot(): IWorkbookData;
|
|
47
|
+
/** @deprecated use use name property instead */
|
|
48
48
|
getName(): string;
|
|
49
49
|
setName(name: string): void;
|
|
50
50
|
getUnitId(): string;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
1
2
|
import { UnitModel, UniverInstanceType } from '../common/unit';
|
|
2
3
|
import { Nullable } from '../shared';
|
|
3
|
-
import { ISlideData, ISlidePage } from '../types/interfaces';
|
|
4
|
-
|
|
4
|
+
import { ISlideData, ISlidePage, PageType } from '../types/interfaces';
|
|
5
5
|
export declare class SlideDataModel extends UnitModel<ISlideData, UniverInstanceType.UNIVER_SLIDE> {
|
|
6
6
|
type: UniverInstanceType.UNIVER_SLIDE;
|
|
7
7
|
private readonly _activePage$;
|
|
8
8
|
private get _activePage();
|
|
9
|
-
readonly activePage$:
|
|
9
|
+
readonly activePage$: Observable<Nullable<ISlidePage>>;
|
|
10
|
+
private readonly _name$;
|
|
11
|
+
name$: Observable<string>;
|
|
10
12
|
private _snapshot;
|
|
11
13
|
private _unitId;
|
|
12
14
|
constructor(snapshot: Partial<ISlideData>);
|
|
15
|
+
setName(name: string): void;
|
|
13
16
|
getContainer(): string | undefined;
|
|
14
17
|
getSnapshot(): ISlideData;
|
|
15
18
|
getUnitId(): string;
|
|
@@ -23,8 +26,19 @@ export declare class SlideDataModel extends UnitModel<ISlideData, UniverInstance
|
|
|
23
26
|
} | undefined;
|
|
24
27
|
getElement(pageId: string, elementId: string): import('../types/interfaces').IPageElement | undefined;
|
|
25
28
|
getPageSize(): import('../shared').ISize;
|
|
26
|
-
|
|
29
|
+
getBlankPage(): {
|
|
30
|
+
id: string;
|
|
31
|
+
pageType: PageType;
|
|
32
|
+
zIndex: number;
|
|
33
|
+
title: string;
|
|
34
|
+
description: string;
|
|
35
|
+
pageBackgroundFill: {
|
|
36
|
+
rgb: string;
|
|
37
|
+
};
|
|
38
|
+
pageElements: {};
|
|
39
|
+
};
|
|
27
40
|
setActivePage(page: Nullable<ISlidePage>): void;
|
|
28
41
|
getActivePage(): Nullable<ISlidePage>;
|
|
29
42
|
updatePage(pageId: string, page: ISlidePage): void;
|
|
43
|
+
appendPage(page: ISlidePage): void;
|
|
30
44
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BooleanNumber, HorizontalAlign, TextDirection, VerticalAlign, WrapStrategy } from '../enum';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* Used as an illegal range array return value
|
|
5
4
|
*/
|
|
@@ -127,6 +126,7 @@ export declare const DEFAULT_STYLES: {
|
|
|
127
126
|
b: number;
|
|
128
127
|
l: number;
|
|
129
128
|
};
|
|
129
|
+
n: null;
|
|
130
130
|
};
|
|
131
131
|
export declare const DEFAULT_SLIDE: {
|
|
132
132
|
id: string;
|
|
@@ -4,7 +4,6 @@ import { Workbook } from '../../sheets/workbook';
|
|
|
4
4
|
import { ISelectionCellWithMergeInfo } from './i-selection-data';
|
|
5
5
|
import { IStyleData } from './i-style-data';
|
|
6
6
|
import { ICellDataForSheetInterceptor } from './i-cell-data';
|
|
7
|
-
|
|
8
7
|
export interface ICellRenderContext {
|
|
9
8
|
data: ICellDataForSheetInterceptor;
|
|
10
9
|
style: Nullable<IStyleData>;
|
|
@@ -4,7 +4,6 @@ import { DataValidationImeMode } from '../enum/data-validation-ime-mode';
|
|
|
4
4
|
import { DataValidationErrorStyle } from '../enum/data-validation-error-style';
|
|
5
5
|
import { DataValidationRenderMode } from '../enum/data-validation-render-mode';
|
|
6
6
|
import { IRange } from './i-range';
|
|
7
|
-
|
|
8
7
|
export interface IDataValidationRuleBase {
|
|
9
8
|
type: DataValidationType;
|
|
10
9
|
allowBlank?: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ICustomDecoration, ICustomRange } from './i-document-data';
|
|
2
|
-
|
|
1
|
+
import { ICustomDecoration, ICustomRange, IParagraph } from './i-document-data';
|
|
3
2
|
export interface ICustomRangeForInterceptor extends ICustomRange {
|
|
4
3
|
active?: boolean;
|
|
5
4
|
show?: boolean;
|
|
@@ -8,3 +7,7 @@ export interface ICustomDecorationForInterceptor extends ICustomDecoration {
|
|
|
8
7
|
active?: boolean;
|
|
9
8
|
show?: boolean;
|
|
10
9
|
}
|
|
10
|
+
export interface IParagraphRange extends IParagraph {
|
|
11
|
+
paragraphStart: number;
|
|
12
|
+
paragraphEnd: number;
|
|
13
|
+
}
|