Skip to content

Commit 03fefd5

Browse files
committed
Merge branch 'release/2.7.0'
2 parents 14f7ffc + 7061a47 commit 03fefd5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2740
-2398
lines changed

.typedoc.md.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ module.exports = {
22
...require('./.typedoc.ts'),
33
"theme": "./docs/.vuepress/subtheme",
44
"out": "docs/api",
5-
"name": "HyperFormula API reference",
5+
"name": "API Reference Overview",
66
"categorizeByGroup": true,
7-
"readme": "./docs/api-template.md",
7+
"readme": "./docs/api-ref-readme.md",
88
"plugin": ["typedoc-plugin-markdown"],
99
}

.typedoc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"inputFiles": [
33
"./src/HyperFormula.ts",
4-
"./src/Config.ts",
4+
"./src/ConfigParams.ts",
55
"./src/Emitter.ts",
66
],
77
"exclude": [
@@ -47,7 +47,7 @@ module.exports = {
4747
],
4848
"toc": [
4949
"HyperFormula",
50-
"Config",
50+
"ConfigParams",
5151
"Emitter"
5252
]
5353
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77

88
## [Unreleased]
99

10+
## [2.7.0] - 2024-04-10
11+
12+
### Added
13+
14+
- Added method `getNamedExpressionsFromFormula` to extract named expressions from formulas. [#1365](https://github.com/handsontable/hyperformula/issues/1365)
15+
- Added `context` config option for passing data to custom functions. [#1396](https://github.com/handsontable/hyperformula/issues/1396)
16+
1017
## [2.6.2] - 2024-02-15
1118

1219
### Changed

README.md

Lines changed: 55 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</p>
77

88
<p align="center">
9-
<strong>A headless spreadsheet • A parser and evaluator of Excel formulas</strong>
9+
<strong>An open-source headless spreadsheet for business web apps</strong>
1010
</p>
1111

1212
<p align="center">
@@ -22,90 +22,89 @@
2222

2323
---
2424

25-
HyperFormula is a headless spreadsheet built on top of TypeScript. It is a parser and evaluator of Excel formulas for web applications. You can use it in a browser or as a service, with Node.js as your back-end technology.
26-
- High-speed Excel formula parsing and evaluating
27-
- A library of nearly [400 built-in functions](https://hyperformula.handsontable.com/guide/built-in-functions.html)
28-
- Support for [internationalization](https://hyperformula.handsontable.com/guide/i18n-features.html) with 17 built-in languages
29-
- Support for [custom functions](https://hyperformula.handsontable.com/guide/custom-functions.html)
30-
- Function syntax compatible with [Microsoft Excel](https://hyperformula.handsontable.com/guide/compatibility-with-microsoft-excel.html) and [Google Sheets](https://hyperformula.handsontable.com/guide/compatibility-with-google-sheets.html)
25+
HyperFormula is a headless spreadsheet built in TypeScript, serving as both a parser and evaluator of spreadsheet formulas. It can be integrated into your browser or utilized as a service with Node.js as your back-end technology.
26+
27+
## What HyperFormula can be used for?
28+
HyperFormula doesn't assume any existing user interface, making it a general-purpose library that can be used in various business applications. Here are some examples:
29+
30+
- Custom spreadsheet-like app
31+
- Business logic builder
32+
- Forms and form builder
33+
- Educational app
34+
- Online calculator
35+
36+
## Features
37+
38+
- [Function syntax compatible with Microsoft Excel](https://hyperformula.handsontable.com/guide/compatibility-with-microsoft-excel.html) and [Google Sheets](https://hyperformula.handsontable.com/guide/compatibility-with-google-sheets.html)
39+
- High-speed parsing and evaluation of spreadsheet formulas
40+
- [A library of ~400 built-in functions](https://hyperformula.handsontable.com/guide/built-in-functions.html)
41+
- [Support for custom functions](https://hyperformula.handsontable.com/guide/custom-functions.html)
3142
- [Support for Node.js](https://hyperformula.handsontable.com/guide/server-side-installation.html#install-with-npm-or-yarn)
32-
- Support for [undo/redo](https://hyperformula.handsontable.com/guide/undo-redo.html)
33-
- Support for [CRUD operations](https://hyperformula.handsontable.com/guide/basic-operations.html)
34-
- Support for [clipboard](https://hyperformula.handsontable.com/guide/clipboard-operations.html)
35-
- Support for [named expressions](https://hyperformula.handsontable.com/guide/named-expressions.html)
36-
- Support for [data sorting](https://hyperformula.handsontable.com/guide/sorting-data.html)
37-
- Support for [React](https://hyperformula.handsontable.com/guide/integration-with-react.html), [Angular](https://hyperformula.handsontable.com/guide/integration-with-angular.html), and [Vue.js](https://hyperformula.handsontable.com/guide/integration-with-vue.html)
38-
- Open-source license
39-
- Actively maintained by the team that stands behind [Handsontable - JavaScript Data Grid](https://handsontable.com/)
43+
- [Support for undo/redo](https://hyperformula.handsontable.com/guide/undo-redo.html)
44+
- [Support for CRUD operations](https://hyperformula.handsontable.com/guide/basic-operations.html)
45+
- [Support for clipboard](https://hyperformula.handsontable.com/guide/clipboard-operations.html)
46+
- [Support for named expressions](https://hyperformula.handsontable.com/guide/named-expressions.html)
47+
- [Support for data sorting](https://hyperformula.handsontable.com/guide/sorting-data.html)
48+
- [Support for formula localization with 17 built-in languages](https://hyperformula.handsontable.com/guide/i18n-features.html)
49+
- GPLv3 license
50+
- Maintained by the team that stands behind the [Handsontable](https://handsontable.com/) data grid
4051

4152
## Documentation
4253

43-
- [Explainer video](https://www.youtube.com/watch?v=JJXUmACTDdk)
44-
- [Installation](https://hyperformula.handsontable.com/guide/client-side-installation.html)
54+
- [Client-side installation](https://hyperformula.handsontable.com/guide/client-side-installation.html)
55+
- [Server-side installation](https://hyperformula.handsontable.com/guide/server-side-installation.html)
4556
- [Basic usage](https://hyperformula.handsontable.com/guide/basic-usage.html)
46-
- [Demo with React](https://hyperformula.handsontable.com/guide/integration-with-react.html)
47-
- [Demo with Angular](https://hyperformula.handsontable.com/guide/integration-with-angular.html)
48-
- [Demo with Vue.js](https://hyperformula.handsontable.com/guide/integration-with-vue.html)
49-
- [API Reference](https://hyperformula.handsontable.com/api/)
5057
- [Configuration options](https://hyperformula.handsontable.com/guide/configuration-options.html)
5158
- [List of built-in functions](https://hyperformula.handsontable.com/guide/built-in-functions.html)
52-
- [Key concepts](https://hyperformula.handsontable.com/guide/key-concepts.html)
59+
- [API Reference](https://hyperformula.handsontable.com/api/)
60+
61+
## Integrations
62+
63+
- [Integration with React](https://hyperformula.handsontable.com/guide/integration-with-react.html#demo)
64+
- [Integration with Angular](https://hyperformula.handsontable.com/guide/integration-with-angular.html#demo)
65+
- [Integration with Vue](https://hyperformula.handsontable.com/guide/integration-with-vue.html#demo)
66+
- [Integration with Svelte](https://hyperformula.handsontable.com/guide/integration-with-svelte.html#demo)
5367

5468
## Installation and usage
5569

56-
Install the library from [npm](https://www.npmjs.com/package/hyperformula):
70+
Install the library from [npm](https://www.npmjs.com/package/hyperformula) like so:
5771

5872
```bash
5973
npm install hyperformula
6074
```
6175

62-
Once installed, you can use it like this:
76+
Once installed, you can use it to develop applications tailored to your specific business needs. Here, we've used it to craft a form that calculates mortgage payments using the `PMT` formula.
6377

6478
```js
6579
import { HyperFormula } from 'hyperformula';
6680

67-
// define the options
68-
const options = {
69-
licenseKey: 'gpl-v3',
70-
};
81+
// Create a HyperFormula instance
82+
const hf = HyperFormula.buildEmpty({ licenseKey: 'gpl-v3' });
7183

72-
// define the data
73-
const data = [['10', '20', '30', '=SUM(A1:C1)']];
84+
// Add an empty sheet
85+
const sheetName = hf.addSheet('Mortgage Calculator');
86+
const sheetId = hf.getSheetId(sheetName);
7487

75-
// build an instance with defined options and data
76-
const hfInstance = HyperFormula.buildFromArray(data, options);
88+
// Enter the mortgage parameters
89+
hf.addNamedExpression('AnnualInterestRate', '8%');
90+
hf.addNamedExpression('NumberOfMonths', 360);
91+
hf.addNamedExpression('LoanAmount', 800000);
7792

78-
// call getCellValue to get the calculation results
79-
const mySum = hfInstance.getCellValue({ col: 3, row: 0, sheet: 0 });
93+
// Use the PMT function to calculate the monthly payment
94+
hf.setCellContents({ sheet: sheetId, row: 0, col: 0 }, [['Monthly Payment', '=PMT(AnnualInterestRate/12, NumberOfMonths, -LoanAmount)']]);
8095

81-
// print the result in the browser's console
82-
console.log(mySum);
96+
// Display the result
97+
console.log(`${hf.getCellValue({ sheet: sheetId, row: 0, col: 0 })}: ${hf.getCellValue({ sheet: sheetId, row: 0, col: 1 })}`);
8398
```
8499

85-
[Run this code in CodeSandbox](https://codesandbox.io/s/github/handsontable/hyperformula-demos/tree/develop/basic-usage)
86-
87-
## What can it be used for?
88-
89-
HyperFormula doesn't assume any existing user interface, making it a great general-purpose library that can be used in various business applications. Here are some examples:
90-
91-
- Spreadsheets
92-
- Business logic builders
93-
- Forms and form builders
94-
- Computation notebooks
95-
- Smart documents
96-
- Educational apps
97-
- Online calculators
100+
[Run this code in CodeSandbox](https://codesandbox.io/p/sandbox/github/handsontable/hyperformula-demos/tree/2.7.x/mortgage-calculator)
98101

99102
## Contributing
100103

101-
Help us build the fastest and most flexible calculation engine for
102-
business web apps. Please read the [Contributing Guide](https://hyperformula.handsontable.com/guide/contributing.html) before making a pull request.
104+
Contributions are welcome, but before you make them, please read the [Contributing Guide](https://hyperformula.handsontable.com/guide/contributing.html) and accept the [Contributor License Agreement](https://goo.gl/forms/yuutGuN0RjsikVpM2).
103105

104106
## License
105107

106-
HyperFormula is available under the open source license ([GPLv3](https://github.com/handsontable/hyperformula/blob/master/LICENSE.txt)).
107-
108-
To buy a commercial license, please write to us at sales@handsontable.com
108+
HyperFormula is available under two different licenses: GPLv3 and commercial. The commercial license can be purchased by [contacting our team](https://handsontable.com/get-a-quote) at Handsontable.
109109

110-
## Copyrights
111-
© 2023 [Handsoncode](https://handsontable.com)
110+
Copyright (c) Handsoncode

docs/.vuepress/config.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ module.exports = {
7171
$page.version = HyperFormula.version
7272
// inject current HF buildDate as {{ $page.buildDate }} variable
7373
$page.buildDate = HyperFormula.buildDate
74+
// inject current HF buildDate URI encoded as {{ $page.buildDateURIEncoded }} variable
75+
$page.buildDateURIEncoded = encodeURIComponent(HyperFormula.buildDate)
7476
// inject current HF releaseDate as {{ $page.releaseDate }} variable
7577
$page.releaseDate = HyperFormula.releaseDate
7678
// inject current HF function count as {{ $page.functionsCount }} variable
@@ -138,21 +140,21 @@ module.exports = {
138140
sidebar: {
139141
'/api/': [
140142
{
141-
title: 'Introduction',
143+
title: 'API Reference Overview',
142144
path: '/api/',
143145
},
144146
{
145-
title: 'HyperFormula Class',
147+
title: 'HyperFormula',
146148
path: '/api/classes/hyperformula',
147149
collapsable: true,
148150
},
149151
{
150-
title: 'Configuration Options',
152+
title: 'ConfigParams ',
151153
path: '/api/interfaces/configparams',
152154
collapsable: true,
153155
},
154156
{
155-
title: 'Event Types',
157+
title: 'Listeners',
156158
path: '/api/interfaces/listeners',
157159
alias: '/api/events',
158160
collapsable: true,

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ docs # All documentation files
5252
│   └── highlight.js # Code highlight configuration
5353
├── api # The API reference files, generated automatically from JsDoc. Do not edit!
5454
├── guide # The docs source files: Markdown content
55-
├── api-template.md # The API reference welcome page
55+
├── api-ref-readme.md # The API reference welcome page
5656
├── index.md # The main docs portal welcome page
5757
└── README.md # The file you're looking at right now!
5858
```

docs/api-template.md renamed to docs/api-ref-readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const sheetData = [
2222
const hfInstance = HyperFormula.buildFromArray(sheetData, options);
2323
```
2424

25-
#### Configuration Options
25+
#### ConfigParams
2626
This section contains information about options that allow you to configure the instance of HyperFormula.
2727

2828
An example set of options:
@@ -34,7 +34,7 @@ const options = {
3434
};
3535
```
3636

37-
#### Event Types
37+
#### Listeners
3838
In this section, you can find information about all events you can subscribe to.
3939

4040
For example, subscribing to `sheetAdded` event:

docs/guide/advanced-usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ console.log(winningTeam)
122122
## Demo
123123

124124
<iframe
125-
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.6.x/advanced-usage?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
126-
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
125+
:src="`https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.7.x/advanced-usage?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview&v=${$page.buildDateURIEncoded}`"
126+
style="width:100%; height:1070px; border:0; border-radius: 4px; overflow:hidden;"
127127
title="handsontable/hyperformula-demos: advanced-usage"
128128
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
129129
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts">

docs/guide/basic-operations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ This demo presents several basic operations integrated with a
407407
sample UI.
408408

409409
<iframe
410-
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.6.x/basic-operations?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
411-
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
410+
:src="`https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.7.x/basic-operations?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview&v=${$page.buildDateURIEncoded}`"
411+
style="width:100%; height:1070px; border:0; border-radius: 4px; overflow:hidden;"
412412
title="handsontable/hyperformula-demos: basic-operations"
413413
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
414414
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts">

docs/guide/basic-usage.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ works. It's time to move on to a more
6565
## Demo
6666

6767
<iframe
68-
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.6.x/basic-usage?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
69-
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
70-
title="handsontable/hyperformula-demos: basic-usage"
71-
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
72-
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
73-
></iframe>
68+
:src="`https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.7.x/basic-usage?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview&v=${$page.buildDateURIEncoded}`"
69+
style="width:100%; height:1070px; border:0; border-radius: 4px; overflow:hidden;"
70+
title="handsontable/hyperformula-demos: basic-usage"
71+
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
72+
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts">
73+
</iframe>

docs/guide/batch-operations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ The [paste](../api/classes/hyperformula.md#paste) method also can't be called wh
124124
## Demo
125125

126126
<iframe
127-
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.6.x/batch-operations?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
128-
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
127+
:src="`https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.7.x/batch-operations?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview&v=${$page.buildDateURIEncoded}`"
128+
style="width:100%; height:1070px; border:0; border-radius: 4px; overflow:hidden;"
129129
title="handsontable/hyperformula-demos: batch-operations"
130130
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
131131
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts">

docs/guide/clipboard-operations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ Depending on what was cut, the data is stored as:
113113
## Demo
114114

115115
<iframe
116-
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.6.x/clipboard-operations?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
117-
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
116+
:src="`https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.7.x/clipboard-operations?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview&v=${$page.buildDateURIEncoded}`"
117+
style="width:100%; height:1070px; border:0; border-radius: 4px; overflow:hidden;"
118118
title="handsontable/hyperformula-demos: clipboard-operations"
119119
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
120120
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts">

docs/guide/contact.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We typically reply within a few hours during our working hours:
1010

1111
Write to us at [sales@handsontable.com](mailto:sales@handsontable.com)
1212
or submit your inquiry through the
13-
[contact form](https://handsontable.com/contact?category=request_for_quotation).
13+
[contact form](https://handsontable.com/get-a-quote).
1414

1515
## Billing address
1616

docs/guide/custom-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ This demo contains the implementation of both the
363363
[`DOUBLE_RANGE`](#advanced-custom-function-example) custom functions.
364364
365365
<iframe
366-
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.6.x/custom-functions?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
367-
style="width:100%; height:300px; border:0; border-radius: 4px; overflow:hidden;"
366+
:src="`https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.7.x/custom-functions?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview&v=${$page.buildDateURIEncoded}`"
367+
style="width:100%; height:1070px; border:0; border-radius: 4px; overflow:hidden;"
368368
title="handsontable/hyperformula-demos: custom-functions"
369369
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
370370
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts">

docs/guide/date-and-time-handling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ And now, HyperFormula recognizes these values as valid dates and can operate on
9999
## Demo
100100

101101
<iframe
102-
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.6.x/date-time?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
103-
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
102+
:src="`https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.7.x/date-time?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview&v=${$page.buildDateURIEncoded}`"
103+
style="width:100%; height:1070px; border:0; border-radius: 4px; overflow:hidden;"
104104
title="handsontable/hyperformula-demos: date-time"
105105
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
106106
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts">

0 commit comments

Comments
 (0)