@gridsheet/react-core 0.12.0-rc.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 (383) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +84 -0
  3. package/dist/components/Cell.d.ts +8 -0
  4. package/dist/components/Cell.d.ts.map +1 -0
  5. package/dist/components/Cell.js +195 -0
  6. package/dist/components/Cell.js.map +1 -0
  7. package/dist/components/ContextMenu.d.ts +3 -0
  8. package/dist/components/ContextMenu.d.ts.map +1 -0
  9. package/dist/components/ContextMenu.js +207 -0
  10. package/dist/components/ContextMenu.js.map +1 -0
  11. package/dist/components/Editor.d.ts +3 -0
  12. package/dist/components/Editor.d.ts.map +1 -0
  13. package/dist/components/Editor.js +304 -0
  14. package/dist/components/Editor.js.map +1 -0
  15. package/dist/components/Emitter.d.ts +9 -0
  16. package/dist/components/Emitter.d.ts.map +1 -0
  17. package/dist/components/Emitter.js +26 -0
  18. package/dist/components/Emitter.js.map +1 -0
  19. package/dist/components/GridSheet.d.ts +4 -0
  20. package/dist/components/GridSheet.d.ts.map +1 -0
  21. package/dist/components/GridSheet.js +110 -0
  22. package/dist/components/GridSheet.js.map +1 -0
  23. package/dist/components/HeaderLeftCell.d.ts +7 -0
  24. package/dist/components/HeaderLeftCell.d.ts.map +1 -0
  25. package/dist/components/HeaderLeftCell.js +67 -0
  26. package/dist/components/HeaderLeftCell.js.map +1 -0
  27. package/dist/components/HeaderTopCell.d.ts +7 -0
  28. package/dist/components/HeaderTopCell.d.ts.map +1 -0
  29. package/dist/components/HeaderTopCell.js +68 -0
  30. package/dist/components/HeaderTopCell.js.map +1 -0
  31. package/dist/components/Resizer.d.ts +3 -0
  32. package/dist/components/Resizer.d.ts.map +1 -0
  33. package/dist/components/Resizer.js +83 -0
  34. package/dist/components/Resizer.js.map +1 -0
  35. package/dist/components/SearchBox.d.ts +3 -0
  36. package/dist/components/SearchBox.d.ts.map +1 -0
  37. package/dist/components/SearchBox.js +52 -0
  38. package/dist/components/SearchBox.js.map +1 -0
  39. package/dist/components/StoreInitializer.d.ts +4 -0
  40. package/dist/components/StoreInitializer.d.ts.map +1 -0
  41. package/dist/components/StoreInitializer.js +68 -0
  42. package/dist/components/StoreInitializer.js.map +1 -0
  43. package/dist/components/Tabular.d.ts +9 -0
  44. package/dist/components/Tabular.d.ts.map +1 -0
  45. package/dist/components/Tabular.js +84 -0
  46. package/dist/components/Tabular.js.map +1 -0
  47. package/dist/constants.d.ts +18 -0
  48. package/dist/constants.d.ts.map +1 -0
  49. package/dist/constants.js +21 -0
  50. package/dist/constants.js.map +1 -0
  51. package/dist/formula/evaluator.d.ts +91 -0
  52. package/dist/formula/evaluator.d.ts.map +1 -0
  53. package/dist/formula/evaluator.js +541 -0
  54. package/dist/formula/evaluator.js.map +1 -0
  55. package/dist/formula/functions/__base.d.ts +23 -0
  56. package/dist/formula/functions/__base.d.ts.map +1 -0
  57. package/dist/formula/functions/__base.js +16 -0
  58. package/dist/formula/functions/__base.js.map +1 -0
  59. package/dist/formula/functions/__utils.d.ts +6 -0
  60. package/dist/formula/functions/__utils.d.ts.map +1 -0
  61. package/dist/formula/functions/__utils.js +102 -0
  62. package/dist/formula/functions/__utils.js.map +1 -0
  63. package/dist/formula/functions/abs.d.ts +12 -0
  64. package/dist/formula/functions/abs.d.ts.map +1 -0
  65. package/dist/formula/functions/abs.js +21 -0
  66. package/dist/formula/functions/abs.js.map +1 -0
  67. package/dist/formula/functions/abs.spec.d.ts +2 -0
  68. package/dist/formula/functions/abs.spec.d.ts.map +1 -0
  69. package/dist/formula/functions/abs.spec.js +29 -0
  70. package/dist/formula/functions/abs.spec.js.map +1 -0
  71. package/dist/formula/functions/acos.d.ts +12 -0
  72. package/dist/formula/functions/acos.d.ts.map +1 -0
  73. package/dist/formula/functions/acos.js +29 -0
  74. package/dist/formula/functions/acos.js.map +1 -0
  75. package/dist/formula/functions/add.d.ts +13 -0
  76. package/dist/formula/functions/add.d.ts.map +1 -0
  77. package/dist/formula/functions/add.js +50 -0
  78. package/dist/formula/functions/add.js.map +1 -0
  79. package/dist/formula/functions/and.d.ts +19 -0
  80. package/dist/formula/functions/and.d.ts.map +1 -0
  81. package/dist/formula/functions/and.js +28 -0
  82. package/dist/formula/functions/and.js.map +1 -0
  83. package/dist/formula/functions/asin.d.ts +12 -0
  84. package/dist/formula/functions/asin.d.ts.map +1 -0
  85. package/dist/formula/functions/asin.js +29 -0
  86. package/dist/formula/functions/asin.js.map +1 -0
  87. package/dist/formula/functions/atan.d.ts +12 -0
  88. package/dist/formula/functions/atan.d.ts.map +1 -0
  89. package/dist/formula/functions/atan.js +26 -0
  90. package/dist/formula/functions/atan.js.map +1 -0
  91. package/dist/formula/functions/atan2.d.ts +12 -0
  92. package/dist/formula/functions/atan2.d.ts.map +1 -0
  93. package/dist/formula/functions/atan2.js +32 -0
  94. package/dist/formula/functions/atan2.js.map +1 -0
  95. package/dist/formula/functions/average.d.ts +19 -0
  96. package/dist/formula/functions/average.d.ts.map +1 -0
  97. package/dist/formula/functions/average.js +41 -0
  98. package/dist/formula/functions/average.js.map +1 -0
  99. package/dist/formula/functions/col.d.ts +14 -0
  100. package/dist/formula/functions/col.d.ts.map +1 -0
  101. package/dist/formula/functions/col.js +30 -0
  102. package/dist/formula/functions/col.js.map +1 -0
  103. package/dist/formula/functions/concat.d.ts +12 -0
  104. package/dist/formula/functions/concat.d.ts.map +1 -0
  105. package/dist/formula/functions/concat.js +27 -0
  106. package/dist/formula/functions/concat.js.map +1 -0
  107. package/dist/formula/functions/concatenate.d.ts +19 -0
  108. package/dist/formula/functions/concatenate.d.ts.map +1 -0
  109. package/dist/formula/functions/concatenate.js +25 -0
  110. package/dist/formula/functions/concatenate.js.map +1 -0
  111. package/dist/formula/functions/cos.d.ts +12 -0
  112. package/dist/formula/functions/cos.d.ts.map +1 -0
  113. package/dist/formula/functions/cos.js +26 -0
  114. package/dist/formula/functions/cos.js.map +1 -0
  115. package/dist/formula/functions/count.d.ts +19 -0
  116. package/dist/formula/functions/count.d.ts.map +1 -0
  117. package/dist/formula/functions/count.js +35 -0
  118. package/dist/formula/functions/count.js.map +1 -0
  119. package/dist/formula/functions/counta.d.ts +19 -0
  120. package/dist/formula/functions/counta.d.ts.map +1 -0
  121. package/dist/formula/functions/counta.js +35 -0
  122. package/dist/formula/functions/counta.js.map +1 -0
  123. package/dist/formula/functions/countif.d.ts +13 -0
  124. package/dist/formula/functions/countif.d.ts.map +1 -0
  125. package/dist/formula/functions/countif.js +30 -0
  126. package/dist/formula/functions/countif.js.map +1 -0
  127. package/dist/formula/functions/divide.d.ts +12 -0
  128. package/dist/formula/functions/divide.d.ts.map +1 -0
  129. package/dist/formula/functions/divide.js +33 -0
  130. package/dist/formula/functions/divide.js.map +1 -0
  131. package/dist/formula/functions/eq.d.ts +12 -0
  132. package/dist/formula/functions/eq.d.ts.map +1 -0
  133. package/dist/formula/functions/eq.js +25 -0
  134. package/dist/formula/functions/eq.js.map +1 -0
  135. package/dist/formula/functions/exp.d.ts +12 -0
  136. package/dist/formula/functions/exp.d.ts.map +1 -0
  137. package/dist/formula/functions/exp.js +28 -0
  138. package/dist/formula/functions/exp.js.map +1 -0
  139. package/dist/formula/functions/gt.d.ts +12 -0
  140. package/dist/formula/functions/gt.d.ts.map +1 -0
  141. package/dist/formula/functions/gt.js +27 -0
  142. package/dist/formula/functions/gt.js.map +1 -0
  143. package/dist/formula/functions/gte.d.ts +12 -0
  144. package/dist/formula/functions/gte.d.ts.map +1 -0
  145. package/dist/formula/functions/gte.js +27 -0
  146. package/dist/formula/functions/gte.js.map +1 -0
  147. package/dist/formula/functions/hlookup.d.ts +18 -0
  148. package/dist/formula/functions/hlookup.d.ts.map +1 -0
  149. package/dist/formula/functions/hlookup.js +74 -0
  150. package/dist/formula/functions/hlookup.js.map +1 -0
  151. package/dist/formula/functions/if.d.ts +17 -0
  152. package/dist/formula/functions/if.d.ts.map +1 -0
  153. package/dist/formula/functions/if.js +36 -0
  154. package/dist/formula/functions/if.js.map +1 -0
  155. package/dist/formula/functions/iferror.d.ts +20 -0
  156. package/dist/formula/functions/iferror.d.ts.map +1 -0
  157. package/dist/formula/functions/iferror.js +41 -0
  158. package/dist/formula/functions/iferror.js.map +1 -0
  159. package/dist/formula/functions/iferror.spec.d.ts +2 -0
  160. package/dist/formula/functions/iferror.spec.d.ts.map +1 -0
  161. package/dist/formula/functions/iferror.spec.js +61 -0
  162. package/dist/formula/functions/iferror.spec.js.map +1 -0
  163. package/dist/formula/functions/len.d.ts +12 -0
  164. package/dist/formula/functions/len.d.ts.map +1 -0
  165. package/dist/formula/functions/len.js +26 -0
  166. package/dist/formula/functions/len.js.map +1 -0
  167. package/dist/formula/functions/lenb.d.ts +12 -0
  168. package/dist/formula/functions/lenb.d.ts.map +1 -0
  169. package/dist/formula/functions/lenb.js +26 -0
  170. package/dist/formula/functions/lenb.js.map +1 -0
  171. package/dist/formula/functions/ln.d.ts +12 -0
  172. package/dist/formula/functions/ln.d.ts.map +1 -0
  173. package/dist/formula/functions/ln.js +29 -0
  174. package/dist/formula/functions/ln.js.map +1 -0
  175. package/dist/formula/functions/log.d.ts +12 -0
  176. package/dist/formula/functions/log.d.ts.map +1 -0
  177. package/dist/formula/functions/log.js +35 -0
  178. package/dist/formula/functions/log.js.map +1 -0
  179. package/dist/formula/functions/log10.d.ts +12 -0
  180. package/dist/formula/functions/log10.d.ts.map +1 -0
  181. package/dist/formula/functions/log10.js +29 -0
  182. package/dist/formula/functions/log10.js.map +1 -0
  183. package/dist/formula/functions/lt.d.ts +12 -0
  184. package/dist/formula/functions/lt.d.ts.map +1 -0
  185. package/dist/formula/functions/lt.js +27 -0
  186. package/dist/formula/functions/lt.js.map +1 -0
  187. package/dist/formula/functions/lte.d.ts +12 -0
  188. package/dist/formula/functions/lte.d.ts.map +1 -0
  189. package/dist/formula/functions/lte.js +27 -0
  190. package/dist/formula/functions/lte.js.map +1 -0
  191. package/dist/formula/functions/max.d.ts +19 -0
  192. package/dist/formula/functions/max.d.ts.map +1 -0
  193. package/dist/formula/functions/max.js +44 -0
  194. package/dist/formula/functions/max.js.map +1 -0
  195. package/dist/formula/functions/min.d.ts +19 -0
  196. package/dist/formula/functions/min.d.ts.map +1 -0
  197. package/dist/formula/functions/min.js +44 -0
  198. package/dist/formula/functions/min.js.map +1 -0
  199. package/dist/formula/functions/minus.d.ts +13 -0
  200. package/dist/formula/functions/minus.d.ts.map +1 -0
  201. package/dist/formula/functions/minus.js +50 -0
  202. package/dist/formula/functions/minus.js.map +1 -0
  203. package/dist/formula/functions/mod.d.ts +12 -0
  204. package/dist/formula/functions/mod.d.ts.map +1 -0
  205. package/dist/formula/functions/mod.js +31 -0
  206. package/dist/formula/functions/mod.js.map +1 -0
  207. package/dist/formula/functions/mod.spec.d.ts +2 -0
  208. package/dist/formula/functions/mod.spec.d.ts.map +1 -0
  209. package/dist/formula/functions/mod.spec.js +52 -0
  210. package/dist/formula/functions/mod.spec.js.map +1 -0
  211. package/dist/formula/functions/multiply.d.ts +12 -0
  212. package/dist/formula/functions/multiply.d.ts.map +1 -0
  213. package/dist/formula/functions/multiply.js +27 -0
  214. package/dist/formula/functions/multiply.js.map +1 -0
  215. package/dist/formula/functions/ne.d.ts +12 -0
  216. package/dist/formula/functions/ne.d.ts.map +1 -0
  217. package/dist/formula/functions/ne.js +25 -0
  218. package/dist/formula/functions/ne.js.map +1 -0
  219. package/dist/formula/functions/not.d.ts +12 -0
  220. package/dist/formula/functions/not.d.ts.map +1 -0
  221. package/dist/formula/functions/not.js +30 -0
  222. package/dist/formula/functions/not.js.map +1 -0
  223. package/dist/formula/functions/now.d.ts +9 -0
  224. package/dist/formula/functions/now.d.ts.map +1 -0
  225. package/dist/formula/functions/now.js +21 -0
  226. package/dist/formula/functions/now.js.map +1 -0
  227. package/dist/formula/functions/or.d.ts +19 -0
  228. package/dist/formula/functions/or.d.ts.map +1 -0
  229. package/dist/formula/functions/or.js +28 -0
  230. package/dist/formula/functions/or.js.map +1 -0
  231. package/dist/formula/functions/pi.d.ts +9 -0
  232. package/dist/formula/functions/pi.d.ts.map +1 -0
  233. package/dist/formula/functions/pi.js +19 -0
  234. package/dist/formula/functions/pi.js.map +1 -0
  235. package/dist/formula/functions/power.d.ts +12 -0
  236. package/dist/formula/functions/power.d.ts.map +1 -0
  237. package/dist/formula/functions/power.js +24 -0
  238. package/dist/formula/functions/power.js.map +1 -0
  239. package/dist/formula/functions/product.d.ts +19 -0
  240. package/dist/formula/functions/product.d.ts.map +1 -0
  241. package/dist/formula/functions/product.js +37 -0
  242. package/dist/formula/functions/product.js.map +1 -0
  243. package/dist/formula/functions/radians.d.ts +12 -0
  244. package/dist/formula/functions/radians.d.ts.map +1 -0
  245. package/dist/formula/functions/radians.js +26 -0
  246. package/dist/formula/functions/radians.js.map +1 -0
  247. package/dist/formula/functions/rand.d.ts +9 -0
  248. package/dist/formula/functions/rand.d.ts.map +1 -0
  249. package/dist/formula/functions/rand.js +19 -0
  250. package/dist/formula/functions/rand.js.map +1 -0
  251. package/dist/formula/functions/round.d.ts +17 -0
  252. package/dist/formula/functions/round.d.ts.map +1 -0
  253. package/dist/formula/functions/round.js +34 -0
  254. package/dist/formula/functions/round.js.map +1 -0
  255. package/dist/formula/functions/rounddown.d.ts +17 -0
  256. package/dist/formula/functions/rounddown.d.ts.map +1 -0
  257. package/dist/formula/functions/rounddown.js +34 -0
  258. package/dist/formula/functions/rounddown.js.map +1 -0
  259. package/dist/formula/functions/roundup.d.ts +17 -0
  260. package/dist/formula/functions/roundup.d.ts.map +1 -0
  261. package/dist/formula/functions/roundup.js +34 -0
  262. package/dist/formula/functions/roundup.js.map +1 -0
  263. package/dist/formula/functions/row.d.ts +14 -0
  264. package/dist/formula/functions/row.d.ts.map +1 -0
  265. package/dist/formula/functions/row.js +30 -0
  266. package/dist/formula/functions/row.js.map +1 -0
  267. package/dist/formula/functions/sin.d.ts +12 -0
  268. package/dist/formula/functions/sin.d.ts.map +1 -0
  269. package/dist/formula/functions/sin.js +26 -0
  270. package/dist/formula/functions/sin.js.map +1 -0
  271. package/dist/formula/functions/sqrt.d.ts +12 -0
  272. package/dist/formula/functions/sqrt.d.ts.map +1 -0
  273. package/dist/formula/functions/sqrt.js +29 -0
  274. package/dist/formula/functions/sqrt.js.map +1 -0
  275. package/dist/formula/functions/sum.d.ts +19 -0
  276. package/dist/formula/functions/sum.d.ts.map +1 -0
  277. package/dist/formula/functions/sum.js +44 -0
  278. package/dist/formula/functions/sum.js.map +1 -0
  279. package/dist/formula/functions/sum.spec.d.ts +2 -0
  280. package/dist/formula/functions/sum.spec.d.ts.map +1 -0
  281. package/dist/formula/functions/sum.spec.js +40 -0
  282. package/dist/formula/functions/sum.spec.js.map +1 -0
  283. package/dist/formula/functions/sumif.d.ts +18 -0
  284. package/dist/formula/functions/sumif.d.ts.map +1 -0
  285. package/dist/formula/functions/sumif.js +59 -0
  286. package/dist/formula/functions/sumif.js.map +1 -0
  287. package/dist/formula/functions/tan.d.ts +12 -0
  288. package/dist/formula/functions/tan.d.ts.map +1 -0
  289. package/dist/formula/functions/tan.js +26 -0
  290. package/dist/formula/functions/tan.js.map +1 -0
  291. package/dist/formula/functions/uminus.d.ts +12 -0
  292. package/dist/formula/functions/uminus.d.ts.map +1 -0
  293. package/dist/formula/functions/uminus.js +23 -0
  294. package/dist/formula/functions/uminus.js.map +1 -0
  295. package/dist/formula/functions/vlookup.d.ts +18 -0
  296. package/dist/formula/functions/vlookup.d.ts.map +1 -0
  297. package/dist/formula/functions/vlookup.js +74 -0
  298. package/dist/formula/functions/vlookup.js.map +1 -0
  299. package/dist/formula/mapping.d.ts +114 -0
  300. package/dist/formula/mapping.d.ts.map +1 -0
  301. package/dist/formula/mapping.js +114 -0
  302. package/dist/formula/mapping.js.map +1 -0
  303. package/dist/formula/solver.d.ts +12 -0
  304. package/dist/formula/solver.d.ts.map +1 -0
  305. package/dist/formula/solver.js +64 -0
  306. package/dist/formula/solver.js.map +1 -0
  307. package/dist/index.d.ts +12 -0
  308. package/dist/index.d.ts.map +1 -0
  309. package/dist/index.js +11 -0
  310. package/dist/index.js.map +1 -0
  311. package/dist/lib/autofill.d.ts +17 -0
  312. package/dist/lib/autofill.d.ts.map +1 -0
  313. package/dist/lib/autofill.js +389 -0
  314. package/dist/lib/autofill.js.map +1 -0
  315. package/dist/lib/clipboard.d.ts +3 -0
  316. package/dist/lib/clipboard.d.ts.map +1 -0
  317. package/dist/lib/clipboard.js +45 -0
  318. package/dist/lib/clipboard.js.map +1 -0
  319. package/dist/lib/converters.d.ts +10 -0
  320. package/dist/lib/converters.d.ts.map +1 -0
  321. package/dist/lib/converters.js +127 -0
  322. package/dist/lib/converters.js.map +1 -0
  323. package/dist/lib/structs.d.ts +60 -0
  324. package/dist/lib/structs.d.ts.map +1 -0
  325. package/dist/lib/structs.js +251 -0
  326. package/dist/lib/structs.js.map +1 -0
  327. package/dist/lib/table.d.ts +303 -0
  328. package/dist/lib/table.d.ts.map +1 -0
  329. package/dist/lib/table.js +989 -0
  330. package/dist/lib/table.js.map +1 -0
  331. package/dist/lib/time.d.ts +14 -0
  332. package/dist/lib/time.d.ts.map +1 -0
  333. package/dist/lib/time.js +60 -0
  334. package/dist/lib/time.js.map +1 -0
  335. package/dist/lib/virtualization.d.ts +30 -0
  336. package/dist/lib/virtualization.d.ts.map +1 -0
  337. package/dist/lib/virtualization.js +114 -0
  338. package/dist/lib/virtualization.js.map +1 -0
  339. package/dist/parsers/core.d.ts +36 -0
  340. package/dist/parsers/core.d.ts.map +1 -0
  341. package/dist/parsers/core.js +123 -0
  342. package/dist/parsers/core.js.map +1 -0
  343. package/dist/renderers/checkbox.d.ts +5 -0
  344. package/dist/renderers/checkbox.d.ts.map +1 -0
  345. package/dist/renderers/checkbox.js +10 -0
  346. package/dist/renderers/checkbox.js.map +1 -0
  347. package/dist/renderers/core.d.ts +48 -0
  348. package/dist/renderers/core.d.ts.map +1 -0
  349. package/dist/renderers/core.js +143 -0
  350. package/dist/renderers/core.js.map +1 -0
  351. package/dist/renderers/thousand_separator.d.ts +5 -0
  352. package/dist/renderers/thousand_separator.d.ts.map +1 -0
  353. package/dist/renderers/thousand_separator.js +14 -0
  354. package/dist/renderers/thousand_separator.js.map +1 -0
  355. package/dist/store/actions.d.ts +198 -0
  356. package/dist/store/actions.d.ts.map +1 -0
  357. package/dist/store/actions.js +519 -0
  358. package/dist/store/actions.js.map +1 -0
  359. package/dist/store/helpers.d.ts +28 -0
  360. package/dist/store/helpers.d.ts.map +1 -0
  361. package/dist/store/helpers.js +78 -0
  362. package/dist/store/helpers.js.map +1 -0
  363. package/dist/store/index.d.ts +11 -0
  364. package/dist/store/index.d.ts.map +1 -0
  365. package/dist/store/index.js +3 -0
  366. package/dist/store/index.js.map +1 -0
  367. package/dist/styles/embedder.d.ts +2 -0
  368. package/dist/styles/embedder.d.ts.map +1 -0
  369. package/dist/styles/embedder.js +16 -0
  370. package/dist/styles/embedder.js.map +1 -0
  371. package/dist/styles/minified.d.ts +3 -0
  372. package/dist/styles/minified.d.ts.map +1 -0
  373. package/dist/styles/minified.js +4 -0
  374. package/dist/styles/minified.js.map +1 -0
  375. package/dist/types.d.ts +213 -0
  376. package/dist/types.d.ts.map +1 -0
  377. package/dist/types.js +2 -0
  378. package/dist/types.js.map +1 -0
  379. package/dist/utils.d.ts +2 -0
  380. package/dist/utils.d.ts.map +1 -0
  381. package/dist/utils.js +7 -0
  382. package/dist/utils.js.map +1 -0
  383. package/package.json +81 -0
