@univerjs/engine-formula 1.3.1 → 1.4.0

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.
Files changed (171) hide show
  1. package/lib/cjs/{en-US-BYMYuEpp.js → en-US-9VDUEyCa.js} +15 -30
  2. package/lib/cjs/facade.js +4 -8
  3. package/lib/cjs/index.js +426 -57921
  4. package/lib/cjs/locale/ar-SA.js +16 -32
  5. package/lib/cjs/locale/ca-ES.js +16 -32
  6. package/lib/cjs/locale/de-DE.js +16 -32
  7. package/lib/cjs/locale/en-US.js +2 -3
  8. package/lib/cjs/locale/es-ES.js +16 -32
  9. package/lib/cjs/locale/fa-IR.js +2 -3
  10. package/lib/cjs/locale/fr-FR.js +16 -32
  11. package/lib/cjs/locale/id-ID.js +16 -32
  12. package/lib/cjs/locale/it-IT.js +16 -32
  13. package/lib/cjs/locale/ja-JP.js +16 -32
  14. package/lib/cjs/locale/ko-KR.js +16 -32
  15. package/lib/cjs/locale/pl-PL.js +16 -32
  16. package/lib/cjs/locale/pt-BR.js +16 -32
  17. package/lib/cjs/locale/ru-RU.js +16 -32
  18. package/lib/cjs/locale/sk-SK.js +16 -32
  19. package/lib/cjs/locale/vi-VN.js +16 -32
  20. package/lib/cjs/locale/zh-CN.js +16 -32
  21. package/lib/cjs/locale/zh-HK.js +2 -3
  22. package/lib/cjs/locale/zh-TW.js +2 -3
  23. package/lib/cjs/plugin-CDy-SbDF.js +58694 -0
  24. package/lib/cjs/worker.js +9 -0
  25. package/lib/cjs/{zh-TW-B5pYt-NJ.js → zh-TW-DGiZe-tu.js} +15 -30
  26. package/lib/{en-US-l1Vb3W1H.js → en-US-CgN_37u8.js} +15 -30
  27. package/lib/es/{en-US-l1Vb3W1H.js → en-US-CgN_37u8.js} +15 -30
  28. package/lib/es/facade.js +4 -8
  29. package/lib/es/index.js +204 -57670
  30. package/lib/es/locale/ar-SA.js +16 -32
  31. package/lib/es/locale/ca-ES.js +16 -32
  32. package/lib/es/locale/de-DE.js +16 -32
  33. package/lib/es/locale/en-US.js +2 -3
  34. package/lib/es/locale/es-ES.js +16 -32
  35. package/lib/es/locale/fa-IR.js +2 -3
  36. package/lib/es/locale/fr-FR.js +16 -32
  37. package/lib/es/locale/id-ID.js +16 -32
  38. package/lib/es/locale/it-IT.js +16 -32
  39. package/lib/es/locale/ja-JP.js +16 -32
  40. package/lib/es/locale/ko-KR.js +16 -32
  41. package/lib/es/locale/pl-PL.js +16 -32
  42. package/lib/es/locale/pt-BR.js +16 -32
  43. package/lib/es/locale/ru-RU.js +16 -32
  44. package/lib/es/locale/sk-SK.js +16 -32
  45. package/lib/es/locale/vi-VN.js +16 -32
  46. package/lib/es/locale/zh-CN.js +16 -32
  47. package/lib/es/locale/zh-HK.js +2 -3
  48. package/lib/es/locale/zh-TW.js +2 -3
  49. package/lib/es/plugin-BO47k05w.js +57341 -0
  50. package/lib/es/worker.js +3 -0
  51. package/lib/es/{zh-TW-BA0p9R2Z.js → zh-TW-CsrIhkUN.js} +15 -30
  52. package/lib/facade.js +4 -8
  53. package/lib/index.js +204 -57670
  54. package/lib/locale/ar-SA.js +16 -32
  55. package/lib/locale/ca-ES.js +16 -32
  56. package/lib/locale/de-DE.js +16 -32
  57. package/lib/locale/en-US.js +2 -3
  58. package/lib/locale/es-ES.js +16 -32
  59. package/lib/locale/fa-IR.js +2 -3
  60. package/lib/locale/fr-FR.js +16 -32
  61. package/lib/locale/id-ID.js +16 -32
  62. package/lib/locale/it-IT.js +16 -32
  63. package/lib/locale/ja-JP.js +16 -32
  64. package/lib/locale/ko-KR.js +16 -32
  65. package/lib/locale/pl-PL.js +16 -32
  66. package/lib/locale/pt-BR.js +16 -32
  67. package/lib/locale/ru-RU.js +16 -32
  68. package/lib/locale/sk-SK.js +16 -32
  69. package/lib/locale/vi-VN.js +16 -32
  70. package/lib/locale/zh-CN.js +16 -32
  71. package/lib/locale/zh-HK.js +2 -3
  72. package/lib/locale/zh-TW.js +2 -3
  73. package/lib/plugin-BO47k05w.js +57341 -0
  74. package/lib/types/basics/cache-lru.d.ts +0 -1
  75. package/lib/types/basics/common.d.ts +5 -1
  76. package/lib/types/basics/match-token.d.ts +1 -1
  77. package/lib/types/commands/mutations/set-super-table.mutation.d.ts +3 -2
  78. package/lib/types/engine/analysis/lexer-tree-builder.d.ts +1 -1
  79. package/lib/types/engine/analysis/lexer.d.ts +1 -1
  80. package/lib/types/engine/ast-node/function-node.d.ts +2 -1
  81. package/lib/types/engine/dependency/formula-dependency.d.ts +24 -3
  82. package/lib/types/engine/dependency/reference-context.d.ts +33 -0
  83. package/lib/types/engine/reference-object/column-reference-object.d.ts +1 -1
  84. package/lib/types/engine/reference-object/row-reference-object.d.ts +1 -1
  85. package/lib/types/engine/utils/check-variant-error.d.ts +4 -4
  86. package/lib/types/engine/utils/numfmt-kit.d.ts +1 -1
  87. package/lib/types/engine/value-object/cube-value-object.d.ts +5 -2
  88. package/lib/types/engine/value-object/lambda-value-object.d.ts +2 -2
  89. package/lib/types/functions/array/function-map.d.ts +1 -1
  90. package/lib/types/functions/base-function.d.ts +5 -5
  91. package/lib/types/functions/compatibility/function-map.d.ts +2 -2
  92. package/lib/types/functions/database/function-map.d.ts +1 -1
  93. package/lib/types/functions/date/function-map.d.ts +1 -1
  94. package/lib/types/functions/engineering/function-map.d.ts +1 -1
  95. package/lib/types/functions/financial/function-map.d.ts +1 -1
  96. package/lib/types/functions/information/function-map.d.ts +1 -1
  97. package/lib/types/functions/information/isblank/index.d.ts +1 -1
  98. package/lib/types/functions/information/iserr/index.d.ts +1 -1
  99. package/lib/types/functions/information/iserror/index.d.ts +1 -1
  100. package/lib/types/functions/information/islogical/index.d.ts +1 -1
  101. package/lib/types/functions/information/isna/index.d.ts +1 -1
  102. package/lib/types/functions/information/isnontext/index.d.ts +1 -1
  103. package/lib/types/functions/information/isnumber/index.d.ts +1 -1
  104. package/lib/types/functions/information/istext/index.d.ts +1 -1
  105. package/lib/types/functions/logical/function-map.d.ts +1 -1
  106. package/lib/types/functions/logical/groupby/index.d.ts +1 -1
  107. package/lib/types/functions/logical/if/index.d.ts +1 -1
  108. package/lib/types/functions/logical/iferror/index.d.ts +1 -1
  109. package/lib/types/functions/logical/ifna/index.d.ts +1 -1
  110. package/lib/types/functions/logical/makearray/index.d.ts +1 -1
  111. package/lib/types/functions/lookup/choosecols/index.d.ts +1 -1
  112. package/lib/types/functions/lookup/chooserows/index.d.ts +1 -1
  113. package/lib/types/functions/lookup/column/index.d.ts +1 -1
  114. package/lib/types/functions/lookup/formulatext/index.d.ts +1 -1
  115. package/lib/types/functions/lookup/function-map.d.ts +1 -1
  116. package/lib/types/functions/lookup/getpivotdata/index.d.ts +7 -2
  117. package/lib/types/functions/lookup/hstack/index.d.ts +1 -1
  118. package/lib/types/functions/lookup/index/index.d.ts +1 -0
  119. package/lib/types/functions/lookup/indirect/index.d.ts +1 -1
  120. package/lib/types/functions/lookup/row/index.d.ts +1 -1
  121. package/lib/types/functions/lookup/sortby/index.d.ts +1 -1
  122. package/lib/types/functions/lookup/transpose/index.d.ts +1 -1
  123. package/lib/types/functions/lookup/vlookup/index.d.ts +1 -1
  124. package/lib/types/functions/lookup/vstack/index.d.ts +1 -1
  125. package/lib/types/functions/math/aggregate/index.d.ts +1 -1
  126. package/lib/types/functions/math/function-map.d.ts +1 -1
  127. package/lib/types/functions/math/randarray/index.d.ts +1 -1
  128. package/lib/types/functions/math/subtotal/index.d.ts +1 -1
  129. package/lib/types/functions/math/sumifs/index.d.ts +1 -1
  130. package/lib/types/functions/meta/cube/index.d.ts +4 -1
  131. package/lib/types/functions/meta/function-map.d.ts +1 -1
  132. package/lib/types/functions/statistical/function-map.d.ts +1 -1
  133. package/lib/types/functions/statistical/stdev-p/index.d.ts +1 -1
  134. package/lib/types/functions/statistical/stdev-s/index.d.ts +1 -1
  135. package/lib/types/functions/statistical/stdeva/index.d.ts +1 -1
  136. package/lib/types/functions/statistical/stdevpa/index.d.ts +1 -1
  137. package/lib/types/functions/statistical/var-p/index.d.ts +1 -1
  138. package/lib/types/functions/statistical/var-s/index.d.ts +1 -1
  139. package/lib/types/functions/statistical/vara/index.d.ts +1 -1
  140. package/lib/types/functions/statistical/varpa/index.d.ts +1 -1
  141. package/lib/types/functions/text/function-map.d.ts +1 -1
  142. package/lib/types/functions/text/textafter/index.d.ts +1 -1
  143. package/lib/types/functions/text/textbefore/index.d.ts +1 -1
  144. package/lib/types/functions/text/textsplit/index.d.ts +1 -1
  145. package/lib/types/functions/web/function-map.d.ts +1 -1
  146. package/lib/types/index.d.ts +1 -1
  147. package/lib/types/locale/en-US.d.ts +3005 -3005
  148. package/lib/types/plugin.d.ts +1 -1
  149. package/lib/types/services/active-dirty-manager.service.d.ts +3 -2
  150. package/lib/types/services/calculate-formula.service.d.ts +3 -3
  151. package/lib/types/services/current-data.service.d.ts +8 -6
  152. package/lib/types/services/defined-names.service.d.ts +1 -1
  153. package/lib/types/services/dependency-manager.service.d.ts +12 -2
  154. package/lib/types/services/external-reference-data-loader.service.d.ts +1 -1
  155. package/lib/types/services/feature-calculation-manager.service.d.ts +1 -1
  156. package/lib/types/services/formula/description.service.d.ts +1 -1
  157. package/lib/types/services/formula/register-function.service.d.ts +1 -1
  158. package/lib/types/services/formula-calculation-trigger.service.d.ts +1 -1
  159. package/lib/types/services/formula-changeset-calculation.service.d.ts +1 -1
  160. package/lib/types/services/function.service.d.ts +1 -1
  161. package/lib/types/services/hyperlink-engine-formula.service.d.ts +1 -1
  162. package/lib/types/services/other-formula-manager.service.d.ts +1 -1
  163. package/lib/types/services/runtime.service.d.ts +1 -1
  164. package/lib/types/services/sheet-row-filtered.service.d.ts +1 -1
  165. package/lib/types/services/super-table.service.d.ts +4 -4
  166. package/lib/types/services/unit-reference-resolver.service.d.ts +1 -1
  167. package/lib/types/worker.d.ts +16 -0
  168. package/lib/umd/index.js +4 -4
  169. package/lib/worker.js +3 -0
  170. package/lib/{zh-TW-BA0p9R2Z.js → zh-TW-CsrIhkUN.js} +15 -30
  171. package/package.json +13 -8
