@univerjs/engine-formula 0.1.0-alpha.2 → 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/README.md +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +3968 -2514
- package/lib/types/basics/common.d.ts +5 -5
- package/lib/types/basics/error-type.d.ts +1 -1
- package/lib/types/basics/inverted-index-cache.d.ts +40 -0
- package/lib/types/basics/object-class-type.d.ts +2 -2
- package/lib/types/basics/regex.d.ts +2 -2
- package/lib/types/basics/runtime.d.ts +17 -0
- package/lib/types/engine/ast-node/base-ast-node-factory.d.ts +1 -1
- package/lib/types/engine/ast-node/base-ast-node.d.ts +1 -1
- package/lib/types/engine/ast-node/reference-node.d.ts +2 -2
- package/lib/types/engine/reference-object/base-reference-object.d.ts +15 -14
- package/lib/types/engine/reference-object/cell-reference-object.d.ts +1 -1
- package/lib/types/engine/reference-object/column-reference-object.d.ts +1 -1
- package/lib/types/engine/reference-object/row-reference-object.d.ts +1 -1
- 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/math-kit.d.ts +30 -0
- package/lib/types/engine/utils/object-compare.d.ts +26 -0
- 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 +107 -17
- package/lib/types/engine/value-object/base-value-object.d.ts +98 -21
- package/lib/types/engine/value-object/primitive-object.d.ts +105 -40
- package/lib/types/functions/base-function.d.ts +1 -3
- package/lib/types/functions/compatibility/concatenate/concatenate.d.ts +1 -1
- package/lib/types/functions/math/power/power.d.ts +1 -1
- package/lib/types/functions/math/sum/sum.d.ts +1 -3
- package/lib/types/functions/math/sumif/sumif.d.ts +2 -3
- package/lib/types/functions/math/sumifs/sumifs.d.ts +1 -1
- package/lib/types/functions/meta/compare/compare.d.ts +2 -1
- package/lib/types/functions/meta/divided/divided.d.ts +2 -1
- package/lib/types/functions/meta/minus/minus.d.ts +2 -1
- package/lib/types/functions/meta/multiply/multiply.d.ts +2 -1
- package/lib/types/functions/meta/plus/plus.d.ts +2 -1
- package/lib/types/functions/statistical/average/average.d.ts +1 -1
- package/lib/types/{engine/other-object/error-value-object.d.ts → functions/statistical/counta/counta.d.ts} +5 -10
- package/lib/types/functions/statistical/function-names.d.ts +2 -1
- package/lib/types/functions/statistical/max/max.d.ts +1 -2
- package/lib/types/index.d.ts +2 -2
- package/lib/types/models/formula-data.model.d.ts +3 -3
- package/lib/types/services/current-data.service.d.ts +0 -1
- package/lib/types/services/runtime.service.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -6
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { BooleanNumber, ICellData, IRange, IUnitRange, Nullable, ObjectMatrix
|
|
16
|
+
import type { BooleanNumber, ICellData, IObjectMatrixPrimitiveType, IRange, IUnitRange, Nullable, ObjectMatrix } from '@univerjs/core';
|
|
17
17
|
export declare const ERROR_VALUE_OBJECT_CLASS_TYPE = "errorValueObject";
|
|
18
18
|
export declare const ASYNC_OBJECT_CLASS_TYPE = "asyncObject";
|
|
19
19
|
export declare const REFERENCE_OBJECT_CLASS_TYPE = "referenceObject";
|
|
@@ -43,7 +43,7 @@ export interface IUnitData {
|
|
|
43
43
|
}
|
|
44
44
|
export interface IRuntimeUnitDataType {
|
|
45
45
|
[unitId: string]: {
|
|
46
|
-
[sheetId: string]: ObjectMatrix<ICellData
|
|
46
|
+
[sheetId: string]: ObjectMatrix<Nullable<ICellData>>;
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
export interface IRuntimeOtherUnitDataType {
|
|
@@ -72,7 +72,7 @@ export interface IDirtyUnitFeatureMap {
|
|
|
72
72
|
}
|
|
73
73
|
export interface IArrayFormulaRangeType {
|
|
74
74
|
[unitId: string]: {
|
|
75
|
-
[sheetId: string]:
|
|
75
|
+
[sheetId: string]: IObjectMatrixPrimitiveType<IRange>;
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
export interface IFeatureDirtyRangeType {
|
|
@@ -82,12 +82,12 @@ export interface IFeatureDirtyRangeType {
|
|
|
82
82
|
}
|
|
83
83
|
export interface IArrayFormulaUnitCellType {
|
|
84
84
|
[unitId: string]: {
|
|
85
|
-
[sheetId: string]:
|
|
85
|
+
[sheetId: string]: IObjectMatrixPrimitiveType<Nullable<ICellData>>;
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
export interface IFormulaData {
|
|
89
89
|
[unitId: string]: {
|
|
90
|
-
[sheetId: string]:
|
|
90
|
+
[sheetId: string]: IObjectMatrixPrimitiveType<IFormulaDataItem>;
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
export interface IOtherFormulaData {
|
|
@@ -0,0 +1,40 @@
|
|
|
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 class InvertedIndexCache {
|
|
17
|
+
/**
|
|
18
|
+
* {
|
|
19
|
+
* unitId:{
|
|
20
|
+
* sheetId:{
|
|
21
|
+
* 'columnIndex': {
|
|
22
|
+
* 10:[1,3,4,5],
|
|
23
|
+
* 5:[2,6,11,22]
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
*/
|
|
29
|
+
private _cache;
|
|
30
|
+
private _continueBuildingCache;
|
|
31
|
+
set(unitId: string, sheetId: string, column: number, value: string | number | boolean, row: number): void;
|
|
32
|
+
getCellValuePositions(unitId: string, sheetId: string, column: number): Map<string | number | boolean, number[]> | undefined;
|
|
33
|
+
getCellPositions(unitId: string, sheetId: string, column: number, value: string | number | boolean): number[] | undefined;
|
|
34
|
+
getCellPosition(unitId: string, sheetId: string, column: number, value: string | number | boolean, startRow: number, endRow: number): number | undefined;
|
|
35
|
+
setContinueBuildingCache(unitId: string, sheetId: string, column: number, startRow: number, endRow: number): void;
|
|
36
|
+
shouldContinueBuildingCache(unitId: string, sheetId: string, column: number, row: number): boolean;
|
|
37
|
+
canUseCache(unitId: string, sheetId: string, column: number, rangeStartRow: number, rangeEndRow: number): boolean;
|
|
38
|
+
clear(): void;
|
|
39
|
+
}
|
|
40
|
+
export declare const CELL_INVERTED_INDEX_CACHE: InvertedIndexCache;
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Disposable } from '@univerjs/core';
|
|
17
17
|
export declare class ObjectClassType extends Disposable {
|
|
18
|
-
|
|
18
|
+
isError(): boolean;
|
|
19
19
|
isAsyncObject(): boolean;
|
|
20
20
|
isReferenceObject(): boolean;
|
|
21
21
|
isValueObject(): boolean;
|
|
22
|
-
|
|
22
|
+
isEqualType(object: ObjectClassType): boolean;
|
|
23
23
|
}
|
|
@@ -27,6 +27,6 @@ export declare const REFERENCE_REGEX_SINGLE_COLUMN = "^('?\\[((?![\\/?:\"<>|*\\\
|
|
|
27
27
|
export declare const REFERENCE_TABLE_ALL_COLUMN_REGEX = "^('?\\[((?![\\/?:\"<>|*\\\\]).)*\\])?((?![~!@#$%^&*()_+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+$";
|
|
28
28
|
export declare const REFERENCE_TABLE_SINGLE_COLUMN_REGEX = "^('?\\[((?![\\/?:\"<>|*\\\\]).)*\\])?((?![~!@#$%^&*()_+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+(\\[((?<!#).)*\\]|\\[\\[#.+\\]\\s*?,\\s*?\\[((?<!#).)*\\]\\])+$";
|
|
29
29
|
export declare const REFERENCE_TABLE_MULTIPLE_COLUMN_REGEX = "^('?\\[((?![\\/?:\"<>|*\\\\]).)*\\])?((?![~!@#$%^&*()_+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+(\\[\\[((?<!#).)*\\]\\s*?:\\s*?\\[((?<!#).)*\\]\\])?$|^((?![~!@#$%^&*()_+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+(\\[\\[#.+\\]\\s*?,\\s*?\\[((?<!#).)*\\]\\s*?:\\s*?\\[((?<!#).)*\\]\\])?$";
|
|
30
|
-
export declare const $SUPER_TABLE_COLUMN_REGEX
|
|
31
|
-
export declare const $ARRAY_VALUE_REGEX
|
|
30
|
+
export declare const $SUPER_TABLE_COLUMN_REGEX = "[.*?]";
|
|
31
|
+
export declare const $ARRAY_VALUE_REGEX = "{.*?}";
|
|
32
32
|
export declare function isReferenceString(refString: string): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { IArrayFormulaUnitCellType, IRuntimeUnitDataType } from './common';
|
|
17
|
+
export declare function convertUnitDataToRuntime(unitData: IArrayFormulaUnitCellType): IRuntimeUnitDataType;
|
|
@@ -20,6 +20,6 @@ import { BaseAstNode } from './base-ast-node';
|
|
|
20
20
|
export declare const DEFAULT_AST_NODE_FACTORY_Z_INDEX = 100;
|
|
21
21
|
export declare class BaseAstNodeFactory extends Disposable {
|
|
22
22
|
get zIndex(): number;
|
|
23
|
-
create(param: LexerNode | string): BaseAstNode;
|
|
23
|
+
create(param: LexerNode | string, currentRow?: number, currentColumn?: number): BaseAstNode;
|
|
24
24
|
checkAndCreateNodeType(param: LexerNode | string): Nullable<BaseAstNode>;
|
|
25
25
|
}
|
|
@@ -17,8 +17,8 @@ import type { Nullable } from '@univerjs/core';
|
|
|
17
17
|
import { Disposable } from '@univerjs/core';
|
|
18
18
|
import { AstNodePromiseType } from '../../basics/common';
|
|
19
19
|
import type { ErrorType } from '../../basics/error-type';
|
|
20
|
-
import { ErrorValueObject } from '../other-object/error-value-object';
|
|
21
20
|
import type { FunctionVariantType } from '../reference-object/base-reference-object';
|
|
21
|
+
import { ErrorValueObject } from '../value-object/base-value-object';
|
|
22
22
|
import { NodeType } from './node-type';
|
|
23
23
|
interface IAstNodeNodeJson {
|
|
24
24
|
token: string;
|
|
@@ -21,7 +21,7 @@ import { ISuperTableService } from '../../services/super-table.service';
|
|
|
21
21
|
import { Lexer } from '../analysis/lexer';
|
|
22
22
|
import { LexerNode } from '../analysis/lexer-node';
|
|
23
23
|
import type { BaseReferenceObject } from '../reference-object/base-reference-object';
|
|
24
|
-
import { BaseAstNode
|
|
24
|
+
import { BaseAstNode } from './base-ast-node';
|
|
25
25
|
import { BaseAstNodeFactory } from './base-ast-node-factory';
|
|
26
26
|
import { NodeType } from './node-type';
|
|
27
27
|
export declare class ReferenceNode extends BaseAstNode {
|
|
@@ -40,5 +40,5 @@ export declare class ReferenceNodeFactory extends BaseAstNodeFactory {
|
|
|
40
40
|
private readonly _injector;
|
|
41
41
|
constructor(_definedNamesService: IDefinedNamesService, _superTableService: ISuperTableService, _formulaRuntimeService: IFormulaRuntimeService, _lexer: Lexer, _injector: Injector);
|
|
42
42
|
get zIndex(): number;
|
|
43
|
-
checkAndCreateNodeType(param: LexerNode | string):
|
|
43
|
+
checkAndCreateNodeType(param: LexerNode | string): ReferenceNode | undefined;
|
|
44
44
|
}
|
|
@@ -14,14 +14,15 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { ICellData, IRange, Nullable } from '@univerjs/core';
|
|
17
|
+
import { FormulaAstLRU } from '../../basics/cache-lru';
|
|
17
18
|
import type { IRuntimeUnitDataType, IUnitData, IUnitSheetNameMap } from '../../basics/common';
|
|
18
19
|
import { ObjectClassType } from '../../basics/object-class-type';
|
|
19
|
-
import { ErrorValueObject } from '../other-object/error-value-object';
|
|
20
20
|
import { ArrayValueObject } from '../value-object/array-value-object';
|
|
21
|
-
import type
|
|
21
|
+
import { type BaseValueObject, ErrorValueObject } from '../value-object/base-value-object';
|
|
22
22
|
import { BooleanValueObject, NumberValueObject, StringValueObject } from '../value-object/primitive-object';
|
|
23
|
-
export type NodeValueType = BaseValueObject | BaseReferenceObject |
|
|
24
|
-
export type FunctionVariantType = BaseValueObject | BaseReferenceObject
|
|
23
|
+
export type NodeValueType = BaseValueObject | BaseReferenceObject | AsyncObject;
|
|
24
|
+
export type FunctionVariantType = BaseValueObject | BaseReferenceObject;
|
|
25
|
+
export declare const FORMULA_REF_TO_ARRAY_CACHE: FormulaAstLRU<ArrayValueObject>;
|
|
25
26
|
export declare class BaseReferenceObject extends ObjectClassType {
|
|
26
27
|
private _token;
|
|
27
28
|
private _forcedSheetId;
|
|
@@ -53,8 +54,8 @@ export declare class BaseReferenceObject extends ObjectClassType {
|
|
|
53
54
|
endColumn: number;
|
|
54
55
|
};
|
|
55
56
|
isReferenceObject(): boolean;
|
|
56
|
-
iterator(callback: (valueObject:
|
|
57
|
-
getFirstCell():
|
|
57
|
+
iterator(callback: (valueObject: Nullable<BaseValueObject>, rowIndex: number, columnIndex: number) => Nullable<boolean>): Nullable<boolean>;
|
|
58
|
+
getFirstCell(): NumberValueObject | StringValueObject | BooleanValueObject | ErrorValueObject | ArrayValueObject;
|
|
58
59
|
getRangeData(): IRange;
|
|
59
60
|
setRangeData(range: IRange): void;
|
|
60
61
|
getUnitId(): string;
|
|
@@ -93,16 +94,16 @@ export declare class BaseReferenceObject extends ObjectClassType {
|
|
|
93
94
|
isTable(): boolean;
|
|
94
95
|
unionBy(referenceObject: BaseReferenceObject): NodeValueType;
|
|
95
96
|
unionRange(rangeData1: IRange, rangeData2: IRange): IRange;
|
|
96
|
-
getCellValueObject(cell: ICellData):
|
|
97
|
-
getCellByRow(row: number):
|
|
98
|
-
getCellByColumn(column: number):
|
|
97
|
+
getCellValueObject(cell: ICellData): NumberValueObject | StringValueObject | BooleanValueObject | ErrorValueObject | ArrayValueObject;
|
|
98
|
+
getCellByRow(row: number): NumberValueObject | StringValueObject | BooleanValueObject | ErrorValueObject | ArrayValueObject;
|
|
99
|
+
getCellByColumn(column: number): NumberValueObject | StringValueObject | BooleanValueObject | ErrorValueObject | ArrayValueObject;
|
|
99
100
|
getCurrentActiveSheetData(): import("../../basics/common").ISheetItem;
|
|
100
|
-
getCurrentRuntimeSheetData(): import("@univerjs/core").ObjectMatrix<ICellData
|
|
101
|
-
getCurrentActiveArrayFormulaCellData(): import("@univerjs/core").ObjectMatrix<ICellData
|
|
102
|
-
getCurrentRuntimeActiveArrayFormulaCellData(): import("@univerjs/core").ObjectMatrix<ICellData
|
|
103
|
-
getCellData(row: number, column: number):
|
|
101
|
+
getCurrentRuntimeSheetData(): import("@univerjs/core").ObjectMatrix<Nullable<ICellData>>;
|
|
102
|
+
getCurrentActiveArrayFormulaCellData(): import("@univerjs/core").ObjectMatrix<Nullable<ICellData>>;
|
|
103
|
+
getCurrentRuntimeActiveArrayFormulaCellData(): import("@univerjs/core").ObjectMatrix<Nullable<ICellData>>;
|
|
104
|
+
getCellData(row: number, column: number): ICellData;
|
|
104
105
|
getRuntimeFeatureCellValue(row: number, column: number): ICellData | undefined;
|
|
105
|
-
getCellByPosition(row?: number, column?: number):
|
|
106
|
+
getCellByPosition(row?: number, column?: number): NumberValueObject | StringValueObject | BooleanValueObject | ErrorValueObject | ArrayValueObject;
|
|
106
107
|
toArrayValueObject(): ArrayValueObject;
|
|
107
108
|
toUnitRange(): {
|
|
108
109
|
range: IRange;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IRange } from '@univerjs/core';
|
|
17
|
-
import { ErrorValueObject } from '../
|
|
17
|
+
import { ErrorValueObject } from '../value-object/base-value-object';
|
|
18
18
|
import { BaseReferenceObject } from './base-reference-object';
|
|
19
19
|
import { RangeReferenceObject } from './range-reference-object';
|
|
20
20
|
export declare class CellReferenceObject extends BaseReferenceObject {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ErrorValueObject } from '../
|
|
16
|
+
import { ErrorValueObject } from '../value-object/base-value-object';
|
|
17
17
|
import { BaseReferenceObject } from './base-reference-object';
|
|
18
18
|
export declare class ColumnReferenceObject extends BaseReferenceObject {
|
|
19
19
|
constructor(token: string);
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ErrorValueObject } from '../
|
|
16
|
+
import { ErrorValueObject } from '../value-object/base-value-object';
|
|
17
17
|
import { BaseReferenceObject } from './base-reference-object';
|
|
18
18
|
export declare class RowReferenceObject extends BaseReferenceObject {
|
|
19
19
|
constructor(token: string);
|
|
@@ -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,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
|
+
*/
|
|
16
|
+
import { compareToken } from '../../basics/token';
|
|
17
|
+
export declare function getCompare(): (x: string, y: string) => number;
|
|
18
|
+
export declare function isWildcard(str: string): boolean;
|
|
19
|
+
export declare function isMatchWildcard(currentValue: string, value: string): boolean;
|
|
20
|
+
export declare function replaceWildcard(value: string): string;
|
|
21
|
+
export declare function compareWithWildcard(currentValue: string, value: string, operator: compareToken): boolean;
|
|
@@ -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
|
+
/**
|
|
17
|
+
* Packaging basic mathematical calculation methods, adding precision parameters and solving native JavaScript precision problems
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Native JavaScript: 0.6789 * 10000 = 6788.999999999999
|
|
21
|
+
*
|
|
22
|
+
* @param a
|
|
23
|
+
* @param b
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
export declare function multiply(a: number, b: number): number;
|
|
27
|
+
export declare function round(base: number, precision: number): number;
|
|
28
|
+
export declare function floor(base: number, precision: number): number;
|
|
29
|
+
export declare function ceil(base: number, precision: number): number;
|
|
30
|
+
export declare function pow(base: number, exponent: number): number;
|
|
@@ -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 { compareToken } from '../../basics/token';
|
|
17
|
+
import type { BaseReferenceObject } from '../reference-object/base-reference-object';
|
|
18
|
+
import type { BaseValueObject } from '../value-object/base-value-object';
|
|
19
|
+
export declare function findCompareToken(str: string): [compareToken, BaseValueObject];
|
|
20
|
+
/**
|
|
21
|
+
* When it contains both comparison characters and wildcard characters
|
|
22
|
+
* 1. The value of apple* has the same effect as =apple*
|
|
23
|
+
* 2. >=apple*: normal value, >apple: obtains the same effect as >=apple*
|
|
24
|
+
* 3. <apple*: normal value, <=apple: obtains the same effect as <apple*
|
|
25
|
+
*/
|
|
26
|
+
export declare function valueObjectCompare(range: BaseReferenceObject, criteria: BaseValueObject): BaseValueObject;
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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 {};
|