@univerjs/engine-formula 0.1.0-alpha.1 → 0.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/LICENSE.txt +178 -0
  2. package/lib/cjs/index.js +1 -8809
  3. package/lib/es/index.js +4962 -0
  4. package/lib/types/basics/cache-lru.d.ts +15 -1
  5. package/lib/types/basics/calculate.d.ts +15 -1
  6. package/lib/types/basics/common.d.ts +28 -1
  7. package/lib/types/basics/dirty.d.ts +15 -1
  8. package/lib/types/basics/error-type.d.ts +13 -3
  9. package/lib/types/basics/function.d.ts +32 -18
  10. package/lib/types/basics/match-token.d.ts +16 -2
  11. package/lib/types/basics/object-class-type.d.ts +15 -1
  12. package/lib/types/basics/regex.d.ts +15 -1
  13. package/lib/types/basics/token-type.d.ts +15 -1
  14. package/lib/types/basics/token.d.ts +18 -2
  15. package/lib/types/commands/mutations/set-array-formula-data.mutation.d.ts +24 -0
  16. package/lib/types/commands/mutations/set-defined-name.mutation.d.ts +29 -0
  17. package/lib/types/commands/mutations/set-feature-calculation.mutation.d.ts +29 -0
  18. package/lib/types/commands/mutations/set-formula-calculation.mutation.d.ts +43 -0
  19. package/lib/types/commands/mutations/set-formula-data.mutation.d.ts +21 -0
  20. package/lib/types/commands/mutations/set-other-formula.mutation.d.ts +23 -0
  21. package/lib/types/commands/mutations/set-super-table.mutation.d.ts +32 -0
  22. package/lib/types/controller/calculate.controller.d.ts +31 -0
  23. package/lib/types/controller/formula.controller.d.ts +27 -0
  24. package/lib/types/controller/set-defined-name.controller.d.ts +24 -0
  25. package/lib/types/controller/set-feature-calculation.controller.d.ts +24 -0
  26. package/lib/types/controller/set-other-formula.controller.d.ts +24 -0
  27. package/lib/types/controller/set-super-table.controller.d.ts +24 -0
  28. package/lib/types/engine/analysis/__tests__/create-command-test-bed.d.ts +30 -0
  29. package/lib/types/engine/analysis/__tests__/lexer-tree-builder.spec.d.ts +16 -0
  30. package/lib/types/engine/analysis/__tests__/lexer.spec.d.ts +16 -0
  31. package/lib/types/{analysis → engine/analysis}/lexer-node.d.ts +16 -2
  32. package/lib/types/{analysis/lexer.d.ts → engine/analysis/lexer-tree-builder.d.ts} +32 -5
  33. package/lib/types/engine/analysis/lexer.d.ts +27 -0
  34. package/lib/types/{analysis → engine/analysis}/parser.d.ts +16 -2
  35. package/lib/types/engine/ast-node/ast-root-node.d.ts +27 -0
  36. package/lib/types/engine/ast-node/base-ast-node-factory.d.ts +25 -0
  37. package/lib/types/{ast-node → engine/ast-node}/base-ast-node.d.ts +17 -3
  38. package/lib/types/{ast-node → engine/ast-node}/function-node.d.ts +18 -4
  39. package/lib/types/engine/ast-node/index.d.ts +25 -0
  40. package/lib/types/{ast-node → engine/ast-node}/lambda-node.d.ts +16 -2
  41. package/lib/types/{ast-node → engine/ast-node}/lambda-parameter-node.d.ts +15 -1
  42. package/lib/types/engine/ast-node/node-type.d.ts +31 -0
  43. package/lib/types/engine/ast-node/null-node.d.ts +23 -0
  44. package/lib/types/{ast-node → engine/ast-node}/operator-node.d.ts +17 -3
  45. package/lib/types/{ast-node → engine/ast-node}/prefix-node.d.ts +17 -3
  46. package/lib/types/engine/ast-node/reference-node.d.ts +44 -0
  47. package/lib/types/{ast-node → engine/ast-node}/suffix-node.d.ts +17 -3
  48. package/lib/types/{ast-node → engine/ast-node}/union-node.d.ts +17 -3
  49. package/lib/types/{ast-node → engine/ast-node}/value-node.d.ts +15 -1
  50. package/lib/types/{dependency → engine/dependency}/dependency-tree.d.ts +27 -4
  51. package/lib/types/{dependency → engine/dependency}/formula-dependency.d.ts +26 -7
  52. package/lib/types/engine/interpreter/interpreter.d.ts +32 -0
  53. package/lib/types/engine/other-object/error-value-object.d.ts +26 -0
  54. package/lib/types/{reference-object → engine/reference-object}/base-reference-object.d.ts +30 -6
  55. package/lib/types/engine/reference-object/cell-reference-object.d.ts +26 -0
  56. package/lib/types/engine/reference-object/column-reference-object.d.ts +22 -0
  57. package/lib/types/engine/reference-object/range-reference-object.d.ts +21 -0
  58. package/lib/types/engine/reference-object/row-reference-object.d.ts +22 -0
  59. package/lib/types/engine/reference-object/table-reference-object.d.ts +26 -0
  60. package/lib/types/engine/utils/function-definition.d.ts +18 -0
  61. package/lib/types/engine/utils/node-type.d.ts +20 -0
  62. package/lib/types/{basics → engine/utils}/sequence.d.ts +15 -1
  63. package/lib/types/{value-object → engine/value-object}/array-value-object.d.ts +17 -2
  64. package/lib/types/{value-object → engine/value-object}/base-value-object.d.ts +18 -4
  65. package/lib/types/{value-object → engine/value-object}/primitive-object.d.ts +16 -2
  66. package/lib/types/functions/__tests__/create-command-test-bed.d.ts +34 -0
  67. package/lib/types/functions/array/function-map.d.ts +16 -0
  68. package/lib/types/functions/array/function-names.d.ts +17 -0
  69. package/lib/types/functions/base-function.d.ts +19 -4
  70. package/lib/types/functions/compatibility/concatenate/concatenate.d.ts +21 -0
  71. package/lib/types/functions/compatibility/function-map.d.ts +18 -0
  72. package/lib/types/functions/compatibility/function-names.d.ts +18 -0
  73. package/lib/types/functions/cube/function-map.d.ts +16 -0
  74. package/lib/types/functions/cube/function-names.d.ts +17 -0
  75. package/lib/types/functions/database/function-map.d.ts +16 -0
  76. package/lib/types/functions/database/function-names.d.ts +17 -0
  77. package/lib/types/functions/date/function-map.d.ts +16 -0
  78. package/lib/types/functions/date/function-names.d.ts +17 -0
  79. package/lib/types/functions/engineering/function-map.d.ts +16 -0
  80. package/lib/types/functions/engineering/function-names.d.ts +17 -0
  81. package/lib/types/functions/financial/function-map.d.ts +16 -0
  82. package/lib/types/functions/financial/function-names.d.ts +17 -0
  83. package/lib/types/functions/information/function-map.d.ts +16 -0
  84. package/lib/types/functions/information/function-names.d.ts +17 -0
  85. package/lib/types/functions/logical/function-map.d.ts +16 -0
  86. package/lib/types/functions/logical/function-names.d.ts +17 -0
  87. package/lib/types/functions/lookup/function-map.d.ts +18 -0
  88. package/lib/types/functions/lookup/function-names.d.ts +19 -0
  89. package/lib/types/functions/lookup/indirect/indirect.d.ts +21 -0
  90. package/lib/types/functions/lookup/offset/offset.d.ts +21 -0
  91. package/lib/types/functions/math/function-map.d.ts +18 -0
  92. package/lib/types/functions/math/function-names.d.ts +21 -0
  93. package/lib/types/functions/math/power/power.d.ts +21 -0
  94. package/lib/types/functions/math/sum/sum.d.ts +22 -0
  95. package/lib/types/functions/math/sumif/__tests__/sumif.spec.d.ts +16 -0
  96. package/lib/types/functions/math/sumif/sumif.d.ts +23 -0
  97. package/lib/types/functions/math/sumifs/__tests__/sumifs.spec.d.ts +16 -0
  98. package/lib/types/functions/math/sumifs/sumifs.d.ts +21 -0
  99. package/lib/types/functions/meta/compare/compare.d.ts +23 -0
  100. package/lib/types/functions/meta/divided/divided.d.ts +20 -0
  101. package/lib/types/functions/meta/function-map.d.ts +19 -0
  102. package/lib/types/functions/meta/function-names.d.ts +23 -0
  103. package/lib/types/functions/meta/minus/minus.d.ts +20 -0
  104. package/lib/types/functions/meta/multiply/multiply.d.ts +20 -0
  105. package/lib/types/functions/meta/plus/plus.d.ts +20 -0
  106. package/lib/types/functions/meta/union/union.d.ts +23 -0
  107. package/lib/types/functions/statistical/average/average.d.ts +20 -0
  108. package/lib/types/functions/statistical/count/count.d.ts +21 -0
  109. package/lib/types/functions/statistical/function-map.d.ts +18 -0
  110. package/lib/types/functions/statistical/function-names.d.ts +21 -0
  111. package/lib/types/functions/statistical/max/max.d.ts +22 -0
  112. package/lib/types/functions/statistical/min/min.d.ts +22 -0
  113. package/lib/types/functions/text/function-map.d.ts +16 -0
  114. package/lib/types/functions/text/function-names.d.ts +17 -0
  115. package/lib/types/functions/univer/function-map.d.ts +16 -0
  116. package/lib/types/functions/univer/function-names.d.ts +17 -0
  117. package/lib/types/functions/web/function-map.d.ts +16 -0
  118. package/lib/types/functions/web/function-names.d.ts +17 -0
  119. package/lib/types/index.d.ts +59 -15
  120. package/lib/types/models/__tests__/create-command-test-bed.d.ts +30 -0
  121. package/lib/types/models/__tests__/formula-data.model.spec.d.ts +16 -0
  122. package/lib/types/models/formula-data.model.d.ts +52 -0
  123. package/lib/types/plugin.d.ts +25 -4
  124. package/lib/types/services/calculate-formula.service.d.ts +63 -0
  125. package/lib/types/services/current-data.service.d.ts +22 -6
  126. package/lib/types/services/defined-names.service.d.ts +26 -5
  127. package/lib/types/services/feature-calculation-manager.service.d.ts +52 -0
  128. package/lib/types/services/function.service.d.ts +41 -14
  129. package/lib/types/services/other-formula-manager.service.d.ts +50 -0
  130. package/lib/types/services/runtime.service.d.ts +42 -4
  131. package/lib/types/services/super-table.service.d.ts +26 -5
  132. package/lib/umd/index.js +1 -0
  133. package/package.json +20 -16
  134. package/LICENSE +0 -21
  135. package/lib/esm/index.js +0 -8800
  136. package/lib/types/analysis/lexer-node.d.ts.map +0 -1
  137. package/lib/types/analysis/lexer.d.ts.map +0 -1
  138. package/lib/types/analysis/parser.d.ts.map +0 -1
  139. package/lib/types/analysis/un-parser.d.ts +0 -1
  140. package/lib/types/analysis/un-parser.d.ts.map +0 -1
  141. package/lib/types/ast-node/ast-root-node.d.ts +0 -13
  142. package/lib/types/ast-node/ast-root-node.d.ts.map +0 -1
  143. package/lib/types/ast-node/base-ast-node-factory.d.ts +0 -11
  144. package/lib/types/ast-node/base-ast-node-factory.d.ts.map +0 -1
  145. package/lib/types/ast-node/base-ast-node.d.ts.map +0 -1
  146. package/lib/types/ast-node/function-node.d.ts.map +0 -1
  147. package/lib/types/ast-node/index.d.ts +0 -11
  148. package/lib/types/ast-node/index.d.ts.map +0 -1
  149. package/lib/types/ast-node/lambda-node.d.ts.map +0 -1
  150. package/lib/types/ast-node/lambda-parameter-node.d.ts.map +0 -1
  151. package/lib/types/ast-node/node-type.d.ts +0 -17
  152. package/lib/types/ast-node/node-type.d.ts.map +0 -1
  153. package/lib/types/ast-node/null-node.d.ts +0 -9
  154. package/lib/types/ast-node/null-node.d.ts.map +0 -1
  155. package/lib/types/ast-node/operator-node.d.ts.map +0 -1
  156. package/lib/types/ast-node/prefix-node.d.ts.map +0 -1
  157. package/lib/types/ast-node/reference-node.d.ts +0 -28
  158. package/lib/types/ast-node/reference-node.d.ts.map +0 -1
  159. package/lib/types/ast-node/suffix-node.d.ts.map +0 -1
  160. package/lib/types/ast-node/union-node.d.ts.map +0 -1
  161. package/lib/types/ast-node/value-node.d.ts.map +0 -1
  162. package/lib/types/basics/cache-lru.d.ts.map +0 -1
  163. package/lib/types/basics/calculate.d.ts.map +0 -1
  164. package/lib/types/basics/common.d.ts.map +0 -1
  165. package/lib/types/basics/dirty.d.ts.map +0 -1
  166. package/lib/types/basics/error-type.d.ts.map +0 -1
  167. package/lib/types/basics/function-definition.d.ts +0 -4
  168. package/lib/types/basics/function-definition.d.ts.map +0 -1
  169. package/lib/types/basics/function.d.ts.map +0 -1
  170. package/lib/types/basics/match-token.d.ts.map +0 -1
  171. package/lib/types/basics/node-type.d.ts +0 -6
  172. package/lib/types/basics/node-type.d.ts.map +0 -1
  173. package/lib/types/basics/object-class-type.d.ts.map +0 -1
  174. package/lib/types/basics/regex.d.ts.map +0 -1
  175. package/lib/types/basics/sequence.d.ts.map +0 -1
  176. package/lib/types/basics/set-zero-time-out.d.ts +0 -7
  177. package/lib/types/basics/set-zero-time-out.d.ts.map +0 -1
  178. package/lib/types/basics/token-type.d.ts.map +0 -1
  179. package/lib/types/basics/token.d.ts.map +0 -1
  180. package/lib/types/dependency/dependency-tree.d.ts.map +0 -1
  181. package/lib/types/dependency/formula-dependency.d.ts.map +0 -1
  182. package/lib/types/functions/average.d.ts +0 -6
  183. package/lib/types/functions/average.d.ts.map +0 -1
  184. package/lib/types/functions/base-function.d.ts.map +0 -1
  185. package/lib/types/functions/concatenate.d.ts +0 -7
  186. package/lib/types/functions/concatenate.d.ts.map +0 -1
  187. package/lib/types/functions/count.d.ts +0 -7
  188. package/lib/types/functions/count.d.ts.map +0 -1
  189. package/lib/types/functions/index.d.ts +0 -16
  190. package/lib/types/functions/index.d.ts.map +0 -1
  191. package/lib/types/functions/indirect.d.ts +0 -7
  192. package/lib/types/functions/indirect.d.ts.map +0 -1
  193. package/lib/types/functions/max.d.ts +0 -8
  194. package/lib/types/functions/max.d.ts.map +0 -1
  195. package/lib/types/functions/meta/compare.d.ts +0 -9
  196. package/lib/types/functions/meta/compare.d.ts.map +0 -1
  197. package/lib/types/functions/meta/divided.d.ts +0 -6
  198. package/lib/types/functions/meta/divided.d.ts.map +0 -1
  199. package/lib/types/functions/meta/minus.d.ts +0 -6
  200. package/lib/types/functions/meta/minus.d.ts.map +0 -1
  201. package/lib/types/functions/meta/multiply.d.ts +0 -6
  202. package/lib/types/functions/meta/multiply.d.ts.map +0 -1
  203. package/lib/types/functions/meta/plus.d.ts +0 -6
  204. package/lib/types/functions/meta/plus.d.ts.map +0 -1
  205. package/lib/types/functions/meta/union.d.ts +0 -9
  206. package/lib/types/functions/meta/union.d.ts.map +0 -1
  207. package/lib/types/functions/min.d.ts +0 -8
  208. package/lib/types/functions/min.d.ts.map +0 -1
  209. package/lib/types/functions/offset.d.ts +0 -7
  210. package/lib/types/functions/offset.d.ts.map +0 -1
  211. package/lib/types/functions/power.d.ts +0 -7
  212. package/lib/types/functions/power.d.ts.map +0 -1
  213. package/lib/types/functions/sum.d.ts +0 -8
  214. package/lib/types/functions/sum.d.ts.map +0 -1
  215. package/lib/types/index.d.ts.map +0 -1
  216. package/lib/types/interpreter/interpreter.d.ts +0 -18
  217. package/lib/types/interpreter/interpreter.d.ts.map +0 -1
  218. package/lib/types/other-object/error-value-object.d.ts +0 -12
  219. package/lib/types/other-object/error-value-object.d.ts.map +0 -1
  220. package/lib/types/plugin.d.ts.map +0 -1
  221. package/lib/types/reference-object/base-reference-object.d.ts.map +0 -1
  222. package/lib/types/reference-object/cell-reference-object.d.ts +0 -12
  223. package/lib/types/reference-object/cell-reference-object.d.ts.map +0 -1
  224. package/lib/types/reference-object/column-reference-object.d.ts +0 -8
  225. package/lib/types/reference-object/column-reference-object.d.ts.map +0 -1
  226. package/lib/types/reference-object/range-reference-object.d.ts +0 -7
  227. package/lib/types/reference-object/range-reference-object.d.ts.map +0 -1
  228. package/lib/types/reference-object/row-reference-object.d.ts +0 -8
  229. package/lib/types/reference-object/row-reference-object.d.ts.map +0 -1
  230. package/lib/types/reference-object/table-reference-object.d.ts +0 -12
  231. package/lib/types/reference-object/table-reference-object.d.ts.map +0 -1
  232. package/lib/types/services/current-data.service.d.ts.map +0 -1
  233. package/lib/types/services/defined-names.service.d.ts.map +0 -1
  234. package/lib/types/services/formula-engine.service.d.ts +0 -98
  235. package/lib/types/services/formula-engine.service.d.ts.map +0 -1
  236. package/lib/types/services/function.service.d.ts.map +0 -1
  237. package/lib/types/services/runtime.service.d.ts.map +0 -1
  238. package/lib/types/services/super-table.service.d.ts.map +0 -1
  239. package/lib/types/value-object/array-value-object.d.ts.map +0 -1
  240. package/lib/types/value-object/base-value-object.d.ts.map +0 -1
  241. package/lib/types/value-object/primitive-object.d.ts.map +0 -1
