@univerjs/engine-formula 1.3.1 → 1.5.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 (189) hide show
  1. package/README.md +23 -5
  2. package/lib/cjs/{en-US-BYMYuEpp.js → en-US-9VDUEyCa.js} +15 -30
  3. package/lib/cjs/facade.js +4 -8
  4. package/lib/cjs/index.js +435 -57921
  5. package/lib/cjs/locale/ar-SA.js +16 -32
  6. package/lib/cjs/locale/ca-ES.js +16 -32
  7. package/lib/cjs/locale/de-DE.js +16 -32
  8. package/lib/cjs/locale/en-US.js +2 -3
  9. package/lib/cjs/locale/es-ES.js +16 -32
  10. package/lib/cjs/locale/fa-IR.js +2 -3
  11. package/lib/cjs/locale/fr-FR.js +16 -32
  12. package/lib/cjs/locale/id-ID.js +16 -32
  13. package/lib/cjs/locale/it-IT.js +16 -32
  14. package/lib/cjs/locale/ja-JP.js +16 -32
  15. package/lib/cjs/locale/ko-KR.js +16 -32
  16. package/lib/cjs/locale/pl-PL.js +16 -32
  17. package/lib/cjs/locale/pt-BR.js +16 -32
  18. package/lib/cjs/locale/ru-RU.js +16 -32
  19. package/lib/cjs/locale/sk-SK.js +16 -32
  20. package/lib/cjs/locale/vi-VN.js +16 -32
  21. package/lib/cjs/locale/zh-CN.js +16 -32
  22. package/lib/cjs/locale/zh-HK.js +2 -3
  23. package/lib/cjs/locale/zh-TW.js +2 -3
  24. package/lib/cjs/plugin-BLJLwyCu.js +59607 -0
  25. package/lib/cjs/worker.js +9 -0
  26. package/lib/cjs/{zh-TW-B5pYt-NJ.js → zh-TW-DGiZe-tu.js} +15 -30
  27. package/lib/{en-US-l1Vb3W1H.js → en-US-CgN_37u8.js} +15 -30
  28. package/lib/es/{en-US-l1Vb3W1H.js → en-US-CgN_37u8.js} +15 -30
  29. package/lib/es/facade.js +4 -8
  30. package/lib/es/index.js +205 -57671
  31. package/lib/es/locale/ar-SA.js +16 -32
  32. package/lib/es/locale/ca-ES.js +16 -32
  33. package/lib/es/locale/de-DE.js +16 -32
  34. package/lib/es/locale/en-US.js +2 -3
  35. package/lib/es/locale/es-ES.js +16 -32
  36. package/lib/es/locale/fa-IR.js +2 -3
  37. package/lib/es/locale/fr-FR.js +16 -32
  38. package/lib/es/locale/id-ID.js +16 -32
  39. package/lib/es/locale/it-IT.js +16 -32
  40. package/lib/es/locale/ja-JP.js +16 -32
  41. package/lib/es/locale/ko-KR.js +16 -32
  42. package/lib/es/locale/pl-PL.js +16 -32
  43. package/lib/es/locale/pt-BR.js +16 -32
  44. package/lib/es/locale/ru-RU.js +16 -32
  45. package/lib/es/locale/sk-SK.js +16 -32
  46. package/lib/es/locale/vi-VN.js +16 -32
  47. package/lib/es/locale/zh-CN.js +16 -32
  48. package/lib/es/locale/zh-HK.js +2 -3
  49. package/lib/es/locale/zh-TW.js +2 -3
  50. package/lib/es/plugin-USnMdaGa.js +58260 -0
  51. package/lib/es/worker.js +3 -0
  52. package/lib/es/{zh-TW-BA0p9R2Z.js → zh-TW-CsrIhkUN.js} +15 -30
  53. package/lib/facade.js +4 -8
  54. package/lib/index.js +205 -57671
  55. package/lib/locale/ar-SA.js +16 -32
  56. package/lib/locale/ca-ES.js +16 -32
  57. package/lib/locale/de-DE.js +16 -32
  58. package/lib/locale/en-US.js +2 -3
  59. package/lib/locale/es-ES.js +16 -32
  60. package/lib/locale/fa-IR.js +2 -3
  61. package/lib/locale/fr-FR.js +16 -32
  62. package/lib/locale/id-ID.js +16 -32
  63. package/lib/locale/it-IT.js +16 -32
  64. package/lib/locale/ja-JP.js +16 -32
  65. package/lib/locale/ko-KR.js +16 -32
  66. package/lib/locale/pl-PL.js +16 -32
  67. package/lib/locale/pt-BR.js +16 -32
  68. package/lib/locale/ru-RU.js +16 -32
  69. package/lib/locale/sk-SK.js +16 -32
  70. package/lib/locale/vi-VN.js +16 -32
  71. package/lib/locale/zh-CN.js +16 -32
  72. package/lib/locale/zh-HK.js +2 -3
  73. package/lib/locale/zh-TW.js +2 -3
  74. package/lib/plugin-USnMdaGa.js +58260 -0
  75. package/lib/types/basics/cache-lru.d.ts +0 -1
  76. package/lib/types/basics/common.d.ts +5 -1
  77. package/lib/types/basics/complex.d.ts +10 -4
  78. package/lib/types/basics/date.d.ts +6 -1
  79. package/lib/types/basics/function.d.ts +2 -1
  80. package/lib/types/basics/inverted-index-cache.d.ts +2 -1
  81. package/lib/types/basics/match-token.d.ts +1 -1
  82. package/lib/types/commands/mutations/set-super-table.mutation.d.ts +3 -2
  83. package/lib/types/controllers/calculate.controller.d.ts +0 -2
  84. package/lib/types/engine/analysis/lexer-tree-builder.d.ts +2 -4
  85. package/lib/types/engine/analysis/lexer.d.ts +6 -2
  86. package/lib/types/engine/analysis/parser.d.ts +3 -1
  87. package/lib/types/engine/ast-node/function-node.d.ts +2 -1
  88. package/lib/types/engine/ast-node/reference-node.d.ts +1 -4
  89. package/lib/types/engine/ast-node/union-node.d.ts +1 -3
  90. package/lib/types/engine/dependency/formula-dependency.d.ts +24 -3
  91. package/lib/types/engine/dependency/reference-context.d.ts +33 -0
  92. package/lib/types/engine/reference-object/base-reference-object.d.ts +5 -3
  93. package/lib/types/engine/reference-object/column-reference-object.d.ts +1 -1
  94. package/lib/types/engine/reference-object/row-reference-object.d.ts +1 -1
  95. package/lib/types/engine/utils/check-variant-error.d.ts +4 -4
  96. package/lib/types/engine/utils/generate-ast-node.d.ts +0 -2
  97. package/lib/types/engine/utils/numfmt-kit.d.ts +1 -1
  98. package/lib/types/engine/utils/three-dimensional-reference.d.ts +21 -0
  99. package/lib/types/engine/value-object/array-value-object.d.ts +4 -0
  100. package/lib/types/engine/value-object/cube-value-object.d.ts +5 -2
  101. package/lib/types/engine/value-object/lambda-value-object.d.ts +2 -2
  102. package/lib/types/functions/array/function-map.d.ts +1 -1
  103. package/lib/types/functions/base-function.d.ts +5 -5
  104. package/lib/types/functions/compatibility/function-map.d.ts +2 -2
  105. package/lib/types/functions/database/function-map.d.ts +1 -1
  106. package/lib/types/functions/date/function-map.d.ts +1 -1
  107. package/lib/types/functions/engineering/function-map.d.ts +1 -1
  108. package/lib/types/functions/financial/function-map.d.ts +1 -1
  109. package/lib/types/functions/information/function-map.d.ts +1 -1
  110. package/lib/types/functions/information/isblank/index.d.ts +1 -1
  111. package/lib/types/functions/information/iserr/index.d.ts +1 -1
  112. package/lib/types/functions/information/iserror/index.d.ts +1 -1
  113. package/lib/types/functions/information/islogical/index.d.ts +1 -1
  114. package/lib/types/functions/information/isna/index.d.ts +1 -1
  115. package/lib/types/functions/information/isnontext/index.d.ts +1 -1
  116. package/lib/types/functions/information/isnumber/index.d.ts +1 -1
  117. package/lib/types/functions/information/istext/index.d.ts +1 -1
  118. package/lib/types/functions/logical/function-map.d.ts +1 -1
  119. package/lib/types/functions/logical/groupby/index.d.ts +1 -1
  120. package/lib/types/functions/logical/if/index.d.ts +1 -1
  121. package/lib/types/functions/logical/iferror/index.d.ts +1 -1
  122. package/lib/types/functions/logical/ifna/index.d.ts +1 -1
  123. package/lib/types/functions/logical/makearray/index.d.ts +1 -1
  124. package/lib/types/functions/lookup/choosecols/index.d.ts +1 -1
  125. package/lib/types/functions/lookup/chooserows/index.d.ts +1 -1
  126. package/lib/types/functions/lookup/column/index.d.ts +1 -1
  127. package/lib/types/functions/lookup/formulatext/index.d.ts +1 -1
  128. package/lib/types/functions/lookup/function-map.d.ts +1 -1
  129. package/lib/types/functions/lookup/getpivotdata/index.d.ts +7 -2
  130. package/lib/types/functions/lookup/hstack/index.d.ts +1 -1
  131. package/lib/types/functions/lookup/index/index.d.ts +1 -0
  132. package/lib/types/functions/lookup/indirect/index.d.ts +1 -1
  133. package/lib/types/functions/lookup/row/index.d.ts +1 -1
  134. package/lib/types/functions/lookup/sortby/index.d.ts +1 -1
  135. package/lib/types/functions/lookup/transpose/index.d.ts +1 -1
  136. package/lib/types/functions/lookup/vlookup/index.d.ts +1 -1
  137. package/lib/types/functions/lookup/vstack/index.d.ts +1 -1
  138. package/lib/types/functions/math/aggregate/index.d.ts +1 -1
  139. package/lib/types/functions/math/function-map.d.ts +1 -1
  140. package/lib/types/functions/math/randarray/index.d.ts +1 -1
  141. package/lib/types/functions/math/subtotal/index.d.ts +1 -1
  142. package/lib/types/functions/math/sumifs/index.d.ts +1 -1
  143. package/lib/types/functions/meta/cube/index.d.ts +4 -1
  144. package/lib/types/functions/meta/function-map.d.ts +1 -1
  145. package/lib/types/functions/statistical/function-map.d.ts +1 -1
  146. package/lib/types/functions/statistical/stdev-p/index.d.ts +1 -1
  147. package/lib/types/functions/statistical/stdev-s/index.d.ts +1 -1
  148. package/lib/types/functions/statistical/stdeva/index.d.ts +1 -1
  149. package/lib/types/functions/statistical/stdevpa/index.d.ts +1 -1
  150. package/lib/types/functions/statistical/var-p/index.d.ts +1 -1
  151. package/lib/types/functions/statistical/var-s/index.d.ts +1 -1
  152. package/lib/types/functions/statistical/vara/index.d.ts +1 -1
  153. package/lib/types/functions/statistical/varpa/index.d.ts +1 -1
  154. package/lib/types/functions/text/function-map.d.ts +1 -1
  155. package/lib/types/functions/text/textafter/index.d.ts +1 -1
  156. package/lib/types/functions/text/textbefore/index.d.ts +1 -1
  157. package/lib/types/functions/text/textsplit/index.d.ts +1 -1
  158. package/lib/types/functions/web/function-map.d.ts +1 -1
  159. package/lib/types/index.d.ts +4 -3
  160. package/lib/types/locale/en-US.d.ts +3005 -3005
  161. package/lib/types/models/formula-data-snapshot.d.ts +24 -0
  162. package/lib/types/models/formula-data.model.d.ts +9 -1
  163. package/lib/types/plugin.d.ts +1 -1
  164. package/lib/types/services/active-dirty-manager.service.d.ts +3 -2
  165. package/lib/types/services/calculate-formula.service.d.ts +14 -4
  166. package/lib/types/services/current-data.service.d.ts +20 -6
  167. package/lib/types/services/defined-names.service.d.ts +1 -1
  168. package/lib/types/services/dependency-manager.service.d.ts +12 -2
  169. package/lib/types/services/external-reference-data-loader.service.d.ts +1 -1
  170. package/lib/types/services/feature-calculation-manager.service.d.ts +1 -1
  171. package/lib/types/services/formula/description.service.d.ts +1 -1
  172. package/lib/types/services/formula/formula-calculation-session.service.d.ts +2 -1
  173. package/lib/types/services/formula/register-function.service.d.ts +1 -1
  174. package/lib/types/services/formula-cache.service.d.ts +47 -0
  175. package/lib/types/services/formula-calculation-trigger.service.d.ts +1 -1
  176. package/lib/types/services/formula-changeset-calculation.service.d.ts +1 -1
  177. package/lib/types/services/formula-result.service.d.ts +29 -0
  178. package/lib/types/services/function.service.d.ts +4 -1
  179. package/lib/types/services/hyperlink-engine-formula.service.d.ts +1 -1
  180. package/lib/types/services/other-formula-manager.service.d.ts +1 -1
  181. package/lib/types/services/runtime.service.d.ts +16 -4
  182. package/lib/types/services/sheet-row-filtered.service.d.ts +1 -1
  183. package/lib/types/services/super-table.service.d.ts +4 -4
  184. package/lib/types/services/unit-reference-resolver.service.d.ts +1 -1
  185. package/lib/types/worker.d.ts +16 -0
  186. package/lib/umd/index.js +4 -4
  187. package/lib/worker.js +3 -0
  188. package/lib/{zh-TW-BA0p9R2Z.js → zh-TW-CsrIhkUN.js} +15 -30
  189. package/package.json +13 -8
