@cometchat/chat-uikit-react 5.0.2 → 5.0.3
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/dist/index.d.ts +95 -48
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles/CometChatUsers.css +1 -1
- package/dist/styles/components/CometChatUsers.css +1 -1
- package/dist/types/CometChatUIKit/CometChatUIKitUtility.d.ts +1 -0
- package/dist/types/components/BaseComponents/CometChatAudioBubble/src/webaudio.d.ts +2 -2
- package/dist/types/components/BaseComponents/CometChatEmojiKeyboard/useCometChatEmojiKeyboard.d.ts +1 -0
- package/dist/types/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts +1 -0
- package/dist/types/components/Calling/CometChatCallLogs/CometChatCallLogs.d.ts +1 -0
- package/dist/types/components/Calling/CometChatIncomingCall/CometChatIncomingCall.d.ts +1 -0
- package/dist/types/components/Calling/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +1 -0
- package/dist/types/components/Calling/OutgoingCallConfiguration.d.ts +1 -0
- package/dist/types/components/CometChatConversations/controller.d.ts +1 -0
- package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +1 -0
- package/dist/types/components/CometChatThreadedMessagePreview/CometChatThreadedMessagePreview.d.ts +1 -0
- package/dist/types/components/CometChatUserMemberWrapper/CometChatUserMemberWrapper.d.ts +1 -0
- package/dist/types/components/CometChatUsers/controller.d.ts +1 -0
- package/dist/types/components/Extensions/Stickers/StickersExtensionDecorator.d.ts +1 -0
- package/dist/types/components/Extensions/ThumbnailGeneration/ThumbnailGenerationExtensionDecorator.d.ts +1 -0
- package/dist/types/modals/CometChatActionsView.d.ts +1 -0
- package/dist/types/modals/CometChatMessageTemplate.d.ts +1 -0
- package/dist/types/resources/CometChatLocalize/cometchat-localize.d.ts +58 -12
- package/dist/types/utils/DataSource.d.ts +1 -0
- package/dist/types/utils/DataSourceDecorator.d.ts +1 -0
- package/dist/types/utils/MessagesDataSource.d.ts +2 -0
- package/package.json +3 -2
- package/dist/types/utils/CalendarObject.d.ts +0 -27
- package/dist/types/utils/Interface.d.ts +0 -37
|
@@ -31,8 +31,8 @@ declare class WebAudioPlayer extends EventEmitter<WebAudioPlayerEvents> {
|
|
|
31
31
|
constructor(audioContext?: AudioContext);
|
|
32
32
|
/** Subscribe to an event. Returns an unsubscribe function. */
|
|
33
33
|
addEventListener: <EventName extends keyof WebAudioPlayerEvents>(event: EventName, listener: (...args: WebAudioPlayerEvents[EventName]) => void, options?: {
|
|
34
|
-
once?: boolean;
|
|
35
|
-
}) => () => void;
|
|
34
|
+
once?: boolean | undefined;
|
|
35
|
+
} | undefined) => () => void;
|
|
36
36
|
/** Unsubscribe from an event */
|
|
37
37
|
removeEventListener: <EventName extends keyof WebAudioPlayerEvents>(event: EventName, listener: (...args: WebAudioPlayerEvents[EventName]) => void) => void;
|
|
38
38
|
load(): Promise<void>;
|
|
@@ -529,6 +529,10 @@ declare class CometChatLocalize {
|
|
|
529
529
|
ADD_MEMBERS: string;
|
|
530
530
|
SEND_MESSAGE: string;
|
|
531
531
|
UNBLOCK_USER: string;
|
|
532
|
+
/**
|
|
533
|
+
* Returns rtl or ltr based on the active language
|
|
534
|
+
* @returns {String} the direction of the active langauge
|
|
535
|
+
*/
|
|
532
536
|
BLOCK_USER: string;
|
|
533
537
|
DELETE_AND_EXIT: string;
|
|
534
538
|
LEAVE_GROUP: string;
|
|
@@ -905,7 +909,11 @@ declare class CometChatLocalize {
|
|
|
905
909
|
TYPING: string;
|
|
906
910
|
IS_TYPING: string;
|
|
907
911
|
CLOSE: string;
|
|
908
|
-
ENTER_GROUP_NAME: string;
|
|
912
|
+
ENTER_GROUP_NAME: string; /**
|
|
913
|
+
* Accepts the string to localize and return the localized string
|
|
914
|
+
* @param {String} str
|
|
915
|
+
* @returns {String} localized str
|
|
916
|
+
*/
|
|
909
917
|
ADD_MEMBERS: string;
|
|
910
918
|
SEND_MESSAGE: string;
|
|
911
919
|
UNBLOCK_USER: string;
|
|
@@ -1610,7 +1618,7 @@ declare class CometChatLocalize {
|
|
|
1610
1618
|
SEARCH_EMOJI: string;
|
|
1611
1619
|
WOULD__YOU_LIKE_TO_DELETE_THIS_CONVERSATION: string;
|
|
1612
1620
|
GROUPS: string;
|
|
1613
|
-
WRONG_FILE_TYPE: string;
|
|
1621
|
+
WRONG_FILE_TYPE: string; /**Properties and constants */
|
|
1614
1622
|
SHARED: string;
|
|
1615
1623
|
SOUND_MANAGER: string;
|
|
1616
1624
|
THEME: string;
|
|
@@ -1677,7 +1685,9 @@ declare class CometChatLocalize {
|
|
|
1677
1685
|
MISSED_VIDEO_CALL: string;
|
|
1678
1686
|
CUSTOM_MESSAGE_POLL: string;
|
|
1679
1687
|
CUSTOM_MESSAGE_STICKER: string;
|
|
1680
|
-
CUSTOM_MESSAGE_DOCUMENT: string;
|
|
1688
|
+
CUSTOM_MESSAGE_DOCUMENT: string; /**
|
|
1689
|
+
* Sets the default lannguage if no language is passed in init method
|
|
1690
|
+
*/
|
|
1681
1691
|
CUSTOM_MESSAGE_WHITEBOARD: string;
|
|
1682
1692
|
ONLINE: string;
|
|
1683
1693
|
ADMINISTRATOR: string;
|
|
@@ -2086,7 +2096,9 @@ declare class CometChatLocalize {
|
|
|
2086
2096
|
MEMBER: string;
|
|
2087
2097
|
EDITED: string;
|
|
2088
2098
|
TODAY: string;
|
|
2089
|
-
YESTERDAY: string;
|
|
2099
|
+
YESTERDAY: string; /**
|
|
2100
|
+
* Sets the default lannguage if no language is passed in init method
|
|
2101
|
+
*/
|
|
2090
2102
|
SUNDAY: string;
|
|
2091
2103
|
MONDAY: string;
|
|
2092
2104
|
TUESDAY: string;
|
|
@@ -2398,6 +2410,7 @@ declare class CometChatLocalize {
|
|
|
2398
2410
|
GROUPS: string;
|
|
2399
2411
|
WRONG_FILE_TYPE: string;
|
|
2400
2412
|
SHARED: string;
|
|
2413
|
+
/**Properties and constants */
|
|
2401
2414
|
SOUND_MANAGER: string;
|
|
2402
2415
|
THEME: string;
|
|
2403
2416
|
DELETE_MSG_TEXT: string;
|
|
@@ -2426,7 +2439,7 @@ declare class CometChatLocalize {
|
|
|
2426
2439
|
PASSWORD: string;
|
|
2427
2440
|
CONTINUE: string;
|
|
2428
2441
|
NO_CHATS_SELECTED: string;
|
|
2429
|
-
NO_USERS_SELECTED: string;
|
|
2442
|
+
NO_USERS_SELECTED: string; /**Override resources */
|
|
2430
2443
|
NO_GROUPS_SELECTED: string;
|
|
2431
2444
|
SELECT_DAY: string;
|
|
2432
2445
|
SELECT_TIME: string;
|
|
@@ -2436,7 +2449,10 @@ declare class CometChatLocalize {
|
|
|
2436
2449
|
GROUP_PASSWORD_BLANK: string;
|
|
2437
2450
|
GROUP_NAME_BLANK: string;
|
|
2438
2451
|
GROUP_TYPE_BLANK: string;
|
|
2439
|
-
DELETE_CONVERSATION: string;
|
|
2452
|
+
DELETE_CONVERSATION: string; /**
|
|
2453
|
+
* Returns the browser language
|
|
2454
|
+
* @returns {String} browser langauge i.e. en-US
|
|
2455
|
+
*/
|
|
2440
2456
|
ADD_TO_CHAT: string;
|
|
2441
2457
|
MORE: string;
|
|
2442
2458
|
COPY: string;
|
|
@@ -2444,7 +2460,10 @@ declare class CometChatLocalize {
|
|
|
2444
2460
|
MESSAGE_IMAGE: string;
|
|
2445
2461
|
MESSAGE_FILE: string;
|
|
2446
2462
|
MESSAGE_VIDEO: string;
|
|
2447
|
-
MESSAGE_AUDIO: string;
|
|
2463
|
+
MESSAGE_AUDIO: string; /**
|
|
2464
|
+
* Returns the language code
|
|
2465
|
+
* @returns {String} language code i.e. en
|
|
2466
|
+
*/
|
|
2448
2467
|
CUSTOM_MESSAGE: string;
|
|
2449
2468
|
SELECT_A_DATE: string;
|
|
2450
2469
|
TIME_ZONE: string;
|
|
@@ -2505,6 +2524,10 @@ declare class CometChatLocalize {
|
|
|
2505
2524
|
LOADING: string;
|
|
2506
2525
|
REPLY: string;
|
|
2507
2526
|
REPLIES: string;
|
|
2527
|
+
/**
|
|
2528
|
+
* Returns rtl or ltr based on the active language
|
|
2529
|
+
* @returns {String} the direction of the active langauge
|
|
2530
|
+
*/
|
|
2508
2531
|
AI: string;
|
|
2509
2532
|
SMART_REPLIES: string;
|
|
2510
2533
|
CONVERSATION_STARTER: string;
|
|
@@ -3611,10 +3634,20 @@ declare class CometChatLocalize {
|
|
|
3611
3634
|
SELECT_TIME: string;
|
|
3612
3635
|
NO_CALLS_SELECTED: string;
|
|
3613
3636
|
SELECT__GROUP: string;
|
|
3637
|
+
/**
|
|
3638
|
+
* Initializes localization with the specified language and custom resources.
|
|
3639
|
+
* @param {string} [language=""] - The language code to set.
|
|
3640
|
+
* @param {object} [resources={}] - Custom translations to override defaults.
|
|
3641
|
+
*/
|
|
3614
3642
|
SELECT__USER: string;
|
|
3615
3643
|
GROUP_PASSWORD_BLANK: string;
|
|
3616
3644
|
GROUP_NAME_BLANK: string;
|
|
3617
3645
|
GROUP_TYPE_BLANK: string;
|
|
3646
|
+
/**
|
|
3647
|
+
* Initializes localization with the specified language and custom resources.
|
|
3648
|
+
* @param {string} [language=""] - The language code to set.
|
|
3649
|
+
* @param {object} [resources={}] - Custom translations to override defaults.
|
|
3650
|
+
*/
|
|
3618
3651
|
DELETE_CONVERSATION: string;
|
|
3619
3652
|
ADD_TO_CHAT: string;
|
|
3620
3653
|
MORE: string;
|
|
@@ -3656,7 +3689,10 @@ declare class CometChatLocalize {
|
|
|
3656
3689
|
PREFERENCES: string;
|
|
3657
3690
|
MEMBERS: string;
|
|
3658
3691
|
MEMBER: string;
|
|
3659
|
-
EDITED: string;
|
|
3692
|
+
EDITED: string; /**
|
|
3693
|
+
* Returns the language code
|
|
3694
|
+
* @returns {String} language code i.e. en
|
|
3695
|
+
*/
|
|
3660
3696
|
TODAY: string;
|
|
3661
3697
|
YESTERDAY: string;
|
|
3662
3698
|
SUNDAY: string;
|
|
@@ -4023,7 +4059,7 @@ declare class CometChatLocalize {
|
|
|
4023
4059
|
MEETING_SCHEDULED: string;
|
|
4024
4060
|
SOMETHING_WRONG: string;
|
|
4025
4061
|
MEETING_SLOT_BOOK: string;
|
|
4026
|
-
MEETING_BOOK_NEW_SLOT: string;
|
|
4062
|
+
MEETING_BOOK_NEW_SLOT: string; /**Override resources */
|
|
4027
4063
|
MEETING_NO_SLOTS_AVAILABLE: string;
|
|
4028
4064
|
MEETING_TRY_DIFFERENT_DATE: string;
|
|
4029
4065
|
NO_TIME_SLOTS_AVAILABLE: string;
|
|
@@ -4380,7 +4416,11 @@ declare class CometChatLocalize {
|
|
|
4380
4416
|
CONVERSATIONS: string;
|
|
4381
4417
|
CONVERSATION_LIST: string;
|
|
4382
4418
|
MESSAGES: string;
|
|
4383
|
-
MESSAGE_HEADER: string;
|
|
4419
|
+
MESSAGE_HEADER: string; /**
|
|
4420
|
+
* Initializes localization with the specified language and custom resources.
|
|
4421
|
+
* @param {string} [language=""] - The language code to set.
|
|
4422
|
+
* @param {object} [resources={}] - Custom translations to override defaults.
|
|
4423
|
+
*/
|
|
4384
4424
|
MESSAGE_LIST: string;
|
|
4385
4425
|
MESSAGE_COMPOSER: string;
|
|
4386
4426
|
USERS_WITH_MESSAGES: string;
|
|
@@ -4460,7 +4500,10 @@ declare class CometChatLocalize {
|
|
|
4460
4500
|
SEND_MESSAGE: string;
|
|
4461
4501
|
UNBLOCK_USER: string;
|
|
4462
4502
|
BLOCK_USER: string;
|
|
4463
|
-
DELETE_AND_EXIT: string;
|
|
4503
|
+
DELETE_AND_EXIT: string; /**
|
|
4504
|
+
* Returns true if the active language is rtl otherwise return false
|
|
4505
|
+
* @returns {Boolean} whether the language is rtl or not
|
|
4506
|
+
*/
|
|
4464
4507
|
LEAVE_GROUP: string;
|
|
4465
4508
|
CREATE_GROUP: string;
|
|
4466
4509
|
SHARED_MEDIA: string;
|
|
@@ -4807,7 +4850,10 @@ declare class CometChatLocalize {
|
|
|
4807
4850
|
SELECT_A_DATE: string;
|
|
4808
4851
|
TIME_ZONE: string;
|
|
4809
4852
|
MEETING_SCHEDULED: string;
|
|
4810
|
-
SOMETHING_WRONG: string;
|
|
4853
|
+
SOMETHING_WRONG: string; /**
|
|
4854
|
+
* Returns the active language. Return fallback language if translation is not available for the active language
|
|
4855
|
+
* @returns {String} active language
|
|
4856
|
+
*/
|
|
4811
4857
|
MEETING_SLOT_BOOK: string;
|
|
4812
4858
|
MEETING_BOOK_NEW_SLOT: string;
|
|
4813
4859
|
MEETING_NO_SLOTS_AVAILABLE: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CometChatMentionsFormatter } from "../formatters/CometChatFormatters/CometChatMentionsFormatter/CometChatMentionsFormatter";
|
|
2
3
|
import { CometChatTextFormatter } from "../formatters/CometChatFormatters/CometChatTextFormatter";
|
|
3
4
|
import { CometChatUrlsFormatter } from "../formatters/CometChatFormatters/CometChatUrlsFormatter/CometChatUrlsFormatter";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
1
3
|
import { DataSource } from "./DataSource";
|
|
2
4
|
import { additionalParams } from "./ConversationUtils";
|
|
3
5
|
import { CometChatMentionsFormatter } from "../formatters/CometChatFormatters/CometChatMentionsFormatter/CometChatMentionsFormatter";
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cometchat/chat-uikit-react",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "Ready-to-use Chat UI Components for React(Javascript/Web)",
|
|
5
5
|
"author": "CometChat",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@cometchat/chat-sdk-javascript": "^4.0.10",
|
|
8
8
|
"@rollup/plugin-json": "^6.1.0",
|
|
9
|
+
"postcss": "^8.5.2",
|
|
9
10
|
"rxjs": "^7.8.1"
|
|
10
11
|
},
|
|
11
12
|
"scripts": {
|
|
@@ -67,4 +68,4 @@
|
|
|
67
68
|
"bugs": {
|
|
68
69
|
"url": "https://help.cometchat.com/hc/en-us"
|
|
69
70
|
}
|
|
70
|
-
}
|
|
71
|
+
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents the configuration for a calendar object.
|
|
3
|
-
*/
|
|
4
|
-
export declare class CalendarObject {
|
|
5
|
-
/** Custom formatting for dates that fall on the same day. */
|
|
6
|
-
sameDay?: string;
|
|
7
|
-
/** Custom formatting for dates that fall on the previous day. */
|
|
8
|
-
lastDay?: string;
|
|
9
|
-
/** Custom formatting for dates within the last week. */
|
|
10
|
-
lastWeek?: string;
|
|
11
|
-
/** Custom formatting for dates that do not fit other categories. */
|
|
12
|
-
otherDays?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Relative time formatting for specific time units.
|
|
15
|
-
*/
|
|
16
|
-
relativeTime?: {
|
|
17
|
-
/** Formatting for minutes (singular). */
|
|
18
|
-
minute?: string;
|
|
19
|
-
/** Formatting for minutes (plural). */
|
|
20
|
-
minutes?: string;
|
|
21
|
-
/** Formatting for hours (singular). */
|
|
22
|
-
hour?: string;
|
|
23
|
-
/** Formatting for hours (plural). */
|
|
24
|
-
hours?: string;
|
|
25
|
-
};
|
|
26
|
-
constructor(calendaObject: CalendarObject);
|
|
27
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { CalendarObject } from "./CalendarObject";
|
|
2
|
-
/**
|
|
3
|
-
* Represents the configuration for date and time localization.
|
|
4
|
-
*/
|
|
5
|
-
export interface DateLocaleConfig {
|
|
6
|
-
/** Format string for displaying dates. */
|
|
7
|
-
dateFormat?: string;
|
|
8
|
-
/** Format string for displaying time. */
|
|
9
|
-
timeFormat?: string;
|
|
10
|
-
/** Format string for displaying both date and time. */
|
|
11
|
-
dateTimeFormat?: string;
|
|
12
|
-
/** Custom relative time formatting defined using a CalendarObject. */
|
|
13
|
-
relativeTimeFormat?: CalendarObject;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Represents the localization settings for an application or component.
|
|
17
|
-
*/
|
|
18
|
-
export interface LocalisationSettings {
|
|
19
|
-
/** The language code (e.g., 'en', 'fr') for the current localization. */
|
|
20
|
-
language?: string;
|
|
21
|
-
/** Object containing key-value pairs for translations in the current language. */
|
|
22
|
-
translationsForLanguage?: {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
};
|
|
25
|
-
/** Whether to disable automatic language detection. */
|
|
26
|
-
disableAutoDetection?: boolean;
|
|
27
|
-
/** The fallback language code to use if the primary language is not available. */
|
|
28
|
-
fallbackLanguage?: string;
|
|
29
|
-
/** Whether to disable localization for date and time values. */
|
|
30
|
-
disableDateTimeLocalisation?: boolean;
|
|
31
|
-
/** The timezone for date and time formatting. */
|
|
32
|
-
timezone?: string;
|
|
33
|
-
/** Custom calendar formatting defined using a CalendarObject. */
|
|
34
|
-
calendarObject?: CalendarObject;
|
|
35
|
-
/** Function to handle missing translation keys. */
|
|
36
|
-
missingKeyHandler?: (key: string) => string;
|
|
37
|
-
}
|