@bcc-code/vue-bcc-chat-ui 6.5.0 → 7.0.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 (137) hide show
  1. package/dist/App.vue.d.ts +1 -1
  2. package/dist/auth.d.ts +2 -0
  3. package/dist/chat/accessToken.d.ts +9 -1
  4. package/dist/chat/avatar.d.ts +3 -0
  5. package/dist/chat/client.d.ts +7 -0
  6. package/dist/chat/conversationState.d.ts +11 -0
  7. package/dist/chat/data.d.ts +8 -17
  8. package/dist/chat/environment.d.ts +7 -2
  9. package/dist/chat/i18n/en.d.ts +118 -0
  10. package/dist/chat/i18n/nb.d.ts +118 -0
  11. package/dist/chat/i18n/types.d.ts +2 -0
  12. package/dist/chat/index.d.ts +87 -446
  13. package/dist/chat/localization.d.ts +15 -0
  14. package/dist/chat/messageText.d.ts +13 -0
  15. package/dist/chat/mockClient.d.ts +13 -0
  16. package/dist/chat/offlineStore.d.ts +53 -0
  17. package/dist/chat/reactions.d.ts +8 -0
  18. package/dist/chat/richText.d.ts +5 -0
  19. package/dist/chat/theme.d.ts +10 -400
  20. package/dist/chat/types.d.ts +206 -28
  21. package/dist/components/chat/BccChat.vue.d.ts +509 -0
  22. package/dist/components/chat/ChatStatusOverlay.vue.d.ts +33 -0
  23. package/dist/components/chat/publicContract.d.ts +43 -0
  24. package/dist/components/conversations/ConversationList.vue.d.ts +15 -0
  25. package/dist/components/conversations/UserProfileCard.vue.d.ts +8 -0
  26. package/dist/components/messages/ActionMessageRow.vue.d.ts +5 -0
  27. package/dist/components/messages/ComposerActionsPopover.vue.d.ts +19 -0
  28. package/dist/components/messages/ComposerContextBanner.vue.d.ts +13 -0
  29. package/dist/components/messages/ComposerFormatMenu.vue.d.ts +13 -0
  30. package/dist/components/messages/ComposerPollDialog.vue.d.ts +16 -0
  31. package/dist/components/messages/ComposerScheduleDialog.vue.d.ts +20 -0
  32. package/dist/components/messages/ConversationComposer.vue.d.ts +106 -0
  33. package/dist/components/messages/LinkPreviewCard.vue.d.ts +6 -0
  34. package/dist/components/messages/LinkifiedText.vue.d.ts +8 -0
  35. package/dist/components/messages/MessageAttachmentList.vue.d.ts +10 -0
  36. package/dist/components/messages/MessageComposer.vue.d.ts +69 -0
  37. package/dist/components/messages/MessageDeliveryStatus.vue.d.ts +6 -0
  38. package/dist/components/messages/MessageItem.vue.d.ts +27 -0
  39. package/dist/components/messages/MessageItemHeader.vue.d.ts +6 -0
  40. package/dist/components/messages/MessageItemMenu.vue.d.ts +26 -0
  41. package/dist/components/messages/MessageItemMenuReactions.vue.d.ts +11 -0
  42. package/dist/components/messages/MessageItemReactions.vue.d.ts +14 -0
  43. package/dist/components/messages/MessageList.vue.d.ts +115 -0
  44. package/dist/components/messages/MessageListHeader.vue.d.ts +7 -0
  45. package/dist/components/messages/MessagePollContent.vue.d.ts +12 -0
  46. package/dist/components/messages/MessageReactionList.vue.d.ts +12 -0
  47. package/dist/components/messages/MessageReplyQuote.vue.d.ts +10 -0
  48. package/dist/components/messages/MessageTextContent.vue.d.ts +6 -0
  49. package/dist/components/overlays/FullscreenDialog.vue.d.ts +34 -0
  50. package/dist/components/overlays/MediaViewerDialog.vue.d.ts +13 -0
  51. package/dist/components/overlays/MessageInfoDialog.vue.d.ts +14 -0
  52. package/dist/components/overlays/ReceiptSection.vue.d.ts +9 -0
  53. package/dist/components/overlays/ScheduledMessagesDialog.vue.d.ts +25 -0
  54. package/dist/composables/chat/index.d.ts +13 -0
  55. package/dist/composables/chat/useComposerContext.d.ts +43 -0
  56. package/dist/composables/chat/useConversationContext.d.ts +30 -0
  57. package/dist/composables/chat/useDialogsContext.d.ts +27 -0
  58. package/dist/composables/chat/useMessagesContext.d.ts +36 -0
  59. package/dist/composables/useChatActions.d.ts +21 -0
  60. package/dist/composables/useChatEventBus.d.ts +91 -0
  61. package/dist/composables/useComposerDrafts.d.ts +44 -0
  62. package/dist/composables/useConversationComposer.d.ts +15 -0
  63. package/dist/composables/useGroupMemberTracking.d.ts +28 -0
  64. package/dist/composables/useImageZoom.d.ts +26 -0
  65. package/dist/composables/useMessageActionMenu.d.ts +202 -0
  66. package/dist/composables/useMessageInfoDialog.d.ts +165 -0
  67. package/dist/composables/useMessageListScroll.d.ts +30 -0
  68. package/dist/composables/useMessageNavigation.d.ts +18 -0
  69. package/dist/composables/useRichTextComposer.d.ts +31 -0
  70. package/dist/demo/ApiExamplesPanel.vue.d.ts +6 -0
  71. package/dist/demo/ChatShell.vue.d.ts +10 -0
  72. package/dist/demo/ThemeModeToggle.vue.d.ts +12 -0
  73. package/dist/demo/useDemoThemeMode.d.ts +6 -0
  74. package/dist/design.d.ts +10 -0
  75. package/dist/index.d.ts +10 -3
  76. package/dist/main.d.ts +0 -1
  77. package/dist/style.css +1 -0
  78. package/dist/vue-bcc-chat-ui.js +8858 -84780
  79. package/dist/vue-bcc-chat-ui.js.map +1 -1
  80. package/package.json +42 -51
  81. package/README.md +0 -89
  82. package/dist/chat/bccuiExtension.d.ts +0 -7
  83. package/dist/chat/captionedAttachment.d.ts +0 -7
  84. package/dist/chat/captionedAttachmentExtension.d.ts +0 -7
  85. package/dist/chat/cometChatPatches.d.ts +0 -3
  86. package/dist/chat/connection.d.ts +0 -14
  87. package/dist/chat/logger.d.ts +0 -12
  88. package/dist/chat/login.d.ts +0 -14
  89. package/dist/chat/message.d.ts +0 -15
  90. package/dist/chat/replyExtension.d.ts +0 -26
  91. package/dist/chat/replyStyle.d.ts +0 -30
  92. package/dist/chat/rescheduleExtension.d.ts +0 -22
  93. package/dist/chat/scheduledMessage.d.ts +0 -4
  94. package/dist/chat/styleFix.d.ts +0 -14
  95. package/dist/chat/translations.d.ts +0 -3
  96. package/dist/chat/uiKit.d.ts +0 -10
  97. package/dist/component-overrides/BccBubbleWrapper.vue.d.ts +0 -156
  98. package/dist/component-overrides/CometChatMessageListOverride.vue.d.ts +0 -2
  99. package/dist/components/BccAttachmentBox.vue.d.ts +0 -29
  100. package/dist/components/BccAttachmentPreview.vue.d.ts +0 -23
  101. package/dist/components/BccChatMessageBubble.vue.d.ts +0 -99
  102. package/dist/components/BccChatMessageList.vue.d.ts +0 -82
  103. package/dist/components/BccChatMessages.vue.d.ts +0 -33
  104. package/dist/components/BccChatSendButton.vue.d.ts +0 -4
  105. package/dist/components/BccCometChatFullScreenViewer.vue.d.ts +0 -24
  106. package/dist/components/BccFileBubble.vue.d.ts +0 -70
  107. package/dist/components/BccImageBubble.vue.d.ts +0 -27
  108. package/dist/components/BccReplyBox.vue.d.ts +0 -36
  109. package/dist/components/BccReplyPreview.vue.d.ts +0 -30
  110. package/dist/components/BccScheduledMessageModal.vue.d.ts +0 -31
  111. package/dist/components/BccScheduledMessages.vue.d.ts +0 -25
  112. package/dist/components/BccScheduledSendButton.vue.d.ts +0 -14
  113. package/dist/offline/cometChatAPIInterceptor.d.ts +0 -2
  114. package/dist/offline/cometChatWSInterceptor.d.ts +0 -2
  115. package/dist/offline/connectivity.d.ts +0 -5
  116. package/dist/offline/failedSendingRetry.d.ts +0 -4
  117. package/dist/offline/index.d.ts +0 -10
  118. package/dist/offline/offlineStoreLocalStorage.d.ts +0 -32
  119. package/dist/offline/types.d.ts +0 -69
  120. package/dist/vite.svg +0 -1
  121. package/dist/vue-bcc-chat-ui.css +0 -1
  122. package/src/components/BccAttachmentBox.vue +0 -133
  123. package/src/components/BccAttachmentPreview.vue +0 -57
  124. package/src/components/BccChatMessageBubble.vue +0 -219
  125. package/src/components/BccChatMessageList.vue +0 -488
  126. package/src/components/BccChatMessages.vue +0 -212
  127. package/src/components/BccChatSendButton.vue +0 -91
  128. package/src/components/BccCometChatFullScreenViewer.vue +0 -118
  129. package/src/components/BccFileBubble.vue +0 -137
  130. package/src/components/BccImageBubble.vue +0 -75
  131. package/src/components/BccReplyBox.vue +0 -141
  132. package/src/components/BccReplyPreview.vue +0 -113
  133. package/src/components/BccScheduledMessageIcon.vue +0 -65
  134. package/src/components/BccScheduledMessageModal.vue +0 -70
  135. package/src/components/BccScheduledMessages.vue +0 -125
  136. package/src/components/BccScheduledSendButton.vue +0 -118
  137. /package/dist/{components/BccScheduledMessageIcon.vue.d.ts → FixtureApp.vue.d.ts} +0 -0
