cometchat-visual-builder-no-code 1.0.7-test → 1.0.10-test1

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.
@@ -84,5 +84,6 @@ export interface CometChatSettingsInterface {
84
84
  customCss: string;
85
85
  };
86
86
  };
87
+ name?: string;
87
88
  }
88
89
  export declare const CometChatSettings: CometChatSettingsInterface;
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
2
  import '../../styles/CometChatCreateGroup/CometChatCreateGroup.css';
3
- import { Group } from '@cometchat/chat-sdk-javascript';
4
3
  interface CreateGroupProps {
5
4
  setShowCreateGroup: React.Dispatch<React.SetStateAction<boolean>>;
6
- onGroupCreated?: (group: Group) => void;
5
+ onGroupCreated?: (group: CometChat.Group) => void;
7
6
  }
8
7
  declare const CometChatCreateGroup: ({ setShowCreateGroup, onGroupCreated }: CreateGroupProps) => import("react/jsx-runtime").JSX.Element;
9
8
  export default CometChatCreateGroup;
@@ -1,7 +1,6 @@
1
- import { Group } from '@cometchat/chat-sdk-javascript';
2
1
  import '../../styles/CometChatSelector/CometChatSelector.css';
3
2
  interface joinPasswordGroupProps {
4
- group: Group;
3
+ group: CometChat.Group;
5
4
  onHide?: () => void;
6
5
  onProtectedGroupJoin?: (group: CometChat.Group) => void;
7
6
  }
@@ -1,3 +1,3 @@
1
- import "../../styles/CometChatLogin/CometChatAppCredentials.css";
1
+ import '../../styles/CometChatLogin/CometChatAppCredentials.css';
2
2
  declare const CometChatAppCredentials: () => import("react/jsx-runtime").JSX.Element;
3
3
  export default CometChatAppCredentials;
@@ -1,19 +1,18 @@
1
1
  import React, { Dispatch, SetStateAction } from 'react';
2
- import { Call, Conversation, Group, User } from '@cometchat/chat-sdk-javascript';
3
2
  import '../../styles/CometChatSelector/CometChatSelector.css';
4
3
  import { CallLog } from '@cometchat/calls-sdk-javascript';
5
4
  interface SelectorProps {
6
- group?: Group;
5
+ group?: CometChat.Group;
7
6
  showJoinGroup?: boolean;
8
7
  activeTab?: string;
9
- activeItem?: User | Group | Conversation | Call | CallLog;
10
- onSelectorItemClicked?: (input: User | Group | Conversation | Call, type: string) => void;
11
- onProtectedGroupJoin?: (group: Group) => void;
8
+ activeItem?: CometChat.User | CometChat.Group | CometChat.Conversation | CometChat.Call | CallLog;
9
+ onSelectorItemClicked?: (input: CometChat.User | CometChat.Group | CometChat.Conversation | CometChat.Call, type: string) => void;
10
+ onProtectedGroupJoin?: (group: CometChat.Group) => void;
12
11
  showCreateGroup?: boolean;
13
12
  setShowCreateGroup?: Dispatch<SetStateAction<boolean>>;
14
13
  onHide?: () => void;
15
14
  onNewChatClicked?: () => void;
16
- onGroupCreated?: (group: Group) => void;
15
+ onGroupCreated?: (group: CometChat.Group) => void;
17
16
  hideCreateGroupButton?: boolean;
18
17
  }
19
18
  declare const MemoizedCometChatSelector: React.MemoExoticComponent<(props: SelectorProps) => import("react/jsx-runtime").JSX.Element>;
@@ -1,15 +1,17 @@
1
- import React, { ReactNode } from 'react';
1
+ import React, { ReactNode } from "react";
2
2
  interface CometChatContextInterface {
3
- chatFeatures: CometChatSettingsInterface['chatFeatures'];
4
- callFeatures: CometChatSettingsInterface['callFeatures'];
5
- styleFeatures: CometChatSettingsInterface['style'];
6
- layoutFeatures: CometChatSettingsInterface['layout'];
7
- noCodeFeatures: CometChatSettingsInterface['noCode'];
8
- setChatFeatures: React.Dispatch<React.SetStateAction<CometChatSettingsInterface['chatFeatures']>>;
9
- setCallFeatures: React.Dispatch<React.SetStateAction<CometChatSettingsInterface['callFeatures']>>;
10
- setStyleFeatures: React.Dispatch<React.SetStateAction<CometChatSettingsInterface['style']>>;
11
- setLayoutFeatures: React.Dispatch<React.SetStateAction<CometChatSettingsInterface['layout']>>;
12
- setNoCodeFeatures: React.Dispatch<React.SetStateAction<CometChatSettingsInterface['noCode']>>;
3
+ chatFeatures: CometChatSettingsInterface["chatFeatures"];
4
+ callFeatures: CometChatSettingsInterface["callFeatures"];
5
+ styleFeatures: CometChatSettingsInterface["style"];
6
+ layoutFeatures: CometChatSettingsInterface["layout"];
7
+ noCodeFeatures: CometChatSettingsInterface["noCode"];
8
+ builderOrNocodeName: CometChatSettingsInterface["name"];
9
+ setChatFeatures: React.Dispatch<React.SetStateAction<CometChatSettingsInterface["chatFeatures"]>>;
10
+ setCallFeatures: React.Dispatch<React.SetStateAction<CometChatSettingsInterface["callFeatures"]>>;
11
+ setStyleFeatures: React.Dispatch<React.SetStateAction<CometChatSettingsInterface["style"]>>;
12
+ setLayoutFeatures: React.Dispatch<React.SetStateAction<CometChatSettingsInterface["layout"]>>;
13
+ setNoCodeFeatures: React.Dispatch<React.SetStateAction<CometChatSettingsInterface["noCode"]>>;
14
+ setBuilderOrNocodeName: React.Dispatch<React.SetStateAction<CometChatSettingsInterface["name"]>>;
13
15
  }
