@layers-app/shared 0.0.39-comments.2 → 0.0.39-froms-01
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-DGHT9E0N.js → KanbanLayout-D5Ex3f-G.js} +1 -1
- package/dist/components/AttachmentsGalleryModal/ShakaPlayer.d.ts +5 -0
- package/dist/components/BouncingLogo/BouncingLogo.d.ts +3 -0
- package/dist/components/CommentComposer/index.d.ts +8 -10
- package/dist/components/CommentsPanel/components/CommentActionMenu.d.ts +1 -5
- package/dist/components/CommentsPanel/components/{CommentTabFilter.d.ts → CommentFilterMenu.d.ts} +1 -2
- package/dist/components/CommentsPanel/components/CommentPanelListItem.d.ts +4 -3
- package/dist/components/CommentsPanel/components/CommentsEmptyPlaceholder.d.ts +2 -5
- package/dist/components/CommentsPanel/components/CommentsListItemMenu.d.ts +1 -2
- package/dist/components/CommentsPanel/components/CommentsMultiSelectUsers.d.ts +6 -0
- package/dist/components/CommentsPanel/components/CommentsPanelList.d.ts +4 -3
- package/dist/components/CommentsPanel/components/CommentsThreadReplyControls.d.ts +1 -5
- package/dist/components/CommentsPanel/components/CommentsUploadFilesPreview.d.ts +5 -9
- package/dist/components/CommentsPanel/components/RemoveConfirmModal.d.ts +11 -0
- package/dist/components/CommentsPanel/index.d.ts +6 -10
- package/dist/components/CommentsPanel/store.d.ts +1 -7
- package/dist/components/CommentsPanel/types.d.ts +57 -157
- package/dist/components/CommentsPanel/utils.d.ts +5 -11
- package/dist/components/FormViewer/FormViewer.d.ts +8 -0
- package/dist/components/FormViewer/KeyboardNavigation.d.ts +5 -0
- package/dist/components/FormViewer/components/AllSlidesLayout.d.ts +7 -0
- package/dist/components/FormViewer/components/Container.d.ts +5 -0
- package/dist/components/FormViewer/components/ListFocusBox.d.ts +4 -0
- package/dist/components/FormViewer/components/NavControls.d.ts +4 -0
- package/dist/components/FormViewer/components/Navigation/Navigation.d.ts +1 -0
- package/dist/components/FormViewer/components/OneSlideLayput.d.ts +7 -0
- package/dist/components/FormViewer/components/Step.d.ts +5 -0
- package/dist/components/FormViewer/components/StepDescription.d.ts +5 -0
- package/dist/components/FormViewer/components/StepTitle.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/AddOptionButton.d.ts +3 -0
- package/dist/components/FormViewer/components/fields/ButtonField/ButtonField.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/ButtonField/InnerButton.d.ts +8 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/ChoiceCard.d.ts +11 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/ChoiceField.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts +12 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/ConfirmButton.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/ConfirmField.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/DateField.d.ts +4 -0
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.d.ts +11 -0
- package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/EmailField.d.ts +4 -0
- package/dist/components/FormViewer/components/fields/LocationField.d.ts +4 -0
- package/dist/components/FormViewer/components/fields/LongTextField.d.ts +4 -0
- package/dist/components/FormViewer/components/fields/MultipleChoice/MultipleChoiceCard.d.ts +12 -0
- package/dist/components/FormViewer/components/fields/MultipleChoice/MultipleChoiceField.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/NumberField.d.ts +4 -0
- package/dist/components/FormViewer/components/fields/PhoneField.d.ts +4 -0
- package/dist/components/FormViewer/components/fields/ProgressLine.d.ts +1 -0
- package/dist/components/FormViewer/components/fields/RatingField.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts +21 -0
- package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.d.ts +14 -0
- package/dist/components/FormViewer/components/fields/SliderField.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/StartButton.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/StartField.d.ts +5 -0
- package/dist/components/FormViewer/components/fields/TextField.d.ts +4 -0
- package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts +30 -0
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.d.ts +8 -0
- package/dist/components/FormViewer/components/fields/YesNoField.d.ts +4 -0
- package/dist/components/FormViewer/helpers/conditions.d.ts +281 -0
- package/dist/components/FormViewer/helpers/controls.d.ts +6 -0
- package/dist/components/FormViewer/helpers/cssScoping.d.ts +11 -0
- package/dist/components/FormViewer/helpers/helpers.d.ts +279 -0
- package/dist/components/FormViewer/helpers/index.d.ts +7 -0
- package/dist/components/FormViewer/helpers/slides.d.ts +3 -0
- package/dist/components/FormViewer/helpers/staticClasses.d.ts +47 -0
- package/dist/components/FormViewer/helpers/steps.d.ts +294 -0
- package/dist/components/FormViewer/helpers/themeUtils.d.ts +2 -0
- package/dist/components/FormViewer/helpers/validation.d.ts +10 -0
- package/dist/components/FormViewer/hooks/index.d.ts +6 -0
- package/dist/components/FormViewer/hooks/useActiveControl.d.ts +204 -0
- package/dist/components/FormViewer/hooks/useActiveStep.d.ts +277 -0
- package/dist/components/FormViewer/hooks/useCreateFormContext.d.ts +22 -0
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +145 -0
- package/dist/components/FormViewer/hooks/useFormMobile.d.ts +4 -0
- package/dist/components/FormViewer/hooks/useInterpolateText.d.ts +2 -0
- package/dist/components/FormViewer/index.d.ts +8 -0
- package/dist/components/FormViewer/store/formStore.d.ts +149 -0
- package/dist/components/FormViewer/store/formStoreApi.d.ts +36 -0
- package/dist/components/FormViewer/store/selectors.d.ts +75757 -0
- package/dist/components/FormViewer/types/form.d.ts +58 -0
- package/dist/components/FormViewer/types/schemes.d.ts +7591 -0
- package/dist/hooks/useEvent.d.ts +1 -0
- package/dist/{index-BI1_FPl_.js → index-BVdsep1X.js} +50439 -18306
- package/dist/index.d.ts +2 -2
- package/dist/index.js +68 -4
- package/dist/index.umd.cjs +59 -59
- package/package.json +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +0 -12
- package/dist/components/CommentFilterMenu/index.d.ts +0 -9
- package/dist/components/modals/openRemoveConfirmModal.d.ts +0 -4
|
@@ -11,7 +11,7 @@ import "@mantine/form";
|
|
|
11
11
|
import "@mantine/dropzone";
|
|
12
12
|
import "@mantine/notifications";
|
|
13
13
|
import "lodash-es";
|
|
14
|
-
import { u as useOnboardingState, S as StatusBadge } from "./index-
|
|
14
|
+
import { u as useOnboardingState, S as StatusBadge } from "./index-BVdsep1X.js";
|
|
15
15
|
import "react-dom";
|
|
16
16
|
import "draggable-ui";
|
|
17
17
|
import "@mantine/modals";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
2
|
import { RangeSelection } from '@layers-app/editor';
|
|
3
|
-
import { Comment,
|
|
3
|
+
import { Comment, GeneralComment, ICommentOptions, ICommentFile, ILocalCommentFile, IUser, Thread } from '../CommentsPanel/types.ts';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
interface CommentValue {
|
|
6
6
|
value: string;
|
|
7
|
-
files: ICommentFile[];
|
|
7
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
8
8
|
}
|
|
9
9
|
interface CommentComposerProps {
|
|
10
|
-
children: (args: {
|
|
10
|
+
children: ((args: {
|
|
11
11
|
onSubmit: () => void;
|
|
12
12
|
handleBlur: () => void;
|
|
13
13
|
autoFocus: boolean;
|
|
14
14
|
setCommentValue: React.Dispatch<React.SetStateAction<CommentValue>>;
|
|
15
15
|
commentValue: CommentValue;
|
|
16
16
|
registerClearEditor?: (fn: () => void) => void;
|
|
17
|
-
}) => React.ReactNode;
|
|
17
|
+
}) => React.ReactNode);
|
|
18
18
|
getSelectionText?: (selection: RangeSelection) => string;
|
|
19
19
|
removeCommentImage?: (index: string) => void;
|
|
20
20
|
providedUser?: IUser;
|
|
@@ -24,11 +24,11 @@ interface CommentComposerProps {
|
|
|
24
24
|
}) => void;
|
|
25
25
|
commentValue: {
|
|
26
26
|
value: string;
|
|
27
|
-
files: ICommentFile[];
|
|
27
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
28
28
|
};
|
|
29
29
|
setCommentValue: React.Dispatch<React.SetStateAction<{
|
|
30
30
|
value: string;
|
|
31
|
-
files: ICommentFile[];
|
|
31
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
32
32
|
}>>;
|
|
33
33
|
isEditInput?: boolean;
|
|
34
34
|
autoFocus?: boolean;
|
|
@@ -44,11 +44,9 @@ interface CommentComposerProps {
|
|
|
44
44
|
submitAddComment: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: RangeSelection | null, files?: File[]) => void;
|
|
45
45
|
handleEditComment?: (data: {
|
|
46
46
|
value: string;
|
|
47
|
-
files: ICommentFile[];
|
|
47
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
48
48
|
}) => void;
|
|
49
49
|
provideCommentOptions?: ICommentOptions;
|
|
50
|
-
placeholder?: string;
|
|
51
|
-
composerLocales?: CommentsNs;
|
|
52
50
|
}
|
|
53
|
-
export declare const CommentComposer: ({ submitAddComment, commentValue, thread, setCommentValue, handleBlur, autoFocus, provideCommentOptions, removeCommentImage, handleEditComment, isEditInput, isGeneral, updateThreadId, setCommentActions, updateLocation, getSelectionText, children, providedUser,
|
|
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;
|
|
54
52
|
export {};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { CommentsNs } from '../types.ts';
|
|
2
1
|
interface CommentActionMenuProps {
|
|
3
2
|
onDownload: () => void;
|
|
4
3
|
onDelete: () => void;
|
|
5
|
-
iconColor?: string;
|
|
6
|
-
hasPermission: boolean;
|
|
7
|
-
locales?: CommentsNs;
|
|
8
4
|
}
|
|
9
|
-
export declare const CommentActionMenu: ({ onDownload, onDelete
|
|
5
|
+
export declare const CommentActionMenu: ({ onDownload, onDelete }: CommentActionMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
6
|
export {};
|
package/dist/components/CommentsPanel/components/{CommentTabFilter.d.ts → CommentFilterMenu.d.ts}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CommentsFilter } from '../types.ts';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const CommentFilterMenu: ({ commentsFilter, setCommentsFilter, }: {
|
|
4
4
|
commentsFilter: CommentsFilter;
|
|
5
5
|
setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
|
|
6
|
-
listRef: React.RefObject<HTMLElement>;
|
|
7
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { NodeKey, RangeSelection } from '@layers-app/editor';
|
|
2
|
-
import {
|
|
2
|
+
import { TFunction } from 'i18next';
|
|
3
|
+
import { Comment, GeneralComment, ICommentFile, SharedCommentProps, Thread, UpdateCommentTextArgs } from '../types.ts';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
interface ICommentPanelListItemProps extends SharedCommentProps {
|
|
6
|
+
t: TFunction;
|
|
5
7
|
deleteCommentImage: (photoToRemove: string, threadOrGeneralId: string, commentId?: string) => void;
|
|
6
8
|
addCommentReaction: (reaction: string, comment: Thread | GeneralComment | Comment, threatOrGeneral?: Thread | GeneralComment) => void;
|
|
7
9
|
removeCommentReactions: (reaction: string, threatOrGeneral: Thread | GeneralComment | Comment, comment?: Thread | GeneralComment) => void;
|
|
@@ -15,7 +17,6 @@ interface ICommentPanelListItemProps extends SharedCommentProps {
|
|
|
15
17
|
replyInput?: string;
|
|
16
18
|
setShowReplyInput?: React.Dispatch<React.SetStateAction<string>>;
|
|
17
19
|
activeIDs?: Array<string>;
|
|
18
|
-
locales: CommentsNs;
|
|
19
20
|
}
|
|
20
|
-
export declare const CommentPanelListItem: ({ commentOrThread, handleClickThread, markNodeMap, parentThreadOrGeneral, submitAddComment, removeCommentReactions, updateThreadId, addCommentReaction, deleteCommentImage, activeIDs, updateCommentTextOrImage, resolveThreat, toggleRepliesInput,
|
|
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;
|
|
21
22
|
export {};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const CommentsEmptyPlaceholder: ({ commentsFilter, listRef }: {
|
|
4
|
-
commentsFilter: CommentsFilter;
|
|
5
|
-
listRef: React.RefObject<HTMLElement>;
|
|
1
|
+
export declare const CommentsEmptyPlaceholder: ({ resolved, }: {
|
|
2
|
+
resolved: boolean;
|
|
6
3
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Comment, GeneralComment, Thread } from '../types.ts';
|
|
2
|
-
export declare const CommentsListItemMenu: ({ handleEditClick, commentOrThread, deleteCommentOrThread,
|
|
2
|
+
export declare const CommentsListItemMenu: ({ handleEditClick, commentOrThread, deleteCommentOrThread, }: {
|
|
3
3
|
handleEditClick: (comment: Comment | Thread | GeneralComment) => void;
|
|
4
4
|
commentOrThread: Comment | Thread | GeneralComment;
|
|
5
5
|
deleteCommentOrThread: (commentOrThread: Comment | Thread, thread?: Thread) => void;
|
|
6
|
-
hasPermission: boolean;
|
|
7
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;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { RangeSelection, NodeKey } from '@layers-app/editor';
|
|
3
3
|
import { Comment, Comments, GeneralComment, ICommentFile, SharedCommentProps, Thread, UpdateCommentTextArgs } from '../types.ts';
|
|
4
|
-
import * as React from 'react';
|
|
5
4
|
interface CommentsPanelListProps extends Omit<SharedCommentProps, 'commentOrThread'> {
|
|
6
5
|
activeIDs: string[];
|
|
7
6
|
comments: Comments;
|
|
8
|
-
listRef:
|
|
7
|
+
listRef: {
|
|
8
|
+
current: null | HTMLUListElement;
|
|
9
|
+
};
|
|
9
10
|
updateThreadId: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
|
|
10
11
|
deleteCommentImage: (photoToRemove: string, threadOrGeneralId: string, commentId?: string) => void;
|
|
11
12
|
removeCommentReactions: (reaction: string, threatOrGeneral: Thread | GeneralComment | Comment, comment?: Thread | GeneralComment) => void;
|
|
12
13
|
addCommentReaction: (reaction: string, comment: Thread | GeneralComment | Comment, threatOrGeneral?: Thread | GeneralComment) => void;
|
|
13
|
-
markNodeMap
|
|
14
|
+
markNodeMap: Map<string, Set<NodeKey>>;
|
|
14
15
|
submitAddComment: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: RangeSelection | null, files?: File[]) => void;
|
|
15
16
|
updateCommentTextOrImage: UpdateCommentTextArgs;
|
|
16
17
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CommentsNs } from '../types.ts';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
interface CommentsThreadReplyControlsProps {
|
|
4
3
|
onSubmit: () => void;
|
|
@@ -7,9 +6,6 @@ interface CommentsThreadReplyControlsProps {
|
|
|
7
6
|
disabledUploadButton: boolean;
|
|
8
7
|
isSubmitting: boolean;
|
|
9
8
|
setIsSubmitting: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10
|
-
handleClearInput: () => void;
|
|
11
|
-
isFloatInput?: boolean;
|
|
12
|
-
locales?: CommentsNs;
|
|
13
9
|
}
|
|
14
|
-
export declare const CommentsThreadReplyControls: ({ onSubmit, handleFileChange, disabledSubmitButton, disabledUploadButton,
|
|
10
|
+
export declare const CommentsThreadReplyControls: ({ onSubmit, handleFileChange, disabledSubmitButton, disabledUploadButton, setIsSubmitting, isSubmitting, }: CommentsThreadReplyControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
11
|
export {};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
files: Array<ICommentFile>;
|
|
4
|
-
hasPermission?: boolean;
|
|
1
|
+
import { ICommentFile, ILocalCommentFile } from '../types.ts';
|
|
2
|
+
export declare const CommentsUploadFilesPreview: ({ files, removeImage, isUploaded, }: {
|
|
3
|
+
files: Array<ICommentFile | ILocalCommentFile>;
|
|
5
4
|
removeImage: (index: number | string) => void;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
export declare const CommentsUploadFilesPreview: ({ files, hasPermission, removeImage, showLoading, locales, }: CommentsUploadFilesPreviewProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
-
export {};
|
|
5
|
+
isUploaded?: boolean;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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 {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { NodeKey, RangeSelection } from '@layers-app/editor';
|
|
3
|
-
import { Comment, Comments,
|
|
4
|
-
import * as React from 'react';
|
|
3
|
+
import { Comment, Comments, GeneralComment, GetEditorFn, ICommentFile, StoreOptions, Thread, UpdateCommentTextArgs, SharedCommentProps } from './types.ts';
|
|
5
4
|
interface CommentsPanelProps extends Omit<SharedCommentProps, 'commentOrThread'> {
|
|
6
5
|
comments: Comments;
|
|
7
6
|
activeIDs: string[];
|
|
@@ -11,16 +10,13 @@ interface CommentsPanelProps extends Omit<SharedCommentProps, 'commentOrThread'>
|
|
|
11
10
|
removeCommentReactions: (reaction: string, threatOrGeneral: Thread | GeneralComment | Comment, comment?: Thread | GeneralComment) => void;
|
|
12
11
|
addCommentReaction: (reaction: string, comment: Thread | GeneralComment | Comment, threatOrGeneral?: Thread | GeneralComment) => void;
|
|
13
12
|
updateCommentTextOrImage: UpdateCommentTextArgs;
|
|
14
|
-
markNodeMap
|
|
13
|
+
markNodeMap: Map<string, Set<NodeKey>>;
|
|
15
14
|
submitAddComment: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: RangeSelection | null, files?: File[]) => void;
|
|
16
|
-
listRef:
|
|
15
|
+
listRef: {
|
|
16
|
+
current: null | HTMLUListElement;
|
|
17
|
+
};
|
|
17
18
|
getEditor: GetEditorFn;
|
|
18
19
|
clipPath?: string;
|
|
19
|
-
isSidebar?: boolean;
|
|
20
|
-
locales: CommentsLocales;
|
|
21
|
-
commentsFilter: CommentsFilter;
|
|
22
|
-
setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
|
|
23
|
-
isLoading: boolean;
|
|
24
20
|
}
|
|
25
|
-
export declare function CommentsPanel({ activeIDs, deleteCommentOrThread, comments, submitAddComment, markNodeMap, storeOptions, deleteCommentImage, addCommentReaction, removeCommentReactions, updateCommentTextOrImage, listRef, resolveThreat, updateThreadId,
|
|
21
|
+
export declare function CommentsPanel({ activeIDs, deleteCommentOrThread, comments, submitAddComment, markNodeMap, storeOptions, deleteCommentImage, addCommentReaction, removeCommentReactions, updateCommentTextOrImage, listRef, resolveThreat, updateThreadId, getEditor, clipPath }: CommentsPanelProps): ReactElement;
|
|
26
22
|
export {};
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetEditorFn, ICommentOptions, IMember, IUser } from './types.ts';
|
|
2
2
|
interface CommentsState {
|
|
3
3
|
workspaceMembers: IMember[];
|
|
4
4
|
currentUser?: IUser;
|
|
5
5
|
showComments: boolean;
|
|
6
|
-
adminPermission: boolean;
|
|
7
6
|
commentOptions?: ICommentOptions;
|
|
8
7
|
getEditor?: GetEditorFn;
|
|
9
|
-
isSidebar: boolean;
|
|
10
|
-
isGuest: boolean;
|
|
11
|
-
commentsLocales: CommentsNs;
|
|
12
8
|
selectMarkNode?: (markNodeKeys: Set<string>, activeElement: Element | null) => void;
|
|
13
9
|
initializeComments: (data: {
|
|
14
10
|
workspaceMembers?: IMember[];
|
|
@@ -16,8 +12,6 @@ interface CommentsState {
|
|
|
16
12
|
showComments?: boolean;
|
|
17
13
|
commentOptions?: ICommentOptions;
|
|
18
14
|
getEditor?: GetEditorFn;
|
|
19
|
-
isSidebar: boolean;
|
|
20
|
-
commentsLocales: CommentsNs;
|
|
21
15
|
selectMarkNode?: (markNodeKeys: Set<string>, activeElement: Element | null) => void;
|
|
22
16
|
}) => void;
|
|
23
17
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EditorType } from '@layers-app/editor';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
export interface ICommentReaction {
|
|
4
3
|
id: string;
|
|
@@ -12,69 +11,72 @@ export interface ICommentReaction {
|
|
|
12
11
|
deletedAt: string;
|
|
13
12
|
version: number;
|
|
14
13
|
}
|
|
15
|
-
export interface ICommentFile {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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;
|
|
22
27
|
}
|
|
23
28
|
export type UpdateCommentTextArgs = (text: {
|
|
24
29
|
value: string;
|
|
25
30
|
restore: boolean;
|
|
26
31
|
}, files: {
|
|
27
32
|
deletedFile: ICommentFile[];
|
|
28
|
-
newFiles:
|
|
33
|
+
newFiles: ILocalCommentFile[];
|
|
29
34
|
}, threadOrGeneralId: string, commentId?: string) => void;
|
|
30
35
|
export type Comment = {
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
author: string;
|
|
37
|
+
content: string;
|
|
33
38
|
deleted: boolean;
|
|
34
39
|
clientKey: string;
|
|
35
|
-
edited: boolean;
|
|
36
40
|
id: string;
|
|
37
41
|
tempId?: string;
|
|
38
42
|
reactions: ICommentReaction[];
|
|
39
|
-
files: Array<ICommentFile>;
|
|
43
|
+
files: Array<ICommentFile | ILocalCommentFile>;
|
|
40
44
|
timeStamp: number;
|
|
41
|
-
type:
|
|
45
|
+
type: 'comment';
|
|
42
46
|
};
|
|
43
47
|
export type Thread = {
|
|
44
48
|
children: Array<Comment>;
|
|
45
49
|
id: string;
|
|
46
50
|
quote: string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
authorId: string;
|
|
51
|
+
type: 'thread';
|
|
52
|
+
resolve: CommentResolve;
|
|
53
|
+
author: string;
|
|
51
54
|
tempId?: string;
|
|
52
55
|
reactions: ICommentReaction[];
|
|
53
|
-
files: Array<ICommentFile>;
|
|
56
|
+
files: Array<ICommentFile | ILocalCommentFile>;
|
|
54
57
|
timeStamp: number;
|
|
55
58
|
clientKey: string;
|
|
56
|
-
|
|
59
|
+
content: string;
|
|
57
60
|
deleted: boolean;
|
|
58
61
|
};
|
|
59
62
|
export type GeneralComment = {
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
content: string;
|
|
64
|
+
author: string;
|
|
62
65
|
id: string;
|
|
63
66
|
tempId?: string;
|
|
64
|
-
edited: boolean;
|
|
65
67
|
quote: string;
|
|
66
68
|
timeStamp: number;
|
|
67
|
-
|
|
69
|
+
resolve: CommentResolve;
|
|
68
70
|
reactions: ICommentReaction[];
|
|
69
|
-
files: Array<ICommentFile>;
|
|
70
|
-
type:
|
|
71
|
+
files: Array<ICommentFile | ILocalCommentFile>;
|
|
72
|
+
type: 'general';
|
|
71
73
|
clientKey: string;
|
|
72
74
|
children: Array<Comment>;
|
|
73
75
|
deleted: boolean;
|
|
74
76
|
};
|
|
75
77
|
type CommentValueType = {
|
|
76
78
|
value: string;
|
|
77
|
-
files: (ICommentFile)[];
|
|
79
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
78
80
|
};
|
|
79
81
|
export type GetEditorFn = (params: {
|
|
80
82
|
onSubmit: () => void;
|
|
@@ -84,57 +86,61 @@ export type GetEditorFn = (params: {
|
|
|
84
86
|
commentValue?: CommentValueType;
|
|
85
87
|
initialContent?: string;
|
|
86
88
|
registerClearEditor?: (fn: () => void) => void;
|
|
87
|
-
editorRef?: React.MutableRefObject<EditorType | null>;
|
|
88
89
|
}) => React.ReactNode;
|
|
89
90
|
export type Comments = Array<Thread | Comment | GeneralComment>;
|
|
90
|
-
export type CommentResolve = 'ACCEPTED' | 'REJECTED' | null
|
|
91
|
+
export type CommentResolve = 'ACCEPTED' | 'REJECTED' | null;
|
|
91
92
|
export interface ICommentsFilterProps {
|
|
92
93
|
commentsFilter: CommentsFilter;
|
|
93
94
|
setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
|
|
94
95
|
disabled: boolean;
|
|
95
|
-
listRef: React.RefObject<HTMLElement>;
|
|
96
96
|
updateThreadId: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
|
|
97
97
|
commentValue: {
|
|
98
98
|
value: string;
|
|
99
|
-
files: (ICommentFile)[];
|
|
99
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
100
100
|
};
|
|
101
101
|
setCommentValue: React.Dispatch<React.SetStateAction<{
|
|
102
102
|
value: string;
|
|
103
|
-
files: (ICommentFile)[];
|
|
103
|
+
files: (ICommentFile | ILocalCommentFile)[];
|
|
104
104
|
}>>;
|
|
105
105
|
submitAddComment: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: any | null, files?: File[]) => void;
|
|
106
106
|
}
|
|
107
|
-
export
|
|
108
|
-
avatarUrl: string | null;
|
|
109
|
-
roleType: string;
|
|
110
|
-
roleId: string;
|
|
107
|
+
export interface IMember {
|
|
111
108
|
accepted: boolean;
|
|
109
|
+
avatarUrl: string;
|
|
112
110
|
email: string;
|
|
113
|
-
|
|
111
|
+
expiresAt: string | null;
|
|
114
112
|
invitationId: string | null;
|
|
115
113
|
invitationToken: string | null;
|
|
116
|
-
name: string
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
name: string;
|
|
115
|
+
roleType: string;
|
|
116
|
+
roleId: string;
|
|
117
|
+
userId: string;
|
|
118
|
+
}
|
|
119
119
|
export interface IUser {
|
|
120
|
-
activeWorkspaceId: string
|
|
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
|
+
};
|
|
121
132
|
name: string;
|
|
122
133
|
nickname: string;
|
|
123
|
-
|
|
134
|
+
plan: 'FREE' | 'PRO' | 'BUSINESS' | string;
|
|
124
135
|
profilePicture: {
|
|
125
136
|
url: string;
|
|
126
137
|
};
|
|
127
|
-
createdAt: string;
|
|
128
|
-
id: string;
|
|
129
|
-
lang: string;
|
|
130
|
-
plan: string;
|
|
131
|
-
darkMode: boolean;
|
|
132
138
|
timeZone: string | null;
|
|
133
139
|
twoFactorEnabled: boolean;
|
|
140
|
+
workspaces: any[];
|
|
134
141
|
}
|
|
135
|
-
export type ResolvedFilter = 'resolved' | 'not-resolved' | 'all';
|
|
136
142
|
export type CommentsFilter = {
|
|
137
|
-
resolved:
|
|
143
|
+
resolved: boolean;
|
|
138
144
|
feedback: boolean;
|
|
139
145
|
filteredUsers: IMember[];
|
|
140
146
|
};
|
|
@@ -216,8 +222,6 @@ interface ICommentActions {
|
|
|
216
222
|
export interface ICommentOptions {
|
|
217
223
|
showComments: boolean;
|
|
218
224
|
setShowComments: (value?: boolean) => void;
|
|
219
|
-
adminPermission: boolean;
|
|
220
|
-
isGuest: boolean;
|
|
221
225
|
pageId: string;
|
|
222
226
|
workspaceInfo: {
|
|
223
227
|
title: string;
|
|
@@ -227,8 +231,8 @@ export interface ICommentOptions {
|
|
|
227
231
|
}
|
|
228
232
|
export interface SharedCommentProps {
|
|
229
233
|
commentOrThread: Comment | Thread | GeneralComment;
|
|
230
|
-
deleteCommentOrThread: (commentOrThread: Comment | Thread, thread?: Thread) =>
|
|
231
|
-
resolveThreat?: (threat: Thread | GeneralComment) =>
|
|
234
|
+
deleteCommentOrThread: (commentOrThread: Comment | Thread, thread?: Thread) => void;
|
|
235
|
+
resolveThreat?: (threat: Thread | GeneralComment) => void;
|
|
232
236
|
}
|
|
233
237
|
type SelectMarkNodeFn = (markNodeKeys: Set<string>, activeElement: Element | null) => void;
|
|
234
238
|
export interface StoreOptions {
|
|
@@ -237,108 +241,4 @@ export interface StoreOptions {
|
|
|
237
241
|
commentOptions?: ICommentOptions;
|
|
238
242
|
selectMarkNode: SelectMarkNodeFn;
|
|
239
243
|
}
|
|
240
|
-
export interface CommentsNs {
|
|
241
|
-
edited: string;
|
|
242
|
-
title: string;
|
|
243
|
-
addComment: string;
|
|
244
|
-
generalComment: string;
|
|
245
|
-
replyComment: string;
|
|
246
|
-
actionTooltips: {
|
|
247
|
-
resolve: string;
|
|
248
|
-
reopen: string;
|
|
249
|
-
addReaction: string;
|
|
250
|
-
reactionLimit: string;
|
|
251
|
-
reply: string;
|
|
252
|
-
};
|
|
253
|
-
deleteModal: {
|
|
254
|
-
title: {
|
|
255
|
-
thread: string;
|
|
256
|
-
general: string;
|
|
257
|
-
comment: string;
|
|
258
|
-
};
|
|
259
|
-
description: {
|
|
260
|
-
thread: string;
|
|
261
|
-
general: string;
|
|
262
|
-
comment: string;
|
|
263
|
-
};
|
|
264
|
-
actions: {
|
|
265
|
-
cancel: string;
|
|
266
|
-
delete: string;
|
|
267
|
-
remove: string;
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
emptyState: {
|
|
271
|
-
"not-resolved": string;
|
|
272
|
-
resolved: string;
|
|
273
|
-
all: string;
|
|
274
|
-
userFilter: string;
|
|
275
|
-
};
|
|
276
|
-
filter: {
|
|
277
|
-
resolved: string;
|
|
278
|
-
open: string;
|
|
279
|
-
all: string;
|
|
280
|
-
selectUsers: string;
|
|
281
|
-
searchPlaceholder: string;
|
|
282
|
-
emptyPlaceholder: string;
|
|
283
|
-
byStatus: string;
|
|
284
|
-
byPerson: string;
|
|
285
|
-
};
|
|
286
|
-
inputEditor: {
|
|
287
|
-
uploadFiles: string;
|
|
288
|
-
sendMessage: string;
|
|
289
|
-
editMessage: string;
|
|
290
|
-
clear: string;
|
|
291
|
-
clearModal: {
|
|
292
|
-
title: string;
|
|
293
|
-
description: {
|
|
294
|
-
both: string;
|
|
295
|
-
text: string;
|
|
296
|
-
files: string;
|
|
297
|
-
empty: string;
|
|
298
|
-
};
|
|
299
|
-
};
|
|
300
|
-
discardModal: {
|
|
301
|
-
title: string;
|
|
302
|
-
description: string;
|
|
303
|
-
labels: {
|
|
304
|
-
confirm: string;
|
|
305
|
-
cancel: string;
|
|
306
|
-
};
|
|
307
|
-
};
|
|
308
|
-
cancelCommentModal: {
|
|
309
|
-
title: string;
|
|
310
|
-
description: string;
|
|
311
|
-
labels: {
|
|
312
|
-
confirm: string;
|
|
313
|
-
cancel: string;
|
|
314
|
-
};
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
|
-
menuActions: {
|
|
318
|
-
edit: string;
|
|
319
|
-
delete: string;
|
|
320
|
-
download: string;
|
|
321
|
-
};
|
|
322
|
-
notifications: {
|
|
323
|
-
title: string;
|
|
324
|
-
description: string;
|
|
325
|
-
options: {
|
|
326
|
-
all: string;
|
|
327
|
-
replies: string;
|
|
328
|
-
};
|
|
329
|
-
uploadMessages: {
|
|
330
|
-
tooManyFiles: string;
|
|
331
|
-
fileTooLarge: string;
|
|
332
|
-
fileLimit: string;
|
|
333
|
-
};
|
|
334
|
-
};
|
|
335
|
-
repliesToggle: {
|
|
336
|
-
show_one: string;
|
|
337
|
-
show_other: string;
|
|
338
|
-
hide: string;
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
export interface CommentsLocales {
|
|
342
|
-
comments: CommentsNs;
|
|
343
|
-
}
|
|
344
244
|
export {};
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ICommentFile, ILocalCommentFile } from './types.ts';
|
|
2
|
+
import { TFunction } from 'i18next';
|
|
3
3
|
export declare const cutDeleteImageId: (imageSrc: string) => string;
|
|
4
|
-
export declare const uploadAllFiles: (commentId: string, images:
|
|
4
|
+
export declare const uploadAllFiles: (commentId: string, images: ILocalCommentFile[], uploadCommentFileApi: any) => Promise<ICommentFile[]>;
|
|
5
5
|
export declare function scrollToTop(selector: string): void;
|
|
6
|
-
export declare const getDescription: (type: string,
|
|
7
|
-
export declare const getTitle: (type: string,
|
|
8
|
-
export declare function toggleFilter(setState: Dispatch<SetStateAction<CommentsFilter>>, key: keyof CommentsFilter, value?: IMember | boolean | string, listRef?: React.RefObject<HTMLElement>): void;
|
|
6
|
+
export declare const getDescription: (type: string, t: TFunction) => string;
|
|
7
|
+
export declare const getTitle: (type: string, t: TFunction) => string;
|
|
9
8
|
export declare const IS_APPLE: boolean;
|
|
10
|
-
export declare const createDefaultCommentsLocales: () => CommentsNs;
|
|
11
|
-
export declare function getClearInputMessage(hasText: boolean, hasFiles: boolean, locales: CommentsNs): string;
|
|
12
|
-
export declare const preparePreviewFile: (file: File & {
|
|
13
|
-
id?: string;
|
|
14
|
-
}, temp?: boolean) => ICommentFile;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
type FormViewerProps = {
|
|
3
|
+
NoStepSlot?: FC;
|
|
4
|
+
copyright?: string;
|
|
5
|
+
};
|
|
6
|
+
/** Основной компонент для отображения формы */
|
|
7
|
+
export declare const FormViewer: ({ NoStepSlot, copyright, }: FormViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Navigation: () => import("react/jsx-runtime").JSX.Element | null;
|