From 05a7a7e18cf4737ac5cc456cee0af69bb9f85f84 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Sun, 16 Feb 2025 09:00:19 +0100 Subject: [PATCH 1/2] fix(frontend): use short dialogs imports --- frontend/src/components/Menu/MenuForm.tsx | 2 +- frontend/src/components/categories/CategoryForm.tsx | 2 +- frontend/src/components/content-types/ContentTypeForm.tsx | 2 +- frontend/src/components/contents/ContentForm.tsx | 2 +- frontend/src/components/contents/ContentImportForm.tsx | 2 +- frontend/src/components/context-vars/ContextVarForm.tsx | 2 +- frontend/src/components/labels/LabelForm.tsx | 2 +- frontend/src/components/languages/LanguageForm.tsx | 2 +- frontend/src/components/nlp/components/NlpEntityForm.tsx | 2 +- frontend/src/components/nlp/components/NlpValueForm.tsx | 2 +- frontend/src/components/profile/profile.tsx | 4 +--- frontend/src/components/roles/RoleForm.tsx | 2 +- frontend/src/components/subscribers/SubscriberForm.tsx | 2 +- frontend/src/components/users/EditUserForm.tsx | 2 +- frontend/src/components/users/InviteUserForm.tsx | 2 +- frontend/src/components/visual-editor/BlockEditForm.tsx | 2 +- frontend/src/components/visual-editor/BlockMoveForm.tsx | 2 +- frontend/src/components/visual-editor/form/MessageForm.tsx | 5 +++-- frontend/src/components/visual-editor/form/OptionsForm.tsx | 6 +++--- frontend/src/components/visual-editor/form/TriggersForm.tsx | 6 +++--- 20 files changed, 26 insertions(+), 27 deletions(-) diff --git a/frontend/src/components/Menu/MenuForm.tsx b/frontend/src/components/Menu/MenuForm.tsx index 39945c35..54357cb8 100644 --- a/frontend/src/components/Menu/MenuForm.tsx +++ b/frontend/src/components/Menu/MenuForm.tsx @@ -10,7 +10,7 @@ import { MenuItem } from "@mui/material"; import { FC, Fragment, useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Input } from "@/app-components/inputs/Input"; import { ToggleableInput } from "@/app-components/inputs/ToggleableInput"; import { useCreate } from "@/hooks/crud/useCreate"; diff --git a/frontend/src/components/categories/CategoryForm.tsx b/frontend/src/components/categories/CategoryForm.tsx index a4153ae4..b69e18c6 100644 --- a/frontend/src/components/categories/CategoryForm.tsx +++ b/frontend/src/components/categories/CategoryForm.tsx @@ -9,7 +9,7 @@ import { FC, Fragment, useEffect } from "react"; import { useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Input } from "@/app-components/inputs/Input"; import { useCreate } from "@/hooks/crud/useCreate"; import { useUpdate } from "@/hooks/crud/useUpdate"; diff --git a/frontend/src/components/content-types/ContentTypeForm.tsx b/frontend/src/components/content-types/ContentTypeForm.tsx index 36d595d2..8430b17e 100644 --- a/frontend/src/components/content-types/ContentTypeForm.tsx +++ b/frontend/src/components/content-types/ContentTypeForm.tsx @@ -11,7 +11,7 @@ import { Button } from "@mui/material"; import { FC, Fragment, useEffect } from "react"; import { useFieldArray, useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Input } from "@/app-components/inputs/Input"; import { useCreate } from "@/hooks/crud/useCreate"; import { useUpdate } from "@/hooks/crud/useUpdate"; diff --git a/frontend/src/components/contents/ContentForm.tsx b/frontend/src/components/contents/ContentForm.tsx index f3600a21..994368d0 100644 --- a/frontend/src/components/contents/ContentForm.tsx +++ b/frontend/src/components/contents/ContentForm.tsx @@ -17,7 +17,7 @@ import { } from "react-hook-form"; import AttachmentInput from "@/app-components/attachment/AttachmentInput"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Adornment } from "@/app-components/inputs/Adornment"; import { Input } from "@/app-components/inputs/Input"; import { useCreate } from "@/hooks/crud/useCreate"; diff --git a/frontend/src/components/contents/ContentImportForm.tsx b/frontend/src/components/contents/ContentImportForm.tsx index 0cda29ad..9e70ba83 100644 --- a/frontend/src/components/contents/ContentImportForm.tsx +++ b/frontend/src/components/contents/ContentImportForm.tsx @@ -10,7 +10,7 @@ import { FC, Fragment, useState } from "react"; import { useQuery } from "react-query"; import AttachmentInput from "@/app-components/attachment/AttachmentInput"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { useApiClient } from "@/hooks/useApiClient"; import { useToast } from "@/hooks/useToast"; import { useTranslate } from "@/hooks/useTranslate"; diff --git a/frontend/src/components/context-vars/ContextVarForm.tsx b/frontend/src/components/context-vars/ContextVarForm.tsx index 43f13a90..f42bac64 100644 --- a/frontend/src/components/context-vars/ContextVarForm.tsx +++ b/frontend/src/components/context-vars/ContextVarForm.tsx @@ -10,7 +10,7 @@ import { FormControlLabel, FormHelperText, Switch } from "@mui/material"; import { FC, Fragment, useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Input } from "@/app-components/inputs/Input"; import { useCreate } from "@/hooks/crud/useCreate"; import { useUpdate } from "@/hooks/crud/useUpdate"; diff --git a/frontend/src/components/labels/LabelForm.tsx b/frontend/src/components/labels/LabelForm.tsx index e716b83b..57156e70 100644 --- a/frontend/src/components/labels/LabelForm.tsx +++ b/frontend/src/components/labels/LabelForm.tsx @@ -9,7 +9,7 @@ import { FC, Fragment, useEffect } from "react"; import { useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Input } from "@/app-components/inputs/Input"; import { useCreate } from "@/hooks/crud/useCreate"; import { useUpdate } from "@/hooks/crud/useUpdate"; diff --git a/frontend/src/components/languages/LanguageForm.tsx b/frontend/src/components/languages/LanguageForm.tsx index e8c9aabc..b23e786e 100644 --- a/frontend/src/components/languages/LanguageForm.tsx +++ b/frontend/src/components/languages/LanguageForm.tsx @@ -10,7 +10,7 @@ import { FormControlLabel, Switch } from "@mui/material"; import { FC, Fragment, useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Input } from "@/app-components/inputs/Input"; import { useCreate } from "@/hooks/crud/useCreate"; import { useUpdate } from "@/hooks/crud/useUpdate"; diff --git a/frontend/src/components/nlp/components/NlpEntityForm.tsx b/frontend/src/components/nlp/components/NlpEntityForm.tsx index 8c503223..e2fba34f 100644 --- a/frontend/src/components/nlp/components/NlpEntityForm.tsx +++ b/frontend/src/components/nlp/components/NlpEntityForm.tsx @@ -16,7 +16,7 @@ import { import { FC, Fragment, useEffect } from "react"; import { useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Input } from "@/app-components/inputs/Input"; import { useCreate } from "@/hooks/crud/useCreate"; import { useUpdate } from "@/hooks/crud/useUpdate"; diff --git a/frontend/src/components/nlp/components/NlpValueForm.tsx b/frontend/src/components/nlp/components/NlpValueForm.tsx index 6f4209d3..f066a62d 100644 --- a/frontend/src/components/nlp/components/NlpValueForm.tsx +++ b/frontend/src/components/nlp/components/NlpValueForm.tsx @@ -10,7 +10,7 @@ import { useRouter } from "next/router"; import { FC, Fragment, useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Input } from "@/app-components/inputs/Input"; import MultipleInput from "@/app-components/inputs/MultipleInput"; import { useCreate } from "@/hooks/crud/useCreate"; diff --git a/frontend/src/components/profile/profile.tsx b/frontend/src/components/profile/profile.tsx index 2723d102..5967ef12 100644 --- a/frontend/src/components/profile/profile.tsx +++ b/frontend/src/components/profile/profile.tsx @@ -6,7 +6,6 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ - import CheckIcon from "@mui/icons-material/Check"; import EmailIcon from "@mui/icons-material/Email"; import KeyIcon from "@mui/icons-material/Key"; @@ -16,8 +15,7 @@ import { FC } from "react"; import { Controller, useForm } from "react-hook-form"; import { useQueryClient } from "react-query"; -import { ContentItem } from "@/app-components/dialogs"; -import { ContentContainer } from "@/app-components/dialogs/layouts/ContentContainer"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Adornment } from "@/app-components/inputs/Adornment"; import AvatarInput from "@/app-components/inputs/AvatarInput"; import { Input } from "@/app-components/inputs/Input"; diff --git a/frontend/src/components/roles/RoleForm.tsx b/frontend/src/components/roles/RoleForm.tsx index 76033736..5bdb9dc4 100644 --- a/frontend/src/components/roles/RoleForm.tsx +++ b/frontend/src/components/roles/RoleForm.tsx @@ -9,7 +9,7 @@ import { FC, Fragment, useEffect } from "react"; import { useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Input } from "@/app-components/inputs/Input"; import { useCreate } from "@/hooks/crud/useCreate"; import { useUpdate } from "@/hooks/crud/useUpdate"; diff --git a/frontend/src/components/subscribers/SubscriberForm.tsx b/frontend/src/components/subscribers/SubscriberForm.tsx index 675b1b3e..48feb514 100644 --- a/frontend/src/components/subscribers/SubscriberForm.tsx +++ b/frontend/src/components/subscribers/SubscriberForm.tsx @@ -10,7 +10,7 @@ import { Button, Grid, Link } from "@mui/material"; import { FC, Fragment, useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import AutoCompleteEntitySelect from "@/app-components/inputs/AutoCompleteEntitySelect"; import { Input } from "@/app-components/inputs/Input"; import { useUpdate } from "@/hooks/crud/useUpdate"; diff --git a/frontend/src/components/users/EditUserForm.tsx b/frontend/src/components/users/EditUserForm.tsx index 8a59a93c..5eb4fafb 100644 --- a/frontend/src/components/users/EditUserForm.tsx +++ b/frontend/src/components/users/EditUserForm.tsx @@ -10,7 +10,7 @@ import { Button, Grid, Link } from "@mui/material"; import { FC, Fragment, useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import AutoCompleteEntitySelect from "@/app-components/inputs/AutoCompleteEntitySelect"; import { Input } from "@/app-components/inputs/Input"; import { useUpdate } from "@/hooks/crud/useUpdate"; diff --git a/frontend/src/components/users/InviteUserForm.tsx b/frontend/src/components/users/InviteUserForm.tsx index 3bcb0f17..34c1efb1 100644 --- a/frontend/src/components/users/InviteUserForm.tsx +++ b/frontend/src/components/users/InviteUserForm.tsx @@ -9,7 +9,7 @@ import { FC, Fragment } from "react"; import { Controller, useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import AutoCompleteEntitySelect from "@/app-components/inputs/AutoCompleteEntitySelect"; import { Input } from "@/app-components/inputs/Input"; import { useSendInvitation } from "@/hooks/entities/invitation-hooks"; diff --git a/frontend/src/components/visual-editor/BlockEditForm.tsx b/frontend/src/components/visual-editor/BlockEditForm.tsx index 9a162ee3..3d657e31 100644 --- a/frontend/src/components/visual-editor/BlockEditForm.tsx +++ b/frontend/src/components/visual-editor/BlockEditForm.tsx @@ -12,7 +12,7 @@ import { FormControlLabel, Grid, Switch, Tab, Tabs } from "@mui/material"; import { FC, Fragment, useEffect, useState } from "react"; import { Controller, useForm } from "react-hook-form"; -import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import { Input } from "@/app-components/inputs/Input"; import TriggerIcon from "@/app-components/svg/TriggerIcon"; import { TabPanel } from "@/app-components/tabs/TabPanel"; diff --git a/frontend/src/components/visual-editor/BlockMoveForm.tsx b/frontend/src/components/visual-editor/BlockMoveForm.tsx index 53443576..79561520 100644 --- a/frontend/src/components/visual-editor/BlockMoveForm.tsx +++ b/frontend/src/components/visual-editor/BlockMoveForm.tsx @@ -9,7 +9,7 @@ import { MenuItem, Select } from "@mui/material"; import { FC, Fragment, useState } from "react"; -import { ContentContainer } from "@/app-components/dialogs/"; +import { ContentContainer } from "@/app-components/dialogs"; import { ICategory } from "@/types/category.types"; import { ComponentFormProps } from "@/types/common/dialogs.types"; diff --git a/frontend/src/components/visual-editor/form/MessageForm.tsx b/frontend/src/components/visual-editor/form/MessageForm.tsx index e8a4e9d7..dff15400 100644 --- a/frontend/src/components/visual-editor/form/MessageForm.tsx +++ b/frontend/src/components/visual-editor/form/MessageForm.tsx @@ -1,12 +1,13 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ -import { ContentContainer } from "@/app-components/dialogs/layouts/ContentContainer"; + +import { ContentContainer } from "@/app-components/dialogs"; import AttachmentMessageForm from "./AttachmentMessageForm"; import { useBlock } from "./BlockFormProvider"; diff --git a/frontend/src/components/visual-editor/form/OptionsForm.tsx b/frontend/src/components/visual-editor/form/OptionsForm.tsx index 3b59081a..07f53fdd 100644 --- a/frontend/src/components/visual-editor/form/OptionsForm.tsx +++ b/frontend/src/components/visual-editor/form/OptionsForm.tsx @@ -1,16 +1,16 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ + import { Typography } from "@mui/material"; import { Controller, useFormContext } from "react-hook-form"; -import { ContentContainer } from "@/app-components/dialogs/layouts/ContentContainer"; -import { ContentItem } from "@/app-components/dialogs/layouts/ContentItem"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import AutoCompleteEntitySelect from "@/app-components/inputs/AutoCompleteEntitySelect"; import { Input } from "@/app-components/inputs/Input"; import { useTranslate } from "@/hooks/useTranslate"; diff --git a/frontend/src/components/visual-editor/form/TriggersForm.tsx b/frontend/src/components/visual-editor/form/TriggersForm.tsx index 517b78dc..b9ba93bb 100644 --- a/frontend/src/components/visual-editor/form/TriggersForm.tsx +++ b/frontend/src/components/visual-editor/form/TriggersForm.tsx @@ -1,16 +1,16 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ + import { Divider } from "@mui/material"; import { Controller, useFormContext } from "react-hook-form"; -import { ContentContainer } from "@/app-components/dialogs/layouts/ContentContainer"; -import { ContentItem } from "@/app-components/dialogs/layouts/ContentItem"; +import { ContentContainer, ContentItem } from "@/app-components/dialogs"; import AutoCompleteEntitySelect from "@/app-components/inputs/AutoCompleteEntitySelect"; import { useTranslate } from "@/hooks/useTranslate"; import { EntityType, Format } from "@/services/types"; From cb0b10258de26dc2ac41c85ad25ac6f5d98f966d Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Sun, 16 Feb 2025 09:05:49 +0100 Subject: [PATCH 2/2] fix(frontend): remove extra begin empty lines --- frontend/src/components/visual-editor/form/MessageForm.tsx | 1 - frontend/src/components/visual-editor/form/OptionsForm.tsx | 1 - frontend/src/components/visual-editor/form/TriggersForm.tsx | 1 - 3 files changed, 3 deletions(-) diff --git a/frontend/src/components/visual-editor/form/MessageForm.tsx b/frontend/src/components/visual-editor/form/MessageForm.tsx index dff15400..41f12c16 100644 --- a/frontend/src/components/visual-editor/form/MessageForm.tsx +++ b/frontend/src/components/visual-editor/form/MessageForm.tsx @@ -6,7 +6,6 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ - import { ContentContainer } from "@/app-components/dialogs"; import AttachmentMessageForm from "./AttachmentMessageForm"; diff --git a/frontend/src/components/visual-editor/form/OptionsForm.tsx b/frontend/src/components/visual-editor/form/OptionsForm.tsx index 07f53fdd..2e6a0fe1 100644 --- a/frontend/src/components/visual-editor/form/OptionsForm.tsx +++ b/frontend/src/components/visual-editor/form/OptionsForm.tsx @@ -6,7 +6,6 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ - import { Typography } from "@mui/material"; import { Controller, useFormContext } from "react-hook-form"; diff --git a/frontend/src/components/visual-editor/form/TriggersForm.tsx b/frontend/src/components/visual-editor/form/TriggersForm.tsx index b9ba93bb..de6cc446 100644 --- a/frontend/src/components/visual-editor/form/TriggersForm.tsx +++ b/frontend/src/components/visual-editor/form/TriggersForm.tsx @@ -6,7 +6,6 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ - import { Divider } from "@mui/material"; import { Controller, useFormContext } from "react-hook-form";