@@ -22,5 +22,4 @@ export declare class FormulaAstLRU<T> {
22
22
  clear(): void;
23
23
  delete(formulaString: string): void;
24
24
  forEach(callbackfn: (value: T, key: string, map: LRUMap<string, T>) => void, thisArg?: any): void;
25
- private _hash;
26
25
  }
@@ -90,7 +90,6 @@ export interface IFormulaExternalReferenceBinding {
90
90
  sourceUnitType: FormulaUnitType;
91
91
  }
92
92
  export interface IFormulaExternalReferenceResource {
93
- schemaVersion: number;
94
93
  references: Record<string, IFormulaExternalReferenceBinding>;
95
94
  }
96
95
  /** Host-scoped External Reference resources keyed by the Host unitId. */
@@ -223,6 +222,9 @@ export interface ISuperTable {
223
222
  /** Whether the projected range contains a physical totals row. */
224
223
  showFooter?: boolean;
225
224
  }
225
+ export interface ISuperTableData extends Omit<ISuperTable, 'titleMap'> {
226
+ titleMap: Record<string, number>;
227
+ }
226
228
  export declare enum TableOptionType {
227
229
  ALL = "#All",
228
230
  DATA = "#Data",
@@ -243,6 +245,8 @@ export interface IUnitRowData {
243
245
  }>;
244
246
  }