@@ -0,0 +1,52 @@
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 { ICellData, Nullable, ObjectMatrixPrimitiveType } from '@univerjs/core';
17
+ import { Disposable, IUniverInstanceService, ObjectMatrix } from '@univerjs/core';
18
+ import type { IArrayFormulaRangeType, IArrayFormulaUnitCellType, IFormulaData, IFormulaDataItem, IRuntimeUnitDataType, IUnitData, IUnitSheetNameMap } from '../basics/common';
19
+ import { LexerTreeBuilder } from '../engine/analysis/lexer-tree-builder';
20
+ export interface IFormulaIdMap {
21
+ f: string;
22
+ r: number;
23
+ c: number;
24
+ }
25
+ export declare class FormulaDataModel extends Disposable {
26
+ private readonly _currentUniverService;
27
+ private readonly _lexerTreeBuilder;
28
+ private _formulaData;
29
+ private _arrayFormulaRange;
30
+ private _arrayFormulaCellData;
31
+ constructor(_currentUniverService: IUniverInstanceService, _lexerTreeBuilder: LexerTreeBuilder);
32
+ clearPreviousArrayFormulaCellData(clearArrayFormulaCellData: IRuntimeUnitDataType): void;
33
+ mergeArrayFormulaCellData(unitData: IRuntimeUnitDataType): void;
34
+ getFormulaData(): IFormulaData;
35
+ setFormulaData(value: IFormulaData): void;
36
+ setArrayFormulaRange(value: IArrayFormulaRangeType): void;
37
+ getArrayFormulaRange(): IArrayFormulaRangeType;
38
+ setArrayFormulaCellData(value: IArrayFormulaUnitCellType): void;
39
+ getArrayFormulaCellData(): IArrayFormulaUnitCellType;
40
+ mergeArrayFormulaRange(formulaData: IArrayFormulaRangeType): void;
41
+ deleteArrayFormulaRange(unitId: string, sheetId: string, row: number, column: number): void;
42
+ initFormulaData(): void;
43
+ getCalculateData(): {
44
+ allUnitData: IUnitData;
45
+ unitSheetNameMap: IUnitSheetNameMap;
46
+ };
47
+ updateFormulaData(unitId: string, sheetId: string, cellValue: ObjectMatrixPrimitiveType<ICellData | null>): void;
48
+ getFormulaItemBySId(sId: string, sheetId: string, unitId: string): Nullable<IFormulaDataItem>;
49
+ getFormulaDataItem(row: number, column: number, sheetId: string, unitId: string): IFormulaDataItem;
50
+ getFormulaIdMap(unitId: string, sheetId: string): Map<string, IFormulaIdMap>;
51
+ }
52
+ export declare function initSheetFormulaData(formulaData: IFormulaData, unitId: string, sheetId: string, cellMatrix: ObjectMatrix<ICellData>): void;
@@ -1,8 +1,29 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  import { Plugin } from '@univerjs/core';
2
17
  import { Injector } from '@wendellhu/redi';
