@bcc-code/vue-bcc-chat-ui 7.0.1 → 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.
- package/dist/App.vue.d.ts +2 -0
- package/dist/FixtureApp.vue.d.ts +2 -0
- package/dist/auth.d.ts +2 -0
- package/dist/chat/accessToken.d.ts +11 -0
- package/dist/chat/avatar.d.ts +3 -0
- package/dist/chat/cacheScope.d.ts +13 -0
- package/dist/chat/client.d.ts +7 -0
- package/dist/chat/conversationState.d.ts +11 -0
- package/dist/chat/data.d.ts +15 -0
- package/dist/chat/environment.d.ts +8 -0
- package/dist/chat/i18n/en.d.ts +118 -0
- package/dist/chat/i18n/nb.d.ts +118 -0
- package/dist/chat/i18n/types.d.ts +2 -0
- package/dist/chat/index.d.ts +94 -0
- package/dist/chat/localization.d.ts +15 -0
- package/dist/chat/messageText.d.ts +13 -0
- package/dist/chat/mockClient.d.ts +13 -0
- package/dist/chat/offlineStore.d.ts +53 -0
- package/dist/chat/reactions.d.ts +8 -0
- package/dist/chat/richText.d.ts +5 -0
- package/dist/chat/theme.d.ts +18 -0
- package/dist/chat/types.d.ts +301 -0
- package/dist/components/chat/BccChat.vue.d.ts +509 -0
- package/dist/components/chat/ChatStatusOverlay.vue.d.ts +33 -0
- package/dist/components/chat/publicContract.d.ts +43 -0
- package/dist/components/conversations/ConversationList.vue.d.ts +15 -0
- package/dist/components/conversations/UserProfileCard.vue.d.ts +8 -0
- package/dist/components/messages/ActionMessageRow.vue.d.ts +5 -0
- package/dist/components/messages/ComposerActionsPopover.vue.d.ts +19 -0
- package/dist/components/messages/ComposerContextBanner.vue.d.ts +13 -0
- package/dist/components/messages/ComposerFormatMenu.vue.d.ts +13 -0
- package/dist/components/messages/ComposerPollDialog.vue.d.ts +16 -0
- package/dist/components/messages/ComposerScheduleDialog.vue.d.ts +20 -0
- package/dist/components/messages/ConversationComposer.vue.d.ts +106 -0
- package/dist/components/messages/LinkPreviewCard.vue.d.ts +6 -0
- package/dist/components/messages/LinkifiedText.vue.d.ts +8 -0
- package/dist/components/messages/MessageAttachmentList.vue.d.ts +10 -0
- package/dist/components/messages/MessageComposer.vue.d.ts +69 -0
- package/dist/components/messages/MessageDeliveryStatus.vue.d.ts +6 -0
- package/dist/components/messages/MessageItem.vue.d.ts +27 -0
- package/dist/components/messages/MessageItemHeader.vue.d.ts +6 -0
- package/dist/components/messages/MessageItemMenu.vue.d.ts +26 -0
- package/dist/components/messages/MessageItemMenuReactions.vue.d.ts +11 -0
- package/dist/components/messages/MessageItemReactions.vue.d.ts +14 -0
- package/dist/components/messages/MessageList.vue.d.ts +115 -0
- package/dist/components/messages/MessageListHeader.vue.d.ts +7 -0
- package/dist/components/messages/MessagePollContent.vue.d.ts +12 -0
- package/dist/components/messages/MessageReactionList.vue.d.ts +12 -0
- package/dist/components/messages/MessageReplyQuote.vue.d.ts +10 -0
- package/dist/components/messages/MessageTextContent.vue.d.ts +6 -0
- package/dist/components/overlays/FullscreenDialog.vue.d.ts +34 -0
- package/dist/components/overlays/MediaViewerDialog.vue.d.ts +13 -0
- package/dist/components/overlays/MessageInfoDialog.vue.d.ts +14 -0
- package/dist/components/overlays/ReceiptSection.vue.d.ts +9 -0
- package/dist/components/overlays/ScheduledMessagesDialog.vue.d.ts +25 -0
- package/dist/composables/chat/index.d.ts +13 -0
- package/dist/composables/chat/useComposerContext.d.ts +43 -0
- package/dist/composables/chat/useConversationContext.d.ts +30 -0
- package/dist/composables/chat/useDialogsContext.d.ts +27 -0
- package/dist/composables/chat/useMessagesContext.d.ts +36 -0
- package/dist/composables/useChatActions.d.ts +21 -0
- package/dist/composables/useChatEventBus.d.ts +91 -0
- package/dist/composables/useComposerDrafts.d.ts +44 -0
- package/dist/composables/useConversationComposer.d.ts +15 -0
- package/dist/composables/useGroupMemberTracking.d.ts +28 -0
- package/dist/composables/useImageZoom.d.ts +26 -0
- package/dist/composables/useMessageActionMenu.d.ts +202 -0
- package/dist/composables/useMessageInfoDialog.d.ts +165 -0
- package/dist/composables/useMessageListScroll.d.ts +30 -0
- package/dist/composables/useMessageNavigation.d.ts +18 -0
- package/dist/composables/useRichTextComposer.d.ts +31 -0
- package/dist/demo/ApiExamplesPanel.vue.d.ts +6 -0
- package/dist/demo/ChatShell.vue.d.ts +10 -0
- package/dist/demo/ThemeModeToggle.vue.d.ts +12 -0
- package/dist/demo/useDemoThemeMode.d.ts +6 -0
- package/dist/design.d.ts +10 -0
- package/dist/index.d.ts +11 -0
- package/dist/main.d.ts +0 -0
- package/dist/style.css +1 -0
- package/dist/vue-bcc-chat-ui.js +10564 -0
- package/dist/vue-bcc-chat-ui.js.map +1 -0
- package/package.json +1 -1
- package/dist/assets/index-B_y7vs2y.js +0 -12519
- package/dist/assets/index-uEhSMl7W.css +0 -1
- package/dist/assets/primeicons-C6QP2o4f.woff2 +0 -0
- package/dist/assets/primeicons-DMOk5skT.eot +0 -0
- package/dist/assets/primeicons-Dr5RGzOO.svg +0 -345
- package/dist/assets/primeicons-MpK4pl85.ttf +0 -0
- package/dist/assets/primeicons-WjwUDZjB.woff +0 -0
- package/dist/assets/web-Cp3vw--c.js +0 -1
- package/dist/assets/web-DSc1BjG7.js +0 -1
- package/dist/index.html +0 -13
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface StoredCometChatToken {
|
|
2
|
+
sub: string;
|
|
3
|
+
token: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function getAccessToken(): string | null;
|
|
6
|
+
export declare function storeAccessToken(token: string | null): void;
|
|
7
|
+
export declare function getAccessTokenSubject(accessToken?: string | null): any;
|
|
8
|
+
export declare function getStoredCometChatToken(): StoredCometChatToken | null;
|
|
9
|
+
export declare function retrieveCcToken(): StoredCometChatToken | null;
|
|
10
|
+
export declare function storeCometChatToken(token: StoredCometChatToken): void;
|
|
11
|
+
export declare function clearCometChatToken(): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function getChatCacheScope(): string | null;
|
|
2
|
+
export declare function getChatCacheOwner(): string | null;
|
|
3
|
+
/**
|
|
4
|
+
* Ensures a cache scope exists for the given owner. Reuses the current scope
|
|
5
|
+
* when the owner has not changed; rotates it otherwise.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureChatCacheScope(ownerId: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Clears the in-memory mirrors so the next read re-fetches from localStorage.
|
|
10
|
+
* Only needed in tests where localStorage is cleared between runs without
|
|
11
|
+
* reloading the module.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resetCacheScopeForTesting(): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChatConversationItem, MessageSendOptions } from './types';
|
|
2
|
+
export declare function isConversationChannel(conversation?: Pick<ChatConversationItem, "source"> | null): boolean;
|
|
3
|
+
export declare function hasJoinedConversation(conversation?: Pick<ChatConversationItem, "source"> | null): any;
|
|
4
|
+
export declare function getConversationScope(conversation?: Pick<ChatConversationItem, "source"> | null): string | undefined;
|
|
5
|
+
export declare function isConversationReadOnly(conversation?: Pick<ChatConversationItem, "source"> | null): boolean;
|
|
6
|
+
export declare function canUseConversationMessageActions(conversation?: Pick<ChatConversationItem, "source"> | null): any;
|
|
7
|
+
export declare function canReactInConversation(conversation?: Pick<ChatConversationItem, "source"> | null): any;
|
|
8
|
+
export declare function canReplyInConversation(conversation?: Pick<ChatConversationItem, "source"> | null): any;
|
|
9
|
+
export declare function canOpenThreadInConversation(conversation?: Pick<ChatConversationItem, "source"> | null): boolean;
|
|
10
|
+
export declare function canShowConversationAvatars(conversation?: Pick<ChatConversationItem, "source" | "type"> | null): any;
|
|
11
|
+
export declare function getConversationSendOptions(conversation: Pick<ChatConversationItem, "source"> | null | undefined, senderDisplayName?: string): MessageSendOptions | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CachedParticipantSettings, ChatConversationItem, ParticipantInfo, PersonSettings, SearchedItems } from './types';
|
|
2
|
+
export declare function getSenderDisplayName(message: any, group?: {
|
|
3
|
+
value?: any;
|
|
4
|
+
}): any;
|
|
5
|
+
export declare function searchChat(searchQuery: string, limit?: number, currentUserId?: string | null): SearchedItems | undefined;
|
|
6
|
+
export declare function getGroupMembersInfo(groupUid: string): Promise<ParticipantInfo[]>;
|
|
7
|
+
export declare function getMutedUntil(chatUid: string): Promise<string | null>;
|
|
8
|
+
export declare function muteChat(chatUid: string, mutedUntil: string | null): Promise<string | null>;
|
|
9
|
+
export declare function getMyChatSettings(): Promise<PersonSettings>;
|
|
10
|
+
export declare function updateMyChatSettings(settings: Partial<PersonSettings>): Promise<PersonSettings>;
|
|
11
|
+
export declare function setMuteAll(mute: boolean): Promise<boolean>;
|
|
12
|
+
export declare function toggleMuteAll(): Promise<boolean>;
|
|
13
|
+
export declare function getCachedParticipantSettings(chatUid: string): CachedParticipantSettings | null;
|
|
14
|
+
export declare function cacheParticipantSettings(settings: CachedParticipantSettings): void;
|
|
15
|
+
export declare function applyMuteSettingToConversations(conversations: ChatConversationItem[], chatUid: string, mutedUntil: string | null): ChatConversationItem[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type Environment = "prod" | "sandbox";
|
|
2
|
+
export interface ChatEnvironmentConfig {
|
|
3
|
+
region: string;
|
|
4
|
+
appId: string;
|
|
5
|
+
chatApiBaseUrl: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function setCurrentEnvironment(environment: Environment): void;
|
|
8
|
+
export declare function getCurrentEnvironment(): ChatEnvironmentConfig;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { TranslationParams } from './types';
|
|
2
|
+
export declare const englishTranslations: {
|
|
3
|
+
readonly addOption: "Add option";
|
|
4
|
+
readonly addToMessage: "Add to message";
|
|
5
|
+
readonly allowMultipleAnswers: "Allow multiple answers";
|
|
6
|
+
readonly attachAudio: "Attach audio";
|
|
7
|
+
readonly attachFile: "Attach file";
|
|
8
|
+
readonly attachImage: "Attach image";
|
|
9
|
+
readonly attachVideo: "Attach video";
|
|
10
|
+
readonly attachment: "Attachment";
|
|
11
|
+
readonly attachmentSummary: ({ name }: TranslationParams) => string;
|
|
12
|
+
readonly audio: "Audio";
|
|
13
|
+
readonly audioMessage: "Audio message";
|
|
14
|
+
readonly bold: "Bold";
|
|
15
|
+
readonly cancel: "Cancel";
|
|
16
|
+
readonly chatNotFound: "Chat not found...";
|
|
17
|
+
readonly close: "Close";
|
|
18
|
+
readonly closeMediaViewer: "Close media viewer";
|
|
19
|
+
readonly closeThread: "Close thread";
|
|
20
|
+
readonly connecting: "Connecting...";
|
|
21
|
+
readonly copyText: "Copy text";
|
|
22
|
+
readonly copied: "Copied";
|
|
23
|
+
readonly createPoll: "Create poll";
|
|
24
|
+
readonly createPollTitle: "Create poll";
|
|
25
|
+
readonly currentDraftWillBeScheduled: "Current draft will be scheduled.";
|
|
26
|
+
readonly delete: "Delete";
|
|
27
|
+
readonly delivered: "Delivered";
|
|
28
|
+
readonly deliveredNotYetRead: "Delivered, not yet read";
|
|
29
|
+
readonly deliveredToAll: "Delivered to all";
|
|
30
|
+
readonly deliveryAndReadDetails: "Delivery and read details";
|
|
31
|
+
readonly edit: "Edit";
|
|
32
|
+
readonly edited: "edited";
|
|
33
|
+
readonly editing: "Editing";
|
|
34
|
+
readonly editingInContext: ({ context }: TranslationParams) => string;
|
|
35
|
+
readonly failed: "Failed";
|
|
36
|
+
readonly file: "File";
|
|
37
|
+
readonly groupChat: "Group chat";
|
|
38
|
+
readonly hiddenHelperConversation: "Hidden helper conversation";
|
|
39
|
+
readonly image: "Image";
|
|
40
|
+
readonly info: "Info";
|
|
41
|
+
readonly italic: "Italic";
|
|
42
|
+
readonly loadMessageReceiptsError: "Unable to load message receipts.";
|
|
43
|
+
readonly loadScheduledMessagesError: "Unable to load scheduled messages.";
|
|
44
|
+
readonly loadOlderMessages: "Load older messages";
|
|
45
|
+
readonly loadingOlderMessages: "Loading older messages";
|
|
46
|
+
readonly loadingChat: "Loading chat...";
|
|
47
|
+
readonly loadingPreview: "Loading preview...";
|
|
48
|
+
readonly members: ({ count }: TranslationParams) => string;
|
|
49
|
+
readonly message: "Message";
|
|
50
|
+
readonly messageInfo: "Message info";
|
|
51
|
+
readonly messages: "Messages";
|
|
52
|
+
readonly multipleAnswersAllowed: "multiple answers allowed";
|
|
53
|
+
readonly noMatchingChatsFound: "No matching chats found.";
|
|
54
|
+
readonly noMessagesHaveBeenSentYet: "No messages have been sent yet";
|
|
55
|
+
readonly noMessagesYetInThisGroup: "No messages yet in this group.";
|
|
56
|
+
readonly noRecipientsDeliveredStageYet: "No recipients are only at the delivered stage yet.";
|
|
57
|
+
readonly noScheduledMessagesForConversation: "No scheduled messages for this conversation.";
|
|
58
|
+
readonly nobodyHasReadThisMessageYet: "Nobody has read this message yet.";
|
|
59
|
+
readonly notYet: "Not yet";
|
|
60
|
+
readonly offline: "Offline";
|
|
61
|
+
readonly offlineQueued: ({ count }: TranslationParams) => string;
|
|
62
|
+
readonly openInNewTab: "Open in new tab";
|
|
63
|
+
readonly openVideoViewer: "Open video viewer";
|
|
64
|
+
readonly option: ({ index }: TranslationParams) => string;
|
|
65
|
+
readonly options: "Options";
|
|
66
|
+
readonly photo: "Photo";
|
|
67
|
+
readonly poll: "Poll";
|
|
68
|
+
readonly pollPrefix: ({ question }: TranslationParams) => string;
|
|
69
|
+
readonly pollQuestionPlaceholder: "What should we prioritize next?";
|
|
70
|
+
readonly question: "Question";
|
|
71
|
+
readonly queued: "Queued";
|
|
72
|
+
readonly queuedForConversation: ({ title }: TranslationParams) => string;
|
|
73
|
+
readonly queuedOutgoingMessagesForThisChat: "Queued outgoing messages for this chat";
|
|
74
|
+
readonly read: "Read";
|
|
75
|
+
readonly readBy: "Read by";
|
|
76
|
+
readonly readByAll: "Read by all";
|
|
77
|
+
readonly readOnlyChannel: "This channel is read-only.";
|
|
78
|
+
readonly realtimeOn: "Realtime on";
|
|
79
|
+
readonly recentConversations: "Recent conversations";
|
|
80
|
+
readonly refreshingMessages: "Refreshing messages";
|
|
81
|
+
readonly repliesDisabledInChannels: "Replies are disabled in channels.";
|
|
82
|
+
readonly reply: "Reply";
|
|
83
|
+
readonly replying: "Replying";
|
|
84
|
+
readonly replyingInContext: ({ context }: TranslationParams) => string;
|
|
85
|
+
readonly reschedule: "Reschedule";
|
|
86
|
+
readonly save: "Save";
|
|
87
|
+
readonly saveMessage: "Save message";
|
|
88
|
+
readonly schedule: "Schedule";
|
|
89
|
+
readonly scheduled: "Scheduled";
|
|
90
|
+
readonly scheduledDateLabel: ({ date }: TranslationParams) => string;
|
|
91
|
+
readonly scheduledMessages: "Scheduled messages";
|
|
92
|
+
readonly scheduleMessage: "Schedule message";
|
|
93
|
+
readonly searchByGroupName: "Search by group name";
|
|
94
|
+
readonly selectConversationToStart: "Select a conversation to start reading and sending messages.";
|
|
95
|
+
readonly sendAt: "Send at";
|
|
96
|
+
readonly sendAttachment: "Send attachment";
|
|
97
|
+
readonly sendMessage: "Send message";
|
|
98
|
+
readonly sending: "Sending";
|
|
99
|
+
readonly sendPoll: "Send poll";
|
|
100
|
+
readonly sent: "Sent";
|
|
101
|
+
readonly sentAnAttachment: "Sent an attachment";
|
|
102
|
+
readonly signedInToSandbox: "Signed in to BCC Sandbox";
|
|
103
|
+
readonly someRecipients: "Some recipients";
|
|
104
|
+
readonly system: "System";
|
|
105
|
+
readonly thread: "Thread";
|
|
106
|
+
readonly threadReplies: ({ count }: TranslationParams) => string;
|
|
107
|
+
readonly threadWithCount: ({ count }: TranslationParams) => string;
|
|
108
|
+
readonly translate: "Translate";
|
|
109
|
+
readonly underline: "Underline";
|
|
110
|
+
readonly unsupportedMessageType: "Unsupported message type";
|
|
111
|
+
readonly unscheduled: "Unscheduled";
|
|
112
|
+
readonly video: "Video";
|
|
113
|
+
readonly voteCount: ({ count }: TranslationParams) => string;
|
|
114
|
+
readonly waitingForNetwork: "Waiting for network...";
|
|
115
|
+
readonly writeMessage: "Write a message...";
|
|
116
|
+
readonly you: "You";
|
|
117
|
+
readonly youSentAMessage: "You sent a message";
|
|
118
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { TranslationParams } from './types';
|
|
2
|
+
export declare const norwegianTranslations: {
|
|
3
|
+
readonly addOption: "Legg til alternativ";
|
|
4
|
+
readonly addToMessage: "Legg til i melding";
|
|
5
|
+
readonly allowMultipleAnswers: "Tillat flere svar";
|
|
6
|
+
readonly attachAudio: "Legg ved lyd";
|
|
7
|
+
readonly attachFile: "Legg ved fil";
|
|
8
|
+
readonly attachImage: "Legg ved bilde";
|
|
9
|
+
readonly attachVideo: "Legg ved video";
|
|
10
|
+
readonly attachment: "Vedlegg";
|
|
11
|
+
readonly attachmentSummary: ({ name }: TranslationParams) => string;
|
|
12
|
+
readonly audio: "Lyd";
|
|
13
|
+
readonly audioMessage: "Lydmelding";
|
|
14
|
+
readonly bold: "Fet";
|
|
15
|
+
readonly cancel: "Avbryt";
|
|
16
|
+
readonly chatNotFound: "Fant ikke chatten...";
|
|
17
|
+
readonly close: "Lukk";
|
|
18
|
+
readonly closeMediaViewer: "Lukk medievisning";
|
|
19
|
+
readonly closeThread: "Lukk tråd";
|
|
20
|
+
readonly connecting: "Kobler til...";
|
|
21
|
+
readonly copyText: "Kopier tekst";
|
|
22
|
+
readonly copied: "Kopiert";
|
|
23
|
+
readonly createPoll: "Opprett avstemning";
|
|
24
|
+
readonly createPollTitle: "Opprett avstemning";
|
|
25
|
+
readonly currentDraftWillBeScheduled: "Gjeldende utkast blir planlagt.";
|
|
26
|
+
readonly delete: "Slett";
|
|
27
|
+
readonly delivered: "Levert";
|
|
28
|
+
readonly deliveredNotYetRead: "Levert, ikke lest ennå";
|
|
29
|
+
readonly deliveredToAll: "Levert til alle";
|
|
30
|
+
readonly deliveryAndReadDetails: "Leverings- og lesedetaljer";
|
|
31
|
+
readonly edit: "Rediger";
|
|
32
|
+
readonly edited: "redigert";
|
|
33
|
+
readonly editing: "Redigerer";
|
|
34
|
+
readonly editingInContext: ({ context }: TranslationParams) => string;
|
|
35
|
+
readonly failed: "Mislyktes";
|
|
36
|
+
readonly file: "Fil";
|
|
37
|
+
readonly groupChat: "Gruppechat";
|
|
38
|
+
readonly hiddenHelperConversation: "Skjult hjelpesamtale";
|
|
39
|
+
readonly image: "Bilde";
|
|
40
|
+
readonly info: "Info";
|
|
41
|
+
readonly italic: "Kursiv";
|
|
42
|
+
readonly loadMessageReceiptsError: "Kunne ikke laste meldingskvitteringer.";
|
|
43
|
+
readonly loadScheduledMessagesError: "Kunne ikke laste planlagte meldinger.";
|
|
44
|
+
readonly loadOlderMessages: "Last eldre meldinger";
|
|
45
|
+
readonly loadingOlderMessages: "Laster eldre meldinger";
|
|
46
|
+
readonly loadingChat: "Laster chat...";
|
|
47
|
+
readonly loadingPreview: "Laster forhåndsvisning...";
|
|
48
|
+
readonly members: ({ count }: TranslationParams) => string;
|
|
49
|
+
readonly message: "Melding";
|
|
50
|
+
readonly messageInfo: "Meldingsinfo";
|
|
51
|
+
readonly messages: "Meldinger";
|
|
52
|
+
readonly multipleAnswersAllowed: "flere svar tillatt";
|
|
53
|
+
readonly noMatchingChatsFound: "Fant ingen samsvarende chatter.";
|
|
54
|
+
readonly noMessagesHaveBeenSentYet: "Ingen meldinger har blitt sendt ennå";
|
|
55
|
+
readonly noMessagesYetInThisGroup: "Ingen meldinger i denne gruppen ennå.";
|
|
56
|
+
readonly noRecipientsDeliveredStageYet: "Ingen mottakere er bare på levert-stadiet ennå.";
|
|
57
|
+
readonly noScheduledMessagesForConversation: "Ingen planlagte meldinger for denne samtalen.";
|
|
58
|
+
readonly nobodyHasReadThisMessageYet: "Ingen har lest denne meldingen ennå.";
|
|
59
|
+
readonly notYet: "Ikke ennå";
|
|
60
|
+
readonly offline: "Frakoblet";
|
|
61
|
+
readonly offlineQueued: ({ count }: TranslationParams) => string;
|
|
62
|
+
readonly openInNewTab: "Åpne i ny fane";
|
|
63
|
+
readonly openVideoViewer: "Åpne videovisning";
|
|
64
|
+
readonly option: ({ index }: TranslationParams) => string;
|
|
65
|
+
readonly options: "Alternativer";
|
|
66
|
+
readonly photo: "Bilde";
|
|
67
|
+
readonly poll: "Avstemning";
|
|
68
|
+
readonly pollPrefix: ({ question }: TranslationParams) => string;
|
|
69
|
+
readonly pollQuestionPlaceholder: "Hva bør vi prioritere videre?";
|
|
70
|
+
readonly question: "Spørsmål";
|
|
71
|
+
readonly queued: "I kø";
|
|
72
|
+
readonly queuedForConversation: ({ title }: TranslationParams) => string;
|
|
73
|
+
readonly queuedOutgoingMessagesForThisChat: "Utgående meldinger i kø for denne chatten";
|
|
74
|
+
readonly read: "Lest";
|
|
75
|
+
readonly readBy: "Lest av";
|
|
76
|
+
readonly readByAll: "Lest av alle";
|
|
77
|
+
readonly readOnlyChannel: "Denne kanalen er skrivebeskyttet.";
|
|
78
|
+
readonly realtimeOn: "Sanntid på";
|
|
79
|
+
readonly recentConversations: "Nylige samtaler";
|
|
80
|
+
readonly refreshingMessages: "Oppdaterer meldinger";
|
|
81
|
+
readonly repliesDisabledInChannels: "Svar er deaktivert i kanaler.";
|
|
82
|
+
readonly reply: "Svar";
|
|
83
|
+
readonly replying: "Svarer";
|
|
84
|
+
readonly replyingInContext: ({ context }: TranslationParams) => string;
|
|
85
|
+
readonly reschedule: "Planlegg på nytt";
|
|
86
|
+
readonly save: "Lagre";
|
|
87
|
+
readonly saveMessage: "Lagre melding";
|
|
88
|
+
readonly schedule: "Planlegg";
|
|
89
|
+
readonly scheduled: "Planlagt";
|
|
90
|
+
readonly scheduledDateLabel: ({ date }: TranslationParams) => string;
|
|
91
|
+
readonly scheduledMessages: "Planlagte meldinger";
|
|
92
|
+
readonly scheduleMessage: "Planlegg melding";
|
|
93
|
+
readonly searchByGroupName: "Søk etter gruppenavn";
|
|
94
|
+
readonly selectConversationToStart: "Velg en samtale for å begynne å lese og sende meldinger.";
|
|
95
|
+
readonly sendAt: "Send kl.";
|
|
96
|
+
readonly sendAttachment: "Send vedlegg";
|
|
97
|
+
readonly sendMessage: "Send melding";
|
|
98
|
+
readonly sending: "Sender";
|
|
99
|
+
readonly sendPoll: "Send avstemning";
|
|
100
|
+
readonly sent: "Sendt";
|
|
101
|
+
readonly sentAnAttachment: "Sendte et vedlegg";
|
|
102
|
+
readonly signedInToSandbox: "Logget inn i BCC Sandbox";
|
|
103
|
+
readonly someRecipients: "Noen mottakere";
|
|
104
|
+
readonly system: "System";
|
|
105
|
+
readonly thread: "Tråd";
|
|
106
|
+
readonly threadReplies: ({ count }: TranslationParams) => string;
|
|
107
|
+
readonly threadWithCount: ({ count }: TranslationParams) => string;
|
|
108
|
+
readonly translate: "Oversett";
|
|
109
|
+
readonly underline: "Understrek";
|
|
110
|
+
readonly unsupportedMessageType: "Meldingstype støttes ikke";
|
|
111
|
+
readonly unscheduled: "Ikke planlagt";
|
|
112
|
+
readonly video: "Video";
|
|
113
|
+
readonly voteCount: ({ count }: TranslationParams) => string;
|
|
114
|
+
readonly waitingForNetwork: "Venter på nettverk...";
|
|
115
|
+
readonly writeMessage: "Skriv en melding...";
|
|
116
|
+
readonly you: "Du";
|
|
117
|
+
readonly youSentAMessage: "Du sendte en melding";
|
|
118
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { retrieveCcToken } from './accessToken';
|
|
3
|
+
import { proxyImage } from './avatar';
|
|
4
|
+
import { getGroupMembersInfo as getGroupMembersInfoCompat, getMyChatSettings, getSenderDisplayName, setMuteAll, toggleMuteAll, updateMyChatSettings } from './data';
|
|
5
|
+
import { getCurrentEnvironment, Environment } from './environment';
|
|
6
|
+
import { getMessageTextPreview } from './messageText';
|
|
7
|
+
import { toMarkdownHtml } from './richText';
|
|
8
|
+
import { ChatClient, ChatInstallOptions, Language, OnlineStatus, ThemeMode, UserChatInfo } from './types';
|
|
9
|
+
declare const chatClient: import('vue').ShallowRef<ChatClient | null, ChatClient | null>;
|
|
10
|
+
declare function install(app: App, options: ChatInstallOptions): Promise<void>;
|
|
11
|
+
declare function login(accessToken?: string): Promise<void>;
|
|
12
|
+
declare function logout(): Promise<void>;
|
|
13
|
+
declare function connect(connectionName?: string): Promise<void>;
|
|
14
|
+
declare function disconnect(connectionName?: string): Promise<void>;
|
|
15
|
+
declare function disconnectAll(): Promise<void>;
|
|
16
|
+
declare function updateGetGroupMessages(groupMessageGetter: ((guid: string, query: string) => Promise<unknown>) | undefined): void;
|
|
17
|
+
declare function setLanguage(language: Language): void;
|
|
18
|
+
declare function setThemeMode(mode: ThemeMode): void;
|
|
19
|
+
declare function setAccessToken(token: string): Promise<void>;
|
|
20
|
+
declare function setEnvironment(environment: Environment): void;
|
|
21
|
+
declare function getGroup(groupUid: string): Promise<import('@cometchat/chat-sdk-javascript').Group | null | undefined>;
|
|
22
|
+
declare function getUserChats(): Promise<UserChatInfo[]>;
|
|
23
|
+
declare function clearGroupChatCount(groupUid: string): Promise<void>;
|
|
24
|
+
declare function getOnlineGroupMemberCount(groupUid: string): Promise<number>;
|
|
25
|
+
declare function muteChat(chatUid: string, mutedUntil: string | null): Promise<string | null>;
|
|
26
|
+
declare function getMutedUntil(chatUid: string): Promise<string | null>;
|
|
27
|
+
declare function scrollToMessage(messageId: string): void;
|
|
28
|
+
export { chatClient };
|
|
29
|
+
declare const chat: {
|
|
30
|
+
install: typeof install;
|
|
31
|
+
updateGetGroupMessages: typeof updateGetGroupMessages;
|
|
32
|
+
initialized: import('vue').Ref<boolean, boolean>;
|
|
33
|
+
connected: import('vue').ComputedRef<boolean>;
|
|
34
|
+
connecting: import('vue').ComputedRef<boolean>;
|
|
35
|
+
loggedIn: import('vue').ComputedRef<boolean>;
|
|
36
|
+
userChats: import('vue').ComputedRef<UserChatInfo[]>;
|
|
37
|
+
connect: typeof connect;
|
|
38
|
+
disconnect: typeof disconnect;
|
|
39
|
+
disconnectAll: typeof disconnectAll;
|
|
40
|
+
setAccessToken: typeof setAccessToken;
|
|
41
|
+
login: typeof login;
|
|
42
|
+
logout: typeof logout;
|
|
43
|
+
setCurrentEnvironment: typeof setEnvironment;
|
|
44
|
+
getCurrentEnvironment: typeof getCurrentEnvironment;
|
|
45
|
+
setThemeMode: typeof setThemeMode;
|
|
46
|
+
setLanguage: typeof setLanguage;
|
|
47
|
+
getGroup: typeof getGroup;
|
|
48
|
+
getGroupMembersInfo: typeof getGroupMembersInfoCompat;
|
|
49
|
+
getUserChats: typeof getUserChats;
|
|
50
|
+
clearGroupChatCount: typeof clearGroupChatCount;
|
|
51
|
+
getOnlineGroupMemberCount: typeof getOnlineGroupMemberCount;
|
|
52
|
+
getGroupOnlineCount: typeof getOnlineGroupMemberCount;
|
|
53
|
+
searchChat: (searchQuery: string, limit?: number) => import('./types').SearchedItems | undefined;
|
|
54
|
+
getSenderDisplayName: typeof getSenderDisplayName;
|
|
55
|
+
getMessageTextPreview: typeof getMessageTextPreview;
|
|
56
|
+
proxyImage: typeof proxyImage;
|
|
57
|
+
getMutedUntil: typeof getMutedUntil;
|
|
58
|
+
muteChat: typeof muteChat;
|
|
59
|
+
getMyChatSettings: typeof getMyChatSettings;
|
|
60
|
+
updateMyChatSettings: typeof updateMyChatSettings;
|
|
61
|
+
setMuteAll: typeof setMuteAll;
|
|
62
|
+
toggleMuteAll: typeof toggleMuteAll;
|
|
63
|
+
toMarkdownHtml: typeof toMarkdownHtml;
|
|
64
|
+
retrieveCcToken: typeof retrieveCcToken;
|
|
65
|
+
getGroupMessages: import('vue').Ref<((guid: string, query: string) => Promise<unknown>) | undefined, ((guid: string, query: string) => Promise<unknown>) | undefined>;
|
|
66
|
+
loadMessageId: import('vue').Ref<string | undefined, string | undefined>;
|
|
67
|
+
scrollToMessageId: import('vue').Ref<string | undefined, string | undefined>;
|
|
68
|
+
scrollToMessage: typeof scrollToMessage;
|
|
69
|
+
connectivity: {
|
|
70
|
+
onlineMode: import('vue').WritableComputedRef<OnlineStatus, OnlineStatus>;
|
|
71
|
+
onlineStatus: import('vue').ComputedRef<OnlineStatus>;
|
|
72
|
+
};
|
|
73
|
+
onlineMode: import('vue').WritableComputedRef<OnlineStatus, OnlineStatus>;
|
|
74
|
+
onlineStatus: import('vue').ComputedRef<OnlineStatus>;
|
|
75
|
+
theme: import('vue').Ref<{
|
|
76
|
+
palette: {
|
|
77
|
+
mode: ThemeMode;
|
|
78
|
+
setMode: (mode: ThemeMode) => void;
|
|
79
|
+
};
|
|
80
|
+
}, {
|
|
81
|
+
palette: {
|
|
82
|
+
mode: ThemeMode;
|
|
83
|
+
setMode(mode: ThemeMode): void;
|
|
84
|
+
};
|
|
85
|
+
} | {
|
|
86
|
+
palette: {
|
|
87
|
+
mode: ThemeMode;
|
|
88
|
+
setMode: (mode: ThemeMode) => void;
|
|
89
|
+
};
|
|
90
|
+
}>;
|
|
91
|
+
themeMode: import('vue').Ref<ThemeMode, ThemeMode>;
|
|
92
|
+
language: import('vue').Ref<Language, Language>;
|
|
93
|
+
};
|
|
94
|
+
export default chat;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { englishTranslations } from './i18n/en';
|
|
3
|
+
import { TranslationEntry, TranslationParams } from './i18n/types';
|
|
4
|
+
import { Language } from './types';
|
|
5
|
+
type TranslationDictionary = Record<keyof typeof englishTranslations, TranslationEntry>;
|
|
6
|
+
export type TranslationKey = keyof TranslationDictionary;
|
|
7
|
+
export declare const currentChatLanguage: import('vue').Ref<Language, Language>;
|
|
8
|
+
export declare function resolveChatLocale(language?: Language | null): "nb-NO" | "en-US";
|
|
9
|
+
export declare function setCurrentChatLanguage(language: Language): void;
|
|
10
|
+
export declare function translateChat(key: TranslationKey, params?: TranslationParams, language?: Language | null): string;
|
|
11
|
+
export declare function useChatI18n(language?: MaybeRefOrGetter<Language | undefined | null>): {
|
|
12
|
+
locale: import('vue').ComputedRef<"nb-NO" | "en-US">;
|
|
13
|
+
t: (key: TranslationKey, params?: TranslationParams) => string;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChatAttachmentItem, ChatMessageItem, ChatReplyPreview } from './types';
|
|
2
|
+
type MessageTextSource = Pick<ChatMessageItem, "text" | "kind" | "poll" | "attachments">;
|
|
3
|
+
export declare function getAttachmentDisplayText(attachments: ReadonlyArray<Pick<ChatAttachmentItem, "kind" | "name">>, fallback?: string): string;
|
|
4
|
+
export declare function normalizeMessageText(value: string | null | undefined): string;
|
|
5
|
+
export declare function hasMessageText(value: string | null | undefined): boolean;
|
|
6
|
+
export declare function getMessagePlainText(value: string | null | undefined): string;
|
|
7
|
+
export declare function getMessageDisplayText(message: MessageTextSource, fallback?: string): string;
|
|
8
|
+
export declare function getMessagePreviewText(message: MessageTextSource): string;
|
|
9
|
+
export declare function getMessageTextPreview(message?: any, showEmoji?: boolean, showAttachmentName?: boolean): string;
|
|
10
|
+
export declare function buildReplyPreview(message: Pick<ChatMessageItem, "id" | "senderName" | "text" | "kind" | "poll" | "attachments">): ChatReplyPreview;
|
|
11
|
+
export declare function buildMessageActionText(message: Pick<ChatMessageItem, "text" | "attachments">): string;
|
|
12
|
+
export declare function buildConversationSubtitle(message: MessageTextSource): string;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChatClient, ChatUserProfile } from './types';
|
|
2
|
+
export type VisualFixtureMode = "desktop" | "mobile" | "empty" | "scheduled";
|
|
3
|
+
export interface MockChatScenario {
|
|
4
|
+
client: ChatClient;
|
|
5
|
+
profile: ChatUserProfile;
|
|
6
|
+
displayName: string;
|
|
7
|
+
email: string;
|
|
8
|
+
heroStatus: {
|
|
9
|
+
label: string;
|
|
10
|
+
severity: "warn" | "success" | "contrast";
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare function createMockChatScenario(mode: VisualFixtureMode): MockChatScenario;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { CachedLastMessage, CachedParticipantSettings, ChatAttachmentItem, ChatConversationItem, ChatMessageItem, PollComposerInput } from './types';
|
|
2
|
+
interface OfflineQueueAttachment {
|
|
3
|
+
kind: ChatAttachmentItem["kind"];
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
size: number;
|
|
7
|
+
caption?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface OfflineQueueItem {
|
|
10
|
+
id: string;
|
|
11
|
+
muid: string;
|
|
12
|
+
conversationId: string;
|
|
13
|
+
targetId: string;
|
|
14
|
+
receiverType: "group" | "user";
|
|
15
|
+
kind: "text" | "poll" | "attachment";
|
|
16
|
+
senderAvatar?: string;
|
|
17
|
+
text?: string;
|
|
18
|
+
poll?: PollComposerInput;
|
|
19
|
+
attachment?: OfflineQueueAttachment;
|
|
20
|
+
metadata?: Record<string, unknown>;
|
|
21
|
+
parentMessageId?: string;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class ChatOfflineStore {
|
|
25
|
+
readonly storageKey: string;
|
|
26
|
+
private attachmentDbPromise;
|
|
27
|
+
constructor(storageKey: string);
|
|
28
|
+
getConversations(): ChatConversationItem[];
|
|
29
|
+
getSearchableConversations(): ChatConversationItem[];
|
|
30
|
+
setConversations(conversations: ChatConversationItem[]): void;
|
|
31
|
+
getMessages(conversationId: string): ChatMessageItem[];
|
|
32
|
+
getAllMessages(): ChatMessageItem[];
|
|
33
|
+
setMessages(conversationId: string, messages: ChatMessageItem[]): void;
|
|
34
|
+
getThreadMessages(parentMessageId: string): ChatMessageItem[];
|
|
35
|
+
setThreadMessages(parentMessageId: string, messages: ChatMessageItem[]): void;
|
|
36
|
+
getQueue(): OfflineQueueItem[];
|
|
37
|
+
enqueue(item: OfflineQueueItem): void;
|
|
38
|
+
dequeue(id: string): void;
|
|
39
|
+
getParticipantSettings(chatUid: string): CachedParticipantSettings | null;
|
|
40
|
+
storeParticipantSettings(settings: CachedParticipantSettings): void;
|
|
41
|
+
getLastMessage(chatUid: string): CachedLastMessage | null;
|
|
42
|
+
storeLastMessage(lastMessage: CachedLastMessage): void;
|
|
43
|
+
clear(): void;
|
|
44
|
+
storeQueuedAttachment(id: string, file: File): Promise<void>;
|
|
45
|
+
getQueuedAttachment(id: string): Promise<File | null>;
|
|
46
|
+
deleteQueuedAttachment(id: string): Promise<void>;
|
|
47
|
+
private read;
|
|
48
|
+
private write;
|
|
49
|
+
private mutate;
|
|
50
|
+
private clearQueuedAttachments;
|
|
51
|
+
private openAttachmentDb;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Emoji reaction sets used across message action menus and reaction pickers.
|
|
3
|
+
*
|
|
4
|
+
* COMMON_REACTIONS are shown first in the compact popover row.
|
|
5
|
+
* EXTENDED_REACTIONS populate the expanded grid when the user opens the full picker.
|
|
6
|
+
*/
|
|
7
|
+
export declare const COMMON_REACTIONS: string[];
|
|
8
|
+
export declare const EXTENDED_REACTIONS: string[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function normalizeRichTextForStorage(input: string | null | undefined): string;
|
|
2
|
+
export declare function getPlainTextFromRichText(input: string | null | undefined): string;
|
|
3
|
+
export declare function renderRichText(input: string | null | undefined): string;
|
|
4
|
+
export declare function toMarkdownHtml(str: string, mentionedUsers?: any[]): string;
|
|
5
|
+
export declare function getFirstUrlFromRichText(input: string | null | undefined): string | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ThemeMode } from './types';
|
|
2
|
+
export declare const theme: import('vue').Ref<{
|
|
3
|
+
palette: {
|
|
4
|
+
mode: ThemeMode;
|
|
5
|
+
setMode: (mode: ThemeMode) => void;
|
|
6
|
+
};
|
|
7
|
+
}, {
|
|
8
|
+
palette: {
|
|
9
|
+
mode: ThemeMode;
|
|
10
|
+
setMode(mode: ThemeMode): void;
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
palette: {
|
|
14
|
+
mode: ThemeMode;
|
|
15
|
+
setMode: (mode: ThemeMode) => void;
|
|
16
|
+
};
|
|
17
|
+
}>;
|
|
18
|
+
export declare function setThemeMode(mode: ThemeMode): void;
|