@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.
Files changed (46) hide show
  1. package/LICENSE +231 -0
  2. package/README.md +2 -2
  3. package/dist/App.d.ts +12 -9
  4. package/dist/components/home/main/chat-header.d.ts +1 -4
  5. package/dist/components/home/main/chat-info-user.d.ts +2 -2
  6. package/dist/components/home/main/chat-input.d.ts +1 -1
  7. package/dist/components/home/main/message-attachment.d.ts +1 -1
  8. package/dist/components/home/main/message.d.ts +1 -1
  9. package/dist/components/home/main/my-profile/my-block-list-item.d.ts +7 -0
  10. package/dist/components/home/main/my-profile/my-block-list.d.ts +3 -0
  11. package/dist/components/home/main/my-profile/my-profile-settings.d.ts +2 -0
  12. package/dist/components/home/main/my-profile/my-profile.d.ts +3 -0
  13. package/dist/components/home/main/profile-info.d.ts +3 -0
  14. package/dist/components/home/sidebar/chat-item.d.ts +1 -1
  15. package/dist/components/home/sidebar/new-chat/create-group-chat/create-group-chat.d.ts +1 -1
  16. package/dist/components/shared/empty-content-placeholder.d.ts +2 -2
  17. package/dist/{connectycube.d.ts → helpers/connectycube.d.ts} +11 -2
  18. package/dist/helpers/notifications.d.ts +1 -0
  19. package/dist/hooks/index.d.ts +12 -6
  20. package/dist/hooks/store/useActiveTabsStore.d.ts +15 -0
  21. package/dist/hooks/store/useAppDefaultChatStore.d.ts +21 -0
  22. package/dist/hooks/store/useAppInterfaceStore.d.ts +21 -0
  23. package/dist/hooks/store/useAppNotificationStore.d.ts +22 -0
  24. package/dist/hooks/store/useAppQuickActionsStore.d.ts +17 -0
  25. package/dist/hooks/store/useAppSettingsStore.d.ts +18 -0
  26. package/dist/hooks/store/useDraftMessagesStore.d.ts +2 -2
  27. package/dist/hooks/store/useProfileStore.d.ts +9 -0
  28. package/dist/hooks/store/useUserSettingsStore.d.ts +11 -0
  29. package/dist/hooks/useAppAuthorization.d.ts +14 -0
  30. package/dist/hooks/useNotification.d.ts +7 -2
  31. package/dist/hooks/usePageFocus.d.ts +5 -1
  32. package/dist/hooks/useResizeScreenWidth.d.ts +10 -0
  33. package/dist/index.es.js +14107 -13716
  34. package/dist/index.umd.js +42 -42
  35. package/dist/lib/utils.d.ts +4 -2
  36. package/dist/locales/el/translation.json.d.ts +13 -3
  37. package/dist/locales/en/translation.json.d.ts +13 -3
  38. package/dist/locales/ua/translation.json.d.ts +12 -1
  39. package/package.json +36 -25
  40. package/dist/components/home/main/chat-info.d.ts +0 -7
  41. package/dist/hooks/store/useAppStore.d.ts +0 -64
  42. package/dist/hooks/useNotificationSound.d.ts +0 -2
  43. package/dist/notifications.d.ts +0 -2
  44. /package/dist/{hooks → helpers}/debounce.d.ts +0 -0
  45. /package/dist/{i18n.d.ts → helpers/i18n.d.ts} +0 -0
  46. /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 '../../../../node_modules/connectycube/dist/types/types';
2
- declare function useNotification(): (userId: number, message: Chat.Message) => Promise<void>;
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;
@@ -1,2 +1,6 @@
1
- declare function usePageFocus(): boolean;
1
+ type PageFocusHook = {
2
+ isFocused: boolean;
3
+ isBlurred: boolean;
4
+ };
5
+ declare function usePageFocus(): PageFocusHook;
2
6
  export default usePageFocus;
@@ -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;