3
- export declare class BaseFormulaEnginePlugin extends Plugin {
18
+ interface IUniverFormulaEngine {
19
+ notExecuteFormula?: boolean;
20
+ }
21
+ export declare class UniverFormulaEnginePlugin extends Plugin {
22
+ private _config;
4
23
  protected _injector: Injector;
5
- constructor(_config: undefined, _injector: Injector);
6
- onStarting(injector: Injector): void;
24
+ constructor(_config: IUniverFormulaEngine, _injector: Injector);
25
+ onStarting(): void;
26
+ private _initialize;
27
+ onReady(): void;
7
28
  }
8
- //# sourceMappingURL=plugin.d.ts.map
29
+ export {};
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Disposable, IConfigService } from '@univerjs/core';
17
+ import type { IFeatureDirtyRangeType, IFormulaDatasetConfig, IRuntimeUnitDataType } from '../basics/common';
18
+ import { Lexer } from '../engine/analysis/lexer';
19
+ import { AstTreeBuilder } from '../engine/analysis/parser';
20
+ import { ErrorNode } from '../engine/ast-node/base-ast-node';
21
+ import { FormulaDependencyGenerator } from '../engine/dependency/formula-dependency';
22
+ import { Interpreter } from '../engine/interpreter/interpreter';
23
+ import { IFormulaCurrentConfigService } from './current-data.service';
24
+ import type { IAllRuntimeData, IExecutionInProgressParams } from './runtime.service';
25
+ import { IFormulaRuntimeService } from './runtime.service';
26
+ export declare const DEFAULT_CYCLE_REFERENCE_COUNT = 1;
27
+ export declare const CYCLE_REFERENCE_COUNT = "cycleReferenceCount";
28
+ export declare const EVERY_N_FUNCTION_EXECUTION_PAUSE = 100;
29
+ export declare class CalculateFormulaService extends Disposable {
30
+ private readonly _configService;
31
+ private readonly _lexer;
32
+ private readonly _currentConfigService;
33
+ private readonly _runtimeService;
34
+ private readonly _formulaDependencyGenerator;
35
+ private readonly _interpreter;
36
+ private readonly _astTreeBuilder;
37
+ private readonly _executionStartListener$;
38
+ readonly executionStartListener$: import("rxjs").Observable<boolean>;
39
+ private readonly _executionCompleteListener$;
40
+ readonly executionCompleteListener$: import("rxjs").Observable<IAllRuntimeData>;
41
+ private readonly _executionInProgressListener$;
42
+ readonly executionInProgressListener$: import("rxjs").Observable<IExecutionInProgressParams>;
43
+ constructor(_configService: IConfigService, _lexer: Lexer, _currentConfigService: IFormulaCurrentConfigService, _runtimeService: IFormulaRuntimeService, _formulaDependencyGenerator: FormulaDependencyGenerator, _interpreter: Interpreter, _astTreeBuilder: AstTreeBuilder);
44
+ dispose(): void;
45
+ /**
46
+ * Stop the execution of the formula.
47
+ */
48
+ stopFormulaExecution(): void;
49
+ /**
50
+ * When the feature is loading,
51
+ * the pre-calculated content needs to be input to the formula engine in advance,
52
+ * so that the formula can read the correct values.
53
+ * @param featureId
54
+ * @param featureData
55
+ */
56
+ setRuntimeFeatureCellData(featureId: string, featureData: IRuntimeUnitDataType): void;
57
+ setRuntimeFeatureRange(featureId: string, featureRange: IFeatureDirtyRangeType): void;
58
+ execute(formulaDatasetConfig: IFormulaDatasetConfig): Promise<void>;
59
+ private _execute;
60
+ private _getArrayFormulaDirtyRangeAndExcludedRange;
61
+ private _apply;
62
+ calculate(formulaString: string, transformSuffix?: boolean): ErrorNode | undefined;
63
+ }
@@ -1,14 +1,31 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  import type { IUnitRange, Nullable } from '@univerjs/core';
2
17
  import { Disposable, IUniverInstanceService } from '@univerjs/core';