245
247
  export interface IFormulaDatasetConfig {
248
+ /** Sheet metadata changed; rebind and calculate affected references without forcing all formulas. */
249
+ dirtyReferenceUnits?: string[];
246
250
  /** Recalculate iteration-sensitive groups and their dependents in these workbooks. */
247
251
  dirtyIterationUnits?: string[];
248
252
  /** Snapshot replay limits calculation to affected cycles and their required precedents. */
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { compareToken, matchToken, operatorToken, prefixToken, suffixToken } from './token';
17
- export declare const FORMULA_LEXER_TOKENS: (operatorToken | suffixToken | compareToken | prefixToken | matchToken)[];
17
+ export declare const FORMULA_LEXER_TOKENS: (operatorToken | compareToken | matchToken | suffixToken | prefixToken)[];
18
18
  export declare function isFormulaLexerToken(str: string): boolean;
19
19
  export declare function includeFormulaLexerToken(str: string): boolean;
20
20
  export declare function normalizeSheetName(sheetName: string): string;
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { IMutation } from '@univerjs/core';
17
- import type { ISuperTable } from '../../basics/common';
17
+ import type { ISuperTable, ISuperTableData } from '../../basics/common';
18
18
  import type { ISuperTableOptionParam } from '../../services/super-table.service';
19
19
  export interface ISetSuperTableMutationSearchParam {
20
20
  unitId: string;
@@ -25,7 +25,8 @@ export interface IRemoveSuperTableMutationParam extends ISetSuperTableMutationSe
25
25
  }
26
26
  export interface ISetSuperTableMutationParam extends ISetSuperTableMutationSearchParam {
27
27
  oldTableName?: string;
28
- reference: ISuperTable;
28
+ /** Plain column data for RPC; Map remains accepted for existing local callers. */
29
+ reference: ISuperTableData | ISuperTable;
29
30
  }
30
31
  /**
31
32
  * In the formula engine, the mutation is solely responsible for communication between the worker and the main thread.
@@ -102,7 +102,7 @@ export declare class LexerTreeBuilder extends Disposable {
102
102
  private _minusSplitSequenceNode;
103
103
  private _pushSequenceNode;
104
104
  nodeMakerTest(formulaString: string): ErrorType.VALUE | (string | LexerNode)[] | undefined;
105
- treeBuilder(formulaString: string, transformSuffix?: boolean, injectDefinedNameParam?: IInjectDefinedNameParam): ErrorType.VALUE | LexerNode | (string | LexerNode)[] | undefined;
105
+ treeBuilder(formulaString: string, transformSuffix?: boolean, injectDefinedNameParam?: IInjectDefinedNameParam): ErrorType.VALUE | (string | LexerNode)[] | LexerNode | undefined;
106
106
  private _handleDefinedName;
107
107
  private _moveDefinedNameRefOffset;
108
108
  private _getHasSheetNameDefinedName;
@@ -25,5 +25,5 @@ export declare class Lexer extends Disposable {
25
25
  private readonly _formulaCurrentConfigService;
26
26
  private readonly _functionService;
27
27
  constructor(_definedNamesService: IDefinedNamesService, _lexerTreeBuilder: LexerTreeBuilder, _formulaCurrentConfigService: IFormulaCurrentConfigService, _functionService: IFunctionService);
28
- treeBuilder(formulaString: string, transformSuffix?: boolean, unitId?: Nullable<string>, refOffsetX?: number, refOffsetY?: number): import("../..").ErrorType.VALUE | import("./lexer-node").LexerNode | (string | import("./lexer-node").LexerNode)[] | undefined;
28
+ treeBuilder(formulaString: string, transformSuffix?: boolean, unitId?: Nullable<string>, refOffsetX?: number, refOffsetY?: number): import("../..").ErrorType.VALUE | (string | import("./lexer-node").LexerNode)[] | import("./lexer-node").LexerNode | undefined;
29
29
  }
@@ -13,9 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import { DateSystem, Injector } from '@univerjs/core';
16
17
  import type { BaseFunction } from '../../functions/base-function';
17
18
  import type { LexerNode } from '../analysis/lexer-node';
18
- import { DateSystem, Injector } from '@univerjs/core';
19
19
  import { AstNodePromiseType } from '../../basics/common';
20
20
  import { FormulaDataModel } from '../../models/formula-data.model';
21
21
  import { IFormulaCurrentConfigService } from '../../services/current-data.service';
@@ -40,6 +40,7 @@ export declare class FunctionNode extends BaseAstNode {
40
40
  execute(dateSystem?: DateSystem): void;
41
41
  private _collectVariants;
42
42
  private _getChildVariant;
43
+ isAffectedBySheetMetadata(sheetOrderChanged: boolean, sheetSizeChanged: boolean): boolean;
43
44
  isFunctionExecutorArgumentsIgnoreNumberPattern(): boolean;
44
45
  /**
45
46
  * If it contains an array formula, set the current cell to the cache and send itself as a ref outward
@@ -14,13 +14,13 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { IRange, IUnitRange, Nullable } from '@univerjs/core';
17
+ import { Disposable, IUniverInstanceService, RTree } from '@univerjs/core';
17
18
  import type { IFeatureDirtyRangeType, IFormulaData, IFormulaDataItem, IOtherFormulaData, IUnitData } from '../../basics/common';
18
19
  import type { IFeatureCalculationManagerParam } from '../../services/feature-calculation-manager.service';
19
20
  import type { BaseAstNode } from '../ast-node/base-ast-node';
20
21
  import type { FunctionNode } from '../ast-node/function-node';
21
22
  import type { IExecuteAstNodeData } from '../utils/ast-node-tool';
22
23
  import type { IFormulaDependencyTree, IFormulaDependencyTreeFullJson, IFormulaDependencyTreeJson, IFormulaDependentsAndInRangeResults } from './dependency-tree';
23
- import { Disposable, IUniverInstanceService, RTree } from '@univerjs/core';
24
24
  import { IFormulaCurrentConfigService } from '../../services/current-data.service';
25
25
  import { IDependencyManagerService } from '../../services/dependency-manager.service';
26
26
  import { IFeatureCalculationManagerService } from '../../services/feature-calculation-manager.service';
@@ -33,6 +33,8 @@ import { Interpreter } from '../interpreter/interpreter';
33
33
  import { FormulaDependencyTree, FormulaDependencyTreeModel, FormulaDependencyTreeVirtual } from './dependency-tree';
34
34
  export declare function generateRandomDependencyTreeId(dependencyManagerService: IDependencyManagerService): number;
35
35
  export interface IFormulaDependencyGenerator {
36
+ /** Keep structural dirty information available when a calculation is interrupted. */
37
+ finishReferenceContext?(completed: boolean): void;
36
38
  generate(isCalculateTreeModel?: boolean): Promise<IFormulaDependencyTree[]>;
37
39
  getAllDependencyJson(): Promise<IFormulaDependencyTreeJson[]>;
38
40
  getCellDependencyJson(unitId: string, sheetId: string, row: number, column: number): Promise<IFormulaDependencyTreeFullJson | undefined>;
@@ -40,7 +42,7 @@ export interface IFormulaDependencyGenerator {
40
42
  getInRangeFormulas(unitRanges: IUnitRange[]): Promise<IFormulaDependencyTreeJson[]>;
41
43
  getRangeDependentsAndInRangeFormulas(unitRanges: IUnitRange[]): Promise<IFormulaDependentsAndInRangeResults>;
42
44
  }
43
- export declare const IFormulaDependencyGenerator: import("@wendellhu/redi").IdentifierDecorator<IFormulaDependencyGenerator>;
45
+ export declare const IFormulaDependencyGenerator: import("@univerjs/core").IdentifierDecorator<IFormulaDependencyGenerator>;
44
46
  export declare class FormulaDependencyGenerator extends Disposable implements IFormulaDependencyGenerator {
45
47
  protected readonly _currentConfigService: IFormulaCurrentConfigService;
46
48
  protected readonly _runtimeService: IFormulaRuntimeService;
@@ -55,6 +57,9 @@ export declare class FormulaDependencyGenerator extends Disposable implements IF
55
57
  private _updateRangeFlattenCache;
56
58
  protected _dependencyRTreeCacheForAddressFunction: RTree;
57
59
  protected _dependencyTreeCache: Map<number, IFormulaDependencyTree>;
60
+ private _reusableRanges;
61
+ private readonly _referenceContext;
62
+ private _reusableSheetSignature;
58
63
  constructor(_currentConfigService: IFormulaCurrentConfigService, _runtimeService: IFormulaRuntimeService, _otherFormulaManagerService: IOtherFormulaManagerService, _featureCalculationManagerService: IFeatureCalculationManagerService, _univerInstanceService: IUniverInstanceService, _interpreter: Interpreter, _astTreeBuilder: AstTreeBuilder, _lexer: Lexer, _dependencyManagerService: IDependencyManagerService, _lexerTreeBuilder: LexerTreeBuilder);
59
64
  dispose(): void;
60
65
  private _initUnitDispose;
@@ -71,7 +76,7 @@ export declare class FormulaDependencyGenerator extends Disposable implements IF
71
76
  */
72
77
  protected _getUpdateTreeListAndMakeDependency(): IFormulaDependencyTree[];
73
78
  protected _getTreeById(treeId: number): IFormulaDependencyTree | undefined;
74
- protected _getTreeNode(tree: IFormulaDependencyTree): import("../ast-node").AstRootNode;
79
+ protected _getTreeNode(tree: Pick<IFormulaDependencyTree, 'unitId' | 'subUnitId' | 'formula' | 'row' | 'column'>): import("../ast-node").AstRootNode;
75
80
  private _traverse;
76
81
  protected _calculateRunList(treeList: IFormulaDependencyTree[]): (FormulaDependencyTree | FormulaDependencyTreeVirtual)[];
77
82
  protected _getAllTreeList(): Promise<IFormulaDependencyTree[]>;
@@ -86,6 +91,22 @@ export declare class FormulaDependencyGenerator extends Disposable implements IF
86
91
  */
87
92
  protected _convertDirtyRangesToUnitRange(dirtyRanges: IFeatureDirtyRangeType): IUnitRange[];
88
93
  private _isCyclicUtil;
94
+ /**
95
+ * Whether the ranges resolved for this formula may be kept for a later calculation. This
96
+ * is independent of whether they may be reused right now: a forced calculation rebuilds
97
+ * the index but the ranges it resolves are still valid for the next one.
98
+ */
99
+ private _canShareRanges;
100
+ /**
101
+ * `A:A` and other open-ended references are clipped to the size of the sheet they point
102
+ * at, so any resize can change a resolved range list without touching the AST.
103
+ */
104
+ private _getSheetSignature;
105
+ private _takeReusableRanges;
106
+ private _storeReusableRanges;
107
+ finishReferenceContext(completed: boolean): void;
108
+ protected _updateReferenceContext(unitData: IUnitData): boolean;
109
+ protected _isReferenceContextAffected(tree: Pick<IFormulaDependencyTree, 'unitId' | 'subUnitId' | 'formula' | 'row' | 'column' | 'rowCount' | 'columnCount' | 'refOffsetX' | 'refOffsetY'>, node?: BaseAstNode): boolean;
89
110
  /**
90
111
  * Generate nodes for the dependency tree, where each node contains all the reference data ranges included in each formula.
91
112
  * @param formulaData
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
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 { IUnitData } from '../../basics/common';
17
+ import type { BaseAstNode } from '../ast-node/base-ast-node';
18
+ /** Retains sheet metadata only; formulas and dependency ranges stay in the existing caches. */
19
+ export declare class ReferenceContext {
20
+ private _stable;
21
+ private _previous;
22
+ private _current;
23
+ private _orderChanged;
24
+ private _changed;
25
+ update(unitData: IUnitData, getSheetsInfo: (unitId: string) => {
26
+ sheetOrder: string[];
27
+ sheetNameMap: Record<string, string>;
28
+ } | undefined): boolean;
29
+ finish(completed: boolean): void;
30
+ isSheetSizeChanged(unitId: string, sheetId: string): boolean;
31
+ isAffected(node: BaseAstNode, unitId: string, sheetId: string, offsetX?: number, offsetY?: number): boolean;
32
+ private _resolveStaticReference;
33
+ }
@@ -18,5 +18,5 @@ import { BaseReferenceObject } from './base-reference-object';
18
18
  export declare class ColumnReferenceObject extends BaseReferenceObject {
19
19
  constructor(token: string);
20
20
  isColumn(): boolean;
21
- unionBy(referenceObject: BaseReferenceObject): ErrorValueObject | this;
21
+ unionBy(referenceObject: BaseReferenceObject): this | ErrorValueObject;
22
22
  }
@@ -18,5 +18,5 @@ import { BaseReferenceObject } from './base-reference-object';
18
18
  export declare class RowReferenceObject extends BaseReferenceObject {
19
19
  constructor(token: string);
20
20
  isRow(): boolean;
21
- unionBy(referenceObject: BaseReferenceObject): ErrorValueObject | this;
21
+ unionBy(referenceObject: BaseReferenceObject): this | ErrorValueObject;
22
22
  }
@@ -20,34 +20,34 @@ export declare function checkVariantsErrorIsArray(...variants: BaseValueObject[]
20
20
  errorObject: BaseValueObject;
21
21
  variants?: undefined;
22
22
  } | {
23
+ errorObject?: undefined;
23
24
  isError: boolean;
24
25
  variants: BaseValueObject[];
25
- errorObject?: undefined;
26
26
  };
27
27
  export declare function checkVariantsErrorIsArrayOrBoolean(...variants: BaseValueObject[]): {
28
28
  isError: boolean;
29
29
  errorObject: BaseValueObject;
30
30
  variants?: undefined;
31
31
  } | {
32
+ errorObject?: undefined;
32
33
  isError: boolean;
33
34
  variants: BaseValueObject[];
34
- errorObject?: undefined;
35
35
  };
36
36
  export declare function checkVariantsErrorIsNullorArrayOrBoolean(...variants: BaseValueObject[]): {
37
37
  isError: boolean;
38
38
  errorObject: BaseValueObject;
39
39
  variants?: undefined;
40
40
  } | {
41
+ errorObject?: undefined;
41
42
  isError: boolean;
42
43
  variants: BaseValueObject[];
43
- errorObject?: undefined;
44
44
  };
45
45
  export declare function checkVariantsErrorIsStringToNumber(...variants: BaseValueObject[]): {
46
46
  isError: boolean;
47
47
  errorObject: BaseValueObject;
48
48
  variants?: undefined;
49
49
  } | {
50
+ errorObject?: undefined;
50
51
  isError: boolean;
51
52
  variants: BaseValueObject[];
52
- errorObject?: undefined;
53
53
  };
@@ -86,8 +86,8 @@ export declare function stringIsNumberPattern(input: string, options?: {
86
86
  value: number;
87
87
  pattern: string;
88
88
  } | {
89
- isNumberPattern: boolean;
90
89
  value?: undefined;
91
90
  pattern?: undefined;
91
+ isNumberPattern: boolean;
92
92
  };
93
93
  export declare function clearStringToNumberPatternCache(): void;
@@ -13,16 +13,19 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import type { BaseReferenceObject } from '../reference-object/base-reference-object';
16
17
  import type { ArrayValueObject } from './array-value-object';
17
18
  import { BaseValueObject } from './base-value-object';
18
19
  import { NumberValueObject } from './primitive-object';
19
20
  export declare class CubeValueObject extends BaseValueObject {
20
- static create(values: ArrayValueObject[]): CubeValueObject;
21
+ private _references?;
22
+ static create(values: ArrayValueObject[], references?: BaseReferenceObject[]): CubeValueObject;
21
23
  isCube(): boolean;
22
24
  private _values;
23
- constructor(values: ArrayValueObject[]);
25
+ constructor(values: ArrayValueObject[], _references?: BaseReferenceObject[] | undefined);
24
26
  dispose(): void;
25
27
  getCubeValues(): ArrayValueObject[];
28
+ getCubeReferences(): BaseReferenceObject[] | undefined;
26
29
  getCubeCount(): number;
27
30
  sum(): NumberValueObject;
28
31
  max(): NumberValueObject;
@@ -29,12 +29,12 @@ export declare class LambdaValueObjectObject extends BaseValueObject {
29
29
  constructor(_lambdaNode: Nullable<BaseAstNode>, _interpreter: Nullable<Interpreter>, _lambdaPrivacyVarKeys: string[]);
30
30
  dispose(): void;
31
31
  isLambda(): boolean;
32
- execute(...variants: FunctionVariantType[]): BaseValueObject | AsyncObject;
32
+ execute(...variants: FunctionVariantType[]): AsyncObject | BaseValueObject;
33
33
  /**
34
34
  * Execute custom lambda function, handle basic types
35
35
  * @param variants
36
36
  */
37
- executeCustom(...variants: PrimitiveValueType[]): BaseValueObject | AsyncObject;
37
+ executeCustom(...variants: PrimitiveValueType[]): AsyncObject | BaseValueObject;
38
38
  private _setLambdaNodeValue;
39
39
  private _setLambdaPrivacyValueMap;
40
40
  getLambdaPrivacyVarKeys(): string[];
@@ -15,4 +15,4 @@
15
15
  */
16
16
  import { Flatten } from './flatten';
17
17
  import { FUNCTION_NAMES_ARRAY } from './function-names';
18
- export declare const functionArray: (FUNCTION_NAMES_ARRAY | typeof Flatten)[][];
18
+ export declare const functionArray: (typeof Flatten | FUNCTION_NAMES_ARRAY)[][];
@@ -172,12 +172,12 @@ export declare class BaseFunction {
172
172
  equalSearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean): BaseValueObject;
173
173
  fuzzySearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean): BaseValueObject;
174
174
  orderSearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, searchType?: ArrayOrderSearchType, isDesc?: boolean, keepFirstNearest?: boolean): BaseValueObject;
175
- binarySearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, axis?: number, searchType?: ArrayBinarySearchType, matchType?: ArrayOrderSearchType): ErrorValueObject | ArrayValueObject | undefined;
176
- equalSearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean, axis?: number): ErrorValueObject | ArrayValueObject | undefined;
177
- fuzzySearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean, axis?: number): ErrorValueObject | ArrayValueObject | undefined;
178
- orderSearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, searchType?: ArrayOrderSearchType, isDesc?: boolean, axis?: number, keepFirstNearest?: boolean): ErrorValueObject | ArrayValueObject | undefined;
175
+ binarySearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, axis?: number, searchType?: ArrayBinarySearchType, matchType?: ArrayOrderSearchType): ArrayValueObject | ErrorValueObject | undefined;
176
+ equalSearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean, axis?: number): ArrayValueObject | ErrorValueObject | undefined;
177
+ fuzzySearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean, axis?: number): ArrayValueObject | ErrorValueObject | undefined;
178
+ orderSearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, searchType?: ArrayOrderSearchType, isDesc?: boolean, axis?: number, keepFirstNearest?: boolean): ArrayValueObject | ErrorValueObject | undefined;
179
179
  flattenArray(variants: BaseValueObject[], ignoreLogicalValuesAndText?: boolean): ArrayValueObject | BaseValueObject;
