@univerjs/core 0.1.4 → 0.1.6
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/README.md +22 -0
- package/lib/cjs/index.js +8 -8
- package/lib/es/index.js +3059 -2952
- package/lib/types/basics/plugin-holder.d.ts +5 -19
- package/lib/types/basics/univer-doc.d.ts +5 -19
- package/lib/types/basics/univer-sheet.d.ts +5 -20
- package/lib/types/basics/univer-slide.d.ts +5 -19
- package/lib/types/basics/univer.d.ts +9 -23
- package/lib/types/common/equal.d.ts +20 -0
- package/lib/types/common/interceptor.d.ts +2 -16
- package/lib/types/docs/data-model/action-types.d.ts +3 -17
- package/lib/types/docs/data-model/apply-utils/common.d.ts +2 -16
- package/lib/types/docs/data-model/apply-utils/delete-apply.d.ts +2 -16
- package/lib/types/docs/data-model/apply-utils/insert-apply.d.ts +2 -16
- package/lib/types/docs/data-model/apply-utils/update-apply.d.ts +2 -16
- package/lib/types/docs/data-model/document-data-model.d.ts +8 -22
- package/lib/types/docs/data-model/empty-snapshot.d.ts +2 -16
- package/lib/types/docs/data-model/preset-list-type.d.ts +1 -15
- package/lib/types/docs/data-model/replacement.d.ts +2 -16
- package/lib/types/docs/data-model/text-x/action-iterator.d.ts +2 -17
- package/lib/types/docs/data-model/text-x/text-x.d.ts +4 -18
- package/lib/types/docs/data-model/text-x/utils.d.ts +3 -17
- package/lib/types/index.d.ts +11 -1
- package/lib/types/observer/observable-hooks.d.ts +3 -18
- package/lib/types/observer/observable.d.ts +2 -16
- package/lib/types/plugin/plugin.d.ts +2 -16
- package/lib/types/services/command/command.service.d.ts +6 -21
- package/lib/types/services/config/config.service.d.ts +3 -17
- package/lib/types/services/context/context.service.d.ts +3 -17
- package/lib/types/services/error/error.service.d.ts +2 -16
- package/lib/types/services/floating-object/floating-object-manager.service.d.ts +6 -20
- package/lib/types/services/instance/instance.service.d.ts +9 -23
- package/lib/types/services/lifecycle/lifecycle.d.ts +33 -17
- package/lib/types/services/lifecycle/lifecycle.service.d.ts +5 -19
- package/lib/types/services/local-storage/local-storage.service.d.ts +1 -1
- package/lib/types/services/locale/locale.service.d.ts +5 -18
- package/lib/types/services/log/log.service.d.ts +2 -16
- package/lib/types/services/permission/permission-point.d.ts +1 -15
- package/lib/types/services/permission/permission.service.d.ts +6 -21
- package/lib/types/services/permission/univer.permission.service.d.ts +3 -17
- package/lib/types/services/resource-manager/resource-manager.service.d.ts +4 -18
- package/lib/types/services/resource-manager/type.d.ts +7 -21
- package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +5 -19
- package/lib/types/services/snapshot/snapshot-server.service.d.ts +4 -18
- package/lib/types/services/snapshot/snapshot-transform.d.ts +6 -20
- package/lib/types/services/snapshot/snapshot-utils.d.ts +7 -21
- package/lib/types/services/theme/theme.service.d.ts +2 -16
- package/lib/types/services/undoredo/undoredo.service.d.ts +18 -24
- package/lib/types/shared/__test__/common.spec.d.ts +16 -0
- package/lib/types/shared/color/color.d.ts +2 -16
- package/lib/types/shared/common.d.ts +15 -22
- package/lib/types/shared/compare.d.ts +2 -16
- package/lib/types/shared/doc-tool.d.ts +2 -16
- package/lib/types/shared/index.d.ts +1 -0
- package/lib/types/shared/lifecycle.d.ts +5 -20
- package/lib/types/shared/lru/lru-map.d.ts +2 -16
- package/lib/types/shared/object-matrix-query.d.ts +4 -0
- package/lib/types/shared/object-matrix.d.ts +5 -18
- package/lib/types/shared/props-from.d.ts +2 -16
- package/lib/types/shared/rectangle.d.ts +4 -18
- package/lib/types/shared/ref-alias.d.ts +8 -1
- package/lib/types/shared/rxjs.d.ts +2 -16
- package/lib/types/shared/tools.d.ts +4 -16
- package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +9 -23
- package/lib/types/sheets/column-manager.d.ts +4 -18
- package/lib/types/sheets/empty-snapshot.d.ts +4 -0
- package/lib/types/sheets/range.d.ts +6 -22
- package/lib/types/sheets/row-manager.d.ts +4 -18
- package/lib/types/sheets/sheet-snapshot-utils.d.ts +2 -16
- package/lib/types/sheets/styles.d.ts +3 -17
- package/lib/types/sheets/view-model.d.ts +10 -24
- package/lib/types/sheets/workbook.d.ts +9 -23
- package/lib/types/sheets/worksheet.d.ts +8 -23
- package/lib/types/slides/domain/slide-model.d.ts +5 -19
- package/lib/types/types/const/const.d.ts +1 -20
- package/lib/types/types/enum/data-validation-error-style.d.ts +20 -0
- package/lib/types/types/enum/data-validation-ime-mode.d.ts +28 -0
- package/lib/types/types/enum/data-validation-operator.d.ts +25 -0
- package/lib/types/types/enum/data-validation-render-mode.d.ts +20 -0
- package/lib/types/types/enum/data-validation-status.d.ts +20 -0
- package/lib/types/types/enum/data-validation-type.d.ts +36 -0
- package/lib/types/types/enum/interpolation-point-type.d.ts +3 -3
- package/lib/types/types/interfaces/i-cell-custom-render.d.ts +28 -0
- package/lib/types/types/interfaces/i-cell-data.d.ts +20 -18
- package/lib/types/types/interfaces/i-cell-validation-data.d.ts +9 -0
- package/lib/types/types/interfaces/i-column-data.d.ts +2 -16
- package/lib/types/types/interfaces/i-data-validation.d.ts +44 -0
- package/lib/types/types/interfaces/i-document-data.d.ts +5 -19
- package/lib/types/types/interfaces/i-placeholder.d.ts +2 -16
- package/lib/types/types/interfaces/i-row-data.d.ts +2 -16
- package/lib/types/types/interfaces/i-selection-data.d.ts +3 -17
- package/lib/types/types/interfaces/i-shape-properties.d.ts +3 -17
- package/lib/types/types/interfaces/i-slide-data.d.ts +12 -26
- package/lib/types/types/interfaces/i-style-data.d.ts +5 -19
- package/lib/types/types/interfaces/i-univer-data.d.ts +5 -19
- package/lib/types/types/interfaces/i-workbook-data.d.ts +6 -20
- package/lib/types/types/interfaces/i-worksheet-data.d.ts +8 -22
- package/lib/umd/index.js +8 -8
- package/package.json +6 -7
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Injector } from '@wendellhu/redi';
|
|
17
|
-
import type { Plugin, PluginCtor } from '../plugin/plugin';
|
|
18
|
-
import { LifecycleStages } from '../services/lifecycle/lifecycle';
|
|
19
|
-
import type { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
|
|
20
1
|
import { Disposable } from '../shared/lifecycle';
|
|
2
|
+
import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
|
|
3
|
+
import { LifecycleStages } from '../services/lifecycle/lifecycle';
|
|
4
|
+
import { Plugin, PluginCtor } from '../plugin/plugin';
|
|
5
|
+
import { Injector } from '@wendellhu/redi';
|
|
6
|
+
|
|
21
7
|
export declare abstract class PluginHolder extends Disposable {
|
|
22
8
|
protected abstract get _lifecycleService(): LifecycleService;
|
|
23
9
|
protected abstract get _lifecycleInitializerService(): LifecycleInitializerService;
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { Injector } from '@wendellhu/redi';
|
|
17
|
-
import { DocumentDataModel } from '../docs/data-model/document-data-model';
|
|
18
|
-
import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
|
|
19
|
-
import type { IDocumentData } from '../types/interfaces/i-document-data';
|
|
20
1
|
import { PluginHolder } from './plugin-holder';
|
|
2
|
+
import { IDocumentData } from '../types/interfaces/i-document-data';
|
|
3
|
+
import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
|
|
4
|
+
import { DocumentDataModel } from '../docs/data-model/document-data-model';
|
|
5
|
+
import { Injector } from '@wendellhu/redi';
|
|
6
|
+
|
|
21
7
|
/**
|
|
22
8
|
* Externally provided UniverDoc root instance
|
|
23
9
|
*/
|
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
17
|
-
import { Injector } from '@wendellhu/redi';
|
|
18
|
-
import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
|
|
19
|
-
import { Workbook } from '../sheets/workbook';
|
|
20
|
-
import type { IWorkbookData } from '../types/interfaces/i-workbook-data';
|
|
21
1
|
import { PluginHolder } from './plugin-holder';
|
|
2
|
+
import { IWorkbookData } from '../types/interfaces/i-workbook-data';
|
|
3
|
+
import { Workbook } from '../sheets/workbook';
|
|
4
|
+
import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
|
|
5
|
+
import { IDisposable, Injector } from '@wendellhu/redi';
|
|
6
|
+
|
|
22
7
|
/**
|
|
23
8
|
* Externally provided UniverSheet root instance
|
|
24
9
|
*/
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { Injector } from '@wendellhu/redi';
|
|
17
|
-
import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
|
|
18
|
-
import { SlideDataModel } from '../slides/domain/slide-model';
|
|
19
|
-
import type { ISlideData } from '../types/interfaces/i-slide-data';
|
|
20
1
|
import { PluginHolder } from './plugin-holder';
|
|
2
|
+
import { ISlideData } from '../types/interfaces/i-slide-data';
|
|
3
|
+
import { SlideDataModel } from '../slides/domain/slide-model';
|
|
4
|
+
import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
|
|
5
|
+
import { Injector } from '@wendellhu/redi';
|
|
6
|
+
|
|
21
7
|
/**
|
|
22
8
|
* Externally provided UniverSlide root instance
|
|
23
9
|
*/
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { Injector } from '@wendellhu/redi';
|
|
17
|
-
import type { DocumentDataModel } from '../docs/data-model/document-data-model';
|
|
18
|
-
import type { Plugin, PluginCtor } from '../plugin/plugin';
|
|
19
|
-
import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
|
|
20
|
-
import type { Workbook } from '../sheets/workbook';
|
|
21
|
-
import type { SlideDataModel } from '../slides/domain/slide-model';
|
|
22
|
-
import type { LocaleType } from '../types/enum/locale-type';
|
|
23
|
-
import type { IDocumentData, ISlideData, IUniverData, IWorkbookData } from '../types/interfaces';
|
|
24
1
|
import { PluginHolder } from './plugin-holder';
|
|
2
|
+
import { IDocumentData, ISlideData, IUniverData, IWorkbookData } from '../types/interfaces';
|
|
3
|
+
import { LocaleType } from '../types/enum/locale-type';
|
|
4
|
+
import { SlideDataModel } from '../slides/domain/slide-model';
|
|
5
|
+
import { Workbook } from '../sheets/workbook';
|
|
6
|
+
import { LifecycleInitializerService, LifecycleService } from '../services/lifecycle/lifecycle.service';
|
|
7
|
+
import { Plugin, PluginCtor } from '../plugin/plugin';
|
|
8
|
+
import { DocumentDataModel } from '../docs/data-model/document-data-model';
|
|
9
|
+
import { Injector } from '@wendellhu/redi';
|
|
10
|
+
|
|
25
11
|
export declare class Univer extends PluginHolder {
|
|
26
12
|
protected readonly _injector: Injector;
|
|
27
13
|
private readonly _univerPluginStore;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IRange, IUnitRange } from '../types/interfaces';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Copyright 2023-present DreamNum Inc.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
export declare const isRangesEqual: (oldRanges: IRange[], ranges: IRange[]) => boolean;
|
|
19
|
+
export declare const isUnitRangesEqual: (oldRanges: IUnitRange[], ranges: IUnitRange[]) => boolean;
|
|
20
|
+
export declare function shallowEqual(objA: any, objB: any): boolean;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Nullable } from './type-utils';
|
|
1
|
+
import { Nullable } from './type-utils';
|
|
2
|
+
|
|
17
3
|
export type InterceptorHandler<M = unknown, C = unknown> = (value: Nullable<M>, context: C, next: (value: Nullable<M>) => Nullable<M>) => Nullable<M>;
|
|
18
4
|
export interface IInterceptor<M, C> {
|
|
19
5
|
priority?: number;
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { UpdateDocsAttributeType } from '../../shared/command-enum';
|
|
17
|
-
import type { IDocumentBody } from '../../types/interfaces/i-document-data';
|
|
1
|
+
import { IDocumentBody } from '../../types/interfaces/i-document-data';
|
|
2
|
+
import { UpdateDocsAttributeType } from '../../shared/command-enum';
|
|
3
|
+
|
|
18
4
|
export declare enum TextXActionType {
|
|
19
5
|
RETAIN = "r",
|
|
20
6
|
INSERT = "i",
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { ICustomBlock, ICustomRange, IDocumentBody, IParagraph, ISectionBreak, ITable, ITextRun } from '../../../types/interfaces';
|
|
1
|
+
import { ICustomBlock, ICustomRange, IDocumentBody, IParagraph, ISectionBreak, ITable, ITextRun } from '../../../types/interfaces';
|
|
2
|
+
|
|
17
3
|
export declare function normalizeTextRuns(textRuns: ITextRun[]): ITextRun[];
|
|
18
4
|
/**
|
|
19
5
|
* Inserting styled text content into the current document model.
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { IDocumentBody } from '../../../types/interfaces';
|
|
1
|
+
import { IDocumentBody } from '../../../types/interfaces';
|
|
2
|
+
|
|
17
3
|
export declare function updateAttributeByDelete(body: IDocumentBody, textLength: number, currentIndex: number): IDocumentBody;
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { IDocumentBody } from '../../../types/interfaces';
|
|
1
|
+
import { IDocumentBody } from '../../../types/interfaces';
|
|
2
|
+
|
|
17
3
|
export declare function updateAttributeByInsert(body: IDocumentBody, insertBody: IDocumentBody, textLength: number, currentIndex: number): void;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
1
|
+
import { IDocumentBody, ITextRun } from '../../../types/interfaces';
|
|
16
2
|
import { UpdateDocsAttributeType } from '../../../shared';
|
|
17
|
-
|
|
3
|
+
|
|
18
4
|
export declare function updateAttribute(body: IDocumentBody, updateBody: IDocumentBody, textLength: number, currentIndex: number, coverType: UpdateDocsAttributeType): IDocumentBody;
|
|
19
5
|
export declare function coverTextRuns(updateDataTextRuns: ITextRun[], removeTextRuns: ITextRun[], coverType: UpdateDocsAttributeType): ITextRun[];
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Nullable } from '../../shared';
|
|
17
|
-
import type { IDocumentBody, IDocumentData, IDocumentRenderConfig, IDocumentStyle } from '../../types/interfaces/i-document-data';
|
|
18
|
-
import type { IPaddingData } from '../../types/interfaces/i-style-data';
|
|
19
|
-
import { type TextXAction } from './action-types';
|
|
1
|
+
import { TextXAction } from './action-types';
|
|
2
|
+
import { IPaddingData } from '../../types/interfaces/i-style-data';
|
|
3
|
+
import { IDocumentBody, IDocumentData, IDocumentRenderConfig, IDocumentStyle } from '../../types/interfaces/i-document-data';
|
|
4
|
+
import { Nullable } from '../../shared';
|
|
5
|
+
|
|
20
6
|
export declare const DEFAULT_DOC: {
|
|
21
7
|
id: string;
|
|
22
8
|
documentStyle: {};
|
|
@@ -30,9 +16,9 @@ interface IDrawingUpdateConfig {
|
|
|
30
16
|
declare class DocumentDataModelSimple {
|
|
31
17
|
snapshot: IDocumentData;
|
|
32
18
|
constructor(snapshot: Partial<IDocumentData>);
|
|
33
|
-
get drawings(): import(
|
|
19
|
+
get drawings(): import('../../types/interfaces/i-document-data').IDrawings | undefined;
|
|
34
20
|
get documentStyle(): IDocumentStyle;
|
|
35
|
-
get lists(): import(
|
|
21
|
+
get lists(): import('../../types/interfaces/i-document-data').ILists | undefined;
|
|
36
22
|
/**
|
|
37
23
|
* @deprecated use getBody to instead.
|
|
38
24
|
*/
|
|
@@ -59,7 +45,7 @@ export declare class DocumentDataModel extends DocumentDataModelSimple {
|
|
|
59
45
|
dispose(): void;
|
|
60
46
|
getRev(): number;
|
|
61
47
|
incrementRev(): void;
|
|
62
|
-
getSettings(): import(
|
|
48
|
+
getSettings(): import('../../types/interfaces/i-document-data').IDocumentSettings | undefined;
|
|
63
49
|
reset(snapshot: Partial<IDocumentData>): void;
|
|
64
50
|
getSelfOrHeaderFooterModel(segmentId?: string): DocumentDataModel;
|
|
65
51
|
getUnitId(): string;
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright 2023-present DreamNum Inc.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
1
|
+
import { IDocumentData } from '../../types/interfaces';
|
|
16
2
|
import { LocaleType } from '../../types/enum/locale-type';
|
|
17
|
-
|
|
3
|
+
|
|
18
4
|
export declare function getEmptySnapshot(unitID?: string, locale?: LocaleType, title?: string): IDocumentData;
|
|
@@ -1,19 +1,5 @@
|
|
|
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
1
|
import { BulletAlignment, GlyphType } from '../../types/interfaces/i-document-data';
|
|
2
|
+
|
|
17
3
|
export declare enum PresetListType {
|
|
18
4
|
BULLET_LIST = "BULLET_LIST",
|
|
19
5
|
ORDER_LIST = "ORDER_LIST"
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { IDocumentBody } from '../../types/interfaces/i-document-data';
|
|
1
|
+
import { IDocumentBody } from '../../types/interfaces/i-document-data';
|
|
2
|
+
|
|
17
3
|
export declare function replaceInDocumentBody(body: IDocumentBody, query: string, target: string): IDocumentBody;
|
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { TextXAction } from '../action-types';
|
|
17
|
-
import { TextXActionType } from '../action-types';
|
|
1
|
+
import { TextXAction, TextXActionType } from '../action-types';
|
|
2
|
+
|
|
18
3
|
export declare class ActionIterator {
|
|
19
4
|
private _actions;
|
|
20
5
|
private _index;
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { UpdateDocsAttributeType } from '../../../shared/command-enum';
|
|
17
|
-
import type { IDocumentBody } from '../../../types/interfaces/i-document-data';
|
|
18
|
-
import { type TextXAction } from '../action-types';
|
|
1
|
+
import { TextXAction } from '../action-types';
|
|
2
|
+
import { IDocumentBody } from '../../../types/interfaces/i-document-data';
|
|
3
|
+
import { UpdateDocsAttributeType } from '../../../shared/command-enum';
|
|
4
|
+
|
|
19
5
|
export declare class TextX {
|
|
20
6
|
static compose(thisActions: TextXAction[], otherActions: TextXAction[]): TextXAction[];
|
|
21
7
|
private _actions;
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
1
|
+
import { IRetainAction } from '../action-types';
|
|
2
|
+
import { IDocumentBody } from '../../../types/interfaces/i-document-data';
|
|
16
3
|
import { UpdateDocsAttributeType } from '../../../shared/command-enum';
|
|
17
|
-
|
|
18
|
-
import type { IRetainAction } from '../action-types';
|
|
4
|
+
|
|
19
5
|
export declare function getBodySlice(body: IDocumentBody, startOffset: number, endOffset: number): IDocumentBody;
|
|
20
6
|
export declare function composeBody(thisBody: IDocumentBody, otherBody: IDocumentBody, coverType?: UpdateDocsAttributeType): IDocumentBody;
|
|
21
7
|
export declare function isUselessRetainAction(action: IRetainAction): boolean;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
export { shallowEqual, isRangesEqual, isUnitRangesEqual } from './common/equal';
|
|
16
17
|
export * from './basics';
|
|
17
18
|
export { dedupe, remove, rotate, groupBy } from './common/array';
|
|
18
19
|
export { DEFAULT_EMPTY_DOCUMENT_VALUE, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, } from './common/const';
|
|
@@ -22,6 +23,7 @@ export { requestImmediateMacroTask } from './common/request-immediate-macro-task
|
|
|
22
23
|
export { type ISequenceExecuteResult, sequence, sequenceAsync } from './common/sequence';
|
|
23
24
|
export * from './docs/data-model';
|
|
24
25
|
export { TextXActionType, type TextXAction, type IDeleteAction, type IInsertAction, type IRetainAction, } from './docs/data-model/action-types';
|
|
26
|
+
export { DataValidationRenderMode } from './types/enum/data-validation-render-mode';
|
|
25
27
|
export { ActionIterator } from './docs/data-model/text-x/action-iterator';
|
|
26
28
|
export { getBodySlice, composeBody } from './docs/data-model/text-x/utils';
|
|
27
29
|
export { TextX } from './docs/data-model/text-x/text-x';
|
|
@@ -46,7 +48,7 @@ export { ResourceManagerService } from './services/resource-manager/resource-man
|
|
|
46
48
|
export type { IResourceHook } from './services/resource-manager/type';
|
|
47
49
|
export { IResourceManagerService, ISnapshotPersistenceService } from './services/resource-manager/type';
|
|
48
50
|
export { type IStyleSheet, ThemeService } from './services/theme/theme.service';
|
|
49
|
-
export { type IUndoRedoCommandInfos, type IUndoRedoItem, IUndoRedoService, type IUndoRedoStatus, LocalUndoRedoService, RedoCommand, UndoCommand, RedoCommandId, UndoCommandId, } from './services/undoredo/undoredo.service';
|
|
51
|
+
export { type IUndoRedoCommandInfos, type IUndoRedoCommandInfosByInterceptor, type IUndoRedoItem, IUndoRedoService, type IUndoRedoStatus, LocalUndoRedoService, RedoCommand, UndoCommand, RedoCommandId, UndoCommandId, } from './services/undoredo/undoredo.service';
|
|
50
52
|
export * from './shared';
|
|
51
53
|
export { fromCallback } from './shared/rxjs';
|
|
52
54
|
export type { IComposeInterceptors, IInterceptor, InterceptorHandler } from './common/interceptor';
|
|
@@ -74,3 +76,11 @@ export { b64DecodeUnicode, b64EncodeUnicode } from './shared/coder';
|
|
|
74
76
|
export { ClientSnapshotServerService } from './services/snapshot/snapshot-server.service';
|
|
75
77
|
export { getSheetBlocksFromSnapshot } from './services/snapshot/snapshot-transform';
|
|
76
78
|
export { isBlackColor, isWhiteColor } from './shared/color/color-kit';
|
|
79
|
+
export { cellToRange } from './shared/common';
|
|
80
|
+
export type { IDataValidationRule, IDataValidationRuleBase, IDataValidationRuleInfo, IDataValidationRuleOptions, ISheetDataValidationRule } from './types/interfaces/i-data-validation';
|
|
81
|
+
export type { ICellCustomRender, ICellRenderContext } from './types/interfaces/i-cell-custom-render';
|
|
82
|
+
export { DataValidationErrorStyle } from './types/enum/data-validation-error-style';
|
|
83
|
+
export { DataValidationImeMode } from './types/enum/data-validation-ime-mode';
|
|
84
|
+
export { DataValidationOperator } from './types/enum/data-validation-operator';
|
|
85
|
+
export { DataValidationType } from './types/enum/data-validation-type';
|
|
86
|
+
export { DataValidationStatus } from './types/enum/data-validation-status';
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Nullable } from '../shared/types';
|
|
17
|
-
import type { EventState } from './observable';
|
|
18
|
-
import { Observable, Observer } from './observable';
|
|
1
|
+
import { EventState, Observable, Observer } from './observable';
|
|
2
|
+
import { Nullable } from '../shared/types';
|
|
3
|
+
|
|
19
4
|
/**
|
|
20
5
|
* Observable Hooks
|
|
21
6
|
*/
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Nullable } from '../shared/types';
|
|
1
|
+
import { Nullable } from '../shared/types';
|
|
2
|
+
|
|
17
3
|
/**
|
|
18
4
|
* A class serves as a medium between the observable and its observers
|
|
19
5
|
*/
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import type { Ctor, Injector } from '@wendellhu/redi';
|
|
1
|
+
import { Ctor, Injector } from '@wendellhu/redi';
|
|
2
|
+
|
|
17
3
|
export type PluginCtor<T extends Plugin> = Ctor<T> & {
|
|
18
4
|
type: PluginType;
|
|
19
5
|
};
|