@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.
- package/dist/KanbanLayout-DGHT9E0N.js +297 -0
- package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts +5 -3
- package/dist/components/AppContainer/types.d.ts +2 -0
- package/dist/components/CircleColorPicker/CircleColorPicker.d.ts +7 -0
- 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 +157 -57
- package/dist/components/CommentsPanel/utils.d.ts +11 -5
- package/dist/components/Copyright/index.d.ts +2 -1
- package/dist/components/EmojiPicker/EmojiPanel.d.ts +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +9 -1
- package/dist/components/EmojiPicker/IconsPanel.d.ts +1 -1
- package/dist/components/EmojiPicker/custom-icons/StatusCancel.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusDone.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress00.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress10.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress100.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress20.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress30.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress40.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress50.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress60.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress70.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress80.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress90.d.ts +2 -0
- package/dist/components/EmojiPicker/custom-icons/customIcons.d.ts +12 -0
- package/dist/components/EntityTitle/EntityTitle.d.ts +18 -0
- package/dist/components/FilePicker/FilePicker.d.ts +4 -3
- package/dist/components/NoData/NoData.d.ts +147 -22
- package/dist/components/ProjectIcon/ProjectIcon.d.ts +10 -1
- package/dist/components/UserAvatar/index.d.ts +1 -2
- 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/constants.d.ts +1 -0
- package/dist/emoji-categorized-CRsMUQyD.js +4 -0
- package/dist/helpers/filterHierarchyByTypes.d.ts +15 -0
- package/dist/helpers/getPartOfTheDay.d.ts +1 -0
- package/dist/helpers/getRandomIconColor.d.ts +1 -0
- package/dist/hooks/useMenu.d.ts +1 -1
- package/dist/icons.min-wo13YUY4.js +4 -0
- package/dist/index-BI1_FPl_.js +81688 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +187 -175
- package/dist/index.umd.cjs +60 -1206
- package/dist/store/onboarding.d.ts +2 -2
- package/dist/store/timezoneStore.d.ts +5 -3
- package/dist/store/workspacesOrder.d.ts +5 -3
- package/package.json +4 -4
- package/dist/KanbanLayout-_hW8P-S9.js +0 -287
- package/dist/TimeLine-DCVt4pFB.js +0 -198
- 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/DifferentLayouts/TimeLine.d.ts +0 -2
- package/dist/components/TemplatesModal/components/SelectedTemplate.d.ts +0 -7
- package/dist/components/TemplatesModal/components/Template.d.ts +0 -9
- package/dist/components/TemplatesModal/components/Templates.d.ts +0 -7
- package/dist/components/TemplatesModal/data.d.ts +0 -13
- package/dist/components/TemplatesModal/index.d.ts +0 -7
- package/dist/components/TemplatesModal/types.d.ts +0 -16
- package/dist/emoji-categorized-DAOdcF53.js +0 -4
- package/dist/icons.min-Chyr-bjL.js +0 -4
- package/dist/index-B17e6b8n.js +0 -67033
- package/dist/index.esm-Ci1yhzNS.js +0 -6814
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EditorType } from '@layers-app/editor';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
export interface ICommentReaction {
|
|
3
4
|
id: string;
|
|
@@ -11,72 +12,69 @@ export interface ICommentReaction {
|
|
|
11
12
|
deletedAt: string;
|
|
12
13
|
version: number;
|
|
13
14
|
}
|
|
14
|
-
export interface ICommentFile
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
webkitRelativePath: string;
|
|
22
|
-
}
|
|
23
|
-
export interface ILocalCommentFile {
|
|
24
|
-
clientKey: string;
|
|
25
|
-
loading?: boolean;
|
|
26
|
-
file: File;
|
|
15
|
+
export interface ICommentFile {
|
|
16
|
+
src: string;
|
|
17
|
+
id: string;
|
|
18
|
+
file: File & {
|
|
19
|
+
id?: string;
|
|
20
|
+
};
|
|
21
|
+
isImage: boolean;
|
|
27
22
|
}
|
|
28
23
|
export type UpdateCommentTextArgs = (text: {
|
|
29
24
|
value: string;
|
|
30
25
|
restore: boolean;
|
|
31
26
|
}, files: {
|
|
32
27
|
deletedFile: ICommentFile[];
|
|
33
|
-
newFiles:
|
|
28
|
+
newFiles: ICommentFile[];
|
|
34
29
|
}, threadOrGeneralId: string, commentId?: string) => void;
|
|
35
30
|
export type Comment = {
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
authorId: string;
|
|
32
|
+
text: string;
|
|
38
33
|
deleted: boolean;
|
|
39
34
|
clientKey: string;
|
|
35
|
+
edited: boolean;
|
|
40
36
|
id: string;
|
|
41
37
|
tempId?: string;
|
|
42
38
|
reactions: ICommentReaction[];
|
|
43
|
-
files: Array<ICommentFile
|
|
39
|
+
files: Array<ICommentFile>;
|
|
44
40
|
timeStamp: number;
|
|
45
|
-
type:
|
|
41
|
+
type: string;
|
|
46
42
|
};
|
|
47
43
|
export type Thread = {
|
|
48
44
|
children: Array<Comment>;
|
|
49
45
|
id: string;
|
|
50
46
|
quote: string;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
edited: boolean;
|
|
48
|
+
type: string;
|
|
49
|
+
resolution: CommentResolve;
|
|
50
|
+
authorId: string;
|
|
54
51
|
tempId?: string;
|
|
55
52
|
reactions: ICommentReaction[];
|
|
56
|
-
files: Array<ICommentFile
|
|
53
|
+
files: Array<ICommentFile>;
|
|
57
54
|
timeStamp: number;
|
|
58
55
|
clientKey: string;
|
|
59
|
-
|
|
56
|
+
text: string;
|
|
60
57
|
deleted: boolean;
|
|
61
58
|
};
|
|
62
59
|
export type GeneralComment = {
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
text: string;
|
|
61
|
+
authorId: string;
|
|
65
62
|
id: string;
|
|
66
63
|
tempId?: string;
|
|
64
|
+
edited: boolean;
|
|
67
65
|
quote: string;
|
|
68
66
|
timeStamp: number;
|
|
69
|
-
|
|
67
|
+
resolution: CommentResolve;
|
|
70
68
|
reactions: ICommentReaction[];
|
|
71
|
-
files: Array<ICommentFile
|
|
72
|
-
type:
|
|
69
|
+
files: Array<ICommentFile>;
|
|
70
|
+
type: string;
|
|
73
71
|
clientKey: string;
|
|
74
72
|
children: Array<Comment>;
|
|
75
73
|
deleted: boolean;
|
|
76
74
|
};
|
|
77
75
|
type CommentValueType = {
|
|
78
76
|
value: string;
|
|
79
|
-
files: (ICommentFile
|
|
77
|
+
files: (ICommentFile)[];
|
|
80
78
|
};
|
|
81
79
|
export type GetEditorFn = (params: {
|
|
82
80
|
onSubmit: () => void;
|
|
@@ -86,61 +84,57 @@ export type GetEditorFn = (params: {
|
|
|
86
84
|
commentValue?: CommentValueType;
|
|
87
85
|
initialContent?: string;
|
|
88
86
|
registerClearEditor?: (fn: () => void) => void;
|
|
87
|
+
editorRef?: React.MutableRefObject<EditorType | null>;
|
|
89
88
|
}) => React.ReactNode;
|
|
90
89
|
export type Comments = Array<Thread | Comment | GeneralComment>;
|
|
91
|
-
export type CommentResolve = 'ACCEPTED' | 'REJECTED' | null;
|
|
90
|
+
export type CommentResolve = 'ACCEPTED' | 'REJECTED' | null | 'NONE';
|
|
92
91
|
export interface ICommentsFilterProps {
|
|
93
92
|
commentsFilter: CommentsFilter;
|
|
94
93
|
setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
|
|
95
94
|
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)[];
|
|
100
100
|
};
|
|
101
101
|
setCommentValue: React.Dispatch<React.SetStateAction<{
|
|
102
102
|
value: string;
|
|
103
|
-
files: (ICommentFile
|
|
103
|
+
files: (ICommentFile)[];
|
|
104
104
|
}>>;
|
|
105
105
|
submitAddComment: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: any | null, files?: File[]) => void;
|
|
106
106
|
}
|
|
107
|
-
export
|
|
107
|
+
export type IMember = {
|
|
108
|
+
avatarUrl: string | null;
|
|
109
|
+
roleType: string;
|
|
110
|
+
roleId: string;
|
|
108
111
|
accepted: boolean;
|
|
109
|
-
avatarUrl: string;
|
|
110
112
|
email: string;
|
|
111
|
-
|
|
113
|
+
userId: string | null;
|
|
112
114
|
invitationId: string | null;
|
|
113
115
|
invitationToken: string | null;
|
|
114
|
-
name: string;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
userId: string;
|
|
118
|
-
}
|
|
116
|
+
name: string | null;
|
|
117
|
+
expiresAt: string | null;
|
|
118
|
+
};
|
|
119
119
|
export interface IUser {
|
|
120
|
-
activeWorkspaceId: string;
|
|
121
|
-
createdAt: string;
|
|
122
|
-
darkMode: boolean;
|
|
123
|
-
email: string;
|
|
124
|
-
id: string;
|
|
125
|
-
lang: string;
|
|
126
|
-
metaData: {
|
|
127
|
-
cover: Record<string, any>;
|
|
128
|
-
about: string;
|
|
129
|
-
socialNetworks: any[];
|
|
130
|
-
fontFamily: string;
|
|
131
|
-
};
|
|
120
|
+
activeWorkspaceId: string | null;
|
|
132
121
|
name: string;
|
|
133
122
|
nickname: string;
|
|
134
|
-
|
|
123
|
+
email: string;
|
|
135
124
|
profilePicture: {
|
|
136
125
|
url: string;
|
|
137
126
|
};
|
|
127
|
+
createdAt: string;
|
|
128
|
+
id: string;
|
|
129
|
+
lang: string;
|
|
130
|
+
plan: string;
|
|
131
|
+
darkMode: boolean;
|
|
138
132
|
timeZone: string | null;
|
|
139
133
|
twoFactorEnabled: boolean;
|
|
140
|
-
workspaces: any[];
|
|
141
134
|
}
|
|
135
|
+
export type ResolvedFilter = 'resolved' | 'not-resolved' | 'all';
|
|
142
136
|
export type CommentsFilter = {
|
|
143
|
-
resolved:
|
|
137
|
+
resolved: ResolvedFilter;
|
|
144
138
|
feedback: boolean;
|
|
145
139
|
filteredUsers: IMember[];
|
|
146
140
|
};
|
|
@@ -222,6 +216,8 @@ interface ICommentActions {
|
|
|
222
216
|
export interface ICommentOptions {
|
|
223
217
|
showComments: boolean;
|
|
224
218
|
setShowComments: (value?: boolean) => void;
|
|
219
|
+
adminPermission: boolean;
|
|
220
|
+
isGuest: boolean;
|
|
225
221
|
pageId: string;
|
|
226
222
|
workspaceInfo: {
|
|
227
223
|
title: string;
|
|
@@ -231,8 +227,8 @@ export interface ICommentOptions {
|
|
|
231
227
|
}
|
|
232
228
|
export interface SharedCommentProps {
|
|
233
229
|
commentOrThread: Comment | Thread | GeneralComment;
|
|
234
|
-
deleteCommentOrThread: (commentOrThread: Comment | Thread, thread?: Thread) => void
|
|
235
|
-
resolveThreat?: (threat: Thread | GeneralComment) => void
|
|
230
|
+
deleteCommentOrThread: (commentOrThread: Comment | Thread, thread?: Thread) => Promise<void>;
|
|
231
|
+
resolveThreat?: (threat: Thread | GeneralComment) => Promise<void>;
|
|
236
232
|
}
|
|
237
233
|
type SelectMarkNodeFn = (markNodeKeys: Set<string>, activeElement: Element | null) => void;
|
|
238
234
|
export interface StoreOptions {
|
|
@@ -241,4 +237,108 @@ export interface StoreOptions {
|
|
|
241
237
|
commentOptions?: ICommentOptions;
|
|
242
238
|
selectMarkNode: SelectMarkNodeFn;
|
|
243
239
|
}
|
|
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
|
+
}
|
|
244
344
|
export {};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { default as React, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { CommentsFilter, CommentsNs, ICommentFile, IMember } from './types.ts';
|
|
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: ICommentFile[], 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,
|
|
6
|
+
export declare const getDescription: (type: string, locales: CommentsNs) => string;
|
|
7
|
+
export declare const getTitle: (type: string, locales: CommentsNs) => string;
|
|
8
|
+
export declare function toggleFilter(setState: Dispatch<SetStateAction<CommentsFilter>>, key: keyof CommentsFilter, value?: IMember | boolean | string, listRef?: React.RefObject<HTMLElement>): void;
|
|
8
9
|
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;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { ButtonProps } from '@mantine/core';
|
|
2
3
|
interface CopyrightProps {
|
|
3
4
|
className?: string;
|
|
4
5
|
color?: string;
|
|
5
6
|
title?: string;
|
|
6
|
-
|
|
7
|
+
size?: ButtonProps['size'];
|
|
7
8
|
}
|
|
8
9
|
export declare const Copyright: React.FC<CopyrightProps>;
|
|
9
10
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmojiPickerProps } from '../..';
|
|
2
|
-
export declare const EmojiPanel: ({ locales, onChange, onClose, setRandomIcon, }: Pick<EmojiPickerProps, "locales" | "value" | "onChange"> & {
|
|
2
|
+
export declare const EmojiPanel: ({ locales, onChange, onClose, setRandomIcon, querySearch, }: Pick<EmojiPickerProps, "locales" | "value" | "onChange" | "querySearch"> & {
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
setRandomIcon: (icon: string) => void;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { FloatingPosition, PopoverProps } from '@mantine/core';
|
|
3
3
|
export type EmojiPickerProps = {
|
|
4
|
+
project?: string;
|
|
4
5
|
value?: string | null;
|
|
5
6
|
onChange?: (v: string) => void;
|
|
6
7
|
position?: FloatingPosition;
|
|
@@ -9,7 +10,14 @@ export type EmojiPickerProps = {
|
|
|
9
10
|
showIcons?: boolean;
|
|
10
11
|
showColors?: boolean;
|
|
11
12
|
showEmojis?: boolean;
|
|
13
|
+
querySearch?: string;
|
|
12
14
|
defaultActiveTab?: string | null;
|
|
15
|
+
/** Controls how the popover opens. 'click' preserves current behavior; 'realtime' opens only when typing matches triggerRegex. */
|
|
16
|
+
openWhen?: 'click' | 'realtime';
|
|
17
|
+
/** Regex used to detect a live trigger (default matches ":" plus at least one non-space, non-":" char). */
|
|
18
|
+
triggerRegex?: RegExp;
|
|
19
|
+
/** Monotonically increasing counter updated by the parent on each keypress; used to detect real-time typing. */
|
|
20
|
+
typingSeq?: number;
|
|
13
21
|
};
|
|
14
22
|
export type EmojiPickerLocales = {
|
|
15
23
|
emojis?: string;
|
|
@@ -20,4 +28,4 @@ export type EmojiPickerLocales = {
|
|
|
20
28
|
icons?: string;
|
|
21
29
|
emojiCategory?: Record<string, string>;
|
|
22
30
|
};
|
|
23
|
-
export declare const EmojiPicker: ({ value, children, onChange, position, popoverProps, showIcons, showColors, defaultActiveTab, showEmojis, locales: _locales, }: PropsWithChildren<EmojiPickerProps>) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const EmojiPicker: ({ project, value, querySearch, children, onChange, position, popoverProps, showIcons, showColors, defaultActiveTab, showEmojis, locales: _locales, openWhen, triggerRegex, typingSeq, }: PropsWithChildren<EmojiPickerProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { EmojiPickerProps } from './EmojiPicker';
|
|
2
|
-
export declare const IconsPanel: import('react').MemoExoticComponent<({ showColors, locales, onChange, value, onClose, }: Pick<EmojiPickerProps, "locales" | "showColors" | "value" | "onChange"> & {
|
|
2
|
+
export declare const IconsPanel: import('react').MemoExoticComponent<({ showColors, locales, onChange, value, onClose, project, }: Pick<EmojiPickerProps, "locales" | "showColors" | "value" | "onChange" | "project"> & {
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType, SVGProps } from 'react';
|
|
2
|
+
type CustomIconData = {
|
|
3
|
+
name: string;
|
|
4
|
+
component: ComponentType<SVGProps<SVGSVGElement>>;
|
|
5
|
+
category: string;
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export declare const customIconsData: CustomIconData[];
|
|
9
|
+
export declare const customIcons: {
|
|
10
|
+
[k: string]: ComponentType<SVGProps<SVGSVGElement>>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
isTitleFocused: boolean;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
export declare const EntityTitle: ({ lock, title, handleTitle, placeholder, error, isReadOnly, accessEdit, nowrap, maxLength, fw, onPressEnter, }: {
|
|
7
|
+
title: string;
|
|
8
|
+
lock?: boolean;
|
|
9
|
+
handleTitle?: (title: string) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
error?: boolean;
|
|
12
|
+
isReadOnly?: boolean;
|
|
13
|
+
accessEdit?: boolean;
|
|
14
|
+
nowrap?: boolean;
|
|
15
|
+
maxLength?: number;
|
|
16
|
+
fw?: number;
|
|
17
|
+
onPressEnter?: () => void;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { FloatingPosition, PopoverProps } from '@mantine/core';
|
|
2
|
+
import { FlexProps, FloatingPosition, PopoverProps } from '@mantine/core';
|
|
3
3
|
import { DropzoneProps, FileWithPath } from '@mantine/dropzone';
|
|
4
4
|
import { FilePickerLocales, FileType, ImagePickerGalleryCollection } from './types';
|
|
5
5
|
declare const baseTabsList: readonly ["gallery", "upload", "link", "unsplash", "giphy"];
|
|
6
6
|
type TabType = (typeof baseTabsList)[number];
|
|
7
7
|
export type FilePickerProps = PropsWithChildren<{
|
|
8
8
|
onChange?: (v: string) => void;
|
|
9
|
-
onRemove?: () => void;
|
|
9
|
+
onRemove?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
10
10
|
onUpload?: (files: FileWithPath[], setOpened: (state: boolean) => void) => void;
|
|
11
11
|
uploading?: boolean;
|
|
12
12
|
showTabs?: readonly TabType[];
|
|
@@ -22,6 +22,7 @@ export type FilePickerProps = PropsWithChildren<{
|
|
|
22
22
|
locales?: FilePickerLocales;
|
|
23
23
|
type?: FileType;
|
|
24
24
|
isValidMediaUrl?: (url: string) => boolean;
|
|
25
|
+
targetProps?: FlexProps;
|
|
25
26
|
}>;
|
|
26
|
-
export declare const FilePicker: ({ onChange, onRemove, onUpload, uploading, showTabs, children, width, position, readOnly, hasImage, giphyToken, unsplashClientId, type, galleryCollection, isValidMediaUrl, popoverProps, dropZoneProps, locales, }: PropsWithChildren<FilePickerProps>) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const FilePicker: ({ onChange, onRemove, onUpload, uploading, showTabs, children, width, position, readOnly, hasImage, giphyToken, unsplashClientId, type, galleryCollection, isValidMediaUrl, popoverProps, dropZoneProps, targetProps, locales, }: PropsWithChildren<FilePickerProps>) => import("react/jsx-runtime").JSX.Element;
|
|
27
28
|
export {};
|