diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2024-03-22 02:33:33 +0530 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2024-03-21 21:24:35 +0000 |
commit | 2f3f2ae7f098376f535e5aa993c9eedc14e36f5d (patch) | |
tree | d919bda212744493a7b66c2e91a75455421d62cc /src/components | |
parent | Upgrade electron to '29.1.5' (diff) | |
download | ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.tar.gz ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.tar.zst ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.zip |
Upgrade node modules
Diffstat (limited to 'src/components')
74 files changed, 545 insertions, 392 deletions
diff --git a/src/components/AppUpdateInfoBar.tsx b/src/components/AppUpdateInfoBar.tsx index 103bd2900..7bba8053a 100644 --- a/src/components/AppUpdateInfoBar.tsx +++ b/src/components/AppUpdateInfoBar.tsx | |||
@@ -1,12 +1,12 @@ | |||
1 | import { defineMessages, useIntl } from 'react-intl'; | 1 | import { defineMessages, useIntl } from 'react-intl'; |
2 | 2 | ||
3 | import { mdiInformation } from '@mdi/js'; | 3 | import { mdiInformation } from '@mdi/js'; |
4 | import { MouseEventHandler } from 'react'; | 4 | import type { MouseEventHandler } from 'react'; |
5 | import InfoBar from './ui/InfoBar'; | 5 | import InfoBar from './ui/InfoBar'; |
6 | import Icon from './ui/icon'; | 6 | import Icon from './ui/icon'; |
7 | 7 | ||
8 | import { onAuthGoToReleaseNotes } from '../helpers/update-helpers'; | ||
9 | import { isWinPortable } from '../environment'; | 8 | import { isWinPortable } from '../environment'; |
9 | import { onAuthGoToReleaseNotes } from '../helpers/update-helpers'; | ||
10 | 10 | ||
11 | const messages = defineMessages({ | 11 | const messages = defineMessages({ |
12 | updateAvailable: { | 12 | updateAvailable: { |
diff --git a/src/components/auth/AuthLayout.tsx b/src/components/auth/AuthLayout.tsx index eeb93b83b..67e898318 100644 --- a/src/components/auth/AuthLayout.tsx +++ b/src/components/auth/AuthLayout.tsx | |||
@@ -1,24 +1,24 @@ | |||
1 | import { mdiFlash } from '@mdi/js'; | ||
2 | import type { Response } from 'electron'; | ||
3 | import { TitleBar } from 'electron-react-titlebar/renderer'; | ||
4 | import { observer } from 'mobx-react'; | ||
1 | import { | 5 | import { |
2 | cloneElement, | ||
3 | Component, | 6 | Component, |
4 | MouseEventHandler, | 7 | type MouseEventHandler, |
5 | ReactElement, | 8 | type ReactElement, |
9 | cloneElement, | ||
6 | } from 'react'; | 10 | } from 'react'; |
7 | import { observer } from 'mobx-react'; | 11 | import { type WrappedComponentProps, injectIntl } from 'react-intl'; |
8 | import { TitleBar } from 'electron-react-titlebar/renderer'; | 12 | import { serverName } from '../../api/apiBase'; |
9 | import { injectIntl, WrappedComponentProps } from 'react-intl'; | 13 | import { GITHUB_FERDIUM_URL } from '../../config'; |
10 | import { mdiFlash } from '@mdi/js'; | 14 | import { isWindows } from '../../environment'; |
11 | import { Response } from 'electron'; | ||
12 | import Link from '../ui/Link'; | ||
13 | import InfoBar from '../ui/InfoBar'; | ||
14 | import { Component as PublishDebugInfo } from '../../features/publishDebugInfo'; | 15 | import { Component as PublishDebugInfo } from '../../features/publishDebugInfo'; |
15 | import { updateVersionParse } from '../../helpers/update-helpers'; | 16 | import { updateVersionParse } from '../../helpers/update-helpers'; |
16 | import globalMessages from '../../i18n/globalMessages'; | 17 | import globalMessages from '../../i18n/globalMessages'; |
17 | import { isWindows } from '../../environment'; | ||
18 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; | 18 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; |
19 | import { GITHUB_FERDIUM_URL } from '../../config'; | 19 | import InfoBar from '../ui/InfoBar'; |
20 | import Link from '../ui/Link'; | ||
20 | import Icon from '../ui/icon'; | 21 | import Icon from '../ui/icon'; |
21 | import { serverName } from '../../api/apiBase'; | ||
22 | 22 | ||
23 | export interface IProps extends WrappedComponentProps { | 23 | export interface IProps extends WrappedComponentProps { |
24 | children: ReactElement; | 24 | children: ReactElement; |
diff --git a/src/components/auth/ChangeServer.tsx b/src/components/auth/ChangeServer.tsx index c49e52673..665e8f6f9 100644 --- a/src/components/auth/ChangeServer.tsx +++ b/src/components/auth/ChangeServer.tsx | |||
@@ -1,19 +1,23 @@ | |||
1 | import { Component, FormEvent, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { mdiArrowLeftCircle } from '@mdi/js'; | 1 | import { mdiArrowLeftCircle } from '@mdi/js'; |
5 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component, type FormEvent, type ReactElement } from 'react'; | ||
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import { LIVE_FERDIUM_API, LIVE_FRANZ_API } from '../../config'; | ||
11 | import { url, required } from '../../helpers/validation-helpers'; | ||
12 | import globalMessages from '../../i18n/globalMessages'; | ||
6 | import Form from '../../lib/Form'; | 13 | import Form from '../../lib/Form'; |
7 | import Input from '../ui/input/index'; | 14 | import Infobox from '../ui/Infobox'; |
15 | import Link from '../ui/Link'; | ||
8 | import Select from '../ui/Select'; | 16 | import Select from '../ui/Select'; |
9 | import Button from '../ui/button'; | 17 | import Button from '../ui/button'; |
10 | import Link from '../ui/Link'; | ||
11 | import Infobox from '../ui/Infobox'; | ||
12 | import { url, required } from '../../helpers/validation-helpers'; | ||
13 | import { LIVE_FERDIUM_API, LIVE_FRANZ_API } from '../../config'; | ||
14 | import globalMessages from '../../i18n/globalMessages'; | ||
15 | import { H1 } from '../ui/headline'; | 18 | import { H1 } from '../ui/headline'; |
16 | import Icon from '../ui/icon'; | 19 | import Icon from '../ui/icon'; |
20 | import Input from '../ui/input/index'; | ||
17 | 21 | ||
18 | const messages = defineMessages({ | 22 | const messages = defineMessages({ |
19 | headline: { | 23 | headline: { |
diff --git a/src/components/auth/Invite.tsx b/src/components/auth/Invite.tsx index 0d39d861a..93441abe3 100644 --- a/src/components/auth/Invite.tsx +++ b/src/components/auth/Invite.tsx | |||
@@ -1,16 +1,20 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { Link } from 'react-router-dom'; | ||
5 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
6 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
7 | import Infobox from '../ui/Infobox'; | 3 | import { observer } from 'mobx-react'; |
8 | import Appear from '../ui/effects/Appear'; | 4 | import { Component } from 'react'; |
9 | import Form from '../../lib/Form'; | 5 | import { |
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import { Link } from 'react-router-dom'; | ||
10 | import { email, required } from '../../helpers/validation-helpers'; | 11 | import { email, required } from '../../helpers/validation-helpers'; |
11 | import Input from '../ui/input/index'; | 12 | import Form from '../../lib/Form'; |
13 | import Infobox from '../ui/Infobox'; | ||
12 | import Button from '../ui/button'; | 14 | import Button from '../ui/button'; |
15 | import Appear from '../ui/effects/Appear'; | ||
13 | import { H1 } from '../ui/headline'; | 16 | import { H1 } from '../ui/headline'; |
17 | import Input from '../ui/input/index'; | ||
14 | 18 | ||
15 | const messages = defineMessages({ | 19 | const messages = defineMessages({ |
16 | settingsHeadline: { | 20 | settingsHeadline: { |
diff --git a/src/components/auth/Locked.tsx b/src/components/auth/Locked.tsx index 34d010782..46ce24a2e 100644 --- a/src/components/auth/Locked.tsx +++ b/src/components/auth/Locked.tsx | |||
@@ -1,13 +1,17 @@ | |||
1 | import { systemPreferences } from '@electron/remote'; | 1 | import { systemPreferences } from '@electron/remote'; |
2 | import { Component } from 'react'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component } from 'react'; | ||
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import { isMac } from '../../environment'; | ||
6 | import Form from '../../lib/Form'; | 11 | import Form from '../../lib/Form'; |
7 | import Input from '../ui/input/index'; | ||
8 | import Button from '../ui/button'; | 12 | import Button from '../ui/button'; |
9 | import { H1 } from '../ui/headline'; | 13 | import { H1 } from '../ui/headline'; |
10 | import { isMac } from '../../environment'; | 14 | import Input from '../ui/input/index'; |
11 | 15 | ||
12 | const messages = defineMessages({ | 16 | const messages = defineMessages({ |
13 | headline: { | 17 | headline: { |
diff --git a/src/components/auth/Login.tsx b/src/components/auth/Login.tsx index 9bad731c8..37ce595eb 100644 --- a/src/components/auth/Login.tsx +++ b/src/components/auth/Login.tsx | |||
@@ -1,19 +1,23 @@ | |||
1 | import { Component, FormEvent, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { mdiArrowLeftCircle } from '@mdi/js'; | 1 | import { mdiArrowLeftCircle } from '@mdi/js'; |
5 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
6 | import Icon from '../ui/icon'; | 3 | import { observer } from 'mobx-react'; |
4 | import { Component, type FormEvent, type ReactElement } from 'react'; | ||
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import type { GlobalError } from '../../@types/ferdium-components.types'; | ||
11 | import { serverBase } from '../../api/apiBase'; // TODO: Remove this line after fixing password recovery in-app | ||
7 | import { LIVE_FRANZ_API } from '../../config'; | 12 | import { LIVE_FRANZ_API } from '../../config'; |
8 | import { API_VERSION } from '../../environment-remote'; | 13 | import { API_VERSION } from '../../environment-remote'; |
9 | import { serverBase } from '../../api/apiBase'; // TODO: Remove this line after fixing password recovery in-app | 14 | import { email, required } from '../../helpers/validation-helpers'; |
10 | import Form from '../../lib/Form'; | 15 | import Form from '../../lib/Form'; |
11 | import { required, email } from '../../helpers/validation-helpers'; | ||
12 | import Input from '../ui/input/index'; | ||
13 | import Button from '../ui/button'; | ||
14 | import Link from '../ui/Link'; | 16 | import Link from '../ui/Link'; |
17 | import Button from '../ui/button'; | ||
15 | import { H1 } from '../ui/headline'; | 18 | import { H1 } from '../ui/headline'; |
16 | import { GlobalError } from '../../@types/ferdium-components.types'; | 19 | import Icon from '../ui/icon'; |
20 | import Input from '../ui/input/index'; | ||
17 | 21 | ||
18 | const messages = defineMessages({ | 22 | const messages = defineMessages({ |
19 | headline: { | 23 | headline: { |
diff --git a/src/components/auth/Password.tsx b/src/components/auth/Password.tsx index 03adc3859..6f398c3fb 100644 --- a/src/components/auth/Password.tsx +++ b/src/components/auth/Password.tsx | |||
@@ -1,16 +1,20 @@ | |||
1 | import { Component, FormEvent } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component, type FormEvent } from 'react'; |
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
4 | 8 | ||
5 | import { noop } from 'lodash'; | 9 | import { noop } from 'lodash'; |
10 | import { email, required } from '../../helpers/validation-helpers'; | ||
11 | import globalMessages from '../../i18n/globalMessages'; | ||
6 | import Form from '../../lib/Form'; | 12 | import Form from '../../lib/Form'; |
7 | import { required, email } from '../../helpers/validation-helpers'; | ||
8 | import Input from '../ui/input/index'; | ||
9 | import Button from '../ui/button'; | ||
10 | import Link from '../ui/Link'; | ||
11 | import Infobox from '../ui/Infobox'; | 13 | import Infobox from '../ui/Infobox'; |
12 | import globalMessages from '../../i18n/globalMessages'; | 14 | import Link from '../ui/Link'; |
15 | import Button from '../ui/button'; | ||
13 | import { H1 } from '../ui/headline'; | 16 | import { H1 } from '../ui/headline'; |
17 | import Input from '../ui/input/index'; | ||
14 | 18 | ||
15 | const messages = defineMessages({ | 19 | const messages = defineMessages({ |
16 | headline: { | 20 | headline: { |
diff --git a/src/components/auth/SetupAssistant.tsx b/src/components/auth/SetupAssistant.tsx index c25495471..c1965dbb4 100644 --- a/src/components/auth/SetupAssistant.tsx +++ b/src/components/auth/SetupAssistant.tsx | |||
@@ -1,17 +1,21 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
5 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
6 | import Input from '../ui/input/index'; | 2 | import { observer } from 'mobx-react'; |
7 | import Button from '../ui/button'; | 3 | import { Component } from 'react'; |
8 | import Badge from '../ui/badge'; | 4 | import { |
9 | import Modal from '../ui/Modal'; | 5 | type WrappedComponentProps, |
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
9 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
10 | import { CDN_URL } from '../../config'; | ||
11 | import globalMessages from '../../i18n/globalMessages'; | ||
10 | import Infobox from '../ui/Infobox'; | 12 | import Infobox from '../ui/Infobox'; |
13 | import Modal from '../ui/Modal'; | ||
14 | import Badge from '../ui/badge'; | ||
15 | import Button from '../ui/button'; | ||
11 | import Appear from '../ui/effects/Appear'; | 16 | import Appear from '../ui/effects/Appear'; |
12 | import globalMessages from '../../i18n/globalMessages'; | ||
13 | import { CDN_URL } from '../../config'; | ||
14 | import { H1, H2 } from '../ui/headline'; | 17 | import { H1, H2 } from '../ui/headline'; |
18 | import Input from '../ui/input/index'; | ||
15 | 19 | ||
16 | const SLACK_ID = 'slack'; | 20 | const SLACK_ID = 'slack'; |
17 | 21 | ||
diff --git a/src/components/auth/Signup.tsx b/src/components/auth/Signup.tsx index 06a9774aa..84974fd07 100644 --- a/src/components/auth/Signup.tsx +++ b/src/components/auth/Signup.tsx | |||
@@ -1,18 +1,22 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer, inject } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { mdiArrowLeftCircle } from '@mdi/js'; | 1 | import { mdiArrowLeftCircle } from '@mdi/js'; |
5 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { inject, observer } from 'mobx-react'; | ||
4 | import { Component } from 'react'; | ||
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import type { GlobalError } from '../../@types/ferdium-components.types'; | ||
11 | import type { Actions } from '../../actions/lib/actions'; | ||
12 | import { serverBase } from '../../api/apiBase'; | ||
13 | import { email, minLength, required } from '../../helpers/validation-helpers'; | ||
6 | import Form from '../../lib/Form'; | 14 | import Form from '../../lib/Form'; |
7 | import { required, email, minLength } from '../../helpers/validation-helpers'; | ||
8 | import Input from '../ui/input/index'; | ||
9 | import Button from '../ui/button'; | ||
10 | import Link from '../ui/Link'; | 15 | import Link from '../ui/Link'; |
11 | import Icon from '../ui/icon'; | 16 | import Button from '../ui/button'; |
12 | import { serverBase } from '../../api/apiBase'; | ||
13 | import { H1 } from '../ui/headline'; | 17 | import { H1 } from '../ui/headline'; |
14 | import { GlobalError } from '../../@types/ferdium-components.types'; | 18 | import Icon from '../ui/icon'; |
15 | import { Actions } from '../../actions/lib/actions'; | 19 | import Input from '../ui/input/index'; |
16 | 20 | ||
17 | const messages = defineMessages({ | 21 | const messages = defineMessages({ |
18 | headline: { | 22 | headline: { |
diff --git a/src/components/auth/Welcome.tsx b/src/components/auth/Welcome.tsx index c1a2db386..ec1c167c0 100644 --- a/src/components/auth/Welcome.tsx +++ b/src/components/auth/Welcome.tsx | |||
@@ -1,14 +1,18 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer, inject } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { noop } from 'lodash'; | 1 | import { noop } from 'lodash'; |
5 | import serverlessLogin from '../../helpers/serverless-helpers'; | 2 | import { inject, observer } from 'mobx-react'; |
6 | import shuffleArray from '../../helpers/array-helpers'; | 3 | import { Component, type ReactElement } from 'react'; |
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
9 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
7 | import { serverName } from '../../api/apiBase'; | 10 | import { serverName } from '../../api/apiBase'; |
11 | import shuffleArray from '../../helpers/array-helpers'; | ||
12 | import serverlessLogin from '../../helpers/serverless-helpers'; | ||
13 | import type RecipePreview from '../../models/RecipePreview'; | ||
8 | import Link from '../ui/Link'; | 14 | import Link from '../ui/Link'; |
9 | import { H1 } from '../ui/headline'; | 15 | import { H1 } from '../ui/headline'; |
10 | import { StoresProps } from '../../@types/ferdium-components.types'; | ||
11 | import RecipePreview from '../../models/RecipePreview'; | ||
12 | 16 | ||
13 | const messages = defineMessages({ | 17 | const messages = defineMessages({ |
14 | signupButton: { | 18 | signupButton: { |
diff --git a/src/components/downloadManager/DownloadManagerDashboard.tsx b/src/components/downloadManager/DownloadManagerDashboard.tsx index 25e73d48f..490be269d 100644 --- a/src/components/downloadManager/DownloadManagerDashboard.tsx +++ b/src/components/downloadManager/DownloadManagerDashboard.tsx | |||
@@ -1,29 +1,29 @@ | |||
1 | import { Component } from 'react'; | 1 | import { mdiDownload } from '@mdi/js'; |
2 | import { observer } from 'mobx-react'; | 2 | import CancelIcon from '@mui/icons-material/Cancel'; |
3 | import { IntlShape, defineMessages, injectIntl } from 'react-intl'; | 3 | import ClearAllIcon from '@mui/icons-material/ClearAll'; |
4 | import { shell } from 'electron'; | 4 | import DeleteIcon from '@mui/icons-material/Delete'; |
5 | import prettyBytes from 'pretty-bytes'; | 5 | import FolderIcon from '@mui/icons-material/Folder'; |
6 | import PauseIcon from '@mui/icons-material/Pause'; | ||
7 | import PlayArrowIcon from '@mui/icons-material/PlayArrow'; | ||
6 | import { | 8 | import { |
7 | Typography, | 9 | Box, |
8 | Card, | 10 | Card, |
9 | CardContent, | 11 | CardContent, |
10 | LinearProgress, | ||
11 | Box, | ||
12 | IconButton, | 12 | IconButton, |
13 | LinearProgress, | ||
13 | ListItemButton, | 14 | ListItemButton, |
14 | ListItemIcon, | 15 | ListItemIcon, |
15 | ListItemText, | 16 | ListItemText, |
17 | Typography, | ||
16 | } from '@mui/material'; | 18 | } from '@mui/material'; |
17 | import { mdiDownload } from '@mdi/js'; | 19 | import { shell } from 'electron'; |
18 | import PlayArrowIcon from '@mui/icons-material/PlayArrow'; | ||
19 | import PauseIcon from '@mui/icons-material/Pause'; | ||
20 | import CancelIcon from '@mui/icons-material/Cancel'; | ||
21 | import FolderIcon from '@mui/icons-material/Folder'; | ||
22 | import DeleteIcon from '@mui/icons-material/Delete'; | ||
23 | import ClearAllIcon from '@mui/icons-material/ClearAll'; | ||
24 | import { round } from 'lodash'; | 20 | import { round } from 'lodash'; |
25 | import { RealStores } from '../../stores'; | 21 | import { observer } from 'mobx-react'; |
26 | import { Actions } from '../../actions/lib/actions'; | 22 | import prettyBytes from 'pretty-bytes'; |
23 | import { Component } from 'react'; | ||
24 | import { type IntlShape, defineMessages, injectIntl } from 'react-intl'; | ||
25 | import type { Actions } from '../../actions/lib/actions'; | ||
26 | import type { RealStores } from '../../stores'; | ||
27 | import Icon from '../ui/icon'; | 27 | import Icon from '../ui/icon'; |
28 | 28 | ||
29 | const messages = defineMessages({ | 29 | const messages = defineMessages({ |
diff --git a/src/components/downloadManager/DownloadManagerLayout.tsx b/src/components/downloadManager/DownloadManagerLayout.tsx index 1e018cfb8..08c0ace1e 100644 --- a/src/components/downloadManager/DownloadManagerLayout.tsx +++ b/src/components/downloadManager/DownloadManagerLayout.tsx | |||
@@ -1,14 +1,19 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import type React from 'react'; |
3 | import { Component } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
4 | 9 | ||
5 | import { mdiClose } from '@mdi/js'; | 10 | import { mdiClose } from '@mdi/js'; |
6 | import { Outlet } from 'react-router-dom'; | 11 | import { Outlet } from 'react-router-dom'; |
7 | import { Actions } from '../../actions/lib/actions'; | 12 | import type { Actions } from '../../actions/lib/actions'; |
8 | import { isEscKeyPress } from '../../jsUtils'; | 13 | import { isEscKeyPress } from '../../jsUtils'; |
9 | import Appear from '../ui/effects/Appear'; | 14 | import Appear from '../ui/effects/Appear'; |
10 | import ErrorBoundary from '../util/ErrorBoundary'; | ||
11 | import Icon from '../ui/icon'; | 15 | import Icon from '../ui/icon'; |
16 | import ErrorBoundary from '../util/ErrorBoundary'; | ||
12 | 17 | ||
13 | const messages = defineMessages({ | 18 | const messages = defineMessages({ |
14 | closeSettings: { | 19 | closeSettings: { |
diff --git a/src/components/layout/AppLayout.tsx b/src/components/layout/AppLayout.tsx index 97795212a..160664c20 100644 --- a/src/components/layout/AppLayout.tsx +++ b/src/components/layout/AppLayout.tsx | |||
@@ -1,28 +1,33 @@ | |||
1 | import React, { Component, PropsWithChildren } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { TitleBar } from 'electron-react-titlebar/renderer'; | ||
5 | import injectSheet, { WithStylesProps } from 'react-jss'; | ||
6 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import { TitleBar } from 'electron-react-titlebar/renderer'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import type React from 'react'; | ||
5 | import { Component, type PropsWithChildren } from 'react'; | ||
6 | import { | ||
7 | type WrappedComponentProps, | ||
8 | defineMessages, | ||
9 | injectIntl, | ||
10 | } from 'react-intl'; | ||
11 | import injectSheet, { type WithStylesProps } from 'react-jss'; | ||
7 | 12 | ||
8 | import { mdiFlash, mdiPowerPlug } from '@mdi/js'; | 13 | import { mdiFlash, mdiPowerPlug } from '@mdi/js'; |
9 | import { Outlet } from 'react-router-dom'; | 14 | import { Outlet } from 'react-router-dom'; |
10 | import InfoBar from '../ui/InfoBar'; | ||
11 | import { Component as BasicAuth } from '../../features/basicAuth'; | 15 | import { Component as BasicAuth } from '../../features/basicAuth'; |
12 | import { Component as QuickSwitch } from '../../features/quickSwitch'; | ||
13 | import { Component as PublishDebugInfo } from '../../features/publishDebugInfo'; | 16 | import { Component as PublishDebugInfo } from '../../features/publishDebugInfo'; |
14 | import ErrorBoundary from '../util/ErrorBoundary'; | 17 | import { Component as QuickSwitch } from '../../features/quickSwitch'; |
15 | import { updateVersionParse } from '../../helpers/update-helpers'; | 18 | import { updateVersionParse } from '../../helpers/update-helpers'; |
19 | import InfoBar from '../ui/InfoBar'; | ||
20 | import ErrorBoundary from '../util/ErrorBoundary'; | ||
16 | 21 | ||
17 | import { isMac, isWindows } from '../../environment'; | 22 | import { isMac, isWindows } from '../../environment'; |
18 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; | 23 | import Todos from '../../features/todos/containers/TodosScreen'; |
19 | import { workspaceStore } from '../../features/workspaces'; | 24 | import { workspaceStore } from '../../features/workspaces'; |
25 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; | ||
20 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; | 26 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; |
21 | import Todos from '../../features/todos/containers/TodosScreen'; | ||
22 | import Icon from '../ui/icon'; | 27 | import Icon from '../ui/icon'; |
23 | 28 | ||
24 | import LockedScreen from '../../containers/auth/LockedScreen'; | 29 | import LockedScreen from '../../containers/auth/LockedScreen'; |
25 | import SettingsStore from '../../stores/SettingsStore'; | 30 | import type SettingsStore from '../../stores/SettingsStore'; |
26 | 31 | ||
27 | const messages = defineMessages({ | 32 | const messages = defineMessages({ |
28 | servicesUpdated: { | 33 | servicesUpdated: { |
diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index 1106113f0..a927d5745 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx | |||
@@ -1,7 +1,3 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { inject, observer } from 'mobx-react'; | ||
5 | import { | 1 | import { |
6 | mdiBell, | 2 | mdiBell, |
7 | mdiBellOff, | 3 | mdiBellOff, |
@@ -9,14 +5,22 @@ import { | |||
9 | mdiChevronDown, | 5 | mdiChevronDown, |
10 | mdiChevronRight, | 6 | mdiChevronRight, |
11 | mdiCog, | 7 | mdiCog, |
8 | mdiDownload, | ||
12 | mdiLock, | 9 | mdiLock, |
13 | mdiMenu, | 10 | mdiMenu, |
14 | mdiPlusBox, | 11 | mdiPlusBox, |
15 | mdiViewGrid, | 12 | mdiViewGrid, |
16 | mdiViewSplitVertical, | 13 | mdiViewSplitVertical, |
17 | mdiDownload, | ||
18 | } from '@mdi/js'; | 14 | } from '@mdi/js'; |
19 | import Tabbar from '../services/tabs/Tabbar'; | 15 | import { inject, observer } from 'mobx-react'; |
16 | import { Component } from 'react'; | ||
17 | import { | ||
18 | type WrappedComponentProps, | ||
19 | defineMessages, | ||
20 | injectIntl, | ||
21 | } from 'react-intl'; | ||
22 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | ||
23 | import type { Actions } from '../../actions/lib/actions'; | ||
20 | import { | 24 | import { |
21 | addNewServiceShortcutKey, | 25 | addNewServiceShortcutKey, |
22 | downloadsShortcutKey, | 26 | downloadsShortcutKey, |
@@ -30,10 +34,10 @@ import { | |||
30 | import { todosStore } from '../../features/todos'; | 34 | import { todosStore } from '../../features/todos'; |
31 | import { todoActions } from '../../features/todos/actions'; | 35 | import { todoActions } from '../../features/todos/actions'; |
32 | import globalMessages from '../../i18n/globalMessages'; | 36 | import globalMessages from '../../i18n/globalMessages'; |
37 | import type Service from '../../models/Service'; | ||
38 | import type { RealStores } from '../../stores'; | ||
39 | import Tabbar from '../services/tabs/Tabbar'; | ||
33 | import Icon from '../ui/icon'; | 40 | import Icon from '../ui/icon'; |
34 | import { Actions } from '../../actions/lib/actions'; | ||
35 | import { RealStores } from '../../stores'; | ||
36 | import Service from '../../models/Service'; | ||
37 | 41 | ||
38 | const messages = defineMessages({ | 42 | const messages = defineMessages({ |
39 | addNewService: { | 43 | addNewService: { |
diff --git a/src/components/services/content/ConnectionLostBanner.tsx b/src/components/services/content/ConnectionLostBanner.tsx index 7040337f0..04e62ff6b 100644 --- a/src/components/services/content/ConnectionLostBanner.tsx +++ b/src/components/services/content/ConnectionLostBanner.tsx | |||
@@ -1,8 +1,12 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import { mdiAlert } from '@mdi/js'; | 1 | import { mdiAlert } from '@mdi/js'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component, type ReactElement } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
9 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
6 | import { LIVE_API_FERDIUM_WEBSITE } from '../../../config'; | 10 | import { LIVE_API_FERDIUM_WEBSITE } from '../../../config'; |
7 | import Icon from '../../ui/icon'; | 11 | import Icon from '../../ui/icon'; |
8 | 12 | ||
diff --git a/src/components/services/content/ServiceDisabled.tsx b/src/components/services/content/ServiceDisabled.tsx index 2f0d439ec..9b9f377b1 100644 --- a/src/components/services/content/ServiceDisabled.tsx +++ b/src/components/services/content/ServiceDisabled.tsx | |||
@@ -1,6 +1,10 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component, type ReactElement } from 'react'; |
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
4 | import Button from '../../ui/button'; | 8 | import Button from '../../ui/button'; |
5 | import { H1 } from '../../ui/headline'; | 9 | import { H1 } from '../../ui/headline'; |
6 | 10 | ||
diff --git a/src/components/services/content/ServiceView.tsx b/src/components/services/content/ServiceView.tsx index d89cd0610..577473b5d 100644 --- a/src/components/services/content/ServiceView.tsx +++ b/src/components/services/content/ServiceView.tsx | |||
@@ -1,18 +1,18 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { autorun, IReactionDisposer } from 'mobx'; | ||
3 | import { observer, inject } from 'mobx-react'; | ||
4 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { type IReactionDisposer, autorun } from 'mobx'; | ||
3 | import { inject, observer } from 'mobx-react'; | ||
4 | import { Component } from 'react'; | ||
5 | import TopBarProgress from 'react-topbar-progress-indicator'; | 5 | import TopBarProgress from 'react-topbar-progress-indicator'; |
6 | import ServiceModel from '../../../models/Service'; | 6 | import { CUSTOM_WEBSITE_RECIPE_ID } from '../../../config'; |
7 | import WebControlsScreen from '../../../features/webControls/containers/WebControlsScreen'; | ||
8 | import type ServiceModel from '../../../models/Service'; | ||
9 | import type { RealStores } from '../../../stores'; | ||
7 | import StatusBarTargetUrl from '../../ui/StatusBarTargetUrl'; | 10 | import StatusBarTargetUrl from '../../ui/StatusBarTargetUrl'; |
8 | import WebviewLoader from '../../ui/WebviewLoader'; | 11 | import WebviewLoader from '../../ui/WebviewLoader'; |
9 | import WebviewCrashHandler from './WebviewCrashHandler'; | ||
10 | import WebviewErrorHandler from './WebviewErrorHandler'; | ||
11 | import ServiceDisabled from './ServiceDisabled'; | 12 | import ServiceDisabled from './ServiceDisabled'; |
12 | import ServiceWebview from './ServiceWebview'; | 13 | import ServiceWebview from './ServiceWebview'; |
13 | import WebControlsScreen from '../../../features/webControls/containers/WebControlsScreen'; | 14 | import WebviewCrashHandler from './WebviewCrashHandler'; |
14 | import { CUSTOM_WEBSITE_RECIPE_ID } from '../../../config'; | 15 | import WebviewErrorHandler from './WebviewErrorHandler'; |
15 | import { RealStores } from '../../../stores'; | ||
16 | 16 | ||
17 | interface IProps { | 17 | interface IProps { |
18 | service: ServiceModel; | 18 | service: ServiceModel; |
diff --git a/src/components/services/content/ServiceWebview.tsx b/src/components/services/content/ServiceWebview.tsx index c598d4be6..0cf34c14b 100644 --- a/src/components/services/content/ServiceWebview.tsx +++ b/src/components/services/content/ServiceWebview.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { join } from 'node:path'; | 1 | import { join } from 'node:path'; |
2 | import { Component, ReactElement } from 'react'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import { action, makeObservable, observable, reaction } from 'mobx'; | 2 | import { action, makeObservable, observable, reaction } from 'mobx'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component, type ReactElement } from 'react'; | ||
5 | import ElectronWebView from 'react-electron-web-view'; | 5 | import ElectronWebView from 'react-electron-web-view'; |
6 | import ServiceModel from '../../../models/Service'; | 6 | import type ServiceModel from '../../../models/Service'; |
7 | 7 | ||
8 | const debug = require('../../../preload-safe-debug')('Ferdium:Services'); | 8 | const debug = require('../../../preload-safe-debug')('Ferdium:Services'); |
9 | 9 | ||
diff --git a/src/components/services/content/Services.tsx b/src/components/services/content/Services.tsx index 5766e0d75..65359d0b4 100644 --- a/src/components/services/content/Services.tsx +++ b/src/components/services/content/Services.tsx | |||
@@ -1,13 +1,17 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { Link } from 'react-router-dom'; | ||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import Confetti from 'react-confetti'; | ||
6 | import ms from 'ms'; | 2 | import ms from 'ms'; |
7 | import withStyles, { WithStylesProps } from 'react-jss'; | 3 | import { Component, type ReactElement } from 'react'; |
8 | import ServiceView from './ServiceView'; | 4 | import Confetti from 'react-confetti'; |
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
11 | import { Link } from 'react-router-dom'; | ||
12 | import type Service from '../../../models/Service'; | ||
9 | import Appear from '../../ui/effects/Appear'; | 13 | import Appear from '../../ui/effects/Appear'; |
10 | import Service from '../../../models/Service'; | 14 | import ServiceView from './ServiceView'; |
11 | 15 | ||
12 | const messages = defineMessages({ | 16 | const messages = defineMessages({ |
13 | getStarted: { | 17 | getStarted: { |
diff --git a/src/components/services/content/WebviewCrashHandler.tsx b/src/components/services/content/WebviewCrashHandler.tsx index 91c9cf927..0306dcbda 100644 --- a/src/components/services/content/WebviewCrashHandler.tsx +++ b/src/components/services/content/WebviewCrashHandler.tsx | |||
@@ -1,7 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import ms from 'ms'; | 2 | import ms from 'ms'; |
3 | import { Component, type ReactElement } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
5 | import Button from '../../ui/button'; | 9 | import Button from '../../ui/button'; |
6 | import { H1 } from '../../ui/headline'; | 10 | import { H1 } from '../../ui/headline'; |
7 | 11 | ||
diff --git a/src/components/services/content/WebviewErrorHandler.tsx b/src/components/services/content/WebviewErrorHandler.tsx index b99c15006..1d33ae117 100644 --- a/src/components/services/content/WebviewErrorHandler.tsx +++ b/src/components/services/content/WebviewErrorHandler.tsx | |||
@@ -1,7 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import withStyles, { WithStylesProps } from 'react-jss'; | 3 | import { |
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
8 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
5 | import Button from '../../ui/button'; | 9 | import Button from '../../ui/button'; |
6 | import { H1 } from '../../ui/headline'; | 10 | import { H1 } from '../../ui/headline'; |
7 | 11 | ||
diff --git a/src/components/services/tabs/TabBarSortableList.tsx b/src/components/services/tabs/TabBarSortableList.tsx index a30587470..2f76c17f1 100644 --- a/src/components/services/tabs/TabBarSortableList.tsx +++ b/src/components/services/tabs/TabBarSortableList.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
2 | import { Component } from 'react'; | ||
3 | import { SortableContainer } from 'react-sortable-hoc'; | 3 | import { SortableContainer } from 'react-sortable-hoc'; |
4 | 4 | ||
5 | import type Service from '../../../models/Service'; | ||
5 | import TabItem from './TabItem'; | 6 | import TabItem from './TabItem'; |
6 | import Service from '../../../models/Service'; | ||
7 | 7 | ||
8 | interface IProps { | 8 | interface IProps { |
9 | showMessageBadgeWhenMutedSetting: boolean; | 9 | showMessageBadgeWhenMutedSetting: boolean; |
diff --git a/src/components/services/tabs/TabItem.tsx b/src/components/services/tabs/TabItem.tsx index 804efe8a5..bf193e136 100644 --- a/src/components/services/tabs/TabItem.tsx +++ b/src/components/services/tabs/TabItem.tsx | |||
@@ -1,19 +1,23 @@ | |||
1 | import { app, dialog, Menu } from '@electron/remote'; | 1 | import { Menu, app, dialog } from '@electron/remote'; |
2 | import { mdiExclamation, mdiVolumeSource } from '@mdi/js'; | ||
3 | import classnames from 'classnames'; | ||
2 | import { noop } from 'lodash'; | 4 | import { noop } from 'lodash'; |
3 | import { Component } from 'react'; | 5 | import { autorun, makeObservable, observable, reaction } from 'mobx'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import { inject, observer } from 'mobx-react'; | 6 | import { inject, observer } from 'mobx-react'; |
6 | import classnames from 'classnames'; | ||
7 | import { SortableElement } from 'react-sortable-hoc'; | ||
8 | import injectSheet, { WithStylesProps } from 'react-jss'; | ||
9 | import ms from 'ms'; | 7 | import ms from 'ms'; |
10 | import { autorun, makeObservable, observable, reaction } from 'mobx'; | 8 | import { Component } from 'react'; |
11 | import { mdiExclamation, mdiVolumeSource } from '@mdi/js'; | 9 | import { |
12 | import Service from '../../../models/Service'; | 10 | type WrappedComponentProps, |
11 | defineMessages, | ||
12 | injectIntl, | ||
13 | } from 'react-intl'; | ||
14 | import injectSheet, { type WithStylesProps } from 'react-jss'; | ||
15 | import { SortableElement } from 'react-sortable-hoc'; | ||
16 | import type { Stores } from '../../../@types/stores.types'; | ||
13 | import { altKey, cmdOrCtrlShortcutKey, shiftKey } from '../../../environment'; | 17 | import { altKey, cmdOrCtrlShortcutKey, shiftKey } from '../../../environment'; |
14 | import globalMessages from '../../../i18n/globalMessages'; | 18 | import globalMessages from '../../../i18n/globalMessages'; |
19 | import type Service from '../../../models/Service'; | ||
15 | import Icon from '../../ui/icon'; | 20 | import Icon from '../../ui/icon'; |
16 | import { Stores } from '../../../@types/stores.types'; | ||
17 | import MenuItemConstructorOptions = Electron.MenuItemConstructorOptions; | 21 | import MenuItemConstructorOptions = Electron.MenuItemConstructorOptions; |
18 | import { acceleratorString } from '../../../jsUtils'; | 22 | import { acceleratorString } from '../../../jsUtils'; |
19 | 23 | ||
diff --git a/src/components/services/tabs/Tabbar.tsx b/src/components/services/tabs/Tabbar.tsx index d19a4b8de..164051aae 100644 --- a/src/components/services/tabs/Tabbar.tsx +++ b/src/components/services/tabs/Tabbar.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
2 | import { Component } from 'react'; | ||
3 | 3 | ||
4 | import type Service from '../../../models/Service'; | ||
4 | import TabBarSortableList from './TabBarSortableList'; | 5 | import TabBarSortableList from './TabBarSortableList'; |
5 | import Service from '../../../models/Service'; | ||
6 | 6 | ||
7 | interface IProps { | 7 | interface IProps { |
8 | useHorizontalStyle: boolean; | 8 | useHorizontalStyle: boolean; |
diff --git a/src/components/settings/SettingsLayout.tsx b/src/components/settings/SettingsLayout.tsx index f96ad7394..17f8c3e33 100644 --- a/src/components/settings/SettingsLayout.tsx +++ b/src/components/settings/SettingsLayout.tsx | |||
@@ -1,12 +1,16 @@ | |||
1 | import { Component, PropsWithChildren, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { mdiClose } from '@mdi/js'; | 1 | import { mdiClose } from '@mdi/js'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component, type PropsWithChildren, type ReactElement } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
5 | import { Outlet } from 'react-router-dom'; | 9 | import { Outlet } from 'react-router-dom'; |
6 | import ErrorBoundary from '../util/ErrorBoundary'; | 10 | import { isEscKeyPress } from '../../jsUtils'; |
7 | import Appear from '../ui/effects/Appear'; | 11 | import Appear from '../ui/effects/Appear'; |
8 | import Icon from '../ui/icon'; | 12 | import Icon from '../ui/icon'; |
9 | import { isEscKeyPress } from '../../jsUtils'; | 13 | import ErrorBoundary from '../util/ErrorBoundary'; |
10 | 14 | ||
11 | const messages = defineMessages({ | 15 | const messages = defineMessages({ |
12 | closeSettings: { | 16 | closeSettings: { |
diff --git a/src/components/settings/account/AccountDashboard.tsx b/src/components/settings/account/AccountDashboard.tsx index eab019084..76b4ce14e 100644 --- a/src/components/settings/account/AccountDashboard.tsx +++ b/src/components/settings/account/AccountDashboard.tsx | |||
@@ -1,18 +1,22 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component } from 'react'; |
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
4 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | 8 | import { Tooltip as ReactTooltip } from 'react-tooltip'; |
5 | import { H1, H2 } from '../../ui/headline'; | 9 | import { H1, H2 } from '../../ui/headline'; |
6 | 10 | ||
7 | import Loader from '../../ui/loader'; | ||
8 | import Button from '../../ui/button'; | ||
9 | import Infobox from '../../ui/infobox/index'; | ||
10 | import { | 11 | import { |
11 | DEFAULT_LOADER_COLOR, | 12 | DEFAULT_LOADER_COLOR, |
12 | LOCAL_SERVER, | ||
13 | LIVE_FRANZ_API, | 13 | LIVE_FRANZ_API, |
14 | LOCAL_SERVER, | ||
14 | } from '../../../config'; | 15 | } from '../../../config'; |
15 | import User from '../../../models/User'; | 16 | import type User from '../../../models/User'; |
17 | import Button from '../../ui/button'; | ||
18 | import Infobox from '../../ui/infobox/index'; | ||
19 | import Loader from '../../ui/loader'; | ||
16 | 20 | ||
17 | const messages = defineMessages({ | 21 | const messages = defineMessages({ |
18 | headline: { | 22 | headline: { |
diff --git a/src/components/settings/navigation/SettingsNavigation.tsx b/src/components/settings/navigation/SettingsNavigation.tsx index 66763c6a6..0504b6553 100644 --- a/src/components/settings/navigation/SettingsNavigation.tsx +++ b/src/components/settings/navigation/SettingsNavigation.tsx | |||
@@ -1,12 +1,16 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
3 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
2 | import { Component } from 'react'; | ||
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
4 | import { NavLink } from 'react-router-dom'; | 8 | import { NavLink } from 'react-router-dom'; |
5 | import { StoresProps } from '../../../@types/ferdium-components.types'; | 9 | import type { StoresProps } from '../../../@types/ferdium-components.types'; |
6 | import { | 10 | import { |
7 | LOCAL_SERVER, | ||
8 | LIVE_FERDIUM_API, | 11 | LIVE_FERDIUM_API, |
9 | LIVE_FRANZ_API, | 12 | LIVE_FRANZ_API, |
13 | LOCAL_SERVER, | ||
10 | } from '../../../config'; | 14 | } from '../../../config'; |
11 | import globalMessages from '../../../i18n/globalMessages'; | 15 | import globalMessages from '../../../i18n/globalMessages'; |
12 | 16 | ||
diff --git a/src/components/settings/releaseNotes/ReleaseNotesDashboard.tsx b/src/components/settings/releaseNotes/ReleaseNotesDashboard.tsx index 9b17e551c..1afc17491 100644 --- a/src/components/settings/releaseNotes/ReleaseNotesDashboard.tsx +++ b/src/components/settings/releaseNotes/ReleaseNotesDashboard.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { IntlShape, defineMessages, injectIntl } from 'react-intl'; | ||
4 | import Markdown from 'markdown-to-jsx'; | 1 | import Markdown from 'markdown-to-jsx'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component } from 'react'; | ||
4 | import { type IntlShape, defineMessages, injectIntl } from 'react-intl'; | ||
5 | import { ferdiumVersion } from '../../../environment-remote'; | 5 | import { ferdiumVersion } from '../../../environment-remote'; |
6 | import { | 6 | import { |
7 | getFerdiumVersion, | 7 | getFerdiumVersion, |
diff --git a/src/components/settings/releaseNotes/ReleaseNotesLayout.tsx b/src/components/settings/releaseNotes/ReleaseNotesLayout.tsx index 4a6fe54f4..23db7141e 100644 --- a/src/components/settings/releaseNotes/ReleaseNotesLayout.tsx +++ b/src/components/settings/releaseNotes/ReleaseNotesLayout.tsx | |||
@@ -1,14 +1,18 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | 1 | import { inject, observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { Component } from 'react'; |
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
4 | 8 | ||
5 | import { mdiClose } from '@mdi/js'; | 9 | import { mdiClose } from '@mdi/js'; |
6 | import { Outlet } from 'react-router-dom'; | 10 | import { Outlet } from 'react-router-dom'; |
7 | import ErrorBoundary from '../../util/ErrorBoundary'; | 11 | import type { Actions } from '../../../actions/lib/actions'; |
12 | import { isEscKeyPress } from '../../../jsUtils'; | ||
8 | import Appear from '../../ui/effects/Appear'; | 13 | import Appear from '../../ui/effects/Appear'; |
9 | import Icon from '../../ui/icon'; | 14 | import Icon from '../../ui/icon'; |
10 | import { isEscKeyPress } from '../../../jsUtils'; | 15 | import ErrorBoundary from '../../util/ErrorBoundary'; |
11 | import { Actions } from '../../../actions/lib/actions'; | ||
12 | 16 | ||
13 | const messages = defineMessages({ | 17 | const messages = defineMessages({ |
14 | closeSettings: { | 18 | closeSettings: { |
diff --git a/src/components/settings/services/EditServiceForm.tsx b/src/components/settings/services/EditServiceForm.tsx index 520cb3c46..69893c16c 100644 --- a/src/components/settings/services/EditServiceForm.tsx +++ b/src/components/settings/services/EditServiceForm.tsx | |||
@@ -1,25 +1,29 @@ | |||
1 | import { Component, FormEvent, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import { Link } from 'react-router-dom'; | ||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import { mdiInformation } from '@mdi/js'; | 1 | import { mdiInformation } from '@mdi/js'; |
6 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
7 | import Form from '../../../lib/Form'; | 3 | import { observer } from 'mobx-react'; |
8 | import Tabs from '../../ui/Tabs/Tabs'; | 4 | import { Component, type FormEvent, type ReactElement } from 'react'; |
9 | import TabItem from '../../ui/Tabs/TabItem'; | 5 | import { |
10 | import Input from '../../ui/input/index'; | 6 | type WrappedComponentProps, |
11 | import Toggle from '../../ui/toggle'; | 7 | defineMessages, |
12 | import Slider from '../../ui/Slider'; | 8 | injectIntl, |
13 | import Button from '../../ui/button'; | 9 | } from 'react-intl'; |
14 | import ImageUpload from '../../ui/imageUpload'; | 10 | import { Link } from 'react-router-dom'; |
15 | import Select from '../../ui/Select'; | ||
16 | import { isMac } from '../../../environment'; | 11 | import { isMac } from '../../../environment'; |
12 | import { normalizedUrl } from '../../../helpers/url-helpers'; | ||
17 | import globalMessages from '../../../i18n/globalMessages'; | 13 | import globalMessages from '../../../i18n/globalMessages'; |
18 | import Icon from '../../ui/icon'; | 14 | import type Form from '../../../lib/Form'; |
15 | import type { IRecipe } from '../../../models/Recipe'; | ||
16 | import type Service from '../../../models/Service'; | ||
17 | import Select from '../../ui/Select'; | ||
18 | import Slider from '../../ui/Slider'; | ||
19 | import TabItem from '../../ui/Tabs/TabItem'; | ||
20 | import Tabs from '../../ui/Tabs/Tabs'; | ||
21 | import Button from '../../ui/button'; | ||
19 | import { H3 } from '../../ui/headline'; | 22 | import { H3 } from '../../ui/headline'; |
20 | import { IRecipe } from '../../../models/Recipe'; | 23 | import Icon from '../../ui/icon'; |
21 | import Service from '../../../models/Service'; | 24 | import ImageUpload from '../../ui/imageUpload'; |
22 | import { normalizedUrl } from '../../../helpers/url-helpers'; | 25 | import Input from '../../ui/input/index'; |
26 | import Toggle from '../../ui/toggle'; | ||
23 | 27 | ||
24 | const messages = defineMessages({ | 28 | const messages = defineMessages({ |
25 | saveService: { | 29 | saveService: { |
diff --git a/src/components/settings/services/ServiceError.tsx b/src/components/settings/services/ServiceError.tsx index 87efdeb96..426565547 100644 --- a/src/components/settings/services/ServiceError.tsx +++ b/src/components/settings/services/ServiceError.tsx | |||
@@ -1,7 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
2 | import { Component, type ReactElement } from 'react'; | ||
3 | import { | ||
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
3 | import { Link } from 'react-router-dom'; | 8 | import { Link } from 'react-router-dom'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
5 | import Infobox from '../../ui/Infobox'; | 9 | import Infobox from '../../ui/Infobox'; |
6 | import Button from '../../ui/button'; | 10 | import Button from '../../ui/button'; |
7 | 11 | ||
diff --git a/src/components/settings/services/ServiceItem.tsx b/src/components/settings/services/ServiceItem.tsx index 35b63b160..7df59f1d2 100644 --- a/src/components/settings/services/ServiceItem.tsx +++ b/src/components/settings/services/ServiceItem.tsx | |||
@@ -1,10 +1,14 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
3 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | ||
4 | import { observer } from 'mobx-react'; | ||
5 | import classnames from 'classnames'; | ||
6 | import { mdiBellOff, mdiMessageBulletedOff, mdiPower } from '@mdi/js'; | 1 | import { mdiBellOff, mdiMessageBulletedOff, mdiPower } from '@mdi/js'; |
7 | import ServiceModel from '../../../models/Service'; | 2 | import classnames from 'classnames'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component, type ReactElement } from 'react'; | ||
5 | import { | ||
6 | type WrappedComponentProps, | ||
7 | defineMessages, | ||
8 | injectIntl, | ||
9 | } from 'react-intl'; | ||
10 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | ||
11 | import type ServiceModel from '../../../models/Service'; | ||
8 | import Icon from '../../ui/icon'; | 12 | import Icon from '../../ui/icon'; |
9 | 13 | ||
10 | const messages = defineMessages({ | 14 | const messages = defineMessages({ |
diff --git a/src/components/settings/services/ServicesDashboard.tsx b/src/components/settings/services/ServicesDashboard.tsx index b8c3ce3f0..e63898ae5 100644 --- a/src/components/settings/services/ServicesDashboard.tsx +++ b/src/components/settings/services/ServicesDashboard.tsx | |||
@@ -1,16 +1,20 @@ | |||
1 | import { Component, ReactElement } from 'react'; | 1 | import type { To } from 'history'; |
2 | import { observer } from 'mobx-react'; | 2 | import { observer } from 'mobx-react'; |
3 | import { Component, type ReactElement } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
3 | import { Link } from 'react-router-dom'; | 9 | import { Link } from 'react-router-dom'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 10 | import type Service from '../../../models/Service'; |
5 | import { To } from 'history'; | ||
6 | import SearchInput from '../../ui/SearchInput'; | ||
7 | import Infobox from '../../ui/Infobox'; | ||
8 | import Loader from '../../ui/loader'; | ||
9 | import FAB from '../../ui/FAB'; | 11 | import FAB from '../../ui/FAB'; |
10 | import ServiceItem from './ServiceItem'; | 12 | import Infobox from '../../ui/Infobox'; |
13 | import SearchInput from '../../ui/SearchInput'; | ||
11 | import Appear from '../../ui/effects/Appear'; | 14 | import Appear from '../../ui/effects/Appear'; |
12 | import { H1 } from '../../ui/headline'; | 15 | import { H1 } from '../../ui/headline'; |
13 | import Service from '../../../models/Service'; | 16 | import Loader from '../../ui/loader'; |
17 | import ServiceItem from './ServiceItem'; | ||
14 | 18 | ||
15 | const messages = defineMessages({ | 19 | const messages = defineMessages({ |
16 | headline: { | 20 | headline: { |
diff --git a/src/components/settings/settings/EditSettingsForm.tsx b/src/components/settings/settings/EditSettingsForm.tsx index 81cfe8b12..598158e20 100644 --- a/src/components/settings/settings/EditSettingsForm.tsx +++ b/src/components/settings/settings/EditSettingsForm.tsx | |||
@@ -1,31 +1,20 @@ | |||
1 | import { systemPreferences } from '@electron/remote'; | 1 | import { systemPreferences } from '@electron/remote'; |
2 | import { Component, ReactElement } from 'react'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import prettyBytes from 'pretty-bytes'; | ||
5 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
6 | import { mdiGithub, mdiOpenInNew, mdiPowerPlug } from '@mdi/js'; | 2 | import { mdiGithub, mdiOpenInNew, mdiPowerPlug } from '@mdi/js'; |
7 | import { noop } from 'lodash'; | 3 | import { noop } from 'lodash'; |
8 | import Form from '../../../lib/Form'; | 4 | import { observer } from 'mobx-react'; |
9 | import Button from '../../ui/button'; | 5 | import prettyBytes from 'pretty-bytes'; |
10 | import Toggle from '../../ui/toggle'; | 6 | import { Component, type ReactElement } from 'react'; |
11 | import Select from '../../ui/Select'; | ||
12 | import Input from '../../ui/input/index'; | ||
13 | import ColorPickerInput from '../../ui/colorPickerInput'; | ||
14 | import Infobox from '../../ui/Infobox'; | ||
15 | import { H1, H2, H3, H5 } from '../../ui/headline'; | ||
16 | import { | 7 | import { |
17 | ferdiumVersion, | 8 | type WrappedComponentProps, |
18 | userDataCertsPath, | 9 | defineMessages, |
19 | userDataPath, | 10 | injectIntl, |
20 | userDataRecipesPath, | 11 | } from 'react-intl'; |
21 | } from '../../../environment-remote'; | ||
22 | import { updateVersionParse } from '../../../helpers/update-helpers'; | ||
23 | import { | 12 | import { |
24 | DEFAULT_ACCENT_COLOR, | 13 | DEFAULT_ACCENT_COLOR, |
25 | DEFAULT_APP_SETTINGS, | 14 | DEFAULT_APP_SETTINGS, |
26 | FERDIUM_TRANSLATION, | 15 | FERDIUM_TRANSLATION, |
27 | GITHUB_FRANZ_URL, | ||
28 | GITHUB_FERDIUM_URL, | 16 | GITHUB_FERDIUM_URL, |
17 | GITHUB_FRANZ_URL, | ||
29 | SPLIT_COLUMNS_MAX, | 18 | SPLIT_COLUMNS_MAX, |
30 | SPLIT_COLUMNS_MIN, | 19 | SPLIT_COLUMNS_MIN, |
31 | } from '../../../config'; | 20 | } from '../../../config'; |
@@ -35,10 +24,25 @@ import { | |||
35 | isWindows, | 24 | isWindows, |
36 | lockFerdiumShortcutKey, | 25 | lockFerdiumShortcutKey, |
37 | } from '../../../environment'; | 26 | } from '../../../environment'; |
27 | import { | ||
28 | ferdiumVersion, | ||
29 | userDataCertsPath, | ||
30 | userDataPath, | ||
31 | userDataRecipesPath, | ||
32 | } from '../../../environment-remote'; | ||
33 | import { updateVersionParse } from '../../../helpers/update-helpers'; | ||
38 | import { openExternalUrl, openPath } from '../../../helpers/url-helpers'; | 34 | import { openExternalUrl, openPath } from '../../../helpers/url-helpers'; |
39 | import globalMessages from '../../../i18n/globalMessages'; | 35 | import globalMessages from '../../../i18n/globalMessages'; |
40 | import Icon from '../../ui/icon'; | 36 | import type Form from '../../../lib/Form'; |
37 | import Infobox from '../../ui/Infobox'; | ||
38 | import Select from '../../ui/Select'; | ||
41 | import Slider from '../../ui/Slider'; | 39 | import Slider from '../../ui/Slider'; |
40 | import Button from '../../ui/button'; | ||
41 | import ColorPickerInput from '../../ui/colorPickerInput'; | ||
42 | import { H1, H2, H3, H5 } from '../../ui/headline'; | ||
43 | import Icon from '../../ui/icon'; | ||
44 | import Input from '../../ui/input/index'; | ||
45 | import Toggle from '../../ui/toggle'; | ||
42 | 46 | ||
43 | const debug = require('../../../preload-safe-debug')( | 47 | const debug = require('../../../preload-safe-debug')( |
44 | 'Ferdium:EditSettingsForm', | 48 | 'Ferdium:EditSettingsForm', |
diff --git a/src/components/settings/team/TeamDashboard.tsx b/src/components/settings/team/TeamDashboard.tsx index 96613373e..b2d5aa6d5 100644 --- a/src/components/settings/team/TeamDashboard.tsx +++ b/src/components/settings/team/TeamDashboard.tsx | |||
@@ -1,16 +1,20 @@ | |||
1 | // TODO: Is this feature even being used? If not, then we can cleanup this code | 1 | // TODO: Is this feature even being used? If not, then we can cleanup this code |
2 | 2 | ||
3 | import { Component, ReactElement } from 'react'; | 3 | import classnames from 'classnames'; |
4 | import { observer } from 'mobx-react'; | 4 | import { observer } from 'mobx-react'; |
5 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 5 | import { Component, type ReactElement } from 'react'; |
6 | import { | ||
7 | type WrappedComponentProps, | ||
8 | defineMessages, | ||
9 | injectIntl, | ||
10 | } from 'react-intl'; | ||
11 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
6 | import { Tooltip as ReactTooltip } from 'react-tooltip'; | 12 | import { Tooltip as ReactTooltip } from 'react-tooltip'; |
7 | import withStyles, { WithStylesProps } from 'react-jss'; | 13 | import { DEFAULT_LOADER_COLOR, LIVE_FRANZ_API } from '../../../config'; |
8 | import classnames from 'classnames'; | ||
9 | import Loader from '../../ui/loader'; | ||
10 | import Button from '../../ui/button'; | ||
11 | import Infobox from '../../ui/Infobox'; | 14 | import Infobox from '../../ui/Infobox'; |
15 | import Button from '../../ui/button'; | ||
12 | import { H1 } from '../../ui/headline'; | 16 | import { H1 } from '../../ui/headline'; |
13 | import { DEFAULT_LOADER_COLOR, LIVE_FRANZ_API } from '../../../config'; | 17 | import Loader from '../../ui/loader'; |
14 | 18 | ||
15 | const messages = defineMessages({ | 19 | const messages = defineMessages({ |
16 | headline: { | 20 | headline: { |
diff --git a/src/components/settings/user/EditUserForm.tsx b/src/components/settings/user/EditUserForm.tsx index 5a2a5a83e..f4b84166a 100644 --- a/src/components/settings/user/EditUserForm.tsx +++ b/src/components/settings/user/EditUserForm.tsx | |||
@@ -1,14 +1,23 @@ | |||
1 | import { Component, FormEvent, FormEventHandler, ReactElement } from 'react'; | 1 | import { noop } from 'lodash'; |
2 | import { observer } from 'mobx-react'; | 2 | import { observer } from 'mobx-react'; |
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import { |
4 | Component, | ||
5 | type FormEvent, | ||
6 | type FormEventHandler, | ||
7 | type ReactElement, | ||
8 | } from 'react'; | ||
9 | import { | ||
10 | type WrappedComponentProps, | ||
11 | defineMessages, | ||
12 | injectIntl, | ||
13 | } from 'react-intl'; | ||
4 | import { Link } from 'react-router-dom'; | 14 | import { Link } from 'react-router-dom'; |
5 | import { noop } from 'lodash'; | 15 | import type Form from '../../../lib/Form'; |
6 | import Input from '../../ui/input/index'; | ||
7 | import Form from '../../../lib/Form'; | ||
8 | import Button from '../../ui/button'; | ||
9 | import Radio from '../../ui/Radio'; | ||
10 | import Infobox from '../../ui/Infobox'; | 16 | import Infobox from '../../ui/Infobox'; |
17 | import Radio from '../../ui/Radio'; | ||
18 | import Button from '../../ui/button'; | ||
11 | import { H2 } from '../../ui/headline'; | 19 | import { H2 } from '../../ui/headline'; |
20 | import Input from '../../ui/input/index'; | ||
12 | 21 | ||
13 | const messages = defineMessages({ | 22 | const messages = defineMessages({ |
14 | headline: { | 23 | headline: { |
diff --git a/src/components/ui/AppLoader/index.tsx b/src/components/ui/AppLoader/index.tsx index 4b5828ef4..a2133e174 100644 --- a/src/components/ui/AppLoader/index.tsx +++ b/src/components/ui/AppLoader/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
3 | import withStyles, { WithStylesProps } from 'react-jss'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import { Theme } from '../../../themes'; | 3 | import withStyles, { type WithStylesProps } from 'react-jss'; |
5 | import FullscreenLoader from '../FullscreenLoader'; | ||
6 | import shuffleArray from '../../../helpers/array-helpers'; | 4 | import shuffleArray from '../../../helpers/array-helpers'; |
5 | import type { Theme } from '../../../themes'; | ||
6 | import FullscreenLoader from '../FullscreenLoader'; | ||
7 | 7 | ||
8 | import styles from './styles'; | 8 | import styles from './styles'; |
9 | 9 | ||
diff --git a/src/components/ui/FAB.tsx b/src/components/ui/FAB.tsx index acb0f690e..b4eeace8b 100644 --- a/src/components/ui/FAB.tsx +++ b/src/components/ui/FAB.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, ReactElement, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component, type ReactElement, type ReactNode } from 'react'; | ||
5 | 5 | ||
6 | interface IProps { | 6 | interface IProps { |
7 | className: string; | 7 | className: string; |
diff --git a/src/components/ui/FullscreenLoader/index.tsx b/src/components/ui/FullscreenLoader/index.tsx index 09c1d5fbb..40b04abe8 100644 --- a/src/components/ui/FullscreenLoader/index.tsx +++ b/src/components/ui/FullscreenLoader/index.tsx | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Component, ReactElement, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component, type ReactElement, type ReactNode } from 'react'; | ||
4 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
5 | import type { Theme } from '../../../themes'; | ||
6 | import { H1 } from '../headline'; | ||
5 | import Loader from '../loader/index'; | 7 | import Loader from '../loader/index'; |
6 | import styles from './styles'; | 8 | import styles from './styles'; |
7 | import { H1 } from '../headline'; | ||
8 | import { Theme } from '../../../themes'; | ||
9 | 9 | ||
10 | interface IProps extends WithStylesProps<typeof styles> { | 10 | interface IProps extends WithStylesProps<typeof styles> { |
11 | className?: string; | 11 | className?: string; |
diff --git a/src/components/ui/InfoBar.tsx b/src/components/ui/InfoBar.tsx index f3f1adbe7..5fd27f61a 100644 --- a/src/components/ui/InfoBar.tsx +++ b/src/components/ui/InfoBar.tsx | |||
@@ -1,14 +1,18 @@ | |||
1 | import { Component, MouseEventHandler, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { observer } from 'mobx-react'; |
3 | import { Component, type MouseEventHandler, type ReactNode } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
5 | 9 | ||
6 | import { mdiClose } from '@mdi/js'; | 10 | import { mdiClose } from '@mdi/js'; |
7 | import { noop } from 'lodash'; | 11 | import { noop } from 'lodash'; |
8 | import Loader from './loader/index'; | 12 | import { DEFAULT_LOADER_COLOR } from '../../config'; |
9 | import Appear from './effects/Appear'; | 13 | import Appear from './effects/Appear'; |
10 | import Icon from './icon'; | 14 | import Icon from './icon'; |
11 | import { DEFAULT_LOADER_COLOR } from '../../config'; | 15 | import Loader from './loader/index'; |
12 | 16 | ||
13 | const messages = defineMessages({ | 17 | const messages = defineMessages({ |
14 | hide: { | 18 | hide: { |
diff --git a/src/components/ui/Infobox.tsx b/src/components/ui/Infobox.tsx index 14e1a581c..fc88c4654 100644 --- a/src/components/ui/Infobox.tsx +++ b/src/components/ui/Infobox.tsx | |||
@@ -1,12 +1,21 @@ | |||
1 | import { Component, MouseEventHandler, ReactElement, ReactNode } from 'react'; | ||
2 | import classnames from 'classnames'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { mdiAlert, mdiCheckboxMarkedCircleOutline, mdiClose } from '@mdi/js'; | 1 | import { mdiAlert, mdiCheckboxMarkedCircleOutline, mdiClose } from '@mdi/js'; |
2 | import classnames from 'classnames'; | ||
5 | import { noop } from 'lodash'; | 3 | import { noop } from 'lodash'; |
6 | import { observer } from 'mobx-react'; | 4 | import { observer } from 'mobx-react'; |
7 | import Loader from './loader/index'; | 5 | import { |
8 | import Icon from './icon'; | 6 | Component, |
7 | type MouseEventHandler, | ||
8 | type ReactElement, | ||
9 | type ReactNode, | ||
10 | } from 'react'; | ||
11 | import { | ||
12 | type WrappedComponentProps, | ||
13 | defineMessages, | ||
14 | injectIntl, | ||
15 | } from 'react-intl'; | ||
9 | import { DEFAULT_LOADER_COLOR } from '../../config'; | 16 | import { DEFAULT_LOADER_COLOR } from '../../config'; |
17 | import Icon from './icon'; | ||
18 | import Loader from './loader/index'; | ||
10 | 19 | ||
11 | const icons = { | 20 | const icons = { |
12 | 'checkbox-marked-circle-outline': mdiCheckboxMarkedCircleOutline, | 21 | 'checkbox-marked-circle-outline': mdiCheckboxMarkedCircleOutline, |
diff --git a/src/components/ui/Link.tsx b/src/components/ui/Link.tsx index f9fdd57f9..816798d79 100644 --- a/src/components/ui/Link.tsx +++ b/src/components/ui/Link.tsx | |||
@@ -1,9 +1,14 @@ | |||
1 | import { Component, CSSProperties, ReactNode, MouseEvent } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { inject, observer } from 'mobx-react'; | ||
3 | import { | ||
4 | type CSSProperties, | ||
5 | Component, | ||
6 | type MouseEvent, | ||
7 | type ReactNode, | ||
8 | } from 'react'; | ||
9 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
4 | import matchRoute from '../../helpers/routing-helpers'; | 10 | import matchRoute from '../../helpers/routing-helpers'; |
5 | import { openExternalUrl } from '../../helpers/url-helpers'; | 11 | import { openExternalUrl } from '../../helpers/url-helpers'; |
6 | import { StoresProps } from '../../@types/ferdium-components.types'; | ||
7 | 12 | ||
8 | interface IProps extends Partial<StoresProps> { | 13 | interface IProps extends Partial<StoresProps> { |
9 | children: ReactNode; | 14 | children: ReactNode; |
@@ -54,7 +59,6 @@ class Link extends Component<IProps> { | |||
54 | }); | 59 | }); |
55 | 60 | ||
56 | return ( | 61 | return ( |
57 | // biome-ignore lint/a11y/useValidAnchor: <explanation> | ||
58 | <a | 62 | <a |
59 | href={router.history.createHref(to)} | 63 | href={router.history.createHref(to)} |
60 | className={linkClasses} | 64 | className={linkClasses} |
diff --git a/src/components/ui/Modal/index.tsx b/src/components/ui/Modal/index.tsx index 154beef0c..15326a289 100644 --- a/src/components/ui/Modal/index.tsx +++ b/src/components/ui/Modal/index.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, ReactNode } from 'react'; | ||
2 | import ReactModal from 'react-modal'; | ||
3 | import classnames from 'classnames'; | ||
4 | import injectCSS, { WithStylesProps } from 'react-jss'; | ||
5 | import { mdiClose } from '@mdi/js'; | 1 | import { mdiClose } from '@mdi/js'; |
2 | import classnames from 'classnames'; | ||
3 | import { Component, type ReactNode } from 'react'; | ||
4 | import injectCSS, { type WithStylesProps } from 'react-jss'; | ||
5 | import ReactModal from 'react-modal'; | ||
6 | 6 | ||
7 | import Icon from '../icon'; | 7 | import Icon from '../icon'; |
8 | import styles from './styles'; | 8 | import styles from './styles'; |
diff --git a/src/components/ui/Radio.tsx b/src/components/ui/Radio.tsx index 901958c78..b556eb4ca 100644 --- a/src/components/ui/Radio.tsx +++ b/src/components/ui/Radio.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import FieldInterface from 'mobx-react-form/lib/models/FieldInterface'; | 2 | import { observer } from 'mobx-react'; |
3 | import type FieldInterface from 'mobx-react-form/lib/models/FieldInterface'; | ||
4 | import { Component } from 'react'; | ||
5 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 5 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
6 | import Error from './error'; | 6 | import Error from './error'; |
7 | 7 | ||
diff --git a/src/components/ui/SearchInput.tsx b/src/components/ui/SearchInput.tsx index b2caaa1de..2e70d1b35 100644 --- a/src/components/ui/SearchInput.tsx +++ b/src/components/ui/SearchInput.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { ChangeEvent, Component, ReactElement } from 'react'; | 1 | import { mdiCloseCircleOutline, mdiMagnify } from '@mdi/js'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
4 | import { debounce, noop } from 'lodash'; | 3 | import { debounce, noop } from 'lodash'; |
5 | import { mdiCloseCircleOutline, mdiMagnify } from '@mdi/js'; | 4 | import { observer } from 'mobx-react'; |
5 | import { type ChangeEvent, Component, type ReactElement } from 'react'; | ||
6 | import Icon from './icon'; | 6 | import Icon from './icon'; |
7 | 7 | ||
8 | interface IProps { | 8 | interface IProps { |
diff --git a/src/components/ui/Select.tsx b/src/components/ui/Select.tsx index a2ed4216f..4abed849d 100644 --- a/src/components/ui/Select.tsx +++ b/src/components/ui/Select.tsx | |||
@@ -1,14 +1,14 @@ | |||
1 | import classnames from 'classnames'; | ||
2 | import { observer } from 'mobx-react'; | ||
1 | import { | 3 | import { |
2 | createRef, | 4 | type ChangeEvent, |
3 | Component, | 5 | Component, |
4 | ReactElement, | 6 | type ReactElement, |
5 | RefObject, | 7 | type ReactNode, |
6 | ChangeEvent, | 8 | type RefObject, |
7 | ReactNode, | 9 | createRef, |
8 | } from 'react'; | 10 | } from 'react'; |
9 | import { observer } from 'mobx-react'; | 11 | import type { Field } from '../../@types/mobx-form.types'; |
10 | import classnames from 'classnames'; | ||
11 | import { Field } from '../../@types/mobx-form.types'; | ||
12 | 12 | ||
13 | interface IProps { | 13 | interface IProps { |
14 | field: Field; | 14 | field: Field; |
diff --git a/src/components/ui/ServiceIcon.tsx b/src/components/ui/ServiceIcon.tsx index 6920611d0..03a345c23 100644 --- a/src/components/ui/ServiceIcon.tsx +++ b/src/components/ui/ServiceIcon.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
5 | import ServiceModel from '../../models/Service'; | 2 | import { observer } from 'mobx-react'; |
3 | import { Component, type ReactNode } from 'react'; | ||
4 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
5 | import type ServiceModel from '../../models/Service'; | ||
6 | 6 | ||
7 | const styles = theme => ({ | 7 | const styles = theme => ({ |
8 | root: { | 8 | root: { |
diff --git a/src/components/ui/Slider.tsx b/src/components/ui/Slider.tsx index aa351ccd2..4f22290ef 100644 --- a/src/components/ui/Slider.tsx +++ b/src/components/ui/Slider.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { ChangeEvent, Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { type ChangeEvent, Component, type ReactElement } from 'react'; | ||
5 | 5 | ||
6 | interface IProps { | 6 | interface IProps { |
7 | field: any; | 7 | field: any; |
diff --git a/src/components/ui/StatusBarTargetUrl.tsx b/src/components/ui/StatusBarTargetUrl.tsx index d969267eb..92cb6c36d 100644 --- a/src/components/ui/StatusBarTargetUrl.tsx +++ b/src/components/ui/StatusBarTargetUrl.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component } from 'react'; | ||
4 | import Appear from './effects/Appear'; | 4 | import Appear from './effects/Appear'; |
5 | 5 | ||
6 | interface IProps { | 6 | interface IProps { |
diff --git a/src/components/ui/Tabs/TabItem.tsx b/src/components/ui/Tabs/TabItem.tsx index 55dee42c6..df99a8bfb 100644 --- a/src/components/ui/Tabs/TabItem.tsx +++ b/src/components/ui/Tabs/TabItem.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Fragment, ReactElement } from 'react'; | 1 | import { Fragment, type ReactElement } from 'react'; |
2 | 2 | ||
3 | export interface IProps { | 3 | export interface IProps { |
4 | children: | 4 | children: |
diff --git a/src/components/ui/Tabs/Tabs.tsx b/src/components/ui/Tabs/Tabs.tsx index d7f75c8b8..a5ec148aa 100644 --- a/src/components/ui/Tabs/Tabs.tsx +++ b/src/components/ui/Tabs/Tabs.tsx | |||
@@ -1,7 +1,12 @@ | |||
1 | import { Children, Component, ReactElement, ReactPortal } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { IProps as TabItemProps } from './TabItem'; | 2 | import { observer } from 'mobx-react'; |
3 | import { | ||
4 | Children, | ||
5 | Component, | ||
6 | type ReactElement, | ||
7 | type ReactPortal, | ||
8 | } from 'react'; | ||
9 | import type { IProps as TabItemProps } from './TabItem'; | ||
5 | 10 | ||
6 | interface IProps { | 11 | interface IProps { |
7 | children: | 12 | children: |
diff --git a/src/components/ui/WebviewLoader/index.tsx b/src/components/ui/WebviewLoader/index.tsx index c4e9c724c..53e10d3b9 100644 --- a/src/components/ui/WebviewLoader/index.tsx +++ b/src/components/ui/WebviewLoader/index.tsx | |||
@@ -1,7 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import injectSheet, { WithStylesProps } from 'react-jss'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import { |
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
8 | import injectSheet, { type WithStylesProps } from 'react-jss'; | ||
5 | import FullscreenLoader from '../FullscreenLoader'; | 9 | import FullscreenLoader from '../FullscreenLoader'; |
6 | 10 | ||
7 | const messages = defineMessages({ | 11 | const messages = defineMessages({ |
diff --git a/src/components/ui/badge/ProBadge.tsx b/src/components/ui/badge/ProBadge.tsx index a5947d3a8..fd5752ed0 100644 --- a/src/components/ui/badge/ProBadge.tsx +++ b/src/components/ui/badge/ProBadge.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { mdiStar } from '@mdi/js'; | 1 | import { mdiStar } from '@mdi/js'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { Component } from 'react'; | 3 | import { Component } from 'react'; |
4 | import injectStyle, { WithStylesProps } from 'react-jss'; | 4 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
5 | 5 | ||
6 | import { Theme } from '../../../themes'; | 6 | import type { Theme } from '../../../themes'; |
7 | import Icon from '../icon'; | 7 | import Icon from '../icon'; |
8 | import Badge from './index'; | 8 | import Badge from './index'; |
9 | 9 | ||
diff --git a/src/components/ui/badge/index.tsx b/src/components/ui/badge/index.tsx index 44fbf2d4a..e464c07ec 100644 --- a/src/components/ui/badge/index.tsx +++ b/src/components/ui/badge/index.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, ReactNode } from 'react'; | 2 | import { Component, type ReactNode } from 'react'; |
3 | import injectStyle, { WithStylesProps } from 'react-jss'; | 3 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import { Theme } from '../../../themes'; | 5 | import type { Theme } from '../../../themes'; |
6 | 6 | ||
7 | const badgeStyles = (theme: Theme) => { | 7 | const badgeStyles = (theme: Theme) => { |
8 | const styles = {}; | 8 | const styles = {}; |
diff --git a/src/components/ui/button/index.tsx b/src/components/ui/button/index.tsx index 3247072a9..5c606f274 100644 --- a/src/components/ui/button/index.tsx +++ b/src/components/ui/button/index.tsx | |||
@@ -1,14 +1,14 @@ | |||
1 | /* eslint-disable no-use-before-define */ | 1 | /* eslint-disable no-use-before-define */ |
2 | import Icon from '@mdi/react'; | 2 | import Icon from '@mdi/react'; |
3 | import classnames from 'classnames'; | 3 | import classnames from 'classnames'; |
4 | import { Property } from 'csstype'; | 4 | import type { Property } from 'csstype'; |
5 | import { noop } from 'lodash'; | 5 | import { noop } from 'lodash'; |
6 | import { Component, MouseEventHandler } from 'react'; | 6 | import { Component, type MouseEventHandler } from 'react'; |
7 | import withStyles, { WithStylesProps } from 'react-jss'; | 7 | import withStyles, { type WithStylesProps } from 'react-jss'; |
8 | import Loader from '../loader/index'; | ||
9 | import { Theme } from '../../../themes'; | ||
10 | import { IFormField } from '../typings/generic'; | ||
11 | import { DEFAULT_LOADER_COLOR } from '../../../config'; | 8 | import { DEFAULT_LOADER_COLOR } from '../../../config'; |
9 | import type { Theme } from '../../../themes'; | ||
10 | import Loader from '../loader/index'; | ||
11 | import type { IFormField } from '../typings/generic'; | ||
12 | 12 | ||
13 | type ButtonType = | 13 | type ButtonType = |
14 | | 'primary' | 14 | | 'primary' |
@@ -206,7 +206,6 @@ class ButtonComponent extends Component<IProps, IState> { | |||
206 | ); | 206 | ); |
207 | 207 | ||
208 | const wrapperComponent = href ? ( | 208 | const wrapperComponent = href ? ( |
209 | // biome-ignore lint/a11y/useValidAnchor: <explanation> | ||
210 | <a | 209 | <a |
211 | href={href} | 210 | href={href} |
212 | target={target} | 211 | target={target} |
diff --git a/src/components/ui/colorPickerInput/index.tsx b/src/components/ui/colorPickerInput/index.tsx index 39fd0220a..4870a3675 100644 --- a/src/components/ui/colorPickerInput/index.tsx +++ b/src/components/ui/colorPickerInput/index.tsx | |||
@@ -1,15 +1,15 @@ | |||
1 | import classnames from 'classnames'; | ||
2 | import { noop } from 'lodash'; | ||
3 | import { observer } from 'mobx-react'; | ||
1 | import { | 4 | import { |
2 | ChangeEvent, | 5 | type ChangeEvent, |
3 | Component, | 6 | Component, |
7 | type InputHTMLAttributes, | ||
8 | type RefObject, | ||
4 | createRef, | 9 | createRef, |
5 | InputHTMLAttributes, | ||
6 | RefObject, | ||
7 | } from 'react'; | 10 | } from 'react'; |
8 | import { observer } from 'mobx-react'; | 11 | import { type Color, type ColorResult, SliderPicker } from 'react-color'; |
9 | import classnames from 'classnames'; | 12 | import type { FormFields } from '../../../@types/mobx-form.types'; |
10 | import { Color, ColorResult, SliderPicker } from 'react-color'; | ||
11 | import { noop } from 'lodash'; | ||
12 | import { FormFields } from '../../../@types/mobx-form.types'; | ||
13 | 13 | ||
14 | interface IProps extends InputHTMLAttributes<HTMLInputElement>, FormFields { | 14 | interface IProps extends InputHTMLAttributes<HTMLInputElement>, FormFields { |
15 | onColorChange: (event: ChangeEvent<HTMLInputElement>) => void; | 15 | onColorChange: (event: ChangeEvent<HTMLInputElement>) => void; |
diff --git a/src/components/ui/effects/Appear.tsx b/src/components/ui/effects/Appear.tsx index 06f63a029..c32c339fd 100644 --- a/src/components/ui/effects/Appear.tsx +++ b/src/components/ui/effects/Appear.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ReactElement, ReactNode, useEffect, useState } from 'react'; | 1 | import { type ReactElement, type ReactNode, useEffect, useState } from 'react'; |
2 | import { CSSTransition, TransitionGroup } from 'react-transition-group'; | 2 | import { CSSTransition, TransitionGroup } from 'react-transition-group'; |
3 | 3 | ||
4 | interface IProps { | 4 | interface IProps { |
diff --git a/src/components/ui/error/index.tsx b/src/components/ui/error/index.tsx index 01fb5ca27..d0008529f 100644 --- a/src/components/ui/error/index.tsx +++ b/src/components/ui/error/index.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Classes } from 'jss'; | 1 | import type { Classes } from 'jss'; |
2 | import { Component } from 'react'; | 2 | import { Component } from 'react'; |
3 | import injectSheet from 'react-jss'; | 3 | import injectSheet from 'react-jss'; |
4 | 4 | ||
diff --git a/src/components/ui/error/styles.ts b/src/components/ui/error/styles.ts index 9da95705a..ac781052f 100644 --- a/src/components/ui/error/styles.ts +++ b/src/components/ui/error/styles.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Theme } from '../../../themes'; | 1 | import type { Theme } from '../../../themes'; |
2 | 2 | ||
3 | export default (theme: Theme) => ({ | 3 | export default (theme: Theme) => ({ |
4 | message: { | 4 | message: { |
diff --git a/src/components/ui/headline/index.tsx b/src/components/ui/headline/index.tsx index 8e40fa896..2070745bb 100644 --- a/src/components/ui/headline/index.tsx +++ b/src/components/ui/headline/index.tsx | |||
@@ -1,15 +1,15 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { | 2 | import { |
3 | Component, | 3 | Component, |
4 | type MouseEventHandler, | ||
5 | type ReactElement, | ||
6 | type ReactNode, | ||
4 | createElement, | 7 | createElement, |
5 | MouseEventHandler, | ||
6 | ReactElement, | ||
7 | ReactNode, | ||
8 | } from 'react'; | 8 | } from 'react'; |
9 | import injectStyle, { WithStylesProps } from 'react-jss'; | 9 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
10 | 10 | ||
11 | import { Theme } from '../../../themes'; | 11 | import type { Theme } from '../../../themes'; |
12 | import { Omit } from '../typings/generic'; | 12 | import type { Omit } from '../typings/generic'; |
13 | 13 | ||
14 | const styles = (theme: Theme) => ({ | 14 | const styles = (theme: Theme) => ({ |
15 | headline: { | 15 | headline: { |
diff --git a/src/components/ui/icon/index.tsx b/src/components/ui/icon/index.tsx index 04a00d0e0..ad9f43730 100644 --- a/src/components/ui/icon/index.tsx +++ b/src/components/ui/icon/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import MdiIcon from '@mdi/react'; | 1 | import MdiIcon from '@mdi/react'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { Component, ReactElement } from 'react'; | 3 | import { Component, type ReactElement } from 'react'; |
4 | import injectStyle, { WithStylesProps } from 'react-jss'; | 4 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
5 | 5 | ||
6 | import { Theme } from '../../../themes'; | 6 | import type { Theme } from '../../../themes'; |
7 | 7 | ||
8 | const styles = (theme: Theme) => ({ | 8 | const styles = (theme: Theme) => ({ |
9 | icon: { | 9 | icon: { |
diff --git a/src/components/ui/imageUpload/index.tsx b/src/components/ui/imageUpload/index.tsx index 3b164ed41..876572484 100644 --- a/src/components/ui/imageUpload/index.tsx +++ b/src/components/ui/imageUpload/index.tsx | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | ||
4 | import Dropzone from 'react-dropzone'; | ||
5 | import { mdiDelete, mdiFileImage } from '@mdi/js'; | 1 | import { mdiDelete, mdiFileImage } from '@mdi/js'; |
2 | import classnames from 'classnames'; | ||
3 | import { observer } from 'mobx-react'; | ||
6 | import prettyBytes from 'pretty-bytes'; | 4 | import prettyBytes from 'pretty-bytes'; |
7 | import Icon from '../icon'; | 5 | import { Component, type ReactElement } from 'react'; |
6 | import Dropzone from 'react-dropzone'; | ||
8 | import { isWindows } from '../../../environment'; | 7 | import { isWindows } from '../../../environment'; |
8 | import Icon from '../icon'; | ||
9 | 9 | ||
10 | interface IProps { | 10 | interface IProps { |
11 | field: any; | 11 | field: any; |
diff --git a/src/components/ui/infobox/index.tsx b/src/components/ui/infobox/index.tsx index a1c4f9d21..36ea6a59f 100644 --- a/src/components/ui/infobox/index.tsx +++ b/src/components/ui/infobox/index.tsx | |||
@@ -2,9 +2,9 @@ | |||
2 | import { mdiClose } from '@mdi/js'; | 2 | import { mdiClose } from '@mdi/js'; |
3 | import classnames from 'classnames'; | 3 | import classnames from 'classnames'; |
4 | import { noop } from 'lodash'; | 4 | import { noop } from 'lodash'; |
5 | import { Component, ReactElement, ReactNode } from 'react'; | 5 | import { Component, type ReactElement, type ReactNode } from 'react'; |
6 | import withStyles, { WithStylesProps } from 'react-jss'; | 6 | import withStyles, { type WithStylesProps } from 'react-jss'; |
7 | import { Theme } from '../../../themes'; | 7 | import type { Theme } from '../../../themes'; |
8 | import Icon from '../icon'; | 8 | import Icon from '../icon'; |
9 | 9 | ||
10 | const buttonStyles = (theme: Theme) => { | 10 | const buttonStyles = (theme: Theme) => { |
diff --git a/src/components/ui/input/index.tsx b/src/components/ui/input/index.tsx index 68cc9ee22..c61efe570 100644 --- a/src/components/ui/input/index.tsx +++ b/src/components/ui/input/index.tsx | |||
@@ -1,22 +1,26 @@ | |||
1 | import { mdiEye, mdiEyeOff } from '@mdi/js'; | 1 | import { mdiEye, mdiEyeOff } from '@mdi/js'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { noop } from 'lodash'; | ||
4 | import { observer } from 'mobx-react'; | ||
3 | import { | 5 | import { |
4 | Component, | 6 | Component, |
7 | type InputHTMLAttributes, | ||
8 | type KeyboardEvent, | ||
9 | type ReactElement, | ||
10 | type RefObject, | ||
5 | createRef, | 11 | createRef, |
6 | InputHTMLAttributes, | ||
7 | ReactElement, | ||
8 | RefObject, | ||
9 | KeyboardEvent, | ||
10 | } from 'react'; | 12 | } from 'react'; |
11 | import withStyles, { WithStylesProps } from 'react-jss'; | 13 | import { |
12 | import { noop } from 'lodash'; | 14 | type WrappedComponentProps, |
13 | import { observer } from 'mobx-react'; | 15 | defineMessages, |
14 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 16 | injectIntl, |
15 | import Icon from '../icon'; | 17 | } from 'react-intl'; |
16 | import { IFormField } from '../typings/generic'; | 18 | import withStyles, { type WithStylesProps } from 'react-jss'; |
17 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 19 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
18 | import Error from '../error'; | 20 | import Error from '../error'; |
21 | import Icon from '../icon'; | ||
19 | import Label from '../label'; | 22 | import Label from '../label'; |
23 | import type { IFormField } from '../typings/generic'; | ||
20 | import Wrapper from '../wrapper'; | 24 | import Wrapper from '../wrapper'; |
21 | import { scorePasswordFunc } from './scorePassword'; | 25 | import { scorePasswordFunc } from './scorePassword'; |
22 | import styles from './styles'; | 26 | import styles from './styles'; |
diff --git a/src/components/ui/input/styles.ts b/src/components/ui/input/styles.ts index ebae0e40d..580c72889 100644 --- a/src/components/ui/input/styles.ts +++ b/src/components/ui/input/styles.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Property } from 'csstype'; | 1 | import type { Property } from 'csstype'; |
2 | 2 | ||
3 | import { Theme } from '../../../themes'; | 3 | import type { Theme } from '../../../themes'; |
4 | 4 | ||
5 | const prefixStyles = (theme: Theme) => ({ | 5 | const prefixStyles = (theme: Theme) => ({ |
6 | background: theme.inputPrefixBackground, | 6 | background: theme.inputPrefixBackground, |
diff --git a/src/components/ui/label/index.tsx b/src/components/ui/label/index.tsx index 5f5cc5c8e..c0a3903b0 100644 --- a/src/components/ui/label/index.tsx +++ b/src/components/ui/label/index.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, LabelHTMLAttributes } from 'react'; | 2 | import { Component, type LabelHTMLAttributes } from 'react'; |
3 | import injectSheet, { WithStylesProps } from 'react-jss'; | 3 | import injectSheet, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import { IFormField } from '../typings/generic'; | 5 | import type { IFormField } from '../typings/generic'; |
6 | 6 | ||
7 | import styles from './styles'; | 7 | import styles from './styles'; |
8 | 8 | ||
diff --git a/src/components/ui/label/styles.ts b/src/components/ui/label/styles.ts index faa44ae5b..fecfa1816 100644 --- a/src/components/ui/label/styles.ts +++ b/src/components/ui/label/styles.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Theme } from '../../../themes'; | 1 | import type { Theme } from '../../../themes'; |
2 | 2 | ||
3 | export default (theme: Theme) => ({ | 3 | export default (theme: Theme) => ({ |
4 | content: {}, | 4 | content: {}, |
diff --git a/src/components/ui/loader/index.tsx b/src/components/ui/loader/index.tsx index c0ae15028..8757985b9 100644 --- a/src/components/ui/loader/index.tsx +++ b/src/components/ui/loader/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { inject } from 'mobx-react'; | ||
2 | import { Component } from 'react'; | 3 | import { Component } from 'react'; |
3 | import injectStyle, { WithStylesProps } from 'react-jss'; | 4 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
4 | import { Oval } from 'react-loader-spinner'; | 5 | import { Oval } from 'react-loader-spinner'; |
5 | import { inject } from 'mobx-react'; | 6 | import type { FerdiumStores } from '../../../@types/stores.types'; |
6 | import { FerdiumStores } from '../../../@types/stores.types'; | ||
7 | import { DEFAULT_LOADER_COLOR } from '../../../config'; | 7 | import { DEFAULT_LOADER_COLOR } from '../../../config'; |
8 | 8 | ||
9 | const styles = () => ({ | 9 | const styles = () => ({ |
diff --git a/src/components/ui/select/index.tsx b/src/components/ui/select/index.tsx index 0d8520f58..2716ebc2d 100644 --- a/src/components/ui/select/index.tsx +++ b/src/components/ui/select/index.tsx | |||
@@ -5,14 +5,19 @@ import { | |||
5 | } from '@mdi/js'; | 5 | } from '@mdi/js'; |
6 | import Icon from '@mdi/react'; | 6 | import Icon from '@mdi/react'; |
7 | import classnames from 'classnames'; | 7 | import classnames from 'classnames'; |
8 | import { ChangeEvent, Component, createRef, ReactElement } from 'react'; | ||
9 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
10 | import { noop } from 'lodash'; | 8 | import { noop } from 'lodash'; |
11 | import { Theme } from '../../../themes'; | 9 | import { |
12 | import { IFormField } from '../typings/generic'; | 10 | type ChangeEvent, |
11 | Component, | ||
12 | type ReactElement, | ||
13 | createRef, | ||
14 | } from 'react'; | ||
15 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
16 | import type { Theme } from '../../../themes'; | ||
13 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 17 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
14 | import Error from '../error'; | 18 | import Error from '../error'; |
15 | import Label from '../label'; | 19 | import Label from '../label'; |
20 | import type { IFormField } from '../typings/generic'; | ||
16 | import Wrapper from '../wrapper'; | 21 | import Wrapper from '../wrapper'; |
17 | 22 | ||
18 | let popupTransition: string = 'none'; | 23 | let popupTransition: string = 'none'; |
diff --git a/src/components/ui/textarea/index.tsx b/src/components/ui/textarea/index.tsx index 0967c4c25..4a0e77afe 100644 --- a/src/components/ui/textarea/index.tsx +++ b/src/components/ui/textarea/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, createRef, TextareaHTMLAttributes } from 'react'; | 2 | import { Component, type TextareaHTMLAttributes, createRef } from 'react'; |
3 | import injectSheet, { WithStylesProps } from 'react-jss'; | 3 | import injectSheet, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import { noop } from 'lodash'; | 5 | import { noop } from 'lodash'; |
6 | import { IFormField } from '../typings/generic'; | 6 | import type { IFormField } from '../typings/generic'; |
7 | 7 | ||
8 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 8 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
9 | import Error from '../error'; | 9 | import Error from '../error'; |
diff --git a/src/components/ui/textarea/styles.ts b/src/components/ui/textarea/styles.ts index 36fc2a82e..c4c27b95d 100644 --- a/src/components/ui/textarea/styles.ts +++ b/src/components/ui/textarea/styles.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Property } from 'csstype'; | 1 | import type { Property } from 'csstype'; |
2 | 2 | ||
3 | import { Theme } from '../../../themes'; | 3 | import type { Theme } from '../../../themes'; |
4 | 4 | ||
5 | export default (theme: Theme) => ({ | 5 | export default (theme: Theme) => ({ |
6 | label: { | 6 | label: { |
diff --git a/src/components/ui/toggle/index.tsx b/src/components/ui/toggle/index.tsx index 878ffecdc..dc426b3a1 100644 --- a/src/components/ui/toggle/index.tsx +++ b/src/components/ui/toggle/index.tsx | |||
@@ -1,13 +1,13 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Property } from 'csstype'; | 2 | import type { Property } from 'csstype'; |
3 | import { noop } from 'lodash'; | 3 | import { noop } from 'lodash'; |
4 | import { Component, InputHTMLAttributes, ReactElement } from 'react'; | 4 | import { Component, type InputHTMLAttributes, type ReactElement } from 'react'; |
5 | import withStyles, { WithStylesProps } from 'react-jss'; | 5 | import withStyles, { type WithStylesProps } from 'react-jss'; |
6 | import { Theme } from '../../../themes'; | 6 | import type { Theme } from '../../../themes'; |
7 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 7 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
8 | import Error from '../error'; | 8 | import Error from '../error'; |
9 | import Label from '../label'; | 9 | import Label from '../label'; |
10 | import { IFormField } from '../typings/generic'; | 10 | import type { IFormField } from '../typings/generic'; |
11 | import Wrapper from '../wrapper'; | 11 | import Wrapper from '../wrapper'; |
12 | 12 | ||
13 | const buttonTransition: string = window?.matchMedia( | 13 | const buttonTransition: string = window?.matchMedia( |
diff --git a/src/components/ui/wrapper/index.tsx b/src/components/ui/wrapper/index.tsx index 450d09fd1..081b13b36 100644 --- a/src/components/ui/wrapper/index.tsx +++ b/src/components/ui/wrapper/index.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, ReactNode } from 'react'; | 2 | import { Component, type ReactNode } from 'react'; |
3 | import injectStyle, { WithStylesProps } from 'react-jss'; | 3 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | // eslint-disable-next-line no-use-before-define | 5 | // eslint-disable-next-line no-use-before-define |
6 | interface IProps extends WithStylesProps<typeof styles> { | 6 | interface IProps extends WithStylesProps<typeof styles> { |
diff --git a/src/components/util/ErrorBoundary/index.tsx b/src/components/util/ErrorBoundary/index.tsx index 66f860835..a37d1b33a 100644 --- a/src/components/util/ErrorBoundary/index.tsx +++ b/src/components/util/ErrorBoundary/index.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, ReactNode } from 'react'; | 1 | import { Component, type ReactNode } from 'react'; |
2 | import withStyles, { WithStylesProps } from 'react-jss'; | 2 | import { type IntlShape, defineMessages, injectIntl } from 'react-intl'; |
3 | import { defineMessages, injectIntl, IntlShape } from 'react-intl'; | 3 | import withStyles, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import Button from '../../ui/button'; | 5 | import Button from '../../ui/button'; |
6 | import { H1 } from '../../ui/headline'; | 6 | import { H1 } from '../../ui/headline'; |