@univerjs/engine-formula 1.0.0-rc.0 → 1.0.1
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/{en-US-x6yRGjN6.js → en-US-DrAfIiBE.js} +0 -1
- package/lib/cjs/facade.js +6 -2
- package/lib/cjs/index.js +1195 -792
- package/lib/cjs/locale/ar-SA.js +0 -1
- package/lib/cjs/locale/ca-ES.js +0 -1
- package/lib/cjs/locale/de-DE.js +0 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +0 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +0 -1
- package/lib/cjs/locale/id-ID.js +0 -1
- package/lib/cjs/locale/it-IT.js +0 -1
- package/lib/cjs/locale/ja-JP.js +0 -1
- package/lib/cjs/locale/ko-KR.js +0 -1
- package/lib/cjs/locale/pl-PL.js +0 -1
- package/lib/cjs/locale/pt-BR.js +0 -1
- package/lib/cjs/locale/ru-RU.js +0 -1
- package/lib/cjs/locale/sk-SK.js +0 -1
- package/lib/cjs/locale/vi-VN.js +0 -1
- package/lib/cjs/locale/zh-CN.js +0 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/cjs/{zh-TW-vwS1qqtd.js → zh-TW-CvMudVQy.js} +0 -1
- package/lib/es/facade.js +6 -2
- package/lib/es/index.js +1194 -791
- package/lib/facade.js +6 -2
- package/lib/index.js +1194 -791
- package/lib/types/basics/common.d.ts +3 -1
- package/lib/types/basics/inverted-index-cache.d.ts +1 -0
- package/lib/types/basics/regex.d.ts +7 -7
- package/lib/types/basics/runtime.d.ts +11 -0
- package/lib/types/engine/ast-node/prefix-node.d.ts +4 -1
- package/lib/types/engine/ast-node/reference-node.d.ts +1 -1
- package/lib/types/engine/dependency/formula-dependency.d.ts +1 -1
- package/lib/types/engine/reference-object/table-reference-object.d.ts +1 -0
- package/lib/types/engine/utils/compare.d.ts +2 -1
- package/lib/types/engine/utils/object-compare.d.ts +1 -0
- package/lib/types/facade/f-formula.d.ts +4 -0
- package/lib/types/facade/f-univer.d.ts +9 -0
- package/lib/types/services/current-data.service.d.ts +1 -0
- package/lib/types/services/runtime.service.d.ts +3 -0
- package/lib/types/services/sheet-row-filtered.service.d.ts +5 -3
- package/lib/types/services/unit-reference-resolver.service.d.ts +3 -1
- package/lib/umd/index.js +4 -4
- package/package.json +6 -6
|
@@ -237,7 +237,9 @@ export interface IUnitExcludedCell {
|
|
|
237
237
|
}
|
|
238
238
|
export interface IUnitRowData {
|
|
239
239
|
[unitId: string]: Nullable<{
|
|
240
|
-
[sheetId: string]: IObjectArrayPrimitiveType<Partial<IRowData
|
|
240
|
+
[sheetId: string]: IObjectArrayPrimitiveType<Partial<IRowData> & {
|
|
241
|
+
filtered?: boolean;
|
|
242
|
+
}>;
|
|
241
243
|
}>;
|
|
242
244
|
}
|
|
243
245
|
export interface IFormulaDatasetConfig {
|
|
@@ -33,6 +33,7 @@ export declare class InvertedIndexCache {
|
|
|
33
33
|
* }
|
|
34
34
|
*/
|
|
35
35
|
private _cache;
|
|
36
|
+
private _rowValues;
|
|
36
37
|
private _continueBuildingCache;
|
|
37
38
|
set(unitId: string, sheetId: string, column: number, value: ValueTypeWithNullUndefined, row: number, isForceUpdate?: boolean): void;
|
|
38
39
|
getCellValuePositions(unitId: string, sheetId: string, column: number): Map<ValueTypeWithSymbol, Set<number>> | undefined;
|
|
@@ -18,19 +18,19 @@ export declare const UNIT_NAME_REGEX_PRECOMPILING: RegExp;
|
|
|
18
18
|
export declare const SHEET_NAME_REGEX = "((?![\\[\\]\\/?*\\\\]).)*!";
|
|
19
19
|
export declare const ABSOLUTE_SYMBOL = "$";
|
|
20
20
|
export declare const RANGE_SYMBOL = "\\s*?:\\s*?";
|
|
21
|
-
export declare const UNIT_NAME_SHEET_NAME_REGEX = "'?(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?";
|
|
21
|
+
export declare const UNIT_NAME_SHEET_NAME_REGEX = "(?:'(?:[^'\\[]|'')*[\\\\/]|'?)(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?";
|
|
22
22
|
export declare const SIMPLE_SINGLE_RANGE_REGEX = "\\$?[A-Za-z]+\\$?[1-9][0-9]*";
|
|
23
|
-
export declare const REFERENCE_MULTIPLE_RANGE_REGEX = "^(@)?'?(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\$?[A-Za-z]+\\$?[1-9][0-9]*\\s*?:\\s*?\\$?[A-Za-z]+\\$?[1-9][0-9]*$";
|
|
23
|
+
export declare const REFERENCE_MULTIPLE_RANGE_REGEX = "^(@)?(?:'(?:[^'\\[]|'')*[\\\\/]|'?)(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\$?[A-Za-z]+\\$?[1-9][0-9]*\\s*?:\\s*?\\$?[A-Za-z]+\\$?[1-9][0-9]*$";
|
|
24
24
|
export declare const REFERENCE_MULTIPLE_RANGE_REGEX_PRECOMPILING: RegExp;
|
|
25
|
-
export declare const REFERENCE_SINGLE_RANGE_REGEX = "^'?(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\s*?\\$?[A-Za-z]+\\$?[1-9][0-9]*(#)?$";
|
|
25
|
+
export declare const REFERENCE_SINGLE_RANGE_REGEX = "^(?:'(?:[^'\\[]|'')*[\\\\/]|'?)(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\s*?\\$?[A-Za-z]+\\$?[1-9][0-9]*(#)?$";
|
|
26
26
|
export declare const REFERENCE_SINGLE_RANGE_REGEX_PRECOMPILING: RegExp;
|
|
27
|
-
export declare const REFERENCE_REGEX_ROW = "^'?(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\$?[1-9][0-9]*\\s*?:\\s*?\\$?[1-9][0-9]*$";
|
|
27
|
+
export declare const REFERENCE_REGEX_ROW = "^(?:'(?:[^'\\[]|'')*[\\\\/]|'?)(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\$?[1-9][0-9]*\\s*?:\\s*?\\$?[1-9][0-9]*$";
|
|
28
28
|
export declare const REFERENCE_REGEX_ROW_PRECOMPILING: RegExp;
|
|
29
|
-
export declare const REFERENCE_REGEX_COLUMN = "^'?(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\$?[A-Za-z]+\\s*?:\\s*?\\$?[A-Za-z]+$";
|
|
29
|
+
export declare const REFERENCE_REGEX_COLUMN = "^(?:'(?:[^'\\[]|'')*[\\\\/]|'?)(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\$?[A-Za-z]+\\s*?:\\s*?\\$?[A-Za-z]+$";
|
|
30
30
|
export declare const REFERENCE_REGEX_COLUMN_PRECOMPILING: RegExp;
|
|
31
|
-
export declare const REFERENCE_REGEX_SINGLE_ROW = "^'?(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\s*?\\$?[1-9][0-9]*$";
|
|
31
|
+
export declare const REFERENCE_REGEX_SINGLE_ROW = "^(?:'(?:[^'\\[]|'')*[\\\\/]|'?)(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\s*?\\$?[1-9][0-9]*$";
|
|
32
32
|
export declare const REFERENCE_REGEX_SINGLE_ROW_PRECOMPILING: RegExp;
|
|
33
|
-
export declare const REFERENCE_REGEX_SINGLE_COLUMN = "^'?(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\s*?\\$?[A-Za-z]+$";
|
|
33
|
+
export declare const REFERENCE_REGEX_SINGLE_COLUMN = "^(?:'(?:[^'\\[]|'')*[\\\\/]|'?)(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\s*?\\$?[A-Za-z]+$";
|
|
34
34
|
export declare const REFERENCE_REGEX_SINGLE_COLUMN_PRECOMPILING: RegExp;
|
|
35
35
|
export declare const REFERENCE_TABLE_ALL_COLUMN_REGEX = "^(?:(?:\\[(?:[^\\]]|\\]\\])+\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[(?:[^\\]]|\\]\\])+\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+$";
|
|
36
36
|
export declare const REFERENCE_TABLE_SINGLE_COLUMN_REGEX = "^(?:(?:\\[(?:[^\\]]|\\]\\])+\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[(?:[^\\]]|\\]\\])+\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+(\\[[^#]*#?\\]|\\[\\[#.+\\]\\s*?,\\s*?\\[[^#]*#?\\]\\])+$";
|
|
@@ -13,6 +13,17 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { Nullable } from '@univerjs/core';
|
|
16
17
|
import type { IArrayFormulaUnitCellType, IRuntimeUnitDataPrimitiveType, IRuntimeUnitDataType } from './common';
|
|
17
18
|
export declare function convertUnitDataToRuntime(unitData: IArrayFormulaUnitCellType): IRuntimeUnitDataType;
|
|
18
19
|
export declare function convertRuntimeToUnitData(unitData: IRuntimeUnitDataType): IRuntimeUnitDataPrimitiveType;
|
|
20
|
+
/** Copy the unit and sheet dictionaries without retaining inherited identifier keys. */
|
|
21
|
+
export declare function copyUnitData<T>(data: {
|
|
22
|
+
[unitId: string]: Nullable<{
|
|
23
|
+
[sheetId: string]: T;
|
|
24
|
+
}>;
|
|
25
|
+
}): {
|
|
26
|
+
[unitId: string]: {
|
|
27
|
+
[sheetId: string]: T;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -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 { Nullable } from '@univerjs/core';
|
|
16
|
+
import type { IUnitRange, Nullable } from '@univerjs/core';
|
|
17
17
|
import type { BaseFunction } from '../../functions/base-function';
|
|
18
18
|
import { DateSystem } from '@univerjs/core';
|
|
19
19
|
import { IFunctionService } from '../../services/function.service';
|
|
@@ -26,10 +26,13 @@ export declare class PrefixNode extends BaseAstNode {
|
|
|
26
26
|
private _runtimeService;
|
|
27
27
|
private _operatorString;
|
|
28
28
|
private _functionExecutor?;
|
|
29
|
+
private _referenceRanges;
|
|
30
|
+
getReferenceRanges(): IUnitRange[] | null;
|
|
29
31
|
constructor(_runtimeService: IFormulaRuntimeService, _operatorString: string, _functionExecutor?: Nullable<BaseFunction>);
|
|
30
32
|
get nodeType(): NodeType;
|
|
31
33
|
execute(dateSystem?: DateSystem): void;
|
|
32
34
|
private _handlerAT;
|
|
35
|
+
private _getReferencedCell;
|
|
33
36
|
private _preserveAtRangeForFormula2LookupArray;
|
|
34
37
|
}
|
|
35
38
|
export declare class PrefixNodeFactory extends BaseAstNodeFactory {
|
|
@@ -31,7 +31,7 @@ interface ITableReferenceDescriptor {
|
|
|
31
31
|
columnStruct: string | undefined;
|
|
32
32
|
}
|
|
33
33
|
type ReferenceNodeCurrentConfigService = Pick<IFormulaCurrentConfigService, 'getArrayFormulaCellData' | 'getArrayFormulaRange' | 'getSheetNameMap' | 'getUnitData' | 'getUnitStylesData'>;
|
|
34
|
-
type ReferenceNodeRuntimeService = Pick<IFormulaRuntimeService, 'currentColumn' | 'currentRow' | 'currentSubUnitId' | 'currentUnitId' | 'getRuntimeArrayFormulaCellData' | 'getRuntimeFeatureCellData' | 'getUnitArrayFormula' | 'getUnitData'>;
|
|
34
|
+
type ReferenceNodeRuntimeService = Pick<IFormulaRuntimeService, 'markExternalReferenceUnavailable' | 'currentColumn' | 'currentRow' | 'currentSubUnitId' | 'currentUnitId' | 'getRuntimeArrayFormulaCellData' | 'getRuntimeFeatureCellData' | 'getUnitArrayFormula' | 'getUnitData'>;
|
|
35
35
|
type ReferenceNodeSuperTableService = Pick<ISuperTableService, 'getTableMap' | 'getTableOptionMap'>;
|
|
36
36
|
export declare class ReferenceNode extends BaseAstNode {
|
|
37
37
|
private _currentConfigService;
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
import type { IRange, IUnitRange, Nullable } from '@univerjs/core';
|
|
17
17
|
import type { IFeatureDirtyRangeType, IFormulaData, IFormulaDataItem, IOtherFormulaData, IUnitData } from '../../basics/common';
|
|
18
18
|
import type { IFeatureCalculationManagerParam } from '../../services/feature-calculation-manager.service';
|
|
19
|
-
import type { FunctionNode } from '../ast-node';
|
|
20
19
|
import type { BaseAstNode } from '../ast-node/base-ast-node';
|
|
20
|
+
import type { FunctionNode } from '../ast-node/function-node';
|
|
21
21
|
import type { IExecuteAstNodeData } from '../utils/ast-node-tool';
|
|
22
22
|
import type { IFormulaDependencyTree, IFormulaDependencyTreeFullJson, IFormulaDependencyTreeJson, IFormulaDependentsAndInRangeResults } from './dependency-tree';
|
|
23
23
|
import { Disposable, IUniverInstanceService, RTree } from '@univerjs/core';
|
|
@@ -105,6 +105,7 @@ export declare class TableReferenceObject extends BaseReferenceObject {
|
|
|
105
105
|
private _findColonAtTopLevel;
|
|
106
106
|
/** Column title → column index; returns -1 if not found (caller should handle as parse error) */
|
|
107
107
|
private _titleToIndex;
|
|
108
|
+
private _unescapeColumnName;
|
|
108
109
|
/** Resolve #This Row's row number; takes first data row (tableStartRow+1) when no context available */
|
|
109
110
|
private _resolveThisRow;
|
|
110
111
|
}
|
|
@@ -31,8 +31,9 @@ export declare enum ArrayOrderSearchType {
|
|
|
31
31
|
}
|
|
32
32
|
export declare function getCompare(): (x: string, y: string) => number;
|
|
33
33
|
export declare function isWildcard(str: string): boolean;
|
|
34
|
+
export declare function normalizeTextForComparison(value: string): string;
|
|
34
35
|
export declare function isMatchWildcard(currentValue: string, value: string): boolean;
|
|
35
36
|
export declare function replaceWildcard(value: string): string;
|
|
36
|
-
export declare function compareWithWildcard(currentValue: string, value: string, operator: compareToken): boolean;
|
|
37
|
+
export declare function compareWithWildcard(currentValue: string, value: string, operator: compareToken, isCaseSensitive?: boolean): boolean;
|
|
37
38
|
export declare function getMatchModeValue(matchModeValue: number): ArrayOrderSearchType;
|
|
38
39
|
export declare function getSearchModeValue(searchModeValue: number): ArrayBinarySearchType;
|
|
@@ -17,6 +17,7 @@ import type { DateSystem } from '@univerjs/core';
|
|
|
17
17
|
import type { ArrayValueObject } from '../value-object/array-value-object';
|
|
18
18
|
import type { BaseValueObject } from '../value-object/base-value-object';
|
|
19
19
|
import { compareToken } from '../../basics/token';
|
|
20
|
+
export declare function createCriteriaValueObject(content: string, dateSystem?: DateSystem): BaseValueObject;
|
|
20
21
|
export declare function findCompareToken(str: string, dateSystem?: DateSystem): [compareToken, BaseValueObject];
|
|
21
22
|
/**
|
|
22
23
|
* When it contains both comparison characters and wildcard characters
|
|
@@ -124,10 +124,14 @@ export declare class FFormula extends FBase {
|
|
|
124
124
|
calculationEnd(callback: (functionsExecutedState: FormulaExecutedStateType) => void): IDisposable;
|
|
125
125
|
/**
|
|
126
126
|
* Listens for formula results after every affected model has applied them.
|
|
127
|
+
* @param {(result: ISetFormulaCalculationResultMutation) => void} callback Receives each applied formula result asynchronously.
|
|
128
|
+
* @returns {IDisposable} A disposable that unsubscribes from future result notifications.
|
|
127
129
|
*/
|
|
128
130
|
calculationResultApplied(callback: (result: ISetFormulaCalculationResultMutation) => void): IDisposable;
|
|
129
131
|
/**
|
|
130
132
|
* Waits until the latest formula-calculation results have been applied.
|
|
133
|
+
* @param {number} [timeout] Maximum wait in milliseconds. Omit to wait without an overall timeout.
|
|
134
|
+
* @returns {Promise<void>} Resolves when the latest calculation results have been applied; rejects if the supplied timeout expires.
|
|
131
135
|
*/
|
|
132
136
|
onCalculationResultApplied(timeout?: number): Promise<void>;
|
|
133
137
|
/**
|
|
@@ -19,6 +19,15 @@ import { FFormula } from './f-formula';
|
|
|
19
19
|
* @ignore
|
|
20
20
|
*/
|
|
21
21
|
export interface IFUniverEngineFormulaMixin {
|
|
22
|
+
/**
|
|
23
|
+
* Gets the formula engine facade for calculation, parsing, and dependency queries.
|
|
24
|
+
* @returns {FFormula} The formula engine facade.
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const formula = univerAPI.getFormula();
|
|
28
|
+
* await formula.onCalculationResultApplied();
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
22
31
|
getFormula(): FFormula;
|
|
23
32
|
}
|
|
24
33
|
export declare class FUniverEngineFormulaMixin extends FUniver implements IFUniverEngineFormulaMixin {
|
|
@@ -95,6 +95,7 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
|
|
|
95
95
|
private _sheetNameMap;
|
|
96
96
|
private _unitNameMap;
|
|
97
97
|
private _externalReferences;
|
|
98
|
+
private _calculationRowData;
|
|
98
99
|
private _calculationGeneration;
|
|
99
100
|
private _forceCalculate;
|
|
100
101
|
private _clearDependencyTreeCache;
|
|
@@ -81,6 +81,7 @@ export interface IFormulaRuntimeService {
|
|
|
81
81
|
hasFunctionRefInfoOverride(): boolean;
|
|
82
82
|
registerFunctionDefinitionPrivacyVar(lambdaId: string, lambdaVar: Map<string, Nullable<BaseAstNode>>): void;
|
|
83
83
|
getFunctionDefinitionPrivacyVar(lambdaId: string): Nullable<Map<string, Nullable<BaseAstNode>>>;
|
|
84
|
+
markExternalReferenceUnavailable(): void;
|
|
84
85
|
setRuntimeData(functionVariant: FunctionVariantType): void;
|
|
85
86
|
getUnitData(): IRuntimeUnitDataType;
|
|
86
87
|
getUnitArrayFormula(): IArrayFormulaRangeType;
|
|
@@ -130,6 +131,7 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
|
|
|
130
131
|
private readonly _hyperlinkEngineFormulaService;
|
|
131
132
|
private _formulaExecuteStage;
|
|
132
133
|
private _stopState;
|
|
134
|
+
private _externalReferenceUnavailable;
|
|
133
135
|
private _currentRow;
|
|
134
136
|
private _currentColumn;
|
|
135
137
|
private _currentRowCount;
|
|
@@ -193,6 +195,7 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
|
|
|
193
195
|
registerFunctionDefinitionPrivacyVar(lambdaId: string, lambdaVar: Map<string, Nullable<BaseAstNode>>): void;
|
|
194
196
|
getFunctionDefinitionPrivacyVar(lambdaId: string): Nullable<Map<string, Nullable<BaseAstNode>>>;
|
|
195
197
|
setRuntimeOtherData(formulaId: string, x: number, y: number, functionVariant: FunctionVariantType): void;
|
|
198
|
+
markExternalReferenceUnavailable(): void;
|
|
196
199
|
setRuntimeData(functionVariant: FunctionVariantType): void;
|
|
197
200
|
private _getValueObjectOfRuntimeData;
|
|
198
201
|
getUnitData(): IRuntimeUnitDataType;
|
|
@@ -13,19 +13,21 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { IDisposable } from '@univerjs/core';
|
|
16
17
|
import { Disposable } from '@univerjs/core';
|
|
17
18
|
type CallbackFunction = (unitId: string, subUnitId: string, row: number) => boolean;
|
|
18
19
|
/**
|
|
19
20
|
* The service that gets the row filter status
|
|
20
21
|
*/
|
|
21
22
|
export interface ISheetRowFilteredService {
|
|
22
|
-
register(callback: CallbackFunction):
|
|
23
|
+
register(callback: CallbackFunction): IDisposable;
|
|
23
24
|
getRowFiltered(unitId: string, subUnitId: string, row: number): boolean;
|
|
24
25
|
}
|
|
25
26
|
export declare class SheetRowFilteredService extends Disposable implements ISheetRowFilteredService {
|
|
26
|
-
private
|
|
27
|
-
register(callback: CallbackFunction):
|
|
27
|
+
private _getRowFilteredCallbacks;
|
|
28
|
+
register(callback: CallbackFunction): IDisposable;
|
|
28
29
|
getRowFiltered(unitId: string, subUnitId: string, row: number): boolean;
|
|
30
|
+
dispose(): void;
|
|
29
31
|
}
|
|
30
32
|
export declare const ISheetRowFilteredService: import("@wendellhu/redi").IdentifierDecorator<ISheetRowFilteredService>;
|
|
31
33
|
export {};
|
|
@@ -21,6 +21,8 @@ export interface IFormulaUnitReferenceResolveInput {
|
|
|
21
21
|
hostUnitId: string;
|
|
22
22
|
qualifier: string;
|
|
23
23
|
referenceKind: FormulaUnitReferenceKind;
|
|
24
|
+
/** Called only when the source workbook cannot be resolved. */
|
|
25
|
+
onUnavailable?: () => void;
|
|
24
26
|
}
|
|
25
27
|
export interface IFormulaUnitReferenceResolution {
|
|
26
28
|
unitId: string;
|
|
@@ -40,6 +42,6 @@ export declare function normalizeFormulaUnitName(name: string): string;
|
|
|
40
42
|
export declare class FormulaUnitReferenceResolver implements IFormulaUnitReferenceResolver {
|
|
41
43
|
protected readonly _currentConfigService: IFormulaCurrentConfigService;
|
|
42
44
|
constructor(_currentConfigService: IFormulaCurrentConfigService);
|
|
43
|
-
resolve({ hostUnitId, qualifier, referenceKind, }: IFormulaUnitReferenceResolveInput): IFormulaUnitReferenceResolution | ErrorType;
|
|
45
|
+
resolve({ hostUnitId, qualifier, referenceKind, onUnavailable, }: IFormulaUnitReferenceResolveInput): IFormulaUnitReferenceResolution | ErrorType;
|
|
44
46
|
private _validateReferenceKind;
|
|
45
47
|
}
|