@connectycube/chat-widget 0.16.0 → 0.18.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/LICENSE +231 -0
- package/README.md +2 -2
- package/dist/App.d.ts +12 -9
- package/dist/components/home/main/chat-header.d.ts +1 -4
- 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/message-attachment.d.ts +1 -1
- package/dist/components/home/main/message.d.ts +1 -1
- package/dist/components/home/main/my-profile/my-block-list-item.d.ts +7 -0
- package/dist/components/home/main/my-profile/my-block-list.d.ts +3 -0
- package/dist/components/home/main/my-profile/my-profile-settings.d.ts +2 -0
- package/dist/components/home/main/my-profile/my-profile.d.ts +3 -0
- package/dist/components/home/main/profile-info.d.ts +3 -0
- 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/empty-content-placeholder.d.ts +2 -2
- package/dist/{connectycube.d.ts → helpers/connectycube.d.ts} +11 -2
- package/dist/helpers/notifications.d.ts +1 -0
- package/dist/hooks/index.d.ts +12 -6
- package/dist/hooks/store/useActiveTabsStore.d.ts +15 -0
- package/dist/hooks/store/useAppDefaultChatStore.d.ts +21 -0
- package/dist/hooks/store/useAppInterfaceStore.d.ts +21 -0
- package/dist/hooks/store/useAppNotificationStore.d.ts +22 -0
- package/dist/hooks/store/useAppQuickActionsStore.d.ts +17 -0
- package/dist/hooks/store/useAppSettingsStore.d.ts +18 -0
- package/dist/hooks/store/useDraftMessagesStore.d.ts +2 -2
- package/dist/hooks/store/useProfileStore.d.ts +9 -0
- package/dist/hooks/store/useUserSettingsStore.d.ts +11 -0
- package/dist/hooks/useAppAuthorization.d.ts +14 -0
- package/dist/hooks/useNotification.d.ts +7 -2
- package/dist/hooks/usePageFocus.d.ts +5 -1
- package/dist/hooks/useResizeScreenWidth.d.ts +10 -0
- package/dist/index.es.js +14107 -13716
- package/dist/index.umd.js +42 -42
- package/dist/lib/utils.d.ts +4 -2
- package/dist/locales/el/translation.json.d.ts +13 -3
- package/dist/locales/en/translation.json.d.ts +13 -3
- package/dist/locales/ua/translation.json.d.ts +12 -1
- package/package.json +36 -25
- package/dist/components/home/main/chat-info.d.ts +0 -7
- package/dist/hooks/store/useAppStore.d.ts +0 -64
- package/dist/hooks/useNotificationSound.d.ts +0 -2
- package/dist/notifications.d.ts +0 -2
- /package/dist/{hooks → helpers}/debounce.d.ts +0 -0
- /package/dist/{i18n.d.ts → helpers/i18n.d.ts} +0 -0
- /package/dist/{hooks → helpers}/throttle.d.ts +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface ProfileState {
|
|
2
|
+
visible: boolean;
|
|
3
|
+
userId?: number;
|
|
4
|
+
showProfile: (userId?: number) => void;
|
|
5
|
+
hideProfile: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const useProfileStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ProfileState>>;
|
|
8
|
+
export declare const resetProfileStore: () => void;
|
|
9
|
+
export default useProfileStore;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type UserSettingsStateProps = {
|
|
2
|
+
isNotifications: boolean;
|
|
3
|
+
isNotificationSound: boolean;
|
|
4
|
+
};
|
|
5
|
+
interface UserSettingsState extends UserSettingsStateProps {
|
|
6
|
+
setIsNotifications: (enabled: boolean) => Promise<void>;
|
|
7
|
+
setIsNotificationSound: (enabled: boolean) => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
declare const useUserSettingsStore: import('zustand').UseBoundStore<import('zustand').StoreApi<UserSettingsState>>;
|
|
10
|
+
export declare const restoreUserSettingsStore: () => void;
|
|
11
|
+
export default useUserSettingsStore;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Config } from '../../node_modules/connectycube/src/types';
|
|
2
|
+
type AppUser = {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
avatar?: string;
|
|
6
|
+
userProfileLink?: string;
|
|
7
|
+
};
|
|
8
|
+
type AppAuthorizationProps = {
|
|
9
|
+
creds: Config.Credentials;
|
|
10
|
+
config?: Config.Options;
|
|
11
|
+
user?: AppUser;
|
|
12
|
+
};
|
|
13
|
+
declare const useAppAuthorization: ({ creds, config, user }: AppAuthorizationProps) => void;
|
|
14
|
+
export default useAppAuthorization;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import { Chat } from '
|
|
2
|
-
|
|
1
|
+
import { Chat } from '../../node_modules/connectycube/src/types';
|
|
2
|
+
type NotificationHook = {
|
|
3
|
+
showNotification: (title: string, body: string, icon: string) => Notification | void;
|
|
4
|
+
notifyOnMessage: (userId: number, message: Chat.Message) => Promise<Notification | void>;
|
|
5
|
+
playAudio: () => void;
|
|
6
|
+
};
|
|
7
|
+
declare function useNotification(): NotificationHook;
|
|
3
8
|
export default useNotification;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ResizeScreenWidthParams = {
|
|
2
|
+
timeout?: number;
|
|
3
|
+
width?: number;
|
|
4
|
+
};
|
|
5
|
+
type ResizeScreenWidthHook = {
|
|
6
|
+
isWideScreen: boolean;
|
|
7
|
+
isNarrowScreen: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const useResizeScreenWidth: (params?: ResizeScreenWidthParams) => ResizeScreenWidthHook;
|
|
10
|
+
export default useResizeScreenWidth;
|