3
- import type { IFormulaData, IFormulaDatasetConfig, IOtherFormulaData, IRuntimeUnitDataType, IUnitData, IUnitExcludedCell, IUnitSheetNameMap } from '../basics/common';
18
+ import type { IDirtyUnitFeatureMap, IDirtyUnitSheetNameMap, IFormulaData, IFormulaDatasetConfig, IRuntimeUnitDataType, IUnitData, IUnitExcludedCell, IUnitSheetNameMap } from '../basics/common';
4
19
  export declare const DEFAULT_DOCUMENT_SUB_COMPONENT_ID = "__default_document_sub_component_id20231101__";
5
20
  export interface IFormulaCurrentConfigService {
21
+ load(config: IFormulaDatasetConfig): void;
6
22
  getUnitData(): IUnitData;
7
23
  getFormulaData(): IFormulaData;
8
- getOtherFormulaData(): IOtherFormulaData;
9
24
  getSheetNameMap(): IUnitSheetNameMap;
10
25
  isForceCalculate(): boolean;
11
26
  getDirtyRanges(): IUnitRange[];
27
+ getDirtyNameMap(): IDirtyUnitSheetNameMap;
28
+ getDirtyUnitFeatureMap(): IDirtyUnitFeatureMap;
12
29
  registerUnitData(unitData: IUnitData): void;
13
30
  registerFormulaData(formulaData: IFormulaData): void;
14
31
  registerSheetNameMap(sheetNameMap: IUnitSheetNameMap): void;
@@ -19,12 +36,12 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
19
36
  private readonly _currentUniverService;
20
37
  private _unitData;
21
38
  private _arrayFormulaCellData;
22
- private _otherFormulaData;
23
39
  private _formulaData;
24
40
  private _sheetNameMap;
25
41
  private _forceCalculate;
26
42
  private _dirtyRanges;
27
43
  private _dirtyNameMap;
44
+ private _dirtyUnitFeatureMap;
28
45
  private _excludedCell;
29
46
  constructor(_currentUniverService: IUniverInstanceService);
30
47
  dispose(): void;
@@ -32,18 +49,17 @@ export declare class FormulaCurrentConfigService extends Disposable implements I
32
49
  getUnitData(): IUnitData;
33
50
  getFormulaData(): IFormulaData;
34
51
  getArrayFormulaCellData(): IRuntimeUnitDataType;
35
- getOtherFormulaData(): IOtherFormulaData;
36
52
  getSheetNameMap(): IUnitSheetNameMap;
37
53
  isForceCalculate(): boolean;
38
54
  getDirtyRanges(): IUnitRange[];
55
+ getDirtyNameMap(): IDirtyUnitSheetNameMap;
56
+ getDirtyUnitFeatureMap(): IDirtyUnitFeatureMap;
39
57
  load(config: IFormulaDatasetConfig): void;
40
58
  loadDirtyRangesAndExcludedCell(dirtyRanges: IUnitRange[], excludedCell?: IUnitExcludedCell): void;
41
59
  registerUnitData(unitData: IUnitData): void;
42
60
  registerFormulaData(formulaData: IFormulaData): void;
43
61
  registerSheetNameMap(sheetNameMap: IUnitSheetNameMap): void;
44
62
  private _dataToRuntime;
45
- private _loadOtherFormulaData;
46
63
  private _loadSheetData;
47
64
  }