180
180
  private _includingLogicalValuesAndText;
181
- createReferenceObject(reference: BaseReferenceObject, range: IRange): ErrorValueObject | BaseReferenceObject;
181
+ createReferenceObject(reference: BaseReferenceObject, range: IRange): BaseReferenceObject | ErrorValueObject;
182
182
  private _setReferenceDefault;
183
183
  }
@@ -13,6 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { StdevS } from '../statistical/stdev-s';
16
+ import { StdevP } from '../statistical/stdev-p';
17
17
  import { FUNCTION_NAMES_COMPATIBILITY } from './function-names';
18
- export declare const functionCompatibility: (FUNCTION_NAMES_COMPATIBILITY | typeof StdevS)[][];
18
+ export declare const functionCompatibility: (typeof StdevP | FUNCTION_NAMES_COMPATIBILITY)[][];
@@ -15,4 +15,4 @@
15
15
  */
16
16
  import { Dget } from './dget';
17
17
  import { FUNCTION_NAMES_DATABASE } from './function-names';
18
- export declare const functionDatabase: (FUNCTION_NAMES_DATABASE | typeof Dget)[][];
18
+ export declare const functionDatabase: (typeof Dget | FUNCTION_NAMES_DATABASE)[][];
@@ -17,4 +17,4 @@ import { DateFunction } from './date';
17
17
  import { FUNCTION_NAMES_DATE } from './function-names';
