@univerjs/core 0.1.9 → 0.1.11
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 +1319 -1286
- 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/docs/data-model/types.d.ts +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/observer/observable-hooks.d.ts +1 -1
- package/lib/types/services/command/command.service.d.ts +2 -2
- package/lib/types/services/context/context.service.d.ts +1 -1
- package/lib/types/services/floating-object/floating-object-manager.service.d.ts +6 -6
- 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 +3 -3
- 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/__tests__/plugin-override.spec.d.ts +16 -0
- package/lib/types/services/plugin/plugin-holder.d.ts +5 -5
- package/lib/types/services/plugin/plugin-override.d.ts +4 -3
- 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 +16 -0
- package/lib/types/shared/after-init-apply.d.ts +3 -0
- package/lib/types/shared/color/color.d.ts +1 -1
- package/lib/types/shared/common.d.ts +5 -5
- package/lib/types/shared/index.d.ts +1 -0
- 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 +23 -18
- 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 +8 -8
- 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;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export { type IStyleSheet, ThemeService } from './services/theme/theme.service';
|
|
|
59
59
|
export { type IUndoRedoCommandInfos, type IUndoRedoCommandInfosByInterceptor, type IUndoRedoItem, IUndoRedoService, type IUndoRedoStatus, LocalUndoRedoService, RedoCommand, UndoCommand, RedoCommandId, UndoCommandId, } from './services/undoredo/undoredo.service';
|
|
60
60
|
export * from './shared';
|
|
61
61
|
export { fromCallback } from './shared/rxjs';
|
|
62
|
+
export { UserManagerService } from './services/user-manager/user-manager.service';
|
|
62
63
|
export type { IComposeInterceptors, IInterceptor, InterceptorHandler } from './common/interceptor';
|
|
63
64
|
export { composeInterceptors, createInterceptorKey, InterceptorManager } from './common/interceptor';
|
|
64
65
|
export { normalizeTextRuns } from './docs/data-model/apply-utils/common';
|
|
@@ -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. */
|
|
@@ -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 {
|
|
@@ -12,6 +12,7 @@ export interface IFloatingObjectManagerSearchItemParam extends IFloatingObjectMa
|
|
|
12
12
|
floatingObjectId: string;
|
|
13
13
|
}
|
|
14
14
|
export interface IFloatingObjectManagerParam extends IFloatingObjectManagerSearchItemParam {
|
|
15
|
+
behindText?: boolean;
|
|
15
16
|
floatingObject: ITransformState;
|
|
16
17
|
}
|
|
17
18
|
export type FloatingObjects = Map<string, ITransformState>;
|
|
@@ -26,8 +27,7 @@ export interface IFloatingObjectManagerService {
|
|
|
26
27
|
clear(search: IFloatingObjectManagerSearchParam): void;
|
|
27
28
|
addOrUpdate(insertParam: IFloatingObjectManagerParam): void;
|
|
28
29
|
remove(searchItem: IFloatingObjectManagerSearchItemParam): void;
|
|
29
|
-
|
|
30
|
-
remove(searchItem: IFloatingObjectManagerSearchItemParam): void;
|
|
30
|
+
batchAddOrUpdate(insertParam: IFloatingObjectManagerParam[]): void;
|
|
31
31
|
pluginUpdateRefresh(searchObjects: IFloatingObjectManagerParam[]): void;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
@@ -70,7 +70,7 @@ export declare class FloatingObjectManagerService implements IDisposable, IFloat
|
|
|
70
70
|
dispose(): void;
|
|
71
71
|
clear(search: IFloatingObjectManagerSearchParam): void;
|
|
72
72
|
addOrUpdate(insertParam: IFloatingObjectManagerParam): void;
|
|
73
|
-
|
|
73
|
+
batchAddOrUpdate(insertParams: IFloatingObjectManagerParam[]): void;
|
|
74
74
|
remove(searchItem: IFloatingObjectManagerSearchItemParam): void;
|
|
75
75
|
pluginUpdateRefresh(updateObjects: IFloatingObjectManagerParam[]): void;
|
|
76
76
|
private _getFloatingObjects;
|
|
@@ -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,7 +1,7 @@
|
|
|
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.
|
|
@@ -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;
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export {};
|
|
@@ -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,8 +1,9 @@
|
|
|
1
|
-
import { Dependency,
|
|
1
|
+
import { Dependency, DependencyIdentifier, DependencyItem } from '@wendellhu/redi';
|
|
2
2
|
|
|
3
|
+
export type NullableDependencyPair<T> = [DependencyIdentifier<T>, DependencyItem<T> | null];
|
|
3
4
|
/**
|
|
4
|
-
* Overrides the dependencies
|
|
5
|
+
* Overrides the dependencies defined in the plugin. Only dependencies that are identified by `IdentifierDecorator` can be overridden.
|
|
5
6
|
* If you override a dependency with `null`, the original dependency will be removed.
|
|
6
7
|
*/
|
|
7
|
-
export type DependencyOverride =
|
|
8
|
+
export type DependencyOverride = NullableDependencyPair<any>[];
|
|
8
9
|
export declare function mergeOverrideWithDependencies(dependencies: Dependency[], override?: DependencyOverride): Dependency[];
|
|
@@ -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 */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IUser } from '@univerjs/protocol';
|
|
2
|
+
|
|
3
|
+
export declare class UserManagerService {
|
|
4
|
+
private _model;
|
|
5
|
+
private _userChange$;
|
|
6
|
+
userChange$: import('rxjs').Observable<{
|
|
7
|
+
type: 'add' | 'delete';
|
|
8
|
+
user: IUser;
|
|
9
|
+
} | {
|
|
10
|
+
type: 'clear';
|
|
11
|
+
}>;
|
|
12
|
+
addUser(user: IUser): void;
|
|
13
|
+
getUser(userId: string, callBack?: () => void): IUser | undefined;
|
|
14
|
+
delete(userId: string): void;
|
|
15
|
+
clear(): void;
|
|
16
|
+
}
|
|
@@ -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
|