@connectycube/chat-widget 0.13.0 → 0.14.0
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/README.md +35 -2
- package/dist/index.es.js +8173 -6474
- package/dist/index.umd.js +36 -36
- package/dist/locales/el/translation.json +40 -0
- package/dist/locales/en/translation.json +40 -0
- package/dist/locales/ua/translation.json +40 -0
- package/dist/{AppContainer.d.ts → src/AppContainer.d.ts} +3 -0
- package/dist/{components → src/components}/home/sidebar/sidebar.d.ts +0 -1
- package/dist/{components → src/components}/login.d.ts +1 -0
- package/dist/{connectycube.d.ts → src/connectycube.d.ts} +4 -4
- package/dist/src/i18n.d.ts +2 -0
- package/dist/{redux → src/redux}/slices/app.d.ts +2 -0
- package/dist/{redux → src/redux}/store.d.ts +4 -0
- package/package.json +5 -2
- /package/dist/{App.d.ts → src/App.d.ts} +0 -0
- /package/dist/{components → src/components}/home/home.d.ts +0 -0
- /package/dist/{components → src/components}/home/main/chat-header.d.ts +0 -0
- /package/dist/{components → src/components}/home/main/chat-info.d.ts +0 -0
- /package/dist/{components → src/components}/home/main/chat-input.d.ts +0 -0
- /package/dist/{components → src/components}/home/main/group-member.d.ts +0 -0
- /package/dist/{components → src/components}/home/main/main.d.ts +0 -0
- /package/dist/{components → src/components}/home/main/message.d.ts +0 -0
- /package/dist/{components → src/components}/home/main/quick-actions.d.ts +0 -0
- /package/dist/{components → src/components}/home/sidebar/chat-item.d.ts +0 -0
- /package/dist/{components → src/components}/home/sidebar/chats-list.d.ts +0 -0
- /package/dist/{components → src/components}/home/sidebar/new-chat/create-group-chat/create-group-chat.d.ts +0 -0
- /package/dist/{components → src/components}/home/sidebar/new-chat/create-group-chat/participant.d.ts +0 -0
- /package/dist/{components → src/components}/home/sidebar/new-chat/new-chat-dialog.d.ts +0 -0
- /package/dist/{components → src/components}/home/sidebar/new-chat/searched-user.d.ts +0 -0
- /package/dist/{components → src/components}/home/sidebar/tabs/chats-tab.d.ts +0 -0
- /package/dist/{components → src/components}/home/sidebar/tabs/users-tab.d.ts +0 -0
- /package/dist/{components → src/components}/home/sidebar/user-item.d.ts +0 -0
- /package/dist/{components → src/components}/home/sidebar/users-list.d.ts +0 -0
- /package/dist/{components → src/components}/shadcn-ui/alert-dialog.d.ts +0 -0
- /package/dist/{components → src/components}/shadcn-ui/avatar.d.ts +0 -0
- /package/dist/{components → src/components}/shadcn-ui/badge.d.ts +0 -0
- /package/dist/{components → src/components}/shadcn-ui/button.d.ts +0 -0
- /package/dist/{components → src/components}/shadcn-ui/dialog.d.ts +0 -0
- /package/dist/{components → src/components}/shadcn-ui/dropdown-menu.d.ts +0 -0
- /package/dist/{components → src/components}/shadcn-ui/input.d.ts +0 -0
- /package/dist/{components → src/components}/shadcn-ui/label.d.ts +0 -0
- /package/dist/{components → src/components}/shadcn-ui/switch.d.ts +0 -0
- /package/dist/{components → src/components}/shadcn-ui/tabs.d.ts +0 -0
- /package/dist/{components → src/components}/shared/avatar.d.ts +0 -0
- /package/dist/{components → src/components}/shared/confirmation-alert.d.ts +0 -0
- /package/dist/{components → src/components}/shared/empty-content-placeholder.d.ts +0 -0
- /package/dist/{components → src/components}/shared/loader.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/debounce.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/throttle.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useNotificationSound.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/usePageFocus.d.ts +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{lib → src/lib}/utils.d.ts +0 -0
- /package/dist/{main.d.ts → src/main.d.ts} +0 -0
- /package/dist/{redux → src/redux}/hooks.d.ts +0 -0
- /package/dist/{redux → src/redux}/slices/draftMessages.d.ts +0 -0
- /package/dist/{redux → src/redux}/slices/quickActions.d.ts +0 -0
- /package/dist/{redux → src/redux}/slices/unreadCount.d.ts +0 -0
- /package/dist/{tests → src/tests}/connectycube.test.d.ts +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AddMembers": "Προσθήκη μελών",
|
|
3
|
+
"Admin": "Διαχειριστής",
|
|
4
|
+
"areTyping": "πληκτρολογούν",
|
|
5
|
+
"Cancel": "Ακύρωση",
|
|
6
|
+
"ChatName": "Όνομα συνομιλίας",
|
|
7
|
+
"ChatNameRequired": "Το όνομα συνομιλίας είναι υποχρεωτικό",
|
|
8
|
+
"Chat": "Συνομιλία",
|
|
9
|
+
"Chats": "Συνομιλίες",
|
|
10
|
+
"ChooseChat": "Επιλέξτε συνομιλία",
|
|
11
|
+
"continue": "Συνέχεια",
|
|
12
|
+
"CreateGroupChat": "Δημιουργία ομαδικής συνομιλίας",
|
|
13
|
+
"Delete": "Διαγραφή",
|
|
14
|
+
"Draft": "Πρόχειρο",
|
|
15
|
+
"EnterMessage": "Εισαγάγετε μήνυμα",
|
|
16
|
+
"EnterUserName": "Εισαγάγετε όνομα χρήστη",
|
|
17
|
+
"ExitChat": "Έξοδος από τη συνομιλία",
|
|
18
|
+
"FileTypeNotSupported": "Η μορφή αρχείου δεν υποστηρίζεται. Υποστηρίζονται μόνο εικόνες.",
|
|
19
|
+
"isTyping": "πληκτρολογεί",
|
|
20
|
+
"me": "εγώ",
|
|
21
|
+
"Members": "Μέλη",
|
|
22
|
+
"members": "μέλη",
|
|
23
|
+
"NewGroup": "Νέα ομάδα",
|
|
24
|
+
"NewMessage": "Νέο μήνυμα",
|
|
25
|
+
"NoChats": "Ξεκινήστε την πρώτη σας συνομιλία και δείτε τι θα συμβεί!",
|
|
26
|
+
"NoMessages": "Δεν υπάρχουν ακόμη μηνύματα",
|
|
27
|
+
"NoOnlineUsers": "Δεν υπάρχουν συνδεδεμένοι χρήστες",
|
|
28
|
+
"Profile": "Προφίλ",
|
|
29
|
+
"RemoveMembers": "Αφαίρεση μελών",
|
|
30
|
+
"RemoveMembers?": "Είστε σίγουροι ότι θέλετε να αφαιρέσετε μέλη;",
|
|
31
|
+
"Reset": "Επαναφορά",
|
|
32
|
+
"Search": "Αναζήτηση",
|
|
33
|
+
"Select": "Επιλογή",
|
|
34
|
+
"Send": "Αποστολή",
|
|
35
|
+
"StartChat": "Έναρξη συνομιλίας",
|
|
36
|
+
"StartNewChat": "Έναρξη νέας συνομιλίας",
|
|
37
|
+
"typing": "πληκτρολογεί",
|
|
38
|
+
"Users": "Χρήστες",
|
|
39
|
+
"you": "εσύ"
|
|
40
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AddMembers": "Add members",
|
|
3
|
+
"Admin": "Admin",
|
|
4
|
+
"areTyping": "are typing",
|
|
5
|
+
"Cancel": "Cancel",
|
|
6
|
+
"ChatName": "Chat name",
|
|
7
|
+
"ChatNameRequired": "Chat name is required",
|
|
8
|
+
"Chat": "Chat",
|
|
9
|
+
"Chats": "Chats",
|
|
10
|
+
"ChooseChat": "Choose a chat",
|
|
11
|
+
"continue": "Continue",
|
|
12
|
+
"CreateGroupChat": "Create group chat",
|
|
13
|
+
"Delete": "Delete",
|
|
14
|
+
"Draft": "Draft",
|
|
15
|
+
"EnterMessage": "Enter message",
|
|
16
|
+
"EnterUserName": "Enter user name",
|
|
17
|
+
"ExitChat": "Exit chat",
|
|
18
|
+
"FileTypeNotSupported": "File format is not supported. Only images supported.",
|
|
19
|
+
"isTyping": "is typing",
|
|
20
|
+
"me": "me",
|
|
21
|
+
"Members": "Members",
|
|
22
|
+
"members": "members",
|
|
23
|
+
"NewGroup": "New group",
|
|
24
|
+
"NewMessage": "New message",
|
|
25
|
+
"NoChats": "Begin your first chat and see what happens!",
|
|
26
|
+
"NoMessages": "No messages yet",
|
|
27
|
+
"NoOnlineUsers": "No online users",
|
|
28
|
+
"Profile": "Profile",
|
|
29
|
+
"RemoveMembers": "Remove members",
|
|
30
|
+
"RemoveMembers?": "Are you sure you want to remove members?",
|
|
31
|
+
"Reset": "Reset",
|
|
32
|
+
"Search": "Search",
|
|
33
|
+
"Select": "Select",
|
|
34
|
+
"Send": "Send",
|
|
35
|
+
"StartChat": "Start chat",
|
|
36
|
+
"StartNewChat": "Start new chat",
|
|
37
|
+
"typing": "typing",
|
|
38
|
+
"Users": "Users",
|
|
39
|
+
"you": "you"
|
|
40
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AddMembers": "Додати учасників",
|
|
3
|
+
"Admin": "Адмін",
|
|
4
|
+
"areTyping": "пишуть",
|
|
5
|
+
"Cancel": "Скасувати",
|
|
6
|
+
"ChatName": "Назва чату",
|
|
7
|
+
"ChatNameRequired": "Назва чату є обов'язковою",
|
|
8
|
+
"Chat": "Чат",
|
|
9
|
+
"Chats": "Чати",
|
|
10
|
+
"ChooseChat": "Оберіть чат",
|
|
11
|
+
"continue": "Продовжити",
|
|
12
|
+
"CreateGroupChat": "Створити груповий чат",
|
|
13
|
+
"Delete": "Видалити",
|
|
14
|
+
"Draft": "Чернетка",
|
|
15
|
+
"EnterMessage": "Введіть повідомлення",
|
|
16
|
+
"EnterUserName": "Введіть ім'я користувача",
|
|
17
|
+
"ExitChat": "Вийти з чату",
|
|
18
|
+
"FileTypeNotSupported": "Формат файлу не підтримується. Підтримуються лише зображення.",
|
|
19
|
+
"isTyping": "пише",
|
|
20
|
+
"me": "я",
|
|
21
|
+
"Members": "Учасники",
|
|
22
|
+
"members": "учасники",
|
|
23
|
+
"NewGroup": "Нова група",
|
|
24
|
+
"NewMessage": "Нове повідомлення",
|
|
25
|
+
"NoChats": "Почніть свою першу розмову та подивіться, що станеться!",
|
|
26
|
+
"NoMessages": "Поки що немає повідомлень",
|
|
27
|
+
"NoOnlineUsers": "Немає онлайн-користувачів",
|
|
28
|
+
"Profile": "Профіль",
|
|
29
|
+
"RemoveMembers": "Видалити учасників",
|
|
30
|
+
"RemoveMembers?": "Ви впевнені, що хочете видалити учасників?",
|
|
31
|
+
"Reset": "Скинути",
|
|
32
|
+
"Search": "Пошук",
|
|
33
|
+
"Select": "Вибрати",
|
|
34
|
+
"Send": "Надіслати",
|
|
35
|
+
"StartChat": "Розпочати чат",
|
|
36
|
+
"StartNewChat": "Розпочати новий чат",
|
|
37
|
+
"typing": "друкує",
|
|
38
|
+
"Users": "Користувачі",
|
|
39
|
+
"you": "ви"
|
|
40
|
+
}
|
|
@@ -6,11 +6,13 @@ export type AppProps = {
|
|
|
6
6
|
userId?: string;
|
|
7
7
|
userName?: string;
|
|
8
8
|
userAvatar?: string;
|
|
9
|
+
userProfileLink?: string;
|
|
9
10
|
config?: Config.Options;
|
|
10
11
|
muted?: boolean;
|
|
11
12
|
splitView?: boolean;
|
|
12
13
|
showOnlineUsersTab?: boolean;
|
|
13
14
|
quickActions?: QuickActions;
|
|
15
|
+
translation?: 'en' | 'el' | 'ua';
|
|
14
16
|
buttonTitle?: string;
|
|
15
17
|
buttonStyle?: React.CSSProperties;
|
|
16
18
|
portalStyle?: React.CSSProperties;
|
|
@@ -18,6 +20,7 @@ export type AppProps = {
|
|
|
18
20
|
buttonClassName?: string;
|
|
19
21
|
portalClassName?: string;
|
|
20
22
|
badgeClassName?: string;
|
|
23
|
+
hideNewChatButton?: boolean;
|
|
21
24
|
};
|
|
22
25
|
declare const AppContainer: React.FC<AppProps>;
|
|
23
26
|
export default AppContainer;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Chat, Users, Auth } from '../../../node_modules/connectycube/dist/types/types';
|
|
2
2
|
export declare const SESSION_KEY = "@connectycube/chat-widget:session";
|
|
3
|
-
export declare const tryReuseSession: (userName?: string, userId?: string, userAvatar?: string) => Promise<boolean>;
|
|
3
|
+
export declare const tryReuseSession: (userName?: string, userId?: string, userAvatar?: string, userProfileLink?: string) => Promise<boolean>;
|
|
4
4
|
export declare const tryRestoreSession: () => Promise<Auth.Session | null>;
|
|
5
5
|
export declare const createUserSession: (login: string, password: string) => Promise<Auth.Session>;
|
|
6
|
-
export declare const createSession: (userId?: string, userName?: string, userAvatar?: string) => Promise<Auth.Session | null>;
|
|
6
|
+
export declare const createSession: (userId?: string, userName?: string, userAvatar?: string, userProfileLink?: string) => Promise<Auth.Session | null>;
|
|
7
7
|
export declare const destroyUserSession: () => Promise<void>;
|
|
8
|
-
export declare const userSignup: (login: string, password: string, name?: string, externalId?: string, userAvatar?: string) => Promise<Auth.Session>;
|
|
8
|
+
export declare const userSignup: (login: string, password: string, name?: string, externalId?: string, userAvatar?: string, userProfileLink?: string) => Promise<Auth.Session>;
|
|
9
9
|
export declare const chatCredentials: () => Chat.ConnectionParams | null;
|
|
10
|
-
export declare const updateUserProfileIfNeeded: (session: Auth.Session, name?: string, externalId?: string, avatar?: string) => Promise<Auth.Session>;
|
|
10
|
+
export declare const updateUserProfileIfNeeded: (session: Auth.Session, name?: string, externalId?: string, avatar?: string, userProfileLink?: string) => Promise<Auth.Session>;
|
|
11
11
|
export declare const setSessionToLocalStorage: (session: Auth.Session) => void;
|
|
12
12
|
export declare const getSessionFromLocalStorage: () => Auth.Session | null;
|
|
13
13
|
export declare const clearSessionInLocalStorage: () => void;
|
|
@@ -4,3 +4,5 @@ export declare const splitView: import('redux').Reducer<boolean>;
|
|
|
4
4
|
export declare const setSplitView: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, "splitView/setSplitView">, resetSplitView: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"splitView/resetSplitView">;
|
|
5
5
|
export declare const showOnlineUsersTab: import('redux').Reducer<boolean>;
|
|
6
6
|
export declare const setShowOnlineUsersTab: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, "showOnlineUsersTab/setShowOnlineUsersTab">, resetShowOnlineUsersTab: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"showOnlineUsersTab/resetShowOnlineUsersTab">;
|
|
7
|
+
export declare const hideNewChatButton: import('redux').Reducer<boolean>;
|
|
8
|
+
export declare const setHideNewChatButton: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, "hideNewChatButton/setHideNewChatButton">, resetHideNewChatButton: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"hideNewChatButton/resetHideNewChatButton">;
|
|
@@ -3,6 +3,7 @@ export declare const rootReducer: import('redux').Reducer<{
|
|
|
3
3
|
muted: boolean;
|
|
4
4
|
splitView: boolean;
|
|
5
5
|
showOnlineUsersTab: boolean;
|
|
6
|
+
hideNewChatButton: boolean;
|
|
6
7
|
draftMessages: {
|
|
7
8
|
[dialogId: string]: string;
|
|
8
9
|
};
|
|
@@ -12,6 +13,7 @@ export declare const rootReducer: import('redux').Reducer<{
|
|
|
12
13
|
muted: boolean | undefined;
|
|
13
14
|
splitView: boolean | undefined;
|
|
14
15
|
showOnlineUsersTab: boolean | undefined;
|
|
16
|
+
hideNewChatButton: boolean | undefined;
|
|
15
17
|
draftMessages: {
|
|
16
18
|
[dialogId: string]: string;
|
|
17
19
|
} | undefined;
|
|
@@ -22,6 +24,7 @@ export declare const store: import('@reduxjs/toolkit').EnhancedStore<{
|
|
|
22
24
|
muted: boolean;
|
|
23
25
|
splitView: boolean;
|
|
24
26
|
showOnlineUsersTab: boolean;
|
|
27
|
+
hideNewChatButton: boolean;
|
|
25
28
|
draftMessages: {
|
|
26
29
|
[dialogId: string]: string;
|
|
27
30
|
};
|
|
@@ -32,6 +35,7 @@ export declare const store: import('@reduxjs/toolkit').EnhancedStore<{
|
|
|
32
35
|
muted: boolean;
|
|
33
36
|
splitView: boolean;
|
|
34
37
|
showOnlineUsersTab: boolean;
|
|
38
|
+
hideNewChatButton: boolean;
|
|
35
39
|
draftMessages: {
|
|
36
40
|
[dialogId: string]: string;
|
|
37
41
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@connectycube/chat-widget",
|
|
3
3
|
"description": "A React component that seamlessly integrates ConnectyCube's real-time chat capabilities into your web applications. This widget offers an out-of-the-box solution for embedding chat features—such as instant messaging, user presence, and file sharing—without the overhead of building a complete chat system from scratch.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chat-widget",
|
|
7
7
|
"widget",
|
|
@@ -66,11 +66,13 @@
|
|
|
66
66
|
"class-variance-authority": "^0.7.1",
|
|
67
67
|
"clsx": "^2.1.1",
|
|
68
68
|
"connectycube": "^4.1.0",
|
|
69
|
+
"i18next": "^24.2.2",
|
|
69
70
|
"jsdom": "^26.0.0",
|
|
70
71
|
"lucide-react": "^0.475.0",
|
|
71
72
|
"react": "^18.3.1",
|
|
72
73
|
"react-dom": "^18.3.1",
|
|
73
74
|
"react-hook-form": "^7.54.2",
|
|
75
|
+
"react-i18next": "^15.4.0",
|
|
74
76
|
"react-icons": "^5.4.0",
|
|
75
77
|
"react-intersection-observer": "^9.15.1",
|
|
76
78
|
"react-redux": "^9.2.0",
|
|
@@ -84,6 +86,7 @@
|
|
|
84
86
|
"@types/node": "^22.13.1",
|
|
85
87
|
"@types/react": "18.3.12",
|
|
86
88
|
"@types/react-dom": "^18.3.5",
|
|
89
|
+
"@types/react-i18next": "^7.8.3",
|
|
87
90
|
"@types/react-scroll": "^1.8.10",
|
|
88
91
|
"@vitejs/plugin-react": "^4.3.4",
|
|
89
92
|
"@vitest/coverage-v8": "^3.0.5",
|
|
@@ -105,4 +108,4 @@
|
|
|
105
108
|
"vite-plugin-dts": "^4.5.0",
|
|
106
109
|
"vitest": "^3.0.5"
|
|
107
110
|
}
|
|
108
|
-
}
|
|
111
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/home/sidebar/new-chat/create-group-chat/participant.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|