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 { LiteTextReadOnlyEditor, LiteTextReadOnlyEditorWithRef } from "src/ui/read-only";
|
||||||
export type { LiteTextEditorProps, ILiteTextEditor } from "src/ui";
|
export type { LiteTextEditorProps, ILiteTextEditor } from "src/ui";
|
||||||
export type { LiteTextReadOnlyEditorProps, ILiteTextReadOnlyEditor } from "src/ui/read-only";
|
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 { RichTextReadOnlyEditor, RichTextReadOnlyEditorWithRef } from "src/ui/read-only";
|
||||||
export type { RichTextEditorProps, IRichTextEditor } from "src/ui";
|
export type { RichTextEditorProps, IRichTextEditor } from "src/ui";
|
||||||
export type { IRichTextReadOnlyEditor } from "src/ui/read-only";
|
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 React from "react";
|
||||||
import { ILiteTextReadOnlyEditor, LiteTextReadOnlyEditorWithRef } from "@plane/lite-text-editor";
|
import { ILiteTextReadOnlyEditor, LiteTextReadOnlyEditorWithRef } from "@plane/lite-text-editor";
|
||||||
|
import useEditorSuggestions from "hooks/use-editor-suggestions";
|
||||||
import { useMention } from "hooks/store";
|
|
||||||
|
|
||||||
interface EditorHandle {
|
interface EditorHandle {
|
||||||
clearEditor: () => void;
|
clearEditor: () => void;
|
||||||
@ -12,11 +11,9 @@ interface LiteTextReadOnlyEditorWrapperProps extends Omit<ILiteTextReadOnlyEdito
|
|||||||
|
|
||||||
export const LiteTextReadOnlyEditor = React.forwardRef<EditorHandle, LiteTextReadOnlyEditorWrapperProps>(
|
export const LiteTextReadOnlyEditor = React.forwardRef<EditorHandle, LiteTextReadOnlyEditorWrapperProps>(
|
||||||
({ ...props }, ref) => {
|
({ ...props }, ref) => {
|
||||||
const editorSuggestions = useMention();
|
const mentionsConfig = useEditorSuggestions();
|
||||||
|
|
||||||
return (
|
return <LiteTextReadOnlyEditorWithRef ref={ref} mentionHighlights={mentionsConfig.mentionHighlights} {...props} />;
|
||||||
<LiteTextReadOnlyEditorWithRef ref={ref} mentionHighlights={editorSuggestions.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 React from "react";
|
||||||
import { IRichTextReadOnlyEditor, RichTextReadOnlyEditorWithRef } from "@plane/rich-text-editor";
|
import { IRichTextReadOnlyEditor, RichTextReadOnlyEditorWithRef } from "@plane/rich-text-editor";
|
||||||
|
import useEditorSuggestions from "hooks/use-editor-suggestions";
|
||||||
import { useMention } from "hooks/store";
|
|
||||||
|
|
||||||
interface EditorHandle {
|
interface EditorHandle {
|
||||||
clearEditor: () => void;
|
clearEditor: () => void;
|
||||||
@ -12,11 +11,9 @@ interface RichTextReadOnlyEditorWrapperProps extends Omit<IRichTextReadOnlyEdito
|
|||||||
|
|
||||||
export const RichTextReadOnlyEditor = React.forwardRef<EditorHandle, RichTextReadOnlyEditorWrapperProps>(
|
export const RichTextReadOnlyEditor = React.forwardRef<EditorHandle, RichTextReadOnlyEditorWrapperProps>(
|
||||||
({ ...props }, ref) => {
|
({ ...props }, ref) => {
|
||||||
const editorSuggestions = useMention();
|
const mentionsConfig = useEditorSuggestions();
|
||||||
|
|
||||||
return (
|
return <RichTextReadOnlyEditorWithRef ref={ref} mentionHighlights={mentionsConfig.mentionHighlights} {...props} />;
|
||||||
<RichTextReadOnlyEditorWithRef ref={ref} mentionHighlights={editorSuggestions.mentionHighlights} {...props} />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ import { CommentReactions } from "components/issues/peek-overview";
|
|||||||
import { timeAgo } from "helpers/date-time.helper";
|
import { timeAgo } from "helpers/date-time.helper";
|
||||||
// types
|
// types
|
||||||
import { Comment } from "types/issue";
|
import { Comment } from "types/issue";
|
||||||
|
import { LiteTextReadOnlyEditor } from "components/editor/lite-text-read-only-editor";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
workspaceSlug: string;
|
workspaceSlug: string;
|
||||||
@ -126,11 +127,10 @@ export const CommentCard: React.FC<Props> = observer((props) => {
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div className={`${isEditing ? "hidden" : ""}`}>
|
<div className={`${isEditing ? "hidden" : ""}`}>
|
||||||
<LiteReadOnlyEditorWithRef
|
<LiteTextReadOnlyEditor
|
||||||
ref={showEditorRef}
|
ref={showEditorRef}
|
||||||
value={comment.comment_html}
|
value={comment.comment_html}
|
||||||
customClassName="text-xs border border-custom-border-200 bg-custom-background-100"
|
customClassName="text-xs border border-custom-border-200 bg-custom-background-100"
|
||||||
mentionHighlights={mentionsConfig.mentionHighlights}
|
|
||||||
/>
|
/>
|
||||||
<CommentReactions commentId={comment.id} projectId={comment.project} />
|
<CommentReactions commentId={comment.id} projectId={comment.project} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,7 +15,7 @@ import {
|
|||||||
// ui
|
// ui
|
||||||
import { Button, CenterPanelIcon, CustomSelect, FullScreenPanelIcon, SidePanelIcon, Spinner } from "@plane/ui";
|
import { Button, CenterPanelIcon, CustomSelect, FullScreenPanelIcon, SidePanelIcon, Spinner } from "@plane/ui";
|
||||||
// types
|
// types
|
||||||
import { TIssue, IIssueLink, ILinkDetails } from "@plane/types";
|
import { TIssue } from "@plane/types";
|
||||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||||
|
|
||||||
interface IIssueView {
|
interface IIssueView {
|
||||||
@ -31,7 +31,7 @@ interface IIssueView {
|
|||||||
handleCopyText: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
handleCopyText: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
||||||
redirectToIssueDetail: () => void;
|
redirectToIssueDetail: () => void;
|
||||||
|
|
||||||
issueUpdate: (issue: Partial<TIssue>) => void;
|
issueUpdate: (issue: Partial<TIssue>) => Promise<void>;
|
||||||
issueDelete: () => Promise<void>;
|
issueDelete: () => Promise<void>;
|
||||||
|
|
||||||
issueReactionCreate: (reaction: string) => 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