@layers-app/shared 0.0.38 → 0.0.39-comments.2

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.
Files changed (77) hide show
  1. package/dist/KanbanLayout-DGHT9E0N.js +297 -0
  2. package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts +5 -3
  3. package/dist/components/AppContainer/types.d.ts +2 -0
  4. package/dist/components/CircleColorPicker/CircleColorPicker.d.ts +7 -0
  5. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +12 -0
  6. package/dist/components/CommentComposer/index.d.ts +10 -8
  7. package/dist/components/CommentFilterMenu/index.d.ts +9 -0
  8. package/dist/components/CommentsPanel/components/CommentActionMenu.d.ts +5 -1
  9. package/dist/components/CommentsPanel/components/CommentPanelListItem.d.ts +3 -4
  10. package/dist/components/CommentsPanel/components/{CommentFilterMenu.d.ts → CommentTabFilter.d.ts} +2 -1
  11. package/dist/components/CommentsPanel/components/CommentsEmptyPlaceholder.d.ts +5 -2
  12. package/dist/components/CommentsPanel/components/CommentsListItemMenu.d.ts +2 -1
  13. package/dist/components/CommentsPanel/components/CommentsPanelList.d.ts +3 -4
  14. package/dist/components/CommentsPanel/components/CommentsThreadReplyControls.d.ts +5 -1
  15. package/dist/components/CommentsPanel/components/CommentsUploadFilesPreview.d.ts +9 -5
  16. package/dist/components/CommentsPanel/index.d.ts +10 -6
  17. package/dist/components/CommentsPanel/store.d.ts +7 -1
  18. package/dist/components/CommentsPanel/types.d.ts +157 -57
  19. package/dist/components/CommentsPanel/utils.d.ts +11 -5
  20. package/dist/components/Copyright/index.d.ts +2 -1
  21. package/dist/components/EmojiPicker/EmojiPanel.d.ts +1 -1
  22. package/dist/components/EmojiPicker/EmojiPicker.d.ts +9 -1
  23. package/dist/components/EmojiPicker/IconsPanel.d.ts +1 -1
  24. package/dist/components/EmojiPicker/custom-icons/StatusCancel.d.ts +2 -0
  25. package/dist/components/EmojiPicker/custom-icons/StatusDone.d.ts +2 -0
  26. package/dist/components/EmojiPicker/custom-icons/StatusProgress00.d.ts +2 -0
  27. package/dist/components/EmojiPicker/custom-icons/StatusProgress10.d.ts +2 -0
  28. package/dist/components/EmojiPicker/custom-icons/StatusProgress100.d.ts +2 -0
  29. package/dist/components/EmojiPicker/custom-icons/StatusProgress20.d.ts +2 -0
  30. package/dist/components/EmojiPicker/custom-icons/StatusProgress30.d.ts +2 -0
  31. package/dist/components/EmojiPicker/custom-icons/StatusProgress40.d.ts +2 -0
  32. package/dist/components/EmojiPicker/custom-icons/StatusProgress50.d.ts +2 -0
  33. package/dist/components/EmojiPicker/custom-icons/StatusProgress60.d.ts +2 -0
  34. package/dist/components/EmojiPicker/custom-icons/StatusProgress70.d.ts +2 -0
  35. package/dist/components/EmojiPicker/custom-icons/StatusProgress80.d.ts +2 -0
  36. package/dist/components/EmojiPicker/custom-icons/StatusProgress90.d.ts +2 -0
  37. package/dist/components/EmojiPicker/custom-icons/customIcons.d.ts +12 -0
  38. package/dist/components/EntityTitle/EntityTitle.d.ts +18 -0
  39. package/dist/components/FilePicker/FilePicker.d.ts +4 -3
  40. package/dist/components/NoData/NoData.d.ts +147 -22
  41. package/dist/components/ProjectIcon/ProjectIcon.d.ts +10 -1
  42. package/dist/components/UserAvatar/index.d.ts +1 -2
  43. package/dist/components/modals/openRemoveConfirmModal.d.ts +4 -0
  44. package/dist/components/table/hooks/TableProvider.d.ts +5 -3
  45. package/dist/components/table/hooks/useCreateTable.d.ts +5 -3
  46. package/dist/components/table/hooks/useTableStore.d.ts +5 -3
  47. package/dist/components/table/store.d.ts +5 -3
  48. package/dist/constants.d.ts +1 -0
  49. package/dist/emoji-categorized-CRsMUQyD.js +4 -0
  50. package/dist/helpers/filterHierarchyByTypes.d.ts +15 -0
  51. package/dist/helpers/getPartOfTheDay.d.ts +1 -0
  52. package/dist/helpers/getRandomIconColor.d.ts +1 -0
  53. package/dist/hooks/useMenu.d.ts +1 -1
  54. package/dist/icons.min-wo13YUY4.js +4 -0
  55. package/dist/index-BI1_FPl_.js +81688 -0
  56. package/dist/index.d.ts +9 -0
  57. package/dist/index.js +187 -175
  58. package/dist/index.umd.cjs +60 -1206
  59. package/dist/store/onboarding.d.ts +2 -2
  60. package/dist/store/timezoneStore.d.ts +5 -3
  61. package/dist/store/workspacesOrder.d.ts +5 -3
  62. package/package.json +4 -4
  63. package/dist/KanbanLayout-_hW8P-S9.js +0 -287
  64. package/dist/TimeLine-DCVt4pFB.js +0 -198
  65. package/dist/components/CommentsPanel/components/CommentsMultiSelectUsers.d.ts +0 -6
  66. package/dist/components/CommentsPanel/components/RemoveConfirmModal.d.ts +0 -11
  67. package/dist/components/OnBoarding/steps/DifferentLayouts/TimeLine.d.ts +0 -2
  68. package/dist/components/TemplatesModal/components/SelectedTemplate.d.ts +0 -7
  69. package/dist/components/TemplatesModal/components/Template.d.ts +0 -9
  70. package/dist/components/TemplatesModal/components/Templates.d.ts +0 -7
  71. package/dist/components/TemplatesModal/data.d.ts +0 -13
  72. package/dist/components/TemplatesModal/index.d.ts +0 -7
  73. package/dist/components/TemplatesModal/types.d.ts +0 -16
  74. package/dist/emoji-categorized-DAOdcF53.js +0 -4
  75. package/dist/icons.min-Chyr-bjL.js +0 -4
  76. package/dist/index-B17e6b8n.js +0 -67033
  77. package/dist/index.esm-Ci1yhzNS.js +0 -6814
