Skip to content

Commit 0adb3bb

Browse files
committed
Merge branch 'release/2.3.0'
2 parents ec30263 + 3157a09 commit 0adb3bb

File tree

102 files changed

+1874
-1461
lines changed

Some content is hidden

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

102 files changed

+1874
-1461
lines changed

.github/workflows/codeql.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "CodeQL"
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize # the head branch is updated from the base branch, new commits are pushed to the head branch, or the base branch is changed
9+
push:
10+
branches:
11+
- 'master'
12+
- 'develop'
13+
- 'release/**'
14+
schedule:
15+
- cron: "39 19 * * 5"
16+
17+
jobs:
18+
analyze:
19+
name: Analyze
20+
runs-on: ubuntu-latest
21+
permissions:
22+
actions: read
23+
contents: read
24+
security-events: write
25+
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
language: [ javascript ]
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@v2
37+
with:
38+
languages: ${{ matrix.language }}
39+
queries: +security-and-quality
40+
41+
- name: Autobuild
42+
uses: github/codeql-action/autobuild@v2
43+
44+
- name: Perform CodeQL Analysis
45+
uses: github/codeql-action/analyze@v2
46+
with:
47+
category: "/language:${{ matrix.language }}"

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [2.3.0] - 2022-12-22
10+
11+
### Added
12+
- Exported the `ArraySize` class as a public API. [#843](https://github.com/handsontable/hyperformula/issues/843)
13+
- Renamed an internal interface from `ArgumentTypes` to `FunctionArgumentType`, and exported it as a public API. [#1108](https://github.com/handsontable/hyperformula/pull/1108)
14+
- Exported `ImplementedFunctions` and `FunctionMetadata` as public APIs. [#1108](https://github.com/handsontable/hyperformula/pull/1108)
15+
916
## [2.2.0] - 2022-11-17
1017

1118
### Added

docs/.vuepress/config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const highlight = require('./highlight');
22
const regexPlugin = require('markdown-it-regex').default;
3+
const footnotePlugin = require('markdown-it-footnote');
34
const searchBoxPlugin = require('./plugins/search-box');
45
const HyperFormula = require('../../dist/hyperformula.full');
56
const fs = require('fs');
@@ -74,6 +75,7 @@ module.exports = {
7475
regex: /(process\.env\.HT_RELEASE_DATE as string)/,
7576
replace: () => `'${HyperFormula.releaseDate}'`
7677
})
78+
md.use(footnotePlugin)
7779
}
7880
},
7981
// TODO: It doesn't work. It's seems that this option is bugged. Documentation says that this option is configurable,

docs/guide/advanced-usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ console.log(winningTeam)
122122
## Demo
123123

124124
<iframe
125-
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.2.x/advanced-usage?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
125+
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.3.x/advanced-usage?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
126126
style="width:100%; height:500px; 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"

docs/guide/arrays.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ISEVEN(A2:A5*10)
7272

