@connectycube/chat-widget 0.15.1 → 0.16.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 +9 -8
- package/dist/App.d.ts +32 -1
- package/dist/components/home/main/chat-info-members.d.ts +5 -0
- package/dist/components/home/main/chat-info-user.d.ts +7 -0
- package/dist/components/home/main/report-user-dialog.d.ts +6 -0
- package/dist/components/shadcn-ui/button.d.ts +1 -1
- package/dist/components/shadcn-ui/sonner.d.ts +3 -0
- package/dist/hooks/index.d.ts +5 -1
- package/dist/hooks/store/useAppStore.d.ts +64 -0
- package/dist/hooks/store/useDraftMessagesStore.d.ts +14 -0
- package/dist/hooks/store/useUnreadCountStore.d.ts +8 -0
- package/dist/hooks/useNotification.d.ts +3 -0
- package/dist/index.es.js +6055 -6297
- package/dist/index.umd.js +39 -47
- package/dist/locales/el/translation.json.d.ts +9 -1
- package/dist/locales/en/translation.json.d.ts +9 -1
- package/dist/locales/ua/translation.json.d.ts +10 -3
- package/dist/logo.png +0 -0
- package/dist/notifications.d.ts +2 -0
- package/package.json +24 -23
- package/dist/AppContainer.d.ts +0 -30
- package/dist/redux/hooks.d.ts +0 -6
- package/dist/redux/slices/app.d.ts +0 -14
- package/dist/redux/slices/draftMessages.d.ts +0 -9
- package/dist/redux/slices/quickActions.d.ts +0 -7
- package/dist/redux/slices/unreadCount.d.ts +0 -2
- package/dist/redux/store.d.ts +0 -52
package/README.md
CHANGED
|
@@ -24,9 +24,9 @@ Single-view chat widget:
|
|
|
24
24
|
|
|
25
25
|
<kbd><img alt="ConnectyCube chat widget, single view image demo" src="https://developers.connectycube.com/images/chat_widget/chat-widget-2.png" width="400" /></kbd>
|
|
26
26
|
|
|
27
|
-
## Documentation
|
|
27
|
+
## Documentation
|
|
28
28
|
|
|
29
|
-
https://developers.connectycube.com/js/chat-widget
|
|
29
|
+
<https://developers.connectycube.com/js/chat-widget>
|
|
30
30
|
|
|
31
31
|
## Installation
|
|
32
32
|
|
|
@@ -142,22 +142,23 @@ See chat widget code samples <https://github.com/ConnectyCube/connectycube-chat-
|
|
|
142
142
|
|
|
143
143
|
## Props
|
|
144
144
|
|
|
145
|
-
See all available props https://developers.connectycube.com/js/chat-widget/#props
|
|
145
|
+
See all available props <https://developers.connectycube.com/js/chat-widget/#props>
|
|
146
146
|
|
|
147
147
|
## Recipes
|
|
148
148
|
|
|
149
|
-
See all available recipes https://developers.connectycube.com/js/chat-widget/#recipes
|
|
149
|
+
See all available recipes <https://developers.connectycube.com/js/chat-widget/#recipes>
|
|
150
150
|
|
|
151
|
-
##
|
|
151
|
+
## Have an issue?
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
Join our [Discord](https://discord.gg/tEnXnp2M) for quick answers to your questions
|
|
154
154
|
|
|
155
155
|
## Community and support
|
|
156
156
|
|
|
157
|
+
- [Discord](https://discord.gg/tEnXnp2M)
|
|
157
158
|
- [Blog](https://connectycube.com/blog)
|
|
158
159
|
- X (twitter)[@ConnectyCube](https://x.com/ConnectyCube)
|
|
159
160
|
- [Facebook](https://www.facebook.com/ConnectyCube)
|
|
160
161
|
|
|
161
|
-
##
|
|
162
|
+
## Changelog
|
|
162
163
|
|
|
163
|
-
|
|
164
|
+
<https://github.com/ConnectyCube/connectycube-chat-widget-samples/blob/main/CHANGELOG.md>
|
package/dist/App.d.ts
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Config } from '../../../node_modules/connectycube/dist/types/types';
|
|
2
|
+
import { QuickActions } from './hooks/store/useAppStore';
|
|
3
|
+
export type AppProps = {
|
|
4
|
+
appId: Config.Credentials['appId'];
|
|
5
|
+
authKey: Config.Credentials['authKey'];
|
|
6
|
+
userId?: string;
|
|
7
|
+
userName?: string;
|
|
8
|
+
userAvatar?: string;
|
|
9
|
+
userProfileLink?: string;
|
|
10
|
+
config?: Config.Options;
|
|
11
|
+
splitView?: boolean;
|
|
12
|
+
showOnlineUsersTab?: boolean;
|
|
13
|
+
quickActions?: QuickActions;
|
|
14
|
+
hideNewChatButton?: boolean;
|
|
15
|
+
hideWidgetButton?: boolean;
|
|
16
|
+
enableContentReporting?: boolean;
|
|
17
|
+
enableBlockList?: boolean;
|
|
18
|
+
translation?: 'en' | 'el' | 'ua';
|
|
19
|
+
buttonTitle?: string;
|
|
20
|
+
portalStyle?: React.CSSProperties;
|
|
21
|
+
buttonStyle?: React.CSSProperties;
|
|
22
|
+
badgeStyle?: React.CSSProperties;
|
|
23
|
+
portalClassName?: string;
|
|
24
|
+
buttonClassName?: string;
|
|
25
|
+
badgeClassName?: string;
|
|
26
|
+
open?: boolean;
|
|
27
|
+
onOpenChange?: (open: boolean) => void;
|
|
28
|
+
onUnreadCountChange?: (count: number) => void;
|
|
29
|
+
muted?: boolean;
|
|
30
|
+
showNotifications?: boolean;
|
|
31
|
+
playSound?: boolean;
|
|
32
|
+
};
|
|
2
33
|
declare const App: React.FC<AppProps>;
|
|
3
34
|
export default App;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
export declare const resetStore: (force?: boolean) => void;
|
|
1
2
|
export { debounce as debounce } from './debounce';
|
|
2
3
|
export { throttle as throttle } from './throttle';
|
|
4
|
+
export { default as useNotification } from './useNotification';
|
|
3
5
|
export { default as useNotificationSound } from './useNotificationSound';
|
|
4
6
|
export { default as usePageFocus } from './usePageFocus';
|
|
5
7
|
export { default as useValue } from './useValue';
|
|
6
|
-
export
|
|
8
|
+
export { default as useAppStore } from './store/useAppStore';
|
|
9
|
+
export { default as useDraftMessagesStore } from './store/useDraftMessagesStore';
|
|
10
|
+
export { default as useUnreadCountStore } from './store/useUnreadCountStore';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare enum Tab {
|
|
2
|
+
CHATS = "chats",
|
|
3
|
+
USERS = "users"
|
|
4
|
+
}
|
|
5
|
+
export type QuickActions = {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
actions: string[];
|
|
9
|
+
};
|
|
10
|
+
export interface AppStoreState {
|
|
11
|
+
opened: boolean;
|
|
12
|
+
splitView: boolean;
|
|
13
|
+
showOnlineUsersTab: boolean;
|
|
14
|
+
activeTab: Tab;
|
|
15
|
+
hideNewChatButton: boolean;
|
|
16
|
+
quickActions: QuickActions;
|
|
17
|
+
enableContentReporting: boolean;
|
|
18
|
+
enableBlockList: boolean;
|
|
19
|
+
muted: boolean;
|
|
20
|
+
showNotifications: boolean;
|
|
21
|
+
playSound: boolean;
|
|
22
|
+
setOpened: (opened: boolean) => void;
|
|
23
|
+
setSplitView: (splitView: boolean) => void;
|
|
24
|
+
setShowOnlineUsersTab: (showOnlineUsersTab: boolean) => void;
|
|
25
|
+
setActiveTab: (activeTab: Tab) => void;
|
|
26
|
+
setHideNewChatButton: (hideNewChatButton: boolean) => void;
|
|
27
|
+
setQuickActions: (quickActions: QuickActions) => void;
|
|
28
|
+
setEnableContentReporting: (enableContentReporting: boolean) => void;
|
|
29
|
+
setEnableBlockList: (enableBlockList: boolean) => void;
|
|
30
|
+
setMuted: (muted: boolean) => void;
|
|
31
|
+
setShowNotifications: (showNotifications: boolean) => void;
|
|
32
|
+
setPlaySound: (playSound: boolean) => void;
|
|
33
|
+
resetOpened: () => void;
|
|
34
|
+
resetSplitView: () => void;
|
|
35
|
+
resetShowOnlineUsersTab: () => void;
|
|
36
|
+
resetActiveTab: () => void;
|
|
37
|
+
resetHideNewChatButton: () => void;
|
|
38
|
+
resetQuickActions: () => void;
|
|
39
|
+
resetEnableContentReporting: () => void;
|
|
40
|
+
resetEnableBlockList: () => void;
|
|
41
|
+
resetMuted: () => void;
|
|
42
|
+
resetShowNotifications: () => void;
|
|
43
|
+
resetPlaySound: () => void;
|
|
44
|
+
}
|
|
45
|
+
export declare const appStoreInitialState: {
|
|
46
|
+
opened: boolean;
|
|
47
|
+
splitView: boolean;
|
|
48
|
+
showOnlineUsersTab: boolean;
|
|
49
|
+
activeTab: Tab;
|
|
50
|
+
hideNewChatButton: boolean;
|
|
51
|
+
quickActions: {
|
|
52
|
+
title: string;
|
|
53
|
+
description: string;
|
|
54
|
+
actions: never[];
|
|
55
|
+
};
|
|
56
|
+
muted: boolean;
|
|
57
|
+
showNotifications: boolean;
|
|
58
|
+
playSound: boolean;
|
|
59
|
+
enableContentReporting: boolean;
|
|
60
|
+
enableBlockList: boolean;
|
|
61
|
+
};
|
|
62
|
+
declare const useAppStore: import('zustand').UseBoundStore<import('zustand').StoreApi<AppStoreState>>;
|
|
63
|
+
export declare const resetAppStore: () => void;
|
|
64
|
+
export default useAppStore;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type DraftMessage = {
|
|
2
|
+
[dialogId: string]: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const DRAFT_MESSAGES_KEY = "@connectycube/chat-widget:draftMessages";
|
|
5
|
+
interface DraftMessagesState {
|
|
6
|
+
draftMessages: DraftMessage;
|
|
7
|
+
setDraftMessages: (messages: DraftMessage) => void;
|
|
8
|
+
upsertDraftMessage: (message: DraftMessage) => void;
|
|
9
|
+
deleteDraftMessage: (dialogId: string) => void;
|
|
10
|
+
resetDraftMessages: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const useDraftMessagesStore: import('zustand').UseBoundStore<import('zustand').StoreApi<DraftMessagesState>>;
|
|
13
|
+
export declare const resetDraftMessagesStore: () => void;
|
|
14
|
+
export default useDraftMessagesStore;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface UnreadCountState {
|
|
2
|
+
unreadCount: number;
|
|
3
|
+
setUnreadCount: (count: number) => void;
|
|
4
|
+
resetUnreadCount: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare const useUnreadCountStore: import('zustand').UseBoundStore<import('zustand').StoreApi<UnreadCountState>>;
|
|
7
|
+
export declare const resetUnreadCountStore: () => void;
|
|
8
|
+
export default useUnreadCountStore;
|