18
18
  import { NetworkdaysIntl } from './networkdays-intl';
19
19
  import { WorkdayIntl } from './workday-intl';
20
- export declare const functionDate: ((FUNCTION_NAMES_DATE | typeof DateFunction)[] | (FUNCTION_NAMES_DATE | typeof NetworkdaysIntl)[] | (FUNCTION_NAMES_DATE | typeof WorkdayIntl)[])[];
20
+ export declare const functionDate: ((typeof DateFunction | FUNCTION_NAMES_DATE)[] | (typeof NetworkdaysIntl | FUNCTION_NAMES_DATE)[] | (typeof WorkdayIntl | FUNCTION_NAMES_DATE)[])[];
@@ -17,4 +17,4 @@ import { Complex } from './complex';
17
17
  import { FUNCTION_NAMES_ENGINEERING } from './function-names';
18
18
  import { Improduct } from './improduct';
19
19
  import { Imsum } from './imsum';
20
- export declare const functionEngineering: ((FUNCTION_NAMES_ENGINEERING | typeof Complex)[] | (FUNCTION_NAMES_ENGINEERING | typeof Improduct)[] | (FUNCTION_NAMES_ENGINEERING | typeof Imsum)[])[];
20
+ export declare const functionEngineering: ((typeof Complex | FUNCTION_NAMES_ENGINEERING)[] | (typeof Improduct | FUNCTION_NAMES_ENGINEERING)[] | (typeof Imsum | FUNCTION_NAMES_ENGINEERING)[])[];
@@ -21,4 +21,4 @@ import { Oddfyield } from './oddfyield';
21
21
  import { Oddlprice } from './oddlprice';