48
65
  export declare const IFormulaCurrentConfigService: import("@wendellhu/redi").IdentifierDecorator<FormulaCurrentConfigService>;
49
- //# sourceMappingURL=current-data.service.d.ts.map
@@ -1,13 +1,34 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { Nullable } from '@univerjs/core';
1
17
  import { Disposable } from '@univerjs/core';
2
18
  export interface IDefinedNamesService {
3
- registerDefinedName(name: string, reference: string): void;
4
- getDefinedNameMap(): Map<string, string>;
19
+ registerDefinedName(unitId: string, name: string, formulaOrRefString: string): void;
20
+ getDefinedNameMap(unitId: string): Nullable<Map<string, string>>;
21
+ getValue(unitId: string, name: string): Nullable<string>;
22
+ removeDefinedName(unitId: string, name: string): void;
23
+ hasDefinedName(unitId: string): boolean;
5
24
  }
6
25
  export declare class DefinedNamesService extends Disposable implements IDefinedNamesService {
7
26
  private _definedNameMap;
8
27
  dispose(): void;
9
- registerDefinedName(name: string, reference: string): void;
10
- getDefinedNameMap(): Map<string, string>;
28
+ registerDefinedName(unitId: string, name: string, formulaOrRefString: string): void;
29
+ removeDefinedName(unitId: string, name: string): void;
30
+ getDefinedNameMap(unitId: string): Map<string, string> | undefined;
31
+ getValue(unitId: string, name: string): string | undefined;
32
+ hasDefinedName(unitId: string): boolean;
11
33
  }
