@layers-app/shared 0.0.44 → 0.0.50

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 (130) hide show
  1. package/dist/{KanbanLayout-DrevX3Ow.js → KanbanLayout-oWz6EhPt.js} +5 -5
  2. package/dist/assets/jsons/icons.min.json.d.ts +1 -1
  3. package/dist/components/AppContainer/AppContainer.d.ts +2 -3
  4. package/dist/components/AppContainer/Header.d.ts +8 -0
  5. package/dist/components/AppContainer/Main.d.ts +2 -0
  6. package/dist/components/AppContainer/components/AppSidebarButton.d.ts +9 -0
  7. package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts +1 -0
  8. package/dist/components/AppContainer/components/AppsSidebar/AppsSidebar.d.ts +4 -0
  9. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts +1 -0
  10. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts +4 -0
  11. package/dist/components/AppContainer/components/MobileNavbar.d.ts +2 -2
  12. package/dist/components/AppContainer/components/RightSidebar.d.ts +2 -0
  13. package/dist/components/AppContainer/components/SidebarToggleButton.d.ts +3 -0
  14. package/dist/components/AppContainer/components/SlideAnimation.d.ts +6 -0
  15. package/dist/components/AppContainer/components/ToolSidebar.d.ts +3 -0
  16. package/dist/components/AppContainer/components/ToolbarNewButton.d.ts +2 -0
  17. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts +1 -0
  18. package/dist/components/AppContainer/components/menus/HelpMenu/WhatsNew.d.ts +7 -0
  19. package/dist/components/AppContainer/components/menus/MoreMenu.d.ts +1 -0
  20. package/dist/components/AppContainer/components/{MenuUserDropdown.d.ts → menus/UserMenu/MenuUserDropdown.d.ts} +1 -1
  21. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  22. package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts +30 -12
  23. package/dist/components/AppContainer/types.d.ts +16 -11
  24. package/dist/components/AppShell/AppShell.d.ts +12 -0
  25. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts +24 -0
  26. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts +9 -0
  27. package/dist/components/AttachmentsGalleryModal/components/ErrorSection.d.ts +1 -0
  28. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +9 -0
  29. package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts +4 -0
  30. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts +7 -0
  31. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts +10 -0
  32. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +9 -0
  33. package/dist/components/AttachmentsGalleryModal/constants.d.ts +20 -0
  34. package/dist/components/AttachmentsGalleryModal/helpers.d.ts +22 -0
  35. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts +8 -0
  36. package/dist/components/AttachmentsGalleryModal/hooks/useEmblaCarousel.d.ts +8 -0
  37. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +8 -0
  38. package/dist/components/AttachmentsGalleryModal/hooks/usePanning.d.ts +10 -0
  39. package/dist/components/AttachmentsGalleryModal/hooks/useZoomReset.d.ts +1 -0
  40. package/dist/components/AttachmentsGalleryModal/types.d.ts +0 -8
  41. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts +9 -0
  42. package/dist/components/ColorPicker/ColorPicker.d.ts +1 -0
  43. package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +16 -11
  44. package/dist/components/CommentComposer/index.d.ts +2 -55
  45. package/dist/components/CommentComposer/types.d.ts +96 -0
  46. package/dist/components/CommentsPanel/index.d.ts +1 -26
  47. package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
  48. package/dist/components/EmojiPicker/getIconsList.d.ts +11 -0
  49. package/dist/components/EmojiPicker/getRandomIcon.d.ts +1 -0
  50. package/dist/components/EntityIcon.d.ts +7 -0
  51. package/dist/components/FilePicker/FilePicker.d.ts +2 -1
  52. package/dist/components/FilePicker/types.d.ts +1 -0
  53. package/dist/components/FormViewer/helpers/conditions.d.ts +2 -2
  54. package/dist/components/FormViewer/helpers/helpers.d.ts +2 -2
  55. package/dist/components/FormViewer/helpers/steps.d.ts +2 -2
  56. package/dist/components/FormViewer/hooks/useActiveStep.d.ts +2 -2
  57. package/dist/components/FormViewer/store/formStore.d.ts +36 -36
  58. package/dist/components/FormViewer/store/formStoreApi.d.ts +6 -6
  59. package/dist/components/FormViewer/store/selectors.d.ts +684 -684
  60. package/dist/components/FormViewer/types/schemes.d.ts +44 -44
  61. package/dist/components/Loaders/BaseLoader.d.ts +3 -0
  62. package/dist/components/NavMenu/NavMenu.d.ts +21 -0
  63. package/dist/components/NavMenu/components/DnDItem.d.ts +8 -0
  64. package/dist/components/NavMenu/components/DnDProvider.d.ts +8 -0
  65. package/dist/components/NavMenu/components/DraggableOverlay.d.ts +1 -0
  66. package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts +2 -0
  67. package/dist/components/NavMenu/components/NavMenuItem.d.ts +7 -0
  68. package/dist/components/NavMenu/components/NavMenuLabel.d.ts +3 -0
  69. package/dist/components/NavMenu/index.d.ts +5 -0
  70. package/dist/components/NavMenu/store.d.ts +37 -0
  71. package/dist/components/NavMenu/types.d.ts +29 -0
  72. package/dist/components/NavbarResizer/NavbarResizer.d.ts +5 -2
  73. package/dist/components/Notification/Notification.d.ts +1 -0
  74. package/dist/components/Notification/NotificationCard.d.ts +1 -1
  75. package/dist/components/ProjectIcon/ProjectIcon.d.ts +8 -3
  76. package/dist/components/RichText/index.d.ts +3 -3
  77. package/dist/components/SubmitModal/index.d.ts +2 -2
  78. package/dist/components/UserAvatar/index.d.ts +1 -1
  79. package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +6 -10
  80. package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts +2 -14
  81. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts +9 -8
  82. package/dist/components/modals/RemoveConfirmModal.d.ts +7 -0
  83. package/dist/constants.d.ts +0 -1
  84. package/dist/helpers/download.d.ts +2 -2
  85. package/dist/helpers/hotjar.d.ts +9 -0
  86. package/dist/helpers/pickRandomEmoji.d.ts +1 -0
  87. package/dist/hooks/useDateUtils.d.ts +1 -0
  88. package/dist/hooks/useMenu.d.ts +0 -3
  89. package/dist/icons.min-43tm8BtD.js +4 -0
  90. package/dist/{index-B6qa0aiu.js → index-tn5CWDGz.js} +23985 -22644
  91. package/dist/index.d.ts +14 -13
  92. package/dist/index.js +247 -249
  93. package/dist/index.umd.cjs +59 -59
  94. package/dist/lang/index.d.ts +4 -0
  95. package/dist/lang/locales/ui_en.json.d.ts +81 -0
  96. package/dist/lang/locales/ui_es.json.d.ts +78 -0
  97. package/dist/lang/locales/ui_ru.json.d.ts +82 -0
  98. package/dist/types/files.d.ts +18 -0
  99. package/package.json +2 -3
  100. package/dist/components/AppContainer/components/AllAppsMenu.d.ts +0 -5
  101. package/dist/components/AppContainer/components/DesktopNavbar.d.ts +0 -7
  102. package/dist/components/AppContainer/components/NavbarFooter.d.ts +0 -3
  103. package/dist/components/AppContainer/components/NavbarHeader.d.ts +0 -3
  104. package/dist/components/AttachmentsGalleryModal/ShakaPlayer.d.ts +0 -15
  105. package/dist/components/AttachmentsGalleryModal/index.d.ts +0 -2
  106. package/dist/components/CommentFilterMenu/index.d.ts +0 -9
  107. package/dist/components/CommentsPanel/components/CommentActionMenu.d.ts +0 -10
  108. package/dist/components/CommentsPanel/components/CommentActions.d.ts +0 -16
  109. package/dist/components/CommentsPanel/components/CommentPanelListItem.d.ts +0 -21
  110. package/dist/components/CommentsPanel/components/CommentTabFilter.d.ts +0 -7
  111. package/dist/components/CommentsPanel/components/CommentsEmptyPlaceholder.d.ts +0 -6
  112. package/dist/components/CommentsPanel/components/CommentsFilterHeader.d.ts +0 -3
  113. package/dist/components/CommentsPanel/components/CommentsListItemMenu.d.ts +0 -7
  114. package/dist/components/CommentsPanel/components/CommentsPanelList.d.ts +0 -18
  115. package/dist/components/CommentsPanel/components/CommentsThreadReplyControls.d.ts +0 -15
  116. package/dist/components/CommentsPanel/components/CommentsUploadFilesPreview.d.ts +0 -10
  117. package/dist/components/CommentsPanel/components/Icon.d.ts +0 -8
  118. package/dist/components/CommentsPanel/store.d.ts +0 -25
  119. package/dist/components/CommentsPanel/types.d.ts +0 -339
  120. package/dist/components/CommentsPanel/utils.d.ts +0 -14
  121. package/dist/components/InfoMenu/index.d.ts +0 -1
  122. package/dist/components/InviteModal/InviteModal.d.ts +0 -2
  123. package/dist/components/InviteModal/slice.d.ts +0 -13
  124. package/dist/components/Notification/index.d.ts +0 -6
  125. package/dist/components/modals/openRemoveConfirmModal.d.ts +0 -4
  126. package/dist/helpers/pickRandomIcon.d.ts +0 -1
  127. package/dist/icons.min-wo13YUY4.js +0 -4
  128. package/dist/store/aboutModal.d.ts +0 -7
  129. package/dist/store/trashModal.d.ts +0 -7
  130. /package/dist/components/{AttachmentsGalleryModal → ImageModal}/ImageModal.d.ts +0 -0
