@univerjs/sheets-formula 0.24.0 → 0.25.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 (281) hide show
  1. package/lib/cjs/facade.js +4 -55
  2. package/lib/cjs/index.js +4040 -3694
  3. package/lib/cjs/locale/ar-SA.js +10538 -0
  4. package/lib/cjs/locale/ca-ES.js +10307 -6
  5. package/lib/cjs/locale/de-DE.js +10538 -0
  6. package/lib/cjs/locale/en-US.js +10532 -6
  7. package/lib/cjs/locale/es-ES.js +10307 -6
  8. package/lib/cjs/locale/fa-IR.js +10817 -6
  9. package/lib/cjs/locale/fr-FR.js +10783 -6
  10. package/lib/cjs/locale/id-ID.js +10538 -0
  11. package/lib/cjs/locale/it-IT.js +10538 -0
  12. package/lib/cjs/locale/ja-JP.js +10306 -6
  13. package/lib/cjs/locale/ko-KR.js +10306 -6
  14. package/lib/cjs/locale/pl-PL.js +10538 -0
  15. package/lib/cjs/locale/pt-BR.js +10538 -0
  16. package/lib/cjs/locale/ru-RU.js +10340 -6
  17. package/lib/cjs/locale/sk-SK.js +10306 -6
  18. package/lib/cjs/locale/vi-VN.js +10307 -6
  19. package/lib/cjs/locale/zh-CN.js +10307 -6
  20. package/lib/cjs/locale/zh-HK.js +10538 -0
  21. package/lib/cjs/locale/zh-TW.js +10307 -6
  22. package/lib/es/facade.js +6 -57
  23. package/lib/es/index.js +4036 -3697
  24. package/lib/es/locale/ar-SA.js +10537 -0
  25. package/lib/es/locale/ca-ES.js +10307 -6
  26. package/lib/es/locale/de-DE.js +10537 -0
  27. package/lib/es/locale/en-US.js +10532 -6
  28. package/lib/es/locale/es-ES.js +10307 -6
  29. package/lib/es/locale/fa-IR.js +10817 -6
  30. package/lib/es/locale/fr-FR.js +10783 -6
  31. package/lib/es/locale/id-ID.js +10537 -0
  32. package/lib/es/locale/it-IT.js +10537 -0
  33. package/lib/es/locale/ja-JP.js +10306 -6
  34. package/lib/es/locale/ko-KR.js +10306 -6
  35. package/lib/es/locale/pl-PL.js +10537 -0
  36. package/lib/es/locale/pt-BR.js +10537 -0
  37. package/lib/es/locale/ru-RU.js +10340 -6
  38. package/lib/es/locale/sk-SK.js +10306 -6
  39. package/lib/es/locale/vi-VN.js +10307 -6
  40. package/lib/es/locale/zh-CN.js +10307 -6
  41. package/lib/es/locale/zh-HK.js +10537 -0
  42. package/lib/es/locale/zh-TW.js +10307 -6
  43. package/lib/facade.js +6 -57
  44. package/lib/index.js +4036 -3697
  45. package/lib/locale/ar-SA.js +10537 -0
  46. package/lib/locale/ca-ES.js +10307 -6
  47. package/lib/locale/de-DE.js +10537 -0
  48. package/lib/locale/en-US.js +10532 -6
  49. package/lib/locale/es-ES.js +10307 -6
  50. package/lib/locale/fa-IR.js +10817 -6
  51. package/lib/locale/fr-FR.js +10783 -6
  52. package/lib/locale/id-ID.js +10537 -0
  53. package/lib/locale/it-IT.js +10537 -0
  54. package/lib/locale/ja-JP.js +10306 -6
  55. package/lib/locale/ko-KR.js +10306 -6
  56. package/lib/locale/pl-PL.js +10537 -0
  57. package/lib/locale/pt-BR.js +10537 -0
  58. package/lib/locale/ru-RU.js +10340 -6
  59. package/lib/locale/sk-SK.js +10306 -6
  60. package/lib/locale/vi-VN.js +10307 -6
  61. package/lib/locale/zh-CN.js +10307 -6
  62. package/lib/locale/zh-HK.js +10537 -0
  63. package/lib/locale/zh-TW.js +10307 -6
  64. package/lib/types/controllers/active-dirty.controller.d.ts +1 -0
  65. package/lib/types/controllers/formula-calculation-session.controller.d.ts +24 -0
  66. package/lib/types/controllers/trigger-calculation.controller.d.ts +1 -1
  67. package/lib/types/controllers/utils/ref-range-formula.d.ts +7 -1
  68. package/lib/types/facade/f-formula.d.ts +20 -19
  69. package/lib/types/facade/f-range.d.ts +3 -3
  70. package/lib/types/index.d.ts +3 -0
  71. package/lib/types/locale/ar-SA.d.ts +18 -0
  72. package/lib/types/locale/de-DE.d.ts +18 -0
  73. package/lib/types/locale/en-US.d.ts +10450 -7
  74. package/lib/types/locale/function-list/array/ca-ES.d.ts +18 -0
  75. package/lib/types/locale/function-list/array/en-US.d.ts +58 -0
  76. package/lib/types/locale/function-list/array/es-ES.d.ts +18 -0
  77. package/lib/types/locale/function-list/array/fa-IR.d.ts +18 -0
  78. package/lib/types/locale/function-list/array/fr-FR.d.ts +18 -0
  79. package/lib/types/locale/function-list/array/ja-JP.d.ts +18 -0
  80. package/lib/types/locale/function-list/array/ko-KR.d.ts +18 -0
  81. package/lib/types/locale/function-list/array/ru-RU.d.ts +18 -0
  82. package/lib/types/locale/function-list/array/sk-SK.d.ts +18 -0
  83. package/lib/types/locale/function-list/array/vi-VN.d.ts +18 -0
  84. package/lib/types/locale/function-list/array/zh-CN.d.ts +18 -0
  85. package/lib/types/locale/function-list/array/zh-TW.d.ts +18 -0
  86. package/lib/types/locale/function-list/compatibility/ca-ES.d.ts +18 -0
  87. package/lib/types/locale/function-list/compatibility/en-US.d.ts +838 -0
  88. package/lib/types/locale/function-list/compatibility/es-ES.d.ts +18 -0
  89. package/lib/types/locale/function-list/compatibility/fa-IR.d.ts +18 -0
  90. package/lib/types/locale/function-list/compatibility/fr-FR.d.ts +18 -0
  91. package/lib/types/locale/function-list/compatibility/ja-JP.d.ts +18 -0
  92. package/lib/types/locale/function-list/compatibility/ko-KR.d.ts +18 -0
  93. package/lib/types/locale/function-list/compatibility/ru-RU.d.ts +18 -0
  94. package/lib/types/locale/function-list/compatibility/sk-SK.d.ts +18 -0
  95. package/lib/types/locale/function-list/compatibility/vi-VN.d.ts +18 -0
  96. package/lib/types/locale/function-list/compatibility/zh-CN.d.ts +18 -0
  97. package/lib/types/locale/function-list/compatibility/zh-TW.d.ts +18 -0
  98. package/lib/types/locale/function-list/cube/ca-ES.d.ts +18 -0
  99. package/lib/types/locale/function-list/cube/en-US.d.ts +144 -0
  100. package/lib/types/locale/function-list/cube/es-ES.d.ts +18 -0
  101. package/lib/types/locale/function-list/cube/fa-IR.d.ts +18 -0
  102. package/lib/types/locale/function-list/cube/fr-FR.d.ts +18 -0
  103. package/lib/types/locale/function-list/cube/ja-JP.d.ts +18 -0
  104. package/lib/types/locale/function-list/cube/ko-KR.d.ts +18 -0
  105. package/lib/types/locale/function-list/cube/ru-RU.d.ts +18 -0
  106. package/lib/types/locale/function-list/cube/sk-SK.d.ts +18 -0
  107. package/lib/types/locale/function-list/cube/vi-VN.d.ts +18 -0
  108. package/lib/types/locale/function-list/cube/zh-CN.d.ts +18 -0
  109. package/lib/types/locale/function-list/cube/zh-TW.d.ts +18 -0
  110. package/lib/types/locale/function-list/database/ca-ES.d.ts +18 -0
  111. package/lib/types/locale/function-list/database/en-US.d.ts +282 -0
  112. package/lib/types/locale/function-list/database/es-ES.d.ts +18 -0
  113. package/lib/types/locale/function-list/database/fa-IR.d.ts +18 -0
  114. package/lib/types/locale/function-list/database/fr-FR.d.ts +18 -0
  115. package/lib/types/locale/function-list/database/ja-JP.d.ts +18 -0
  116. package/lib/types/locale/function-list/database/ko-KR.d.ts +18 -0
  117. package/lib/types/locale/function-list/database/ru-RU.d.ts +18 -0
  118. package/lib/types/locale/function-list/database/sk-SK.d.ts +18 -0
  119. package/lib/types/locale/function-list/database/vi-VN.d.ts +18 -0
  120. package/lib/types/locale/function-list/database/zh-CN.d.ts +18 -0
  121. package/lib/types/locale/function-list/database/zh-TW.d.ts +18 -0
  122. package/lib/types/locale/function-list/date/ca-ES.d.ts +18 -0
  123. package/lib/types/locale/function-list/date/en-US.d.ts +490 -0
  124. package/lib/types/locale/function-list/date/es-ES.d.ts +18 -0
  125. package/lib/types/locale/function-list/date/fa-IR.d.ts +18 -0
  126. package/lib/types/locale/function-list/date/fr-FR.d.ts +18 -0
  127. package/lib/types/locale/function-list/date/ja-JP.d.ts +18 -0
  128. package/lib/types/locale/function-list/date/ko-KR.d.ts +18 -0
  129. package/lib/types/locale/function-list/date/ru-RU.d.ts +18 -0
  130. package/lib/types/locale/function-list/date/sk-SK.d.ts +18 -0
  131. package/lib/types/locale/function-list/date/vi-VN.d.ts +18 -0
  132. package/lib/types/locale/function-list/date/zh-CN.d.ts +18 -0
  133. package/lib/types/locale/function-list/date/zh-TW.d.ts +18 -0
  134. package/lib/types/locale/function-list/engineering/ca-ES.d.ts +18 -0
  135. package/lib/types/locale/function-list/engineering/en-US.d.ts +940 -0
  136. package/lib/types/locale/function-list/engineering/es-ES.d.ts +18 -0
  137. package/lib/types/locale/function-list/engineering/fa-IR.d.ts +18 -0
  138. package/lib/types/locale/function-list/engineering/fr-FR.d.ts +18 -0
  139. package/lib/types/locale/function-list/engineering/ja-JP.d.ts +18 -0
  140. package/lib/types/locale/function-list/engineering/ko-KR.d.ts +18 -0
  141. package/lib/types/locale/function-list/engineering/ru-RU.d.ts +18 -0
  142. package/lib/types/locale/function-list/engineering/sk-SK.d.ts +18 -0
  143. package/lib/types/locale/function-list/engineering/vi-VN.d.ts +18 -0
  144. package/lib/types/locale/function-list/engineering/zh-CN.d.ts +18 -0
  145. package/lib/types/locale/function-list/engineering/zh-TW.d.ts +18 -0
  146. package/lib/types/locale/function-list/financial/ca-ES.d.ts +18 -0
  147. package/lib/types/locale/function-list/financial/en-US.d.ts +1608 -0
  148. package/lib/types/locale/function-list/financial/es-ES.d.ts +18 -0
  149. package/lib/types/locale/function-list/financial/fa-IR.d.ts +18 -0
  150. package/lib/types/locale/function-list/financial/fr-FR.d.ts +18 -0
  151. package/lib/types/locale/function-list/financial/ja-JP.d.ts +18 -0
  152. package/lib/types/locale/function-list/financial/ko-KR.d.ts +18 -0
  153. package/lib/types/locale/function-list/financial/ru-RU.d.ts +18 -0
  154. package/lib/types/locale/function-list/financial/sk-SK.d.ts +18 -0
  155. package/lib/types/locale/function-list/financial/vi-VN.d.ts +18 -0
  156. package/lib/types/locale/function-list/financial/zh-CN.d.ts +18 -0
  157. package/lib/types/locale/function-list/financial/zh-TW.d.ts +18 -0
  158. package/lib/types/locale/function-list/information/ca-ES.d.ts +18 -0
  159. package/lib/types/locale/function-list/information/en-US.d.ts +386 -0
  160. package/lib/types/locale/function-list/information/es-ES.d.ts +18 -0
  161. package/lib/types/locale/function-list/information/fa-IR.d.ts +18 -0
  162. package/lib/types/locale/function-list/information/fr-FR.d.ts +18 -0
  163. package/lib/types/locale/function-list/information/ja-JP.d.ts +18 -0
  164. package/lib/types/locale/function-list/information/ko-KR.d.ts +18 -0
  165. package/lib/types/locale/function-list/information/ru-RU.d.ts +18 -0
  166. package/lib/types/locale/function-list/information/sk-SK.d.ts +18 -0
  167. package/lib/types/locale/function-list/information/vi-VN.d.ts +18 -0
  168. package/lib/types/locale/function-list/information/zh-CN.d.ts +18 -0
  169. package/lib/types/locale/function-list/information/zh-TW.d.ts +18 -0
  170. package/lib/types/locale/function-list/logical/ca-ES.d.ts +18 -0
  171. package/lib/types/locale/function-list/logical/en-US.d.ts +390 -0
  172. package/lib/types/locale/function-list/logical/es-ES.d.ts +18 -0
  173. package/lib/types/locale/function-list/logical/fa-IR.d.ts +18 -0
  174. package/lib/types/locale/function-list/logical/fr-FR.d.ts +18 -0
  175. package/lib/types/locale/function-list/logical/ja-JP.d.ts +18 -0
  176. package/lib/types/locale/function-list/logical/ko-KR.d.ts +18 -0
  177. package/lib/types/locale/function-list/logical/ru-RU.d.ts +18 -0
  178. package/lib/types/locale/function-list/logical/sk-SK.d.ts +18 -0
  179. package/lib/types/locale/function-list/logical/vi-VN.d.ts +18 -0
  180. package/lib/types/locale/function-list/logical/zh-CN.d.ts +18 -0
  181. package/lib/types/locale/function-list/logical/zh-TW.d.ts +18 -0
  182. package/lib/types/locale/function-list/lookup/ca-ES.d.ts +18 -0
  183. package/lib/types/locale/function-list/lookup/en-US.d.ts +820 -0
  184. package/lib/types/locale/function-list/lookup/es-ES.d.ts +18 -0
  185. package/lib/types/locale/function-list/lookup/fa-IR.d.ts +18 -0
  186. package/lib/types/locale/function-list/lookup/fr-FR.d.ts +18 -0
  187. package/lib/types/locale/function-list/lookup/ja-JP.d.ts +18 -0
  188. package/lib/types/locale/function-list/lookup/ko-KR.d.ts +18 -0
  189. package/lib/types/locale/function-list/lookup/ru-RU.d.ts +18 -0
  190. package/lib/types/locale/function-list/lookup/sk-SK.d.ts +18 -0
  191. package/lib/types/locale/function-list/lookup/vi-VN.d.ts +18 -0
  192. package/lib/types/locale/function-list/lookup/zh-CN.d.ts +18 -0
  193. package/lib/types/locale/function-list/lookup/zh-TW.d.ts +18 -0
  194. package/lib/types/locale/function-list/math/ca-ES.d.ts +18 -0
  195. package/lib/types/locale/function-list/math/en-US.d.ts +1410 -0
  196. package/lib/types/locale/function-list/math/es-ES.d.ts +18 -0
  197. package/lib/types/locale/function-list/math/fa-IR.d.ts +18 -0
  198. package/lib/types/locale/function-list/math/fr-FR.d.ts +18 -0
  199. package/lib/types/locale/function-list/math/ja-JP.d.ts +18 -0
  200. package/lib/types/locale/function-list/math/ko-KR.d.ts +18 -0
  201. package/lib/types/locale/function-list/math/ru-RU.d.ts +18 -0
  202. package/lib/types/locale/function-list/math/sk-SK.d.ts +18 -0
  203. package/lib/types/locale/function-list/math/vi-VN.d.ts +18 -0
  204. package/lib/types/locale/function-list/math/zh-CN.d.ts +18 -0
  205. package/lib/types/locale/function-list/math/zh-TW.d.ts +18 -0
  206. package/lib/types/locale/function-list/statistical/ca-ES.d.ts +18 -0
  207. package/lib/types/locale/function-list/statistical/en-US.d.ts +2308 -0
  208. package/lib/types/locale/function-list/statistical/es-ES.d.ts +18 -0
  209. package/lib/types/locale/function-list/statistical/fa-IR.d.ts +18 -0
  210. package/lib/types/locale/function-list/statistical/fr-FR.d.ts +18 -0
  211. package/lib/types/locale/function-list/statistical/ja-JP.d.ts +18 -0
  212. package/lib/types/locale/function-list/statistical/ko-KR.d.ts +18 -0
  213. package/lib/types/locale/function-list/statistical/ru-RU.d.ts +18 -0
  214. package/lib/types/locale/function-list/statistical/sk-SK.d.ts +18 -0
  215. package/lib/types/locale/function-list/statistical/vi-VN.d.ts +18 -0
  216. package/lib/types/locale/function-list/statistical/zh-CN.d.ts +18 -0
  217. package/lib/types/locale/function-list/statistical/zh-TW.d.ts +18 -0
  218. package/lib/types/locale/function-list/text/ca-ES.d.ts +18 -0
  219. package/lib/types/locale/function-list/text/en-US.d.ts +988 -0
  220. package/lib/types/locale/function-list/text/es-ES.d.ts +18 -0
  221. package/lib/types/locale/function-list/text/fa-IR.d.ts +18 -0
  222. package/lib/types/locale/function-list/text/fr-FR.d.ts +18 -0
  223. package/lib/types/locale/function-list/text/ja-JP.d.ts +18 -0
  224. package/lib/types/locale/function-list/text/ko-KR.d.ts +18 -0
  225. package/lib/types/locale/function-list/text/ru-RU.d.ts +18 -0
  226. package/lib/types/locale/function-list/text/sk-SK.d.ts +18 -0
  227. package/lib/types/locale/function-list/text/vi-VN.d.ts +18 -0
  228. package/lib/types/locale/function-list/text/zh-CN.d.ts +18 -0
  229. package/lib/types/locale/function-list/text/zh-TW.d.ts +18 -0
  230. package/lib/types/locale/function-list/univer/ca-ES.d.ts +18 -0
  231. package/lib/types/locale/function-list/univer/en-US.d.ts +17 -0
  232. package/lib/types/locale/function-list/univer/es-ES.d.ts +18 -0
  233. package/lib/types/locale/function-list/univer/fa-IR.d.ts +18 -0
  234. package/lib/types/locale/function-list/univer/fr-FR.d.ts +18 -0
  235. package/lib/types/locale/function-list/univer/ja-JP.d.ts +18 -0
  236. package/lib/types/locale/function-list/univer/ko-KR.d.ts +18 -0
  237. package/lib/types/locale/function-list/univer/ru-RU.d.ts +17 -0
  238. package/lib/types/locale/function-list/univer/sk-SK.d.ts +18 -0
  239. package/lib/types/locale/function-list/univer/vi-VN.d.ts +18 -0
  240. package/lib/types/locale/function-list/univer/zh-CN.d.ts +18 -0
  241. package/lib/types/locale/function-list/univer/zh-TW.d.ts +18 -0
  242. package/lib/types/locale/function-list/web/ca-ES.d.ts +18 -0
  243. package/lib/types/locale/function-list/web/en-US.d.ts +68 -0
  244. package/lib/types/locale/function-list/web/es-ES.d.ts +18 -0
  245. package/lib/types/locale/function-list/web/fa-IR.d.ts +18 -0
  246. package/lib/types/locale/function-list/web/fr-FR.d.ts +18 -0
  247. package/lib/types/locale/function-list/web/ja-JP.d.ts +18 -0
  248. package/lib/types/locale/function-list/web/ko-KR.d.ts +18 -0
  249. package/lib/types/locale/function-list/web/ru-RU.d.ts +18 -0
  250. package/lib/types/locale/function-list/web/sk-SK.d.ts +18 -0
  251. package/lib/types/locale/function-list/web/vi-VN.d.ts +18 -0
  252. package/lib/types/locale/function-list/web/zh-CN.d.ts +18 -0
  253. package/lib/types/locale/function-list/web/zh-TW.d.ts +18 -0
  254. package/lib/types/locale/id-ID.d.ts +18 -0
  255. package/lib/types/locale/it-IT.d.ts +18 -0
  256. package/lib/types/locale/pl-PL.d.ts +18 -0
  257. package/lib/types/locale/pt-BR.d.ts +18 -0
  258. package/lib/types/locale/zh-HK.d.ts +18 -0
  259. package/lib/types/services/formula-calculation-session.service.d.ts +48 -0
  260. package/lib/umd/facade.js +1 -1
  261. package/lib/umd/index.js +1 -1
  262. package/lib/umd/locale/ar-SA.js +44 -0
  263. package/lib/umd/locale/ca-ES.js +39 -1
  264. package/lib/umd/locale/de-DE.js +44 -0
  265. package/lib/umd/locale/en-US.js +44 -1
  266. package/lib/umd/locale/es-ES.js +39 -1
  267. package/lib/umd/locale/fa-IR.js +44 -1
  268. package/lib/umd/locale/fr-FR.js +44 -1
  269. package/lib/umd/locale/id-ID.js +44 -0
  270. package/lib/umd/locale/it-IT.js +44 -0
  271. package/lib/umd/locale/ja-JP.js +43 -1
  272. package/lib/umd/locale/ko-KR.js +37 -1
  273. package/lib/umd/locale/pl-PL.js +44 -0
  274. package/lib/umd/locale/pt-BR.js +44 -0
  275. package/lib/umd/locale/ru-RU.js +31 -1
  276. package/lib/umd/locale/sk-SK.js +39 -1
  277. package/lib/umd/locale/vi-VN.js +43 -1
  278. package/lib/umd/locale/zh-CN.js +44 -1
  279. package/lib/umd/locale/zh-HK.js +44 -0
  280. package/lib/umd/locale/zh-TW.js +44 -1
  281. package/package.json +9 -9
