editor.js/src/components
Ilya Maroz 75379c66a9
deps(TypeScript) - upgrade to v5, upgrade ts-loader, fix types error, fix pasteConfig getter wrapper (#2322)
* deps: upgrade typescript to v5, upgrade ts-loader to support newest TS

* Fix (??) type of `pasteConfig`

TypeScript 4.9 found something is wrong with this code, but it's unclear (to me) which line is wrong. This PR is a guess, do with it what you will.

In paste.ts there's a check to see if `pasteConfig === false`:
https://github.com/codex-team/editor.js/blob/next/src/components/modules/paste.ts#L287

However, this getter never returns false because if the LHS of the `||` is `false`, `{ }` is returned instead.

It seems like this meant to be `??` instead so that if `this.constructable[InternalBlockToolSettings.PasteConfig]` was `undefined` (missing), then `{}` would be returned instead. But maybe you meant `false` here - I don't know.

* feat: create alias for PasteConfig, fix lint

* fix: problems with types

* test: add case for disabling preventing default behavior of paste event handler, add cases for pasteConfig getter in BlockTool wrapper

* chore: upgrade CHANGELOG.md

* fix: interface naming convention

* chore: apply CHANGELOG.md suggestion

* refactor: create custom Editor instance inside test case

* fix: remove editor instance destroy after PR feedback

---------

Co-authored-by: Ryan Cavanaugh <RyanCavanaugh@users.noreply.github.com>
2023-04-02 16:52:42 +01:00
..
block fix(block): remember plugin's content element instead of dom search (#2311) 2023-03-20 23:28:17 +03:00
block-tunes fix(move-up-tune): scroll up offset for blocks above viewport (#2298) 2023-03-14 00:09:04 +03:00
errors Release: 2.19 (#1364) 2020-10-13 20:50:46 +03:00
i18n chore(linting): eslint updated, code linted (#2174) 2022-11-25 21:56:50 +04:00
inline-tools feat(icons): codex icons package is used instead of svg sprite (#2173) 2022-11-25 22:26:23 +04:00
modules deps(TypeScript) - upgrade to v5, upgrade ts-loader, fix types error, fix pasteConfig getter wrapper (#2322) 2023-04-02 16:52:42 +01:00
tools deps(TypeScript) - upgrade to v5, upgrade ts-loader, fix types error, fix pasteConfig getter wrapper (#2322) 2023-04-02 16:52:42 +01:00
ui Chore/popover refactoring (#2249) 2023-02-10 21:29:58 +03:00
utils Chore/popover refactoring (#2249) 2023-02-10 21:29:58 +03:00
__module.ts chore(linting): eslint updated, code linted (#2174) 2022-11-25 21:56:50 +04:00
blocks.ts chore(linting): eslint updated, code linted (#2174) 2022-11-25 21:56:50 +04:00
core.ts chore(linting): eslint updated, code linted (#2174) 2022-11-25 21:56:50 +04:00
dom.ts fix(block): remember plugin's content element instead of dom search (#2311) 2023-03-20 23:28:17 +03:00
domIterator.ts chore(linting): eslint updated, code linted (#2174) 2022-11-25 21:56:50 +04:00
flipper.ts fix(block-events): split block with removing of selected text fragment (#2186) 2022-11-28 20:23:30 +04:00
polyfills.ts chore(linting): eslint updated, code linted (#2174) 2022-11-25 21:56:50 +04:00
selection.ts chore(linting): eslint updated, code linted (#2174) 2022-11-25 21:56:50 +04:00
utils.ts chore(linting): eslint updated, code linted (#2174) 2022-11-25 21:56:50 +04:00