@@ -1,339 +0,0 @@
1
- import { EditorType } from '@layers-app/editor';
2
- import * as React from 'react';
3
- export interface ICommentReaction {
4
- id: string;
5
- commentId: string;
6
- parentId: string;
7
- parentType: 'COMMENT' | 'THREAD';
8
- reaction: string;
9
- userId: string;
10
- createdAt: string;
11
- deleted: boolean;
12
- deletedAt: string;
13
- version: number;
14
- }
15
- export interface ICommentFile {
16
- src: string;
17
- id: string;
18
- file: File & {
19
- id?: string;
20
- };
21
- isImage: boolean;
22
- }
23
- export type UpdateCommentTextArgs = (text: {
24
- value: string;
25
- restore: boolean;
26
- }, files: {
27
- deletedFile: ICommentFile[];
28
- newFiles: ICommentFile[];
29
- }, threadOrGeneralId: string, commentId?: string) => void;
30
- export type Comment = {
31
- authorId: string;
32
- text: string;
33
- deleted: boolean;
34
- clientKey: string;
35
- edited: boolean;
36
- id: string;
37
- tempId?: string;
38
- reactions: ICommentReaction[];
39
- files: Array<ICommentFile>;
40
- timeStamp: number;
41
- type: string;
42
- };
43
- export type Thread = {
44
- children: Array<Comment>;
45
- id: string;
46
- quote: string;
47
- edited: boolean;
48
- type: string;
49
- resolution: CommentResolve;
50
- authorId: string;
51
- tempId?: string;
52
- reactions: ICommentReaction[];
53
- files: Array<ICommentFile>;
54
- timeStamp: number;
55
- clientKey: string;
56
- text: string;
57
- deleted: boolean;
58
- };
59
- export type GeneralComment = {
60
- text: string;
61
- authorId: string;
62
- id: string;
63
- tempId?: string;
64
- edited: boolean;
65
- quote: string;
66
- timeStamp: number;
67
- resolution: CommentResolve;
68
- reactions: ICommentReaction[];
69
- files: Array<ICommentFile>;
70
- type: string;
71
- clientKey: string;
72
- children: Array<Comment>;
73
- deleted: boolean;
74
- };
75
- type CommentValueType = {
76
- value: string;
77
- files: (ICommentFile)[];
78
- };
79
- export type GetEditorFn = (params: {
80
- onSubmit: () => void;
81
- handleBlur: () => void;
82
- autoFocus: boolean;
83
- setCommentValue: React.Dispatch<React.SetStateAction<CommentValueType>>;
84
- commentValue?: CommentValueType;
85
- initialContent?: string;
86
- registerClearEditor?: (fn: () => void) => void;
87
- editorRef?: React.MutableRefObject<EditorType | null>;
88
- }) => React.ReactNode;
89
- export type Comments = Array<Thread | Comment | GeneralComment>;
90
- export type CommentResolve = 'ACCEPTED' | 'REJECTED' | null | 'NONE';
91
- export interface ICommentsFilterProps {
92
- commentsFilter: CommentsFilter;
93
- setCommentsFilter: React.Dispatch<React.SetStateAction<CommentsFilter>>;
94
- disabled: boolean;
95
- listRef: React.RefObject<HTMLElement>;
96
- updateThreadId: (tempId: string, realId: string, updatedAt: string, commentType: string, files: ICommentFile[], thread?: Thread) => void;
97
- commentValue: {
98
- value: string;
99
- files: (ICommentFile)[];
100
- };
101
- setCommentValue: React.Dispatch<React.SetStateAction<{
102
- value: string;
103
- files: (ICommentFile)[];
104
- }>>;
105
- submitAddComment: (commentOrThread: Comment | Thread | GeneralComment, isInlineComment: boolean, thread?: Thread | GeneralComment, selection?: any | null, files?: File[]) => void;
106
- }
107
- export type IMember = {
108
- avatarUrl: string | null;
109
- roleType: string;
110
- roleId: string;
111
- accepted: boolean;
112
- email: string;
113
- userId: string | null;
114
- invitationId: string | null;
115
- invitationToken: string | null;
116
- name: string | null;
117
- expiresAt: string | null;
118
- };
119
- export interface IUser {
120
- activeWorkspaceId: string | null;
121
- name: string;
122
- nickname: string;
123
- email: string;
124
- profilePicture: {
125
- url: string;
126
- };
127
- createdAt: string;
128
- id: string;
129
- lang: string;
130
- plan: string;
131
- darkMode: boolean;
132
- timeZone: string | null;
133
- twoFactorEnabled: boolean;
134
- }
135
- export type ResolvedFilter = 'resolved' | 'not-resolved' | 'all';
136
- export type CommentsFilter = {
137
- resolved: ResolvedFilter;
138
- feedback: boolean;
139
- filteredUsers: IMember[];
140
- };
141
- interface IFetchCommentsParams {
142
- fetchPageComments?: boolean;
143
- pageId: string;
144
- fetchCommentComments?: boolean;
145
- onSuccess: (data: any) => void;
146
- }
147
- interface IResolveCommentParams {
148
- threatId: string;
149
- resolveValue: 'ACCEPTED' | 'REJECTED';
150
- onSuccess?: () => void;
151
- }
152
- interface ICommentReactionParams {
153
- commentId: string;
154
- author: string;
155
- emojiValue: string;
156
- onSuccess?: (data: ICommentReaction) => void;
157
- onError: () => void;
158
- }
159
- interface IDeleteReactionParams {
160
- reactionId: string;
161
- onSuccess?: () => void;
162
- onError: () => void;
163
- }
164
- interface IDeleteCommentParams {
165
- deleteCommentId: string;
166
- onSuccess?: () => void;
167
- }
168
- interface IRestoreCommentParams {
169
- commentId: string;
170
- onSuccess?: () => void;
171
- }
172
- interface IUpdateCommentTextParams {
173
- commentId: string;
174
- textValue: string;
175
- onSuccess?: () => void;
176
- onError?: () => void;
177
- }
178
- interface IDeleteCommentImageParams {
179
- photoToRemove: string;
180
- onSuccess?: () => void;
181
- }
182
- interface ISubmitCommentParams {
183
- text: string;
184
- parentType: string;
185
- parentId: string;
186
- commentType: string;
187
- onSuccess?: (data: any) => void;
188
- }
189
- export interface IGetReactionsParams {
190
- commentId: string;
191
- }
192
- export interface IGetPhotosParams {
193
- commentId: string;
194
- }
195
- interface IUploadCommentFileParams {
196
- file: File;
197
- commentId: string;
198
- onSuccess?: (data: any) => void;
199
- }
200
- interface ICommentActions {
201
- fetchCommentsApi: (params: IFetchCommentsParams) => Promise<void>;
202
- resolveCommentApi: (params: IResolveCommentParams) => Promise<void>;
203
- commentReactionApi: (params: ICommentReactionParams) => Promise<void>;
204
- deleteReactionApi: (params: IDeleteReactionParams) => Promise<void>;
205
- deleteCommentApi: (params: IDeleteCommentParams) => Promise<void>;
206
- restoreCommentApi: (params: IRestoreCommentParams) => Promise<void>;
207
- updateCommentTextApi: (params: IUpdateCommentTextParams) => Promise<void>;
208
- deleteCommentImageApi: (params: IDeleteCommentImageParams) => Promise<void>;
209
- submitCommentApi: (params: ISubmitCommentParams) => Promise<void>;
210
- getReactionsApi: (params: IGetReactionsParams) => Promise<{
211
- content: ICommentReaction[];
212
- }>;
213
- getPhotosApi: (params: IGetPhotosParams) => Promise<File[]>;
214
- uploadCommentFileApi: (params: IUploadCommentFileParams) => Promise<void>;
215
- }
216
- export interface ICommentOptions {
217
- showComments: boolean;
218
- setShowComments: (value?: boolean) => void;
219
- adminPermission: boolean;
220
- isGuest: boolean;
221
- pageId: string;
222
- workspaceInfo: {
223
- title: string;
224
- icon: string;
225
- };
226
- commentActions: ICommentActions;
227
- }
228
- export interface SharedCommentProps {
229
- commentOrThread: Comment | Thread | GeneralComment;
230
- deleteCommentOrThread: (commentOrThread: Comment | Thread, thread?: Thread) => Promise<void>;
231
- resolveThreat?: (threat: Thread | GeneralComment) => Promise<void>;
232
- }
233
- type SelectMarkNodeFn = (markNodeKeys: Set<string>, activeElement: Element | null) => void;
234
- export interface StoreOptions {
235
- currentUser?: IUser;
236
- workspaceMembers?: IMember[] | undefined;
237
- commentOptions?: ICommentOptions;
238
- selectMarkNode: SelectMarkNodeFn;
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
- description: string;
310
- };
311
- };
312
- menuActions: {
313
- edit: string;
314
- delete: string;
315
- download: string;
316
- };
317
- notifications: {
318
- title: string;
319
- description: string;
320
- options: {
321
- all: string;
322
- replies: string;
323
- };
324
- uploadMessages: {
325
- tooManyFiles: string;
326
- fileTooLarge: string;
327
- fileLimit: string;
328
- };
329
- };
330
- repliesToggle: {
331
- show_one: string;
332
- show_other: string;
333
- hide: string;
334
- };
335
- }
336
- export interface CommentsLocales {
337
- comments: CommentsNs;
338
- }
339
- export {};
@@ -1,14 +0,0 @@
1
- import { default as React, Dispatch, SetStateAction } from 'react';
2
- import { CommentsFilter, CommentsNs, ICommentFile, IMember } from './types.ts';
3
- export declare const cutDeleteImageId: (imageSrc: string) => string;
4
- export declare const uploadAllFiles: (commentId: string, images: ICommentFile[], uploadCommentFileApi: any) => Promise<ICommentFile[]>;
5
- export declare function scrollToTop(selector: string): void;
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;
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 +0,0 @@
1
- export declare const InfoMenu: () => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export declare const GradientBlur: () => import("react/jsx-runtime").JSX.Element;
2
- export declare const InviteModal: () => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- interface InviteModalState {
2
- opened: boolean;
3
- title?: string;
4
- workspaceName?: string;
5
- workspaceAvatar?: string;
6
- invitation: string;
7
- onAccept?: () => void;
8
- onDecline?: () => void;
9
- }
10
- export declare const useInviteModalStore: import('zustand').UseBoundStore<import('zustand').StoreApi<InviteModalState>>;
11
- export declare const openInviteModal: (params: Omit<InviteModalState, "opened">) => void;
12
- export declare const closeInviteModal: () => void;
13
- export {};
@@ -1,6 +0,0 @@
1
- interface NotificationProps {
2
- isNotificationOpen: boolean;
3
- setNotificationOpen: (value: boolean) => void;
4
- }
5
- declare const Notification: ({ isNotificationOpen, setNotificationOpen, }: NotificationProps) => import("react/jsx-runtime").JSX.Element;
6
- export default Notification;
@@ -1,4 +0,0 @@
1
- import { OpenConfirmModal } from '@mantine/modals/lib/context';
2
- export declare const openRemoveConfirmModal: (props: OpenConfirmModal & {
3
- isLoading?: boolean;
4
- }) => void;
@@ -1 +0,0 @@
1
- export declare const pickRandomIcon: (setRandomIcon?: (icon: string) => void, onChange?: (icon: string) => void) => Promise<string>;