From 1a1240b4b80f29294d13529a81399a10d59f0431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Jim=C3=A9nez?= Date: Wed, 21 Sep 2022 00:47:33 +0200 Subject: [PATCH] refactor(react-16): migrate to new react version (#604) * chore: refactor to functional components * chore: update react-markdown * chore: move to useState and remove preload component * chore(settings-plugin): refactor to functional component * chore: refactor ResultsList component * fix: running action typo * chore: update deps * chore: add CSP * chore: refactor Cerebro to functional component * refactor: migrate settings to funtional component * refactor: migrate main input to react 16 * fix: remove div not needed * fix: remove valores dentro do array * refactor: remove main component * fix: on change not parse value * chore: add readonly to remove warning * chore: refactor themes file * fix: react-select value as object * fix: unsuscribe error in functional component * fix: react-virtualized error * fix: settings refactor * docs: update docs Co-authored-by: oguhpereira --- app/background/index.html | 1 + app/lib/__tests__/loadThemes.spec.js | 20 +- app/lib/config.js | 4 +- app/lib/loadThemes.js | 19 - app/lib/themes.js | 14 + app/main/components/Cerebro/index.js | 339 ++-- app/main/components/Cerebro/styles.module.css | 17 + app/main/components/MainInput/index.js | 36 - .../components/MainInput/styles.module.css | 16 - app/main/components/ResultsList/Row/index.js | 57 +- app/main/components/ResultsList/index.js | 96 +- app/main/css/global.css | 4 +- app/main/index.html | 1 + app/plugins/core/plugins/Preview/Settings.js | 46 +- app/plugins/core/plugins/Preview/index.js | 227 ++- app/plugins/core/plugins/index.js | 4 +- app/plugins/core/settings/Settings/Hotkey.js | 41 +- .../core/settings/Settings/countries.js | 999 +++--------- app/plugins/core/settings/Settings/index.js | 161 +- docs/plugins/examples.md | 49 +- docs/plugins/plugin-structure.md | 2 +- docs/plugins/share.md | 6 +- docs/plugins/styles.md | 7 +- package.json | 10 +- yarn.lock | 1365 ++++++++++++----- 25 files changed, 1720 insertions(+), 1821 deletions(-) delete mode 100644 app/lib/loadThemes.js create mode 100644 app/lib/themes.js delete mode 100644 app/main/components/MainInput/index.js delete mode 100644 app/main/components/MainInput/styles.module.css diff --git a/app/background/index.html b/app/background/index.html index b1681abc..086d9922 100644 --- a/app/background/index.html +++ b/app/background/index.html @@ -2,6 +2,7 @@ +