@@ -0,0 +1,297 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useTranslation } from "react-i18next";
3
+ import { Flex, Text, ActionIcon, Divider, Box, Avatar, Skeleton } from "@mantine/core";
4
+ import "react";
5
+ import { IconCheck, IconBug, IconSquareRotated, IconPlus, IconCalendarEvent, IconEqual } from "@tabler/icons-react";
6
+ import "react-router-dom";
7
+ import { randomId } from "@mantine/hooks";
8
+ import "@tanstack/react-query";
9
+ import "query-string";
10
+ import "@mantine/form";
11
+ import "@mantine/dropzone";
12
+ import "@mantine/notifications";
13
+ import "lodash-es";
14
+ import { u as useOnboardingState, S as StatusBadge } from "./index-BI1_FPl_.js";
15
+ import "react-dom";
16
+ import "draggable-ui";
17
+ import "@mantine/modals";
18
+ import "i18next";
19
+ import "framer-motion";
20
+ import "@mantine/dates";
21
+ const column = "_column_1trmk_1";
22
+ const card = "_card_1trmk_6";
23
+ const styles = {
24
+ column,
25
+ card
26
+ };
27
+ const KanbanLayout = () => {
28
+ const { tasksList, statusesList } = useOnboardingState();
29
+ const today = /* @__PURE__ */ new Date();
30
+ const getPlusDays = (prop) => {
31
+ const plusThreeDays = new Date(today);
32
+ plusThreeDays.setDate(plusThreeDays.getDate() + (3 + prop));
33
+ return plusThreeDays.toDateString();
34
+ };
35
+ const { t } = useTranslation("onboarding");
36
+ const defaultTypes = [
37
+ {
38
+ id: randomId(),
39
+ color: "blue",
40
+ icon: IconCheck,
41
+ name: t("selectCategory.options.task"),
42
+ type: "task",
43
+ order: 1
44
+ },
45
+ {
46
+ id: randomId(),
47
+ color: "orange",
48
+ icon: IconBug,
49
+ name: t("selectCategory.options.bug"),
50
+ type: "bug",
51
+ order: 2
52
+ },
53
+ {
54
+ id: randomId(),
55
+ color: "grape",
56
+ icon: IconSquareRotated,
57
+ name: t("selectCategory.options.milestone"),
58
+ type: "milestone",
59
+ order: 3
60
+ }
61
+ ];
62
+ const getCurrentType = (type) => {
63
+ const current = defaultTypes.find((t2) => t2.type === type);
64
+ if (!current) return null;
65
+ return /* @__PURE__ */ jsx(ActionIcon, { size: 16, variant: "filled", color: current.color, children: /* @__PURE__ */ jsx(current.icon, {}) });
66
+ };
67
+ return /* @__PURE__ */ jsxs(Flex, { gap: 13, align: "start", w: "100%", children: [
68
+ /* @__PURE__ */ jsxs(
69
+ Flex,
70
+ {
71
+ gap: 11,
72
+ p: 7,
73
+ direction: "column",
74
+ w: 340,
75
+ className: styles.column,
76
+ children: [
77
+ /* @__PURE__ */ jsxs(Flex, { w: "100%", justify: "space-between", children: [
78
+ /* @__PURE__ */ jsxs(Flex, { gap: 14, align: "center", children: [
79
+ /* @__PURE__ */ jsx(StatusBadge, { color: "#228BE6", title: statusesList[0] }),
80
+ /* @__PURE__ */ jsxs(Text, { c: "#868E96", fz: 14, children: [
81
+ "(",
82
+ t("defineStatuses.tasks"),
83
+ ": ",
84
+ tasksList.length,
85
+ ")"
86
+ ] })
87
+ ] }),
88
+ /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: 18, children: /* @__PURE__ */ jsx(IconPlus, {}) })
89
+ ] }),
90
+ /* @__PURE__ */ jsx(Divider, { w: "100%" }),
91
+ tasksList.map((task, idx) => /* @__PURE__ */ jsxs(
92
+ Flex,
93
+ {
94
+ gap: 0,
95
+ direction: "column",
96
+ align: "start",
97
+ justify: "space-between",
98
+ w: "100%",
99
+ h: 105,
100
+ className: styles.card,
101
+ px: 14,
102
+ py: 9,
103
+ children: [
104
+ /* @__PURE__ */ jsxs(Box, { children: [
105
+ /* @__PURE__ */ jsx(Text, { fz: 18, fw: 400, children: task.title }),
106
+ /* @__PURE__ */ jsxs(Flex, { align: "center", children: [
107
+ /* @__PURE__ */ jsx(IconCalendarEvent, { color: "#495057", size: 13 }),
108
+ /* @__PURE__ */ jsx(Text, { fz: 16, c: "#495057", children: getPlusDays(idx) })
109
+ ] })
110
+ ] }),
111
+ /* @__PURE__ */ jsxs(Flex, { justify: "space-between", w: "100%", children: [
112
+ /* @__PURE__ */ jsxs(Flex, { children: [
113
+ getCurrentType(task.type),
114
+ /* @__PURE__ */ jsxs(Text, { fz: 13, children: [
115
+ "DEMO-",
116
+ idx + 1
117
+ ] })
118
+ ] }),
119
+ /* @__PURE__ */ jsxs(Flex, { children: [
120
+ /* @__PURE__ */ jsx(IconEqual, { color: "#F59F00", size: 16 }),
121
+ /* @__PURE__ */ jsx(
122
+ Avatar,
123
+ {
124
+ variant: "filled",
125
+ color: "#228BE6",
126
+ radius: "xl",
127
+ size: 24
128
+ }
129
+ )
130
+ ] })
131
+ ] })
132
+ ]
133
+ },
134
+ task.id
135
+ ))
136
+ ]
137
+ }
138
+ ),
139
+ /* @__PURE__ */ jsxs(
140
+ Flex,
141
+ {
142
+ gap: 11,
143
+ p: 7,
144
+ direction: "column",
145
+ w: 340,
146
+ className: styles.column,
147
+ children: [
148
+ /* @__PURE__ */ jsxs(Flex, { w: "100%", justify: "space-between", children: [
149
+ /* @__PURE__ */ jsxs(Flex, { gap: 14, align: "center", children: [
150
+ /* @__PURE__ */ jsx(StatusBadge, { color: "#12B886", title: statusesList[1] }),
151
+ /* @__PURE__ */ jsxs(Text, { c: "#868E96", fz: 14, children: [
152
+ "(",
153
+ t("defineStatuses.tasks"),
154
+ ": 2)"
155
+ ] })
156
+ ] }),
157
+ /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: 18, children: /* @__PURE__ */ jsx(IconPlus, {}) })
158
+ ] }),
159
+ /* @__PURE__ */ jsx(Divider, { w: "100%" }),
160
+ Array(2).fill(0).map((_, idx) => /* @__PURE__ */ jsxs(
161
+ Flex,
162
+ {
163
+ gap: 0,
164
+ direction: "column",
165
+ align: "start",
166
+ justify: "space-between",
167
+ w: "100%",
168
+ h: 105,
169
+ className: styles.card,
170
+ px: 14,
171
+ py: 9,
172
+ children: [
173
+ /* @__PURE__ */ jsxs(Box, { children: [
174
+ /* @__PURE__ */ jsx(
175
+ Skeleton,
176
+ {
177
+ animate: false,
178
+ mb: 15,
179
+ w: idx === 0 ? 128 : 172,
180
+ h: 18
181
+ }
182
+ ),
183
+ /* @__PURE__ */ jsxs(Flex, { align: "center", children: [
184
+ /* @__PURE__ */ jsx(IconCalendarEvent, { color: "#495057", size: 13 }),
185
+ /* @__PURE__ */ jsx(Skeleton, { animate: false, w: idx === 0 ? 52 : 63, h: 12 })
186
+ ] })
187
+ ] }),
188
+ /* @__PURE__ */ jsxs(Flex, { justify: "space-between", w: "100%", children: [
189
+ /* @__PURE__ */ jsxs(Flex, { children: [
190
+ /* @__PURE__ */ jsx(ActionIcon, { size: 16, variant: "filled", color: "#ADB5BD", children: /* @__PURE__ */ jsx(IconCheck, {}) }),
191
+ /* @__PURE__ */ jsxs(Text, { c: "#ADB5BD", fz: 13, children: [
192
+ "DEMO-",
193
+ idx + 4
194
+ ] })
195
+ ] }),
196
+ /* @__PURE__ */ jsxs(Flex, { children: [
197
+ /* @__PURE__ */ jsx(IconEqual, { color: "#F59F00", size: 16 }),
198
+ /* @__PURE__ */ jsx(
199
+ Avatar,
200
+ {
201
+ variant: "filled",
202
+ color: "#228BE6",
203
+ radius: "xl",
204
+ size: 24
205
+ }
206
+ )
207
+ ] })
208
+ ] })
209
+ ]
210
+ },
211
+ idx
212
+ ))
213
+ ]
214
+ }
215
+ ),
216
+ /* @__PURE__ */ jsxs(
217
+ Flex,
218
+ {
219
+ gap: 11,
220
+ p: 7,
221
+ direction: "column",
222
+ w: 340,
223
+ className: styles.column,
224
+ children: [
225
+ /* @__PURE__ */ jsxs(Flex, { w: "100%", justify: "space-between", children: [
226
+ /* @__PURE__ */ jsxs(Flex, { gap: 14, align: "center", children: [
227
+ /* @__PURE__ */ jsx(StatusBadge, { color: "#FA5252", title: statusesList[2] }),
228
+ /* @__PURE__ */ jsxs(Text, { c: "#868E96", fz: 14, children: [
229
+ "(",
230
+ t("defineStatuses.tasks"),
231
+ ": 2)"
232
+ ] })
233
+ ] }),
234
+ /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: 18, children: /* @__PURE__ */ jsx(IconPlus, {}) })
235
+ ] }),
236
+ /* @__PURE__ */ jsx(Divider, { w: "100%" }),
237
+ Array(2).fill(0).map((_, idx) => /* @__PURE__ */ jsxs(
238
+ Flex,
239
+ {
240
+ gap: 0,
241
+ direction: "column",
242
+ align: "start",
243
+ justify: "space-between",
244
+ w: "100%",
245
+ h: 105,
246
+ className: styles.card,
247
+ px: 14,
248
+ py: 9,
249
+ children: [
250
+ /* @__PURE__ */ jsxs(Box, { children: [
251
+ /* @__PURE__ */ jsx(
252
+ Skeleton,
253
+ {
254
+ animate: false,
255
+ mb: 15,
256
+ w: idx === 0 ? 266 : 150,
257
+ h: 18
258
+ }
259
+ ),
260
+ /* @__PURE__ */ jsxs(Flex, { align: "center", children: [
261
+ /* @__PURE__ */ jsx(IconCalendarEvent, { color: "#495057", size: 13 }),
262
+ /* @__PURE__ */ jsx(Skeleton, { animate: false, w: idx === 0 ? 72 : 46, h: 12 })
263
+ ] })
264
+ ] }),
265
+ /* @__PURE__ */ jsxs(Flex, { justify: "space-between", w: "100%", children: [
266
+ /* @__PURE__ */ jsxs(Flex, { children: [
267
+ /* @__PURE__ */ jsx(ActionIcon, { size: 16, variant: "filled", color: "#ADB5BD", children: /* @__PURE__ */ jsx(IconCheck, {}) }),
268
+ /* @__PURE__ */ jsxs(Text, { c: "#ADB5BD", fz: 13, children: [
269
+ "DEMO-",
270
+ idx + 6
271
+ ] })
272
+ ] }),
273
+ /* @__PURE__ */ jsxs(Flex, { children: [
274
+ /* @__PURE__ */ jsx(IconEqual, { color: "#F59F00", size: 16 }),
275
+ /* @__PURE__ */ jsx(
276
+ Avatar,
277
+ {
278
+ variant: "filled",
279
+ color: "#228BE6",
280
+ radius: "xl",
281
+ size: 24
282
+ }
283
+ )
284
+ ] })
285
+ ] })
286
+ ]
287
+ },
288
+ idx
289
+ ))
290
+ ]
291
+ }
292
+ )
293
+ ] });
294
+ };
295
+ export {
296
+ KanbanLayout as default
297
+ };
@@ -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
  }>;
