renamed wrapper to just RichTextEditor

This commit is contained in:
Palanikannan1437 2024-01-11 15:41:54 +05:30
parent 07c4699b02
commit ae9c729fc7
6 changed files with 13 additions and 13 deletions

View File

@ -20,7 +20,7 @@ interface RichTextEditorWrapperProps
const fileService = new FileService(); const fileService = new FileService();
export const RichTextEditorWrapper = React.forwardRef<EditorHandle, RichTextEditorWrapperProps>( export const RichTextEditor = React.forwardRef<EditorHandle, RichTextEditorWrapperProps>(
({ workspaceSlug, ...props }, ref) => { ({ workspaceSlug, ...props }, ref) => {
const editorSuggestions = useMention(); const editorSuggestions = useMention();
@ -38,4 +38,4 @@ export const RichTextEditorWrapper = React.forwardRef<EditorHandle, RichTextEdit
} }
); );
RichTextEditorWrapper.displayName = "RichTextEditorWrapper"; RichTextEditor.displayName = "RichTextEditor";

View File

@ -12,7 +12,7 @@ import { AIService } from "services/ai.service";
// components // components
import { GptAssistantPopover } from "components/core"; import { GptAssistantPopover } from "components/core";
import { PriorityDropdown } from "components/dropdowns"; import { PriorityDropdown } from "components/dropdowns";
import { RichTextEditorWrapper } from "components/editor/rich-text-wrapper"; import { RichTextEditor } from "components/editor/rich-text-wrapper";
// ui // ui
import { Button, Input, ToggleSwitch } from "@plane/ui"; import { Button, Input, ToggleSwitch } from "@plane/ui";
// types // types
@ -271,7 +271,7 @@ export const CreateInboxIssueModal: React.FC<Props> = observer((props) => {
name="description_html" name="description_html"
control={control} control={control}
render={({ field: { value, onChange } }) => ( render={({ field: { value, onChange } }) => (
<RichTextEditorWrapper <RichTextEditor
workspaceSlug={workspaceSlug} workspaceSlug={workspaceSlug}
ref={editorRef} ref={editorRef}
debouncedUpdatesEnabled={false} debouncedUpdatesEnabled={false}

View File

@ -5,7 +5,7 @@ import useReloadConfirmations from "hooks/use-reload-confirmation";
import debounce from "lodash/debounce"; import debounce from "lodash/debounce";
// components // components
import { TextArea } from "@plane/ui"; import { TextArea } from "@plane/ui";
import { RichTextEditorWrapper } from "components/editor/rich-text-wrapper"; import { RichTextEditor } from "components/editor/rich-text-wrapper";
// types // types
import { TIssue } from "@plane/types"; import { TIssue } from "@plane/types";
import { TIssueOperations } from "./issue-detail"; import { TIssueOperations } from "./issue-detail";
@ -158,7 +158,7 @@ export const IssueDescriptionForm: FC<IssueDetailsProps> = (props) => {
name="description_html" name="description_html"
control={control} control={control}
render={({ field: { onChange } }) => ( render={({ field: { onChange } }) => (
<RichTextEditorWrapper <RichTextEditor
workspaceSlug={workspaceSlug} workspaceSlug={workspaceSlug}
value={localIssueDescription.description_html} value={localIssueDescription.description_html}
rerenderOnPropsChange={localIssueDescription} rerenderOnPropsChange={localIssueDescription}

View File

@ -25,7 +25,7 @@ import { ParentIssuesListModal } from "components/issues";
import { IssueLabelSelect } from "components/issues/select"; import { IssueLabelSelect } from "components/issues/select";
import { CreateLabelModal } from "components/labels"; import { CreateLabelModal } from "components/labels";
import { CreateStateModal } from "components/states"; import { CreateStateModal } from "components/states";
import { RichTextEditorWrapper } from "components/editor/rich-text-wrapper"; import { RichTextEditor } from "components/editor/rich-text-wrapper";
// ui // ui
import { Button, CustomMenu, Input, ToggleSwitch } from "@plane/ui"; import { Button, CustomMenu, Input, ToggleSwitch } from "@plane/ui";
// helpers // helpers
@ -428,7 +428,7 @@ export const DraftIssueForm: FC<IssueFormProps> = observer((props) => {
name="description_html" name="description_html"
control={control} control={control}
render={({ field: { value, onChange } }) => ( render={({ field: { value, onChange } }) => (
<RichTextEditorWrapper <RichTextEditor
workspaceSlug={workspaceSlug as string} workspaceSlug={workspaceSlug as string}
ref={editorRef} ref={editorRef}
debouncedUpdatesEnabled={false} debouncedUpdatesEnabled={false}

View File

@ -9,7 +9,7 @@ import useToast from "hooks/use-toast";
// services // services
import { AIService } from "services/ai.service"; import { AIService } from "services/ai.service";
// components // components
import { RichTextEditorWrapper } from "components/editor/rich-text-wrapper"; import { RichTextEditor } from "components/editor/rich-text-wrapper";
import { GptAssistantPopover } from "components/core"; import { GptAssistantPopover } from "components/core";
import { import {
CycleDropdown, CycleDropdown,
@ -322,7 +322,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
name="description_html" name="description_html"
control={control} control={control}
render={({ field: { value, onChange } }) => ( render={({ field: { value, onChange } }) => (
<RichTextEditorWrapper <RichTextEditor
workspaceSlug={workspaceSlug as string} workspaceSlug={workspaceSlug as string}
ref={editorRef} ref={editorRef}
debouncedUpdatesEnabled={false} debouncedUpdatesEnabled={false}

View File

@ -5,7 +5,7 @@ import { Controller, useForm } from "react-hook-form";
import { useProject, useUser } from "hooks/store"; import { useProject, useUser } from "hooks/store";
import useReloadConfirmations from "hooks/use-reload-confirmation"; import useReloadConfirmations from "hooks/use-reload-confirmation";
// components // components
import { RichTextEditorWrapper } from "components/editor/rich-text-wrapper"; import { RichTextEditor } from "components/editor/rich-text-wrapper";
import { IssuePeekOverviewReactions } from "components/issues"; import { IssuePeekOverviewReactions } from "components/issues";
// ui // ui
import { TextArea } from "@plane/ui"; import { TextArea } from "@plane/ui";
@ -19,7 +19,7 @@ interface IPeekOverviewIssueDetails {
issue: TIssue; issue: TIssue;
issueReactions: any; issueReactions: any;
user: IUser | null; user: IUser | null;
issueUpdate: (issue: Partial<TIssue>) => void; issueUpdate: (issue: Partial<TIssue>) => Promise<void>;
issueReactionCreate: (reaction: string) => void; issueReactionCreate: (reaction: string) => void;
issueReactionRemove: (reaction: string) => void; issueReactionRemove: (reaction: string) => void;
isSubmitting: "submitting" | "submitted" | "saved"; isSubmitting: "submitting" | "submitted" | "saved";
@ -175,7 +175,7 @@ export const PeekOverviewIssueDetails: FC<IPeekOverviewIssueDetails> = (props) =
name="description_html" name="description_html"
control={control} control={control}
render={({ field: { onChange } }) => ( render={({ field: { onChange } }) => (
<RichTextEditorWrapper <RichTextEditor
workspaceSlug={workspaceSlug} workspaceSlug={workspaceSlug}
value={localIssueDescription.description_html} value={localIssueDescription.description_html}
rerenderOnPropsChange={localIssueDescription} rerenderOnPropsChange={localIssueDescription}