@layers-app/shared 0.0.39 → 0.0.41
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-k814Ysrn.js → KanbanLayout-BUnjGOO7.js} +1 -1
- package/dist/components/AppContainer/AppContainer.d.ts +1 -1
- package/dist/components/AppContainer/components/DesktopNavbar.d.ts +1 -1
- package/dist/components/AppContainer/components/MenuUserDropdown.d.ts +2 -0
- package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts +5 -3
- package/dist/components/AppContainer/types.d.ts +4 -1
- package/dist/components/AttachmentsGalleryModal/ShakaPlayer.d.ts +5 -0
- package/dist/components/BouncingLogo/BouncingLogo.d.ts +3 -0
- package/dist/components/CircleColorPicker/CircleColorPicker.d.ts +2 -2
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +12 -0
- package/dist/components/CommentComposer/index.d.ts +10 -8
- package/dist/components/CommentFilterMenu/index.d.ts +9 -0
- package/dist/components/CommentsPanel/components/CommentActionMenu.d.ts +5 -1
- package/dist/components/CommentsPanel/components/CommentPanelListItem.d.ts +3 -4
- package/dist/components/CommentsPanel/components/{CommentFilterMenu.d.ts → CommentTabFilter.d.ts} +2 -1
- package/dist/components/CommentsPanel/components/CommentsEmptyPlaceholder.d.ts +5 -2
- package/dist/components/CommentsPanel/components/CommentsListItemMenu.d.ts +2 -1
- package/dist/components/CommentsPanel/components/CommentsPanelList.d.ts +3 -4
- package/dist/components/CommentsPanel/components/CommentsThreadReplyControls.d.ts +5 -1
- package/dist/components/CommentsPanel/components/CommentsUploadFilesPreview.d.ts +9 -5
- package/dist/components/CommentsPanel/index.d.ts +10 -6
- package/dist/components/CommentsPanel/store.d.ts +7 -1
- package/dist/components/CommentsPanel/types.d.ts +152 -57
- package/dist/components/CommentsPanel/utils.d.ts +11 -5
- package/dist/components/EntityTitle/EntityTitle.d.ts +2 -1
- 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 +6 -0
- package/dist/components/FormViewer/components/StepDescription.d.ts +6 -0
- package/dist/components/FormViewer/components/StepTitle.d.ts +6 -0
- package/dist/components/FormViewer/components/fields/AddOptionButton.d.ts +3 -0
- package/dist/components/FormViewer/components/fields/ButtonField/ButtonField.d.ts +6 -0
- package/dist/components/FormViewer/components/fields/ButtonField/InnerButton.d.ts +9 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/ChoiceCard.d.ts +11 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/ChoiceField.d.ts +6 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts +12 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.d.ts +6 -0
- package/dist/components/FormViewer/components/fields/ConfirmButton.d.ts +6 -0
- package/dist/components/FormViewer/components/fields/ConfirmField.d.ts +6 -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 +6 -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 +6 -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 +6 -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/constants/defaultTheme.d.ts +2 -0
- package/dist/components/FormViewer/helpers/conditions.d.ts +285 -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 +283 -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 +298 -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 +206 -0
- package/dist/components/FormViewer/hooks/useActiveStep.d.ts +281 -0
- package/dist/components/FormViewer/hooks/useCreateFormContext.d.ts +22 -0
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +146 -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 +1357 -0
- package/dist/components/FormViewer/store/formStoreApi.d.ts +659 -0
- package/dist/components/FormViewer/store/selectors.d.ts +80491 -0
- package/dist/components/FormViewer/types/form.d.ts +58 -0
- package/dist/components/FormViewer/types/schemes.d.ts +7595 -0
- package/dist/components/InviteModal/InviteModal.d.ts +2 -0
- package/dist/components/InviteModal/slice.d.ts +13 -0
- package/dist/components/NoData/NoData.d.ts +24 -6
- package/dist/components/SearchFilters/components/{Date.d.ts → DateFilter.d.ts} +1 -1
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +1 -0
- package/dist/components/modals/openRemoveConfirmModal.d.ts +4 -0
- package/dist/components/table/hooks/TableProvider.d.ts +5 -3
- package/dist/components/table/hooks/useCreateTable.d.ts +5 -3
- package/dist/components/table/hooks/useTableStore.d.ts +5 -3
- package/dist/components/table/store.d.ts +5 -3
- package/dist/helpers/dates.d.ts +1 -0
- package/dist/helpers/getFileType.d.ts +2 -1
- package/dist/helpers/getPartOfTheDay.d.ts +1 -0
- package/dist/helpers/isAppMode.d.ts +2 -0
- package/dist/hooks/useEvent.d.ts +1 -0
- package/dist/hooks/useMenu.d.ts +4 -4
- package/dist/{index-BHgJVazX.js → index-Bo9kCsKS.js} +46265 -12296
- package/dist/index.d.ts +13 -0
- package/dist/index.js +80 -2
- package/dist/index.umd.cjs +59 -59
- package/dist/store/timezoneStore.d.ts +5 -3
- package/dist/store/workspacesOrder.d.ts +5 -3
- package/package.json +11 -11
- package/dist/components/CommentsPanel/components/CommentsMultiSelectUsers.d.ts +0 -6
- package/dist/components/CommentsPanel/components/RemoveConfirmModal.d.ts +0 -11
- package/dist/components/OnBoarding/steps/AddMembers/AddMembers.d.ts +0 -2
|
@@ -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-Bo9kCsKS.js";
|
|
15
15
|
import "react-dom";
|
|
16
16
|
import "draggable-ui";
|
|
17
17
|
import "@mantine/modals";
|
|
@@ -5,7 +5,7 @@ declare global {
|
|
|
5
5
|
preSignMode?: boolean;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
export declare const AppContainer: (({ header, content, navbar, navbarTitle, displayType, footer, }: AppContainerProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
8
|
+
export declare const AppContainer: (({ header, content, navbar, navbarTitle, displayType, footer, onTitleChange, }: AppContainerProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
9
9
|
NavbarContent: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
NavbarFooter: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
NavbarHeader: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,4 +4,4 @@ declare global {
|
|
|
4
4
|
openTemplatesModal?: () => void;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
export declare const DesktopNavbar: (props: Pick<AppContainerProps, "navbar" | "navbarTitle" | "displayType">) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const DesktopNavbar: (props: Pick<AppContainerProps, "navbar" | "navbarTitle" | "displayType" | "onTitleChange">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { appMode } from '../../..';
|
|
2
3
|
import { FloatingPosition } from '@mantine/core';
|
|
3
4
|
export type MenuUser = {
|
|
4
5
|
id: string;
|
|
5
6
|
avatar: string | null;
|
|
6
7
|
email?: string | null;
|
|
7
8
|
name: string | null;
|
|
9
|
+
mode?: appMode;
|
|
8
10
|
};
|
|
9
11
|
export type UserNotifications = {
|
|
10
12
|
createdAt: string;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { AppContainerStore } from '../types';
|
|
2
|
-
export declare const useAppContainerStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<AppContainerStore>, "persist"> & {
|
|
2
|
+
export declare const useAppContainerStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<AppContainerStore>, "setState" | "persist"> & {
|
|
3
|
+
setState(partial: AppContainerStore | Partial<AppContainerStore> | ((state: AppContainerStore) => AppContainerStore | Partial<AppContainerStore>), replace?: false | undefined): unknown;
|
|
4
|
+
setState(state: AppContainerStore | ((state: AppContainerStore) => AppContainerStore), replace: true): unknown;
|
|
3
5
|
persist: {
|
|
4
|
-
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<AppContainerStore, AppContainerStore>>) => void;
|
|
6
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<AppContainerStore, AppContainerStore, unknown>>) => void;
|
|
5
7
|
clearStorage: () => void;
|
|
6
8
|
rehydrate: () => Promise<void> | void;
|
|
7
9
|
hasHydrated: () => boolean;
|
|
8
10
|
onHydrate: (fn: (state: AppContainerStore) => void) => () => void;
|
|
9
11
|
onFinishHydration: (fn: (state: AppContainerStore) => void) => () => void;
|
|
10
|
-
getOptions: () => Partial<import('zustand/middleware').PersistOptions<AppContainerStore, AppContainerStore>>;
|
|
12
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<AppContainerStore, AppContainerStore, unknown>>;
|
|
11
13
|
};
|
|
12
14
|
}>;
|
|
@@ -17,11 +17,14 @@ export type AppContainerProps = {
|
|
|
17
17
|
navbarTitle?: string;
|
|
18
18
|
displayType?: 'ROUNDED' | 'BOXED';
|
|
19
19
|
footer?: ReactNode;
|
|
20
|
+
onTitleChange?: (title?: string) => void;
|
|
20
21
|
};
|
|
21
22
|
export type AppContainerDataStore = {
|
|
22
23
|
tools: ToolDef[];
|
|
23
24
|
workspaceMenu: WorkspaceMenuProps;
|
|
24
|
-
user: MenuUser
|
|
25
|
+
user: MenuUser & {
|
|
26
|
+
role: string;
|
|
27
|
+
};
|
|
25
28
|
userMenuItems?: ReactNode;
|
|
26
29
|
notifications: UserNotifications[];
|
|
27
30
|
isAnonym: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColorPickerProps, MenuProps } from '@mantine/core';
|
|
2
2
|
export declare const CircleColorPicker: ({ value, onChange, menuProps, colorPickerProps, }: {
|
|
3
|
-
value
|
|
4
|
-
onChange: (value: string) => void;
|
|
3
|
+
value?: string | null;
|
|
4
|
+
onChange: (value: string | null) => void;
|
|
5
5
|
menuProps?: MenuProps;
|
|
6
6
|
colorPickerProps?: ColorPickerProps;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { EditorType } from '@layers-app/editor';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
type Props = {
|
|
5
|
+
children: (editorRef: React.MutableRefObject<EditorType | null>) => ReactNode;
|
|
6
|
+
onSubmit: () => void;
|
|
7
|
+
handleBlur: () => void;
|
|
8
|
+
autoFocus?: boolean;
|
|
9
|
+
registerClearEditor?: (fn: () => void) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function CommentEditorBehavior({ children, onSubmit, handleBlur, autoFocus, registerClearEditor, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
2
|
import { RangeSelection } from '@layers-app/editor';
|
|
3
|
-
import { Comment,
|
|
3
|
+
import { Comment, CommentsNs, GeneralComment, ICommentFile, ICommentOptions, IUser, Thread } from '../CommentsPanel/types.ts';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
interface CommentValue {
|
|
6
6
|
value: string;
|
|
7
|
-
files:
|
|
7
|
+
files: ICommentFile[];
|
|
8
8
|
}
|
|
9
9
|
interface CommentComposerProps {
|
|
10
|
-
children: (
|
|
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:
|
|
27
|
+
files: ICommentFile[];
|
|
28
28
|
};
|
|
29
29
|
setCommentValue: React.Dispatch<React.SetStateAction<{
|
|
30
30
|
value: string;
|
|
31
|
-
files:
|
|
31
|
+
files: ICommentFile[];
|
|
32
32
|
}>>;
|
|
33
33
|
isEditInput?: boolean;
|
|
34
34
|
autoFocus?: boolean;
|
|
@@ -44,9 +44,11 @@ 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:
|
|
47
|
+
files: ICommentFile[];
|
|
48
48
|
}) => void;
|
|
49
49
|
provideCommentOptions?: ICommentOptions;
|
|
50
|
+
placeholder?: string;
|
|
51
|
+
composerLocales?: CommentsNs;
|
|
50
52
|
}
|
|
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;
|
|
53
|
+
export declare const CommentComposer: ({ submitAddComment, commentValue, thread, setCommentValue, handleBlur, autoFocus, provideCommentOptions, removeCommentImage, handleEditComment, isEditInput, isGeneral, updateThreadId, setCommentActions, updateLocation, getSelectionText, children, providedUser, placeholder, composerLocales, }: CommentComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
54
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CommentsFilter } from '../CommentsPanel/types.ts';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const CommentFilterMenu: ({ commentsFilter, setCommentsFilter, disabled, onCollapse, listRef, }: {
|
|
4
|
+
commentsFilter: CommentsFilter;
|
|
5
|
+
setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
listRef?: React.RefObject<HTMLElement>;
|
|
8
|
+
onCollapse?: React.Dispatch<React.SetStateAction<string | null>>;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { CommentsNs } from '../types.ts';
|
|
1
2
|
interface CommentActionMenuProps {
|
|
2
3
|
onDownload: () => void;
|
|
3
4
|
onDelete: () => void;
|
|
5
|
+
iconColor?: string;
|
|
6
|
+
hasPermission: boolean;
|
|
7
|
+
locales?: CommentsNs;
|
|
4
8
|
}
|
|
5
|
-
export declare const CommentActionMenu: ({ onDownload, onDelete }: CommentActionMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const CommentActionMenu: ({ onDownload, onDelete, iconColor, hasPermission, locales: propLocales, }: CommentActionMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
10
|
export {};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { NodeKey, RangeSelection } from '@layers-app/editor';
|
|
2
|
-
import {
|
|
3
|
-
import { Comment, GeneralComment, ICommentFile, SharedCommentProps, Thread, UpdateCommentTextArgs } from '../types.ts';
|
|
2
|
+
import { Comment, CommentsNs, GeneralComment, ICommentFile, SharedCommentProps, Thread, UpdateCommentTextArgs } from '../types.ts';
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
interface ICommentPanelListItemProps extends SharedCommentProps {
|
|
6
|
-
t: TFunction;
|
|
7
5
|
deleteCommentImage: (photoToRemove: string, threadOrGeneralId: string, commentId?: string) => void;
|
|
8
6
|
addCommentReaction: (reaction: string, comment: Thread | GeneralComment | Comment, threatOrGeneral?: Thread | GeneralComment) => void;
|
|
9
7
|
removeCommentReactions: (reaction: string, threatOrGeneral: Thread | GeneralComment | Comment, comment?: Thread | GeneralComment) => void;
|
|
@@ -17,6 +15,7 @@ interface ICommentPanelListItemProps extends SharedCommentProps {
|
|
|
17
15
|
replyInput?: string;
|
|
18
16
|
setShowReplyInput?: React.Dispatch<React.SetStateAction<string>>;
|
|
19
17
|
activeIDs?: Array<string>;
|
|
18
|
+
locales: CommentsNs;
|
|
20
19
|
}
|
|
21
|
-
export declare const CommentPanelListItem: ({ commentOrThread, handleClickThread, markNodeMap, parentThreadOrGeneral, submitAddComment, removeCommentReactions, updateThreadId, addCommentReaction, deleteCommentImage, activeIDs, updateCommentTextOrImage, resolveThreat, toggleRepliesInput,
|
|
20
|
+
export declare const CommentPanelListItem: ({ commentOrThread, handleClickThread, markNodeMap, parentThreadOrGeneral, submitAddComment, removeCommentReactions, updateThreadId, addCommentReaction, deleteCommentImage, activeIDs, updateCommentTextOrImage, resolveThreat, toggleRepliesInput, locales, deleteCommentOrThread, replyInput, }: ICommentPanelListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
21
|
export {};
|
package/dist/components/CommentsPanel/components/{CommentFilterMenu.d.ts → CommentTabFilter.d.ts}
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CommentsFilter } from '../types.ts';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const CommentTabFilter: ({ commentsFilter, setCommentsFilter, listRef, }: {
|
|
4
4
|
commentsFilter: CommentsFilter;
|
|
5
5
|
setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
|
|
6
|
+
listRef: React.RefObject<HTMLElement>;
|
|
6
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { CommentsFilter } from '../types.ts';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const CommentsEmptyPlaceholder: ({ commentsFilter, listRef }: {
|
|
4
|
+
commentsFilter: CommentsFilter;
|
|
5
|
+
listRef: React.RefObject<HTMLElement>;
|
|
3
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
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, hasPermission }: {
|
|
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;
|
|
6
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,16 @@
|
|
|
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';
|
|
4
5
|
interface CommentsPanelListProps extends Omit<SharedCommentProps, 'commentOrThread'> {
|
|
5
6
|
activeIDs: string[];
|
|
6
7
|
comments: Comments;
|
|
7
|
-
listRef:
|
|
8
|
-
current: null | HTMLUListElement;
|
|
9
|
-
};
|
|
8
|
+
listRef: React.RefObject<HTMLElement>;
|
|
10
9
|
updateThreadId: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
|
|
11
10
|
deleteCommentImage: (photoToRemove: string, threadOrGeneralId: string, commentId?: string) => void;
|
|
12
11
|
removeCommentReactions: (reaction: string, threatOrGeneral: Thread | GeneralComment | Comment, comment?: Thread | GeneralComment) => void;
|
|
13
12
|
addCommentReaction: (reaction: string, comment: Thread | GeneralComment | Comment, threatOrGeneral?: Thread | GeneralComment) => void;
|
|
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
15
|
updateCommentTextOrImage: UpdateCommentTextArgs;
|
|
17
16
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CommentsNs } from '../types.ts';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
interface CommentsThreadReplyControlsProps {
|
|
3
4
|
onSubmit: () => void;
|
|
@@ -6,6 +7,9 @@ interface CommentsThreadReplyControlsProps {
|
|
|
6
7
|
disabledUploadButton: boolean;
|
|
7
8
|
isSubmitting: boolean;
|
|
8
9
|
setIsSubmitting: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10
|
+
handleClearInput: () => void;
|
|
11
|
+
isFloatInput?: boolean;
|
|
12
|
+
locales?: CommentsNs;
|
|
9
13
|
}
|
|
10
|
-
export declare const CommentsThreadReplyControls: ({ onSubmit, handleFileChange, disabledSubmitButton, disabledUploadButton, setIsSubmitting, isSubmitting, }: CommentsThreadReplyControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const CommentsThreadReplyControls: ({ onSubmit, handleFileChange, disabledSubmitButton, disabledUploadButton, isFloatInput, setIsSubmitting, isSubmitting, handleClearInput, locales: propLocales, }: CommentsThreadReplyControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
15
|
export {};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
files: Array<ICommentFile
|
|
1
|
+
import { CommentsNs, ICommentFile } from '../types.ts';
|
|
2
|
+
interface CommentsUploadFilesPreviewProps {
|
|
3
|
+
files: Array<ICommentFile>;
|
|
4
|
+
hasPermission?: boolean;
|
|
4
5
|
removeImage: (index: number | string) => void;
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
showLoading?: boolean;
|
|
7
|
+
locales?: CommentsNs;
|
|
8
|
+
}
|
|
9
|
+
export declare const CommentsUploadFilesPreview: ({ files, hasPermission, removeImage, showLoading, locales, }: CommentsUploadFilesPreviewProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { NodeKey, RangeSelection } from '@layers-app/editor';
|
|
3
|
-
import { Comment, Comments, GeneralComment, GetEditorFn, ICommentFile, StoreOptions, Thread, UpdateCommentTextArgs, SharedCommentProps } from './types.ts';
|
|
3
|
+
import { Comment, Comments, CommentsFilter, CommentsLocales, GeneralComment, GetEditorFn, ICommentFile, StoreOptions, Thread, UpdateCommentTextArgs, SharedCommentProps } from './types.ts';
|
|
4
|
+
import * as React from 'react';
|
|
4
5
|
interface CommentsPanelProps extends Omit<SharedCommentProps, 'commentOrThread'> {
|
|
5
6
|
comments: Comments;
|
|
6
7
|
activeIDs: string[];
|
|
@@ -10,13 +11,16 @@ interface CommentsPanelProps extends Omit<SharedCommentProps, 'commentOrThread'>
|
|
|
10
11
|
removeCommentReactions: (reaction: string, threatOrGeneral: Thread | GeneralComment | Comment, comment?: Thread | GeneralComment) => void;
|
|
11
12
|
addCommentReaction: (reaction: string, comment: Thread | GeneralComment | Comment, threatOrGeneral?: Thread | GeneralComment) => void;
|
|
12
13
|
updateCommentTextOrImage: UpdateCommentTextArgs;
|
|
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
|
-
listRef:
|
|
16
|
-
current: null | HTMLUListElement;
|
|
17
|
-
};
|
|
16
|
+
listRef: React.RefObject<HTMLElement>;
|
|
18
17
|
getEditor: GetEditorFn;
|
|
19
18
|
clipPath?: string;
|
|
19
|
+
isSidebar?: boolean;
|
|
20
|
+
locales: CommentsLocales;
|
|
21
|
+
commentsFilter: CommentsFilter;
|
|
22
|
+
setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
|
|
23
|
+
isLoading: boolean;
|
|
20
24
|
}
|
|
21
|
-
export declare function CommentsPanel({ activeIDs, deleteCommentOrThread, comments, submitAddComment, markNodeMap, storeOptions, deleteCommentImage, addCommentReaction, removeCommentReactions, updateCommentTextOrImage, listRef, resolveThreat, updateThreadId, getEditor, clipPath }: CommentsPanelProps): ReactElement;
|
|
25
|
+
export declare function CommentsPanel({ activeIDs, deleteCommentOrThread, comments, submitAddComment, markNodeMap, storeOptions, deleteCommentImage, addCommentReaction, removeCommentReactions, updateCommentTextOrImage, listRef, resolveThreat, updateThreadId, locales, getEditor, setCommentsFilter, commentsFilter, clipPath, isLoading, isSidebar, }: CommentsPanelProps): ReactElement;
|
|
22
26
|
export {};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { GetEditorFn, ICommentOptions, IMember, IUser } from './types
|
|
1
|
+
import { CommentsNs, GetEditorFn, ICommentOptions, IMember, IUser } from './types';
|
|
2
2
|
interface CommentsState {
|
|
3
3
|
workspaceMembers: IMember[];
|
|
4
4
|
currentUser?: IUser;
|
|
5
5
|
showComments: boolean;
|
|
6
|
+
adminPermission: boolean;
|
|
6
7
|
commentOptions?: ICommentOptions;
|
|
7
8
|
getEditor?: GetEditorFn;
|
|
9
|
+
isSidebar: boolean;
|
|
10
|
+
isGuest: boolean;
|
|
11
|
+
commentsLocales: CommentsNs;
|
|
8
12
|
selectMarkNode?: (markNodeKeys: Set<string>, activeElement: Element | null) => void;
|
|
9
13
|
initializeComments: (data: {
|
|
10
14
|
workspaceMembers?: IMember[];
|
|
@@ -12,6 +16,8 @@ interface CommentsState {
|
|
|
12
16
|
showComments?: boolean;
|
|
13
17
|
commentOptions?: ICommentOptions;
|
|
14
18
|
getEditor?: GetEditorFn;
|
|
19
|
+
isSidebar: boolean;
|
|
20
|
+
commentsLocales: CommentsNs;
|
|
15
21
|
selectMarkNode?: (markNodeKeys: Set<string>, activeElement: Element | null) => void;
|
|
16
22
|
}) => void;
|
|
17
23
|
}
|