12
34
  export declare const IDefinedNamesService: import("@wendellhu/redi").IdentifierDecorator<DefinedNamesService>;
13
- //# sourceMappingURL=defined-names.service.d.ts.map
@@ -0,0 +1,52 @@
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 { IUnitRange, Nullable } from '@univerjs/core';
17
+ import { Disposable } from '@univerjs/core';
18
+ import type { IFeatureDirtyRangeType, IRuntimeUnitDataType } from '../basics/common';
19
+ import type { FormulaDependencyTree } from '../engine/dependency/dependency-tree';
20
+ export interface IFeatureCalculationManagerParam {
21
+ unitId: string;
22
+ subComponentId: string;
23
+ dependencyRanges: IUnitRange[];
24
+ getDirtyData: (currentDependencyTree: FormulaDependencyTree) => {
25
+ runtimeCellData: IRuntimeUnitDataType;
26
+ dirtyRanges: IFeatureDirtyRangeType;
27
+ };
28
+ }
29
+ export interface IFeatureCalculationManagerService {
30
+ dispose(): void;
31
+ remove(featureId: string): void;
32
+ get(featureId: string): Nullable<IFeatureCalculationManagerParam>;
33
+ has(featureId: string): boolean;
34
+ register(featureId: string, referenceExecutor: IFeatureCalculationManagerParam): void;
35
+ getReferenceExecutorMap(): Map<string, IFeatureCalculationManagerParam>;
36
+ }
37
+ /**
38
+ * Passively marked as dirty, register the reference and execution actions of the feature plugin.
39
+ * After execution, a dirty area and calculated data will be returned,
40
+ * causing the formula to be marked dirty again,
41
+ * thereby completing the calculation of the entire dependency tree.
42
+ */
43
+ export declare class FeatureCalculationManagerService extends Disposable implements IFeatureCalculationManagerService {
44
+ private _referenceExecutorMap;
45
+ dispose(): void;
46
+ remove(featureId: string): void;
47
+ get(featureId: string): IFeatureCalculationManagerParam | undefined;
48
+ has(featureId: string): boolean;
49
+ register(featureId: string, referenceExecutor: IFeatureCalculationManagerParam): void;
50
+ getReferenceExecutorMap(): Map<string, IFeatureCalculationManagerParam>;
51
+ }
52
+ export declare const IFeatureCalculationManagerService: import("@wendellhu/redi").IdentifierDecorator<FeatureCalculationManagerService>;
@@ -1,29 +1,56 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  import type { Nullable } from '@univerjs/core';
2
17
  import { Disposable } from '@univerjs/core';
3
- import type { FUNCTION_NAMES, IFunctionInfo } from '../basics/function';
18
+ import type { IFunctionInfo, IFunctionNames } from '../basics/function';
4
19
  import type { BaseFunction } from '../functions/base-function';