@@ -7,6 +7,8 @@ export type ToolDef = {
7
7
  icon: ReactNode;
8
8
  path: string;
9
9
  onClick?: () => void;
10
+ withBackButton?: boolean;
11
+ entityName?: string;
10
12
  };
11
13
  export type AppContainerProps = {
12
14
  content?: ReactNode;
@@ -0,0 +1,7 @@
1
+ import { ColorPickerProps, MenuProps } from '@mantine/core';
2
+ export declare const CircleColorPicker: ({ value, onChange, menuProps, colorPickerProps, }: {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ menuProps?: MenuProps;
6
+ colorPickerProps?: ColorPickerProps;
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, GeneralComment, ICommentOptions, ICommentFile, ILocalCommentFile, IUser, Thread } from '../CommentsPanel/types.ts';
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: (ICommentFile | ILocalCommentFile)[];
7
+ files: ICommentFile[];
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 | ILocalCommentFile)[];
27
+ files: ICommentFile[];
28
28
  };
29
29
  setCommentValue: React.Dispatch<React.SetStateAction<{
30
30
  value: string;
31
- files: (ICommentFile | ILocalCommentFile)[];
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: (ICommentFile | ILocalCommentFile)[];
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 { TFunction } from 'i18next';
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, t, deleteCommentOrThread, replyInput, }: ICommentPanelListItemProps) => import("react/jsx-runtime").JSX.Element;
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 {};
@@ -1,6 +1,7 @@
1
1
  import { CommentsFilter } from '../types.ts';
2
2
  import * as React from 'react';
3
- export declare const CommentFilterMenu: ({ commentsFilter, setCommentsFilter, }: {
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
- export declare const CommentsEmptyPlaceholder: ({ resolved, }: {
2
- resolved: boolean;
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: Map<string, Set<NodeKey>>;
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 { ICommentFile, ILocalCommentFile } from '../types.ts';
2
- export declare const CommentsUploadFilesPreview: ({ files, removeImage, isUploaded, }: {
3
- files: Array<ICommentFile | ILocalCommentFile>;
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
- isUploaded?: boolean;
6
- }) => import("react/jsx-runtime").JSX.Element;
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: Map<string, Set<NodeKey>>;
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.ts';
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
  }