mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
🚑 fix: Fixed tsc server issues
This commit is contained in:
parent
aa09724ec4
commit
0ecbe57293
@ -2,3 +2,4 @@ export { LiteTextEditor, LiteTextEditorWithRef } from "src/ui";
|
||||
export { LiteTextReadOnlyEditor, LiteTextReadOnlyEditorWithRef } from "src/ui/read-only";
|
||||
export type { LiteTextEditorProps, ILiteTextEditor } from "src/ui";
|
||||
export type { LiteTextReadOnlyEditorProps, ILiteTextReadOnlyEditor } from "src/ui/read-only";
|
||||
export type { IMentionSuggestion, IMentionHighlight } from "@plane/editor-core";
|
||||
|
@ -2,3 +2,4 @@ export { RichTextEditor, RichTextEditorWithRef } from "src/ui";
|
||||
export { RichTextReadOnlyEditor, RichTextReadOnlyEditorWithRef } from "src/ui/read-only";
|
||||
export type { RichTextEditorProps, IRichTextEditor } from "src/ui";
|
||||
export type { IRichTextReadOnlyEditor } from "src/ui/read-only";
|
||||
export type { IMentionSuggestion, IMentionHighlight } from "@plane/editor-core";
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React from "react";
|
||||
import { ILiteTextReadOnlyEditor, LiteTextReadOnlyEditorWithRef } from "@plane/lite-text-editor";
|
||||
|
||||
import { useMention } from "hooks/store";
|
||||
import useEditorSuggestions from "hooks/use-editor-suggestions";
|
||||
|
||||
interface EditorHandle {
|
||||
clearEditor: () => void;
|
||||
@ -12,11 +11,9 @@ interface LiteTextReadOnlyEditorWrapperProps extends Omit<ILiteTextReadOnlyEdito
|
||||
|
||||
export const LiteTextReadOnlyEditor = React.forwardRef<EditorHandle, LiteTextReadOnlyEditorWrapperProps>(
|
||||
({ ...props }, ref) => {
|
||||
const editorSuggestions = useMention();
|
||||
const mentionsConfig = useEditorSuggestions();
|
||||
|
||||
return (
|
||||
<LiteTextReadOnlyEditorWithRef ref={ref} mentionHighlights={editorSuggestions.mentionHighlights} {...props} />
|
||||
);
|
||||
return <LiteTextReadOnlyEditorWithRef ref={ref} mentionHighlights={mentionsConfig.mentionHighlights} {...props} />;
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -1,41 +0,0 @@
|
||||
import React from "react";
|
||||
import { RichTextEditorWithRef, IRichTextEditor } from "@plane/rich-text-editor";
|
||||
|
||||
import { useMention } from "hooks/store";
|
||||
|
||||
import { FileService } from "services/file.service";
|
||||
|
||||
interface EditorHandle {
|
||||
clearEditor: () => void;
|
||||
setEditorValue: (content: string) => void;
|
||||
}
|
||||
|
||||
interface RichTextEditorWrapperProps
|
||||
extends Omit<
|
||||
IRichTextEditor,
|
||||
"uploadFile" | "deleteFile" | "restoreFile" | "mentionSuggestions" | "mentionHighlights"
|
||||
> {
|
||||
workspaceSlug: string;
|
||||
}
|
||||
|
||||
const fileService = new FileService();
|
||||
|
||||
export const RichTextEditor = React.forwardRef<EditorHandle, RichTextEditorWrapperProps>(
|
||||
({ workspaceSlug, ...props }, ref) => {
|
||||
const editorSuggestions = useMention();
|
||||
|
||||
return (
|
||||
<RichTextEditorWithRef
|
||||
ref={ref}
|
||||
uploadFile={fileService.getUploadFileFunction(workspaceSlug)}
|
||||
deleteFile={fileService.deleteImage}
|
||||
restoreFile={fileService.restoreImage}
|
||||
mentionSuggestions={editorSuggestions.mentionSuggestions}
|
||||
mentionHighlights={editorSuggestions.mentionHighlights}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
RichTextEditor.displayName = "RichTextEditor";
|
@ -1,7 +1,6 @@
|
||||
import React from "react";
|
||||
import { IRichTextReadOnlyEditor, RichTextReadOnlyEditorWithRef } from "@plane/rich-text-editor";
|
||||
|
||||
import { useMention } from "hooks/store";
|
||||
import useEditorSuggestions from "hooks/use-editor-suggestions";
|
||||
|
||||
interface EditorHandle {
|
||||
clearEditor: () => void;
|
||||
@ -12,11 +11,9 @@ interface RichTextReadOnlyEditorWrapperProps extends Omit<IRichTextReadOnlyEdito
|
||||
|
||||
export const RichTextReadOnlyEditor = React.forwardRef<EditorHandle, RichTextReadOnlyEditorWrapperProps>(
|
||||
({ ...props }, ref) => {
|
||||
const editorSuggestions = useMention();
|
||||
const mentionsConfig = useEditorSuggestions();
|
||||
|
||||
return (
|
||||
<RichTextReadOnlyEditorWithRef ref={ref} mentionHighlights={editorSuggestions.mentionHighlights} {...props} />
|
||||
);
|
||||
return <RichTextReadOnlyEditorWithRef ref={ref} mentionHighlights={mentionsConfig.mentionHighlights} {...props} />;
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -12,6 +12,7 @@ import { CommentReactions } from "components/issues/peek-overview";
|
||||
import { timeAgo } from "helpers/date-time.helper";
|
||||
// types
|
||||
import { Comment } from "types/issue";
|
||||
import { LiteTextReadOnlyEditor } from "components/editor/lite-text-read-only-editor";
|
||||
|
||||
type Props = {
|
||||
workspaceSlug: string;
|
||||
@ -126,11 +127,10 @@ export const CommentCard: React.FC<Props> = observer((props) => {
|
||||
</div>
|
||||
</form>
|
||||
<div className={`${isEditing ? "hidden" : ""}`}>
|
||||
<LiteReadOnlyEditorWithRef
|
||||
<LiteTextReadOnlyEditor
|
||||
ref={showEditorRef}
|
||||
value={comment.comment_html}
|
||||
customClassName="text-xs border border-custom-border-200 bg-custom-background-100"
|
||||
mentionHighlights={mentionsConfig.mentionHighlights}
|
||||
/>
|
||||
<CommentReactions commentId={comment.id} projectId={comment.project} />
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
// ui
|
||||
import { Button, CenterPanelIcon, CustomSelect, FullScreenPanelIcon, SidePanelIcon, Spinner } from "@plane/ui";
|
||||
// types
|
||||
import { TIssue, IIssueLink, ILinkDetails } from "@plane/types";
|
||||
import { TIssue } from "@plane/types";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
|
||||
interface IIssueView {
|
||||
@ -31,7 +31,7 @@ interface IIssueView {
|
||||
handleCopyText: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
||||
redirectToIssueDetail: () => void;
|
||||
|
||||
issueUpdate: (issue: Partial<TIssue>) => void;
|
||||
issueUpdate: (issue: Partial<TIssue>) => Promise<void>;
|
||||
issueDelete: () => Promise<void>;
|
||||
|
||||
issueReactionCreate: (reaction: string) => void;
|
||||
|
1
web/tsconfig.tsbuildinfo
Normal file
1
web/tsconfig.tsbuildinfo
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user