diff --git a/backend/api/src/main/kotlin/io/tolgee/api/v2/controllers/AdministrationController.kt b/backend/api/src/main/kotlin/io/tolgee/api/v2/controllers/AdministrationController.kt index d483c36f85..bca52cb55e 100644 --- a/backend/api/src/main/kotlin/io/tolgee/api/v2/controllers/AdministrationController.kt +++ b/backend/api/src/main/kotlin/io/tolgee/api/v2/controllers/AdministrationController.kt @@ -19,7 +19,13 @@ import org.springframework.data.domain.Pageable import org.springframework.data.web.PagedResourcesAssembler import org.springframework.data.web.SortDefault import org.springframework.hateoas.PagedModel -import org.springframework.web.bind.annotation.* +import org.springframework.web.bind.annotation.CrossOrigin +import org.springframework.web.bind.annotation.DeleteMapping +import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.PutMapping +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController import io.swagger.v3.oas.annotations.tags.Tag as OpenApiTag @Suppress("SpringJavaInjectionPointsAutowiringInspection") diff --git a/backend/app/src/test/kotlin/io/tolgee/AuthTest.kt b/backend/app/src/test/kotlin/io/tolgee/AuthTest.kt index 0e7fb79786..bb0b12b217 100644 --- a/backend/app/src/test/kotlin/io/tolgee/AuthTest.kt +++ b/backend/app/src/test/kotlin/io/tolgee/AuthTest.kt @@ -4,7 +4,11 @@ import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import io.tolgee.constants.Message import io.tolgee.controllers.PublicController -import io.tolgee.fixtures.* +import io.tolgee.fixtures.andAssertThatJson +import io.tolgee.fixtures.andIsForbidden +import io.tolgee.fixtures.andIsUnauthorized +import io.tolgee.fixtures.generateUniqueString +import io.tolgee.fixtures.mapResponseTo import io.tolgee.model.Project import io.tolgee.security.authentication.JwtService import io.tolgee.security.thirdParty.GithubOAuthDelegate.GithubEmailResponse diff --git a/backend/app/src/test/kotlin/io/tolgee/activity/ActivityLogTest.kt b/backend/app/src/test/kotlin/io/tolgee/activity/ActivityLogTest.kt index 2f7ffe896b..754fd417ae 100644 --- a/backend/app/src/test/kotlin/io/tolgee/activity/ActivityLogTest.kt +++ b/backend/app/src/test/kotlin/io/tolgee/activity/ActivityLogTest.kt @@ -5,7 +5,14 @@ import io.tolgee.ProjectAuthControllerTest import io.tolgee.batch.BatchJobService import io.tolgee.development.testDataBuilder.data.BaseTestData import io.tolgee.development.testDataBuilder.data.BatchJobsTestData -import io.tolgee.fixtures.* +import io.tolgee.fixtures.AuthorizedRequestFactory +import io.tolgee.fixtures.andAssertThatJson +import io.tolgee.fixtures.andIsOk +import io.tolgee.fixtures.andPrettyPrint +import io.tolgee.fixtures.isValidId +import io.tolgee.fixtures.node +import io.tolgee.fixtures.waitFor +import io.tolgee.fixtures.waitForNotThrowing import io.tolgee.testing.annotations.ProjectJWTAuthTestMethod import io.tolgee.testing.assert import net.javacrumbs.jsonunit.assertj.JsonAssert diff --git a/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/AdministrationControllerTest.kt b/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/AdministrationControllerTest.kt index be17c1f658..343abe144c 100644 --- a/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/AdministrationControllerTest.kt +++ b/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/AdministrationControllerTest.kt @@ -1,7 +1,12 @@ package io.tolgee.api.v2.controllers import io.tolgee.development.testDataBuilder.data.AdministrationTestData -import io.tolgee.fixtures.* +import io.tolgee.fixtures.andAssertThatJson +import io.tolgee.fixtures.andGetContentAsString +import io.tolgee.fixtures.andIsForbidden +import io.tolgee.fixtures.andIsOk +import io.tolgee.fixtures.andPrettyPrint +import io.tolgee.fixtures.node import io.tolgee.model.UserAccount import io.tolgee.testing.AuthorizedControllerTest import io.tolgee.testing.assertions.Assertions.assertThat diff --git a/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/ApiKeyControllerTest.kt b/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/ApiKeyControllerTest.kt index 993417cdb2..ccf3b26532 100644 --- a/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/ApiKeyControllerTest.kt +++ b/backend/app/src/test/kotlin/io/tolgee/api/v2/controllers/ApiKeyControllerTest.kt @@ -4,7 +4,13 @@ import io.tolgee.development.testDataBuilder.data.ApiKeysTestData import io.tolgee.development.testDataBuilder.data.LanguagePermissionsTestData import io.tolgee.dtos.request.apiKey.CreateApiKeyDto import io.tolgee.dtos.request.apiKey.V2EditApiKeyDto -import io.tolgee.fixtures.* +import io.tolgee.fixtures.andAssertThatJson +import io.tolgee.fixtures.andIsBadRequest +import io.tolgee.fixtures.andIsForbidden +import io.tolgee.fixtures.andIsOk +import io.tolgee.fixtures.andPrettyPrint +import io.tolgee.fixtures.isValidId +import io.tolgee.fixtures.node import io.tolgee.model.enums.Scope import io.tolgee.testing.AuthorizedControllerTest import io.tolgee.testing.assert diff --git a/backend/app/src/test/kotlin/io/tolgee/cache/AbstractCacheTest.kt b/backend/app/src/test/kotlin/io/tolgee/cache/AbstractCacheTest.kt index d8a9a93b3c..13019d129e 100644 --- a/backend/app/src/test/kotlin/io/tolgee/cache/AbstractCacheTest.kt +++ b/backend/app/src/test/kotlin/io/tolgee/cache/AbstractCacheTest.kt @@ -20,7 +20,11 @@ import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestInstance import org.mockito.Mockito -import org.mockito.kotlin.* +import org.mockito.kotlin.any +import org.mockito.kotlin.doAnswer +import org.mockito.kotlin.times +import org.mockito.kotlin.verify +import org.mockito.kotlin.whenever import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.test.mock.mockito.MockBean import org.springframework.boot.test.mock.mockito.SpyBean diff --git a/backend/data/src/main/kotlin/io/tolgee/component/machineTranslation/providers/AzureCognitiveApiService.kt b/backend/data/src/main/kotlin/io/tolgee/component/machineTranslation/providers/AzureCognitiveApiService.kt index fa1017583c..7cc2e82e26 100644 --- a/backend/data/src/main/kotlin/io/tolgee/component/machineTranslation/providers/AzureCognitiveApiService.kt +++ b/backend/data/src/main/kotlin/io/tolgee/component/machineTranslation/providers/AzureCognitiveApiService.kt @@ -4,7 +4,11 @@ import com.fasterxml.jackson.annotation.JsonProperty import io.tolgee.configuration.tolgee.machineTranslation.AzureCognitiveTranslationProperties import org.springframework.beans.factory.config.ConfigurableBeanFactory import org.springframework.context.annotation.Scope -import org.springframework.http.* +import org.springframework.http.HttpEntity +import org.springframework.http.HttpHeaders +import org.springframework.http.HttpMethod +import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity import org.springframework.stereotype.Component import org.springframework.web.client.RestTemplate import org.springframework.web.client.exchange diff --git a/backend/data/src/main/kotlin/io/tolgee/configuration/ActivityHolderConfig.kt b/backend/data/src/main/kotlin/io/tolgee/configuration/ActivityHolderConfig.kt index c754faf792..0890fb07b9 100644 --- a/backend/data/src/main/kotlin/io/tolgee/configuration/ActivityHolderConfig.kt +++ b/backend/data/src/main/kotlin/io/tolgee/configuration/ActivityHolderConfig.kt @@ -7,7 +7,11 @@ import org.springframework.beans.factory.annotation.Qualifier import org.springframework.beans.factory.config.BeanDefinition import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.context.ApplicationContext -import org.springframework.context.annotation.* +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration +import org.springframework.context.annotation.Primary +import org.springframework.context.annotation.Scope +import org.springframework.context.annotation.ScopedProxyMode import org.springframework.web.context.annotation.RequestScope @Configuration diff --git a/backend/data/src/main/kotlin/io/tolgee/development/testDataBuilder/data/LanguagePermissionsTestData.kt b/backend/data/src/main/kotlin/io/tolgee/development/testDataBuilder/data/LanguagePermissionsTestData.kt index 86a6434fe3..9b547b9f46 100644 --- a/backend/data/src/main/kotlin/io/tolgee/development/testDataBuilder/data/LanguagePermissionsTestData.kt +++ b/backend/data/src/main/kotlin/io/tolgee/development/testDataBuilder/data/LanguagePermissionsTestData.kt @@ -2,7 +2,11 @@ package io.tolgee.development.testDataBuilder.data import io.tolgee.development.testDataBuilder.builders.ProjectBuilder import io.tolgee.development.testDataBuilder.builders.TestDataBuilder -import io.tolgee.model.* +import io.tolgee.model.ApiKey +import io.tolgee.model.Language +import io.tolgee.model.Permission +import io.tolgee.model.Project +import io.tolgee.model.UserAccount import io.tolgee.model.enums.ProjectPermissionType import io.tolgee.model.enums.Scope import io.tolgee.model.translation.Translation diff --git a/backend/data/src/main/kotlin/io/tolgee/service/automations/AutomationService.kt b/backend/data/src/main/kotlin/io/tolgee/service/automations/AutomationService.kt index 9851b60ece..5f0964b265 100644 --- a/backend/data/src/main/kotlin/io/tolgee/service/automations/AutomationService.kt +++ b/backend/data/src/main/kotlin/io/tolgee/service/automations/AutomationService.kt @@ -5,7 +5,11 @@ import io.tolgee.constants.Caches import io.tolgee.dtos.cacheable.automations.AutomationDto import io.tolgee.exceptions.NotFoundException import io.tolgee.model.Project -import io.tolgee.model.automations.* +import io.tolgee.model.automations.Automation +import io.tolgee.model.automations.AutomationAction +import io.tolgee.model.automations.AutomationActionType +import io.tolgee.model.automations.AutomationTrigger +import io.tolgee.model.automations.AutomationTriggerType import io.tolgee.model.contentDelivery.ContentDeliveryConfig import io.tolgee.model.webhook.WebhookConfig import io.tolgee.repository.AutomationRepository diff --git a/backend/data/src/test/kotlin/io/tolgee/unit/cachePurging/AzureContentStorageConfigCachePurgingTest.kt b/backend/data/src/test/kotlin/io/tolgee/unit/cachePurging/AzureContentStorageConfigCachePurgingTest.kt index 212da63ccb..ab992d94cb 100644 --- a/backend/data/src/test/kotlin/io/tolgee/unit/cachePurging/AzureContentStorageConfigCachePurgingTest.kt +++ b/backend/data/src/test/kotlin/io/tolgee/unit/cachePurging/AzureContentStorageConfigCachePurgingTest.kt @@ -9,7 +9,11 @@ import io.tolgee.testing.assert import net.javacrumbs.jsonunit.assertj.assertThatJson import org.junit.jupiter.api.Test import org.mockito.Mockito -import org.mockito.kotlin.* +import org.mockito.kotlin.any +import org.mockito.kotlin.doAnswer +import org.mockito.kotlin.eq +import org.mockito.kotlin.mock +import org.mockito.kotlin.whenever import org.springframework.http.HttpEntity import org.springframework.http.HttpMethod import org.springframework.http.HttpStatusCode diff --git a/backend/testing/src/main/kotlin/io/tolgee/AbstractSpringTest.kt b/backend/testing/src/main/kotlin/io/tolgee/AbstractSpringTest.kt index 1e8904a7b7..257aca184b 100644 --- a/backend/testing/src/main/kotlin/io/tolgee/AbstractSpringTest.kt +++ b/backend/testing/src/main/kotlin/io/tolgee/AbstractSpringTest.kt @@ -18,7 +18,11 @@ import io.tolgee.configuration.tolgee.machineTranslation.TolgeeMachineTranslatio import io.tolgee.constants.MtServiceType import io.tolgee.development.DbPopulatorReal import io.tolgee.development.testDataBuilder.TestDataService -import io.tolgee.repository.* +import io.tolgee.repository.EmailVerificationRepository +import io.tolgee.repository.KeyRepository +import io.tolgee.repository.OrganizationRepository +import io.tolgee.repository.OrganizationRoleRepository +import io.tolgee.repository.ProjectRepository import io.tolgee.security.InitialPasswordManager import io.tolgee.service.EmailVerificationService import io.tolgee.service.ImageUploadService @@ -36,7 +40,12 @@ import io.tolgee.service.organization.OrganizationRoleService import io.tolgee.service.organization.OrganizationService import io.tolgee.service.project.LanguageStatsService import io.tolgee.service.project.ProjectService -import io.tolgee.service.security.* +import io.tolgee.service.security.ApiKeyService +import io.tolgee.service.security.MfaService +import io.tolgee.service.security.PatService +import io.tolgee.service.security.PermissionService +import io.tolgee.service.security.UserAccountService +import io.tolgee.service.security.UserPreferencesService import io.tolgee.service.translation.TranslationCommentService import io.tolgee.service.translation.TranslationService import io.tolgee.testing.AbstractTransactionalTest diff --git a/webapp/src/component/languages/LanguageAutocomplete.tsx b/webapp/src/component/languages/LanguageAutocomplete.tsx index 5371f3335f..81990c9357 100644 --- a/webapp/src/component/languages/LanguageAutocomplete.tsx +++ b/webapp/src/component/languages/LanguageAutocomplete.tsx @@ -1,9 +1,16 @@ -import React, {FC, ReactNode, useState} from 'react'; -import {Autocomplete, Box, IconButton, InputAdornment, MenuItem, TextField} from '@mui/material'; -import {Add, Clear} from '@mui/icons-material'; -import {suggest} from '@tginternal/language-util'; -import {SuggestResult} from '@tginternal/language-util/lib/suggesting'; -import {T} from '@tolgee/react'; +import React, { FC, ReactNode, useState } from 'react'; +import { + Autocomplete, + Box, + IconButton, + InputAdornment, + MenuItem, + TextField, +} from '@mui/material'; +import { Add, Clear } from '@mui/icons-material'; +import { suggest } from '@tginternal/language-util'; +import { SuggestResult } from '@tginternal/language-util/lib/suggesting'; +import { T } from '@tolgee/react'; export type AutocompleteOption = Omit & { isNew?: true; diff --git a/webapp/src/component/layout/BaseViewAddButton.tsx b/webapp/src/component/layout/BaseViewAddButton.tsx index 0de665a6b8..87cd3b1a45 100644 --- a/webapp/src/component/layout/BaseViewAddButton.tsx +++ b/webapp/src/component/layout/BaseViewAddButton.tsx @@ -1,7 +1,7 @@ -import {Button} from '@mui/material'; -import {Link} from 'react-router-dom'; -import {Add} from '@mui/icons-material'; -import {T} from '@tolgee/react'; +import { Button } from '@mui/material'; +import { Link } from 'react-router-dom'; +import { Add } from '@mui/icons-material'; +import { T } from '@tolgee/react'; export const BaseViewAddButton = (props: { addLinkTo?: string; diff --git a/webapp/src/views/administration/AdministrationCloudPlanCreateView.tsx b/webapp/src/views/administration/AdministrationCloudPlanCreateView.tsx index c90954e200..6681feb998 100644 --- a/webapp/src/views/administration/AdministrationCloudPlanCreateView.tsx +++ b/webapp/src/views/administration/AdministrationCloudPlanCreateView.tsx @@ -1,13 +1,13 @@ -import {Box, Typography} from '@mui/material'; -import {T, useTranslate} from '@tolgee/react'; -import {useHistory} from 'react-router-dom'; +import { Box, Typography } from '@mui/material'; +import { T, useTranslate } from '@tolgee/react'; +import { useHistory } from 'react-router-dom'; -import {DashboardPage} from 'tg.component/layout/DashboardPage'; -import {LINKS} from 'tg.constants/links'; -import {useMessage} from 'tg.hooks/useSuccessMessage'; -import {useBillingApiMutation} from 'tg.service/http/useQueryApi'; -import {BaseAdministrationView} from './components/BaseAdministrationView'; -import {CloudPlanForm} from './components/CloudPlanForm'; +import { DashboardPage } from 'tg.component/layout/DashboardPage'; +import { LINKS } from 'tg.constants/links'; +import { useMessage } from 'tg.hooks/useSuccessMessage'; +import { useBillingApiMutation } from 'tg.service/http/useQueryApi'; +import { BaseAdministrationView } from './components/BaseAdministrationView'; +import { CloudPlanForm } from './components/CloudPlanForm'; export const AdministrationCloudPlanCreateView = () => { const messaging = useMessage(); diff --git a/webapp/src/views/administration/AdministrationCloudPlanEditView.tsx b/webapp/src/views/administration/AdministrationCloudPlanEditView.tsx index e43317d238..7de3a2e91f 100644 --- a/webapp/src/views/administration/AdministrationCloudPlanEditView.tsx +++ b/webapp/src/views/administration/AdministrationCloudPlanEditView.tsx @@ -1,14 +1,17 @@ -import {Box, Typography} from '@mui/material'; -import {T, useTranslate} from '@tolgee/react'; -import {useHistory, useRouteMatch} from 'react-router-dom'; -import {SpinnerProgress} from 'tg.component/SpinnerProgress'; +import { Box, Typography } from '@mui/material'; +import { T, useTranslate } from '@tolgee/react'; +import { useHistory, useRouteMatch } from 'react-router-dom'; +import { SpinnerProgress } from 'tg.component/SpinnerProgress'; -import {DashboardPage} from 'tg.component/layout/DashboardPage'; -import {LINKS, PARAMS} from 'tg.constants/links'; -import {useMessage} from 'tg.hooks/useSuccessMessage'; -import {useBillingApiMutation, useBillingApiQuery,} from 'tg.service/http/useQueryApi'; -import {BaseAdministrationView} from './components/BaseAdministrationView'; -import {CloudPlanForm} from './components/CloudPlanForm'; +import { DashboardPage } from 'tg.component/layout/DashboardPage'; +import { LINKS, PARAMS } from 'tg.constants/links'; +import { useMessage } from 'tg.hooks/useSuccessMessage'; +import { + useBillingApiMutation, + useBillingApiQuery, +} from 'tg.service/http/useQueryApi'; +import { BaseAdministrationView } from './components/BaseAdministrationView'; +import { CloudPlanForm } from './components/CloudPlanForm'; export const AdministrationCloudPlanEditView = () => { const match = useRouteMatch(); diff --git a/webapp/src/views/administration/AdministrationCloudPlansView.tsx b/webapp/src/views/administration/AdministrationCloudPlansView.tsx index 1120d67682..4df8d3c09e 100644 --- a/webapp/src/views/administration/AdministrationCloudPlansView.tsx +++ b/webapp/src/views/administration/AdministrationCloudPlansView.tsx @@ -1,15 +1,26 @@ -import {T, useTranslate} from '@tolgee/react'; -import {Box, Button, Chip, IconButton, ListItem, ListItemText, Paper,} from '@mui/material'; +import { T, useTranslate } from '@tolgee/react'; +import { + Box, + Button, + Chip, + IconButton, + ListItem, + ListItemText, + Paper, +} from '@mui/material'; -import {DashboardPage} from 'tg.component/layout/DashboardPage'; -import {LINKS, PARAMS} from 'tg.constants/links'; -import {useBillingApiMutation, useBillingApiQuery,} from 'tg.service/http/useQueryApi'; -import {BaseAdministrationView} from './components/BaseAdministrationView'; -import {Link} from 'react-router-dom'; -import {Delete} from '@mui/icons-material'; -import {useMessage} from 'tg.hooks/useSuccessMessage'; -import {confirmation} from 'tg.hooks/confirmation'; -import {components} from 'tg.service/billingApiSchema.generated'; +import { DashboardPage } from 'tg.component/layout/DashboardPage'; +import { LINKS, PARAMS } from 'tg.constants/links'; +import { + useBillingApiMutation, + useBillingApiQuery, +} from 'tg.service/http/useQueryApi'; +import { BaseAdministrationView } from './components/BaseAdministrationView'; +import { Link } from 'react-router-dom'; +import { Delete } from '@mui/icons-material'; +import { useMessage } from 'tg.hooks/useSuccessMessage'; +import { confirmation } from 'tg.hooks/confirmation'; +import { components } from 'tg.service/billingApiSchema.generated'; type CloudPlanModel = components['schemas']['CloudPlanModel']; diff --git a/webapp/src/views/administration/AdministrationEeLicenseView.tsx b/webapp/src/views/administration/AdministrationEeLicenseView.tsx index 2b82612c61..885305ffee 100644 --- a/webapp/src/views/administration/AdministrationEeLicenseView.tsx +++ b/webapp/src/views/administration/AdministrationEeLicenseView.tsx @@ -1,13 +1,13 @@ -import {useTranslate} from '@tolgee/react'; -import {Box, styled} from '@mui/material'; +import { useTranslate } from '@tolgee/react'; +import { Box, styled } from '@mui/material'; -import {DashboardPage} from 'tg.component/layout/DashboardPage'; -import {useApiQuery} from 'tg.service/http/useQueryApi'; -import {SetupLicenceKey} from './eeLicense/SetupLicenceKey'; -import {ActiveEeLicense} from './eeLicense/ActiveEeLicense'; -import {BaseAdministrationView} from './components/BaseAdministrationView'; -import {LINKS} from 'tg.constants/links'; -import {EeLicenseHint} from './eeLicense/EeLicenseHint'; +import { DashboardPage } from 'tg.component/layout/DashboardPage'; +import { useApiQuery } from 'tg.service/http/useQueryApi'; +import { SetupLicenceKey } from './eeLicense/SetupLicenceKey'; +import { ActiveEeLicense } from './eeLicense/ActiveEeLicense'; +import { BaseAdministrationView } from './components/BaseAdministrationView'; +import { LINKS } from 'tg.constants/links'; +import { EeLicenseHint } from './eeLicense/EeLicenseHint'; const StyledWrapper = styled('div')` display: flex; diff --git a/webapp/src/views/administration/AdministrationEePlanCreateView.tsx b/webapp/src/views/administration/AdministrationEePlanCreateView.tsx index 85bd1fed9b..6e1b00fbb0 100644 --- a/webapp/src/views/administration/AdministrationEePlanCreateView.tsx +++ b/webapp/src/views/administration/AdministrationEePlanCreateView.tsx @@ -1,13 +1,13 @@ -import {Box, Typography} from '@mui/material'; -import {T, useTranslate} from '@tolgee/react'; -import {useHistory} from 'react-router-dom'; +import { Box, Typography } from '@mui/material'; +import { T, useTranslate } from '@tolgee/react'; +import { useHistory } from 'react-router-dom'; -import {DashboardPage} from 'tg.component/layout/DashboardPage'; -import {LINKS} from 'tg.constants/links'; -import {useMessage} from 'tg.hooks/useSuccessMessage'; -import {useBillingApiMutation} from 'tg.service/http/useQueryApi'; -import {BaseAdministrationView} from './components/BaseAdministrationView'; -import {EePlanForm} from './components/EePlanForm'; +import { DashboardPage } from 'tg.component/layout/DashboardPage'; +import { LINKS } from 'tg.constants/links'; +import { useMessage } from 'tg.hooks/useSuccessMessage'; +import { useBillingApiMutation } from 'tg.service/http/useQueryApi'; +import { BaseAdministrationView } from './components/BaseAdministrationView'; +import { EePlanForm } from './components/EePlanForm'; export const AdministrationEePlanCreateView = () => { const messaging = useMessage(); diff --git a/webapp/src/views/administration/AdministrationEePlanEditView.tsx b/webapp/src/views/administration/AdministrationEePlanEditView.tsx index bb5c34a98b..c2fc9cd172 100644 --- a/webapp/src/views/administration/AdministrationEePlanEditView.tsx +++ b/webapp/src/views/administration/AdministrationEePlanEditView.tsx @@ -1,14 +1,17 @@ -import {Box, Typography} from '@mui/material'; -import {T, useTranslate} from '@tolgee/react'; -import {useHistory, useRouteMatch} from 'react-router-dom'; +import { Box, Typography } from '@mui/material'; +import { T, useTranslate } from '@tolgee/react'; +import { useHistory, useRouteMatch } from 'react-router-dom'; -import {SpinnerProgress} from 'tg.component/SpinnerProgress'; -import {DashboardPage} from 'tg.component/layout/DashboardPage'; -import {LINKS, PARAMS} from 'tg.constants/links'; -import {useMessage} from 'tg.hooks/useSuccessMessage'; -import {useBillingApiMutation, useBillingApiQuery,} from 'tg.service/http/useQueryApi'; -import {BaseAdministrationView} from './components/BaseAdministrationView'; -import {EePlanForm} from './components/EePlanForm'; +import { SpinnerProgress } from 'tg.component/SpinnerProgress'; +import { DashboardPage } from 'tg.component/layout/DashboardPage'; +import { LINKS, PARAMS } from 'tg.constants/links'; +import { useMessage } from 'tg.hooks/useSuccessMessage'; +import { + useBillingApiMutation, + useBillingApiQuery, +} from 'tg.service/http/useQueryApi'; +import { BaseAdministrationView } from './components/BaseAdministrationView'; +import { EePlanForm } from './components/EePlanForm'; export const AdministrationEePlanEditView = () => { const match = useRouteMatch(); diff --git a/webapp/src/views/administration/AdministrationEePlansView.tsx b/webapp/src/views/administration/AdministrationEePlansView.tsx index 78f021f101..3a31a2f92b 100644 --- a/webapp/src/views/administration/AdministrationEePlansView.tsx +++ b/webapp/src/views/administration/AdministrationEePlansView.tsx @@ -1,15 +1,26 @@ -import {T, useTranslate} from '@tolgee/react'; -import {Box, Button, Chip, IconButton, ListItem, ListItemText, Paper,} from '@mui/material'; +import { T, useTranslate } from '@tolgee/react'; +import { + Box, + Button, + Chip, + IconButton, + ListItem, + ListItemText, + Paper, +} from '@mui/material'; -import {DashboardPage} from 'tg.component/layout/DashboardPage'; -import {LINKS, PARAMS} from 'tg.constants/links'; -import {useBillingApiMutation, useBillingApiQuery,} from 'tg.service/http/useQueryApi'; -import {BaseAdministrationView} from './components/BaseAdministrationView'; -import {Link} from 'react-router-dom'; -import {Delete} from '@mui/icons-material'; -import {useMessage} from 'tg.hooks/useSuccessMessage'; -import {confirmation} from 'tg.hooks/confirmation'; -import {components} from 'tg.service/billingApiSchema.generated'; +import { DashboardPage } from 'tg.component/layout/DashboardPage'; +import { LINKS, PARAMS } from 'tg.constants/links'; +import { + useBillingApiMutation, + useBillingApiQuery, +} from 'tg.service/http/useQueryApi'; +import { BaseAdministrationView } from './components/BaseAdministrationView'; +import { Link } from 'react-router-dom'; +import { Delete } from '@mui/icons-material'; +import { useMessage } from 'tg.hooks/useSuccessMessage'; +import { confirmation } from 'tg.hooks/confirmation'; +import { components } from 'tg.service/billingApiSchema.generated'; type SelfHostedEePlanModel = components['schemas']['SelfHostedEePlanModel']; diff --git a/webapp/src/views/administration/AdministrationOrganizations.tsx b/webapp/src/views/administration/AdministrationOrganizations.tsx index ac5d260b34..d75ddd0e5b 100644 --- a/webapp/src/views/administration/AdministrationOrganizations.tsx +++ b/webapp/src/views/administration/AdministrationOrganizations.tsx @@ -1,14 +1,21 @@ -import {useState} from 'react'; -import {Link, useHistory} from 'react-router-dom'; -import {T, useTranslate} from '@tolgee/react'; -import {Box, Button, ListItem, ListItemSecondaryAction, ListItemText, styled,} from '@mui/material'; +import { useState } from 'react'; +import { Link, useHistory } from 'react-router-dom'; +import { T, useTranslate } from '@tolgee/react'; +import { + Box, + Button, + ListItem, + ListItemSecondaryAction, + ListItemText, + styled, +} from '@mui/material'; -import {PaginatedHateoasList} from 'tg.component/common/list/PaginatedHateoasList'; -import {DashboardPage} from 'tg.component/layout/DashboardPage'; -import {useApiQuery} from 'tg.service/http/useQueryApi'; -import {usePreferredOrganization} from 'tg.globalContext/helpers'; -import {LINKS, PARAMS} from 'tg.constants/links'; -import {BaseAdministrationView} from './components/BaseAdministrationView'; +import { PaginatedHateoasList } from 'tg.component/common/list/PaginatedHateoasList'; +import { DashboardPage } from 'tg.component/layout/DashboardPage'; +import { useApiQuery } from 'tg.service/http/useQueryApi'; +import { usePreferredOrganization } from 'tg.globalContext/helpers'; +import { LINKS, PARAMS } from 'tg.constants/links'; +import { BaseAdministrationView } from './components/BaseAdministrationView'; const StyledWrapper = styled('div')` display: flex; diff --git a/webapp/src/views/administration/AdministrationUsers.tsx b/webapp/src/views/administration/AdministrationUsers.tsx index 34382c6116..a116b5ab7d 100644 --- a/webapp/src/views/administration/AdministrationUsers.tsx +++ b/webapp/src/views/administration/AdministrationUsers.tsx @@ -1,15 +1,15 @@ -import {useState} from 'react'; -import {useTranslate} from '@tolgee/react'; -import {Box, ListItem, ListItemText, styled} from '@mui/material'; +import { useState } from 'react'; +import { useTranslate } from '@tolgee/react'; +import { Box, ListItem, ListItemText, styled } from '@mui/material'; -import {PaginatedHateoasList} from 'tg.component/common/list/PaginatedHateoasList'; -import {DashboardPage} from 'tg.component/layout/DashboardPage'; -import {useApiQuery} from 'tg.service/http/useQueryApi'; -import {LINKS} from 'tg.constants/links'; -import {DebugCustomerAccountButton} from './components/DebugCustomerAccountButton'; -import {RoleSelector} from './components/RoleSelector'; -import {BaseAdministrationView} from './components/BaseAdministrationView'; -import {OptionsButton} from './components/OptionsButton'; +import { PaginatedHateoasList } from 'tg.component/common/list/PaginatedHateoasList'; +import { DashboardPage } from 'tg.component/layout/DashboardPage'; +import { useApiQuery } from 'tg.service/http/useQueryApi'; +import { LINKS } from 'tg.constants/links'; +import { DebugCustomerAccountButton } from './components/DebugCustomerAccountButton'; +import { RoleSelector } from './components/RoleSelector'; +import { BaseAdministrationView } from './components/BaseAdministrationView'; +import { OptionsButton } from './components/OptionsButton'; const StyledWrapper = styled('div')` display: flex; diff --git a/webapp/src/views/administration/components/BaseAdministrationView.tsx b/webapp/src/views/administration/components/BaseAdministrationView.tsx index b5393737f6..a5de514b34 100644 --- a/webapp/src/views/administration/components/BaseAdministrationView.tsx +++ b/webapp/src/views/administration/components/BaseAdministrationView.tsx @@ -1,12 +1,12 @@ -import {useTranslate} from '@tolgee/react'; +import { useTranslate } from '@tolgee/react'; -import {BaseViewProps} from 'tg.component/layout/BaseView'; -import {LINKS} from 'tg.constants/links'; +import { BaseViewProps } from 'tg.component/layout/BaseView'; +import { LINKS } from 'tg.constants/links'; -import {NavigationItem} from 'tg.component/navigation/Navigation'; -import {BaseSettingsView} from 'tg.component/layout/BaseSettingsView/BaseSettingsView'; -import {SettingsMenuItem} from 'tg.component/layout/BaseSettingsView/SettingsMenu'; -import {useConfig} from 'tg.globalContext/helpers'; +import { NavigationItem } from 'tg.component/navigation/Navigation'; +import { BaseSettingsView } from 'tg.component/layout/BaseSettingsView/BaseSettingsView'; +import { SettingsMenuItem } from 'tg.component/layout/BaseSettingsView/SettingsMenu'; +import { useConfig } from 'tg.globalContext/helpers'; type Props = BaseViewProps; diff --git a/webapp/src/views/projects/import/component/LanguageSelector.tsx b/webapp/src/views/projects/import/component/LanguageSelector.tsx index 9cec25fed2..46ab369567 100644 --- a/webapp/src/views/projects/import/component/LanguageSelector.tsx +++ b/webapp/src/views/projects/import/component/LanguageSelector.tsx @@ -1,25 +1,25 @@ import { - FormControl, - FormHelperText, - IconButton, - InputAdornment, - InputLabel, - MenuItem, - Select, - styled, + FormControl, + FormHelperText, + IconButton, + InputAdornment, + InputLabel, + MenuItem, + Select, + styled, } from '@mui/material'; -import {Add, Clear} from '@mui/icons-material'; -import {T} from '@tolgee/react'; -import {useQueryClient} from 'react-query'; +import { Add, Clear } from '@mui/icons-material'; +import { T } from '@tolgee/react'; +import { useQueryClient } from 'react-query'; -import {useStateObject} from 'tg.fixtures/useStateObject'; -import {useProjectLanguages} from 'tg.hooks/useProjectLanguages'; -import {invalidateUrlPrefix} from 'tg.service/http/useQueryApi'; +import { useStateObject } from 'tg.fixtures/useStateObject'; +import { useProjectLanguages } from 'tg.hooks/useProjectLanguages'; +import { invalidateUrlPrefix } from 'tg.service/http/useQueryApi'; -import {useImportDataHelper} from '../hooks/useImportDataHelper'; -import {ImportLanguageCreateDialog} from './ImportLanguageCreateDialog'; -import {useImportLanguageHelper} from '../hooks/useImportLanguageHelper'; -import {components} from 'tg.service/apiSchema.generated'; +import { useImportDataHelper } from '../hooks/useImportDataHelper'; +import { ImportLanguageCreateDialog } from './ImportLanguageCreateDialog'; +import { useImportLanguageHelper } from '../hooks/useImportLanguageHelper'; +import { components } from 'tg.service/apiSchema.generated'; const StyledItem = styled(MenuItem)` padding: ${({ theme }) => theme.spacing(1, 2)}; diff --git a/webapp/src/views/projects/translations/TranslationTools/MachineTranslation.tsx b/webapp/src/views/projects/translations/TranslationTools/MachineTranslation.tsx index 2058221fef..6b01bb6093 100644 --- a/webapp/src/views/projects/translations/TranslationTools/MachineTranslation.tsx +++ b/webapp/src/views/projects/translations/TranslationTools/MachineTranslation.tsx @@ -1,16 +1,16 @@ -import {Button, Skeleton, styled} from '@mui/material'; -import {T, useTranslate} from '@tolgee/react'; +import { Button, Skeleton, styled } from '@mui/material'; +import { T, useTranslate } from '@tolgee/react'; -import {TabMessage} from './TabMessage'; -import {useTranslationTools} from './useTranslationTools'; -import {getLanguageDirection} from 'tg.fixtures/getLanguageDirection'; -import {ProviderLogo} from './ProviderLogo'; -import {CombinedMTResponse} from './useMTStreamed'; -import {UseQueryResult} from 'react-query'; -import {ApiError} from 'tg.service/http/ApiError'; -import {TranslatedError} from 'tg.translationTools/TranslatedError'; +import { TabMessage } from './TabMessage'; +import { useTranslationTools } from './useTranslationTools'; +import { getLanguageDirection } from 'tg.fixtures/getLanguageDirection'; +import { ProviderLogo } from './ProviderLogo'; +import { CombinedMTResponse } from './useMTStreamed'; +import { UseQueryResult } from 'react-query'; +import { ApiError } from 'tg.service/http/ApiError'; +import { TranslatedError } from 'tg.translationTools/TranslatedError'; import clsx from 'clsx'; -import {GoToBilling} from 'tg.component/GoToBilling'; +import { GoToBilling } from 'tg.component/GoToBilling'; const StyledContainer = styled('div')` display: flex; diff --git a/webapp/src/views/userSettings/apiKeys/ApiKeyListItem.tsx b/webapp/src/views/userSettings/apiKeys/ApiKeyListItem.tsx index c45560e41d..31bb238bc6 100644 --- a/webapp/src/views/userSettings/apiKeys/ApiKeyListItem.tsx +++ b/webapp/src/views/userSettings/apiKeys/ApiKeyListItem.tsx @@ -1,14 +1,14 @@ -import {useApiMutation} from 'tg.service/http/useQueryApi'; -import {components} from 'tg.service/apiSchema.generated'; -import {confirmation} from 'tg.hooks/confirmation'; -import {T} from '@tolgee/react'; -import {Box, Button, styled} from '@mui/material'; -import {Link} from 'react-router-dom'; -import {LINKS, PARAMS} from 'tg.constants/links'; -import {useMessage} from 'tg.hooks/useSuccessMessage'; -import {Edit} from '@mui/icons-material'; -import {ApiKeyExpiryInfo} from './ApiKeyExpiryInfo'; -import {NewApiKeyInfo} from './NewApiKeyInfo'; +import { useApiMutation } from 'tg.service/http/useQueryApi'; +import { components } from 'tg.service/apiSchema.generated'; +import { confirmation } from 'tg.hooks/confirmation'; +import { T } from '@tolgee/react'; +import { Box, Button, styled } from '@mui/material'; +import { Link } from 'react-router-dom'; +import { LINKS, PARAMS } from 'tg.constants/links'; +import { useMessage } from 'tg.hooks/useSuccessMessage'; +import { Edit } from '@mui/icons-material'; +import { ApiKeyExpiryInfo } from './ApiKeyExpiryInfo'; +import { NewApiKeyInfo } from './NewApiKeyInfo'; const StyledRoot = styled(Box)` display: grid; diff --git a/webapp/src/views/userSettings/apiKeys/ApiKeysView.tsx b/webapp/src/views/userSettings/apiKeys/ApiKeysView.tsx index 625b792c2c..24668a1d39 100644 --- a/webapp/src/views/userSettings/apiKeys/ApiKeysView.tsx +++ b/webapp/src/views/userSettings/apiKeys/ApiKeysView.tsx @@ -1,18 +1,18 @@ -import {FunctionComponent, useState} from 'react'; -import {T, useTranslate} from '@tolgee/react'; -import {Link, Route} from 'react-router-dom'; -import {LINKS} from 'tg.constants/links'; -import {useApiQuery} from 'tg.service/http/useQueryApi'; -import {BaseUserSettingsView} from '../BaseUserSettingsView'; -import {PaginatedHateoasList} from 'tg.component/common/list/PaginatedHateoasList'; -import {ApiKeyListItem} from './ApiKeyListItem'; -import {ApiKeysEmptyListMessage} from './ApiKeysEmptyListMessage'; -import {GenerateApiKeyDialog} from './GenerateApiKeyDialog'; -import {NewTokenType} from '../pats/PatListItem'; -import {components} from 'tg.service/apiSchema.generated'; -import {EditApiKeyDialog} from './EditApiKeyDialog'; -import {RegenerateApiKeyDialog} from './RegenerateApiKeyDialog'; -import {Box, styled} from '@mui/material'; +import { FunctionComponent, useState } from 'react'; +import { T, useTranslate } from '@tolgee/react'; +import { Link, Route } from 'react-router-dom'; +import { LINKS } from 'tg.constants/links'; +import { useApiQuery } from 'tg.service/http/useQueryApi'; +import { BaseUserSettingsView } from '../BaseUserSettingsView'; +import { PaginatedHateoasList } from 'tg.component/common/list/PaginatedHateoasList'; +import { ApiKeyListItem } from './ApiKeyListItem'; +import { ApiKeysEmptyListMessage } from './ApiKeysEmptyListMessage'; +import { GenerateApiKeyDialog } from './GenerateApiKeyDialog'; +import { NewTokenType } from '../pats/PatListItem'; +import { components } from 'tg.service/apiSchema.generated'; +import { EditApiKeyDialog } from './EditApiKeyDialog'; +import { RegenerateApiKeyDialog } from './RegenerateApiKeyDialog'; +import { Box, styled } from '@mui/material'; const StyledLink = styled(Link)` color: ${({ theme }) => theme.palette.primary.main};