@ethora/chat-component 25.3.21 → 25.4.2

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.
@@ -1,3 +1,4 @@
1
1
  import { Client } from '@xmpp/client';
2
+ import { Element } from '@xmpp/xml';
2
3
 
3
- export declare const presenceInRoom: (client: Client, roomJID: string) => Promise<unknown>;
4
+ export declare const presenceInRoom: (client: Client, roomJID: string, delay?: number) => Promise<Element>;
@@ -28,7 +28,7 @@ export declare class XmppClient implements XmppClientInterface {
28
28
  createRoomStanza(title: string, description: string): Promise<string>;
29
29
  inviteRoomRequestStanza(to: string, roomJid: string): Promise<void>;
30
30
  leaveTheRoomStanza: (roomJID: string) => void;
31
- presenceInRoomStanza: (roomJID: string) => void;
31
+ presenceInRoomStanza: (roomJID: string, settleDelay?: number) => Promise<void>;
32
32
  getHistoryStanza: (chatJID: string, max: number, before?: number, otherStanzaId?: string) => Promise<import('../types/types').IMessage[]>;
33
33
  getLastMessageArchiveStanza(roomJID: string): void;
34
34
  setRoomImageStanza: (roomJid: string, roomThumbnail: string, type: string, roomBackground?: string) => void;
@@ -13,6 +13,7 @@ interface RoomMessagesState {
13
13
  reportRoom: {
14
14
  isOpen: boolean;
15
15
  };
16
+ loadingText?: string;
16
17
  }
17
18
  export declare const roomsStore: import('@reduxjs/toolkit').Slice<RoomMessagesState, {
18
19
  addRoom(state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
@@ -50,6 +51,7 @@ export declare const roomsStore: import('@reduxjs/toolkit').Slice<RoomMessagesSt
50
51
  setIsLoading: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
51
52
  chatJID?: string;
52
53
  loading: boolean;
54
+ loadingText?: string;
53
55
  }>) => void;
54
56
  setLastViewedTimestamp: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
55
57
  chatJID: string;
@@ -105,6 +107,7 @@ export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOption
105
107
  }, "roomMessages/setComposing">, setIsLoading: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
106
108
  chatJID?: string;
107
109
  loading: boolean;
110
+ loadingText?: string;
108
111
  }, "roomMessages/setIsLoading">, setLastViewedTimestamp: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
109
112
  chatJID: string;
110
113
  timestamp: number;
@@ -190,6 +190,21 @@ export interface XmppState {
190
190
  client: any;
191
191
  loading: boolean;
192
192
  }
193
+ export interface FBConfig {
194
+ apiKey: string;
195
+ authDomain: string;
196
+ projectId: string;
197
+ storageBucket: string;
198
+ messagingSenderId: string;
199
+ appId: string;
200
+ }
201
+ export interface MessageBubble {
202
+ backgroundMessageUser?: string;
203
+ backgroundMessage?: string;
204
+ colorUser?: string;
205
+ color?: string;
206
+ borderRadius?: number;
207
+ }
193
208
  export interface IConfig {
194
209
  disableHeader?: boolean;
195
210
  disableMedia?: boolean;
@@ -199,14 +214,7 @@ export interface IConfig {
199
214
  };
200
215
  googleLogin?: {
201
216
  enabled: boolean;
202
- firebaseConfig: {
203
- apiKey: string;
204
- authDomain: string;
205
- projectId: string;
206
- storageBucket: string;
207
- messagingSenderId: string;
208
- appId: string;
209
- };
217
+ firebaseConfig: FBConfig;
210
218
  };
211
219
  jwtLogin?: {
212
220
  token: string;
@@ -242,13 +250,7 @@ export interface IConfig {
242
250
  color?: string;
243
251
  image?: any;
244
252
  };
245
- bubleMessage?: {
246
- backgroundMessageUser?: string;
247
- backgroundMessage?: string;
248
- colorUser?: string;
249
- color?: string;
250
- borderRadius?: number;
251
- };
253
+ bubleMessage?: MessageBubble;
252
254
  headerLogo?: any;
253
255
  headerMenu?: () => void;
254
256
  headerChatMenu?: () => void;
@@ -268,8 +270,13 @@ export interface IConfig {
268
270
  disableSentLogic?: boolean;
269
271
  initBeforeLoad?: boolean;
270
272
  newArch?: boolean;
271
- logoutCallback?: () => Promise<void>;
272
273
  qrUrl?: string;
274
+ secondarySendButton?: {
275
+ enabled: boolean;
276
+ messageEdit: string;
277
+ buttonText: string;
278
+ buttonStyles?: React.CSSProperties;
279
+ };
273
280
  }
274
281
  type PartialRoomWithMandatoryKeys = Partial<IRoom> & Pick<IRoom, 'jid' | 'title'>;
275
282
  export interface xmppSettingsInterface {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethora/chat-component",
3
- "version": "25.03.21",
3
+ "version": "25.04.02",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",