22
22
  import { Oddlyield } from './oddlyield';
23
23
  import { Price } from './price';
24
- export declare const functionFinancial: ((FUNCTION_NAMES_FINANCIAL | typeof Accrint)[] | (FUNCTION_NAMES_FINANCIAL | typeof Npv)[] | (FUNCTION_NAMES_FINANCIAL | typeof Oddfprice)[] | (FUNCTION_NAMES_FINANCIAL | typeof Oddfyield)[] | (FUNCTION_NAMES_FINANCIAL | typeof Oddlprice)[] | (FUNCTION_NAMES_FINANCIAL | typeof Oddlyield)[] | (FUNCTION_NAMES_FINANCIAL | typeof Price)[])[];
24
+ export declare const functionFinancial: ((typeof Accrint | FUNCTION_NAMES_FINANCIAL)[] | (typeof Npv | FUNCTION_NAMES_FINANCIAL)[] | (typeof Oddfprice | FUNCTION_NAMES_FINANCIAL)[] | (typeof Oddfyield | FUNCTION_NAMES_FINANCIAL)[] | (typeof Oddlprice | FUNCTION_NAMES_FINANCIAL)[] | (typeof Oddlyield | FUNCTION_NAMES_FINANCIAL)[] | (typeof Price | FUNCTION_NAMES_FINANCIAL)[])[];
@@ -17,4 +17,4 @@ import { Cell } from './cell';
17
17
  import { FUNCTION_NAMES_INFORMATION } from './function-names';
