diff --git a/packages/login/src/app/(root)/confirm/Activation/page.tsx b/packages/login/src/app/(root)/confirm/Activation/page.tsx index 6da18a38f8..912c73e2ad 100644 --- a/packages/login/src/app/(root)/confirm/Activation/page.tsx +++ b/packages/login/src/app/(root)/confirm/Activation/page.tsx @@ -26,8 +26,7 @@ import { FormWrapper } from "@docspace/shared/components/form-wrapper"; -import { getSettings, getUserFromConfirm } from "@/utils/actions"; - +import { getSettings } from "@/utils/actions"; import ActivateUserForm from "@/components/ActivateUserForm"; import { GreetingCreateUserContainer } from "@/components/GreetingContainer"; diff --git a/packages/login/src/app/(root)/confirm/Auth/page.tsx b/packages/login/src/app/(root)/confirm/Auth/page.tsx index 7f76bf3d21..6eba3f126b 100644 --- a/packages/login/src/app/(root)/confirm/Auth/page.tsx +++ b/packages/login/src/app/(root)/confirm/Auth/page.tsx @@ -25,7 +25,6 @@ // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode import AuthHandler from "@/components/AuthHandler"; -import EmailActivationHandler from "@/components/EmailActivationHandler"; type AuthProps = { searchParams: { [key: string]: string }; diff --git a/packages/login/src/app/(root)/confirm/TfaAuth/page.tsx b/packages/login/src/app/(root)/confirm/TfaAuth/page.tsx index 7457292f98..1005ebd156 100644 --- a/packages/login/src/app/(root)/confirm/TfaAuth/page.tsx +++ b/packages/login/src/app/(root)/confirm/TfaAuth/page.tsx @@ -24,11 +24,12 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode +import { FormWrapper } from "@docspace/shared/components/form-wrapper"; + import { GreetingContainer } from "@/components/GreetingContainer"; import TfaAuthForm from "@/components/TfaAuthForm"; import { getStringFromSearchParams } from "@/utils"; import { getSettings, getUserFromConfirm } from "@/utils/actions"; -import { FormWrapper } from "@docspace/shared/components/form-wrapper"; type TfaAuthProps = { searchParams: { [key: string]: string }; diff --git a/packages/login/src/app/wizard/layout.tsx b/packages/login/src/app/wizard/layout.tsx index e2e511b1e7..4f469d3d9e 100644 --- a/packages/login/src/app/wizard/layout.tsx +++ b/packages/login/src/app/wizard/layout.tsx @@ -28,7 +28,7 @@ import { cookies } from "next/headers"; import { SYSTEM_THEME_KEY } from "@docspace/shared/constants"; import { ThemeKeys } from "@docspace/shared/enums"; -import { getBgPattern, getLogoUrl } from "@docspace/shared/utils/common"; +import { getBgPattern } from "@docspace/shared/utils/common"; import { Scrollbar } from "@docspace/shared/components/scrollbar"; import { ColorTheme, ThemeId } from "@docspace/shared/components/color-theme"; import { FormWrapper } from "@docspace/shared/components/form-wrapper"; diff --git a/packages/login/src/components/AuthHandler/index.tsx b/packages/login/src/components/AuthHandler/index.tsx index 1b8def934c..c5f5c2d084 100644 --- a/packages/login/src/components/AuthHandler/index.tsx +++ b/packages/login/src/components/AuthHandler/index.tsx @@ -26,19 +26,21 @@ "use client"; +import { useSearchParams } from "next/navigation"; +import { useContext, useEffect } from "react"; + import { toastr } from "@docspace/shared/components/toast"; import { getCookie } from "@docspace/shared/utils"; import { deleteCookie } from "@docspace/shared/utils/cookie"; -import { useSearchParams } from "next/navigation"; -import { useContext, useEffect } from "react"; -import { ConfirmRouteContext } from "../ConfirmRoute"; import AppLoader from "@docspace/shared/components/app-loader"; -import { TError } from "@/types"; import { frameCallEvent } from "@docspace/shared/utils/common"; - import { combineUrl } from "@docspace/shared/utils/combineUrl"; import { loginWithConfirmKey } from "@docspace/shared/api/user"; +import { TError } from "@/types"; + +import { ConfirmRouteContext } from "../ConfirmRoute"; + const AuthHandler = () => { let searchParams = useSearchParams(); diff --git a/packages/login/src/components/ChangeOwnerForm/index.tsx b/packages/login/src/components/ChangeOwnerForm/index.tsx index 53fedbedef..1f1e789603 100644 --- a/packages/login/src/components/ChangeOwnerForm/index.tsx +++ b/packages/login/src/components/ChangeOwnerForm/index.tsx @@ -32,13 +32,13 @@ import { useTranslation } from "react-i18next"; import { Button, ButtonSize } from "@docspace/shared/components/button"; import { Text } from "@docspace/shared/components/text"; import { toastr } from "@docspace/shared/components/toast"; +import { ownerChange } from "@docspace/shared/api/settings"; import withLoader from "@/HOCs/withLoader"; import { TError, WithLoaderProps } from "@/types"; import { ConfirmRouteContext } from "../ConfirmRoute"; import { ButtonsWrapper } from "../StyledConfirm.styled"; -import { ownerChange } from "@docspace/shared/api/settings"; type ChangeOwnerFormProps = { newOwner?: string; diff --git a/packages/login/src/components/CreateUserForm/CreateUserForm.styled.tsx b/packages/login/src/components/CreateUserForm/CreateUserForm.styled.tsx index e0dfc7e96c..98352f3925 100644 --- a/packages/login/src/components/CreateUserForm/CreateUserForm.styled.tsx +++ b/packages/login/src/components/CreateUserForm/CreateUserForm.styled.tsx @@ -26,7 +26,7 @@ "use client"; -import styled, { css } from "styled-components"; +import styled from "styled-components"; import { mobile, tablet } from "@docspace/shared/utils"; diff --git a/packages/login/src/components/CreateUserForm/index.tsx b/packages/login/src/components/CreateUserForm/index.tsx index 263d1fb020..f18e6cac7d 100644 --- a/packages/login/src/components/CreateUserForm/index.tsx +++ b/packages/login/src/components/CreateUserForm/index.tsx @@ -53,7 +53,6 @@ import { } from "@docspace/shared/utils/common"; import { setCookie } from "@docspace/shared/utils/cookie"; import { DeviceType } from "@docspace/shared/enums"; -import { RegisterContainer } from "./CreateUserForm.styled"; import { TValidate } from "@docspace/shared/components/email-input"; import { TCreateUserData, TError, WithLoaderProps } from "@/types"; import { SocialButtonsGroup } from "@docspace/shared/components/social-buttons-group"; @@ -69,10 +68,11 @@ import SsoReactSvg from "PUBLIC_DIR/images/sso.react.svg"; import withLoader from "@/HOCs/withLoader"; import useDeviceType from "@/hooks/useDeviceType"; -import { ConfirmRouteContext } from "../ConfirmRoute"; +import { ConfirmRouteContext } from "../ConfirmRoute"; import EmailInputForm from "./sub-components/EmailInputForm"; import RegistrationForm from "./sub-components/RegistrationForm"; +import { RegisterContainer } from "./CreateUserForm.styled"; export type CreateUserFormProps = { userNameRegex: string; diff --git a/packages/login/src/components/DeactivatePortalForm/index.tsx b/packages/login/src/components/DeactivatePortalForm/index.tsx index ad85c09dbd..fc465e8cf6 100644 --- a/packages/login/src/components/DeactivatePortalForm/index.tsx +++ b/packages/login/src/components/DeactivatePortalForm/index.tsx @@ -33,6 +33,7 @@ import { Text } from "@docspace/shared/components/text"; import { Link } from "@docspace/shared/components/link"; import { Button, ButtonSize } from "@docspace/shared/components/button"; import { toastr } from "@docspace/shared/components/toast"; +import { suspendPortal } from "@docspace/shared/api/portal"; import withLoader from "@/HOCs/withLoader"; import { TError, WithLoaderProps } from "@/types"; @@ -40,7 +41,6 @@ import { URL_ONLYOFFICE } from "@/utils/constants"; import { ButtonsWrapper } from "../StyledConfirm.styled"; import { ConfirmRouteContext } from "../ConfirmRoute"; -import { suspendPortal } from "@docspace/shared/api/portal"; type DeactivatePortalProps = { siteUrl?: string; diff --git a/packages/login/src/components/EmailChangeHandler/index.tsx b/packages/login/src/components/EmailChangeHandler/index.tsx index dcfc010ca1..2080b1383d 100644 --- a/packages/login/src/components/EmailChangeHandler/index.tsx +++ b/packages/login/src/components/EmailChangeHandler/index.tsx @@ -26,12 +26,15 @@ "use client"; -import AppLoader from "@docspace/shared/components/app-loader"; import { useContext, useEffect, useState } from "react"; -import { ConfirmRouteContext } from "../ConfirmRoute"; -import { TError } from "@/types"; + +import AppLoader from "@docspace/shared/components/app-loader"; import { changeEmail } from "@docspace/shared/api/people"; +import { TError } from "@/types"; + +import { ConfirmRouteContext } from "../ConfirmRoute"; + const EmailChangeHandler = () => { const [error, setError] = useState(); diff --git a/packages/login/src/components/PasswordChangeForm/index.tsx b/packages/login/src/components/PasswordChangeForm/index.tsx index 0b14e08c36..595eaf2b53 100644 --- a/packages/login/src/components/PasswordChangeForm/index.tsx +++ b/packages/login/src/components/PasswordChangeForm/index.tsx @@ -39,11 +39,11 @@ import { toastr } from "@docspace/shared/components/toast"; import { InputSize, InputType } from "@docspace/shared/components/text-input"; import { TPasswordHash } from "@docspace/shared/api/settings/types"; import { ALLOWED_PASSWORD_CHARACTERS } from "@docspace/shared/constants"; +import { changePassword } from "@docspace/shared/api/people"; import withLoader from "@/HOCs/withLoader"; import { TError, WithLoaderProps } from "@/types"; import { ConfirmRouteContext } from "../ConfirmRoute"; -import { changePassword } from "@docspace/shared/api/people"; type PasswordChangeFormProps = { passwordHash: TPasswordHash; diff --git a/packages/login/src/components/ProfileRemoveForm /index.tsx b/packages/login/src/components/ProfileRemoveForm /index.tsx index 65853395f1..551eab1090 100644 --- a/packages/login/src/components/ProfileRemoveForm /index.tsx +++ b/packages/login/src/components/ProfileRemoveForm /index.tsx @@ -27,20 +27,22 @@ "use client"; import { useContext, useState } from "react"; +import { Trans, useTranslation } from "react-i18next"; import { Text } from "@docspace/shared/components/text"; -import { Trans, useTranslation } from "react-i18next"; import { Link, LinkTarget, LinkType } from "@docspace/shared/components/link"; import { FormWrapper } from "@docspace/shared/components/form-wrapper"; import { Button, ButtonSize } from "@docspace/shared/components/button"; import { toastr } from "@docspace/shared/components/toast"; -import { TError, WithLoaderProps } from "@/types"; -import { ConfirmRouteContext } from "../ConfirmRoute"; -import withLoader from "@/HOCs/withLoader"; import { TColorScheme } from "@docspace/shared/themes"; -import { GreetingContainer } from "../GreetingContainer"; import { deleteSelf } from "@docspace/shared/api/people"; +import withLoader from "@/HOCs/withLoader"; +import { TError, WithLoaderProps } from "@/types"; + +import { GreetingContainer } from "../GreetingContainer"; +import { ConfirmRouteContext } from "../ConfirmRoute"; + type ProfileRemoveFormProps = { legalTerms: string; greetingSettings: string; diff --git a/packages/login/src/components/RemovePortalForm/index.tsx b/packages/login/src/components/RemovePortalForm/index.tsx index f3d247dd3c..e57332fc32 100644 --- a/packages/login/src/components/RemovePortalForm/index.tsx +++ b/packages/login/src/components/RemovePortalForm/index.tsx @@ -26,18 +26,21 @@ "use client"; -import withLoader from "@/HOCs/withLoader"; +import { Trans, useTranslation } from "react-i18next"; +import { useContext, useState } from "react"; + import { Link } from "@docspace/shared/components/link"; import { Text } from "@docspace/shared/components/text"; -import { Trans, useTranslation } from "react-i18next"; -import { ButtonsWrapper } from "../StyledConfirm.styled"; +import { deletePortal } from "@docspace/shared/api/portal"; import { Button, ButtonSize } from "@docspace/shared/components/button"; import { toastr } from "@docspace/shared/components/toast"; -import { useContext, useState } from "react"; + import { TError, WithLoaderProps } from "@/types"; -import { ConfirmRouteContext } from "../ConfirmRoute"; import { URL_ONLYOFFICE } from "@/utils/constants"; -import { deletePortal } from "@docspace/shared/api/portal"; +import withLoader from "@/HOCs/withLoader"; + +import { ConfirmRouteContext } from "../ConfirmRoute"; +import { ButtonsWrapper } from "../StyledConfirm.styled"; type RemovePortalFormProps = { siteUrl?: string; diff --git a/packages/login/src/components/StyledLayout.styled.ts b/packages/login/src/components/StyledLayout.styled.ts index 83ba47d12b..765157ff8d 100644 --- a/packages/login/src/components/StyledLayout.styled.ts +++ b/packages/login/src/components/StyledLayout.styled.ts @@ -26,7 +26,7 @@ "use client"; -import styled, { css } from "styled-components"; +import styled from "styled-components"; import { Base } from "@docspace/shared/themes"; import { mobile, tablet } from "@docspace/shared/utils/device"; diff --git a/packages/login/src/components/TfaAuthForm/index.tsx b/packages/login/src/components/TfaAuthForm/index.tsx index 5857dae0bf..2608d3f05e 100644 --- a/packages/login/src/components/TfaAuthForm/index.tsx +++ b/packages/login/src/components/TfaAuthForm/index.tsx @@ -46,6 +46,7 @@ import { TPasswordHash } from "@docspace/shared/api/settings/types"; import withLoader from "@/HOCs/withLoader"; import { TError, WithLoaderProps } from "@/types"; + import { ConfirmRouteContext } from "../ConfirmRoute"; type TfaAuthFormProps = { diff --git a/packages/login/src/components/WizardForm/index.tsx b/packages/login/src/components/WizardForm/index.tsx index 6d3ccca935..376da01c4f 100644 --- a/packages/login/src/components/WizardForm/index.tsx +++ b/packages/login/src/components/WizardForm/index.tsx @@ -26,13 +26,9 @@ "use client"; -import { TCulturesOption, TTimeZoneOption, WizardFormProps } from "@/types"; -import { getSelectZone, getUserTimezone, mapTimezonesToArray } from "@/utils"; -import { - DEFAULT_SELECT_LANGUAGE, - DEFAULT_SELECT_TIMEZONE, - URL_LICENSE, -} from "@/utils/constants"; +import { useTheme } from "styled-components"; +import { useTranslation } from "react-i18next"; + import { convertLanguage, createPasswordHash, @@ -42,31 +38,19 @@ import { Text } from "@docspace/shared/components/text"; import { FieldContainer } from "@docspace/shared/components/field-container"; import { ChangeEvent, MouseEvent, useEffect, useRef, useState } from "react"; import { EmailInput, TValidate } from "@docspace/shared/components/email-input"; -import { useTranslation } from "react-i18next"; -import { - COOKIE_EXPIRATION_YEAR, - LANGUAGE, -} from "@docspace/shared/constants"; +import { COOKIE_EXPIRATION_YEAR, LANGUAGE } from "@docspace/shared/constants"; import { EmailSettings } from "@docspace/shared/utils"; import { PasswordInput, PasswordInputHandle, } from "@docspace/shared/components/password-input"; import { FileInput } from "@docspace/shared/components/file-input"; -import { - StyledAcceptTerms, - StyledInfo, - StyledLink, - WizardContainer, -} from "./WizardForm.styled"; import { IconButton } from "@docspace/shared/components/icon-button"; import { Link, LinkTarget, LinkType } from "@docspace/shared/components/link"; -import RefreshReactSvgUrl from "PUBLIC_DIR/images/refresh.react.svg?url"; import { setLicense } from "@docspace/shared/api/settings"; import { ComboBox, ComboBoxSize } from "@docspace/shared/components/combobox"; import BetaBadge from "@docspace/client/src/components/BetaBadgeWrapper"; import { Checkbox } from "@docspace/shared/components/checkbox"; -import { useTheme } from "styled-components"; import { Button, ButtonSize } from "@docspace/shared/components/button"; import api from "@docspace/shared/api"; import { setCookie } from "@docspace/shared/utils/cookie"; @@ -75,6 +59,23 @@ import useDeviceType from "@/hooks/useDeviceType"; import { DeviceType } from "@docspace/shared/enums"; import { Nullable } from "@docspace/shared/types"; +import RefreshReactSvgUrl from "PUBLIC_DIR/images/refresh.react.svg?url"; + +import { TCulturesOption, TTimeZoneOption, WizardFormProps } from "@/types"; +import { getSelectZone, getUserTimezone, mapTimezonesToArray } from "@/utils"; +import { + DEFAULT_SELECT_LANGUAGE, + DEFAULT_SELECT_TIMEZONE, + URL_LICENSE, +} from "@/utils/constants"; + +import { + StyledAcceptTerms, + StyledInfo, + StyledLink, + WizardContainer, +} from "./WizardForm.styled"; + const emailSettings = new EmailSettings(); emailSettings.allowDomainPunycode = true;