@@ -0,0 +1,19 @@
1
+ import { BaseFunction } from "./__base";
2
+ export declare class SumFunction extends BaseFunction {
3
+ example: string;
4
+ helpText: string[];
5
+ helpArgs: ({
6
+ name: string;
7
+ description: string;
8
+ optional?: undefined;
9
+ iterable?: undefined;
10
+ } | {
11
+ name: string;
12
+ description: string;
13
+ optional: boolean;
14
+ iterable: boolean;
15
+ })[];
16
+ protected validate(): void;
17
+ protected main(...values: number[]): number;
18
+ }
19
+ //# sourceMappingURL=sum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sum.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/sum.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,SAAuB;IAC9B,QAAQ,WAAwD;IAChE,QAAQ;;;;;;;;;;SAQN;IAEF,SAAS,CAAC,QAAQ;IAsBlB,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE;CAMnC"}
@@ -0,0 +1,44 @@
1
+ import { solveTable } from "../solver";
2
+ import { Table } from "../../lib/table";
3
+ import { BaseFunction } from "./__base";
4
+ import { ensureNumber } from "./__utils";
5
+ import { FormulaError } from "../evaluator";
6
+ export class SumFunction extends BaseFunction {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.example = "SUM(A2:A100, 101)";
10
+ this.helpText = ["Returns the sum of a series of numbers or cells."];
11
+ this.helpArgs = [
12
+ { name: "value1", description: "First number or range." },
13
+ {
14
+ name: "value2",
15
+ description: "Additional numbers or ranges",
16
+ optional: true,
17
+ iterable: true,
18
+ },
19
+ ];
20
+ }
21
+ validate() {
22
+ if (this.bareArgs.length === 0) {
23
+ throw new FormulaError("#N/A", "One or more arguments are required.");
24
+ }
25
+ const spreaded = [];
26
+ this.bareArgs.forEach((arg) => {
27
+ if (arg instanceof Table) {
28
+ spreaded.push(...solveTable({ table: arg })
29
+ .reduce((a, b) => a.concat(b))
30
+ .filter((v) => typeof v === "number"));
31
+ return;
32
+ }
33
+ spreaded.push(ensureNumber(arg));
34
+ });
35
+ this.bareArgs = spreaded;
36
+ }
37
+ main(...values) {
38
+ if (values.length === 0) {
39
+ return 0;
40
+ }
41
+ return values.reduce((a, b) => a + b);
42
+ }
43
+ }
44
+ //# sourceMappingURL=sum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sum.js","sourceRoot":"","sources":["../../../src/formula/functions/sum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UA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AC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAES,IAAI,CAAC,GAAG,MAAgB;QAChC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACvB,OAAO,CAAC,CAAC;SACV;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACxC,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sum.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sum.spec.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/sum.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
1
+ import { SumFunction } from "./sum";
2
+ import { Table } from "../../lib/table";
3
+ import { FormulaError, Range, Ref, Value } from "../evaluator";
4
+ describe('sum', () => {
5
+ const table = new Table({
6
+ numRows: 100, numCols: 100,
7
+ cells: { A1: { value: 5 }, A2: { value: "=-(9 * 10) - 4" }, B50: { value: 25 }, C15: { value: "not a number" }, C20: { value: 10 } },
8
+ });
9
+ describe('normal', () => {
10
+ it('sum single values', () => {
11
+ const f = new SumFunction({
12
+ table,
13
+ args: [
14
+ new Ref("B50"),
15
+ new Value(5),
16
+ new Value(-3),
17
+ ]
18
+ });
19
+ expect(f.call()).toBe(27);
20
+ });
21
+ it('sum range', () => {
22
+ const f = new SumFunction({
23
+ table,
24
+ args: [
25
+ new Range("A2:E20"),
26
+ new Value(30),
27
+ ]
28
+ });
29
+ // -90 - 4 + 10 + 30
30
+ expect(f.call()).toBe(-54);
31
+ });
32
+ });
33
+ describe('validation error', () => {
34
+ it('missing argument', () => {
35
+ const f = new SumFunction({ table, args: [] });
36
+ expect(f.call.bind(f)).toThrow(FormulaError);
37
+ });
38
+ });
39
+ });
40
+ //# sourceMappingURL=sum.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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CAAC;oBACnB,IAAI,KAAK,CAAC,EAAE,CAAC;iBACd;aAAC,CAAC,CAAC;YACN,oBAAoB;YACpB,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;YAC1B,MAAM,CAAC,GAAG,IAAI,WAAW,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAC,CAAC,CAAC;YAC7C,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Table } from "../../lib/table";
2
+ import { BaseFunction } from "./__base";
3
+ export declare class SumifFunction extends BaseFunction {
4
+ example: string;
5
+ helpText: string[];
6
+ helpArgs: ({
7
+ name: string;
8
+ description: string;
9
+ optional?: undefined;
10
+ } | {
11
+ name: string;
12
+ description: string;
13
+ optional: boolean;
14
+ })[];
15
+ protected validate(): void;
16
+ protected main(range: Table, condition: string, sumRange: Table): number;
17
+ }
18
+ //# sourceMappingURL=sumif.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sumif.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/sumif.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,SAAyB;IAChC,QAAQ,WAA6C;IACrD,QAAQ;;;;;;;;SAWN;IAEF,SAAS,CAAC,QAAQ;IAYlB,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK;CA2BhE"}
@@ -0,0 +1,59 @@
1
+ import { FormulaError } from "../evaluator";
2
+ import { solveTable } from "../solver";
3
+ import { Table } from "../../lib/table";
4
+ import { BaseFunction } from "./__base";
5
+ import { check } from "./__utils";
6
+ export class SumifFunction extends BaseFunction {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.example = 'SUMIF(A1:A10,">20")';
10
+ this.helpText = ["Returns the sum of a series of cells."];
11
+ this.helpArgs = [
12
+ { name: "range1", description: "A condition range." },
13
+ {
14
+ name: "condition",
15
+ description: "A condition for summarization.",
16
+ },
17
+ {
18
+ name: "range2",
19
+ description: "A range to be summarized.",
20
+ optional: true,
21
+ },
22
+ ];
23
+ }
24
+ validate() {
25
+ if (this.bareArgs.length !== 2 && this.bareArgs.length !== 3) {
26
+ throw new FormulaError("#N/A", "Number of arguments for SUMIF is incorrect.");
27
+ }
28
+ if (this.bareArgs[2] != undefined && this.bareArgs[2] instanceof Table) {
29
+ throw new FormulaError("#N/A", "3rd argument must be range.");
30
+ }
31
+ }
32
+ main(range, condition, sumRange) {
33
+ if (!(range instanceof Table)) {
34
+ return check(range, condition) ? range : 0;
35
+ }
36
+ const conditionMatrix = solveTable({ table: range });
37
+ let sumMatrix = conditionMatrix;
38
+ if (sumRange) {
39
+ const [top, left] = [sumRange.top, sumRange.left];
40
+ const area = {
41
+ top,
42
+ left,
43
+ bottom: top + sumRange.getNumRows(),
44
+ right: left + sumRange.getNumCols(),
45
+ };
46
+ sumMatrix = solveTable({ table: this.table.trim(area) });
47
+ }
48
+ let total = 0;
49
+ conditionMatrix.forEach((row, y) => row.forEach((c, x) => {
50
+ var _a;
51
+ const s = ((_a = sumMatrix[y]) === null || _a === void 0 ? void 0 : _a[x]) || 0;
52
+ if (typeof s === "number" && check(c, condition)) {
53
+ total += s;
54
+ }
55
+ }));
56
+ return total;
57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[];
5
+ helpArgs: {
6
+ name: string;
7
+ description: string;
8
+ }[];
9
+ protected validate(): void;
10
+ protected main(angle: number): number;
11
+ }
12
+ //# sourceMappingURL=tan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tan.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/tan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,SAAY;IACnB,QAAQ,WAA0D;IAClE,QAAQ;;;QAKN;IAEF,SAAS,CAAC,QAAQ;IAUlB,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM;CAG7B"}
@@ -0,0 +1,26 @@
1
+ import { FormulaError } from "../evaluator";
2
+ import { BaseFunction } from "./__base";
3
+ import { ensureNumber } from "./__utils";
4
+ export class TanFunction extends BaseFunction {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.example = "TAN(1)";
8
+ this.helpText = ["Returns the tan of the angle specified in radians."];
9
+ this.helpArgs = [
10
+ {
11
+ name: "angle",
12
+ description: "An angle in radians, at which you want the tan.",
13
+ },
14
+ ];
15
+ }
16
+ validate() {
17
+ if (this.bareArgs.length !== 1) {
18
+ throw new FormulaError("#N/A", "Number of arguments for TAN is incorrect.");
19
+ }
20
+ this.bareArgs = this.bareArgs.map((arg) => ensureNumber(arg));
21
+ }
22
+ main(angle) {
23
+ return Math.tan(angle);
24
+ }
25
+ }
26
+ //# sourceMappingURL=tan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tan.js","sourceRoot":"","sources":["../../../src/formula/functions/tan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,OAAO,WAAY,SAAQ,YAAY;IAA7C;;QACE,YAAO,GAAG,QAAQ,CAAC;QACnB,aAAQ,GAAG,CAAC,oDAAoD,CAAC,CAAC;QAClE,aAAQ,GAAG;YACT;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,iDAAiD;aAC/D;SACF,CAAC;IAeJ,CAAC;IAbW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,YAAY,CACpB,MAAM,EACN,2CAA2C,CAC5C,CAAC;SACH;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAChE,CAAC;IAES,IAAI,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;CACF"}
@@ -0,0 +1,12 @@
1
+ import { BaseFunction } from "./__base";
2
+ export declare class UminusFunction extends BaseFunction {
3
+ example: string;
4
+ helpText: string[];
5
+ helpArgs: {
6
+ name: string;
7
+ description: string;
8
+ }[];
9
+ protected validate(): void;
10
+ protected main(v1: number): number;
11
+ }
12
+ //# sourceMappingURL=uminus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uminus.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/uminus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,cAAe,SAAQ,YAAY;IAC9C,OAAO,SAAe;IACtB,QAAQ,WAAoE;IAC5E,QAAQ;;;QAEN;IAEF,SAAS,CAAC,QAAQ;IAUlB,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM;CAG1B"}
@@ -0,0 +1,23 @@
1
+ import { FormulaError } from "../evaluator";
2
+ import { BaseFunction } from "./__base";
3
+ import { ensureNumber } from "./__utils";
4
+ export class UminusFunction extends BaseFunction {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.example = "UMINUS(4)";
8
+ this.helpText = ["Returns a number with positive and negative values reversed."];
9
+ this.helpArgs = [
10
+ { name: "value1", description: "A number that will be subtracted." },
11
+ ];
12
+ }
13
+ validate() {
14
+ if (this.bareArgs.length !== 1) {
15
+ throw new FormulaError("#N/A", "A single numerical value is only required.");
16
+ }
17
+ this.bareArgs = this.bareArgs.map((arg) => ensureNumber(arg));
18
+ }
19
+ main(v1) {
20
+ return -v1;
21
+ }
22
+ }
23
+ //# sourceMappingURL=uminus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uminus.js","sourceRoot":"","sources":["../../../src/formula/functions/uminus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,OAAO,cAAe,SAAQ,YAAY;IAAhD;;QACE,YAAO,GAAG,WAAW,CAAC;QACtB,aAAQ,GAAG,CAAC,8DAA8D,CAAC,CAAC;QAC5E,aAAQ,GAAG;YACT,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mCAAmC,EAAE;SACrE,CAAC;IAeJ,CAAC;IAbW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,YAAY,CACpB,MAAM,EACN,4CAA4C,CAC7C,CAAC;SACH;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAChE,CAAC;IAES,IAAI,CAAC,EAAU;QACvB,OAAO,CAAC,EAAE,CAAC;IACb,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ import { Table } from "../../lib/table";
2
+ import { BaseFunction } from "./__base";
3
+ export declare class VlookupFunction extends BaseFunction {
4
+ example: string;
5
+ helpText: string[];
6
+ helpArgs: ({
7
+ name: string;
8
+ description: string;
9
+ option?: undefined;
10
+ } | {
11
+ name: string;
12
+ description: string;
13
+ option: boolean;
14
+ })[];
15
+ protected validate(): void;
16
+ protected main(key: any, range: Table, index: number, isSorted: boolean): any;
17
+ }
18
+ //# sourceMappingURL=vlookup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vlookup.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/vlookup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,OAAO,SAAsC;IAC7C,QAAQ,WAEN;IACF,QAAQ;;;;;;;;SAgBN;IAEF,SAAS,CAAC,QAAQ;IAiBlB,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO;CA2BxE"}
@@ -0,0 +1,74 @@
1
+ import { FormulaError } from "../evaluator";
2
+ import { solveTable } from "../solver";
3
+ import { Table } from "../../lib/table";
4
+ import { BaseFunction } from "./__base";
5
+ import { ensureBoolean, ensureNumber, stripTable } from "./__utils";
6
+ export class VlookupFunction extends BaseFunction {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.example = "VLOOKUP(10003, A2:B26, 2, FALSE)";
10
+ this.helpText = [
11
+ "Searches vertically for the specified key in the first column of the range and returns the value of the specified cell in the same row.",
12
+ ];
13
+ this.helpArgs = [
14
+ { name: "key", description: "Search key." },
15
+ {
16
+ name: "range",
17
+ description: "A range for search",
18
+ },
19
+ {
20
+ name: "index",
21
+ description: "The index of the column in the range.",
22
+ },
23
+ {
24
+ name: "is_sorted",
25
+ description: "FALSE: Exact match. This is recommended. TRUE: Approximate match. Before you use an approximate match, sort your search key in ascending order. Otherwise, you may likely get a wrong return value.",
26
+ option: true,
27
+ },
28
+ ];
29
+ }
30
+ validate() {
31
+ if (this.bareArgs.length !== 3 && this.bareArgs.length !== 4) {
32
+ throw new FormulaError("#N/A", "Number of arguments for VLOOKUP is incorrect.");
33
+ }
34
+ if (this.bareArgs[0] instanceof Table) {
35
+ this.bareArgs[0] = stripTable(this.bareArgs[0]);
36
+ }
37
+ if (!(this.bareArgs[1] instanceof Table)) {
38
+ throw new FormulaError("#REF!", "2nd argument must be range");
39
+ }
40
+ this.bareArgs[2] = ensureNumber(this.bareArgs[2]);
41
+ this.bareArgs[3] = ensureBoolean(this.bareArgs[3], true);
42
+ }
43
+ main(key, range, index, isSorted) {
44
+ var _a, _b, _c, _d;
45
+ const matrix = solveTable({ table: range });
46
+ if (isSorted) {
47
+ let last = -1;
48
+ for (let y = 0; y <= range.getNumRows(); y++) {
49
+ const v = (_a = matrix[y]) === null || _a === void 0 ? void 0 : _a[0];
50
+ if (v == null) {
51
+ continue;
52
+ }
53
+ if (v <= key) {
54
+ last = y;
55
+ }
56
+ else {
57
+ break;
58
+ }
59
+ }
60
+ if (last !== -1) {
61
+ return (_b = matrix[last]) === null || _b === void 0 ? void 0 : _b[index - 1];
62
+ }
63
+ }
64
+ else {
65
+ for (let y = 0; y <= range.getNumRows(); y++) {
66
+ if (((_c = matrix[y]) === null || _c === void 0 ? void 0 : _c[0]) === key) {
67
+ return (_d = matrix[y]) === null || _d === void 0 ? void 0 : _d[index - 1];
68
+ }
69
+ }
70
+ }
71
+ throw new FormulaError("#N/A", `No values found for '${key}'.`);
72
+ }
73
+ }
74
+ //# sourceMappingURL=vlookup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vlookup.js","sourceRoot":"","sources":["../../../src/formula/functions/vlookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,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;CACF"}
@@ -0,0 +1,114 @@
1
+ import { AddFunction } from "./functions/add";
2
+ import { MinusFunction } from "./functions/minus";
3
+ import { MultiplyFunction } from "./functions/multiply";
4
+ import { DivideFunction } from "./functions/divide";
5
+ import { ModFunction } from "./functions/mod";
6
+ import { SumFunction } from "./functions/sum";
7
+ import { ConcatFunction } from "./functions/concat";
8
+ import { ConcatenateFunction } from "./functions/concatenate";
9
+ import { EqFunction } from "./functions/eq";
10
+ import { NeFunction } from "./functions/ne";
11
+ import { GtFunction } from "./functions/gt";
12
+ import { GteFunction } from "./functions/gte";
13
+ import { LtFunction } from "./functions/lt";
14
+ import { LteFunction } from "./functions/lte";
15
+ import { NowFunction } from "./functions/now";
16
+ import { AndFunction } from "./functions/and";
17
+ import { OrFunction } from "./functions/or";
18
+ import { IfFunction } from "./functions/if";
19
+ import { IfErrorFunction } from "./functions/iferror";
20
+ import { NotFunction } from "./functions/not";
21
+ import { CountFunction } from "./functions/count";
22
+ import { CountifFunction } from "./functions/countif";
23
+ import { SumifFunction } from "./functions/sumif";
24
+ import { VlookupFunction } from "./functions/vlookup";
25
+ import { HlookupFunction } from "./functions/hlookup";
26
+ import { LogFunction } from "./functions/log";
27
+ import { Log10Function } from "./functions/log10";
28
+ import { LnFunction } from "./functions/ln";
29
+ import { AbsFunction } from "./functions/abs";
30
+ import { ProductFunction } from "./functions/product";
31
+ import { RandFunction } from "./functions/rand";
32
+ import { PiFunction } from "./functions/pi";
33
+ import { ExpFunction } from "./functions/exp";
34
+ import { RadiansFunction } from "./functions/radians";
35
+ import { PowerFunction } from "./functions/power";
36
+ import { SqrtFunction } from "./functions/sqrt";
37
+ import { RoundFunction } from "./functions/round";
38
+ import { RoundupFunction } from "./functions/roundup";
39
+ import { RounddownFunction } from "./functions/rounddown";
40
+ import { SinFunction } from "./functions/sin";
41
+ import { CosFunction } from "./functions/cos";
42
+ import { TanFunction } from "./functions/tan";
43
+ import { AsinFunction } from "./functions/asin";
44
+ import { AcosFunction } from "./functions/acos";
45
+ import { AtanFunction } from "./functions/atan";
46
+ import { Atan2Function } from "./functions/atan2";
47
+ import { CountaFunction } from "./functions/counta";
48
+ import { AverageFunction } from "./functions/average";
49
+ import { MaxFunction } from "./functions/max";
50
+ import { MinFunction } from "./functions/min";
51
+ import { LenFunction } from "./functions/len";
52
+ import { LenbFunction } from "./functions/lenb";
53
+ import { UminusFunction } from "./functions/uminus";
54
+ import { RowFunction } from "./functions/row";
55
+ import { ColFunction } from "./functions/col";
56
+ export declare const functions: {
57
+ abs: typeof AbsFunction;
58
+ add: typeof AddFunction;
59
+ divide: typeof DivideFunction;
60
+ mod: typeof ModFunction;
61
+ minus: typeof MinusFunction;
62
+ uminus: typeof UminusFunction;
63
+ multiply: typeof MultiplyFunction;
64
+ pow: typeof PowerFunction;
65
+ power: typeof PowerFunction;
66
+ sqrt: typeof SqrtFunction;
67
+ sum: typeof SumFunction;
68
+ sumif: typeof SumifFunction;
69
+ max: typeof MaxFunction;
70
+ min: typeof MinFunction;
71
+ average: typeof AverageFunction;
72
+ count: typeof CountFunction;
73
+ counta: typeof CountaFunction;
74
+ countif: typeof CountifFunction;
75
+ product: typeof ProductFunction;
76
+ concat: typeof ConcatFunction;
77
+ concatenate: typeof ConcatenateFunction;
78
+ eq: typeof EqFunction;
79
+ ne: typeof NeFunction;
80
+ gt: typeof GtFunction;
81
+ gte: typeof GteFunction;
82
+ lt: typeof LtFunction;
83
+ lte: typeof LteFunction;
84
+ and: typeof AndFunction;
85
+ or: typeof OrFunction;
86
+ round: typeof RoundFunction;
87
+ rounddown: typeof RounddownFunction;
88
+ roundup: typeof RoundupFunction;
89
+ if: typeof IfFunction;
90
+ iferror: typeof IfErrorFunction;
91
+ not: typeof NotFunction;
92
+ vlookup: typeof VlookupFunction;
93
+ hlookup: typeof HlookupFunction;
94
+ row: typeof RowFunction;
95
+ col: typeof ColFunction;
96
+ now: typeof NowFunction;
97
+ rand: typeof RandFunction;
98
+ log: typeof LogFunction;
99
+ log10: typeof Log10Function;
100
+ ln: typeof LnFunction;
101
+ exp: typeof ExpFunction;
102
+ pi: typeof PiFunction;
103
+ radians: typeof RadiansFunction;
104
+ sin: typeof SinFunction;
105
+ cos: typeof CosFunction;
106
+ tan: typeof TanFunction;
107
+ asin: typeof AsinFunction;
108
+ acos: typeof AcosFunction;
109
+ atan: typeof AtanFunction;
110
+ atan2: typeof Atan2Function;
111
+ len: typeof LenFunction;
112
+ lenb: typeof LenbFunction;
113
+ };
114
+ //# sourceMappingURL=mapping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../src/formula/mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB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C;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDrB,CAAC"}
@@ -0,0 +1,114 @@
1
+ import { AddFunction } from "./functions/add";
2
+ import { MinusFunction } from "./functions/minus";
3
+ import { MultiplyFunction } from "./functions/multiply";
4
+ import { DivideFunction } from "./functions/divide";
5
+ import { ModFunction } from "./functions/mod";
6
+ import { SumFunction } from "./functions/sum";
7
+ import { ConcatFunction } from "./functions/concat";
8
+ import { ConcatenateFunction } from "./functions/concatenate";
9
+ import { EqFunction } from "./functions/eq";
10
+ import { NeFunction } from "./functions/ne";
11
+ import { GtFunction } from "./functions/gt";
12
+ import { GteFunction } from "./functions/gte";
13
+ import { LtFunction } from "./functions/lt";
14
+ import { LteFunction } from "./functions/lte";
15
+ import { NowFunction } from "./functions/now";
16
+ import { AndFunction } from "./functions/and";
17
+ import { OrFunction } from "./functions/or";
18
+ import { IfFunction } from "./functions/if";
19
+ import { IfErrorFunction } from "./functions/iferror";
20
+ import { NotFunction } from "./functions/not";
21
+ import { CountFunction } from "./functions/count";
22
+ import { CountifFunction } from "./functions/countif";
23
+ import { SumifFunction } from "./functions/sumif";
24
+ import { VlookupFunction } from "./functions/vlookup";
25
+ import { HlookupFunction } from "./functions/hlookup";
26
+ import { LogFunction } from "./functions/log";
27
+ import { Log10Function } from "./functions/log10";
28
+ import { LnFunction } from "./functions/ln";
29
+ import { AbsFunction } from "./functions/abs";
30
+ import { ProductFunction } from "./functions/product";
31
+ import { RandFunction } from "./functions/rand";
32
+ import { PiFunction } from "./functions/pi";
33
+ import { ExpFunction } from "./functions/exp";
34
+ import { RadiansFunction } from "./functions/radians";
35
+ import { PowerFunction } from "./functions/power";
36
+ import { SqrtFunction } from "./functions/sqrt";
37
+ import { RoundFunction } from "./functions/round";
38
+ import { RoundupFunction } from "./functions/roundup";
39
+ import { RounddownFunction } from "./functions/rounddown";
40
+ import { SinFunction } from "./functions/sin";
41
+ import { CosFunction } from "./functions/cos";
42
+ import { TanFunction } from "./functions/tan";
43
+ import { AsinFunction } from "./functions/asin";
44
+ import { AcosFunction } from "./functions/acos";
45
+ import { AtanFunction } from "./functions/atan";
46
+ import { Atan2Function } from "./functions/atan2";
47
+ import { CountaFunction } from "./functions/counta";
48
+ import { AverageFunction } from "./functions/average";
49
+ import { MaxFunction } from "./functions/max";
50
+ import { MinFunction } from "./functions/min";
51
+ import { LenFunction } from "./functions/len";
52
+ import { LenbFunction } from "./functions/lenb";
53
+ import { UminusFunction } from "./functions/uminus";
54
+ import { RowFunction } from "./functions/row";
55
+ import { ColFunction } from "./functions/col";
56
+ export const functions = {
57
+ abs: AbsFunction,
58
+ add: AddFunction,
59
+ divide: DivideFunction,
60
+ mod: ModFunction,
61
+ minus: MinusFunction,
62
+ uminus: UminusFunction,
63
+ multiply: MultiplyFunction,
64
+ pow: PowerFunction,
65
+ power: PowerFunction,
66
+ sqrt: SqrtFunction,
67
+ sum: SumFunction,
68
+ sumif: SumifFunction,
69
+ max: MaxFunction,
70
+ min: MinFunction,
71
+ average: AverageFunction,
72
+ count: CountFunction,
73
+ counta: CountaFunction,
74
+ countif: CountifFunction,
75
+ product: ProductFunction,
76
+ concat: ConcatFunction,
77
+ concatenate: ConcatenateFunction,
78
+ eq: EqFunction,
79
+ ne: NeFunction,
80
+ gt: GtFunction,
81
+ gte: GteFunction,
82
+ lt: LtFunction,
83
+ lte: LteFunction,
84
+ and: AndFunction,
85
+ or: OrFunction,
86
+ round: RoundFunction,
87
+ rounddown: RounddownFunction,
88
+ roundup: RoundupFunction,
89
+ if: IfFunction,
90
+ iferror: IfErrorFunction,
91
+ not: NotFunction,
92
+ vlookup: VlookupFunction,
93
+ hlookup: HlookupFunction,
94
+ row: RowFunction,
95
+ col: ColFunction,
96
+ now: NowFunction,
97
+ rand: RandFunction,
98
+ log: LogFunction,
99
+ log10: Log10Function,
100
+ ln: LnFunction,
101
+ exp: ExpFunction,
102
+ pi: PiFunction,
103
+ radians: RadiansFunction,
104
+ sin: SinFunction,
105
+ cos: CosFunction,
106
+ tan: TanFunction,
107
+ asin: AsinFunction,
108
+ acos: AcosFunction,
109
+ atan: AtanFunction,
110
+ atan2: Atan2Function,
111
+ len: LenFunction,
112
+ lenb: LenbFunction,
113
+ };
114
+ //# sourceMappingURL=mapping.js.map