diff --git a/.eslintrc.js b/.eslintrc.js index add5685d63..fe0ae7e788 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -32,6 +32,7 @@ module.exports = { '@typescript-eslint/brace-style': 'error', // wtf '@typescript-eslint/no-unnecessary-boolean-literal-compare': ['error'], '@typescript-eslint/no-extra-non-null-assertion': ['error'], + '@typescript-eslint/no-throw-literal': ['error'], '@typescript-eslint/array-type': ['error'], '@typescript-eslint/space-before-function-paren': ["error", { "anonymous": "never", diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 8e34e8dd85..98f8337238 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -20,10 +20,11 @@ ### Checklist: +- [ ] I have reviewed the guidelines about [Contributing to HyperFormula](https://hyperformula.handsontable.com/guide/contributing.html) and I confirm that my code follows the code style of this project. +- [ ] I have signed the [Contributor License Agreement](https://goo.gl/forms/yuutGuN0RjsikVpM2). - [ ] My change is compliant with the [OpenDocument](https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html) standard. - [ ] My change is compatible with Microsoft Excel. - [ ] My change is compatible with Google Sheets. -- [ ] My code follows the code style of this project. - [ ] I described my changes in the [CHANGELOG.md](https://github.com/handsontable/hyperformula/blob/master/CHANGELOG.md) file. - [ ] My changes require a documentation update. - [ ] My changes require a migration guide. diff --git a/CHANGELOG.md b/CHANGELOG.md index cb1c89b1d9..176ae5ef51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,24 @@ and this project adheres to ## [Unreleased] +## [2.4.0] - 2023-04-24 + +### Added + +- Exported the `CellError` class as a public API. + [#1232](https://github.com/handsontable/hyperformula/issues/1232) +- Exported the `SimpleRangeValue` class as a public API. + [#1178](https://github.com/handsontable/hyperformula/issues/1178) + +### Fixed + +- Fixed an `EmptyCellVertex` data integrity issue between the `AddressMapping` and `DependencyGraph` objects. + [#1188](https://github.com/handsontable/hyperformula/issues/1188) +- Fixed a build issue with M1- and M2-chip MacBooks. + [#1166](https://github.com/handsontable/hyperformula/issues/1166) +- Fixed an issue where the order of items returned by `removeColumns()` depended on the address mapping policy. + [#1205](https://github.com/handsontable/hyperformula/issues/1205) + ## [2.3.1] - 2023-03-03 ### Fixed diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 130e2600c8..8c5359f9c2 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -21,7 +21,13 @@ module.exports = { })(window,document,'script','dataLayer','GTM-N59TZXR'); `], // Google Console - ['meta', { name: 'google-site-verification', content: 'MZpSOa8SNvFLRRGwUQpYVZ78kIHQoPVdVbafHhJ_d4Q' }] + ['meta', { name: 'google-site-verification', content: 'MZpSOa8SNvFLRRGwUQpYVZ78kIHQoPVdVbafHhJ_d4Q' }], + // Favicon + ['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/favicon/apple-touch-icon.png' }], + ['link', { rel: 'icon', sizes: '32x32', type: 'image/png', href: '/favicon/favicon-32x32.png' }], + ['link', { rel: 'icon', sizes: '16x16', type: 'image/png', href: '/favicon/favicon-16x16.png' }], + ['link', { rel: 'manifest', href: '/favicon/site.webmanifest' }], + ['link', { rel: 'mask-icon', color: '#ffffff', href: '/favicon/safari-pinned-tab.svg' }], ], base: '/', plugins: [ diff --git a/docs/.vuepress/public/favicon/android-chrome-192x192.png b/docs/.vuepress/public/favicon/android-chrome-192x192.png new file mode 100644 index 0000000000..4e4f330413 Binary files /dev/null and b/docs/.vuepress/public/favicon/android-chrome-192x192.png differ diff --git a/docs/.vuepress/public/favicon/android-chrome-512x512.png b/docs/.vuepress/public/favicon/android-chrome-512x512.png new file mode 100644 index 0000000000..0611d347c7 Binary files /dev/null and b/docs/.vuepress/public/favicon/android-chrome-512x512.png differ diff --git a/docs/.vuepress/public/favicon/apple-touch-icon.png b/docs/.vuepress/public/favicon/apple-touch-icon.png new file mode 100644 index 0000000000..3d7eeb568e Binary files /dev/null and b/docs/.vuepress/public/favicon/apple-touch-icon.png differ diff --git a/docs/.vuepress/public/favicon/browserconfig.xml b/docs/.vuepress/public/favicon/browserconfig.xml new file mode 100644 index 0000000000..d416bc536f --- /dev/null +++ b/docs/.vuepress/public/favicon/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #ffffff + + + diff --git a/docs/.vuepress/public/favicon/favicon-16x16.png b/docs/.vuepress/public/favicon/favicon-16x16.png new file mode 100644 index 0000000000..d275a92eab Binary files /dev/null and b/docs/.vuepress/public/favicon/favicon-16x16.png differ diff --git a/docs/.vuepress/public/favicon/favicon-32x32.png b/docs/.vuepress/public/favicon/favicon-32x32.png new file mode 100644 index 0000000000..4b43119cda Binary files /dev/null and b/docs/.vuepress/public/favicon/favicon-32x32.png differ diff --git a/docs/.vuepress/public/favicon/favicon.ico b/docs/.vuepress/public/favicon/favicon.ico new file mode 100644 index 0000000000..2f6af6ef13 Binary files /dev/null and b/docs/.vuepress/public/favicon/favicon.ico differ diff --git a/docs/.vuepress/public/favicon/mstile-150x150.png b/docs/.vuepress/public/favicon/mstile-150x150.png new file mode 100644 index 0000000000..8ba1048d32 Binary files /dev/null and b/docs/.vuepress/public/favicon/mstile-150x150.png differ diff --git a/docs/.vuepress/public/favicon/safari-pinned-tab.svg b/docs/.vuepress/public/favicon/safari-pinned-tab.svg new file mode 100644 index 0000000000..de403122f2 --- /dev/null +++ b/docs/.vuepress/public/favicon/safari-pinned-tab.svg @@ -0,0 +1,18 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + diff --git a/docs/.vuepress/public/favicon/site.webmanifest b/docs/.vuepress/public/favicon/site.webmanifest new file mode 100644 index 0000000000..c2700e2936 --- /dev/null +++ b/docs/.vuepress/public/favicon/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "HyperFormula", + "short_name": "HyperFormula", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/docs/guide/advanced-usage.md b/docs/guide/advanced-usage.md index aafbf39b53..095940b8aa 100644 --- a/docs/guide/advanced-usage.md +++ b/docs/guide/advanced-usage.md @@ -96,7 +96,7 @@ After setting everything up, you can add formulas: // add a sheet named 'Formulas' const sheetNameC = hfInstance.addSheet('Formulas'); // get the new sheet ID for further API calls -const sheetIdC = hfInstance.getSheetId(sheetNameA); +const sheetIdC = hfInstance.getSheetId(sheetNameC); // add formulas to that sheet hfInstance.setSheetContent(sheetIdC, formulas); ``` @@ -122,7 +122,7 @@ console.log(winningTeam) ## Demo - -

+::: tip +You can modify the built-in functions or create your own, by adding a [custom function](custom-functions). +::: ## List of available functions diff --git a/docs/guide/clipboard-operations.md b/docs/guide/clipboard-operations.md index 6bc504e16c..86a4a8b8e5 100644 --- a/docs/guide/clipboard-operations.md +++ b/docs/guide/clipboard-operations.md @@ -112,4 +112,4 @@ Depending on what was cut, the data is stored as: ## Demo - + diff --git a/docs/guide/custom-functions.md b/docs/guide/custom-functions.md index 1c7b9dd60b..b5e4fccb71 100644 --- a/docs/guide/custom-functions.md +++ b/docs/guide/custom-functions.md @@ -69,8 +69,12 @@ MyCustomPlugin.implementedFunctions = { ### 3. Add your function's names -In a separate object, -[define your function's names in every language you want to support](#function-name-translations). +In a separate object, define your function's names in every +[language](#function-name-translations) that you want to support. + +::: tip +Even if you support just a single language, you still need to define a translation for it. +::: ```js export const MyCustomPluginTranslations = { @@ -127,8 +131,8 @@ export class MyCustomPlugin extends FunctionPlugin { ### 5. Register your function plugin -Register your function plugin (and its translations) so that HyperFormula can -recognize it. +Register your function plugin and its translations so that HyperFormula can +recognize it. You need to do this **before** you create your HyperFormula instance. Use the [`registerFunctionPlugin()`](../api/classes/hyperformula.md#registerfunctionplugin) @@ -138,21 +142,18 @@ method: HyperFormula.registerFunctionPlugin(MyCustomPlugin, MyCustomPluginTranslations); ``` -### 6. Use your custom function inside a formula +### 6. Use your custom function in a formula -Now, you can use your GREET function inside a formula: +Now, you're ready to use your GREET function in a formula. ```js -// prepare spreadsheet data -const data = [['Anthony', '=GREET(A1)']]; - // build a HyperFormula instance where you can use your function directly -const hfInstance = HyperFormula.buildFromArray(data); +const hfInstance = HyperFormula.buildFromArray([['Anthony', '=GREET(A1)']]); -// read the value of cell A1 +// read the value of cell B1 const result = hfInstance.getCellValue({ sheet: 0, col: 1, row: 0 }); -// open the browser's console to see the results +// cell B1 should evaluate to 'Anthony' console.log(result); ``` @@ -357,7 +358,7 @@ This demo contains the implementation of both the [`DOUBLE_RANGE`](#advanced-custom-function-example) custom functions.