18
18
  import { Isbetween } from './isbetween';
19
19
  import { Isblank } from './isblank';
20
- export declare const functionInformation: ((FUNCTION_NAMES_INFORMATION | typeof Cell)[] | (FUNCTION_NAMES_INFORMATION | typeof Isbetween)[] | (FUNCTION_NAMES_INFORMATION | typeof Isblank)[])[];
20
+ export declare const functionInformation: ((typeof Cell | FUNCTION_NAMES_INFORMATION)[] | (typeof Isbetween | FUNCTION_NAMES_INFORMATION)[] | (typeof Isblank | FUNCTION_NAMES_INFORMATION)[])[];
@@ -20,5 +20,5 @@ export declare class Isblank extends BaseFunction {
20
20
  minParams: number;
21
21
  maxParams: number;
22
22
  needsReferenceObject: boolean;
23
- calculate(value: FunctionVariantType): import("../../..").BaseValueObject | ArrayValueObject;
23
+ calculate(value: FunctionVariantType): ArrayValueObject | import("../../..").BaseValueObject;
24
24
  }
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
20
20
  export declare class Iserr extends BaseFunction {
21
21
  minParams: number;
22
22
  maxParams: number;
23
- calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
23
+ calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
24
24
  }
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
20
20
  export declare class Iserror extends BaseFunction {
21
21
  minParams: number;
22
22
  maxParams: number;
23
- calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
23
+ calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
24
24
  }
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
20
20
  export declare class Islogical extends BaseFunction {
21
21
  minParams: number;
22
22
  maxParams: number;
23
- calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
23
+ calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
24
24
  }
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
20
20
  export declare class Isna extends BaseFunction {
21
21
  minParams: number;
22
22
  maxParams: number;
23
- calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
23
+ calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
24
24
  }
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
20
20
  export declare class Isnontext extends BaseFunction {
21
21
  minParams: number;
22
22
  maxParams: number;
23
- calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
23
+ calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
24
24
  }
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
20
20
  export declare class Isnumber extends BaseFunction {
21
21
  minParams: number;
22
22
  maxParams: number;
23
- calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
23
+ calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
24
24
  }
@@ -20,5 +20,5 @@ import { BaseFunction } from '../../base-function';
20
20
  export declare class Istext extends BaseFunction {
21
21
  minParams: number;
22
22
  maxParams: number;
23
- calculate(value: BaseValueObject): BooleanValueObject | ArrayValueObject;
23
+ calculate(value: BaseValueObject): ArrayValueObject | BooleanValueObject;
24
24
  }
@@ -19,4 +19,4 @@ import { Groupby } from './groupby';
19
19
  import { If } from './if';
20
20
  import { Ifna } from './ifna';
21
21
  import { Makearray } from './makearray';