@@ -0,0 +1,18 @@
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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,18 @@
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 enUS from './en-US';
17
+ declare const locale: typeof enUS;
18
+ export default locale;
@@ -0,0 +1,48 @@
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 { FormulaExecutedStateType, IExecutionInProgressParams, ISetFormulaCalculationResultMutation } from '@univerjs/engine-formula';
17
+ import { Disposable } from '@univerjs/core';
18
+ export interface IFormulaCalculationSessionState {
19
+ id: number;
20
+ initialized: boolean;
21
+ started: boolean;
22
+ progress: IExecutionInProgressParams | null;
23
+ stopped: boolean;
24
+ completed: boolean;
25
+ resultEmitted: boolean;
26
+ resultApplied: boolean;
27
+ }
28
+ export declare class FormulaCalculationSessionService extends Disposable {
29
+ private readonly _state$;
30
+ private readonly _resultApplied$;
31
+ private _currentResult;
32
+ private _hasEmittedCurrentResultApplied;
33
+ readonly state$: import("rxjs").Observable<IFormulaCalculationSessionState>;
34
+ readonly resultApplied$: import("rxjs").Observable<ISetFormulaCalculationResultMutation>;
35
+ get state(): IFormulaCalculationSessionState;
36
+ dispose(): void;
37
+ initialize(): void;
38
+ start(): void;
39
+ updateProgress(progress: IExecutionInProgressParams): void;
40
+ markStopped(): void;
41
+ markCompleted(state: FormulaExecutedStateType): void;
42
+ markResultEmitted(result: ISetFormulaCalculationResultMutation, hasResultToApply: boolean): void;
43
+ markResultApplied(): void;
44
+ waitForLatestApplied(timeout?: number, startWatchdog?: number): Promise<void>;
45
+ private _emit;
46
+ private _emitResultApplied;
47
+ private _isAppliedTerminalState;
48
+ }
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(require(`@univerjs/core`),require(`@univerjs/core/facade`),require(`@univerjs/engine-formula`),require(`@univerjs/sheets-formula`),require(`@univerjs/engine-formula/facade`),require(`@univerjs/sheets`),require(`@univerjs/sheets/facade`)):typeof define==`function`&&define.amd?define([`@univerjs/core`,`@univerjs/core/facade`,`@univerjs/engine-formula`,`@univerjs/sheets-formula`,`@univerjs/engine-formula/facade`,`@univerjs/sheets`,`@univerjs/sheets/facade`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverCore,e.UniverCoreFacade,e.UniverEngineFormula,e.UniverSheetsFormula,e.UniverEngineFormulaFacade,e.UniverSheets,e.UniverSheetsFacade))})(this,function(e,t,n,r,i,a,o){var s=class extends t.FUniver{_initialize(){this._debouncedFormulaCalculation=(0,e.debounce)(()=>{this._commandService.executeCommand(n.SetTriggerFormulaCalculationStartMutation.id,{commands:[],forceCalculation:!0},{onlyLocal:!0})},10)}registerFunction(e){let t=this._injector.get(r.IRegisterFunctionService);t||(this._injector.add([r.IRegisterFunctionService,{useClass:r.RegisterFunctionService}]),t=this._injector.get(r.IRegisterFunctionService));let n=t.registerFunctions(e);return this._debouncedFormulaCalculation(),n}};t.FUniver.extend(s);var c=class extends i.FFormula{_initialize(){this._debouncedFormulaCalculation=(0,e.debounce)(()=>{this._commandService.executeCommand(n.SetTriggerFormulaCalculationStartMutation.id,{commands:[],forceCalculation:!0},{onlyLocal:!0})},10)}setInitialFormulaComputing(t){let n=this._injector.get(e.LifecycleService).stage,i=this._injector.get(e.ILogService),a=this._injector.get(e.IConfigService);n>e.LifecycleStages.Starting&&i.warn(`[FFormula]`,`CalculationMode is called after the Starting lifecycle and will take effect the next time the Univer Sheet is constructed. If you want it to take effect when the Univer Sheet is initialized this time, consider calling it before the Ready lifecycle or using configuration.`);let o=a.getConfig(r.PLUGIN_CONFIG_KEY_BASE);if(!o){a.setConfig(r.PLUGIN_CONFIG_KEY_BASE,{initialFormulaComputing:t});return}o.initialFormulaComputing=t}registerFunction(e,t,n){var i;let a=this._injector.get(r.IRegisterFunctionService);a||(this._injector.add([r.IRegisterFunctionService,{useClass:r.RegisterFunctionService}]),a=this._injector.get(r.IRegisterFunctionService));let o={name:e,func:t,description:typeof n==`string`?n:(i=n==null?void 0:n.description)==null?``:i,locales:typeof n==`object`?n.locales:void 0},s=a.registerFunction(o);return this._debouncedFormulaCalculation(),s}registerAsyncFunction(e,t,n){var i;let a=this._injector.get(r.IRegisterFunctionService);a||(this._injector.add([r.IRegisterFunctionService,{useClass:r.RegisterFunctionService}]),a=this._injector.get(r.IRegisterFunctionService));let o={name:e,func:t,description:typeof n==`string`?n:(i=n==null?void 0:n.description)==null?``:i,locales:typeof n==`object`?n.locales:void 0},s=a.registerAsyncFunction(o);return this._debouncedFormulaCalculation(),s}calculationResultApplied(e){let t=!1,r=!1,i=null;return this._commandService.onCommandExecuted((o,s)=>{o.id!==n.SetFormulaCalculationResultMutation.id&&o.id!==a.SetRangeValuesMutation.id||(o.id===n.SetFormulaCalculationResultMutation.id&&(t=!0,i=o.params,r=r||!this._hasFormulaResultToApply(i)),o.id===a.SetRangeValuesMutation.id&&s!=null&&s.applyFormulaCalculationResult&&(r=!0),!(!t||!r)&&requestIdleCallback(()=>{e(i)}))})}_hasFormulaResultToApply(e){let{unitData:t}=e;return Object.values(t==null?{}:t).some(e=>e!=null&&Object.values(e).some(e=>e!=null))}onCalculationResultApplied(){return new Promise((e,t)=>{let r=!1,i=!1,a=setTimeout(()=>{l(),t(Error(`Calculation end timeout`))},6e4),o=setTimeout(()=>{r||(l(),e())},500),s=this.calculationProcessing(t=>{let{stage:i,totalArrayFormulasToCalculate:a,totalFormulasToCalculate:s}=t;if(i===n.FormulaExecuteStageType.START_CALCULATION&&a+s===0){l(),e();return}r||(r=!0,clearTimeout(o))}),c=this.calculationResultApplied(()=>{i||(i=!0,l(),e())});function l(){clearTimeout(a),clearTimeout(o),s.dispose(),c.dispose()}})}};i.FFormula.extend(c);var l=class extends t.FEnum{get CalculationMode(){return r.CalculationMode}};t.FEnum.extend(l);var u=class extends o.FWorkbook{getAllFormulaError(){let e=[],t=this._workbook,r=t.getUnitId(),i=t.getSheets(),a=this._injector.get(n.FormulaDataModel).getArrayFormulaCellData();return i.forEach(t=>{var i;let o=t.getName(),s=t.getSheetId(),c=t.getCellMatrix(),l=(a==null||(i=a[r])==null?void 0:i[s])||{};c.forValue((t,r,i)=>{var a;if(!i)return;let s=(0,n.extractFormulaError)(i,!!(!(l==null||(a=l[t])==null)&&a[r]));s&&e.push({sheetName:o,row:t,column:r,formula:i.f||``,errorType:s})})}),e}};o.FWorkbook.extend(u);var d=class extends o.FRange{getFormulaError(){var e;let t=[],r=this._workbook.getUnitId(),i=this._worksheet.getSheetId(),a=this._worksheet.getName(),o=this._workbook.getSheetBySheetId(i);if(!o)return t;let s=this._injector.get(n.FormulaDataModel).getArrayFormulaCellData(),c=(s==null||(e=s[r])==null?void 0:e[i])||{},l=o.getCellMatrix(),{startRow:u,endRow:d,startColumn:f,endColumn:p}=this._range;for(let e=u;e<=d;e++)for(let r=f;r<=p;r++){var m;let i=l.getValue(e,r);if(!i)continue;let o=(0,n.extractFormulaError)(i,!!(!(c==null||(m=c[e])==null)&&m[r]));o&&t.push({sheetName:a,row:e,column:r,formula:i.f||``,errorType:o})}return t}};o.FRange.extend(d)});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(require("@univerjs/core"),require("@univerjs/core/facade"),require("@univerjs/engine-formula"),require("@univerjs/sheets-formula"),require("@univerjs/engine-formula/facade"),require("@univerjs/sheets/facade")):typeof define==`function`&&define.amd?define([`@univerjs/core`,`@univerjs/core/facade`,`@univerjs/engine-formula`,`@univerjs/sheets-formula`,`@univerjs/engine-formula/facade`,`@univerjs/sheets/facade`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverCore,e.UniverCoreFacade,e.UniverEngineFormula,e.UniverSheetsFormula,e.UniverEngineFormulaFacade,e.UniverSheetsFacade))})(this,function(e,t,n,r,i,a){var o=class extends t.FUniver{_initialize(){this._debouncedFormulaCalculation=(0,e.debounce)(()=>{this._commandService.executeCommand(n.SetTriggerFormulaCalculationStartMutation.id,{commands:[],forceCalculation:!0},{onlyLocal:!0})},10)}registerFunction(e){let t=this._injector.get(r.IRegisterFunctionService);t||(this._injector.add([r.IRegisterFunctionService,{useClass:r.RegisterFunctionService}]),t=this._injector.get(r.IRegisterFunctionService));let n=t.registerFunctions(e);return this._debouncedFormulaCalculation(),n}};t.FUniver.extend(o);var s=class extends i.FFormula{_initialize(){this._debouncedFormulaCalculation=(0,e.debounce)(()=>{this._commandService.executeCommand(n.SetTriggerFormulaCalculationStartMutation.id,{commands:[],forceCalculation:!0},{onlyLocal:!0})},10)}setInitialFormulaComputing(t){let n=this._injector.get(e.LifecycleService).stage,i=this._injector.get(e.ILogService),a=this._injector.get(e.IConfigService);n>e.LifecycleStages.Starting&&i.warn(`[FFormula]`,`CalculationMode is called after the Starting lifecycle and will take effect the next time the Univer Sheet is constructed. If you want it to take effect when the Univer Sheet is initialized this time, consider calling it before the Ready lifecycle or using configuration.`);let o=a.getConfig(r.PLUGIN_CONFIG_KEY_BASE);if(!o){a.setConfig(r.PLUGIN_CONFIG_KEY_BASE,{initialFormulaComputing:t});return}o.initialFormulaComputing=t}registerFunction(e,t,n){var i;let a=this._injector.get(r.IRegisterFunctionService);a||(this._injector.add([r.IRegisterFunctionService,{useClass:r.RegisterFunctionService}]),a=this._injector.get(r.IRegisterFunctionService));let o={name:e,func:t,description:typeof n==`string`?n:(i=n==null?void 0:n.description)==null?``:i,locales:typeof n==`object`?n.locales:void 0},s=a.registerFunction(o);return this._debouncedFormulaCalculation(),s}registerAsyncFunction(e,t,n){var i;let a=this._injector.get(r.IRegisterFunctionService);a||(this._injector.add([r.IRegisterFunctionService,{useClass:r.RegisterFunctionService}]),a=this._injector.get(r.IRegisterFunctionService));let o={name:e,func:t,description:typeof n==`string`?n:(i=n==null?void 0:n.description)==null?``:i,locales:typeof n==`object`?n.locales:void 0},s=a.registerAsyncFunction(o);return this._debouncedFormulaCalculation(),s}calculationResultApplied(e){let t=this._injector.get(r.FormulaCalculationSessionService).resultApplied$.subscribe(t=>{requestIdleCallback(()=>{e(t)})});return{dispose:()=>t.unsubscribe()}}onCalculationResultApplied(e){return this._injector.get(r.FormulaCalculationSessionService).waitForLatestApplied(e)}};i.FFormula.extend(s);var c=class extends t.FEnum{get CalculationMode(){return r.CalculationMode}};t.FEnum.extend(c);var l=class extends a.FWorkbook{getAllFormulaError(){let e=[],t=this._workbook,r=t.getUnitId(),i=t.getSheets(),a=this._injector.get(n.FormulaDataModel).getArrayFormulaCellData();return i.forEach(t=>{var i;let o=t.getName(),s=t.getSheetId(),c=t.getCellMatrix(),l=(a==null||(i=a[r])==null?void 0:i[s])||{};c.forValue((t,r,i)=>{var a;if(!i)return;let s=(0,n.extractFormulaError)(i,!!(!(l==null||(a=l[t])==null)&&a[r]));s&&e.push({sheetName:o,row:t,column:r,formula:i.f||``,errorType:s})})}),e}};a.FWorkbook.extend(l);var u=class extends a.FRange{getFormulaError(){var e;let t=[],r=this._workbook.getUnitId(),i=this._worksheet.getSheetId(),a=this._worksheet.getName(),o=this._workbook.getSheetBySheetId(i);if(!o)return t;let s=this._injector.get(n.FormulaDataModel).getArrayFormulaCellData(),c=(s==null||(e=s[r])==null?void 0:e[i])||{},l=o.getCellMatrix(),{startRow:u,endRow:d,startColumn:f,endColumn:p}=this._range;for(let e=u;e<=d;e++)for(let r=f;r<=p;r++){var m;let i=l.getValue(e,r);if(!i)continue;let o=(0,n.extractFormulaError)(i,!!(!(c==null||(m=c[e])==null)&&m[r]));o&&t.push({sheetName:a,row:e,column:r,formula:i.f||``,errorType:o})}return t}};a.FRange.extend(u)});