5
20
  export interface IFunctionService {
21
+ /**
22
+ * Use register to register a function, new CustomFunction(inject, name)
23
+ */
6
24
  registerExecutors(...functions: BaseFunction[]): void;
7
- getExecutors(): Map<string, BaseFunction>;
8
- getExecutor(functionToken: string): Nullable<BaseFunction>;
9
- hasExecutor(functionToken: string): boolean;
25
+ getExecutors(): Map<IFunctionNames, BaseFunction>;
26
+ /**
27
+ * Obtain the operator of the function to reuse the calculation logic.
28
+ * The argument type accepted by the function is: FunctionVariantType.
29
+ * For instance, the sum formula capability is needed for the statistics bar.
30
+ * You can obtain the calculation result by using
31
+ * const sum = formulaService.getExecutor(FUNCTION_NAMES_MATH.SUM);
32
+ * sum.calculate(new RangeReferenceObject(range, sheetId, unitId), ref2, re3).
33
+ * @param functionName Function name, which can be obtained through the FUNCTION_NAMES enumeration.
34
+ * @returns
35
+ */
36
+ getExecutor(functionToken: IFunctionNames): Nullable<BaseFunction>;
37
+ hasExecutor(functionToken: IFunctionNames): boolean;
10
38
  registerDescriptions(...functions: IFunctionInfo[]): void;
11
- getDescriptions(): Map<string, IFunctionInfo>;
12
- getDescription(functionToken: string): Nullable<IFunctionInfo>;
13
- hasDescription(functionToken: string): boolean;
39
+ getDescriptions(): Map<IFunctionNames, IFunctionInfo>;
40
+ getDescription(functionToken: IFunctionNames): Nullable<IFunctionInfo>;
41
+ hasDescription(functionToken: IFunctionNames): boolean;
14
42
  }
15
43
  export declare class FunctionService extends Disposable implements IFunctionService {
16
44
  private _functionExecutors;
17
45
  private _functionDescriptions;
18
46
  dispose(): void;
19
47
  registerExecutors(...functions: BaseFunction[]): void;
20
- getExecutors(): Map<string, BaseFunction>;
21
- getExecutor(functionToken: string | FUNCTION_NAMES): BaseFunction | undefined;
22
- hasExecutor(functionToken: string | FUNCTION_NAMES): boolean;
48
+ getExecutors(): Map<IFunctionNames, BaseFunction>;
49
+ getExecutor(functionToken: IFunctionNames): BaseFunction | undefined;
50
+ hasExecutor(functionToken: IFunctionNames): boolean;
23
51
  registerDescriptions(...descriptions: IFunctionInfo[]): void;
24
- getDescriptions(): Map<string, IFunctionInfo>;
25
- getDescription(functionToken: string): IFunctionInfo | undefined;
26
- hasDescription(functionToken: string): boolean;
52
+ getDescriptions(): Map<IFunctionNames, IFunctionInfo>;
53
+ getDescription(functionToken: IFunctionNames): IFunctionInfo | undefined;
54
+ hasDescription(functionToken: IFunctionNames): boolean;
27
55
  }
28
56
  export declare const IFunctionService: import("@wendellhu/redi").IdentifierDecorator<FunctionService>;
29
- //# sourceMappingURL=function.service.d.ts.map
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { Nullable } from '@univerjs/core';
17
+ import { Disposable } from '@univerjs/core';
18
+ import type { IFormulaDataItem, IOtherFormulaData } from '../basics/common';
19
+ export interface IOtherFormulaManagerSearchParam {
20
+ unitId: string;
21
+ subComponentId: string;
22
+ formulaId: string;
23
+ }
24
+ export interface IOtherFormulaManagerInsertParam extends IOtherFormulaManagerSearchParam {
25
+ item: IFormulaDataItem;
26
+ }
27
+ export interface IOtherFormulaManagerService {
28
+ dispose(): void;
29
+ remove(searchParam: IOtherFormulaManagerSearchParam): void;
30
+ get(searchParam: IOtherFormulaManagerSearchParam): Nullable<IFormulaDataItem>;
31
+ has(searchParam: IOtherFormulaManagerSearchParam): boolean;
32
+ register(insertParam: IOtherFormulaManagerInsertParam): void;
33
+ getOtherFormulaData(): IOtherFormulaData;
34
+ }
35
+ /**
36
+ * Passively marked as dirty, register the reference and execution actions of the feature plugin.
37
+ * After execution, a dirty area and calculated data will be returned,
38
+ * causing the formula to be marked dirty again,
39
+ * thereby completing the calculation of the entire dependency tree.
40
+ */
41
+ export declare class OtherFormulaManagerService extends Disposable implements IOtherFormulaManagerService {
42
+ private _otherFormulaData;
43
+ dispose(): void;
44
+ remove(searchParam: IOtherFormulaManagerSearchParam): void;
45
+ get(searchParam: IOtherFormulaManagerSearchParam): IFormulaDataItem;
46
+ has(searchParam: IOtherFormulaManagerSearchParam): boolean;
47
+ register(insertParam: IOtherFormulaManagerInsertParam): void;
48
+ getOtherFormulaData(): IOtherFormulaData;
49
+ }
50
+ export declare const IOtherFormulaManagerService: import("@wendellhu/redi").IdentifierDecorator<OtherFormulaManagerService>;
@@ -1,8 +1,23 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  import type { Nullable } from '@univerjs/core';
2
17
  import { Disposable } from '@univerjs/core';