22
- export declare const functionLogical: ((FUNCTION_NAMES_LOGICAL | typeof And)[] | (FUNCTION_NAMES_LOGICAL | typeof Groupby)[] | (FUNCTION_NAMES_LOGICAL | typeof If)[] | (FUNCTION_NAMES_LOGICAL | typeof Ifna)[] | (FUNCTION_NAMES_LOGICAL | typeof Makearray)[])[];
22
+ export declare const functionLogical: ((typeof And | FUNCTION_NAMES_LOGICAL)[] | (typeof Groupby | FUNCTION_NAMES_LOGICAL)[] | (typeof If | FUNCTION_NAMES_LOGICAL)[] | (typeof Ifna | FUNCTION_NAMES_LOGICAL)[] | (typeof Makearray | FUNCTION_NAMES_LOGICAL)[])[];
@@ -23,7 +23,7 @@ export declare class Groupby extends BaseFunction {
23
23
  maxParams: number;
24
24
  needsReferenceObject: boolean;
25
25
  needsAstChildren: boolean;
26
- calculateAst(children: BaseAstNode[], getVariant: (node: BaseAstNode) => FunctionVariantType | null): ErrorValueObject | ArrayValueObject;
26
+ calculateAst(children: BaseAstNode[], getVariant: (node: BaseAstNode) => FunctionVariantType | null): ArrayValueObject | ErrorValueObject;
27
27
  private _arrayInput;
28
28
  private _aggregators;
29
29
  private _normalizedFunctionName;
@@ -19,7 +19,7 @@ import { BaseFunction } from '../../base-function';
19
19
  export declare class If extends BaseFunction {
20
20
  minParams: number;
21
21
  maxParams: number;
22
- calculate(logicalTest: BaseValueObject, valueIfTrue: BaseValueObject, valueIfFalse?: BaseValueObject): BaseValueObject | ArrayValueObject;
22
+ calculate(logicalTest: BaseValueObject, valueIfTrue: BaseValueObject, valueIfFalse?: BaseValueObject): ArrayValueObject | BaseValueObject;
23
23
  private _handleSingleObject;
24
24
  private _coerceSelectedValue;
25
25
  private _coerceLogicalTest;
@@ -21,6 +21,6 @@ export declare class Iferror extends BaseFunction {
21
21
  minParams: number;
22
22
  maxParams: number;
23
23
  needsReferenceObject: boolean;
24
- calculate(value: FunctionVariantType, valueIfError: FunctionVariantType): BaseValueObject | ArrayValueObject;
24
+ calculate(value: FunctionVariantType, valueIfError: FunctionVariantType): ArrayValueObject | BaseValueObject;
25
25
  private _toValueObject;
26
26
  }
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
19
19
  export declare class Ifna extends BaseFunction {
20
20
  minParams: number;
21
21
  maxParams: number;
22
- calculate(value: BaseValueObject, valueIfNa: BaseValueObject): BaseValueObject | ArrayValueObject;
22
+ calculate(value: BaseValueObject, valueIfNa: BaseValueObject): ArrayValueObject | BaseValueObject;
23
23
  }
@@ -20,6 +20,6 @@ import { BaseFunction } from '../../base-function';
20
20
  export declare class Makearray extends BaseFunction {
21
21
  minParams: number;
22
22
  maxParams: number;
23
- calculate(...variants: BaseValueObject[]): ErrorValueObject | AsyncArrayObject;
23
+ calculate(...variants: BaseValueObject[]): AsyncArrayObject | ErrorValueObject;
24
24
  isAsync(): boolean;
25
25
  }
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
19
19
  export declare class Choosecols extends BaseFunction {
20
20
  minParams: number;
21
21
  maxParams: number;
22
- calculate(array: BaseValueObject, ...variants: BaseValueObject[]): BaseValueObject | ArrayValueObject;
22
+ calculate(array: BaseValueObject, ...variants: BaseValueObject[]): ArrayValueObject | BaseValueObject;
23
23
  }
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
19
19
  export declare class Chooserows extends BaseFunction {
20
20
  minParams: number;
21
21
  maxParams: number;
22
- calculate(array: BaseValueObject, ...variants: BaseValueObject[]): BaseValueObject | ArrayValueObject;
22
+ calculate(array: BaseValueObject, ...variants: BaseValueObject[]): ArrayValueObject | BaseValueObject;
23
23
  }
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
19
19
  export declare class Column extends BaseFunction {
20
20
  minParams: number;
21
21
  maxParams: number;
22
- calculate(reference?: BaseValueObject): BaseValueObject | ArrayValueObject;
22
+ calculate(reference?: BaseValueObject): ArrayValueObject | BaseValueObject;
23
23
  }
@@ -22,5 +22,5 @@ export declare class Formulatext extends BaseFunction {
22
22
  maxParams: number;
23
23
  needsReferenceObject: boolean;
24
24
  needsFormulaDataModel: boolean;
25
- calculate(reference: FunctionVariantType): BaseValueObject | ArrayValueObject;
25
+ calculate(reference: FunctionVariantType): ArrayValueObject | BaseValueObject;
26
26
  }
@@ -22,4 +22,4 @@ import { Indirect } from './indirect';
22
22
  import { Lookup } from './lookup';
23
23
  import { Match } from './match';
24
24
  import { Offset } from './offset';
25
- export declare const functionLookup: ((FUNCTION_NAMES_LOOKUP | typeof Anchorarray)[] | (FUNCTION_NAMES_LOOKUP | typeof Choose)[] | (FUNCTION_NAMES_LOOKUP | typeof Hstack)[] | (FUNCTION_NAMES_LOOKUP | typeof Index)[] | (FUNCTION_NAMES_LOOKUP | typeof Indirect)[] | (FUNCTION_NAMES_LOOKUP | typeof Lookup)[] | (FUNCTION_NAMES_LOOKUP | typeof Match)[] | (FUNCTION_NAMES_LOOKUP | typeof Offset)[])[];
25
+ export declare const functionLookup: ((typeof Anchorarray | FUNCTION_NAMES_LOOKUP)[] | (typeof Choose | FUNCTION_NAMES_LOOKUP)[] | (typeof Hstack | FUNCTION_NAMES_LOOKUP)[] | (typeof Index | FUNCTION_NAMES_LOOKUP)[] | (typeof Indirect | FUNCTION_NAMES_LOOKUP)[] | (typeof Lookup | FUNCTION_NAMES_LOOKUP)[] | (typeof Match | FUNCTION_NAMES_LOOKUP)[] | (typeof Offset | FUNCTION_NAMES_LOOKUP)[])[];
@@ -13,8 +13,13 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { NotImplementedFunction } from '../../not-implemented-function';
17
- export declare class Getpivotdata extends NotImplementedFunction {
16
+ import type { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
17
+ import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
18
+ import { BaseFunction } from '../../base-function';
19
+ export declare class Getpivotdata extends BaseFunction {
18
20
  minParams: number;
19
21
  maxParams: number;
22
+ needsReferenceObject: boolean;
23
+ calculate(...variants: FunctionVariantType[]): BaseValueObject;
24
+ private _textArgument;
20
25
  }
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
19
19
  export declare class Hstack extends BaseFunction {
20
20
  minParams: number;
21
21
  maxParams: number;
22
- calculate(...variants: BaseValueObject[]): BaseValueObject | ArrayValueObject;
22
+ calculate(...variants: BaseValueObject[]): ArrayValueObject | BaseValueObject;
23
23
  }
@@ -30,6 +30,7 @@ export declare class Index extends BaseFunction {
30
30
  needsReferenceObject: boolean;
31
31
  calculate(reference: FunctionVariantType, rowNum: FunctionVariantType, columnNum?: FunctionVariantType, areaNum?: FunctionVariantType): BaseValueObject | BaseReferenceObject;
32
32
  private _handleSingleObject;
33
+ private _getReferenceArea;
33
34
  private _getReferenceCounts;
34
35
  private _calculateReferenceObject;
35
36
  private _calculateArrayObject;
@@ -21,7 +21,7 @@ export declare class Indirect extends BaseFunction {
21
21
  maxParams: number;
22
22
  needsUnitReferenceResolver: boolean;
23
23
  isAddress(): boolean;
24
- calculate(refText: BaseValueObject, a1?: BaseValueObject): BaseValueObject | BaseReferenceObject;
24
+ calculate(refText: BaseValueObject, a1?: BaseValueObject): BaseReferenceObject | BaseValueObject;
25
25
  private _handleSingleObject;
26
26
  private _setDefault;
27
27
  /**
@@ -19,5 +19,5 @@ import { BaseFunction } from '../../base-function';
19
19
  export declare class Row extends BaseFunction {
20
20
  minParams: number;
21
21
  maxParams: number;
22
- calculate(reference?: BaseValueObject): BaseValueObject | ArrayValueObject;
22
+ calculate(reference?: BaseValueObject): ArrayValueObject | BaseValueObject;
23
23
  }