@univerjs/sheets-formula 0.1.0-alpha.1

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 (180) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -0
  3. package/lib/cjs/index.js +4215 -0
  4. package/lib/cjs/locale/en-US.js +223 -0
  5. package/lib/cjs/locale/zh-CN.js +223 -0
  6. package/lib/esm/index.js +4205 -0
  7. package/lib/esm/locale/en-US.js +200 -0
  8. package/lib/esm/locale/zh-CN.js +200 -0
  9. package/lib/index.css +214 -0
  10. package/lib/types/commands/commands/insert-function.command.d.ts +23 -0
  11. package/lib/types/commands/commands/insert-function.command.d.ts.map +1 -0
  12. package/lib/types/commands/operations/__tests__/create-command-test-bed.d.ts +16 -0
  13. package/lib/types/commands/operations/__tests__/create-command-test-bed.d.ts.map +1 -0
  14. package/lib/types/commands/operations/__tests__/insert-function.operation.spec.d.ts +2 -0
  15. package/lib/types/commands/operations/__tests__/insert-function.operation.spec.d.ts.map +1 -0
  16. package/lib/types/commands/operations/editor-formula.operation.d.ts +11 -0
  17. package/lib/types/commands/operations/editor-formula.operation.d.ts.map +1 -0
  18. package/lib/types/commands/operations/help-function.operation.d.ts +3 -0
  19. package/lib/types/commands/operations/help-function.operation.d.ts.map +1 -0
  20. package/lib/types/commands/operations/insert-function.operation.d.ts +9 -0
  21. package/lib/types/commands/operations/insert-function.operation.d.ts.map +1 -0
  22. package/lib/types/commands/operations/more-functions.operation.d.ts +3 -0
  23. package/lib/types/commands/operations/more-functions.operation.d.ts.map +1 -0
  24. package/lib/types/commands/operations/reference-absolute.operation.d.ts +3 -0
  25. package/lib/types/commands/operations/reference-absolute.operation.d.ts.map +1 -0
  26. package/lib/types/commands/operations/search-function.operation.d.ts +3 -0
  27. package/lib/types/commands/operations/search-function.operation.d.ts.map +1 -0
  28. package/lib/types/common/plugin-name.d.ts +2 -0
  29. package/lib/types/common/plugin-name.d.ts.map +1 -0
  30. package/lib/types/common/prompt.d.ts +2 -0
  31. package/lib/types/common/prompt.d.ts.map +1 -0
  32. package/lib/types/common/selection.d.ts +5 -0
  33. package/lib/types/common/selection.d.ts.map +1 -0
  34. package/lib/types/controllers/__tests__/create-command-test-bed.d.ts +11 -0
  35. package/lib/types/controllers/__tests__/create-command-test-bed.d.ts.map +1 -0
  36. package/lib/types/controllers/__tests__/formula-auto-fill.controller.spec.d.ts +2 -0
  37. package/lib/types/controllers/__tests__/formula-auto-fill.controller.spec.d.ts.map +1 -0
  38. package/lib/types/controllers/formula-auto-fill.controller.d.ts +12 -0
  39. package/lib/types/controllers/formula-auto-fill.controller.d.ts.map +1 -0
  40. package/lib/types/controllers/formula-input.controller.d.ts +25 -0
  41. package/lib/types/controllers/formula-input.controller.d.ts.map +1 -0
  42. package/lib/types/controllers/formula-ui.controller.d.ts +19 -0
  43. package/lib/types/controllers/formula-ui.controller.d.ts.map +1 -0
  44. package/lib/types/controllers/menu.d.ts +5 -0
  45. package/lib/types/controllers/menu.d.ts.map +1 -0
  46. package/lib/types/controllers/prompt.controller.d.ts +146 -0
  47. package/lib/types/controllers/prompt.controller.d.ts.map +1 -0
  48. package/lib/types/controllers/shortcuts/prompt.shortcut.d.ts +10 -0
  49. package/lib/types/controllers/shortcuts/prompt.shortcut.d.ts.map +1 -0
  50. package/lib/types/formula-ui-plugin.d.ts +18 -0
  51. package/lib/types/formula-ui-plugin.d.ts.map +1 -0
  52. package/lib/types/index.d.ts +2 -0
  53. package/lib/types/index.d.ts.map +1 -0
  54. package/lib/types/locale/en-US.d.ts +136 -0
  55. package/lib/types/locale/en-US.d.ts.map +1 -0
  56. package/lib/types/locale/function-list/array/en-US.d.ts +3 -0
  57. package/lib/types/locale/function-list/array/en-US.d.ts.map +1 -0
  58. package/lib/types/locale/function-list/array/zh-CN.d.ts +3 -0
  59. package/lib/types/locale/function-list/array/zh-CN.d.ts.map +1 -0
  60. package/lib/types/locale/function-list/compatibility/en-US.d.ts +3 -0
  61. package/lib/types/locale/function-list/compatibility/en-US.d.ts.map +1 -0
  62. package/lib/types/locale/function-list/compatibility/zh-CN.d.ts +3 -0
  63. package/lib/types/locale/function-list/compatibility/zh-CN.d.ts.map +1 -0
  64. package/lib/types/locale/function-list/cube/en-US.d.ts +3 -0
  65. package/lib/types/locale/function-list/cube/en-US.d.ts.map +1 -0
  66. package/lib/types/locale/function-list/cube/zh-CN.d.ts +3 -0
  67. package/lib/types/locale/function-list/cube/zh-CN.d.ts.map +1 -0
  68. package/lib/types/locale/function-list/database/en-US.d.ts +3 -0
  69. package/lib/types/locale/function-list/database/en-US.d.ts.map +1 -0
  70. package/lib/types/locale/function-list/database/zh-CN.d.ts +3 -0
  71. package/lib/types/locale/function-list/database/zh-CN.d.ts.map +1 -0
  72. package/lib/types/locale/function-list/date/en-US.d.ts +3 -0
  73. package/lib/types/locale/function-list/date/en-US.d.ts.map +1 -0
  74. package/lib/types/locale/function-list/date/zh-CN.d.ts +3 -0
  75. package/lib/types/locale/function-list/date/zh-CN.d.ts.map +1 -0
  76. package/lib/types/locale/function-list/engineering/en-US.d.ts +3 -0
  77. package/lib/types/locale/function-list/engineering/en-US.d.ts.map +1 -0
  78. package/lib/types/locale/function-list/engineering/zh-CN.d.ts +3 -0
  79. package/lib/types/locale/function-list/engineering/zh-CN.d.ts.map +1 -0
  80. package/lib/types/locale/function-list/financial/en-US.d.ts +3 -0
  81. package/lib/types/locale/function-list/financial/en-US.d.ts.map +1 -0
  82. package/lib/types/locale/function-list/financial/zh-CN.d.ts +3 -0
  83. package/lib/types/locale/function-list/financial/zh-CN.d.ts.map +1 -0
  84. package/lib/types/locale/function-list/information/en-US.d.ts +3 -0
  85. package/lib/types/locale/function-list/information/en-US.d.ts.map +1 -0
  86. package/lib/types/locale/function-list/information/zh-CN.d.ts +3 -0
  87. package/lib/types/locale/function-list/information/zh-CN.d.ts.map +1 -0
  88. package/lib/types/locale/function-list/logical/en-US.d.ts +3 -0
  89. package/lib/types/locale/function-list/logical/en-US.d.ts.map +1 -0
  90. package/lib/types/locale/function-list/logical/zh-CN.d.ts +3 -0
  91. package/lib/types/locale/function-list/logical/zh-CN.d.ts.map +1 -0
  92. package/lib/types/locale/function-list/lookup/en-US.d.ts +3 -0
  93. package/lib/types/locale/function-list/lookup/en-US.d.ts.map +1 -0
  94. package/lib/types/locale/function-list/lookup/zh-CN.d.ts +3 -0
  95. package/lib/types/locale/function-list/lookup/zh-CN.d.ts.map +1 -0
  96. package/lib/types/locale/function-list/math/en-US.d.ts +36 -0
  97. package/lib/types/locale/function-list/math/en-US.d.ts.map +1 -0
  98. package/lib/types/locale/function-list/math/zh-CN.d.ts +36 -0
  99. package/lib/types/locale/function-list/math/zh-CN.d.ts.map +1 -0
  100. package/lib/types/locale/function-list/statistical/en-US.d.ts +60 -0
  101. package/lib/types/locale/function-list/statistical/en-US.d.ts.map +1 -0
  102. package/lib/types/locale/function-list/statistical/zh-CN.d.ts +60 -0
  103. package/lib/types/locale/function-list/statistical/zh-CN.d.ts.map +1 -0
  104. package/lib/types/locale/function-list/text/en-US.d.ts +3 -0
  105. package/lib/types/locale/function-list/text/en-US.d.ts.map +1 -0
  106. package/lib/types/locale/function-list/text/zh-CN.d.ts +3 -0
  107. package/lib/types/locale/function-list/text/zh-CN.d.ts.map +1 -0
  108. package/lib/types/locale/function-list/univer/en-US.d.ts +3 -0
  109. package/lib/types/locale/function-list/univer/en-US.d.ts.map +1 -0
  110. package/lib/types/locale/function-list/univer/zh-CN.d.ts +3 -0
  111. package/lib/types/locale/function-list/univer/zh-CN.d.ts.map +1 -0
  112. package/lib/types/locale/function-list/web/en-US.d.ts +3 -0
  113. package/lib/types/locale/function-list/web/en-US.d.ts.map +1 -0
  114. package/lib/types/locale/function-list/web/zh-CN.d.ts +3 -0
  115. package/lib/types/locale/function-list/web/zh-CN.d.ts.map +1 -0
  116. package/lib/types/locale/index.d.ts +3 -0
  117. package/lib/types/locale/index.d.ts.map +1 -0
  118. package/lib/types/locale/zh-CN.d.ts +136 -0
  119. package/lib/types/locale/zh-CN.d.ts.map +1 -0
  120. package/lib/types/services/description.service.d.ts +48 -0
  121. package/lib/types/services/description.service.d.ts.map +1 -0
  122. package/lib/types/services/formula-input.service.d.ts +95 -0
  123. package/lib/types/services/formula-input.service.d.ts.map +1 -0
  124. package/lib/types/services/function-list/array.d.ts +3 -0
  125. package/lib/types/services/function-list/array.d.ts.map +1 -0
  126. package/lib/types/services/function-list/compatibility.d.ts +3 -0
  127. package/lib/types/services/function-list/compatibility.d.ts.map +1 -0
  128. package/lib/types/services/function-list/cube.d.ts +3 -0
  129. package/lib/types/services/function-list/cube.d.ts.map +1 -0
  130. package/lib/types/services/function-list/database.d.ts +3 -0
  131. package/lib/types/services/function-list/database.d.ts.map +1 -0
  132. package/lib/types/services/function-list/date.d.ts +3 -0
  133. package/lib/types/services/function-list/date.d.ts.map +1 -0
  134. package/lib/types/services/function-list/engineering.d.ts +3 -0
  135. package/lib/types/services/function-list/engineering.d.ts.map +1 -0
  136. package/lib/types/services/function-list/financial.d.ts +3 -0
  137. package/lib/types/services/function-list/financial.d.ts.map +1 -0
  138. package/lib/types/services/function-list/function-list.d.ts +3 -0
  139. package/lib/types/services/function-list/function-list.d.ts.map +1 -0
  140. package/lib/types/services/function-list/information.d.ts +3 -0
  141. package/lib/types/services/function-list/information.d.ts.map +1 -0
  142. package/lib/types/services/function-list/logical.d.ts +3 -0
  143. package/lib/types/services/function-list/logical.d.ts.map +1 -0
  144. package/lib/types/services/function-list/lookup.d.ts +3 -0
  145. package/lib/types/services/function-list/lookup.d.ts.map +1 -0
  146. package/lib/types/services/function-list/math.d.ts +3 -0
  147. package/lib/types/services/function-list/math.d.ts.map +1 -0
  148. package/lib/types/services/function-list/statistical.d.ts +3 -0
  149. package/lib/types/services/function-list/statistical.d.ts.map +1 -0
  150. package/lib/types/services/function-list/text.d.ts +3 -0
  151. package/lib/types/services/function-list/text.d.ts.map +1 -0
  152. package/lib/types/services/function-list/univer.d.ts +3 -0
  153. package/lib/types/services/function-list/univer.d.ts.map +1 -0
  154. package/lib/types/services/function-list/web.d.ts +3 -0
  155. package/lib/types/services/function-list/web.d.ts.map +1 -0
  156. package/lib/types/services/prompt.service.d.ts +106 -0
  157. package/lib/types/services/prompt.service.d.ts.map +1 -0
  158. package/lib/types/services/utils.d.ts +8 -0
  159. package/lib/types/services/utils.d.ts.map +1 -0
  160. package/lib/types/views/FormulaPromptContainer.d.ts +3 -0
  161. package/lib/types/views/FormulaPromptContainer.d.ts.map +1 -0
  162. package/lib/types/views/more-functions/MoreFunctions.d.ts +3 -0
  163. package/lib/types/views/more-functions/MoreFunctions.d.ts.map +1 -0
  164. package/lib/types/views/more-functions/function-help/FunctionHelp.d.ts +9 -0
  165. package/lib/types/views/more-functions/function-help/FunctionHelp.d.ts.map +1 -0
  166. package/lib/types/views/more-functions/function-params/FunctionParams.d.ts +9 -0
  167. package/lib/types/views/more-functions/function-params/FunctionParams.d.ts.map +1 -0
  168. package/lib/types/views/more-functions/input-params/InputParams.d.ts +8 -0
  169. package/lib/types/views/more-functions/input-params/InputParams.d.ts.map +1 -0
  170. package/lib/types/views/more-functions/interface.d.ts +2 -0
  171. package/lib/types/views/more-functions/interface.d.ts.map +1 -0
  172. package/lib/types/views/more-functions/select-function/SelectFunction.d.ts +7 -0
  173. package/lib/types/views/more-functions/select-function/SelectFunction.d.ts.map +1 -0
  174. package/lib/types/views/prompt/error-function/error-function.d.ts +3 -0
  175. package/lib/types/views/prompt/error-function/error-function.d.ts.map +1 -0
  176. package/lib/types/views/prompt/help-function/HelpFunction.d.ts +3 -0
  177. package/lib/types/views/prompt/help-function/HelpFunction.d.ts.map +1 -0
  178. package/lib/types/views/prompt/search-function/SearchFunction.d.ts +3 -0
  179. package/lib/types/views/prompt/search-function/SearchFunction.d.ts.map +1 -0
  180. package/package.json +68 -0
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_COMPATIBILITY: IFunctionInfo[];
3
+ //# sourceMappingURL=compatibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compatibility.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/compatibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,2BAA2B,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_CUBE: IFunctionInfo[];
3
+ //# sourceMappingURL=cube.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cube.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/cube.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_DATABASE: IFunctionInfo[];
3
+ //# sourceMappingURL=database.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,sBAAsB,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_DATE: IFunctionInfo[];
3
+ //# sourceMappingURL=date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_ENGINEERING: IFunctionInfo[];
3
+ //# sourceMappingURL=engineering.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engineering.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/engineering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,yBAAyB,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_FINANCIAL: IFunctionInfo[];
3
+ //# sourceMappingURL=financial.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"financial.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/financial.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,uBAAuB,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST: IFunctionInfo[];
3
+ //# sourceMappingURL=function-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function-list.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/function-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAkB9D,eAAO,MAAM,aAAa,EAAE,aAAa,EAgBxC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_INFORMATION: IFunctionInfo[];
3
+ //# sourceMappingURL=information.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"information.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/information.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,yBAAyB,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_LOGICAL: IFunctionInfo[];
3
+ //# sourceMappingURL=logical.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logical.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/logical.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,qBAAqB,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_LOOKUP: IFunctionInfo[];
3
+ //# sourceMappingURL=lookup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/lookup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,oBAAoB,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_MATH: IFunctionInfo[];
3
+ //# sourceMappingURL=math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/math.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAI9D,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAsD7C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_STATISTICAL: IFunctionInfo[];
3
+ //# sourceMappingURL=statistical.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statistical.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/statistical.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,eAAO,MAAM,yBAAyB,EAAE,aAAa,EA6FpD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_TEXT: IFunctionInfo[];
3
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_UNIVER: IFunctionInfo[];
3
+ //# sourceMappingURL=univer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"univer.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/univer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,oBAAoB,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ export declare const FUNCTION_LIST_WEB: IFunctionInfo[];
3
+ //# sourceMappingURL=web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../../src/services/function-list/web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,eAAO,MAAM,iBAAiB,EAAE,aAAa,EAAO,CAAC"}
@@ -0,0 +1,106 @@
1
+ import type { Direction } from '@univerjs/core';
2
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
3
+ import type { IDisposable } from '@wendellhu/redi';
4
+ import type { Observable } from 'rxjs';
5
+ import type { ISearchItem } from './description.service';
6
+ export interface ISearchFunctionOperationParams {
7
+ /**
8
+ * show SearchFunction Component or not
9
+ */
10
+ visible: boolean;
11
+ /**
12
+ * function search text
13
+ */
14
+ searchText: string;
15
+ /**
16
+ * function list
17
+ */
18
+ searchList: ISearchItem[];
19
+ }
20
+ export interface IHelpFunctionOperationParams {
21
+ /**
22
+ * show HelpFunction Component or not
23
+ */
24
+ visible: boolean;
25
+ /**
26
+ * function param index
27
+ */
28
+ paramIndex: number;
29
+ /**
30
+ * function info
31
+ */
32
+ functionInfo: IFunctionInfo;
33
+ }
34
+ export interface INavigateParam {
35
+ direction: Direction.UP | Direction.DOWN;
36
+ }
37
+ export interface IFormulaPromptService {
38
+ /**
39
+ * listen search function open
40
+ */
41
+ search$: Observable<ISearchFunctionOperationParams>;
42
+ /**
43
+ * open search function
44
+ */
45
+ search(param: ISearchFunctionOperationParams): void;
46
+ /**
47
+ * listen help function open
48
+ */
49
+ help$: Observable<IHelpFunctionOperationParams>;
50
+ /**
51
+ * open help function
52
+ */
53
+ help(param: IHelpFunctionOperationParams): void;
54
+ /**
55
+ * listen navigate shortcut, UP and DOWN
56
+ */
57
+ navigate$: Observable<INavigateParam>;
58
+ /**
59
+ * set navigate shortcut
60
+ */
61
+ navigate(param: INavigateParam): void;
62
+ /**
63
+ * listen accept shortcut, TAB/ENTER
64
+ */
65
+ accept$: Observable<boolean>;
66
+ /**
67
+ * set accept shortcut
68
+ */
69
+ accept(param: boolean): void;
70
+ /**
71
+ * accept formula name
72
+ */
73
+ acceptFormulaName$: Observable<string>;
74
+ /**
75
+ * set accept formula name
76
+ */
77
+ acceptFormulaName(param: string): void;
78
+ isSearching(): boolean;
79
+ isHelping(): boolean;
80
+ dispose(): void;
81
+ }
82
+ export declare const IFormulaPromptService: import("@wendellhu/redi").IdentifierDecorator<FormulaPromptService>;
83
+ export declare class FormulaPromptService implements IFormulaPromptService, IDisposable {
84
+ private readonly _search$;
85
+ private readonly _help$;
86
+ private readonly _navigate$;
87
+ private readonly _accept$;
88
+ private readonly _acceptFormulaName$;
89
+ readonly search$: Observable<ISearchFunctionOperationParams>;
90
+ readonly help$: Observable<IHelpFunctionOperationParams>;
91
+ readonly navigate$: Observable<INavigateParam>;
92
+ readonly accept$: Observable<boolean>;
93
+ readonly acceptFormulaName$: Observable<string>;
94
+ private _searching;
95
+ private _helping;
96
+ private _isInsertRefString;
97
+ dispose(): void;
98
+ search(param: ISearchFunctionOperationParams): void;
99
+ isSearching(): boolean;
100
+ help(param: IHelpFunctionOperationParams): void;
101
+ isHelping(): boolean;
102
+ navigate(param: INavigateParam): void;
103
+ accept(param: boolean): void;
104
+ acceptFormulaName(param: string): void;
105
+ }
106
+ //# sourceMappingURL=prompt.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt.service.d.ts","sourceRoot":"","sources":["../../../src/services/prompt.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,8BAA8B;IAC3C;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,WAAW,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,4BAA4B;IACzC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,EAAE,aAAa,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC;CAC5C;AAED,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,OAAO,EAAE,UAAU,CAAC,8BAA8B,CAAC,CAAC;IAEpD;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,8BAA8B,GAAG,IAAI,CAAC;IAEpD;;OAEG;IACH,KAAK,EAAE,UAAU,CAAC,4BAA4B,CAAC,CAAC;IAEhD;;OAEG;IAEH,IAAI,CAAC,KAAK,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAEhD;;OAEG;IACH,SAAS,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;IAEtC;;OAEG;IACH,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAE7B;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,kBAAkB,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAEvC;;OAEG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvC,WAAW,IAAI,OAAO,CAAC;IAEvB,SAAS,IAAI,OAAO,CAAC;IAErB,OAAO,IAAI,IAAI,CAAC;CACnB;AAED,eAAO,MAAM,qBAAqB,qEAAsE,CAAC;AAEzG,qBAAa,oBAAqB,YAAW,qBAAqB,EAAE,WAAW;IAC3E,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiD;IAE1E,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+C;IAEtE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAiC;IAE5D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;IAEnD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAyB;IAE7D,QAAQ,CAAC,OAAO,6CAAgC;IAEhD,QAAQ,CAAC,KAAK,2CAA8B;IAE5C,QAAQ,CAAC,SAAS,6BAAkC;IAEpD,QAAQ,CAAC,OAAO,sBAAgC;IAEhD,QAAQ,CAAC,kBAAkB,qBAA2C;IAEtE,OAAO,CAAC,UAAU,CAAkB;IAEpC,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,kBAAkB,CAAkB;IAE5C,OAAO,IAAI,IAAI;IAQf,MAAM,CAAC,KAAK,EAAE,8BAA8B;IAK5C,WAAW;IAIX,IAAI,CAAC,KAAK,EAAE,4BAA4B;IAKxC,SAAS;IAIT,QAAQ,CAAC,KAAK,EAAE,cAAc;IAI9B,MAAM,CAAC,KAAK,EAAE,OAAO;IAIrB,iBAAiB,CAAC,KAAK,EAAE,MAAM;CAGlC"}
@@ -0,0 +1,8 @@
1
+ import type { LocaleService } from '@univerjs/core';
2
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
3
+ export declare function getFunctionTypeValues(enumObj: any, localeService: LocaleService): Array<{
4
+ label: string;
5
+ value: string;
6
+ }>;
7
+ export declare function getFunctionName(item: IFunctionInfo, localeService: LocaleService): string;
8
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/services/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,wBAAgB,qBAAqB,CACjC,OAAO,EAAE,GAAG,EACZ,aAAa,EAAE,aAAa,GAC7B,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAOzC;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,UAahF"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function RenderFormulaPromptContent(): React.JSX.Element;
3
+ //# sourceMappingURL=FormulaPromptContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormulaPromptContainer.d.ts","sourceRoot":"","sources":["../../../src/views/FormulaPromptContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,wBAAgB,0BAA0B,sBAQzC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function MoreFunctions(): React.JSX.Element;
3
+ //# sourceMappingURL=MoreFunctions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MoreFunctions.d.ts","sourceRoot":"","sources":["../../../../src/views/more-functions/MoreFunctions.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAOxC,wBAAgB,aAAa,sBA8C5B"}
@@ -0,0 +1,9 @@
1
+ import type { IFunctionParam } from '@univerjs/engine-formula';
2
+ import React from 'react';
3
+ interface IFunctionHelpProps {
4
+ prefix?: string;
5
+ value?: IFunctionParam[];
6
+ }
7
+ export declare function FunctionHelp(props: IFunctionHelpProps): React.JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=FunctionHelp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionHelp.d.ts","sourceRoot":"","sources":["../../../../../src/views/more-functions/function-help/FunctionHelp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,kBAAkB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;CAC5B;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,qBAerD"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface IParamsProps {
3
+ className?: string;
4
+ title?: string | React.ReactElement;
5
+ value?: string | React.ReactElement;
6
+ }
7
+ export declare function FunctionParams(props: IParamsProps): React.JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=FunctionParams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionParams.d.ts","sourceRoot":"","sources":["../../../../../src/views/more-functions/function-params/FunctionParams.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,YAAY;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;CACvC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,qBAQjD"}
@@ -0,0 +1,8 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ import React from 'react';
3
+ export interface IInputParamsProps {
4
+ functionInfo: IFunctionInfo | null;
5
+ onChange: (params: string[]) => void;
6
+ }
7
+ export declare function InputParams(props: IInputParamsProps): React.JSX.Element | null;
8
+ //# sourceMappingURL=InputParams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputParams.d.ts","sourceRoot":"","sources":["../../../../../src/views/more-functions/input-params/InputParams.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,0BAA0B,CAAC;AAE9E,OAAO,KAAmB,MAAM,OAAO,CAAC;AAMxC,MAAM,WAAW,iBAAiB;IAC9B,YAAY,EAAE,aAAa,GAAG,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACxC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,4BAyDnD"}
@@ -0,0 +1,2 @@
1
+ export declare const MORE_FUNCTIONS_COMPONENT = "formula-ui_MORE_FUNCTIONS_COMPONENT";
2
+ //# sourceMappingURL=interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/views/more-functions/interface.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,wCAAuD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { IFunctionInfo } from '@univerjs/engine-formula';
2
+ import React from 'react';
3
+ export interface ISelectFunctionProps {
4
+ onChange: (functionInfo: IFunctionInfo) => void;
5
+ }
6
+ export declare function SelectFunction(props: ISelectFunctionProps): React.JSX.Element;
7
+ //# sourceMappingURL=SelectFunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectFunction.d.ts","sourceRoot":"","sources":["../../../../../src/views/more-functions/select-function/SelectFunction.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,0BAA0B,CAAC;AAI9E,OAAO,KAA8B,MAAM,OAAO,CAAC;AASnD,MAAM,WAAW,oBAAoB;IACjC,QAAQ,EAAE,CAAC,YAAY,EAAE,aAAa,KAAK,IAAI,CAAC;CACnD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,oBAAoB,qBAkKzD"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function ErrorFunction(): React.JSX.Element | null;
3
+ //# sourceMappingURL=error-function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-function.d.ts","sourceRoot":"","sources":["../../../../../src/views/prompt/error-function/error-function.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,wBAAgB,aAAa,6BAgC5B"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function HelpFunction(): React.JSX.Element;
3
+ //# sourceMappingURL=HelpFunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelpFunction.d.ts","sourceRoot":"","sources":["../../../../../src/views/prompt/help-function/HelpFunction.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,wBAAgB,YAAY,sBA6I3B"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function SearchFunction(): React.JSX.Element;
3
+ //# sourceMappingURL=SearchFunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchFunction.d.ts","sourceRoot":"","sources":["../../../../../src/views/prompt/search-function/SearchFunction.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,wBAAgB,cAAc,sBAsG7B"}
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@univerjs/sheets-formula",
3
+ "version": "0.1.0-alpha.1",
4
+ "author": "DreamNum <developer@univer.ai>",
5
+ "license": "MIT",
6
+ "main": "./lib/cjs/index.js",
7
+ "module": "./lib/esm/index.js",
8
+ "types": "./lib/types/index.d.ts",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "import": "./lib/esm/index.js",
15
+ "require": "./lib/cjs/index.js",
16
+ "types": "./lib/types/index.d.ts"
17
+ },
18
+ "./*": {
19
+ "import": "./lib/esm/*",
20
+ "require": "./lib/cjs/*",
21
+ "types": "./lib/types/index.d.ts"
22
+ },
23
+ "./locale/*": {
24
+ "import": "./lib/esm/locale/*.js",
25
+ "require": "./lib/cjs/locale/*.js",
26
+ "types": "./lib/types/index.d.ts"
27
+ }
28
+ },
29
+ "directories": {
30
+ "lib": "lib"
31
+ },
32
+ "files": [
33
+ "lib"
34
+ ],
35
+ "private": false,
36
+ "dependencies": {
37
+ "@ctrl/tinycolor": "^4.0.2",
38
+ "@univerjs/icons": "^0.1.14",
39
+ "@wendellhu/redi": "^0.12.11",
40
+ "rxjs": "^7.8.1",
41
+ "@univerjs/docs": "0.1.0-alpha.1",
42
+ "@univerjs/engine-render": "0.1.0-alpha.1",
43
+ "@univerjs/engine-formula": "0.1.0-alpha.1",
44
+ "@univerjs/formula": "0.1.0-alpha.1",
45
+ "@univerjs/sheets": "0.1.0-alpha.1",
46
+ "@univerjs/ui": "0.1.0-alpha.1",
47
+ "@univerjs/core": "0.1.0-alpha.1",
48
+ "@univerjs/design": "0.1.0-alpha.1",
49
+ "@univerjs/sheets-ui": "0.1.0-alpha.1"
50
+ },
51
+ "devDependencies": {
52
+ "@types/react": "^18.2.41",
53
+ "@vitest/coverage-istanbul": "^0.34.6",
54
+ "esbuild": "^0.19.8",
55
+ "happy-dom": "^12.10.3",
56
+ "less": "^4.2.0",
57
+ "react": "^18.2.0",
58
+ "ts-node": "^10.9.1",
59
+ "typescript": "^5.3.2",
60
+ "vitest": "^0.34.6"
61
+ },
62
+ "peerDependencies": {
63
+ "react": ">=16.9.0"
64
+ },
65
+ "scripts": {
66
+ "esbuild": "node ./esbuild.config.mjs && tsc -p tsconfig.esbuild.json"
67
+ }
68
+ }