3
- import type { BaseAstNode } from '../ast-node/base-ast-node';
4
- import type { IArrayFormulaRangeType, IRuntimeOtherUnitDataType, IRuntimeUnitDataType } from '../basics/common';
5
- import type { FunctionVariantType } from '../reference-object/base-reference-object';
18
+ import type { IArrayFormulaRangeType, IFeatureDirtyRangeType, IRuntimeOtherUnitDataType, IRuntimeUnitDataType } from '../basics/common';
19
+ import type { BaseAstNode } from '../engine/ast-node/base-ast-node';
20
+ import type { FunctionVariantType } from '../engine/reference-object/base-reference-object';
6
21
  import { IFormulaCurrentConfigService } from './current-data.service';
7
22
  /**
8
23
  * IDLE: Idle phase of the formula engine.
@@ -36,6 +51,12 @@ export interface IAllRuntimeData {
36
51
  functionsExecutedState: FormulaExecutedStateType;
37
52
  arrayFormulaCellData: IRuntimeUnitDataType;
38
53
  clearArrayFormulaCellData: IRuntimeUnitDataType;
54
+ runtimeFeatureRange: {
55
+ [featureId: string]: IFeatureDirtyRangeType;
56
+ };
57
+ runtimeFeatureCellData: {
58
+ [featureId: string]: IRuntimeUnitDataType;
59
+ };
39
60
  }
40
61
  export interface IExecutionInProgressParams {
41
62
  totalFormulasToCalculate: number;
@@ -81,6 +102,14 @@ export interface IFormulaRuntimeService {
81
102
  disableCycleDependency(): void;
82
103
  isCycleDependency(): boolean;
83
104
  getRuntimeArrayFormulaCellData(): IRuntimeUnitDataType;
105
+ getRuntimeFeatureRange(): {
106
+ [featureId: string]: IFeatureDirtyRangeType;
107
+ };
108
+ getRuntimeFeatureCellData(): {
109
+ [featureId: string]: IRuntimeUnitDataType;
110
+ };
111
+ setRuntimeFeatureCellData(featureId: string, featureData: IRuntimeUnitDataType): void;
112
+ setRuntimeFeatureRange(featureId: string, featureRange: IFeatureDirtyRangeType): void;
84
113
  }
85
114
  export declare class FormulaRuntimeService extends Disposable implements IFormulaRuntimeService {
86
115
  private readonly _currentConfigService;
@@ -95,6 +124,8 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
95
124
  private _unitArrayFormulaRange;
96
125
  private _runtimeArrayFormulaCellData;
97
126
  private _runtimeClearArrayFormulaCellData;
127
+ private _runtimeFeatureRange;
128
+ private _runtimeFeatureCellData;
98
129
  private _functionsExecutedState;
99
130
  private _functionDefinitionPrivacyVar;
100
131
  private _totalFormulasToCalculate;
@@ -139,6 +170,14 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
139
170
  getRuntimeOtherData(): IRuntimeOtherUnitDataType;
140
171
  getRuntimeArrayFormulaCellData(): IRuntimeUnitDataType;
141
172
  getRuntimeClearArrayFormulaCellData(): IRuntimeUnitDataType;
173
+ getRuntimeFeatureRange(): {
174
+ [featureId: string]: IFeatureDirtyRangeType;
175
+ };
176
+ setRuntimeFeatureRange(featureId: string, featureRange: IFeatureDirtyRangeType): void;
177
+ getRuntimeFeatureCellData(): {
178
+ [featureId: string]: IRuntimeUnitDataType;
179
+ };
180
+ setRuntimeFeatureCellData(featureId: string, featureData: IRuntimeUnitDataType): void;
142
181
  getAllRuntimeData(): IAllRuntimeData;
143
182
  getRuntimeState(): IExecutionInProgressParams;
144
183
  private _objectValueToCellValue;
@@ -146,4 +185,3 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
146
185
  private _isInDirtyRange;
147
186
  }
148
187
  export declare const IFormulaRuntimeService: import("@wendellhu/redi").IdentifierDecorator<FormulaRuntimeService>;
149
- //# sourceMappingURL=runtime.service.d.ts.map
@@ -1,19 +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
+ import type { Nullable } from '@univerjs/core';
1
17
  import { Disposable } from '@univerjs/core';
2
18
  import type { ISuperTable, TableOptionType } from '../basics/common';
19
+ export interface ISuperTableOptionParam {
20
+ tableOption: string;
21
+ tableOptionType: TableOptionType;
22
+ }
3
23
  export interface ISuperTableService {
4
- getTableMap(): Map<string, ISuperTable>;
24
+ getTableMap(unitId: string): Nullable<Map<string, ISuperTable>>;
5
25
  getTableOptionMap(): Map<string, TableOptionType>;
6
- registerTable(tableName: string, reference: ISuperTable): void;
26
+ registerTable(unitId: string, tableName: string, reference: ISuperTable): void;
7
27
  registerTableOptionMap(tableOption: string, tableOptionType: TableOptionType): void;
28
+ remove(unitId: string, tableName: string): void;
8
29
  }
9
30
  export declare class SuperTableService extends Disposable implements ISuperTableService {
10
31
  private _tableMap;
11
32
  private _tableOptionMap;
12
33
  dispose(): void;
13
- getTableMap(): Map<string, ISuperTable>;
34
+ remove(unitId: string, tableName: string): void;
35
+ getTableMap(unitId: string): Map<string, ISuperTable> | undefined;
14
36
  getTableOptionMap(): Map<string, TableOptionType>;
15
- registerTable(tableName: string, reference: ISuperTable): void;
37
+ registerTable(unitId: string, tableName: string, reference: ISuperTable): void;
16
38
  registerTableOptionMap(tableOption: string, tableOptionType: TableOptionType): void;
17
39
  }
18
40
  export declare const ISuperTableService: import("@wendellhu/redi").IdentifierDecorator<ISuperTableService>;
19
- //# sourceMappingURL=super-table.service.d.ts.map