7373
Thanks to HyperFormula's built-in array features, you can:
7474
* [Operate on arrays](#operating-on-arrays) just like on [scalars](#about-arrays)
75-
* [Pass arrays to functions](#passing-arrays-to-scalar-functions) that accept [scalars](#about-arrays)
75+
* [Pass arrays to functions](#passing-arrays-to-scalar-functions-vectorization) that accept [scalars](#about-arrays)
7676
* [Broadcast](#broadcasting) smaller input arrays across larger output areas
7777

7878
You can also:
@@ -83,7 +83,7 @@ You can also:
8383

8484
You can operate on arrays just like on single values.
8585

86-
When the [array arithmetic mode](#enabling-the-array-arithmetic-mode) is enabled, each output array value is the result of your operation on the corresponding input array value.
86+
When the [array arithmetic mode](#array-arithmetic-mode) is enabled, each output array value is the result of your operation on the corresponding input array value.
8787

8888
```
8989
=ARRAYFORMULA(A2:A5*B2:B5)
@@ -95,22 +95,23 @@ When the [array arithmetic mode](#enabling-the-array-arithmetic-mode) is enabled
9595
// =A5*B5
9696
```
9797

98-
### Passing arrays to scalar functions
99-
You can pass arrays to functions that would normally accept [scalars](#about-arrays) (thanks to HyperFormula's **vectorization** feature).
98+
### Passing arrays to scalar functions (vectorization)
10099

101-
When the [array arithmetic mode](#enabling-the-array-arithmetic-mode) is enabled, and you pass an array to a [scalar](#about-arrays) function, that function produces an array on the output as well.
100+
When the [array arithmetic mode](#array-arithmetic-mode) is enabled, HyperFormula automatically _vectorizes_ most functions.
101+
102+
As a consequence of that, you can pass arrays to functions that would normally accept [scalars](#about-arrays). The result would also be an array.
102103

103104
```
104-
=ARRAYFORMULA(ISEVEN(A2:A5*10))
105+
=ARRAYFORMULA(ISEVEN(A2:A5))
105106
106107
// calculates:
107-
// =ISEVEN(A2*10)
108-
// =ISEVEN(A3*10)
109-
// =ISEVEN(A4*10)
110-
// =ISEVEN(A5*10)
108+
// =ISEVEN(A2)
109+
// =ISEVEN(A3)
110+
// =ISEVEN(A4)
111+
// =ISEVEN(A5)
111112
```
112113

113-
#### Broadcasting
114+
### Broadcasting
114115

115116
If an input array has a dimension of `1`, it's automatically repeated ("broadcast") on that dimension to match the size of the output.
116117

@@ -126,15 +127,15 @@ If an input array has a dimension of `1`, it's automatically repeated ("broadcas
126127

127128
### Filtering an array
128129

129-
When the [array arithmetic mode](#enabling-the-array-arithmetic-mode) is enabled, you can filter an array, based on boolean arrays, using the `FILTER` function:
130+
When the [array arithmetic mode](#array-arithmetic-mode) is enabled, you can filter an array, based on boolean arrays, using the `FILTER` function:
130131

131132
| Syntax | Example |
132133
|:-----------------------------------------------------|:------------------------------------------------|
133134
| `FILTER(your_array, BoolArray1[, BoolArray2[, ...]]` | `=ARRAYFORMULA(FILTER(A2:A5*10), {1, 0, 0, 1})` |
134135

135136
### Constraining an array's size
136137

137-
When the [array arithmetic mode](#enabling-the-array-arithmetic-mode) is enabled, you can constrain the size of the output array, using the `ARRAY_CONSTRAIN` function:
138+
When the [array arithmetic mode](#array-arithmetic-mode) is enabled, you can constrain the size of the output array, using the `ARRAY_CONSTRAIN` function:
138139

139140
| Syntax | Example |
140141
|:-------------------------------------------|:----------------------------------------------|
@@ -148,17 +149,17 @@ If your specified output array size is larger or equal to the input array size,
148149

149150
### With the array arithmetic mode enabled
150151

151-
When the [array arithmetic mode](#enabling-the-array-arithmetic-mode) is enabled, and you pass an array to a [scalar](#about-arrays) function, the following rules apply:
152+
When the [array arithmetic mode](#array-arithmetic-mode) is enabled, and you pass an array to a [scalar](#about-arrays) function, the following rules apply:
152153
* Array dimensions need to be consistent (e.g. every row needs to be of the same length).
153154
* If an input array value is missing (due to a difference in dimensions), the corresponding output array value is `#N/A`.
154155
* If a cell evaluates to an array, the array values are spilled into neighboring cells (unless the neighboring cells are already filled).<br>This behavior doesn't apply to ranges, which return the `#VALUE!` error in this case.
155156
* If one of input array dimensions is `1` (`1`x`n` or `n`x`1`), the array is repeated, to match the output array dimensions.
156157

157158
### With the array arithmetic mode disabled
158159

159-
When the [array arithmetic mode](#enabling-the-array-arithmetic-mode) is disabled, and you pass an array to a [scalar](#about-arrays) function, the array is reduced to 1 element (usually the array's top-left value).
160+
When the [array arithmetic mode](#array-arithmetic-mode) is disabled, and you pass an array to a [scalar](#about-arrays) function, the array is reduced to 1 element (usually the array's top-left value).
160161

161-
When the [array arithmetic mode](#enabling-the-array-arithmetic-mode) is disabled, and you operate on a range of width/height equal to `1`, the behavior depends on your array formula's location:
162+
When the [array arithmetic mode](#array-arithmetic-mode) is disabled, and you operate on a range of width/height equal to `1`, the behavior depends on your array formula's location:
162163

163164
| Your array formula's location | Behavior |
164165
|:--------------------------------------------------|:---------------------------------------|

docs/guide/basic-operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ This demo presents several basic operations integrated with a
389389
sample UI.
390390

391391
<iframe
392-
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.2.x/basic-operations?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
392+
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.3.x/basic-operations?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
393393
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
394394
title="handsontable/hyperformula-demos: basic-operations"
395395
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"

docs/guide/basic-usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ 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.2.x/basic-usage?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
68+
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.3.x/basic-usage?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
6969
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
7070
title="handsontable/hyperformula-demos: basic-usage"
7171
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"

docs/guide/batch-operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ can be sent as a single one.
118118
## Demo
119119

120120
<iframe
121-
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.2.x/batch-operations?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
121+
src="https://codesandbox.io/embed/github/handsontable/hyperformula-demos/tree/2.3.x/batch-operations?autoresize=1&fontsize=11&hidenavigation=1&theme=light&view=preview"
122122
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
123123
title="handsontable/hyperformula-demos: batch-operations"
124124
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"

0 commit comments

Comments
 (0)