@univerjs/sheets-formula 0.21.0 → 0.21.1-insiders.20260509-bf98cad

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.
package/README.md CHANGED
@@ -1,39 +1,50 @@
1
1
  # @univerjs/sheets-formula
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@univerjs/sheets-formula?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-formula)
4
+ [![license](https://img.shields.io/npm/l/@univerjs/sheets-formula?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-formula)
5
+ [![downloads](https://img.shields.io/npm/dm/@univerjs/sheets-formula?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-formula)
6
+
7
+ `@univerjs/sheets-formula` connects the formula engine to Univer Sheets, including formula data services, dependency handling, and sheet-aware calculation.
8
+
3
9
  ## Package Overview
4
10
 
5
- | Package Name | UMD Namespace | Version | License | Downloads | Contains CSS | Contains i18n locales |
6
- | --- | --- | --- | --- | --- | :---: | :---: |
7
- | `@univerjs/sheets-formula` | `UniverSheetsFormula` | [![][npm-version-shield]][npm-version-link] | ![][npm-license-shield] | ![][npm-downloads-shield] | ⭕️ | ⭕️ |
11
+ | Package | UMD global | CSS | Locales | Facade entry |
12
+ | --- | --- | :---: | :---: | :---: |
13
+ | `@univerjs/sheets-formula` | `UniverSheetsFormula` | No | Yes | Yes |
8
14
 
9
- ## Introduction
15
+ ## Installation
10
16
 
11
- `@univerjs/sheets-formula` provides the ability to edit formulas in spreadsheets, including features such as auto-completion, formula suggestions, drop-down filling for formulas, and copy-paste functionality.
17
+ ```sh
18
+ pnpm add @univerjs/sheets-formula
19
+ # or
20
+ npm install @univerjs/sheets-formula
21
+ ```
12
22
 
13
- > [!NOTE]
14
- > Formula calculation is one of the core functionalities of spreadsheets, and formula calculation scheduling is done in `@univerjs/sheets`.
23
+ Keep all `@univerjs/*` packages on the same version.
15
24
 
16
25
  ## Usage
17
26
 
18
- ### Installation
27
+ ```ts
28
+ import EnUS from '@univerjs/sheets-formula/locale/en-US';
29
+ import { UniverSheetsFormulaPlugin } from '@univerjs/sheets-formula';
19
30
 
20
- ```shell
21
- # Using npm
22
- npm install @univerjs/sheets-formula
31
+ univer.registerPlugin(UniverSheetsFormulaPlugin);
23
32
 
24
- # Using pnpm
25
- pnpm add @univerjs/sheets-formula
33
+ // Merge EnUS into your Univer locale map when this package contributes UI text.
26
34
  ```
27
35
 
28
- ### How To Customize Formulas
36
+ Exported plugin classes:
37
+
38
+ - `UniverSheetsFormulaPlugin`
39
+ - `UniverRemoteSheetsFormulaPlugin`
40
+
41
+ ## Integration Notes
42
+
43
+ Register this package with `@univerjs/engine-formula` and `@univerjs/sheets` before adding formula UI packages.
29
44
 
30
- If the officially provided formula does not meet your needs, you can expand the formula yourself. Depending on different needs, we provide multiple ways to support registering one or more custom formulas.
45
+ ## Resources
31
46
 
32
- - [Register formula using Facade API](https://reference.univer.ai/zh-CN/classes/FFormula#registerfunction)
33
- - [Custom Formula](https://docs.univer.ai/guides/recipes/tutorials/custom-formula)
47
+ - [Documentation](https://docs.univer.ai)
48
+ - [NPM package](https://npmjs.com/package/@univerjs/sheets-formula)
49
+ - [GitHub repository](https://github.com/dream-num/univer)
34
50
 
35
- <!-- Links -->
36
- [npm-version-shield]: https://img.shields.io/npm/v/@univerjs/sheets-formula?style=flat-square
37
- [npm-version-link]: https://npmjs.com/package/@univerjs/sheets-formula
38
- [npm-license-shield]: https://img.shields.io/npm/l/@univerjs/sheets-formula?style=flat-square
39
- [npm-downloads-shield]: https://img.shields.io/npm/dm/@univerjs/sheets-formula?style=flat-square