@layers-app/shared 0.0.29 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/KanbanLayout-fxFPIQAt.js +287 -0
- package/dist/TimeLine-Cv82PyoW.js +198 -0
- package/dist/assets/jsons/emoji-categorized.json.d.ts +3 -0
- package/dist/assets/jsons/icons.min.json.d.ts +3 -0
- package/dist/components/CommentComposer/index.d.ts +52 -0
- package/dist/components/CommentsPanel/components/CommentActions.d.ts +16 -0
- package/dist/components/CommentsPanel/components/CommentFilterMenu.d.ts +6 -0
- package/dist/components/CommentsPanel/components/CommentPanelListItem.d.ts +22 -0
- package/dist/components/CommentsPanel/components/CommentsEmptyPlaceholder.d.ts +3 -0
- package/dist/components/CommentsPanel/components/CommentsFilterHeader.d.ts +3 -0
- package/dist/components/CommentsPanel/components/CommentsListItemMenu.d.ts +6 -0
- package/dist/components/CommentsPanel/components/CommentsMultiSelectUsers.d.ts +6 -0
- package/dist/components/CommentsPanel/components/CommentsPanelList.d.ts +19 -0
- package/dist/components/CommentsPanel/components/CommentsThreadReplyControls.d.ts +11 -0
- package/dist/components/CommentsPanel/components/CommentsUploadFilesPreview.d.ts +5 -0
- package/dist/components/CommentsPanel/components/Icon.d.ts +8 -0
- package/dist/components/CommentsPanel/components/RemoveConfirmModal.d.ts +11 -0
- package/dist/components/CommentsPanel/index.d.ts +22 -0
- package/dist/components/CommentsPanel/store.d.ts +19 -0
- package/dist/components/CommentsPanel/types.d.ts +244 -0
- package/dist/components/CommentsPanel/utils.d.ts +8 -0
- package/dist/components/EmojiPicker/EmojiPanel.d.ts +1 -1
- package/dist/components/EmojiPicker/IconsPanel.d.ts +2 -2
- package/dist/components/EmojiPicker/constants.d.ts +2 -0
- package/dist/components/EmojiPicker/types.d.ts +13 -0
- package/dist/components/LanguagePicker/LanguagePicker.d.ts +6 -0
- package/dist/components/NoData/NoData.d.ts +3 -0
- package/dist/components/OnBoarding/steps/DifferentLayouts/TimeLine.d.ts +1 -1
- package/dist/components/PaymentCancel/PaymentCancel.d.ts +1 -0
- package/dist/components/PaymentError/PaymentError.d.ts +1 -0
- package/dist/components/PaymentSuccess/PaymentSuccess.d.ts +1 -0
- package/dist/components/StorageUsageProgress/index.d.ts +15 -0
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts +9 -2
- package/dist/emoji-categorized-DAOdcF53.js +4 -0
- package/dist/helpers/getFileIcons.d.ts +1 -0
- package/dist/helpers/getFileType.d.ts +1 -0
- package/dist/helpers/pickRandomIcon.d.ts +1 -1
- package/dist/hooks/useDisableWindowScroll.d.ts +1 -0
- package/dist/icons.min-Chyr-bjL.js +4 -0
- package/dist/index-D2ft5hZL.js +38868 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.esm-BzYOVL-j.js +6814 -0
- package/dist/index.js +120 -46264
- package/dist/index.umd.cjs +86 -800
- package/dist/store/pageUpdateCount.d.ts +7 -1
- package/dist/store/plansModal.d.ts +7 -0
- package/dist/utils/formatStorage.d.ts +6 -0
- package/package.json +2 -2
- package/dist/components/EmojiPicker/icons.json.d.ts +0 -80399
- package/dist/components/ErrorAlert/ErrorAlert.story.d.ts +0 -8
- package/dist/components/LanguagePicker/index.d.ts +0 -11
- package/dist/components/NewColorPicker/NewColorPicker.story.d.ts +0 -6
- package/dist/icons-DayTtENI.js +0 -5658
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { RangeSelection } from '@layers-app/editor';
|
|
3
|
+
import { Comment, GeneralComment, ICommentOptions, ICommentFile, ILocalCommentFile, IUser, Thread } from '../CommentsPanel/types.ts';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
interface CommentValue {
|
|
6
|
+
value: string;
|
|
7
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
8
|
+
}
|
|
9
|
+
interface CommentComposerProps {
|
|
10
|
+
children: ((args: {
|
|
11
|
+
onSubmit: () => void;
|
|
12
|
+
handleBlur: () => void;
|
|
13
|
+
autoFocus: boolean;
|
|
14
|
+
setCommentValue: React.Dispatch<React.SetStateAction<CommentValue>>;
|
|
15
|
+
commentValue: CommentValue;
|
|
16
|
+
registerClearEditor?: (fn: () => void) => void;
|
|
17
|
+
}) => React.ReactNode);
|
|
18
|
+
getSelectionText?: (selection: RangeSelection) => string;
|
|
19
|
+
removeCommentImage?: (index: string) => void;
|
|
20
|
+
providedUser?: IUser;
|
|
21
|
+
updateLocation?: (boxElem: HTMLDivElement, selectionRef: MutableRefObject<RangeSelection | null>, selectionState: {
|
|
22
|
+
container: HTMLDivElement;
|
|
23
|
+
elements: HTMLSpanElement[];
|
|
24
|
+
}) => void;
|
|
25
|
+
commentValue: {
|
|
26
|
+
value: string;
|
|
27
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
28
|
+
};
|
|
29
|
+
setCommentValue: React.Dispatch<React.SetStateAction<{
|
|
30
|
+
value: string;
|
|
31
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
32
|
+
}>>;
|
|
33
|
+
isEditInput?: boolean;
|
|
34
|
+
autoFocus?: boolean;
|
|
35
|
+
handleBlur: () => void;
|
|
36
|
+
thread?: Thread;
|
|
37
|
+
updateThreadId?: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
|
|
38
|
+
setCommentActions?: React.Dispatch<React.SetStateAction<{
|
|
39
|
+
replyList: string[];
|
|
40
|
+
editCommentId: string;
|
|
41
|
+
editedContent: string;
|
|
42
|
+
}>>;
|
|
43
|
+
isGeneral?: boolean;
|
|
44
|
+
submitAddComment: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: RangeSelection | null, files?: File[]) => void;
|
|
45
|
+
handleEditComment?: (data: {
|
|
46
|
+
value: string;
|
|
47
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
48
|
+
}) => void;
|
|
49
|
+
provideCommentOptions?: ICommentOptions;
|
|
50
|
+
}
|
|
51
|
+
export declare const CommentComposer: ({ submitAddComment, commentValue, thread, setCommentValue, handleBlur, autoFocus, provideCommentOptions, removeCommentImage, handleEditComment, isEditInput, isGeneral, updateThreadId, setCommentActions, updateLocation, getSelectionText, children, providedUser, }: CommentComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Comment, GeneralComment, SharedCommentProps, Thread } from '../types.ts';
|
|
3
|
+
interface CommentActionsProps extends Omit<SharedCommentProps, 'commentOrThread'> {
|
|
4
|
+
accepted: boolean;
|
|
5
|
+
showEmojiPicker: boolean;
|
|
6
|
+
setShowEmojiPicker: React.Dispatch<React.SetStateAction<boolean>>;
|
|
7
|
+
commentSelected?: boolean;
|
|
8
|
+
commentOrThread: Thread | GeneralComment;
|
|
9
|
+
handleBlur: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
10
|
+
toggleRepliesInput?: (id: string, event: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
+
handleEditClick: (comment: Comment | Thread | GeneralComment) => void;
|
|
12
|
+
handleReactionClick: (emoji: string) => void;
|
|
13
|
+
hasPermission: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const CommentActions: React.FC<CommentActionsProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CommentsFilter } from '../types.ts';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const CommentFilterMenu: ({ commentsFilter, setCommentsFilter, }: {
|
|
4
|
+
commentsFilter: CommentsFilter;
|
|
5
|
+
setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NodeKey, RangeSelection } from '@layers-app/editor';
|
|
2
|
+
import { TFunction } from 'i18next';
|
|
3
|
+
import { Comment, GeneralComment, ICommentFile, SharedCommentProps, Thread, UpdateCommentTextArgs } from '../types.ts';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
interface ICommentPanelListItemProps extends SharedCommentProps {
|
|
6
|
+
t: TFunction;
|
|
7
|
+
deleteCommentImage: (photoToRemove: string, threadOrGeneralId: string, commentId?: string) => void;
|
|
8
|
+
addCommentReaction: (reaction: string, comment: Thread | GeneralComment | Comment, threatOrGeneral?: Thread | GeneralComment) => void;
|
|
9
|
+
removeCommentReactions: (reaction: string, threatOrGeneral: Thread | GeneralComment | Comment, comment?: Thread | GeneralComment) => void;
|
|
10
|
+
toggleRepliesInput: (id: string) => void;
|
|
11
|
+
parentThreadOrGeneral?: Thread | GeneralComment;
|
|
12
|
+
updateThreadId?: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
|
|
13
|
+
handleClickThread?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
14
|
+
markNodeMap?: Map<string, Set<NodeKey>>;
|
|
15
|
+
submitAddComment?: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: RangeSelection | null, files?: File[]) => void;
|
|
16
|
+
updateCommentTextOrImage: UpdateCommentTextArgs;
|
|
17
|
+
replyInput?: string;
|
|
18
|
+
setShowReplyInput?: React.Dispatch<React.SetStateAction<string>>;
|
|
19
|
+
activeIDs?: Array<string>;
|
|
20
|
+
}
|
|
21
|
+
export declare const CommentPanelListItem: ({ commentOrThread, handleClickThread, markNodeMap, parentThreadOrGeneral, submitAddComment, removeCommentReactions, updateThreadId, addCommentReaction, deleteCommentImage, activeIDs, updateCommentTextOrImage, resolveThreat, toggleRepliesInput, t, deleteCommentOrThread, replyInput, }: ICommentPanelListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Comment, GeneralComment, Thread } from '../types.ts';
|
|
2
|
+
export declare const CommentsListItemMenu: ({ handleEditClick, commentOrThread, deleteCommentOrThread, }: {
|
|
3
|
+
handleEditClick: (comment: Comment | Thread | GeneralComment) => void;
|
|
4
|
+
commentOrThread: Comment | Thread | GeneralComment;
|
|
5
|
+
deleteCommentOrThread: (commentOrThread: Comment | Thread, thread?: Thread) => void;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CommentsFilter, IMember } from '../types.ts';
|
|
2
|
+
export declare function SearchableMultiSelect({ addUserToFilter, membersList, selectedMembers, }: {
|
|
3
|
+
addUserToFilter: (key: keyof CommentsFilter, member: IMember) => void;
|
|
4
|
+
membersList: IMember[];
|
|
5
|
+
selectedMembers: IMember[];
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { RangeSelection, NodeKey } from '@layers-app/editor';
|
|
3
|
+
import { Comment, Comments, GeneralComment, ICommentFile, SharedCommentProps, Thread, UpdateCommentTextArgs } from '../types.ts';
|
|
4
|
+
interface CommentsPanelListProps extends Omit<SharedCommentProps, 'commentOrThread'> {
|
|
5
|
+
activeIDs: string[];
|
|
6
|
+
comments: Comments;
|
|
7
|
+
listRef: {
|
|
8
|
+
current: null | HTMLUListElement;
|
|
9
|
+
};
|
|
10
|
+
updateThreadId: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
|
|
11
|
+
deleteCommentImage: (photoToRemove: string, threadOrGeneralId: string, commentId?: string) => void;
|
|
12
|
+
removeCommentReactions: (reaction: string, threatOrGeneral: Thread | GeneralComment | Comment, comment?: Thread | GeneralComment) => void;
|
|
13
|
+
addCommentReaction: (reaction: string, comment: Thread | GeneralComment | Comment, threatOrGeneral?: Thread | GeneralComment) => void;
|
|
14
|
+
markNodeMap: Map<string, Set<NodeKey>>;
|
|
15
|
+
submitAddComment: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: RangeSelection | null, files?: File[]) => void;
|
|
16
|
+
updateCommentTextOrImage: UpdateCommentTextArgs;
|
|
17
|
+
}
|
|
18
|
+
export declare function CommentsPanelList({ activeIDs, comments, deleteCommentOrThread, listRef, addCommentReaction, updateThreadId, submitAddComment, deleteCommentImage, removeCommentReactions, markNodeMap, resolveThreat, updateCommentTextOrImage, }: CommentsPanelListProps): ReactElement;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface CommentsThreadReplyControlsProps {
|
|
3
|
+
onSubmit: () => void;
|
|
4
|
+
handleFileChange: (files: File[]) => void;
|
|
5
|
+
disabledSubmitButton: boolean;
|
|
6
|
+
disabledUploadButton: boolean;
|
|
7
|
+
isSubmitting: boolean;
|
|
8
|
+
setIsSubmitting: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
|
+
}
|
|
10
|
+
export declare const CommentsThreadReplyControls: ({ onSubmit, handleFileChange, disabledSubmitButton, disabledUploadButton, setIsSubmitting, isSubmitting, }: CommentsThreadReplyControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ICommentFile, ILocalCommentFile } from '../types.ts';
|
|
2
|
+
export declare const CommentsUploadFilesPreview: ({ files, removeImage, }: {
|
|
3
|
+
files: Array<ICommentFile | ILocalCommentFile>;
|
|
4
|
+
removeImage: (index: number | string) => void;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconProps } from '@tabler/icons-react';
|
|
3
|
+
declare const iconsBlockTypeToBlockName: Record<string, FC<IconProps>>;
|
|
4
|
+
declare const Icon: ({ name, iconStyle, ...rest }: {
|
|
5
|
+
name: keyof typeof iconsBlockTypeToBlockName;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Icon;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type RemoveConfirmModalProps = {
|
|
2
|
+
opened: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
onConfirm: () => void;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
confirmLabel?: string;
|
|
8
|
+
cancelLabel?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const RemoveConfirmModal: ({ opened, onClose, onConfirm, title, description, confirmLabel, cancelLabel, }: RemoveConfirmModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { NodeKey, RangeSelection } from '@layers-app/editor';
|
|
3
|
+
import { Comment, Comments, GeneralComment, GetEditorFn, ICommentFile, StoreOptions, Thread, UpdateCommentTextArgs, SharedCommentProps } from './types.ts';
|
|
4
|
+
interface CommentsPanelProps extends Omit<SharedCommentProps, 'commentOrThread'> {
|
|
5
|
+
comments: Comments;
|
|
6
|
+
activeIDs: string[];
|
|
7
|
+
storeOptions: StoreOptions;
|
|
8
|
+
updateThreadId: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
|
|
9
|
+
deleteCommentImage: (photoToRemove: string, threadOrGeneralId: string, commentId?: string) => void;
|
|
10
|
+
removeCommentReactions: (reaction: string, threatOrGeneral: Thread | GeneralComment | Comment, comment?: Thread | GeneralComment) => void;
|
|
11
|
+
addCommentReaction: (reaction: string, comment: Thread | GeneralComment | Comment, threatOrGeneral?: Thread | GeneralComment) => void;
|
|
12
|
+
updateCommentTextOrImage: UpdateCommentTextArgs;
|
|
13
|
+
markNodeMap: Map<string, Set<NodeKey>>;
|
|
14
|
+
submitAddComment: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: RangeSelection | null, files?: File[]) => void;
|
|
15
|
+
listRef: {
|
|
16
|
+
current: null | HTMLUListElement;
|
|
17
|
+
};
|
|
18
|
+
getEditor: GetEditorFn;
|
|
19
|
+
clipPath?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function CommentsPanel({ activeIDs, deleteCommentOrThread, comments, submitAddComment, markNodeMap, storeOptions, deleteCommentImage, addCommentReaction, removeCommentReactions, updateCommentTextOrImage, listRef, resolveThreat, updateThreadId, getEditor, clipPath }: CommentsPanelProps): ReactElement;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GetEditorFn, ICommentOptions, IMember, IUser } from './types.ts';
|
|
2
|
+
interface CommentsState {
|
|
3
|
+
workspaceMembers: IMember[];
|
|
4
|
+
currentUser?: IUser;
|
|
5
|
+
showComments: boolean;
|
|
6
|
+
commentOptions?: ICommentOptions;
|
|
7
|
+
getEditor?: GetEditorFn;
|
|
8
|
+
selectMarkNode?: (markNodeKeys: Set<string>, activeElement: Element | null) => void;
|
|
9
|
+
initializeComments: (data: {
|
|
10
|
+
workspaceMembers?: IMember[];
|
|
11
|
+
currentUser?: IUser;
|
|
12
|
+
showComments?: boolean;
|
|
13
|
+
commentOptions?: ICommentOptions;
|
|
14
|
+
getEditor?: GetEditorFn;
|
|
15
|
+
selectMarkNode?: (markNodeKeys: Set<string>, activeElement: Element | null) => void;
|
|
16
|
+
}) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const useCommentsStore: import('zustand').UseBoundStore<import('zustand').StoreApi<CommentsState>>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ICommentReaction {
|
|
3
|
+
id: string;
|
|
4
|
+
commentId: string;
|
|
5
|
+
parentId: string;
|
|
6
|
+
parentType: 'COMMENT' | 'THREAD';
|
|
7
|
+
reaction: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
deleted: boolean;
|
|
11
|
+
deletedAt: string;
|
|
12
|
+
version: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ICommentFile extends File {
|
|
15
|
+
id?: string;
|
|
16
|
+
lastModified: number;
|
|
17
|
+
lastModifiedDate: Date;
|
|
18
|
+
name: string;
|
|
19
|
+
size: number;
|
|
20
|
+
type: string;
|
|
21
|
+
webkitRelativePath: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ILocalCommentFile {
|
|
24
|
+
clientKey: string;
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
file: File;
|
|
27
|
+
}
|
|
28
|
+
export type UpdateCommentTextArgs = (text: {
|
|
29
|
+
value: string;
|
|
30
|
+
restore: boolean;
|
|
31
|
+
}, files: {
|
|
32
|
+
deletedFile: ICommentFile[];
|
|
33
|
+
newFiles: ILocalCommentFile[];
|
|
34
|
+
}, threadOrGeneralId: string, commentId?: string) => void;
|
|
35
|
+
export type Comment = {
|
|
36
|
+
author: string;
|
|
37
|
+
content: string;
|
|
38
|
+
deleted: boolean;
|
|
39
|
+
clientKey: string;
|
|
40
|
+
id: string;
|
|
41
|
+
tempId?: string;
|
|
42
|
+
reactions: ICommentReaction[];
|
|
43
|
+
files: Array<ICommentFile | ILocalCommentFile>;
|
|
44
|
+
timeStamp: number;
|
|
45
|
+
type: 'comment';
|
|
46
|
+
};
|
|
47
|
+
export type Thread = {
|
|
48
|
+
children: Array<Comment>;
|
|
49
|
+
id: string;
|
|
50
|
+
quote: string;
|
|
51
|
+
type: 'thread';
|
|
52
|
+
resolve: CommentResolve;
|
|
53
|
+
author: string;
|
|
54
|
+
tempId?: string;
|
|
55
|
+
reactions: ICommentReaction[];
|
|
56
|
+
files: Array<ICommentFile | ILocalCommentFile>;
|
|
57
|
+
timeStamp: number;
|
|
58
|
+
clientKey: string;
|
|
59
|
+
content: string;
|
|
60
|
+
deleted: boolean;
|
|
61
|
+
};
|
|
62
|
+
export type GeneralComment = {
|
|
63
|
+
content: string;
|
|
64
|
+
author: string;
|
|
65
|
+
id: string;
|
|
66
|
+
tempId?: string;
|
|
67
|
+
quote: string;
|
|
68
|
+
timeStamp: number;
|
|
69
|
+
resolve: CommentResolve;
|
|
70
|
+
reactions: ICommentReaction[];
|
|
71
|
+
files: Array<ICommentFile | ILocalCommentFile>;
|
|
72
|
+
type: 'general';
|
|
73
|
+
clientKey: string;
|
|
74
|
+
children: Array<Comment>;
|
|
75
|
+
deleted: boolean;
|
|
76
|
+
};
|
|
77
|
+
type CommentValueType = {
|
|
78
|
+
value: string;
|
|
79
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
80
|
+
};
|
|
81
|
+
export type GetEditorFn = (params: {
|
|
82
|
+
onSubmit: () => void;
|
|
83
|
+
handleBlur: () => void;
|
|
84
|
+
autoFocus: boolean;
|
|
85
|
+
setCommentValue: React.Dispatch<React.SetStateAction<CommentValueType>>;
|
|
86
|
+
commentValue?: CommentValueType;
|
|
87
|
+
initialContent?: string;
|
|
88
|
+
registerClearEditor?: (fn: () => void) => void;
|
|
89
|
+
}) => React.ReactNode;
|
|
90
|
+
export type Comments = Array<Thread | Comment | GeneralComment>;
|
|
91
|
+
export type CommentResolve = 'ACCEPTED' | 'REJECTED' | null;
|
|
92
|
+
export interface ICommentsFilterProps {
|
|
93
|
+
commentsFilter: CommentsFilter;
|
|
94
|
+
setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
|
|
95
|
+
disabled: boolean;
|
|
96
|
+
updateThreadId: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
|
|
97
|
+
commentValue: {
|
|
98
|
+
value: string;
|
|
99
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
100
|
+
};
|
|
101
|
+
setCommentValue: React.Dispatch<React.SetStateAction<{
|
|
102
|
+
value: string;
|
|
103
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
104
|
+
}>>;
|
|
105
|
+
submitAddComment: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: any | null, files?: File[]) => void;
|
|
106
|
+
}
|
|
107
|
+
export interface IMember {
|
|
108
|
+
accepted: boolean;
|
|
109
|
+
avatarUrl: string;
|
|
110
|
+
email: string;
|
|
111
|
+
expiresAt: string | null;
|
|
112
|
+
invitationId: string | null;
|
|
113
|
+
invitationToken: string | null;
|
|
114
|
+
name: string;
|
|
115
|
+
roleType: string;
|
|
116
|
+
roleId: string;
|
|
117
|
+
userId: string;
|
|
118
|
+
}
|
|
119
|
+
export interface IUser {
|
|
120
|
+
activeWorkspaceId: string;
|
|
121
|
+
createdAt: string;
|
|
122
|
+
darkMode: boolean;
|
|
123
|
+
email: string;
|
|
124
|
+
id: string;
|
|
125
|
+
lang: string;
|
|
126
|
+
metaData: {
|
|
127
|
+
cover: Record<string, any>;
|
|
128
|
+
about: string;
|
|
129
|
+
socialNetworks: any[];
|
|
130
|
+
fontFamily: string;
|
|
131
|
+
};
|
|
132
|
+
name: string;
|
|
133
|
+
nickname: string;
|
|
134
|
+
plan: 'FREE' | 'PRO' | 'BUSINESS' | string;
|
|
135
|
+
profilePicture: {
|
|
136
|
+
url: string;
|
|
137
|
+
};
|
|
138
|
+
timeZone: string | null;
|
|
139
|
+
twoFactorEnabled: boolean;
|
|
140
|
+
workspaces: any[];
|
|
141
|
+
}
|
|
142
|
+
export type CommentsFilter = {
|
|
143
|
+
resolved: boolean;
|
|
144
|
+
feedback: boolean;
|
|
145
|
+
filteredUsers: IMember[];
|
|
146
|
+
};
|
|
147
|
+
interface IFetchCommentsParams {
|
|
148
|
+
fetchPageComments?: boolean;
|
|
149
|
+
pageId: string;
|
|
150
|
+
fetchCommentComments?: boolean;
|
|
151
|
+
onSuccess: (data: any) => void;
|
|
152
|
+
}
|
|
153
|
+
interface IResolveCommentParams {
|
|
154
|
+
threatId: string;
|
|
155
|
+
resolveValue: 'ACCEPTED' | 'REJECTED';
|
|
156
|
+
onSuccess?: () => void;
|
|
157
|
+
}
|
|
158
|
+
interface ICommentReactionParams {
|
|
159
|
+
commentId: string;
|
|
160
|
+
author: string;
|
|
161
|
+
emojiValue: string;
|
|
162
|
+
onSuccess?: (data: ICommentReaction) => void;
|
|
163
|
+
onError: () => void;
|
|
164
|
+
}
|
|
165
|
+
interface IDeleteReactionParams {
|
|
166
|
+
reactionId: string;
|
|
167
|
+
onSuccess?: () => void;
|
|
168
|
+
onError: () => void;
|
|
169
|
+
}
|
|
170
|
+
interface IDeleteCommentParams {
|
|
171
|
+
deleteCommentId: string;
|
|
172
|
+
onSuccess?: () => void;
|
|
173
|
+
}
|
|
174
|
+
interface IRestoreCommentParams {
|
|
175
|
+
commentId: string;
|
|
176
|
+
onSuccess?: () => void;
|
|
177
|
+
}
|
|
178
|
+
interface IUpdateCommentTextParams {
|
|
179
|
+
commentId: string;
|
|
180
|
+
textValue: string;
|
|
181
|
+
onSuccess?: () => void;
|
|
182
|
+
onError?: () => void;
|
|
183
|
+
}
|
|
184
|
+
interface IDeleteCommentImageParams {
|
|
185
|
+
photoToRemove: string;
|
|
186
|
+
onSuccess?: () => void;
|
|
187
|
+
}
|
|
188
|
+
interface ISubmitCommentParams {
|
|
189
|
+
text: string;
|
|
190
|
+
parentType: string;
|
|
191
|
+
parentId: string;
|
|
192
|
+
commentType: string;
|
|
193
|
+
onSuccess?: (data: any) => void;
|
|
194
|
+
}
|
|
195
|
+
export interface IGetReactionsParams {
|
|
196
|
+
commentId: string;
|
|
197
|
+
}
|
|
198
|
+
export interface IGetPhotosParams {
|
|
199
|
+
commentId: string;
|
|
200
|
+
}
|
|
201
|
+
interface IUploadCommentFileParams {
|
|
202
|
+
file: File;
|
|
203
|
+
commentId: string;
|
|
204
|
+
onSuccess?: (data: any) => void;
|
|
205
|
+
}
|
|
206
|
+
interface ICommentActions {
|
|
207
|
+
fetchCommentsApi: (params: IFetchCommentsParams) => Promise<void>;
|
|
208
|
+
resolveCommentApi: (params: IResolveCommentParams) => Promise<void>;
|
|
209
|
+
commentReactionApi: (params: ICommentReactionParams) => Promise<void>;
|
|
210
|
+
deleteReactionApi: (params: IDeleteReactionParams) => Promise<void>;
|
|
211
|
+
deleteCommentApi: (params: IDeleteCommentParams) => Promise<void>;
|
|
212
|
+
restoreCommentApi: (params: IRestoreCommentParams) => Promise<void>;
|
|
213
|
+
updateCommentTextApi: (params: IUpdateCommentTextParams) => Promise<void>;
|
|
214
|
+
deleteCommentImageApi: (params: IDeleteCommentImageParams) => Promise<void>;
|
|
215
|
+
submitCommentApi: (params: ISubmitCommentParams) => Promise<void>;
|
|
216
|
+
getReactionsApi: (params: IGetReactionsParams) => Promise<{
|
|
217
|
+
content: ICommentReaction[];
|
|
218
|
+
}>;
|
|
219
|
+
getPhotosApi: (params: IGetPhotosParams) => Promise<File[]>;
|
|
220
|
+
uploadCommentFileApi: (params: IUploadCommentFileParams) => Promise<void>;
|
|
221
|
+
}
|
|
222
|
+
export interface ICommentOptions {
|
|
223
|
+
showComments: boolean;
|
|
224
|
+
setShowComments: (value?: boolean) => void;
|
|
225
|
+
pageId: string;
|
|
226
|
+
workspaceInfo: {
|
|
227
|
+
title: string;
|
|
228
|
+
icon: string;
|
|
229
|
+
};
|
|
230
|
+
commentActions: ICommentActions;
|
|
231
|
+
}
|
|
232
|
+
export interface SharedCommentProps {
|
|
233
|
+
commentOrThread: Comment | Thread | GeneralComment;
|
|
234
|
+
deleteCommentOrThread: (commentOrThread: Comment | Thread, thread?: Thread) => void;
|
|
235
|
+
resolveThreat?: (threat: Thread | GeneralComment) => void;
|
|
236
|
+
}
|
|
237
|
+
type SelectMarkNodeFn = (markNodeKeys: Set<string>, activeElement: Element | null) => void;
|
|
238
|
+
export interface StoreOptions {
|
|
239
|
+
currentUser?: IUser;
|
|
240
|
+
workspaceMembers?: IMember[] | undefined;
|
|
241
|
+
commentOptions?: ICommentOptions;
|
|
242
|
+
selectMarkNode: SelectMarkNodeFn;
|
|
243
|
+
}
|
|
244
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ICommentFile, ILocalCommentFile } from './types.ts';
|
|
2
|
+
import { TFunction } from 'i18next';
|
|
3
|
+
export declare const cutDeleteImageId: (imageSrc: string) => string;
|
|
4
|
+
export declare const uploadAllFiles: (commentId: string, images: ILocalCommentFile[], uploadCommentFileApi: any) => Promise<ICommentFile[]>;
|
|
5
|
+
export declare function scrollToTop(selector: string): void;
|
|
6
|
+
export declare const getDescription: (type: string, t: TFunction) => string;
|
|
7
|
+
export declare const getTitle: (type: string, t: TFunction) => string;
|
|
8
|
+
export declare const IS_APPLE: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmojiPickerProps } from '
|
|
1
|
+
import { EmojiPickerProps } from '../..';
|
|
2
2
|
export declare const EmojiPanel: ({ locales, onChange, onClose, setRandomIcon, }: Pick<EmojiPickerProps, 'locales' | 'value' | 'onChange'> & {
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
setRandomIcon: (icon: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { EmojiPickerProps } from './EmojiPicker';
|
|
2
|
-
export declare const IconsPanel: ({ showColors, locales, onChange, value, onClose, }: Pick<EmojiPickerProps, 'locales' | 'showColors' | 'value' | 'onChange'> & {
|
|
2
|
+
export declare const IconsPanel: import('react').MemoExoticComponent<({ showColors, locales, onChange, value, onClose, }: Pick<EmojiPickerProps, 'locales' | 'showColors' | 'value' | 'onChange'> & {
|
|
3
3
|
onClose: () => void;
|
|
4
|
-
}) => import("react/jsx-runtime").JSX.Element
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -16,6 +16,9 @@ export declare const illustrationMap: {
|
|
|
16
16
|
noGroups: FC<import('react').SVGProps<SVGSVGElement>>;
|
|
17
17
|
noNotifications: FC<import('react').SVGProps<SVGSVGElement>>;
|
|
18
18
|
noWorkspaces: FC<import('react').SVGProps<SVGSVGElement>>;
|
|
19
|
+
paymentSuccess: FC<import('react').SVGProps<SVGSVGElement>>;
|
|
20
|
+
notSuccessMan: FC<import('react').SVGProps<SVGSVGElement>>;
|
|
21
|
+
alertMan: FC<import('react').SVGProps<SVGSVGElement>>;
|
|
19
22
|
'404': FC<import('react').SVGProps<SVGSVGElement>>;
|
|
20
23
|
'500': FC<import('react').SVGProps<SVGSVGElement>>;
|
|
21
24
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TimeLine: () => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
declare const TimeLine: () => import("react/jsx-runtime").JSX.Element | null;
|
|
2
2
|
export default TimeLine;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PaymentCancel: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PaymentError: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PaymentSuccess: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type StorageCategory = 'archives' | 'documents' | 'audio' | 'images' | 'other' | 'code' | 'videos';
|
|
3
|
+
export interface StorageItem {
|
|
4
|
+
type: StorageCategory;
|
|
5
|
+
usedKb: number;
|
|
6
|
+
}
|
|
7
|
+
interface StorageUsageProgressProps {
|
|
8
|
+
simple?: boolean;
|
|
9
|
+
color?: string;
|
|
10
|
+
storageByCategory: StorageItem[];
|
|
11
|
+
totalStorageKb: number;
|
|
12
|
+
size?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const StorageUsageProgress: React.FC<StorageUsageProgressProps>;
|
|
15
|
+
export {};
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export interface MenuWorkspace {
|
|
3
3
|
workspaceId: string;
|
|
4
4
|
workspaceName: string;
|
|
5
5
|
workspaceIcon: string;
|
|
6
6
|
invitation?: string | null;
|
|
7
|
-
|
|
7
|
+
storageLimitKb?: number;
|
|
8
|
+
storageUsedKb?: number;
|
|
9
|
+
storageAvailableKb?: number;
|
|
10
|
+
storageByCategory?: Array<{
|
|
11
|
+
type: 'videos' | 'documents' | 'images' | 'other' | 'audio' | 'archives' | 'code';
|
|
12
|
+
usedKb: number;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
8
15
|
export type RightSectionProps = {
|
|
9
16
|
isActive: boolean;
|
|
10
17
|
workspace: MenuWorkspace;
|