14
16
  interface CometChatProviderProps {
15
17
  children: ReactNode;
@@ -103,5 +105,6 @@ export interface CometChatSettingsInterface {
103
105
  customCss: string;
104
106
  };
105
107
  };
108
+ name?: string;
106
109
  }
107
110
  export {};
@@ -1,3 +1,4 @@
1
+ import { CometChat } from "@cometchat/chat-sdk-javascript";
1
2
  declare let appID: string;
2
3
  declare let appRegion: string;
3
4
  declare let authKey: string;
@@ -10,24 +11,37 @@ export interface VcbData {
10
11
  isDocked?: boolean;
11
12
  height?: string;
12
13
  width?: string;
14
+ chatType?: 'user' | 'group';
15
+ defaultChatID?: string;
13
16
  }
14
17
  export declare const vcbData: VcbData;
18
+ export declare const listeners: Record<string, Function>;
15
19
  declare const CometChatApp: {
16
20
  init: (config: {
17
21
  appID: string;
18
22
  appRegion: string;
19
23
  authKey: string;
20
24
  }) => Promise<boolean>;
21
- login: ({ uid }: {
22
- uid: string;
25
+ login: ({ uid, authToken }: {
26
+ uid?: string | undefined;
27
+ authToken?: string | undefined;
23
28
  }) => Promise<import("@cometchat/chat-sdk-javascript").User>;
24
- logout: () => void;
29
+ logout: () => Promise<void>;
25
30
  launch: (config: {
26
31
  variantID?: string;
27
32
  targetElementID: string;
28
33
  isDocked?: boolean;
29
34
  height?: string;
30
35
  width?: string;
36
+ chatType?: 'user' | 'group';
37
+ defaultChatID?: string;
31
38
  }) => void;
39
+ on: (eventName: string, callback: Function) => void;
40
+ callUser: (uid: string) => Promise<void>;
41
+ callGroup: (guid: string) => Promise<void>;
42
+ createOrUpdateUser: (user: CometChat.User) => Promise<import("@cometchat/chat-sdk-javascript").User>;
43
+ createOrUpdateGroup: (groupParams: CometChat.Group) => Promise<import("@cometchat/chat-sdk-javascript").Group>;
44
+ localize: (language: string) => void;
45
+ CometChat: typeof CometChat;
32
46
  };
33
47
  export default CometChatApp;
@@ -2,6 +2,7 @@ import React from "react";
2
2
  interface DockedChatViewInterface {
3
3
  children: React.ReactNode;
4
4
  isMobile?: boolean | undefined;
5
+ type?: 'user' | 'group';
5
6
  }
6
- declare const DockedChatView: ({ children, isMobile }: DockedChatViewInterface) => import("react/jsx-runtime").JSX.Element;
7
+ declare const DockedChatView: ({ children, isMobile, type }: DockedChatViewInterface) => import("react/jsx-runtime").JSX.Element;
7
8
  export default DockedChatView;
@@ -1,5 +1,8 @@
1
1
  interface EmbeddedChatViewInterface {
2
2
  isMobile?: boolean;
3
+ user?: CometChat.User;
4
+ group?: CometChat.Group;
5
+ type?: 'user' | 'group';
3
6
  }
4
- declare const EmbeddedChatView: ({ isMobile }: EmbeddedChatViewInterface) => import("react/jsx-runtime").JSX.Element;
7
+ declare const EmbeddedChatView: ({ isMobile, user, group, type }: EmbeddedChatViewInterface) => import("react/jsx-runtime").JSX.Element;
5
8
  export default EmbeddedChatView;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Custom React hook to fetch and apply CometChat noCode styles (CSS & JS) dynamically.
3
+ *
4
+ * @param variantID - The unique nocode vcb ID provided by CometChat.
5
+ * @param app - The unique nocode App ID provided by CometChat.
6
+ */
7
+ declare const useInjectNoCodeStyles: (appId?: string, variantID?: string) => void;
8
+ export default useInjectNoCodeStyles;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import "./App.css";
2
+ export declare const showOutgoingCallUI: (call: any) => void;
3
+ export declare const showOnGoingCallUI: (sessionId: string) => void;
2
4
  declare global {
3
5
  interface Window {
4
6
  MyReactComponents: any;