@connectycube/chat-widget 0.20.0 → 0.21.1
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/CHANGELOG.md +21 -0
- package/README.md +5 -3
- package/dist/App.d.ts +1 -1
- package/dist/components/home/main/chat-info-user.d.ts +2 -2
- package/dist/components/home/main/chat-input.d.ts +1 -1
- package/dist/components/home/main/group-member.d.ts +1 -1
- package/dist/components/home/main/message-attachment.d.ts +1 -1
- package/dist/components/home/main/message.d.ts +2 -2
- package/dist/components/home/main/my-profile/my-block-list-item.d.ts +1 -1
- package/dist/components/home/sidebar/chat-item.d.ts +1 -1
- package/dist/components/home/sidebar/new-chat/create-group-chat/create-group-chat.d.ts +1 -1
- package/dist/components/shared/avatar.d.ts +2 -2
- package/dist/helpers/connectycube.d.ts +2 -2
- package/dist/helpers/notifications.d.ts +2 -2
- package/dist/hooks/store/useUserSettingsStore.d.ts +1 -1
- package/dist/hooks/useAppAuthorization.d.ts +1 -1
- package/dist/hooks/useNotification.d.ts +1 -1
- package/dist/index.es.js +11856 -9015
- package/dist/index.umd.js +46 -46
- package/dist/lib/utils.d.ts +1 -1
- package/dist/locales/el/translation.json.d.ts +2 -1
- package/package.json +25 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 0.21.1
|
|
4
|
+
|
|
5
|
+
### Bug fixes
|
|
6
|
+
|
|
7
|
+
- removed unnecessary/obsessive alerts
|
|
8
|
+
|
|
9
|
+
## 0.21.0
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- Video-preview for video attachment in chat
|
|
14
|
+
|
|
15
|
+
### Misc
|
|
16
|
+
|
|
17
|
+
- Added support for node 22
|
|
18
|
+
- Upgraded `connectycube` to 4.2.2 and `@connectycube/use-chat` to 0.18.0 to use import types and enums from "connectycube/types"
|
|
19
|
+
|
|
20
|
+
### Bug fixes
|
|
21
|
+
|
|
22
|
+
- Web Push Notifications init and fetch with user setting
|
|
23
|
+
|
|
3
24
|
## 0.20.0
|
|
4
25
|
|
|
5
26
|
### Features
|
package/README.md
CHANGED
|
@@ -150,15 +150,17 @@ See all available recipes <https://developers.connectycube.com/js/chat-widget/#r
|
|
|
150
150
|
|
|
151
151
|
## Have an issue?
|
|
152
152
|
|
|
153
|
-
Join our [Discord](https://discord.
|
|
153
|
+
Join our [Discord](https://discord.com/invite/zqbBWNCCFJ) for quick answers to your questions
|
|
154
154
|
|
|
155
|
-
## Community
|
|
155
|
+
## Community
|
|
156
156
|
|
|
157
|
-
- [Discord](https://discord.gg/wDwbvJmD)
|
|
158
157
|
- [Blog](https://connectycube.com/blog)
|
|
159
158
|
- X (twitter)[@ConnectyCube](https://x.com/ConnectyCube)
|
|
160
159
|
- [Facebook](https://www.facebook.com/ConnectyCube)
|
|
161
160
|
|
|
161
|
+
**Want to support our team**:<br>
|
|
162
|
+
<a href="https://www.buymeacoffee.com/connectycube" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
|
|
163
|
+
|
|
162
164
|
## Changelog
|
|
163
165
|
|
|
164
166
|
<https://github.com/ConnectyCube/connectycube-chat-widget-samples/blob/main/CHANGELOG.md>
|
package/dist/App.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Config } from '
|
|
1
|
+
import { Config } from 'connectycube/types';
|
|
2
2
|
import { DefaultChat } from './hooks/store/useAppDefaultChatStore';
|
|
3
3
|
import { QuickActions } from './hooks/store/useAppQuickActionsStore';
|
|
4
4
|
export type AppProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Users } from '
|
|
2
|
+
import { Users } from 'connectycube/types';
|
|
3
3
|
export interface ChatInfoUserProps {
|
|
4
|
-
user?: Users.User;
|
|
4
|
+
user?: Users.User | null;
|
|
5
5
|
}
|
|
6
6
|
declare const _default: React.NamedExoticComponent<ChatInfoUserProps>;
|
|
7
7
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Dialogs } from '
|
|
2
|
+
import { Dialogs } from 'connectycube/types';
|
|
3
3
|
export interface ChatInputProps {
|
|
4
4
|
onSendMessage: (message: string, dialog?: Dialogs.Dialog) => void;
|
|
5
5
|
onSendMessageWithAttachment: (files: File[]) => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Messages } from '
|
|
2
|
+
import { Messages } from 'connectycube/types';
|
|
3
3
|
export interface MessageProps {
|
|
4
4
|
message: Messages.Message;
|
|
5
5
|
isGroupChat: boolean;
|
|
6
6
|
dialogName: string;
|
|
7
7
|
senderName: string;
|
|
8
|
-
senderAvatar
|
|
8
|
+
senderAvatar?: string | null;
|
|
9
9
|
}
|
|
10
10
|
declare const Message: React.FC<MessageProps>;
|
|
11
11
|
export default Message;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Users } from '
|
|
2
|
+
import { Users } from 'connectycube/types';
|
|
3
3
|
export interface CreateGroupChatProps {
|
|
4
4
|
users: Users.User[];
|
|
5
5
|
onCreateChat: (name: string) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface AvatarProps {
|
|
3
|
-
imageUIDOrUrl?: string;
|
|
4
|
-
name
|
|
3
|
+
imageUIDOrUrl?: string | null;
|
|
4
|
+
name?: string;
|
|
5
5
|
className?: string | undefined;
|
|
6
6
|
}
|
|
7
7
|
declare const _default: React.NamedExoticComponent<AvatarProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Config, Users, Auth, Chat, EmptyResponse, PushNotifications } from '
|
|
1
|
+
import { Config, Users, Auth, Chat, EmptyResponse, PushNotifications } from 'connectycube/types';
|
|
2
2
|
import { PushSubscriptionData } from './notifications';
|
|
3
3
|
export declare const SESSION_KEY = "@connectycube/chat-widget:session";
|
|
4
4
|
export declare const initConnectyCubeSDK: (credentials: Config.Credentials, config?: Config.Options) => void;
|
|
@@ -28,6 +28,6 @@ export declare const sha256: (str: string) => Promise<string>;
|
|
|
28
28
|
export declare const getUserName: (user: Users.User | null | undefined, force?: boolean) => string;
|
|
29
29
|
export declare const getPhotoUrl: (photoOrAvatar?: string | null) => string;
|
|
30
30
|
export declare const generateConnectyCubeLogin: (userId?: string) => string;
|
|
31
|
-
export declare const createUserReport: (reportedUserId: number, reason: string) => Promise<import("
|
|
31
|
+
export declare const createUserReport: (reportedUserId: number, reason: string) => Promise<import("connectycube/types").Data.DataRecord>;
|
|
32
32
|
export declare const subscribeToPushNotifications: (pushSubscriptionData?: PushSubscriptionData) => Promise<PushNotifications.Subscription | undefined>;
|
|
33
33
|
export declare const unsubscribeFromPushNotifications: () => Promise<EmptyResponse[]>;
|
|
@@ -3,8 +3,8 @@ export type PushSubscriptionData = {
|
|
|
3
3
|
auth: string;
|
|
4
4
|
p256dh: string;
|
|
5
5
|
} | undefined;
|
|
6
|
-
export declare const requestNotificationPermission: () => Promise<
|
|
7
|
-
export declare const registerWidgetServiceWorker: (serviceWorkerPath?: string | URL) => Promise<
|
|
6
|
+
export declare const requestNotificationPermission: () => Promise<boolean>;
|
|
7
|
+
export declare const registerWidgetServiceWorker: (serviceWorkerPath?: string | URL) => Promise<boolean>;
|
|
8
8
|
export declare const getWidgetServiceWorker: (serviceWorkerPath?: string | URL) => Promise<ServiceWorkerRegistration | void>;
|
|
9
9
|
export declare const getPushManagerSubscriptionData: (subscription?: PushSubscription | null) => PushSubscriptionData;
|
|
10
10
|
export declare const getPushManagerSubscription: (serviceWorkerPath?: string | URL, applicationServerKey?: PushSubscriptionOptionsInit["applicationServerKey"]) => Promise<PushSubscription | null>;
|
|
@@ -9,6 +9,6 @@ interface UserSettingsState extends UserSettingsStateProps {
|
|
|
9
9
|
setIsPushNotifications: (enabled: boolean) => Promise<void>;
|
|
10
10
|
}
|
|
11
11
|
declare const useUserSettingsStore: import('zustand').UseBoundStore<import('zustand').StoreApi<UserSettingsState>>;
|
|
12
|
-
export declare const managePushNotificationsSubscription: (enable: boolean) => Promise<
|
|
12
|
+
export declare const managePushNotificationsSubscription: (enable: boolean) => Promise<boolean>;
|
|
13
13
|
export declare const restoreUserSettingsStore: () => Promise<void>;
|
|
14
14
|
export default useUserSettingsStore;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Chat } from '
|
|
1
|
+
import { Chat } from 'connectycube/types';
|
|
2
2
|
type NotificationHook = {
|
|
3
3
|
showNotification: (title: string, body: string, icon: string) => Promise<Notification | void>;
|
|
4
4
|
notifyOnMessage: (userId: number, message: Chat.Message) => Promise<Notification | void>;
|