@univerjs/engine-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 +1 -8809
- package/lib/es/index.js +6416 -0
- package/lib/types/basics/cache-lru.d.ts +15 -1
- package/lib/types/basics/calculate.d.ts +15 -1
- package/lib/types/basics/common.d.ts +33 -6
- package/lib/types/basics/dirty.d.ts +15 -1
- package/lib/types/basics/error-type.d.ts +14 -4
- package/lib/types/basics/function.d.ts +32 -18
- package/lib/types/basics/inverted-index-cache.d.ts +40 -0
- package/lib/types/basics/match-token.d.ts +16 -2
- package/lib/types/basics/object-class-type.d.ts +17 -3
- package/lib/types/basics/regex.d.ts +17 -3
- package/lib/types/basics/runtime.d.ts +17 -0
- package/lib/types/basics/token-type.d.ts +15 -1
- package/lib/types/basics/token.d.ts +18 -2
- package/lib/types/commands/mutations/set-array-formula-data.mutation.d.ts +24 -0
- package/lib/types/commands/mutations/set-defined-name.mutation.d.ts +29 -0
- package/lib/types/commands/mutations/set-feature-calculation.mutation.d.ts +29 -0
- package/lib/types/commands/mutations/set-formula-calculation.mutation.d.ts +43 -0
- package/lib/types/commands/mutations/set-formula-data.mutation.d.ts +21 -0
- package/lib/types/commands/mutations/set-other-formula.mutation.d.ts +23 -0
- package/lib/types/commands/mutations/set-super-table.mutation.d.ts +32 -0
- package/lib/types/controller/calculate.controller.d.ts +31 -0
- package/lib/types/controller/formula.controller.d.ts +27 -0
- package/lib/types/controller/set-defined-name.controller.d.ts +24 -0
- package/lib/types/controller/set-feature-calculation.controller.d.ts +24 -0
- package/lib/types/controller/set-other-formula.controller.d.ts +24 -0
- package/lib/types/controller/set-super-table.controller.d.ts +24 -0
- package/lib/types/engine/analysis/__tests__/create-command-test-bed.d.ts +30 -0
- package/lib/types/engine/analysis/__tests__/lexer-tree-builder.spec.d.ts +16 -0
- package/lib/types/engine/analysis/__tests__/lexer.spec.d.ts +16 -0
- package/lib/types/{analysis → engine/analysis}/lexer-node.d.ts +16 -2
- package/lib/types/{analysis/lexer.d.ts → engine/analysis/lexer-tree-builder.d.ts} +32 -5
- package/lib/types/engine/analysis/lexer.d.ts +27 -0
- package/lib/types/{analysis → engine/analysis}/parser.d.ts +16 -2
- package/lib/types/engine/ast-node/ast-root-node.d.ts +27 -0
- package/lib/types/engine/ast-node/base-ast-node-factory.d.ts +25 -0
- package/lib/types/{ast-node → engine/ast-node}/base-ast-node.d.ts +18 -4
- package/lib/types/{ast-node → engine/ast-node}/function-node.d.ts +18 -4
- package/lib/types/engine/ast-node/index.d.ts +25 -0
- package/lib/types/{ast-node → engine/ast-node}/lambda-node.d.ts +16 -2
- package/lib/types/{ast-node → engine/ast-node}/lambda-parameter-node.d.ts +15 -1
- package/lib/types/engine/ast-node/node-type.d.ts +31 -0
- package/lib/types/engine/ast-node/null-node.d.ts +23 -0
- package/lib/types/{ast-node → engine/ast-node}/operator-node.d.ts +17 -3
- package/lib/types/{ast-node → engine/ast-node}/prefix-node.d.ts +17 -3
- package/lib/types/engine/ast-node/reference-node.d.ts +44 -0
- package/lib/types/{ast-node → engine/ast-node}/suffix-node.d.ts +17 -3
- package/lib/types/{ast-node → engine/ast-node}/union-node.d.ts +17 -3
- package/lib/types/{ast-node → engine/ast-node}/value-node.d.ts +15 -1
- package/lib/types/{dependency → engine/dependency}/dependency-tree.d.ts +27 -4
- package/lib/types/{dependency → engine/dependency}/formula-dependency.d.ts +26 -7
- package/lib/types/engine/interpreter/interpreter.d.ts +32 -0
- package/lib/types/{reference-object → engine/reference-object}/base-reference-object.d.ts +43 -18
- package/lib/types/engine/reference-object/cell-reference-object.d.ts +26 -0
- package/lib/types/engine/reference-object/column-reference-object.d.ts +22 -0
- package/lib/types/engine/reference-object/range-reference-object.d.ts +21 -0
- package/lib/types/engine/reference-object/row-reference-object.d.ts +22 -0
- package/lib/types/engine/reference-object/table-reference-object.d.ts +26 -0
- package/lib/types/engine/utils/__tests__/compare.spec.d.ts +16 -0
- package/lib/types/engine/utils/compare.d.ts +21 -0
- package/lib/types/engine/utils/function-definition.d.ts +18 -0
- package/lib/types/engine/utils/math-kit.d.ts +30 -0
- package/lib/types/engine/utils/node-type.d.ts +20 -0
- package/lib/types/engine/utils/object-compare.d.ts +26 -0
- package/lib/types/{basics → engine/utils}/sequence.d.ts +15 -1
- package/lib/types/engine/value-object/__tests__/array-value-abs.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-acos.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-acosh.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-asin.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-asinh.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-atan.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-atan2.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-atanh.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-cbrt.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-ceil.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-cos.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-exp.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-floor.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-log.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-log10.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-object.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-pow.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-round.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-sin.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-tan.spec.d.ts +16 -0
- package/lib/types/engine/value-object/__tests__/array-value-tanh.spec.d.ts +16 -0
- package/lib/types/engine/value-object/array-value-object.d.ts +146 -0
- package/lib/types/engine/value-object/base-value-object.d.ts +132 -0
- package/lib/types/engine/value-object/primitive-object.d.ts +146 -0
- package/lib/types/functions/__tests__/create-command-test-bed.d.ts +34 -0
- package/lib/types/functions/array/function-map.d.ts +16 -0
- package/lib/types/functions/array/function-names.d.ts +17 -0
- package/lib/types/functions/base-function.d.ts +19 -6
- package/lib/types/functions/compatibility/concatenate/concatenate.d.ts +21 -0
- package/lib/types/functions/compatibility/function-map.d.ts +18 -0
- package/lib/types/functions/compatibility/function-names.d.ts +18 -0
- package/lib/types/functions/cube/function-map.d.ts +16 -0
- package/lib/types/functions/cube/function-names.d.ts +17 -0
- package/lib/types/functions/database/function-map.d.ts +16 -0
- package/lib/types/functions/database/function-names.d.ts +17 -0
- package/lib/types/functions/date/function-map.d.ts +16 -0
- package/lib/types/functions/date/function-names.d.ts +17 -0
- package/lib/types/functions/engineering/function-map.d.ts +16 -0
- package/lib/types/functions/engineering/function-names.d.ts +17 -0
- package/lib/types/functions/financial/function-map.d.ts +16 -0
- package/lib/types/functions/financial/function-names.d.ts +17 -0
- package/lib/types/functions/information/function-map.d.ts +16 -0
- package/lib/types/functions/information/function-names.d.ts +17 -0
- package/lib/types/functions/logical/function-map.d.ts +16 -0
- package/lib/types/functions/logical/function-names.d.ts +17 -0
- package/lib/types/functions/lookup/function-map.d.ts +18 -0
- package/lib/types/functions/lookup/function-names.d.ts +19 -0
- package/lib/types/functions/lookup/indirect/indirect.d.ts +21 -0
- package/lib/types/functions/lookup/offset/offset.d.ts +21 -0
- package/lib/types/functions/math/function-map.d.ts +18 -0
- package/lib/types/functions/math/function-names.d.ts +21 -0
- package/lib/types/functions/math/power/power.d.ts +21 -0
- package/lib/types/functions/math/sum/sum.d.ts +20 -0
- package/lib/types/functions/math/sumif/__tests__/sumif.spec.d.ts +16 -0
- package/lib/types/functions/math/sumif/sumif.d.ts +22 -0
- package/lib/types/functions/math/sumifs/__tests__/sumifs.spec.d.ts +16 -0
- package/lib/types/functions/math/sumifs/sumifs.d.ts +21 -0
- package/lib/types/functions/meta/compare/compare.d.ts +24 -0
- package/lib/types/functions/meta/divided/divided.d.ts +21 -0
- package/lib/types/functions/meta/function-map.d.ts +19 -0
- package/lib/types/functions/meta/function-names.d.ts +23 -0
- package/lib/types/functions/meta/minus/minus.d.ts +21 -0
- package/lib/types/functions/meta/multiply/multiply.d.ts +21 -0
- package/lib/types/functions/meta/plus/plus.d.ts +21 -0
- package/lib/types/functions/meta/union/union.d.ts +23 -0
- package/lib/types/functions/statistical/average/average.d.ts +20 -0
- package/lib/types/functions/statistical/count/count.d.ts +21 -0
- package/lib/types/functions/statistical/counta/counta.d.ts +21 -0
- package/lib/types/functions/statistical/function-map.d.ts +18 -0
- package/lib/types/functions/statistical/function-names.d.ts +22 -0
- package/lib/types/functions/statistical/max/max.d.ts +21 -0
- package/lib/types/functions/statistical/min/min.d.ts +22 -0
- package/lib/types/functions/text/function-map.d.ts +16 -0
- package/lib/types/functions/text/function-names.d.ts +17 -0
- package/lib/types/functions/univer/function-map.d.ts +16 -0
- package/lib/types/functions/univer/function-names.d.ts +17 -0
- package/lib/types/functions/web/function-map.d.ts +16 -0
- package/lib/types/functions/web/function-names.d.ts +17 -0
- package/lib/types/index.d.ts +59 -15
- package/lib/types/models/__tests__/create-command-test-bed.d.ts +30 -0
- package/lib/types/models/__tests__/formula-data.model.spec.d.ts +16 -0
- package/lib/types/models/formula-data.model.d.ts +52 -0
- package/lib/types/plugin.d.ts +25 -4
- package/lib/types/services/calculate-formula.service.d.ts +63 -0
- package/lib/types/services/current-data.service.d.ts +22 -7
- package/lib/types/services/defined-names.service.d.ts +26 -5
- package/lib/types/services/feature-calculation-manager.service.d.ts +52 -0
- package/lib/types/services/function.service.d.ts +41 -14
- package/lib/types/services/other-formula-manager.service.d.ts +50 -0
- package/lib/types/services/runtime.service.d.ts +42 -4
- package/lib/types/services/super-table.service.d.ts +26 -5
- package/lib/umd/index.js +1 -0
- package/package.json +22 -14
- package/LICENSE +0 -21
- package/lib/esm/index.js +0 -8800
- package/lib/types/analysis/lexer-node.d.ts.map +0 -1
- package/lib/types/analysis/lexer.d.ts.map +0 -1
- package/lib/types/analysis/parser.d.ts.map +0 -1
- package/lib/types/analysis/un-parser.d.ts +0 -1
- package/lib/types/analysis/un-parser.d.ts.map +0 -1
- package/lib/types/ast-node/ast-root-node.d.ts +0 -13
- package/lib/types/ast-node/ast-root-node.d.ts.map +0 -1
- package/lib/types/ast-node/base-ast-node-factory.d.ts +0 -11
- package/lib/types/ast-node/base-ast-node-factory.d.ts.map +0 -1
- package/lib/types/ast-node/base-ast-node.d.ts.map +0 -1
- package/lib/types/ast-node/function-node.d.ts.map +0 -1
- package/lib/types/ast-node/index.d.ts +0 -11
- package/lib/types/ast-node/index.d.ts.map +0 -1
- package/lib/types/ast-node/lambda-node.d.ts.map +0 -1
- package/lib/types/ast-node/lambda-parameter-node.d.ts.map +0 -1
- package/lib/types/ast-node/node-type.d.ts +0 -17
- package/lib/types/ast-node/node-type.d.ts.map +0 -1
- package/lib/types/ast-node/null-node.d.ts +0 -9
- package/lib/types/ast-node/null-node.d.ts.map +0 -1
- package/lib/types/ast-node/operator-node.d.ts.map +0 -1
- package/lib/types/ast-node/prefix-node.d.ts.map +0 -1
- package/lib/types/ast-node/reference-node.d.ts +0 -28
- package/lib/types/ast-node/reference-node.d.ts.map +0 -1
- package/lib/types/ast-node/suffix-node.d.ts.map +0 -1
- package/lib/types/ast-node/union-node.d.ts.map +0 -1
- package/lib/types/ast-node/value-node.d.ts.map +0 -1
- package/lib/types/basics/cache-lru.d.ts.map +0 -1
- package/lib/types/basics/calculate.d.ts.map +0 -1
- package/lib/types/basics/common.d.ts.map +0 -1
- package/lib/types/basics/dirty.d.ts.map +0 -1
- package/lib/types/basics/error-type.d.ts.map +0 -1
- package/lib/types/basics/function-definition.d.ts +0 -4
- package/lib/types/basics/function-definition.d.ts.map +0 -1
- package/lib/types/basics/function.d.ts.map +0 -1
- package/lib/types/basics/match-token.d.ts.map +0 -1
- package/lib/types/basics/node-type.d.ts +0 -6
- package/lib/types/basics/node-type.d.ts.map +0 -1
- package/lib/types/basics/object-class-type.d.ts.map +0 -1
- package/lib/types/basics/regex.d.ts.map +0 -1
- package/lib/types/basics/sequence.d.ts.map +0 -1
- package/lib/types/basics/set-zero-time-out.d.ts +0 -7
- package/lib/types/basics/set-zero-time-out.d.ts.map +0 -1
- package/lib/types/basics/token-type.d.ts.map +0 -1
- package/lib/types/basics/token.d.ts.map +0 -1
- package/lib/types/dependency/dependency-tree.d.ts.map +0 -1
- package/lib/types/dependency/formula-dependency.d.ts.map +0 -1
- package/lib/types/functions/average.d.ts +0 -6
- package/lib/types/functions/average.d.ts.map +0 -1
- package/lib/types/functions/base-function.d.ts.map +0 -1
- package/lib/types/functions/concatenate.d.ts +0 -7
- package/lib/types/functions/concatenate.d.ts.map +0 -1
- package/lib/types/functions/count.d.ts +0 -7
- package/lib/types/functions/count.d.ts.map +0 -1
- package/lib/types/functions/index.d.ts +0 -16
- package/lib/types/functions/index.d.ts.map +0 -1
- package/lib/types/functions/indirect.d.ts +0 -7
- package/lib/types/functions/indirect.d.ts.map +0 -1
- package/lib/types/functions/max.d.ts +0 -8
- package/lib/types/functions/max.d.ts.map +0 -1
- package/lib/types/functions/meta/compare.d.ts +0 -9
- package/lib/types/functions/meta/compare.d.ts.map +0 -1
- package/lib/types/functions/meta/divided.d.ts +0 -6
- package/lib/types/functions/meta/divided.d.ts.map +0 -1
- package/lib/types/functions/meta/minus.d.ts +0 -6
- package/lib/types/functions/meta/minus.d.ts.map +0 -1
- package/lib/types/functions/meta/multiply.d.ts +0 -6
- package/lib/types/functions/meta/multiply.d.ts.map +0 -1
- package/lib/types/functions/meta/plus.d.ts +0 -6
- package/lib/types/functions/meta/plus.d.ts.map +0 -1
- package/lib/types/functions/meta/union.d.ts +0 -9
- package/lib/types/functions/meta/union.d.ts.map +0 -1
- package/lib/types/functions/min.d.ts +0 -8
- package/lib/types/functions/min.d.ts.map +0 -1
- package/lib/types/functions/offset.d.ts +0 -7
- package/lib/types/functions/offset.d.ts.map +0 -1
- package/lib/types/functions/power.d.ts +0 -7
- package/lib/types/functions/power.d.ts.map +0 -1
- package/lib/types/functions/sum.d.ts +0 -8
- package/lib/types/functions/sum.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/interpreter/interpreter.d.ts +0 -18
- package/lib/types/interpreter/interpreter.d.ts.map +0 -1
- package/lib/types/other-object/error-value-object.d.ts +0 -12
- package/lib/types/other-object/error-value-object.d.ts.map +0 -1
- package/lib/types/plugin.d.ts.map +0 -1
- package/lib/types/reference-object/base-reference-object.d.ts.map +0 -1
- package/lib/types/reference-object/cell-reference-object.d.ts +0 -12
- package/lib/types/reference-object/cell-reference-object.d.ts.map +0 -1
- package/lib/types/reference-object/column-reference-object.d.ts +0 -8
- package/lib/types/reference-object/column-reference-object.d.ts.map +0 -1
- package/lib/types/reference-object/range-reference-object.d.ts +0 -7
- package/lib/types/reference-object/range-reference-object.d.ts.map +0 -1
- package/lib/types/reference-object/row-reference-object.d.ts +0 -8
- package/lib/types/reference-object/row-reference-object.d.ts.map +0 -1
- package/lib/types/reference-object/table-reference-object.d.ts +0 -12
- package/lib/types/reference-object/table-reference-object.d.ts.map +0 -1
- package/lib/types/services/current-data.service.d.ts.map +0 -1
- package/lib/types/services/defined-names.service.d.ts.map +0 -1
- package/lib/types/services/formula-engine.service.d.ts +0 -98
- package/lib/types/services/formula-engine.service.d.ts.map +0 -1
- package/lib/types/services/function.service.d.ts.map +0 -1
- package/lib/types/services/runtime.service.d.ts.map +0 -1
- package/lib/types/services/super-table.service.d.ts.map +0 -1
- package/lib/types/value-object/array-value-object.d.ts +0 -41
- package/lib/types/value-object/array-value-object.d.ts.map +0 -1
- package/lib/types/value-object/base-value-object.d.ts +0 -41
- package/lib/types/value-object/base-value-object.d.ts.map +0 -1
- package/lib/types/value-object/primitive-object.d.ts +0 -67
- package/lib/types/value-object/primitive-object.d.ts.map +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
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 } from '../models/formula-data.model';
|
|
18
|
+
import { CalculateFormulaService } from '../services/calculate-formula.service';
|
|
19
|
+
export declare class CalculateController extends Disposable {
|
|
20
|
+
private readonly _commandService;
|
|
21
|
+
private readonly _calculateFormulaService;
|
|
22
|
+
private readonly _currentUniverService;
|
|
23
|
+
private readonly _formulaDataModel;
|
|
24
|
+
constructor(_commandService: ICommandService, _calculateFormulaService: CalculateFormulaService, _currentUniverService: IUniverInstanceService, _formulaDataModel: FormulaDataModel);
|
|
25
|
+
private _initialize;
|
|
26
|
+
private _commandExecutedListener;
|
|
27
|
+
private _calculate;
|
|
28
|
+
private _initialExecuteFormulaListener;
|
|
29
|
+
private _initialExecuteFormulaProcessListener;
|
|
30
|
+
private _applyFormula;
|
|
31
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { Injector } from '@wendellhu/redi';
|
|
18
|
+
import { IFunctionService } from '../services/function.service';
|
|
19
|
+
export declare class FormulaController extends Disposable {
|
|
20
|
+
private readonly _commandService;
|
|
21
|
+
private readonly _injector;
|
|
22
|
+
private readonly _functionService;
|
|
23
|
+
constructor(_commandService: ICommandService, _injector: Injector, _functionService: IFunctionService);
|
|
24
|
+
private _initialize;
|
|
25
|
+
private _registerCommands;
|
|
26
|
+
private _registerFunctions;
|
|
27
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { IDefinedNamesService } from '../services/defined-names.service';
|
|
18
|
+
export declare class SetDefinedNameController extends Disposable {
|
|
19
|
+
private readonly _commandService;
|
|
20
|
+
private readonly _definedNamesService;
|
|
21
|
+
constructor(_commandService: ICommandService, _definedNamesService: IDefinedNamesService);
|
|
22
|
+
private _initialize;
|
|
23
|
+
private _commandExecutedListener;
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { IFeatureCalculationManagerService } from '../services/feature-calculation-manager.service';
|
|
18
|
+
export declare class SetFeatureCalculationController extends Disposable {
|
|
19
|
+
private readonly _commandService;
|
|
20
|
+
private readonly _featureCalculationManagerService;
|
|
21
|
+
constructor(_commandService: ICommandService, _featureCalculationManagerService: IFeatureCalculationManagerService);
|
|
22
|
+
private _initialize;
|
|
23
|
+
private _commandExecutedListener;
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { IOtherFormulaManagerService } from '../services/other-formula-manager.service';
|
|
18
|
+
export declare class SetOtherFormulaController extends Disposable {
|
|
19
|
+
private readonly _commandService;
|
|
20
|
+
private readonly _otherFormulaManagerService;
|
|
21
|
+
constructor(_commandService: ICommandService, _otherFormulaManagerService: IOtherFormulaManagerService);
|
|
22
|
+
private _initialize;
|
|
23
|
+
private _commandExecutedListener;
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { ISuperTableService } from '../services/super-table.service';
|
|
18
|
+
export declare class SetSuperTableController extends Disposable {
|
|
19
|
+
private readonly _commandService;
|
|
20
|
+
private readonly _superTableService;
|
|
21
|
+
constructor(_commandService: ICommandService, _superTableService: ISuperTableService);
|
|
22
|
+
private _initialize;
|
|
23
|
+
private _commandExecutedListener;
|
|
24
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { IWorkbookData } from '@univerjs/core';
|
|
17
|
+
import { Univer } from '@univerjs/core';
|
|
18
|
+
import type { Dependency } from '@wendellhu/redi';
|
|
19
|
+
export declare function createCommandTestBed(workbookConfig?: IWorkbookData, dependencies?: Dependency[]): {
|
|
20
|
+
univer: Univer;
|
|
21
|
+
get: {
|
|
22
|
+
<T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, lookUp?: import("@wendellhu/redi").LookUp | undefined): T;
|
|
23
|
+
<T_1>(id: import("@wendellhu/redi").DependencyIdentifier<T_1>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_1[];
|
|
24
|
+
<T_2>(id: import("@wendellhu/redi").DependencyIdentifier<T_2>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_2 | null;
|
|
25
|
+
<T_3>(id: import("@wendellhu/redi").DependencyIdentifier<T_3>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_3;
|
|
26
|
+
<T_4>(id: import("@wendellhu/redi").DependencyIdentifier<T_4>, quantity?: import("@wendellhu/redi").Quantity | undefined, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_4 | T_4[] | null;
|
|
27
|
+
<T_5>(id: import("@wendellhu/redi").DependencyIdentifier<T_5>, quantityOrLookup?: import("@wendellhu/redi").Quantity | import("@wendellhu/redi").LookUp | undefined, lookUp?: import("@wendellhu/redi").LookUp | undefined): T_5 | T_5[] | null;
|
|
28
|
+
};
|
|
29
|
+
sheet: import("@univerjs/core").Workbook;
|
|
30
|
+
};
|
|
@@ -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 {};
|
|
@@ -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,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 type { Nullable, Observable } from '@univerjs/core';
|
|
2
17
|
import type { LambdaPrivacyVarType } from '../ast-node/base-ast-node';
|
|
3
18
|
interface LexerNodeJson {
|
|
4
19
|
token: string;
|
|
5
20
|
children: Array<LexerNodeJson | string>;
|
|
6
21
|
}
|
|
7
|
-
export interface
|
|
22
|
+
export interface UniverFormulaEngineObserver {
|
|
8
23
|
onBeforeFormulaCalculateObservable: Observable<string>;
|
|
9
24
|
onAfterFormulaLexerObservable: Observable<LexerNode>;
|
|
10
25
|
}
|
|
@@ -46,4 +61,3 @@ export declare class LexerNode {
|
|
|
46
61
|
private _getIndexInParent;
|
|
47
62
|
}
|
|
48
63
|
export {};
|
|
49
|
-
//# sourceMappingURL=lexer-node.d.ts.map
|
|
@@ -1,7 +1,22 @@
|
|
|
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 { FormulaAstLRU } from '
|
|
3
|
-
import { ErrorType } from '
|
|
4
|
-
import type { ISequenceNode } from '../
|
|
17
|
+
import { FormulaAstLRU } from '../../basics/cache-lru';
|
|
18
|
+
import { ErrorType } from '../../basics/error-type';
|
|
19
|
+
import type { ISequenceArray, ISequenceNode } from '../utils/sequence';
|
|
5
20
|
import { LexerNode } from './lexer-node';
|
|
6
21
|
export declare const FormulaLexerNodeCache: FormulaAstLRU<LexerNode>;
|
|
7
22
|
export declare const FormulaSequenceNodeCache: FormulaAstLRU<(string | ISequenceNode)[]>;
|
|
@@ -10,11 +25,13 @@ export declare class LexerTreeBuilder extends Disposable {
|
|
|
10
25
|
private _upLevel;
|
|
11
26
|
private _segment;
|
|
12
27
|
private _bracketState;
|
|
28
|
+
private _squareBracketState;
|
|
13
29
|
private _bracesState;
|
|
14
30
|
private _singleQuotationState;
|
|
15
31
|
private _doubleQuotationState;
|
|
16
32
|
private _lambdaState;
|
|
17
33
|
private _colonState;
|
|
34
|
+
private _tableBracketState;
|
|
18
35
|
dispose(): void;
|
|
19
36
|
getUpLevel(): number;
|
|
20
37
|
isColonClose(): boolean;
|
|
@@ -25,6 +42,7 @@ export declare class LexerTreeBuilder extends Disposable {
|
|
|
25
42
|
isSingleQuotationClose(): boolean;
|
|
26
43
|
isBracesClose(): boolean;
|
|
27
44
|
isBracketClose(): boolean;
|
|
45
|
+
isSquareBracketClose(): boolean;
|
|
28
46
|
getCurrentLexerNode(): LexerNode;
|
|
29
47
|
getFunctionAndParameter(formulaString: string, strIndex: number): {
|
|
30
48
|
functionName: string;
|
|
@@ -38,6 +56,7 @@ export declare class LexerTreeBuilder extends Disposable {
|
|
|
38
56
|
*/
|
|
39
57
|
checkIfAddBracket(formulaString: string): number;
|
|
40
58
|
sequenceNodesBuilder(formulaString: string): (string | ISequenceNode)[] | undefined;
|
|
59
|
+
getSequenceNode(sequenceArray: ISequenceArray[]): (string | ISequenceNode)[];
|
|
41
60
|
private _getCurrentParamIndex;
|
|
42
61
|
private _isLastMergeString;
|
|
43
62
|
/**
|
|
@@ -47,12 +66,18 @@ export declare class LexerTreeBuilder extends Disposable {
|
|
|
47
66
|
private _mergeSequenceNodeReference;
|
|
48
67
|
private _pushSequenceNode;
|
|
49
68
|
private _replacePrefixString;
|
|
50
|
-
|
|
69
|
+
nodeMakerTest(formulaString: string): ErrorType.VALUE | (string | LexerNode)[] | undefined;
|
|
70
|
+
treeBuilder(formulaString: string, transformSuffix?: boolean, injectDefinedName?: (sequenceArray: ISequenceArray[]) => {
|
|
71
|
+
sequenceString: string;
|
|
72
|
+
hasDefinedName: boolean;
|
|
73
|
+
}): ErrorType.VALUE | LexerNode | (string | LexerNode)[] | undefined;
|
|
51
74
|
private _suffixExpressionHandler;
|
|
52
75
|
private _resetCurrentLexerNode;
|
|
53
76
|
private _resetSegment;
|
|
54
77
|
private _openBracket;
|
|
55
78
|
private _closeBracket;
|
|
79
|
+
private _openSquareBracket;
|
|
80
|
+
private _closeSquareBracket;
|
|
56
81
|
private _getCurrentBracket;
|
|
57
82
|
private _openBraces;
|
|
58
83
|
private _closeBraces;
|
|
@@ -64,6 +89,9 @@ export declare class LexerTreeBuilder extends Disposable {
|
|
|
64
89
|
private _closeLambda;
|
|
65
90
|
private _openColon;
|
|
66
91
|
private _closeColon;
|
|
92
|
+
private _isTableBracket;
|
|
93
|
+
private _openTableBracket;
|
|
94
|
+
private _closeTableBracket;
|
|
67
95
|
private _getLastChildCurrentLexerNode;
|
|
68
96
|
private _getLastChildCurrent;
|
|
69
97
|
private _setParentCurrentLexerNode;
|
|
@@ -81,4 +109,3 @@ export declare class LexerTreeBuilder extends Disposable {
|
|
|
81
109
|
private _resetTemp;
|
|
82
110
|
private _nodeMaker;
|
|
83
111
|
}
|
|
84
|
-
//# sourceMappingURL=lexer.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
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 } from '@univerjs/core';
|
|
17
|
+
import { IDefinedNamesService } from '../../services/defined-names.service';
|
|
18
|
+
import { IFormulaRuntimeService } from '../../services/runtime.service';
|
|
19
|
+
import { LexerTreeBuilder } from './lexer-tree-builder';
|
|
20
|
+
export declare class Lexer extends Disposable {
|
|
21
|
+
private readonly _definedNamesService;
|
|
22
|
+
private readonly _runtimeService;
|
|
23
|
+
private readonly _lexerTreeBuilder;
|
|
24
|
+
constructor(_definedNamesService: IDefinedNamesService, _runtimeService: IFormulaRuntimeService, _lexerTreeBuilder: LexerTreeBuilder);
|
|
25
|
+
treeBuilder(formulaString: string, transformSuffix?: boolean): import("../..").ErrorType.VALUE | import("./lexer-node").LexerNode | (string | import("./lexer-node").LexerNode)[] | undefined;
|
|
26
|
+
private _injectDefinedName;
|
|
27
|
+
}
|
|
@@ -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 type { Nullable } from '@univerjs/core';
|
|
2
17
|
import { Disposable } from '@univerjs/core';
|
|
18
|
+
import { IFormulaRuntimeService } from '../../services/runtime.service';
|
|
3
19
|
import { AstRootNodeFactory } from '../ast-node/ast-root-node';
|
|
4
20
|
import type { BaseAstNode } from '../ast-node/base-ast-node';
|
|
5
21
|
import { FunctionNodeFactory } from '../ast-node/function-node';
|
|
@@ -11,7 +27,6 @@ import { ReferenceNodeFactory } from '../ast-node/reference-node';
|
|
|
11
27
|
import { SuffixNodeFactory } from '../ast-node/suffix-node';
|
|
12
28
|
import { UnionNodeFactory } from '../ast-node/union-node';
|
|
13
29
|
import { ValueNodeFactory } from '../ast-node/value-node';
|
|
14
|
-
import { IFormulaRuntimeService } from '../services/runtime.service';
|
|
15
30
|
import { LexerNode } from './lexer-node';
|
|
16
31
|
export declare class AstTreeBuilder extends Disposable {
|
|
17
32
|
private readonly _runtimeService;
|
|
@@ -38,4 +53,3 @@ export declare class AstTreeBuilder extends Disposable {
|
|
|
38
53
|
private _checkAstNode;
|
|
39
54
|
private _initializeAstNode;
|
|
40
55
|
}
|
|
41
|
-
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { LexerNode } from '../analysis/lexer-node';
|
|
17
|
+
import { BaseAstNode } from './base-ast-node';
|
|
18
|
+
import { BaseAstNodeFactory } from './base-ast-node-factory';
|
|
19
|
+
import { NodeType } from './node-type';
|
|
20
|
+
export declare class AstRootNode extends BaseAstNode {
|
|
21
|
+
get nodeType(): NodeType;
|
|
22
|
+
execute(): void;
|
|
23
|
+
}
|
|
24
|
+
export declare class AstRootNodeFactory extends BaseAstNodeFactory {
|
|
25
|
+
get zIndex(): number;
|
|
26
|
+
checkAndCreateNodeType(param: LexerNode | string): AstRootNode | undefined;
|
|
27
|
+
}
|
|
@@ -0,0 +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
|
+
*/
|
|
16
|
+
import type { Nullable } from '@univerjs/core';
|
|
17
|
+
import { Disposable } from '@univerjs/core';
|
|
18
|
+
import { LexerNode } from '../analysis/lexer-node';
|
|
19
|
+
import { BaseAstNode } from './base-ast-node';
|
|
20
|
+
export declare const DEFAULT_AST_NODE_FACTORY_Z_INDEX = 100;
|
|
21
|
+
export declare class BaseAstNodeFactory extends Disposable {
|
|
22
|
+
get zIndex(): number;
|
|
23
|
+
create(param: LexerNode | string, currentRow?: number, currentColumn?: number): BaseAstNode;
|
|
24
|
+
checkAndCreateNodeType(param: LexerNode | string): Nullable<BaseAstNode>;
|
|
25
|
+
}
|
|
@@ -1,9 +1,24 @@
|
|
|
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 { Nullable } from '@univerjs/core';
|
|
2
17
|
import { Disposable } from '@univerjs/core';
|
|
3
|
-
import { AstNodePromiseType } from '
|
|
4
|
-
import type { ErrorType } from '
|
|
5
|
-
import { ErrorValueObject } from '../other-object/error-value-object';
|
|
18
|
+
import { AstNodePromiseType } from '../../basics/common';
|
|
19
|
+
import type { ErrorType } from '../../basics/error-type';
|
|
6
20
|
import type { FunctionVariantType } from '../reference-object/base-reference-object';
|
|
21
|
+
import { ErrorValueObject } from '../value-object/base-value-object';
|
|
7
22
|
import { NodeType } from './node-type';
|
|
8
23
|
interface IAstNodeNodeJson {
|
|
9
24
|
token: string;
|
|
@@ -54,4 +69,3 @@ export declare class ErrorNode extends BaseAstNode {
|
|
|
54
69
|
getValue(): ErrorValueObject;
|
|
55
70
|
}
|
|
56
71
|
export {};
|
|
57
|
-
//# sourceMappingURL=base-ast-node.d.ts.map
|
|
@@ -1,8 +1,23 @@
|
|
|
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 { Injector } from '@wendellhu/redi';
|
|
17
|
+
import { AstNodePromiseType } from '../../basics/common';
|
|
18
|
+
import type { BaseFunction } from '../../functions/base-function';
|
|
19
|
+
import { IFunctionService } from '../../services/function.service';
|
|
2
20
|
import type { LexerNode } from '../analysis/lexer-node';
|
|
3
|
-
import { AstNodePromiseType } from '../basics/common';
|
|
4
|
-
import type { BaseFunction } from '../functions/base-function';
|
|
5
|
-
import { IFunctionService } from '../services/function.service';
|
|
6
21
|
import { BaseAstNode } from './base-ast-node';
|
|
7
22
|
import { BaseAstNodeFactory } from './base-ast-node-factory';
|
|
8
23
|
import { NodeType } from './node-type';
|
|
@@ -21,4 +36,3 @@ export declare class FunctionNodeFactory extends BaseAstNodeFactory {
|
|
|
21
36
|
create(token: string): BaseAstNode;
|
|
22
37
|
checkAndCreateNodeType(param: LexerNode | string): BaseAstNode | undefined;
|
|
23
38
|
}
|
|
24
|
-
//# sourceMappingURL=function-node.d.ts.map
|
|
@@ -0,0 +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
|
+
*/
|
|
16
|
+
export * from './ast-root-node';
|
|
17
|
+
export * from './function-node';
|
|
18
|
+
export * from './lambda-node';
|
|
19
|
+
export * from './lambda-parameter-node';
|
|
20
|
+
export * from './operator-node';
|
|
21
|
+
export * from './prefix-node';
|
|
22
|
+
export * from './reference-node';
|
|
23
|
+
export * from './suffix-node';
|
|
24
|
+
export * from './union-node';
|
|
25
|
+
export * from './value-node';
|
|
@@ -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
|
+
*/
|
|
16
|
+
import { IFormulaRuntimeService } from '../../services/runtime.service';
|
|
1
17
|
import { LexerNode } from '../analysis/lexer-node';
|
|
2
|
-
import { IFormulaRuntimeService } from '../services/runtime.service';
|
|
3
18
|
import { BaseAstNode } from './base-ast-node';
|
|
4
19
|
import { BaseAstNodeFactory } from './base-ast-node-factory';
|
|
5
20
|
import { NodeType } from './node-type';
|
|
@@ -21,4 +36,3 @@ export declare class LambdaNodeFactory extends BaseAstNodeFactory {
|
|
|
21
36
|
private _updateLambdaStatement;
|
|
22
37
|
private _updateTree;
|
|
23
38
|
}
|
|
24
|
-
//# sourceMappingURL=lambda-node.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 { LexerNode } from '../analysis/lexer-node';
|
|
2
17
|
import type { LambdaPrivacyVarType } from './base-ast-node';
|
|
3
18
|
import { BaseAstNode } from './base-ast-node';
|
|
@@ -18,4 +33,3 @@ export declare class LambdaParameterNodeFactory extends BaseAstNodeFactory {
|
|
|
18
33
|
create(param: LexerNode): BaseAstNode;
|
|
19
34
|
checkAndCreateNodeType(param: LexerNode | string): BaseAstNode | undefined;
|
|
20
35
|
}
|
|
21
|
-
//# sourceMappingURL=lambda-parameter-node.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
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 declare enum NodeType {
|
|
17
|
+
REFERENCE = "ReferenceNode",
|
|
18
|
+
VALUE = "ValueNode",
|
|
19
|
+
OPERATOR = "OperatorNode",
|
|
20
|
+
FUNCTION = "FunctionNode",
|
|
21
|
+
LAMBDA = "LambdaNode",
|
|
22
|
+
LAMBDA_PARAMETER = "LambdaNodeParameter",
|
|
23
|
+
ERROR = "ErrorNode",
|
|
24
|
+
BASE = "Base",
|
|
25
|
+
ROOT = "Root",
|
|
26
|
+
UNION = "UnionNode",
|
|
27
|
+
PREFIX = "PrefixNode",
|
|
28
|
+
SUFFIX = "SuffixNode",
|
|
29
|
+
NULL = "NullNode"
|
|
30
|
+
}
|
|
31
|
+
export declare const NODE_ORDER_MAP: Map<NodeType, number>;
|