@univerjs/engine-formula 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +1033 -1007
- package/lib/types/basics/match-token.d.ts +1 -1
- package/lib/types/engine/value-object/base-value-object.d.ts +4 -1
- package/lib/types/functions/util.d.ts +2 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/services/calculate-formula.service.d.ts +1 -0
- package/lib/types/services/feature-calculation-manager.service.d.ts +1 -1
- package/lib/umd/index.js +2 -2
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compareToken, matchToken, operatorToken, prefixToken, suffixToken } from './token';
|
|
2
|
-
export declare const FORMULA_LEXER_TOKENS: (operatorToken | suffixToken | compareToken |
|
|
2
|
+
export declare const FORMULA_LEXER_TOKENS: (operatorToken | suffixToken | compareToken | prefixToken | matchToken)[];
|
|
3
3
|
export declare function isFormulaLexerToken(str: string): boolean;
|
|
4
4
|
export declare function includeFormulaLexerToken(str: string): boolean;
|
|
5
5
|
export declare function normalizeSheetName(sheetName: string): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Nullable } from '@univerjs/core';
|
|
1
|
+
import { CustomData, Nullable } from '@univerjs/core';
|
|
2
2
|
import { FormulaAstLRU } from '../../basics/cache-lru';
|
|
3
3
|
import { ConcatenateType } from '../../basics/common';
|
|
4
4
|
import { ErrorType } from '../../basics/error-type';
|
|
@@ -16,6 +16,7 @@ export interface IArrayValueObject {
|
|
|
16
16
|
}
|
|
17
17
|
export declare class BaseValueObject extends ObjectClassType {
|
|
18
18
|
private _rawValue;
|
|
19
|
+
private _customData;
|
|
19
20
|
constructor(_rawValue: string | number | boolean);
|
|
20
21
|
isValueObject(): boolean;
|
|
21
22
|
toUnitRange(): {
|
|
@@ -32,6 +33,8 @@ export declare class BaseValueObject extends ObjectClassType {
|
|
|
32
33
|
getArrayValue(): Nullable<BaseValueObject>[][];
|
|
33
34
|
setValue(value: string | number | boolean): void;
|
|
34
35
|
setArrayValue(value: BaseValueObject[][]): void;
|
|
36
|
+
withCustomData(data: CustomData): this;
|
|
37
|
+
getCustomData(): CustomData;
|
|
35
38
|
isCube(): boolean;
|
|
36
39
|
isString(): boolean;
|
|
37
40
|
isNumber(): boolean;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
export type { BaseAstNode } from './engine/ast-node/base-ast-node.js';
|
|
17
|
+
export { generateExecuteAstNodeData } from './engine/utils/ast-node-tool';
|
|
18
|
+
export { getObjectValue } from './functions/util';
|
|
16
19
|
export type { IArrayFormulaRangeType, IArrayFormulaUnitCellType, IDirtyUnitFeatureMap, IDirtyUnitOtherFormulaMap, IDirtyUnitSheetDefinedNameMap, IDirtyUnitSheetNameMap, IFeatureDirtyRangeType, IFormulaData, IFormulaDataItem, IFormulaDatasetConfig, IRuntimeUnitDataType, ISheetData, IUnitData, IUnitSheetNameMap, } from './basics/common';
|
|
17
20
|
export { BooleanValue } from './basics/common';
|
|
18
21
|
export { isInDirtyRange } from './basics/dirty';
|
|
@@ -34,6 +34,7 @@ export declare class CalculateFormulaService extends Disposable {
|
|
|
34
34
|
protected readonly _executionCompleteListener$: Subject<IAllRuntimeData>;
|
|
35
35
|
readonly executionCompleteListener$: Observable<IAllRuntimeData>;
|
|
36
36
|
constructor(_configService: IConfigService, _lexer: Lexer, _currentConfigService: IFormulaCurrentConfigService, _runtimeService: IFormulaRuntimeService, _formulaDependencyGenerator: IFormulaDependencyGenerator, _interpreter: Interpreter, _astTreeBuilder: AstTreeBuilder);
|
|
37
|
+
dispose(): void;
|
|
37
38
|
/**
|
|
38
39
|
* Stop the execution of the formula.
|
|
39
40
|
*/
|
|
@@ -2,8 +2,8 @@ import { IUnitRange, Nullable, Disposable } from '@univerjs/core';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { IFeatureDirtyRangeType, IRuntimeUnitDataType } from '../basics/common';
|
|
4
4
|
import { IRemoveFeatureCalculationMutationParam } from '../commands/mutations/set-feature-calculation.mutation';
|
|
5
|
-
import { IAllRuntimeData } from './runtime.service';
|
|
6
5
|
import { IFormulaDirtyData } from './current-data.service';
|
|
6
|
+
import { IAllRuntimeData } from './runtime.service';
|
|
7
7
|
export interface IFeatureCalculationManagerParam {
|
|
8
8
|
unitId: string;
|
|
9
9
|
subUnitId: string;
|