@@ -1,408 +1,18 @@
1
- import { CometChatFont, CometChatTheme } from '@cometchat/uikit-resources';
2
1
  import { ThemeMode } from './types';
3
2
  export declare const theme: import('vue').Ref<{
4
3
  palette: {
5
- mode: string;
6
- background: {
7
- light?: string | undefined;
8
- dark?: string | undefined;
9
- };
10
- primary: {
11
- light?: string | undefined;
12
- dark?: string | undefined;
13
- };
14
- primary150: {
15
- light?: string | undefined;
16
- dark?: string | undefined;
17
- };
18
- primary500: {
19
- light?: string | undefined;
20
- dark?: string | undefined;
21
- };
22
- error: {
23
- light?: string | undefined;
24
- dark?: string | undefined;
25
- };
26
- accent: {
27
- light?: string | undefined;
28
- dark?: string | undefined;
29
- };
30
- accent50: {
31
- light?: string | undefined;
32
- dark?: string | undefined;
33
- };
34
- accent100: {
35
- light?: string | undefined;
36
- dark?: string | undefined;
37
- };
38
- accent200: {
39
- light?: string | undefined;
40
- dark?: string | undefined;
41
- };
42
- accent300: {
43
- light?: string | undefined;
44
- dark?: string | undefined;
45
- };
46
- accent400: {
47
- light?: string | undefined;
48
- dark?: string | undefined;
49
- };
50
- accent500: {
51
- light?: string | undefined;
52
- dark?: string | undefined;
53
- };
54
- accent600: {
55
- light?: string | undefined;
56
- dark?: string | undefined;
57
- };
58
- accent700: {
59
- light?: string | undefined;
60
- dark?: string | undefined;
61
- };
62
- accent800: {
63
- light?: string | undefined;
64
- dark?: string | undefined;
65
- };
66
- accent900: {
67
- light?: string | undefined;
68
- dark?: string | undefined;
69
- };
70
- success: {
71
- light?: string | undefined;
72
- dark?: string | undefined;
73
- };
74
- secondary: {
75
- light?: string | undefined;
76
- dark?: string | undefined;
77
- };
78
- tertiary: {
79
- light?: string | undefined;
80
- dark?: string | undefined;
81
- };
82
- getAccent: (mode?: string) => string | undefined;
83
- getAccent50: (mode?: string) => string | undefined;
84
- getAccent100: (mode?: string) => string | undefined;
85
- getAccent200: (mode?: string) => string | undefined;
86
- getAccent300: (mode?: string) => string | undefined;
87
- getAccent400: (mode?: string) => string | undefined;
88
- getAccent500: (mode?: string) => string | undefined;
89
- getAccent600: (mode?: string) => string | undefined;
90
- getAccent700: (mode?: string) => string | undefined;
91
- getAccent800: (mode?: string) => string | undefined;
92
- getAccent900: (mode?: string) => string | undefined;
93
- getSuccess: (mode?: string) => string | undefined;
94
- getError: (mode?: string) => string | undefined;
95
- getPrimary: (mode?: string) => string | undefined;
96
- getPrimary150: (mode?: string) => string | undefined;
97
- getPrimary500: (mode?: string) => string | undefined;
98
- getSecondary: (mode?: string) => string | undefined;
99
- getBackground: (mode?: string) => string | undefined;
100
- getTertiary: (mode?: string) => string | undefined;
101
- setMode: (mode: string) => void;
102
- setBackground: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
103
- setPrimary: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
104
- setPrimary150: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
105
- setPrimary500: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
106
- setSecondary: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
107
- setError: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
108
- setAccent: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
109
- setAccent50: (colorset?: import('@cometchat/uikit-resources').PaletteItem) => void;
110
- setAccent100: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
111
- setAccent200: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
112
- setAccent300: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
113
- setAccent400: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
114
- setAccent500: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
115
- setAccent600: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
116
- setAccent700: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
117
- setAccent800: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
118
- setAccent900: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
119
- setTertiary: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
4
+ mode: ThemeMode;
5
+ setMode: (mode: ThemeMode) => void;
120
6
  };
121
- typography: {
122
- fontFamily: string;
123
- fontWeightRegular: string;
124
- fontWeightMedium: string;
125
- fontWeightSemibold: string;
126
- fontWeightBold: string;
127
- heading: {
128
- fontFamily: string;
129
- fontWeight: string;
130
- fontSize: string;
131
- };
132
- name: {
133
- fontFamily: string;
134
- fontWeight: string;
135
- fontSize: string;
136
- };
137
- title1: {
138
- fontFamily: string;
139
- fontWeight: string;
140
- fontSize: string;
141
- };
142
- title2: {
143
- fontFamily: string;
144
- fontWeight: string;
145
- fontSize: string;
146
- };
147
- subtitle1: {
148
- fontFamily: string;
149
- fontWeight: string;
150
- fontSize: string;
151
- };
152
- subtitle2: {
153
- fontFamily: string;
154
- fontWeight: string;
155
- fontSize: string;
156
- };
157
- text1: {
158
- fontFamily: string;
159
- fontWeight: string;
160
- fontSize: string;
161
- };
162
- text2: {
163
- fontFamily: string;
164
- fontWeight: string;
165
- fontSize: string;
166
- };
167
- text3: {
168
- fontFamily: string;
169
- fontWeight: string;
170
- fontSize: string;
171
- };
172
- caption1: {
173
- fontFamily: string;
174
- fontWeight: string;
175
- fontSize: string;
176
- };
177
- caption2: {
178
- fontFamily: string;
179
- fontWeight: string;
180
- fontSize: string;
181
- };
182
- caption3: {
183
- fontFamily: string;
184
- fontWeight: string;
185
- fontSize: string;
186
- };
187
- setFontFamily: (fontFamily: string) => void;
188
- setFontWeightRegular: (fontWeightRegular: string) => void;
189
- setFontWeightMedium: (fontWeightMedium: string) => void;
190
- setFontWeightSemibold: (fontWeightSemibold: string) => void;
191
- setFontWeightBold: (fontWeightBold: string) => void;
192
- setHeading: (headingFont: CometChatFont) => void;
193
- setName: (nameFont: CometChatFont) => void;
194
- setTitle1: (titleFont: CometChatFont) => void;
195
- setTitle2: (titleFont: CometChatFont) => void;
196
- setSubtitle1: (subtitleFont: CometChatFont) => void;
197
- setSubtitle2: (subtitleFont: CometChatFont) => void;
198
- setText1: (textFont: CometChatFont) => void;
199
- setText2: (textFont: CometChatFont) => void;
200
- setText3: (textFont: CometChatFont) => void;
201
- setCaption1: (captionFont: CometChatFont) => void;
202
- setCaption2: (captionFont: CometChatFont) => void;
203
- setCaption3: (captionFont: CometChatFont) => void;
204
- };
205
- }, CometChatTheme | {
7
+ }, {
206
8
  palette: {
207
- mode: string;
208
- background: {
209
- light?: string | undefined;
210
- dark?: string | undefined;
211
- };
212
- primary: {
213
- light?: string | undefined;
214
- dark?: string | undefined;
215
- };
216
- primary150: {
217
- light?: string | undefined;
218
- dark?: string | undefined;
219
- };
220
- primary500: {
221
- light?: string | undefined;
222
- dark?: string | undefined;
223
- };
224
- error: {
225
- light?: string | undefined;
226
- dark?: string | undefined;
227
- };
228
- accent: {
229
- light?: string | undefined;
230
- dark?: string | undefined;
231
- };
232
- accent50: {
233
- light?: string | undefined;
234
- dark?: string | undefined;
235
- };
236
- accent100: {
237
- light?: string | undefined;
238
- dark?: string | undefined;
239
- };
240
- accent200: {
241
- light?: string | undefined;
242
- dark?: string | undefined;
243
- };
244
- accent300: {
245
- light?: string | undefined;
246
- dark?: string | undefined;
247
- };
248
- accent400: {
249
- light?: string | undefined;
250
- dark?: string | undefined;
251
- };
252
- accent500: {
253
- light?: string | undefined;
254
- dark?: string | undefined;
255
- };
256
- accent600: {
257
- light?: string | undefined;
258
- dark?: string | undefined;
259
- };
260
- accent700: {
261
- light?: string | undefined;
262
- dark?: string | undefined;
263
- };
264
- accent800: {
265
- light?: string | undefined;
266
- dark?: string | undefined;
267
- };
268
- accent900: {
269
- light?: string | undefined;
270
- dark?: string | undefined;
271
- };
272
- success: {
273
- light?: string | undefined;
274
- dark?: string | undefined;
275
- };
276
- secondary: {
277
- light?: string | undefined;
278
- dark?: string | undefined;
279
- };
280
- tertiary: {
281
- light?: string | undefined;
282
- dark?: string | undefined;
283
- };
284
- getAccent: (mode?: string) => string | undefined;
285
- getAccent50: (mode?: string) => string | undefined;
286
- getAccent100: (mode?: string) => string | undefined;
287
- getAccent200: (mode?: string) => string | undefined;
288
- getAccent300: (mode?: string) => string | undefined;
289
- getAccent400: (mode?: string) => string | undefined;
290
- getAccent500: (mode?: string) => string | undefined;
291
- getAccent600: (mode?: string) => string | undefined;
292
- getAccent700: (mode?: string) => string | undefined;
293
- getAccent800: (mode?: string) => string | undefined;
294
- getAccent900: (mode?: string) => string | undefined;
295
- getSuccess: (mode?: string) => string | undefined;
296
- getError: (mode?: string) => string | undefined;
297
- getPrimary: (mode?: string) => string | undefined;
298
- getPrimary150: (mode?: string) => string | undefined;
299
- getPrimary500: (mode?: string) => string | undefined;
300
- getSecondary: (mode?: string) => string | undefined;
301
- getBackground: (mode?: string) => string | undefined;
302
- getTertiary: (mode?: string) => string | undefined;
303
- setMode: (mode: string) => void;
304
- setBackground: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
305
- setPrimary: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
306
- setPrimary150: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
307
- setPrimary500: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
308
- setSecondary: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
309
- setError: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
310
- setAccent: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
311
- setAccent50: (colorset?: import('@cometchat/uikit-resources').PaletteItem) => void;
312
- setAccent100: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
313
- setAccent200: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
314
- setAccent300: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
315
- setAccent400: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
316
- setAccent500: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
317
- setAccent600: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
318
- setAccent700: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
319
- setAccent800: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
320
- setAccent900: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
321
- setTertiary: (colorset: import('@cometchat/uikit-resources').PaletteItem) => void;
9
+ mode: ThemeMode;
10
+ setMode(mode: ThemeMode): void;
322
11
  };
323
- typography: {
324
- fontFamily: string;
325
- fontWeightRegular: string;
326
- fontWeightMedium: string;
327
- fontWeightSemibold: string;
328
- fontWeightBold: string;
329
- heading: {
330
- fontFamily: string;
331
- fontWeight: string;
332
- fontSize: string;
333
- };
334
- name: {
335
- fontFamily: string;
336
- fontWeight: string;
337
- fontSize: string;
338
- };
339
- title1: {
340
- fontFamily: string;
341
- fontWeight: string;
342
- fontSize: string;
343
- };
344
- title2: {
345
- fontFamily: string;
346
- fontWeight: string;
347
- fontSize: string;
348
- };
349
- subtitle1: {
350
- fontFamily: string;
351
- fontWeight: string;
352
- fontSize: string;
353
- };
354
- subtitle2: {
355
- fontFamily: string;
356
- fontWeight: string;
357
- fontSize: string;
358
- };
359
- text1: {
360
- fontFamily: string;
361
- fontWeight: string;
362
- fontSize: string;
363
- };
364
- text2: {
365
- fontFamily: string;
366
- fontWeight: string;
367
- fontSize: string;
368
- };
369
- text3: {
370
- fontFamily: string;
371
- fontWeight: string;
372
- fontSize: string;
373
- };
374
- caption1: {
375
- fontFamily: string;
376
- fontWeight: string;
377
- fontSize: string;
378
- };
379
- caption2: {
380
- fontFamily: string;
381
- fontWeight: string;
382
- fontSize: string;
383
- };
384
- caption3: {
385
- fontFamily: string;
386
- fontWeight: string;
387
- fontSize: string;
388
- };
389
- setFontFamily: (fontFamily: string) => void;
390
- setFontWeightRegular: (fontWeightRegular: string) => void;
391
- setFontWeightMedium: (fontWeightMedium: string) => void;
392
- setFontWeightSemibold: (fontWeightSemibold: string) => void;
393
- setFontWeightBold: (fontWeightBold: string) => void;
394
- setHeading: (headingFont: CometChatFont) => void;
395
- setName: (nameFont: CometChatFont) => void;
396
- setTitle1: (titleFont: CometChatFont) => void;
397
- setTitle2: (titleFont: CometChatFont) => void;
398
- setSubtitle1: (subtitleFont: CometChatFont) => void;
399
- setSubtitle2: (subtitleFont: CometChatFont) => void;
400
- setText1: (textFont: CometChatFont) => void;
401
- setText2: (textFont: CometChatFont) => void;
402
- setText3: (textFont: CometChatFont) => void;
403
- setCaption1: (captionFont: CometChatFont) => void;
404
- setCaption2: (captionFont: CometChatFont) => void;
405
- setCaption3: (captionFont: CometChatFont) => void;
12
+ } | {
13
+ palette: {
14
+ mode: ThemeMode;
15
+ setMode: (mode: ThemeMode) => void;
406
16
  };
407
17
  }>;
408
- export declare const setThemeMode: (mode: ThemeMode) => void;
18
+ export declare function setThemeMode(mode: ThemeMode): void;
@@ -1,9 +1,22 @@
1
1
  import { BaseMessage, Group, MessageReceipt } from '@cometchat/chat-sdk-javascript';
2
- import { FuseResultMatch } from 'fuse.js';
3
- import { Ref } from 'vue';
4
- import { Conversation as OfflineConversation, Message as OfflineMessage } from '../offline/types';
5
- export * from 'fuse.js';
6
- export { OfflineConversation, OfflineMessage };
2
+ import { ComputedRef, Ref } from 'vue';
3
+ import { Environment } from './environment';
4
+ export interface ChatUserProfile {
5
+ uid: string;
6
+ name: string;
7
+ avatar?: string;
8
+ status?: string;
9
+ }
10
+ export interface FuseResultMatch {
11
+ indices: ReadonlyArray<[number, number]>;
12
+ key?: {
13
+ src: string;
14
+ } | string;
15
+ value?: string;
16
+ }
17
+ export type Language = "nb" | "no" | "ar" | "de" | "en" | "es" | "fr" | "hi" | "ms" | "pt" | "ru" | "zh" | "zh-tw" | "sv" | "lt";
18
+ export type ThemeMode = "dark" | "light";
19
+ export type OnlineStatus = "online" | "offline";
7
20
  export interface ChatInstallOptions {
8
21
  environment: Environment;
9
22
  language?: Language;
@@ -11,7 +24,6 @@ export interface ChatInstallOptions {
11
24
  accessToken?: Ref<string | null | undefined> | null | undefined | string;
12
25
  loggerCallback?: (entry: LogEntry) => void;
13
26
  }
14
- export * from './logger';
15
27
  export interface ChatInstance {
16
28
  componentId: string;
17
29
  replyToMessage: BaseMessage | null;
@@ -41,23 +53,40 @@ export interface ChatInstance {
41
53
  }
42
54
  export interface View {
43
55
  componentName: string;
44
- props?: Record<string, any>;
45
- }
46
- export type Language = 'nb' | 'no' | 'ar' | 'de' | 'en' | 'es' | 'fr' | 'hi' | 'ms' | 'pt' | 'ru' | 'zh' | 'zh-tw' | 'sv' | 'lt';
47
- export type Environment = 'prod' | 'sandbox';
48
- export type ChatEnvironmentConfig = {
49
- region: string;
50
- appId: string;
51
- chatApiBaseUrl: string;
52
- };
53
- export interface UserChatInfo {
54
- chatUid: string;
56
+ props?: Record<string, unknown>;
57
+ }
58
+ export type ChatMessageKind = "text" | "image" | "video" | "audio" | "file" | "poll" | "action" | "unsupported";
59
+ export interface ChatAttachmentItem {
60
+ kind: Extract<ChatMessageKind, "image" | "video" | "audio" | "file">;
55
61
  name: string;
56
- unreadMessageCount: number;
57
- lastMessage?: MessageInfo;
58
- membersCount: number;
59
- tags: string[];
60
- muteSettings?: Date | null;
62
+ url?: string;
63
+ mimeType?: string;
64
+ extension?: string;
65
+ size?: number;
66
+ }
67
+ export interface ChatPollOptionItem {
68
+ id: string;
69
+ text: string;
70
+ voteCount: number;
71
+ voters: string[];
72
+ }
73
+ export interface ChatPollData {
74
+ id?: string;
75
+ question: string;
76
+ options: ChatPollOptionItem[];
77
+ totalVotes: number;
78
+ allowsMultipleAnswers: boolean;
79
+ }
80
+ export interface ChatReactionItem {
81
+ emoji: string;
82
+ count: number;
83
+ reactedByMe: boolean;
84
+ }
85
+ export type ChatMessageReceiptKind = "delivered" | "read";
86
+ export interface ChatMessageReceiptItem {
87
+ kind: ChatMessageReceiptKind;
88
+ user: ChatUserProfile;
89
+ timestamp?: Date;
61
90
  }
62
91
  export interface MessageInfo {
63
92
  text?: string;
@@ -66,6 +95,76 @@ export interface MessageInfo {
66
95
  sentAt: Date;
67
96
  messageReceipts?: MessageReceipt[];
68
97
  }
98
+ export interface ChatMessageReceiptSummary {
99
+ deliveredAt?: Date;
100
+ deliveredToMeAt?: Date;
101
+ readAt?: Date;
102
+ readByMeAt?: Date;
103
+ }
104
+ export interface ChatReplyPreview {
105
+ messageId: string;
106
+ senderName: string;
107
+ text: string;
108
+ kind: ChatMessageKind;
109
+ }
110
+ export type ChatDeliveryState = "sent" | "queued" | "sending" | "failed";
111
+ export interface ChatScheduledInfo {
112
+ scheduleDate?: Date;
113
+ originalChatUid?: string;
114
+ muid?: string;
115
+ messageId?: number;
116
+ }
117
+ export interface ChatMessageItem {
118
+ id: string;
119
+ muid?: string;
120
+ conversationId: string;
121
+ senderId: string;
122
+ senderName: string;
123
+ text: string;
124
+ kind: ChatMessageKind;
125
+ sentAt: Date;
126
+ category: string;
127
+ type: string;
128
+ senderAvatar?: string;
129
+ isOwn: boolean;
130
+ isDeleted: boolean;
131
+ isEdited: boolean;
132
+ attachments: ChatAttachmentItem[];
133
+ poll?: ChatPollData;
134
+ scheduled?: ChatScheduledInfo;
135
+ translatedText?: string;
136
+ replyTo?: ChatReplyPreview;
137
+ parentMessageId?: string;
138
+ replyCount: number;
139
+ reactions: ChatReactionItem[];
140
+ receipts: ChatMessageReceiptSummary;
141
+ deliveryState: ChatDeliveryState;
142
+ metadata?: Record<string, unknown>;
143
+ source: any;
144
+ }
145
+ export interface ChatConversationItem {
146
+ id: string;
147
+ targetId: string;
148
+ type: "group" | "user";
149
+ title: string;
150
+ subtitle: string;
151
+ avatar?: string;
152
+ unreadCount: number;
153
+ lastMessageAt?: Date;
154
+ muteSettings?: Date | null;
155
+ tags: string[];
156
+ memberCount?: number;
157
+ source: any;
158
+ }
159
+ export interface UserChatInfo {
160
+ chatUid: string;
161
+ name: string;
162
+ unreadMessageCount: number;
163
+ lastMessage?: MessageInfo;
164
+ membersCount: number;
165
+ tags: string[];
166
+ muteSettings?: Date | null;
167
+ }
69
168
  export interface ParticipantInfo {
70
169
  uid: string;
71
170
  displayName: string;
@@ -78,15 +177,14 @@ export interface DispatchData {
78
177
  scheduleDate: string;
79
178
  messageId: number;
80
179
  }
81
- export type ThemeMode = 'dark' | 'light';
82
- export type LogEntry = {
180
+ export interface LogEntry {
83
181
  logUid: string;
84
182
  correlationUid?: string;
85
183
  message: string;
86
184
  severity: LogSeverity;
87
- userMetadata?: Record<string, any>;
185
+ userMetadata?: Record<string, unknown>;
88
186
  timestamp: string;
89
- };
187
+ }
90
188
  export declare enum LogSeverity {
91
189
  DEBUG = "Debug",
92
190
  INFO = "Info",
@@ -95,11 +193,11 @@ export declare enum LogSeverity {
95
193
  }
96
194
  export interface SearchedItems {
97
195
  conversations: {
98
- conversation: OfflineConversation;
196
+ conversation: ChatConversationItem;
99
197
  matches: FuseResultMatch[];
100
198
  }[];
101
199
  messages: {
102
- message: OfflineMessage;
200
+ message: ChatMessageItem;
103
201
  matches: FuseResultMatch[];
104
202
  }[];
105
203
  }
@@ -121,3 +219,83 @@ export interface CachedLastMessage {
121
219
  lastMessage: null | MessageInfo;
122
220
  lastUpdated: number;
123
221
  }
222
+ export interface AttachmentUploadInput {
223
+ file: File;
224
+ caption?: string;
225
+ }
226
+ export interface PollComposerInput {
227
+ question: string;
228
+ options: string[];
229
+ allowsMultipleAnswers?: boolean;
230
+ }
231
+ export interface MessageSendOptions {
232
+ senderDisplayName?: string;
233
+ }
234
+ export interface ScheduleMessageInput {
235
+ scheduleDate: string;
236
+ text?: string;
237
+ file?: File;
238
+ caption?: string;
239
+ }
240
+ export interface RescheduleMessageInput {
241
+ messageId: number;
242
+ muid: string;
243
+ originalChatUid: string;
244
+ scheduleDate: string;
245
+ }
246
+ export interface ChatClient {
247
+ initialized: Ref<boolean>;
248
+ loggingIn: Ref<boolean>;
249
+ loadingConversations: Ref<boolean>;
250
+ loadingMessages: Ref<boolean>;
251
+ loadingThreadMessages: Ref<boolean>;
252
+ loadingOlderMessages: Ref<boolean>;
253
+ loadingOlderThreadMessages: Ref<boolean>;
254
+ loadingScheduledMessages: Ref<boolean>;
255
+ sendingMessage: Ref<boolean>;
256
+ schedulingMessage: Ref<boolean>;
257
+ syncingQueue: Ref<boolean>;
258
+ connected: Ref<boolean>;
259
+ offlineMode: Ref<boolean>;
260
+ loggedIn: Ref<boolean>;
261
+ error: Ref<string | null>;
262
+ currentUser: Ref<ChatUserProfile | null>;
263
+ conversations: Ref<ChatConversationItem[]>;
264
+ messages: Ref<ChatMessageItem[]>;
265
+ threadMessages: Ref<ChatMessageItem[]>;
266
+ scheduledMessages: Ref<ChatMessageItem[]>;
267
+ hasOlderMessages: Ref<boolean>;
268
+ hasOlderThreadMessages: Ref<boolean>;
269
+ pendingQueueCount: ComputedRef<number>;
270
+ activeConversationId: Ref<string | null>;
271
+ activeConversation: ComputedRef<ChatConversationItem | null>;
272
+ activeThreadParentMessage: Ref<ChatMessageItem | null>;
273
+ replyToMessage: Ref<ChatMessageItem | null>;
274
+ editingMessage: Ref<ChatMessageItem | null>;
275
+ init: () => Promise<void>;
276
+ connectRealtime: () => Promise<void>;
277
+ disconnectRealtime: () => Promise<void>;
278
+ login: (accessToken: string) => Promise<void>;
279
+ logout: () => Promise<void>;
280
+ fetchConversations: () => Promise<void>;
281
+ selectConversation: (conversationId: string) => Promise<void>;
282
+ sendTextMessage: (text: string, options?: MessageSendOptions) => Promise<void>;
283
+ sendAttachmentMessage: (input: AttachmentUploadInput, options?: MessageSendOptions) => Promise<void>;
284
+ sendPollMessage: (input: PollComposerInput, options?: MessageSendOptions) => Promise<void>;
285
+ fetchScheduledMessages: (originalChatUid?: string) => Promise<void>;
286
+ loadOlderMessages: () => Promise<boolean>;
287
+ loadOlderThreadMessages: () => Promise<boolean>;
288
+ ensureMessageLoaded: (messageId: string) => Promise<boolean>;
289
+ scheduleMessage: (input: ScheduleMessageInput, options?: MessageSendOptions) => Promise<void>;
290
+ rescheduleMessage: (input: RescheduleMessageInput) => Promise<void>;
291
+ setReplyToMessage: (message: ChatMessageItem | null) => void;
292
+ setEditingMessage: (message: ChatMessageItem | null) => void;
293
+ openThread: (message: ChatMessageItem) => Promise<void>;
294
+ closeThread: () => void;
295
+ fetchMessageReceipts: (message: ChatMessageItem) => Promise<ChatMessageReceiptItem[]>;
296
+ deleteMessage: (message: ChatMessageItem) => Promise<void>;
297
+ votePoll: (message: ChatMessageItem, optionId: string) => Promise<void>;
298
+ toggleReaction: (message: ChatMessageItem, emoji: string) => Promise<void>;
299
+ translateMessage: (message: ChatMessageItem) => Promise<void>;
300
+ }
301
+ export type { Environment };