@univerjs/core 0.1.10 → 0.1.12
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 +7 -7
- package/lib/es/index.js +670 -650
- package/lib/types/common/unit.d.ts +1 -1
- package/lib/types/docs/data-model/action-types.d.ts +1 -1
- package/lib/types/docs/data-model/apply-utils/update-apply.d.ts +1 -1
- package/lib/types/docs/data-model/document-data-model.d.ts +4 -5
- package/lib/types/docs/data-model/empty-snapshot.d.ts +1 -1
- package/lib/types/docs/data-model/text-x/text-x.d.ts +2 -2
- package/lib/types/docs/data-model/text-x/utils.d.ts +2 -2
- package/lib/types/observer/observable-hooks.d.ts +1 -1
- package/lib/types/services/command/command.service.d.ts +5 -3
- package/lib/types/services/context/context.service.d.ts +1 -1
- package/lib/types/services/floating-object/floating-object-manager.service.d.ts +3 -3
- package/lib/types/services/instance/instance.service.d.ts +7 -7
- package/lib/types/services/lifecycle/lifecycle.service.d.ts +4 -4
- package/lib/types/services/locale/locale.service.d.ts +6 -4
- package/lib/types/services/permission/permission.service.d.ts +4 -4
- package/lib/types/services/permission/univer.permission.service.d.ts +2 -2
- package/lib/types/services/plugin/plugin-holder.d.ts +5 -5
- package/lib/types/services/plugin/plugin.d.ts +3 -3
- package/lib/types/services/plugin/plugin.service.d.ts +3 -3
- package/lib/types/services/resource-loader/resource-loader.service.d.ts +5 -5
- package/lib/types/services/resource-loader/type.d.ts +1 -1
- package/lib/types/services/resource-manager/resource-manager.service.d.ts +2 -2
- package/lib/types/services/resource-manager/type.d.ts +3 -3
- package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +3 -3
- package/lib/types/services/snapshot/snapshot-server.service.d.ts +1 -1
- package/lib/types/services/snapshot/snapshot-transform.d.ts +4 -4
- package/lib/types/services/snapshot/snapshot-utils.d.ts +5 -5
- package/lib/types/services/theme/theme.service.d.ts +1 -1
- package/lib/types/services/undoredo/undoredo.service.d.ts +6 -6
- package/lib/types/services/user-manager/user-manager.service.d.ts +5 -0
- package/lib/types/shared/color/color.d.ts +1 -1
- package/lib/types/shared/common.d.ts +5 -5
- package/lib/types/shared/lifecycle.d.ts +3 -3
- package/lib/types/shared/object-matrix-query.d.ts +1 -1
- package/lib/types/shared/object-matrix.d.ts +1 -1
- package/lib/types/shared/rectangle.d.ts +1 -1
- package/lib/types/shared/rxjs.d.ts +1 -1
- package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +1 -1
- package/lib/types/sheets/column-manager.d.ts +2 -2
- package/lib/types/sheets/empty-snapshot.d.ts +1 -1
- package/lib/types/sheets/range.d.ts +4 -4
- package/lib/types/sheets/row-manager.d.ts +3 -3
- package/lib/types/sheets/styles.d.ts +1 -1
- package/lib/types/sheets/view-model.d.ts +3 -3
- package/lib/types/sheets/workbook.d.ts +6 -6
- package/lib/types/sheets/worksheet.d.ts +7 -7
- package/lib/types/slides/slide-model.d.ts +1 -2
- package/lib/types/types/enum/locale-type.d.ts +2 -1
- package/lib/types/types/interfaces/i-cell-custom-render.d.ts +3 -3
- package/lib/types/types/interfaces/i-cell-data.d.ts +5 -5
- package/lib/types/types/interfaces/i-cell-validation-data.d.ts +1 -1
- package/lib/types/types/interfaces/i-data-validation.d.ts +5 -5
- package/lib/types/types/interfaces/i-document-data.d.ts +10 -4
- package/lib/types/types/interfaces/i-extra-model-data.d.ts +0 -6
- package/lib/types/types/interfaces/i-selection-data.d.ts +1 -1
- package/lib/types/types/interfaces/i-shape-properties.d.ts +1 -1
- package/lib/types/types/interfaces/i-slide-data.d.ts +10 -10
- package/lib/types/types/interfaces/i-style-data.d.ts +3 -3
- package/lib/types/types/interfaces/i-univer-data.d.ts +4 -4
- package/lib/types/types/interfaces/i-workbook-data.d.ts +4 -4
- package/lib/types/types/interfaces/i-worksheet-data.d.ts +6 -6
- package/lib/types/univer.d.ts +7 -7
- package/lib/umd/index.js +9 -9
- package/package.json +8 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IDocumentBody } from '../../types/interfaces/i-document-data';
|
|
2
1
|
import { UpdateDocsAttributeType } from '../../shared/command-enum';
|
|
2
|
+
import { IDocumentBody } from '../../types/interfaces/i-document-data';
|
|
3
3
|
|
|
4
4
|
export declare enum TextXActionType {
|
|
5
5
|
RETAIN = "r",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IDocumentBody, ITextRun } from '../../../types/interfaces';
|
|
2
1
|
import { UpdateDocsAttributeType } from '../../../shared';
|
|
2
|
+
import { IDocumentBody, ITextRun } from '../../../types/interfaces';
|
|
3
3
|
|
|
4
4
|
export declare function updateAttribute(body: IDocumentBody, updateBody: IDocumentBody, textLength: number, currentIndex: number, coverType: UpdateDocsAttributeType): IDocumentBody;
|
|
5
5
|
export declare function coverTextRuns(updateDataTextRuns: ITextRun[], removeTextRuns: ITextRun[], coverType: UpdateDocsAttributeType): ITextRun[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TextXAction } from './action-types';
|
|
2
|
-
import { UnitModel, UniverInstanceType } from '../../common/unit';
|
|
3
|
-
import { IPaddingData } from '../../types/interfaces/i-style-data';
|
|
4
|
-
import { IDocumentBody, IDocumentData, IDocumentRenderConfig, IDocumentStyle } from '../../types/interfaces/i-document-data';
|
|
5
1
|
import { Nullable } from '../../shared';
|
|
2
|
+
import { IDocumentBody, IDocumentData, IDocumentRenderConfig, IDocumentStyle } from '../../types/interfaces/i-document-data';
|
|
3
|
+
import { IPaddingData } from '../../types/interfaces/i-style-data';
|
|
4
|
+
import { UnitModel, UniverInstanceType } from '../../common/unit';
|
|
5
|
+
import { TextXAction } from './action-types';
|
|
6
6
|
|
|
7
7
|
export declare const DEFAULT_DOC: {
|
|
8
8
|
id: string;
|
|
@@ -30,7 +30,6 @@ declare class DocumentDataModelSimple extends UnitModel<IDocumentData, UniverIns
|
|
|
30
30
|
getBody(): IDocumentBody | undefined;
|
|
31
31
|
getShouldRenderLoopImmediately(): boolean;
|
|
32
32
|
getContainer(): string | undefined;
|
|
33
|
-
getParentRenderUnitId(): string | undefined;
|
|
34
33
|
getSnapshot(): IDocumentData;
|
|
35
34
|
updateDocumentId(unitId: string): void;
|
|
36
35
|
updateDocumentRenderConfig(config: IDocumentRenderConfig): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDocumentData } from '../../types/interfaces';
|
|
2
1
|
import { LocaleType } from '../../types/enum/locale-type';
|
|
2
|
+
import { IDocumentData } from '../../types/interfaces';
|
|
3
3
|
|
|
4
4
|
export declare function getEmptySnapshot(unitID?: string, locale?: LocaleType, title?: string): IDocumentData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TextXAction } from '../action-types';
|
|
2
|
-
import { IDocumentBody } from '../../../types/interfaces/i-document-data';
|
|
3
1
|
import { UpdateDocsAttributeType } from '../../../shared/command-enum';
|
|
2
|
+
import { IDocumentBody } from '../../../types/interfaces/i-document-data';
|
|
3
|
+
import { TextXAction } from '../action-types';
|
|
4
4
|
|
|
5
5
|
export declare class TextX {
|
|
6
6
|
static compose(thisActions: TextXAction[], otherActions: TextXAction[]): TextXAction[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IRetainAction } from '../action-types';
|
|
2
|
-
import { IDocumentBody } from '../../../types/interfaces/i-document-data';
|
|
3
1
|
import { UpdateDocsAttributeType } from '../../../shared/command-enum';
|
|
2
|
+
import { IDocumentBody } from '../../../types/interfaces/i-document-data';
|
|
3
|
+
import { IRetainAction } from '../action-types';
|
|
4
4
|
|
|
5
5
|
export declare function getBodySlice(body: IDocumentBody, startOffset: number, endOffset: number): IDocumentBody;
|
|
6
6
|
export declare function composeBody(thisBody: IDocumentBody, otherBody: IDocumentBody, coverType?: UpdateDocsAttributeType): IDocumentBody;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ILogService } from '../log/log.service';
|
|
2
|
-
import { IContextService } from '../context/context.service';
|
|
3
1
|
import { IAccessor, IDisposable, Injector } from '@wendellhu/redi';
|
|
2
|
+
import { IContextService } from '../context/context.service';
|
|
3
|
+
import { ILogService } from '../log/log.service';
|
|
4
4
|
|
|
5
5
|
export declare enum CommandType {
|
|
6
6
|
/** Command could generate some operations or mutations. */
|
|
@@ -115,15 +115,17 @@ export declare const ICommandService: import('@wendellhu/redi').IdentifierDecora
|
|
|
115
115
|
*/
|
|
116
116
|
export declare class CommandRegistry {
|
|
117
117
|
private readonly _commands;
|
|
118
|
+
private readonly _commandTypes;
|
|
118
119
|
registerCommand(command: ICommand): IDisposable;
|
|
119
120
|
hasCommand(id: string): boolean;
|
|
120
121
|
getCommand(id: string): [ICommand] | null;
|
|
122
|
+
getCommandType(id: string): CommandType | undefined;
|
|
121
123
|
}
|
|
122
124
|
export declare const NilCommand: ICommand;
|
|
123
125
|
export declare class CommandService implements ICommandService {
|
|
124
126
|
private readonly _injector;
|
|
125
127
|
private readonly _logService;
|
|
126
|
-
|
|
128
|
+
protected readonly _commandRegistry: CommandRegistry;
|
|
127
129
|
private readonly _beforeCommandExecutionListeners;
|
|
128
130
|
private readonly _commandExecutedListeners;
|
|
129
131
|
private _multiCommandDisposables;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ITransformState } from './floating-object-interfaces';
|
|
2
|
-
import { Nullable } from '../../common/type-util';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
1
|
import { IDisposable } from '@wendellhu/redi';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Nullable } from '../../common/type-util';
|
|
4
|
+
import { ITransformState } from './floating-object-interfaces';
|
|
5
5
|
|
|
6
6
|
export declare const DEFAULT_DOCUMENT_SUB_COMPONENT_ID = "__default_document_sub_component_id20231101__";
|
|
7
7
|
export interface IFloatingObjectManagerSearchParam {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { UnitModel, UnitType, UniverInstanceType } from '../../common/unit';
|
|
2
|
-
import { IContextService } from '../context/context.service';
|
|
3
|
-
import { Workbook } from '../../sheets/workbook';
|
|
4
|
-
import { Disposable } from '../../shared/lifecycle';
|
|
5
|
-
import { Nullable } from '../../shared';
|
|
6
|
-
import { DocumentDataModel } from '../../docs/data-model/document-data-model';
|
|
7
|
-
import { Observable } from 'rxjs';
|
|
8
1
|
import { IDisposable, Injector } from '@wendellhu/redi';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { DocumentDataModel } from '../../docs/data-model/document-data-model';
|
|
4
|
+
import { Nullable } from '../../shared';
|
|
5
|
+
import { Disposable } from '../../shared/lifecycle';
|
|
6
|
+
import { Workbook } from '../../sheets/workbook';
|
|
7
|
+
import { IContextService } from '../context/context.service';
|
|
8
|
+
import { UnitModel, UnitType, UniverInstanceType } from '../../common/unit';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* IUniverInstanceService holds all the current univer instances and provides a set of
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LifecycleStages } from './lifecycle';
|
|
2
|
-
import { ILogService } from '../log/log.service';
|
|
3
|
-
import { Disposable } from '../../shared/lifecycle';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
1
|
import { Injector } from '@wendellhu/redi';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Disposable } from '../../shared/lifecycle';
|
|
4
|
+
import { ILogService } from '../log/log.service';
|
|
5
|
+
import { LifecycleStages } from './lifecycle';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* This service controls the lifecycle of a Univer instance. Other modules can
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { LocaleType } from '../../types/enum/locale-type';
|
|
2
|
-
import { ILanguagePack, ILocales, LanguageValue } from '../../shared/locale';
|
|
3
|
-
import { Disposable } from '../../shared/lifecycle';
|
|
4
1
|
import { Subject } from 'rxjs';
|
|
2
|
+
import { Disposable } from '../../shared/lifecycle';
|
|
3
|
+
import { ILanguagePack, ILocales, LanguageValue } from '../../shared/locale';
|
|
4
|
+
import { LocaleType } from '../../types/enum/locale-type';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* This service provides i18n and timezone / location features to other modules.
|
|
8
8
|
*/
|
|
9
9
|
export declare class LocaleService extends Disposable {
|
|
10
|
-
private _currentLocale
|
|
10
|
+
private _currentLocale$;
|
|
11
|
+
readonly currentLocale$: import('rxjs').Observable<LocaleType>;
|
|
12
|
+
private get _currentLocale();
|
|
11
13
|
private _locales;
|
|
12
14
|
localeChanged$: Subject<void>;
|
|
13
15
|
constructor();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IResourceManagerService } from '../resource-manager/type';
|
|
2
|
-
import { IUniverInstanceService } from '../instance/instance.service';
|
|
3
|
-
import { Nullable } from '../../shared/types';
|
|
4
|
-
import { PermissionPoint, Disposable } from '../../shared';
|
|
5
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { PermissionPoint, Disposable } from '../../shared';
|
|
3
|
+
import { Nullable } from '../../shared/types';
|
|
4
|
+
import { IUniverInstanceService } from '../instance/instance.service';
|
|
5
|
+
import { IResourceManagerService } from '../resource-manager/type';
|
|
6
6
|
|
|
7
7
|
export interface IPermissionService {
|
|
8
8
|
deletePermissionPoint(unitID: string, id: string): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IPermissionService } from './permission.service';
|
|
2
|
-
import { IUniverInstanceService } from '../instance/instance.service';
|
|
3
1
|
import { Disposable } from '../../shared';
|
|
2
|
+
import { IUniverInstanceService } from '../instance/instance.service';
|
|
3
|
+
import { IPermissionService } from './permission.service';
|
|
4
4
|
|
|
5
5
|
export declare class UniverPermissionService extends Disposable {
|
|
6
6
|
private _permissionService;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Plugin, PluginCtor, PluginRegistry, PluginStore } from './plugin';
|
|
2
|
-
import { ILogService } from '../log/log.service';
|
|
3
|
-
import { Disposable } from '../../shared/lifecycle';
|
|
4
|
-
import { LifecycleInitializerService, LifecycleService } from '../lifecycle/lifecycle.service';
|
|
5
|
-
import { LifecycleStages } from '../lifecycle/lifecycle';
|
|
6
1
|
import { Injector } from '@wendellhu/redi';
|
|
2
|
+
import { LifecycleStages } from '../lifecycle/lifecycle';
|
|
3
|
+
import { LifecycleInitializerService, LifecycleService } from '../lifecycle/lifecycle.service';
|
|
4
|
+
import { Disposable } from '../../shared/lifecycle';
|
|
5
|
+
import { ILogService } from '../log/log.service';
|
|
6
|
+
import { Plugin, PluginCtor, PluginRegistry, PluginStore } from './plugin';
|
|
7
7
|
|
|
8
8
|
export declare class PluginHolder extends Disposable {
|
|
9
9
|
protected readonly _logService: ILogService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UniverInstanceType } from '../../common/unit';
|
|
2
|
-
import { Disposable } from '../../shared';
|
|
3
1
|
import { Ctor, Injector } from '@wendellhu/redi';
|
|
2
|
+
import { Disposable } from '../../shared';
|
|
3
|
+
import { UniverInstanceType } from '../../common/unit';
|
|
4
4
|
|
|
5
5
|
export type PluginCtor<T extends Plugin> = Ctor<T> & {
|
|
6
6
|
type: UniverInstanceType;
|
|
@@ -13,7 +13,7 @@ export declare abstract class Plugin extends Disposable {
|
|
|
13
13
|
static pluginName: string;
|
|
14
14
|
static type: UniverInstanceType;
|
|
15
15
|
protected abstract _injector: Injector;
|
|
16
|
-
onStarting(
|
|
16
|
+
onStarting(_injector: Injector): void;
|
|
17
17
|
onReady(): void;
|
|
18
18
|
onRendered(): void;
|
|
19
19
|
onSteady(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Plugin, PluginCtor } from './plugin';
|
|
2
|
-
import { PluginHolder } from './plugin-holder';
|
|
3
|
-
import { UnitType, UniverInstanceType } from '../../common/unit';
|
|
4
1
|
import { IDisposable, Injector } from '@wendellhu/redi';
|
|
2
|
+
import { UnitType, UniverInstanceType } from '../../common/unit';
|
|
3
|
+
import { PluginHolder } from './plugin-holder';
|
|
4
|
+
import { Plugin, PluginCtor } from './plugin';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* This service manages plugin registration.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IResourceLoaderService } from './type';
|
|
2
|
-
import { Disposable } from '../../shared/lifecycle';
|
|
3
|
-
import { IUniverInstanceService } from '../instance/instance.service';
|
|
4
|
-
import { IResourceManagerService } from '../resource-manager/type';
|
|
5
|
-
import { IWorkbookData } from '../../types/interfaces';
|
|
6
1
|
import { Workbook } from '../../sheets/workbook';
|
|
2
|
+
import { IWorkbookData } from '../../types/interfaces';
|
|
3
|
+
import { IResourceManagerService } from '../resource-manager/type';
|
|
4
|
+
import { IUniverInstanceService } from '../instance/instance.service';
|
|
5
|
+
import { Disposable } from '../../shared/lifecycle';
|
|
6
|
+
import { IResourceLoaderService } from './type';
|
|
7
7
|
|
|
8
8
|
export declare class ResourceLoaderService extends Disposable implements IResourceLoaderService {
|
|
9
9
|
private readonly _resourceManagerService;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
2
1
|
import { Workbook } from '../../sheets/workbook';
|
|
2
|
+
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
3
3
|
|
|
4
4
|
export interface IResourceLoaderService {
|
|
5
5
|
saveWorkbook: (workbook: Workbook) => IWorkbookData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IResourceHook, IResourceManagerService, IResourceName } from './type';
|
|
2
|
-
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
3
1
|
import { Disposable } from '../../shared/lifecycle';
|
|
2
|
+
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
3
|
+
import { IResourceHook, IResourceManagerService, IResourceName } from './type';
|
|
4
4
|
|
|
5
5
|
export declare class ResourceManagerService extends Disposable implements IResourceManagerService {
|
|
6
6
|
private _resourceMap;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
2
|
-
import { UniverInstanceType } from '@univerjs/core';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
1
|
import { IDisposable } from '@wendellhu/redi';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { UniverInstanceType } from '@univerjs/core';
|
|
4
|
+
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
5
5
|
|
|
6
6
|
type IBusinessName = 'SHEET' | 'DOC';
|
|
7
7
|
export type IResourceName = `${IBusinessName}_${string}_PLUGIN`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ISnapshotServerService } from '../snapshot-server.service';
|
|
2
|
-
import { ILogContext } from '../../log/context';
|
|
3
|
-
import { IWorkbookData } from '../../../types/interfaces/i-workbook-data';
|
|
4
1
|
import { IFetchMissingChangesetsRequest, IFetchMissingChangesetsResponse, IGetResourcesRequest, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetRequest, ISaveChangesetResponse, ISaveSheetBlockRequest, ISaveSheetBlockResponse, ISaveSnapshotRequest, ISaveSnapshotResponse, ISheetBlock, ISnapshot } from '@univerjs/protocol';
|
|
2
|
+
import { IWorkbookData } from '../../../types/interfaces/i-workbook-data';
|
|
3
|
+
import { ILogContext } from '../../log/context';
|
|
4
|
+
import { ISnapshotServerService } from '../snapshot-server.service';
|
|
5
5
|
|
|
6
6
|
export declare const testSnapshot: () => ISnapshot;
|
|
7
7
|
export declare const testSheetBlocks: () => ISheetBlock[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ILogContext } from '../log/context';
|
|
2
1
|
import { IFetchMissingChangesetsRequest, IFetchMissingChangesetsResponse, IGetResourcesRequest, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetRequest, ISaveChangesetResponse, ISaveSheetBlockRequest, ISaveSheetBlockResponse, ISaveSnapshotRequest, ISaveSnapshotResponse } from '@univerjs/protocol';
|
|
2
|
+
import { ILogContext } from '../log/context';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* It provides implementations for server side controllers to load or save
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ISnapshotServerService } from './snapshot-server.service';
|
|
2
|
-
import { IDocumentData } from '../../types/interfaces/i-document-data';
|
|
3
|
-
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
4
|
-
import { ILogContext } from '../log/context';
|
|
5
1
|
import { ISheetBlock, ISnapshot } from '@univerjs/protocol';
|
|
2
|
+
import { ILogContext } from '../log/context';
|
|
3
|
+
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
4
|
+
import { IDocumentData } from '../../types/interfaces/i-document-data';
|
|
5
|
+
import { ISnapshotServerService } from './snapshot-server.service';
|
|
6
6
|
|
|
7
7
|
export declare function generateTemporarySnap(context: ILogContext, workbook: IWorkbookData, unitID: string, rev: number, snapshotService: ISnapshotServerService): Promise<{
|
|
8
8
|
snapshotRes: ISnapshot;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IObjectMatrixPrimitiveType } from '../../shared/object-matrix';
|
|
2
|
-
import { ICellData } from '../../types/interfaces/i-cell-data';
|
|
3
|
-
import { IDocumentData } from '../../types/interfaces/i-document-data';
|
|
4
|
-
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
5
|
-
import { IWorksheetData } from '../../types/interfaces/i-worksheet-data';
|
|
6
1
|
import { ISheetBlock } from '@univerjs/protocol';
|
|
2
|
+
import { IWorksheetData } from '../../types/interfaces/i-worksheet-data';
|
|
3
|
+
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
4
|
+
import { IDocumentData } from '../../types/interfaces/i-document-data';
|
|
5
|
+
import { ICellData } from '../../types/interfaces/i-cell-data';
|
|
6
|
+
import { IObjectMatrixPrimitiveType } from '../../shared/object-matrix';
|
|
7
7
|
|
|
8
8
|
export declare const textEncoder: TextEncoder;
|
|
9
9
|
export declare const textDecoder: TextDecoder;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Nullable } from '../../common/type-util';
|
|
2
|
-
import { IUniverInstanceService } from '../instance/instance.service';
|
|
3
|
-
import { IContextService } from '../context/context.service';
|
|
4
|
-
import { IMutationInfo, CommandType, ICommandService } from '../command/command.service';
|
|
5
|
-
import { Disposable } from '../../shared/lifecycle';
|
|
6
|
-
import { Observable, BehaviorSubject } from 'rxjs';
|
|
7
1
|
import { IAccessor, IDisposable } from '@wendellhu/redi';
|
|
2
|
+
import { Observable, BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { Disposable } from '../../shared/lifecycle';
|
|
4
|
+
import { IMutationInfo, CommandType, ICommandService } from '../command/command.service';
|
|
5
|
+
import { IContextService } from '../context/context.service';
|
|
6
|
+
import { IUniverInstanceService } from '../instance/instance.service';
|
|
7
|
+
import { Nullable } from '../../common/type-util';
|
|
8
8
|
|
|
9
9
|
export interface IUndoRedoItem {
|
|
10
10
|
/** unitID maps to unitId for UniverSheet / UniverDoc / UniverSlide */
|
|
@@ -9,6 +9,11 @@ export declare class UserManagerService {
|
|
|
9
9
|
} | {
|
|
10
10
|
type: 'clear';
|
|
11
11
|
}>;
|
|
12
|
+
private _currentUser;
|
|
13
|
+
private _currentUser$;
|
|
14
|
+
currentUser$: import('rxjs').Observable<IUser | null>;
|
|
15
|
+
getCurrentUser(): IUser | null;
|
|
16
|
+
setCurrentUser(user: IUser): void;
|
|
12
17
|
addUser(user: IUser): void;
|
|
13
18
|
getUser(userId: string, callBack?: () => void): IUser | undefined;
|
|
14
19
|
delete(userId: string): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
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
1
|
import { IRange } from '../types/interfaces';
|
|
2
|
+
import { ICellData } from '../types/interfaces/i-cell-data';
|
|
3
|
+
import { IDocumentData } from '../types/interfaces/i-document-data';
|
|
4
|
+
import { IRangeWithCoord, ISelectionCell, ISelectionCellWithCoord } from '../types/interfaces/i-selection-data';
|
|
5
|
+
import { IColorStyle, IStyleData } from '../types/interfaces/i-style-data';
|
|
6
|
+
import { Nullable } from './types';
|
|
7
7
|
|
|
8
8
|
export declare function makeCellToSelection(cellInfo: Nullable<ISelectionCellWithCoord>): Nullable<IRangeWithCoord>;
|
|
9
9
|
export declare function makeCellRangeToRangeData(cellInfo: Nullable<ISelectionCell>): Nullable<IRange>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Observer } from '../observer/observable';
|
|
2
|
-
import { Nullable } from '../common/type-util';
|
|
3
|
-
import { Subscription, SubscriptionLike, Subject } from 'rxjs';
|
|
4
1
|
import { IDisposable } from '@wendellhu/redi';
|
|
2
|
+
import { Subscription, SubscriptionLike, Subject } from 'rxjs';
|
|
3
|
+
import { Nullable } from '../common/type-util';
|
|
4
|
+
import { Observer } from '../observer/observable';
|
|
5
5
|
|
|
6
6
|
type DisposableLike = IDisposable | Nullable<Observer<any>> | SubscriptionLike | (() => void);
|
|
7
7
|
export declare function toDisposable(disposable: IDisposable): IDisposable;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
1
|
import { IDisposable } from '@wendellhu/redi';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
3
|
|
|
4
4
|
type CallbackFn<T extends readonly unknown[]> = (cb: (...args: T) => void) => IDisposable;
|
|
5
5
|
export declare function fromCallback<T extends readonly unknown[]>(callback: CallbackFn<T>): Observable<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
2
1
|
import { Univer } from '../../univer';
|
|
2
|
+
import { IWorkbookData } from '../../types/interfaces/i-workbook-data';
|
|
3
3
|
|
|
4
4
|
export declare function createCoreTestBed(workbookData?: IWorkbookData): {
|
|
5
5
|
univer: Univer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IColumnData, IRange, IWorksheetData } from '../types/interfaces';
|
|
2
|
-
import { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
3
1
|
import { Nullable } from '../common/type-util';
|
|
2
|
+
import { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
3
|
+
import { IColumnData, IRange, IWorksheetData } from '../types/interfaces';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Manage configuration information of all columns, get column width, column length, set column width, etc.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IWorkbookData } from '../types/interfaces';
|
|
2
1
|
import { LocaleType } from '../types/enum/locale-type';
|
|
2
|
+
import { IWorkbookData } from '../types/interfaces';
|
|
3
3
|
|
|
4
4
|
export declare function getEmptySnapshot(unitID?: string, locale?: LocaleType, name?: string): IWorkbookData;
|
|
@@ -1,8 +1,8 @@
|
|
|
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
1
|
import { IObjectMatrixPrimitiveType, Nullable, ObjectMatrix } from '../shared';
|
|
2
|
+
import { HorizontalAlign, VerticalAlign, WrapStrategy, BooleanNumber, FontItalic, FontWeight } from '../types/enum';
|
|
3
|
+
import { IBorderData, ICellData, IDocumentBody, IDocumentData, IRange, IStyleBase, IStyleData, ITextDecoration, ITextRotation } from '../types/interfaces';
|
|
4
|
+
import { Styles } from './styles';
|
|
5
|
+
import { Worksheet } from './worksheet';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* getObjectValues options type
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SheetViewModel } from './view-model';
|
|
2
|
-
import { IRange, IRowData, IWorksheetData } from '../types/interfaces';
|
|
3
|
-
import { Nullable } from '../shared/types';
|
|
4
1
|
import { IObjectArrayPrimitiveType } from '../shared/object-matrix';
|
|
2
|
+
import { Nullable } from '../shared/types';
|
|
3
|
+
import { IRange, IRowData, IWorksheetData } from '../types/interfaces';
|
|
4
|
+
import { SheetViewModel } from './view-model';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Manage configuration information of all rows, get row height, row length, set row height, etc.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ICellDataForSheetInterceptor, IStyleData } from '../types/interfaces';
|
|
2
1
|
import { IKeyType, Nullable } from '../shared';
|
|
2
|
+
import { ICellDataForSheetInterceptor, IStyleData } from '../types/interfaces';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Styles in a workbook, cells locate styles based on style IDs
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ICellData, ICellDataForSheetInterceptor } from '../types/interfaces/i-cell-data';
|
|
2
|
-
import { Disposable } from '../shared/lifecycle';
|
|
3
|
-
import { Nullable } from '../common/type-util';
|
|
4
1
|
import { IDisposable } from '@wendellhu/redi';
|
|
2
|
+
import { Nullable } from '../common/type-util';
|
|
3
|
+
import { Disposable } from '../shared/lifecycle';
|
|
4
|
+
import { ICellData, ICellDataForSheetInterceptor } from '../types/interfaces/i-cell-data';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Worksheet } from './worksheet';
|
|
2
|
-
import { Styles } from './styles';
|
|
3
|
-
import { UnitModel, UniverInstanceType } from '../common/unit';
|
|
4
|
-
import { IGridRange, IRangeType, IWorkbookData, IWorksheetData } from '../types/interfaces';
|
|
5
|
-
import { Nullable } from '../shared';
|
|
6
1
|
import { ILogService } from '../services/log/log.service';
|
|
2
|
+
import { Nullable } from '../shared';
|
|
3
|
+
import { IGridRange, IRangeType, IWorkbookData, IWorksheetData } from '../types/interfaces';
|
|
4
|
+
import { UnitModel, UniverInstanceType } from '../common/unit';
|
|
5
|
+
import { Styles } from './styles';
|
|
6
|
+
import { Worksheet } from './worksheet';
|
|
7
7
|
|
|
8
8
|
export declare function getWorksheetUID(workbook: Workbook, worksheet: Worksheet): string;
|
|
9
9
|
/**
|
|
@@ -43,6 +43,7 @@ export declare class Workbook extends UnitModel<IWorkbookData, UniverInstanceTyp
|
|
|
43
43
|
static isIRangeType(range: IRangeType | IRangeType[]): boolean;
|
|
44
44
|
getSnapshot(): IWorkbookData;
|
|
45
45
|
getName(): string;
|
|
46
|
+
setName(name: string): void;
|
|
46
47
|
getUnitId(): string;
|
|
47
48
|
getRev(): number;
|
|
48
49
|
incrementRev(): void;
|
|
@@ -52,7 +53,6 @@ export declare class Workbook extends UnitModel<IWorkbookData, UniverInstanceTyp
|
|
|
52
53
|
* Add a Worksheet into Workbook.
|
|
53
54
|
*/
|
|
54
55
|
addWorksheet(id: string, index: number, worksheetSnapshot: Partial<IWorksheetData>): boolean;
|
|
55
|
-
getParentRenderUnitId(): string | undefined;
|
|
56
56
|
getSheetOrders(): Readonly<string[]>;
|
|
57
57
|
getWorksheets(): Map<string, Worksheet>;
|
|
58
58
|
getActiveSpreadsheet(): Workbook;
|
|
@@ -1,11 +1,11 @@
|
|
|
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
1
|
import { Nullable, ObjectMatrix } from '../shared';
|
|
2
|
+
import { BooleanNumber } from '../types/enum';
|
|
3
|
+
import { ICellData, ICellDataForSheetInterceptor, IFreeze, IRange, IWorksheetData } from '../types/interfaces';
|
|
4
|
+
import { ColumnManager } from './column-manager';
|
|
5
|
+
import { Range } from './range';
|
|
6
|
+
import { RowManager } from './row-manager';
|
|
7
|
+
import { Styles } from './styles';
|
|
8
|
+
import { SheetViewModel } from './view-model';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* The model of a Worksheet.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ISlideData, ISlidePage } from '../types/interfaces';
|
|
2
1
|
import { UnitModel, UniverInstanceType } from '../common/unit';
|
|
2
|
+
import { ISlideData, ISlidePage } from '../types/interfaces';
|
|
3
3
|
|
|
4
4
|
export declare class SlideDataModel extends UnitModel<ISlideData, UniverInstanceType.UNIVER_SLIDE> {
|
|
5
5
|
type: UniverInstanceType.UNIVER_SLIDE;
|
|
@@ -7,7 +7,6 @@ export declare class SlideDataModel extends UnitModel<ISlideData, UniverInstance
|
|
|
7
7
|
private _unitId;
|
|
8
8
|
constructor(snapshot: Partial<ISlideData>);
|
|
9
9
|
getContainer(): string | undefined;
|
|
10
|
-
getParentRenderUnitId(): string | undefined;
|
|
11
10
|
getSnapshot(): ISlideData;
|
|
12
11
|
getUnitId(): string;
|
|
13
12
|
getPages(): {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ICellDataForSheetInterceptor } from './i-cell-data';
|
|
2
|
-
import { IStyleData } from './i-style-data';
|
|
3
|
-
import { ISelectionCellWithCoord } from './i-selection-data';
|
|
4
1
|
import { Nullable } from '../../shared';
|
|
2
|
+
import { ISelectionCellWithCoord } from './i-selection-data';
|
|
3
|
+
import { IStyleData } from './i-style-data';
|
|
4
|
+
import { ICellDataForSheetInterceptor } from './i-cell-data';
|
|
5
5
|
|
|
6
6
|
export interface ICellRenderContext {
|
|
7
7
|
data: ICellDataForSheetInterceptor;
|