@univerjs/sheets-formula 0.1.0-alpha.1 → 0.1.0-alpha.3
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/LICENSE.txt +178 -0
- package/README.md +1 -1
- package/lib/cjs/index.js +13 -4215
- package/lib/es/index.js +18707 -0
- package/lib/index.css +1 -214
- package/lib/types/commands/commands/formula-clipboard.command.d.ts +18 -0
- package/lib/types/commands/commands/insert-function.command.d.ts +15 -1
- package/lib/types/commands/operations/__tests__/create-command-test-bed.d.ts +15 -1
- package/lib/types/commands/operations/__tests__/insert-function.operation.spec.d.ts +15 -1
- package/lib/types/commands/operations/editor-formula.operation.d.ts +15 -1
- package/lib/types/commands/operations/help-function.operation.d.ts +15 -1
- package/lib/types/commands/operations/insert-function.operation.d.ts +15 -1
- package/lib/types/commands/operations/more-functions.operation.d.ts +15 -1
- package/lib/types/commands/operations/reference-absolute.operation.d.ts +15 -1
- package/lib/types/commands/operations/search-function.operation.d.ts +15 -1
- package/lib/types/common/plugin-name.d.ts +15 -1
- package/lib/types/common/prompt.d.ts +15 -1
- package/lib/types/common/selection.d.ts +16 -2
- package/lib/types/controllers/__tests__/create-command-test-bed.d.ts +15 -1
- package/lib/types/controllers/__tests__/formula-auto-fill.controller.spec.d.ts +15 -1
- package/lib/types/controllers/__tests__/formula-clipboard.controller.spec.d.ts +16 -0
- package/lib/types/controllers/__tests__/update-formula.controller.spec.d.ts +16 -0
- package/lib/types/controllers/__tests__/utils.spec.d.ts +16 -0
- package/lib/types/controllers/active-dirty.controller.d.ts +40 -0
- package/lib/types/controllers/array-formula-display.controller.d.ts +27 -0
- package/lib/types/controllers/formula-auto-fill.controller.d.ts +18 -4
- package/lib/types/controllers/formula-clipboard.controller.d.ts +41 -0
- package/lib/types/controllers/formula-editor-show.controller.d.ts +38 -0
- package/lib/types/controllers/formula-input.controller.d.ts +20 -4
- package/lib/types/controllers/formula-ui.controller.d.ts +15 -1
- package/lib/types/controllers/menu.d.ts +16 -1
- package/lib/types/controllers/prompt.controller.d.ts +19 -6
- package/lib/types/controllers/shortcuts/prompt.shortcut.d.ts +15 -1
- package/lib/types/controllers/trigger-calculation.controller.d.ts +33 -0
- package/lib/types/controllers/update-formula.controller.d.ts +75 -0
- package/lib/types/controllers/utils.d.ts +26 -0
- package/lib/types/formula-ui-plugin.d.ts +16 -2
- package/lib/types/index.d.ts +17 -2
- package/lib/types/locale/en-US.d.ts +9124 -11
- package/lib/types/locale/function-list/array/en-US.d.ts +15 -1
- package/lib/types/locale/function-list/array/ja-JP.d.ts +17 -0
- package/lib/types/locale/function-list/array/zh-CN.d.ts +15 -1
- package/lib/types/locale/function-list/compatibility/en-US.d.ts +755 -2
- package/lib/types/locale/function-list/compatibility/ja-JP.d.ts +756 -0
- package/lib/types/locale/function-list/compatibility/zh-CN.d.ts +755 -2
- package/lib/types/locale/function-list/cube/en-US.d.ts +143 -2
- package/lib/types/locale/function-list/cube/ja-JP.d.ts +144 -0
- package/lib/types/locale/function-list/cube/zh-CN.d.ts +143 -2
- package/lib/types/locale/function-list/database/en-US.d.ts +233 -2
- package/lib/types/locale/function-list/database/ja-JP.d.ts +234 -0
- package/lib/types/locale/function-list/database/zh-CN.d.ts +233 -2
- package/lib/types/locale/function-list/date/en-US.d.ts +467 -2
- package/lib/types/locale/function-list/date/ja-JP.d.ts +468 -0
- package/lib/types/locale/function-list/date/zh-CN.d.ts +467 -2
- package/lib/types/locale/function-list/engineering/en-US.d.ts +989 -2
- package/lib/types/locale/function-list/engineering/ja-JP.d.ts +990 -0
- package/lib/types/locale/function-list/engineering/zh-CN.d.ts +989 -2
- package/lib/types/locale/function-list/financial/en-US.d.ts +1007 -2
- package/lib/types/locale/function-list/financial/ja-JP.d.ts +1008 -0
- package/lib/types/locale/function-list/financial/zh-CN.d.ts +1007 -2
- package/lib/types/locale/function-list/information/en-US.d.ts +395 -2
- package/lib/types/locale/function-list/information/ja-JP.d.ts +396 -0
- package/lib/types/locale/function-list/information/zh-CN.d.ts +395 -2
- package/lib/types/locale/function-list/logical/en-US.d.ts +359 -2
- package/lib/types/locale/function-list/logical/ja-JP.d.ts +360 -0
- package/lib/types/locale/function-list/logical/zh-CN.d.ts +359 -2
- package/lib/types/locale/function-list/lookup/en-US.d.ts +683 -2
- package/lib/types/locale/function-list/lookup/ja-JP.d.ts +684 -0
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts +683 -2
- package/lib/types/locale/function-list/math/en-US.d.ts +1463 -1
- package/lib/types/locale/function-list/math/ja-JP.d.ts +1494 -0
- package/lib/types/locale/function-list/math/zh-CN.d.ts +1463 -1
- package/lib/types/locale/function-list/statistical/en-US.d.ts +1959 -3
- package/lib/types/locale/function-list/statistical/ja-JP.d.ts +2016 -0
- package/lib/types/locale/function-list/statistical/zh-CN.d.ts +1959 -3
- package/lib/types/locale/function-list/text/en-US.d.ts +863 -2
- package/lib/types/locale/function-list/text/ja-JP.d.ts +865 -0
- package/lib/types/locale/function-list/text/zh-CN.d.ts +863 -2
- package/lib/types/locale/function-list/univer/en-US.d.ts +15 -1
- package/lib/types/locale/function-list/univer/ja-JP.d.ts +17 -0
- package/lib/types/locale/function-list/univer/zh-CN.d.ts +15 -1
- package/lib/types/locale/function-list/web/en-US.d.ts +71 -2
- package/lib/types/locale/function-list/web/ja-JP.d.ts +72 -0
- package/lib/types/locale/function-list/web/zh-CN.d.ts +71 -2
- package/lib/types/locale/index.d.ts +15 -1
- package/lib/types/locale/zh-CN.d.ts +9124 -11
- package/lib/types/services/active-dirty-manager.service.d.ts +48 -0
- package/lib/types/services/description.service.d.ts +21 -7
- package/lib/types/services/formula-input.service.d.ts +15 -4
- package/lib/types/services/function-list/array.d.ts +15 -1
- package/lib/types/services/function-list/compatibility.d.ts +15 -1
- package/lib/types/services/function-list/cube.d.ts +15 -1
- package/lib/types/services/function-list/database.d.ts +15 -1
- package/lib/types/services/function-list/date.d.ts +15 -1
- package/lib/types/services/function-list/engineering.d.ts +15 -1
- package/lib/types/services/function-list/financial.d.ts +15 -1
- package/lib/types/services/function-list/function-list.d.ts +15 -1
- package/lib/types/services/function-list/information.d.ts +15 -1
- package/lib/types/services/function-list/logical.d.ts +15 -1
- package/lib/types/services/function-list/lookup.d.ts +15 -1
- package/lib/types/services/function-list/math.d.ts +15 -1
- package/lib/types/services/function-list/statistical.d.ts +15 -1
- package/lib/types/services/function-list/text.d.ts +15 -1
- package/lib/types/services/function-list/univer.d.ts +15 -1
- package/lib/types/services/function-list/web.d.ts +15 -1
- package/lib/types/services/prompt.service.d.ts +15 -1
- package/lib/types/services/utils.d.ts +15 -1
- package/lib/types/views/FormulaPromptContainer.d.ts +15 -1
- package/lib/types/views/more-functions/MoreFunctions.d.ts +15 -1
- package/lib/types/views/more-functions/function-help/FunctionHelp.d.ts +15 -1
- package/lib/types/views/more-functions/function-params/FunctionParams.d.ts +15 -1
- package/lib/types/views/more-functions/input-params/InputParams.d.ts +15 -1
- package/lib/types/views/more-functions/interface.d.ts +15 -1
- package/lib/types/views/more-functions/select-function/SelectFunction.d.ts +15 -1
- package/lib/types/views/prompt/error-function/error-function.d.ts +15 -1
- package/lib/types/views/prompt/help-function/HelpFunction.d.ts +15 -1
- package/lib/types/views/prompt/search-function/SearchFunction.d.ts +15 -1
- package/lib/umd/index.js +13 -0
- package/package.json +40 -31
- package/LICENSE +0 -21
- package/lib/cjs/locale/en-US.js +0 -223
- package/lib/cjs/locale/zh-CN.js +0 -223
- package/lib/esm/index.js +0 -4205
- package/lib/esm/locale/en-US.js +0 -200
- package/lib/esm/locale/zh-CN.js +0 -200
- package/lib/types/commands/commands/insert-function.command.d.ts.map +0 -1
- package/lib/types/commands/operations/__tests__/create-command-test-bed.d.ts.map +0 -1
- package/lib/types/commands/operations/__tests__/insert-function.operation.spec.d.ts.map +0 -1
- package/lib/types/commands/operations/editor-formula.operation.d.ts.map +0 -1
- package/lib/types/commands/operations/help-function.operation.d.ts.map +0 -1
- package/lib/types/commands/operations/insert-function.operation.d.ts.map +0 -1
- package/lib/types/commands/operations/more-functions.operation.d.ts.map +0 -1
- package/lib/types/commands/operations/reference-absolute.operation.d.ts.map +0 -1
- package/lib/types/commands/operations/search-function.operation.d.ts.map +0 -1
- package/lib/types/common/plugin-name.d.ts.map +0 -1
- package/lib/types/common/prompt.d.ts.map +0 -1
- package/lib/types/common/selection.d.ts.map +0 -1
- package/lib/types/controllers/__tests__/create-command-test-bed.d.ts.map +0 -1
- package/lib/types/controllers/__tests__/formula-auto-fill.controller.spec.d.ts.map +0 -1
- package/lib/types/controllers/formula-auto-fill.controller.d.ts.map +0 -1
- package/lib/types/controllers/formula-input.controller.d.ts.map +0 -1
- package/lib/types/controllers/formula-ui.controller.d.ts.map +0 -1
- package/lib/types/controllers/menu.d.ts.map +0 -1
- package/lib/types/controllers/prompt.controller.d.ts.map +0 -1
- package/lib/types/controllers/shortcuts/prompt.shortcut.d.ts.map +0 -1
- package/lib/types/formula-ui-plugin.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/locale/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/array/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/array/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/compatibility/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/compatibility/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/cube/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/cube/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/database/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/database/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/date/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/date/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/engineering/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/engineering/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/financial/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/financial/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/information/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/information/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/logical/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/logical/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/lookup/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/math/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/math/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/statistical/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/statistical/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/text/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/text/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/univer/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/univer/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/function-list/web/en-US.d.ts.map +0 -1
- package/lib/types/locale/function-list/web/zh-CN.d.ts.map +0 -1
- package/lib/types/locale/index.d.ts.map +0 -1
- package/lib/types/locale/zh-CN.d.ts.map +0 -1
- package/lib/types/services/description.service.d.ts.map +0 -1
- package/lib/types/services/formula-input.service.d.ts.map +0 -1
- package/lib/types/services/function-list/array.d.ts.map +0 -1
- package/lib/types/services/function-list/compatibility.d.ts.map +0 -1
- package/lib/types/services/function-list/cube.d.ts.map +0 -1
- package/lib/types/services/function-list/database.d.ts.map +0 -1
- package/lib/types/services/function-list/date.d.ts.map +0 -1
- package/lib/types/services/function-list/engineering.d.ts.map +0 -1
- package/lib/types/services/function-list/financial.d.ts.map +0 -1
- package/lib/types/services/function-list/function-list.d.ts.map +0 -1
- package/lib/types/services/function-list/information.d.ts.map +0 -1
- package/lib/types/services/function-list/logical.d.ts.map +0 -1
- package/lib/types/services/function-list/lookup.d.ts.map +0 -1
- package/lib/types/services/function-list/math.d.ts.map +0 -1
- package/lib/types/services/function-list/statistical.d.ts.map +0 -1
- package/lib/types/services/function-list/text.d.ts.map +0 -1
- package/lib/types/services/function-list/univer.d.ts.map +0 -1
- package/lib/types/services/function-list/web.d.ts.map +0 -1
- package/lib/types/services/prompt.service.d.ts.map +0 -1
- package/lib/types/services/utils.d.ts.map +0 -1
- package/lib/types/views/FormulaPromptContainer.d.ts.map +0 -1
- package/lib/types/views/more-functions/MoreFunctions.d.ts.map +0 -1
- package/lib/types/views/more-functions/function-help/FunctionHelp.d.ts.map +0 -1
- package/lib/types/views/more-functions/function-params/FunctionParams.d.ts.map +0 -1
- package/lib/types/views/more-functions/input-params/InputParams.d.ts.map +0 -1
- package/lib/types/views/more-functions/interface.d.ts.map +0 -1
- package/lib/types/views/more-functions/select-function/SelectFunction.d.ts.map +0 -1
- package/lib/types/views/prompt/error-function/error-function.d.ts.map +0 -1
- package/lib/types/views/prompt/help-function/HelpFunction.d.ts.map +0 -1
- package/lib/types/views/prompt/search-function/SearchFunction.d.ts.map +0 -1
|
@@ -1,12 +1,26 @@
|
|
|
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
16
|
import { Disposable } from '@univerjs/core';
|
|
2
|
-
import {
|
|
17
|
+
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
3
18
|
import type { AutoFillService } from '@univerjs/sheets-ui';
|
|
4
19
|
export declare class FormulaAutoFillController extends Disposable {
|
|
5
20
|
private readonly _autoFillService;
|
|
6
|
-
private readonly
|
|
7
|
-
constructor(_autoFillService: AutoFillService,
|
|
21
|
+
private readonly _lexerTreeBuilder;
|
|
22
|
+
constructor(_autoFillService: AutoFillService, _lexerTreeBuilder: LexerTreeBuilder);
|
|
8
23
|
private _initialize;
|
|
9
24
|
private _registerAutoFill;
|
|
10
25
|
private _fillCopyFormula;
|
|
11
26
|
}
|
|
12
|
-
//# sourceMappingURL=formula-auto-fill.controller.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { IMutationInfo, IRange } from '@univerjs/core';
|
|
17
|
+
import { Disposable, IUniverInstanceService, ObjectMatrix } from '@univerjs/core';
|
|
18
|
+
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
19
|
+
import type { ICellDataWithSpanInfo } from '@univerjs/sheets-ui';
|
|
20
|
+
import { COPY_TYPE, ISheetClipboardService } from '@univerjs/sheets-ui';
|
|
21
|
+
import type { IAccessor } from '@wendellhu/redi';
|
|
22
|
+
import { Injector } from '@wendellhu/redi';
|
|
23
|
+
export declare const DEFAULT_PASTE_FORMULA = "default-paste-formula";
|
|
24
|
+
export declare class FormulaClipboardController extends Disposable {
|
|
25
|
+
private readonly _currentUniverSheet;
|
|
26
|
+
private readonly _lexerTreeBuilder;
|
|
27
|
+
private readonly _sheetClipboardService;
|
|
28
|
+
private readonly _injector;
|
|
29
|
+
constructor(_currentUniverSheet: IUniverInstanceService, _lexerTreeBuilder: LexerTreeBuilder, _sheetClipboardService: ISheetClipboardService, _injector: Injector);
|
|
30
|
+
private _initialize;
|
|
31
|
+
private _registerClipboardHook;
|
|
32
|
+
private _pasteFormulaHook;
|
|
33
|
+
private _pasteWithFormulaHook;
|
|
34
|
+
}
|
|
35
|
+
export declare function getSetCellFormulaMutations(unitId: string, subUnitId: string, range: IRange, matrix: ObjectMatrix<ICellDataWithSpanInfo>, accessor: IAccessor, copyInfo: {
|
|
36
|
+
copyType: COPY_TYPE;
|
|
37
|
+
copyRange?: IRange;
|
|
38
|
+
}, lexerTreeBuilder: LexerTreeBuilder, isSpecialPaste?: boolean): {
|
|
39
|
+
undos: IMutationInfo<object>[];
|
|
40
|
+
redos: IMutationInfo<object>[];
|
|
41
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { Disposable, ICommandService, ThemeService } from '@univerjs/core';
|
|
17
|
+
import { FormulaDataModel, LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
18
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
19
|
+
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
20
|
+
import { IEditorBridgeService, ISelectionRenderService, SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
|
21
|
+
export declare class FormulaEditorShowController extends Disposable {
|
|
22
|
+
private _editorBridgeService;
|
|
23
|
+
private readonly _formulaDataModel;
|
|
24
|
+
private readonly _lexerTreeBuilder;
|
|
25
|
+
private readonly _themeService;
|
|
26
|
+
private readonly _renderManagerService;
|
|
27
|
+
private readonly _selectionRenderService;
|
|
28
|
+
private readonly _sheetSkeletonManagerService;
|
|
29
|
+
private readonly _commandService;
|
|
30
|
+
private _sheetInterceptorService;
|
|
31
|
+
private _previousShape;
|
|
32
|
+
constructor(_editorBridgeService: IEditorBridgeService, _formulaDataModel: FormulaDataModel, _lexerTreeBuilder: LexerTreeBuilder, _themeService: ThemeService, _renderManagerService: IRenderManagerService, _selectionRenderService: ISelectionRenderService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _sheetInterceptorService: SheetInterceptorService);
|
|
33
|
+
private _initInterceptorEditorStart;
|
|
34
|
+
private _initInterceptorCell;
|
|
35
|
+
private _commandExecutedListener;
|
|
36
|
+
private _createArrayFormulaRangeShape;
|
|
37
|
+
private _removeArrayFormulaRangeShape;
|
|
38
|
+
}
|
|
@@ -1,5 +1,21 @@
|
|
|
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
16
|
import { Disposable, ICommandService } from '@univerjs/core';
|
|
2
|
-
import {
|
|
17
|
+
import { TextSelectionManagerService } from '@univerjs/docs';
|
|
18
|
+
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
3
19
|
import { IRenderManagerService, ITextSelectionRenderManager } from '@univerjs/engine-render';
|
|
4
20
|
import type { EditorBridgeService } from '@univerjs/sheets-ui';
|
|
5
21
|
import { IFormulaInputService } from '../services/formula-input.service';
|
|
@@ -7,11 +23,12 @@ export declare class FormulaInputController extends Disposable {
|
|
|
7
23
|
private readonly _commandService;
|
|
8
24
|
private readonly _textSelectionRenderManager;
|
|
9
25
|
private readonly _editorBridgeService;
|
|
10
|
-
private readonly
|
|
26
|
+
private readonly _lexerTreeBuilder;
|
|
11
27
|
private readonly _renderManagerService;
|
|
12
28
|
private readonly _formulaInputService;
|
|
29
|
+
private readonly _textSelectionManagerService;
|
|
13
30
|
private _userCursorMove;
|
|
14
|
-
constructor(_commandService: ICommandService, _textSelectionRenderManager: ITextSelectionRenderManager, _editorBridgeService: EditorBridgeService,
|
|
31
|
+
constructor(_commandService: ICommandService, _textSelectionRenderManager: ITextSelectionRenderManager, _editorBridgeService: EditorBridgeService, _lexerTreeBuilder: LexerTreeBuilder, _renderManagerService: IRenderManagerService, _formulaInputService: IFormulaInputService, _textSelectionManagerService: TextSelectionManagerService);
|
|
15
32
|
private _initialize;
|
|
16
33
|
private _initialEditorInputChange;
|
|
17
34
|
private _userMouseListener;
|
|
@@ -22,4 +39,3 @@ export declare class FormulaInputController extends Disposable {
|
|
|
22
39
|
private _commandExecutedListener;
|
|
23
40
|
private _getEditorObject;
|
|
24
41
|
}
|
|
25
|
-
//# sourceMappingURL=formula-input.controller.d.ts.map
|
|
@@ -1,3 +1,18 @@
|
|
|
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
16
|
import { Disposable, ICommandService } from '@univerjs/core';
|
|
2
17
|
import type { IDesktopUIController } from '@univerjs/ui';
|
|
3
18
|
import { ComponentManager, IMenuService, IShortcutService } from '@univerjs/ui';
|
|
@@ -16,4 +31,3 @@ export declare class FormulaUIController extends Disposable {
|
|
|
16
31
|
private _registerShortcuts;
|
|
17
32
|
private _registerComponents;
|
|
18
33
|
}
|
|
19
|
-
//# sourceMappingURL=formula-ui.controller.d.ts.map
|
|
@@ -1,5 +1,20 @@
|
|
|
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
16
|
import type { IMenuItem } from '@univerjs/ui';
|
|
2
17
|
import type { IAccessor } from '@wendellhu/redi';
|
|
3
18
|
export declare function InsertFunctionMenuItemFactory(accessor: IAccessor): IMenuItem;
|
|
4
19
|
export declare function MoreFunctionsMenuItemFactory(accessor: IAccessor): IMenuItem;
|
|
5
|
-
|
|
20
|
+
export declare function PasteFormulaMenuItemFactory(accessor: IAccessor): IMenuItem;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
|
|
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 { Disposable, ICommandService, IContextService, IUniverInstanceService, ThemeService } from '@univerjs/core';
|
|
2
17
|
import { DocViewModelManagerService, TextSelectionManagerService } from '@univerjs/docs';
|
|
3
|
-
import {
|
|
18
|
+
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
4
19
|
import { IRenderManagerService, ITextSelectionRenderManager } from '@univerjs/engine-render';
|
|
5
20
|
import { SelectionManagerService } from '@univerjs/sheets';
|
|
6
21
|
import type { EditorBridgeService } from '@univerjs/sheets-ui';
|
|
@@ -10,12 +25,11 @@ import { IFormulaInputService } from '../services/formula-input.service';
|
|
|
10
25
|
import { IFormulaPromptService } from '../services/prompt.service';
|
|
11
26
|
export declare class PromptController extends Disposable {
|
|
12
27
|
private readonly _commandService;
|
|
13
|
-
private readonly _localeService;
|
|
14
28
|
private readonly _contextService;
|
|
15
29
|
private readonly _textSelectionRenderManager;
|
|
16
30
|
private readonly _editorBridgeService;
|
|
17
31
|
private readonly _formulaPromptService;
|
|
18
|
-
private readonly
|
|
32
|
+
private readonly _lexerTreeBuilder;
|
|
19
33
|
private readonly _renderManagerService;
|
|
20
34
|
private readonly _themeService;
|
|
21
35
|
private readonly _selectionManagerService;
|
|
@@ -39,7 +53,7 @@ export declare class PromptController extends Disposable {
|
|
|
39
53
|
private _numberColor;
|
|
40
54
|
private _insertSelections;
|
|
41
55
|
private _inputPanelState;
|
|
42
|
-
constructor(_commandService: ICommandService,
|
|
56
|
+
constructor(_commandService: ICommandService, _contextService: IContextService, _textSelectionRenderManager: ITextSelectionRenderManager, _editorBridgeService: EditorBridgeService, _formulaPromptService: IFormulaPromptService, _lexerTreeBuilder: LexerTreeBuilder, _renderManagerService: IRenderManagerService, _themeService: ThemeService, _selectionManagerService: SelectionManagerService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _selectionRenderService: ISelectionRenderService, _descriptionService: IDescriptionService, _textSelectionManagerService: TextSelectionManagerService, _formulaInputService: IFormulaInputService, _docViewModelManagerService: DocViewModelManagerService);
|
|
43
57
|
dispose(): void;
|
|
44
58
|
private _resetTemp;
|
|
45
59
|
private _initialize;
|
|
@@ -143,4 +157,3 @@ export declare class PromptController extends Disposable {
|
|
|
143
157
|
private _moveInEditor;
|
|
144
158
|
private _getEditorObject;
|
|
145
159
|
}
|
|
146
|
-
//# sourceMappingURL=prompt.controller.d.ts.map
|
|
@@ -1,3 +1,18 @@
|
|
|
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
16
|
import type { IShortcutItem } from '@univerjs/ui';
|
|
2
17
|
import { KeyCode } from '@univerjs/ui';
|
|
3
18
|
export declare const PROMPT_SELECTION_KEYCODE_ARROW_LIST: KeyCode[];
|
|
@@ -7,4 +22,3 @@ export declare function promptSelectionShortcutItemShift(): IShortcutItem<object
|
|
|
7
22
|
export declare function promptSelectionShortcutItemCtrl(): IShortcutItem<object>[];
|
|
8
23
|
export declare function promptSelectionShortcutItemCtrlAndShift(): IShortcutItem<object>[];
|
|
9
24
|
export declare const ChangeRefToAbsoluteShortcut: IShortcutItem;
|
|
10
|
-
//# sourceMappingURL=prompt.shortcut.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { Disposable, ICommandService } from '@univerjs/core';
|
|
17
|
+
import { IActiveDirtyManagerService } from '../services/active-dirty-manager.service';
|
|
18
|
+
export declare class TriggerCalculationController extends Disposable {
|
|
19
|
+
private readonly _commandService;
|
|
20
|
+
private readonly _activeDirtyManagerService;
|
|
21
|
+
private _waitingCommandQueue;
|
|
22
|
+
private _executingCommandQueue;
|
|
23
|
+
private _setTimeoutKey;
|
|
24
|
+
private _startExecutionTime;
|
|
25
|
+
constructor(_commandService: ICommandService, _activeDirtyManagerService: IActiveDirtyManagerService);
|
|
26
|
+
private _initialize;
|
|
27
|
+
private _commandExecutedListener;
|
|
28
|
+
private _generateDirty;
|
|
29
|
+
private _mergeDirtyNameMap;
|
|
30
|
+
private _mergeDirtyUnitFeatureMap;
|
|
31
|
+
private _initialExecuteFormulaProcessListener;
|
|
32
|
+
private _initialExecuteFormula;
|
|
33
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
17
|
+
import { FormulaDataModel, LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
18
|
+
import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';
|
|
19
|
+
import { Injector } from '@wendellhu/redi';
|
|
20
|
+
export declare class UpdateFormulaController extends Disposable {
|
|
21
|
+
private readonly _currentUniverService;
|
|
22
|
+
private readonly _commandService;
|
|
23
|
+
private readonly _lexerTreeBuilder;
|
|
24
|
+
private readonly _formulaDataModel;
|
|
25
|
+
private _sheetInterceptorService;
|
|
26
|
+
private _selectionManagerService;
|
|
27
|
+
readonly _injector: Injector;
|
|
28
|
+
constructor(_currentUniverService: IUniverInstanceService, _commandService: ICommandService, _lexerTreeBuilder: LexerTreeBuilder, _formulaDataModel: FormulaDataModel, _sheetInterceptorService: SheetInterceptorService, _selectionManagerService: SelectionManagerService, _injector: Injector);
|
|
29
|
+
private _initialize;
|
|
30
|
+
private _commandExecutedListener;
|
|
31
|
+
private _handleSetRangeValuesMutation;
|
|
32
|
+
private _handleRemoveSheetMutation;
|
|
33
|
+
private _handleInsertSheetMutation;
|
|
34
|
+
private _getUpdateFormula;
|
|
35
|
+
private _handleMoveRange;
|
|
36
|
+
private _handleMoveRows;
|
|
37
|
+
private _handleMoveCols;
|
|
38
|
+
private _handleInsertRow;
|
|
39
|
+
private _handleInsertCol;
|
|
40
|
+
private _handleInsertRangeMoveRight;
|
|
41
|
+
private _handleInsertRangeMoveDown;
|
|
42
|
+
private _handleRemoveRow;
|
|
43
|
+
private _handleRemoveCol;
|
|
44
|
+
private _handleDeleteRangeMoveUp;
|
|
45
|
+
private _handleDeleteRangeMoveLeft;
|
|
46
|
+
private _handleSetWorksheetName;
|
|
47
|
+
private _getUpdateFormulaMutations;
|
|
48
|
+
private _getFormulaReferenceMoveInfo;
|
|
49
|
+
private _getNewRangeByMoveParam;
|
|
50
|
+
private _checkIsSameUnitAndSheet;
|
|
51
|
+
/**
|
|
52
|
+
* Update all ref nodes to the latest offset state.
|
|
53
|
+
*/
|
|
54
|
+
private _updateRefOffset;
|
|
55
|
+
/**
|
|
56
|
+
* Determine the range of the moving selection,
|
|
57
|
+
* and check if it is at the edge of the reference range of the formula.
|
|
58
|
+
* @param originRange
|
|
59
|
+
* @param fromRange
|
|
60
|
+
*/
|
|
61
|
+
private _checkMoveEdge;
|
|
62
|
+
/**
|
|
63
|
+
* Calculate the new ref information for the moving selection.
|
|
64
|
+
* @param moveEdge the 'from' range lie on the edge of the original range, or does it completely cover the original range
|
|
65
|
+
* @param result The original range is divided by 'from' and moved to a new position range.
|
|
66
|
+
* @param from The initial range of the moving selection.
|
|
67
|
+
* @param to The result range after moving the initial range.
|
|
68
|
+
* @param origin The original target range.
|
|
69
|
+
* @param remain "The range subtracted from the initial range by 'from'.
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
private _getMoveNewRange;
|
|
73
|
+
private _getInsertNewRange;
|
|
74
|
+
private _getCurrentSheetInfo;
|
|
75
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { ICommandInfo, IObjectMatrixPrimitiveType, Nullable } from '@univerjs/core';
|
|
17
|
+
import type { IArrayFormulaRangeType } from '@univerjs/engine-formula';
|
|
18
|
+
import type { ISelectionWithStyle } from '@univerjs/sheets';
|
|
19
|
+
interface IFormulaDataGenerics<T> {
|
|
20
|
+
[unitId: string]: {
|
|
21
|
+
[sheetId: string]: IObjectMatrixPrimitiveType<T>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare function offsetFormula<T>(formulaData: IFormulaDataGenerics<T>, command: ICommandInfo, unitId: string, sheetId: string, selections?: Readonly<Nullable<ISelectionWithStyle[]>>): IFormulaDataGenerics<T>;
|
|
25
|
+
export declare function offsetArrayFormula(arrayFormulaRange: IArrayFormulaRangeType, unitId: string, sheetId: string): IArrayFormulaRangeType;
|
|
26
|
+
export {};
|
|
@@ -1,10 +1,25 @@
|
|
|
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
16
|
import { IUniverInstanceService, LocaleService, Plugin, PluginType } from '@univerjs/core';
|
|
2
17
|
import type { IFunctionInfo } from '@univerjs/engine-formula';
|
|
3
18
|
import { Injector } from '@wendellhu/redi';
|
|
4
19
|
interface IFormulaUIConfig {
|
|
5
20
|
description: IFunctionInfo[];
|
|
6
21
|
}
|
|
7
|
-
export declare class
|
|
22
|
+
export declare class UniverSheetsFormulaPlugin extends Plugin {
|
|
8
23
|
private _config;
|
|
9
24
|
readonly _injector: Injector;
|
|
10
25
|
private readonly _localeService;
|
|
@@ -15,4 +30,3 @@ export declare class FormulaUIPlugin extends Plugin {
|
|
|
15
30
|
onReady(): void;
|
|
16
31
|
}
|
|
17
32
|
export {};
|
|
18
|
-
//# sourceMappingURL=formula-ui-plugin.d.ts.map
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { UniverSheetsFormulaPlugin } from './formula-ui-plugin';
|
|
17
|
+
export { enUS, zhCN } from './locale';
|