@@ -0,0 +1,3 @@
1
+ import { t as UniverFormulaEnginePlugin } from "./plugin-USnMdaGa.js";
2
+
3
+ export { UniverFormulaEnginePlugin };
@@ -1,4 +1,4 @@
1
- //#region src/locale/function-list/array/zh-TW.ts
1
+ // src/locale/function-list/array/zh-TW.ts
2
2
  const locale$14 = {
3
3
  ARRAY_CONSTRAIN: {
4
4
  description: "限制特定大小的陣列結果。",
@@ -42,8 +42,7 @@ const locale$14 = {
42
42
  }
43
43
  };
44
44
 
45
- //#endregion
46
- //#region src/locale/function-list/compatibility/zh-TW.ts
45
+ // src/locale/function-list/compatibility/zh-TW.ts
47
46
  const locale$13 = {
48
47
  BETADIST: {
49
48
  description: "傳回累加 beta 機率密度函數。 beta 分配常用來研究不同樣本之間的變異程度百分比,例如研究大眾每日花在看電視的部分時間。",
@@ -851,8 +850,7 @@ const locale$13 = {
851
850
  }
852
851
  };
853
852
 
854
- //#endregion
855
- //#region src/locale/function-list/cube/zh-TW.ts
853
+ // src/locale/function-list/cube/zh-TW.ts
856
854
  const locale$12 = {
857
855
  CUBEKPIMEMBER: {
858
856
  description: "傳回關鍵效能指標 (KPI) 屬性,並在儲存格中顯示 KPI 名稱。 KPI 是一個可量化的度量,例如用來監控組織績效的每月毛利或每季員工流動率。",
@@ -1012,8 +1010,7 @@ const locale$12 = {
1012
1010
  }
1013
1011
  };
1014
1012
 
1015
- //#endregion
1016
- //#region src/locale/function-list/database/zh-TW.ts
1013
+ // src/locale/function-list/database/zh-TW.ts
1017
1014
  const locale$11 = {
1018
1015
  DAVERAGE: {
1019
1016
  description: "計算出清單或資料庫的記錄欄位 (欄) 中,符合您所指定條件的平均數值。",
@@ -1281,8 +1278,7 @@ const locale$11 = {
1281
1278
  }
1282
1279
  };
1283
1280
 
1284
- //#endregion
1285
- //#region src/locale/function-list/date/zh-TW.ts
1281
+ // src/locale/function-list/date/zh-TW.ts
1286
1282
  const locale$10 = {
1287
1283
  DATE: {
1288
1284
  description: "採用三個單獨的值並將它們合併為一個日期。 ",
@@ -1738,8 +1734,7 @@ const locale$10 = {
1738
1734
  }
1739
1735
  };
1740
1736
 
1741
- //#endregion
1742
- //#region src/locale/function-list/engineering/zh-TW.ts
1737
+ // src/locale/function-list/engineering/zh-TW.ts
1743
1738
  const locale$9 = {
1744
1739
  BESSELI: {
1745
1740
  description: "傳回修正的貝賽耳函數 In(x)",
@@ -2609,8 +2604,7 @@ const locale$9 = {
2609
2604
  }
2610
2605
  };
2611
2606
 
2612
- //#endregion
2613
- //#region src/locale/function-list/financial/zh-TW.ts
2607
+ // src/locale/function-list/financial/zh-TW.ts
2614
2608
  const locale$8 = {
2615
2609
  ACCRINT: {
2616
2610
  description: "返回定期支付利息的債券的應計利息",
@@ -4224,8 +4218,7 @@ const locale$8 = {
4224
4218
  }
4225
4219
  };
4226
4220
 
4227
- //#endregion
4228
- //#region src/locale/function-list/information/zh-TW.ts
4221
+ // src/locale/function-list/information/zh-TW.ts
4229
4222
  const locale$7 = {
4230
4223
  CELL: {
4231
4224
  description: "傳回有關儲存格格式、位置或內容的資訊",
@@ -4547,8 +4540,7 @@ const locale$7 = {
4547
4540
  }
4548
4541
  };
4549
4542
 
4550
- //#endregion
4551
- //#region src/locale/function-list/logical/zh-TW.ts
4543
+ // src/locale/function-list/logical/zh-TW.ts
4552
4544
  const locale$6 = {
4553
4545
  AND: {
4554
4546
  description: "如果其所有參數均為 TRUE,則傳回 TRUE",
@@ -4922,8 +4914,7 @@ const locale$6 = {
4922
4914
  }
4923
4915
  };
4924
4916
 
4925
- //#endregion
4926
- //#region src/locale/function-list/lookup/zh-TW.ts
4917
+ // src/locale/function-list/lookup/zh-TW.ts
4927
4918
  const locale$5 = {
4928
4919
  ADDRESS: {
4929
4920
  description: "根據指定列號和欄號獲得工作表中的某個儲存格的位址。 例如,ADDRESS(2,3) 傳回 $C$2。 再例如,ADDRESS(77,300) 回傳 $KN$77。 可以使用其他函數(如 ROW 和 COLUMN 函數)為 ADDRESS 函數提供列號和欄號參數。 ",
@@ -5731,8 +5722,7 @@ const locale$5 = {
5731
5722
  }
5732
5723
  };
5733
5724
 
5734
- //#endregion
5735
- //#region src/locale/function-list/math/zh-TW.ts
5725
+ // src/locale/function-list/math/zh-TW.ts
5736
5726
  const locale$4 = {
5737
5727
  ABS: {
5738
5728
  description: "傳回數字的絕對值。一個數字的絕對值是該數字不帶其符號的形式。 ",
@@ -7034,8 +7024,7 @@ const locale$4 = {
7034
7024
  }
7035
7025
  };
7036
7026
 
7037
- //#endregion
7038
- //#region src/locale/function-list/statistical/zh-TW.ts
7027
+ // src/locale/function-list/statistical/zh-TW.ts
7039
7028
  const locale$3 = {
7040
7029
  AVEDEV: {
7041
7030
  description: "傳回資料點與它們的平均值的絕對偏差平均值。 ",
@@ -9372,8 +9361,7 @@ const locale$3 = {
9372
9361
  }
9373
9362
  };
9374
9363
 
9375
- //#endregion
9376
- //#region src/locale/function-list/text/zh-TW.ts
9364
+ // src/locale/function-list/text/zh-TW.ts
9377
9365
  const locale$2 = {
9378
9366
  ASC: {
9379
9367
  description: "將字串中的全角(雙位元組)英文字母或片假名改為半角(單字節)字元",
@@ -10333,12 +10321,10 @@ const locale$2 = {
10333
10321
  }
10334
10322
  };
10335
10323
 
10336
- //#endregion
10337
- //#region src/locale/function-list/univer/zh-TW.ts
10324
+ // src/locale/function-list/univer/zh-TW.ts
10338
10325
  const locale$1 = {};
10339
10326
 
10340
- //#endregion
10341
- //#region src/locale/function-list/web/zh-TW.ts
10327
+ // src/locale/function-list/web/zh-TW.ts
10342
10328
  const locale = {
10343
10329
  ENCODEURL: {
10344
10330
  description: "ENCODEURL 函式會回傳一個 URL 編碼的字串,將某些非字母數字字元替換為百分比符號 (%) 並以十六進位數字表示。",
@@ -10384,5 +10370,4 @@ const locale = {
10384
10370
  }
10385
10371
  };
10386
10372
 
10387
- //#endregion
10388
10373
  export { locale$4 as a, locale$7 as c, locale$10 as d, locale$11 as f, locale$14 as h, locale$3 as i, locale$8 as l, locale$13 as m, locale$1 as n, locale$5 as o, locale$12 as p, locale$2 as r, locale$6 as s, locale as t, locale$9 as u };
package/lib/facade.js CHANGED
@@ -2,15 +2,14 @@ import { FBase, FUniver } from "@univerjs/core/facade";
2
2
  import { ICommandService, IConfigService, Inject, Injector } from "@univerjs/core";
3
3
  import { ENGINE_FORMULA_RETURN_DEPENDENCY_TREE, FormulaCalculationSessionService, IDefinedNamesService, IFunctionService, ISuperTableService, LexerTreeBuilder, SetCellFormulaDependencyCalculationMutation, SetCellFormulaDependencyCalculationResultMutation, SetFormulaCalculationNotificationMutation, SetFormulaCalculationStartMutation, SetFormulaCalculationStopMutation, SetFormulaDependencyCalculationMutation, SetFormulaDependencyCalculationResultMutation, SetFormulaStringBatchCalculationMutation, SetFormulaStringBatchCalculationResultMutation, SetQueryFormulaDependencyAllMutation, SetQueryFormulaDependencyAllResultMutation, SetQueryFormulaDependencyMutation, SetQueryFormulaDependencyResultMutation, SetTriggerFormulaCalculationStartMutation } from "@univerjs/engine-formula";
4
4
 
5
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
5
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/decorateParam.js
6
6
  function __decorateParam(paramIndex, decorator) {
7
7
  return function(target, key) {
8
8
  decorator(target, key, paramIndex);
9
9
  };
10
10
  }
11
11
 
12
- //#endregion
13
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
12
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/decorate.js
14
13
  function __decorate(decorators, target, key, desc) {
15
14
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
15
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -18,8 +17,7 @@ function __decorate(decorators, target, key, desc) {
18
17
  return c > 3 && r && Object.defineProperty(target, key, r), r;
19
18
  }
20
19
 
21
- //#endregion
22
- //#region src/facade/f-formula.ts
20
+ // src/facade/f-formula.ts
23
21
  let FFormula = class FFormula extends FBase {
24
22
  constructor(_commandService, _injector, _lexerTreeBuilder, _configService, _functionService, _definedNamesService, _superTableService) {
25
23
  super();
@@ -663,8 +661,7 @@ FFormula = __decorate([
663
661
  __decorateParam(6, ISuperTableService)
664
662
  ], FFormula);
665
663
 
666
- //#endregion
667
- //#region src/facade/f-univer.ts
664
+ // src/facade/f-univer.ts
668
665
  /**
669
666
  * Copyright 2023-present DreamNum Co., Ltd.
670
667
  *
@@ -687,5 +684,4 @@ var FUniverEngineFormulaMixin = class extends FUniver {
687
684
  };
688
685
  FUniver.extend(FUniverEngineFormulaMixin);
689
686
 
690
- //#endregion
691
687
  export { FFormula };