@cometchat/chat-uikit-react-native 4.0.2 → 4.1.1

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 (175) hide show
  1. package/README.md +1 -1
  2. package/ios/FileManager.m +1 -1
  3. package/package.json +3 -3
  4. package/src/AI/AIAssistBot/AIAssistBotDecorator.tsx +164 -0
  5. package/src/AI/AIAssistBot/AIAssistBotExtension.tsx +22 -0
  6. package/src/AI/AIAssistBot/AIAssistBotStyle.ts +43 -0
  7. package/src/AI/AIAssistBot/AIAssistBotView.tsx +294 -0
  8. package/src/AI/AIAssistBot/configuration.ts +22 -0
  9. package/src/AI/AIAssistBot/resources/index.ts +5 -0
  10. package/src/AI/{configuration.ts → AIBaseConfiguration.ts} +3 -6
  11. package/src/AI/AIBaseStyle.ts +58 -0
  12. package/src/AI/AIConversationStarter/AIConversationStarter.ts +5 -19
  13. package/src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx +144 -130
  14. package/src/AI/AIConversationStarter/AIConversationStarterStyle.ts +11 -6
  15. package/src/AI/AIConversationStarter/configuration.ts +10 -17
  16. package/src/AI/AIConversationSummary/AIConversationSummaryDecorator.tsx +175 -0
  17. package/src/AI/AIConversationSummary/AIConversationSummaryExtension.ts +21 -0
  18. package/src/AI/AIConversationSummary/AIConversationSummaryStyle.tsx +20 -0
  19. package/src/AI/AIConversationSummary/AIConversationSummaryView.tsx +190 -0
  20. package/src/AI/AIConversationSummary/configuration.ts +14 -0
  21. package/src/AI/AIConversationSummary/resources/close.png +0 -0
  22. package/src/AI/AIConversationSummary/resources/index.ts +5 -0
  23. package/src/AI/AIExtensionDataSource.ts +17 -12
  24. package/src/AI/AIOptionsStyle.ts +14 -0
  25. package/src/AI/AISmartReplies/AISmartReplies.ts +6 -15
  26. package/src/AI/AISmartReplies/AISmartRepliesDecorator.tsx +302 -0
  27. package/src/AI/AISmartReplies/AISmartRepliesStyle.ts +1 -1
  28. package/src/AI/AISmartReplies/configuration.ts +4 -11
  29. package/src/AI/resources/index.ts +0 -2
  30. package/src/AI/utils.ts +3 -3
  31. package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +118 -5
  32. package/src/CometChatMessageComposer/MessageComposerConfiguration.tsx +3 -0
  33. package/src/CometChatMessageComposer/resources/index.ts +2 -0
  34. package/src/CometChatMessageComposer/styles.ts +1 -4
  35. package/src/CometChatMessageList/CometChatMessageList.tsx +52 -35
  36. package/src/CometChatMessages/CometChatMessages.tsx +4 -13
  37. package/src/CometChatMessages/MessagesConfiguration.ts +2 -2
  38. package/src/calls/CallEvents.ts +1 -0
  39. package/src/calls/CallUtils.ts +106 -45
  40. package/src/calls/CallingDetailsUtils.tsx +133 -15
  41. package/src/calls/CallingExtentionDecorator.tsx +56 -45
  42. package/src/calls/CallingPackage.ts +16 -2
  43. package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +9 -10
  44. package/src/calls/CometChatCallLogDetails/CallLogDetailsConfiguration.ts +116 -0
  45. package/src/calls/CometChatCallLogDetails/CallLogDetailsStyle.ts +36 -0
  46. package/src/calls/CometChatCallLogDetails/CometChatCallLogDetails.tsx +308 -0
  47. package/src/calls/CometChatCallLogDetails/index.ts +12 -0
  48. package/src/calls/CometChatCallLogDetails/resources/CloseIcon.png +0 -0
  49. package/src/calls/{CometChatCallDetails → CometChatCallLogDetails}/style.ts +1 -0
  50. package/src/calls/{CometChatCallHistory/CallHistoryConfiguration.ts → CometChatCallLogHistory/CallLogHistoryConfiguration.ts} +15 -27
  51. package/src/calls/CometChatCallLogHistory/CallLogHistoryStyle.ts +46 -0
  52. package/src/calls/CometChatCallLogHistory/CometChatCallLogHistory.tsx +337 -0
  53. package/src/calls/CometChatCallLogHistory/index.ts +12 -0
  54. package/src/calls/CometChatCallLogHistory/resources/incomingcall.png +0 -0
  55. package/src/calls/CometChatCallLogHistory/resources/incomingvideo.png +0 -0
  56. package/src/calls/CometChatCallLogHistory/resources/index.ts +29 -0
  57. package/src/calls/CometChatCallLogHistory/resources/missedcall.png +0 -0
  58. package/src/calls/CometChatCallLogHistory/resources/missedvideo.png +0 -0
  59. package/src/calls/CometChatCallLogHistory/resources/outgoingcall.png +0 -0
  60. package/src/calls/CometChatCallLogHistory/resources/outgoingvideo.png +0 -0
  61. package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/style.ts +2 -1
  62. package/src/calls/CometChatCallLogParticipants/CallLogParticipantsConfiguration.ts +61 -0
  63. package/src/calls/CometChatCallLogParticipants/CallLogParticipantsStyle.ts +59 -0
  64. package/src/calls/CometChatCallLogParticipants/CometChatCallLogParticipants.tsx +220 -0
  65. package/src/calls/CometChatCallLogParticipants/index.ts +12 -0
  66. package/src/calls/CometChatCallLogParticipants/resources/Back.png +0 -0
  67. package/src/calls/CometChatCallLogParticipants/resources/index.ts +4 -0
  68. package/src/calls/CometChatCallLogParticipants/style.ts +24 -0
  69. package/src/calls/CometChatCallLogRecordings/CallLogRecordingsConfiguration.ts +63 -0
  70. package/src/calls/CometChatCallLogRecordings/CallLogRecordingsStyle.ts +63 -0
  71. package/src/calls/CometChatCallLogRecordings/CometChatCallLogRecordings.tsx +253 -0
  72. package/src/calls/CometChatCallLogRecordings/index.ts +12 -0
  73. package/src/calls/CometChatCallLogRecordings/resources/Back.png +0 -0
  74. package/src/calls/CometChatCallLogRecordings/resources/download.png +0 -0
  75. package/src/calls/CometChatCallLogRecordings/resources/index.ts +6 -0
  76. package/src/calls/CometChatCallLogRecordings/style.ts +24 -0
  77. package/src/calls/CometChatCallLogs/CallLogsConfiguration.ts +87 -0
  78. package/src/calls/CometChatCallLogs/CallLogsStyle.ts +95 -0
  79. package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +482 -0
  80. package/src/calls/CometChatCallLogs/index.ts +12 -0
  81. package/src/calls/CometChatCallLogs/resources/Back.png +0 -0
  82. package/src/calls/CometChatCallLogs/resources/Info.png +0 -0
  83. package/src/calls/CometChatCallLogs/resources/Selection.png +0 -0
  84. package/src/calls/CometChatCallLogs/resources/Spinner.png +0 -0
  85. package/src/calls/CometChatCallLogs/resources/check.png +0 -0
  86. package/src/calls/CometChatCallLogs/resources/incomingcall.png +0 -0
  87. package/src/calls/CometChatCallLogs/resources/incomingvideo.png +0 -0
  88. package/src/calls/CometChatCallLogs/resources/index.ts +25 -0
  89. package/src/calls/CometChatCallLogs/resources/missedcall.png +0 -0
  90. package/src/calls/CometChatCallLogs/resources/missedvideo.png +0 -0
  91. package/src/calls/CometChatCallLogs/resources/outgoingcall.png +0 -0
  92. package/src/calls/CometChatCallLogs/resources/outgoingvideo.png +0 -0
  93. package/src/calls/CometChatCallLogs/style.ts +24 -0
  94. package/src/calls/CometChatCallLogsWithDetails/CallLogsWithDetailsConfiguration.ts +9 -0
  95. package/src/calls/{CometChatCallHistoryWithDetails/CometChatCallHistoryWithDetails.tsx → CometChatCallLogsWithDetails/CometChatCallLogsWithDetails.tsx} +17 -16
  96. package/src/calls/CometChatCallLogsWithDetails/index.ts +7 -0
  97. package/src/calls/index.ts +40 -1
  98. package/src/calls/resources/index.ts +3 -1
  99. package/src/calls/resources/nextarrow.png +0 -0
  100. package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +3 -5
  101. package/src/extensions/Stickers/StickersExtensionDecorator.tsx +1 -1
  102. package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +5 -3
  103. package/src/extensions/ThumbnailGeneration/resources/empty.png +0 -0
  104. package/src/extensions/ThumbnailGeneration/resources/index.ts +5 -0
  105. package/src/index.ts +79 -4
  106. package/src/shared/CometChatUiKit/CometChatUIKit.ts +154 -130
  107. package/src/shared/CometChatUiKit/UIKitSettings.ts +2 -2
  108. package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +4 -1
  109. package/src/shared/events/CometChatUIEventHandler/Listener.ts +5 -1
  110. package/src/shared/framework/DataSource.ts +4 -0
  111. package/src/shared/framework/DataSourceDecorator.tsx +5 -0
  112. package/src/shared/framework/MessageDataSource.tsx +4 -1
  113. package/src/shared/index.ts +4 -0
  114. package/src/shared/modals/CometChatCallLogDetailsOptions.ts +23 -0
  115. package/src/shared/modals/CometChatCallLogDetailsTemplate.ts +16 -0
  116. package/src/shared/modals/index.ts +5 -1
  117. package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +19 -5
  118. package/src/shared/resources/CometChatLocalize/resources/de/translation.json +19 -5
  119. package/src/shared/resources/CometChatLocalize/resources/en/translation.json +21 -7
  120. package/src/shared/resources/CometChatLocalize/resources/es/translation.json +19 -5
  121. package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +19 -5
  122. package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +19 -5
  123. package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +19 -5
  124. package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +19 -5
  125. package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +19 -5
  126. package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +19 -5
  127. package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +19 -5
  128. package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +19 -4
  129. package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +19 -5
  130. package/src/shared/resources/CometChatTheme/Palette.ts +16 -0
  131. package/src/shared/utils/DetailsUtils/DetailsUtils.tsx +1 -1
  132. package/src/shared/utils/conversationUtils.ts +1 -1
  133. package/src/shared/views/CometChatAICard/CometChatAICard.tsx +71 -0
  134. package/src/shared/views/CometChatAICard/resources/errormessage.png +0 -0
  135. package/src/shared/views/CometChatAICard/resources/index.ts +4 -0
  136. package/src/shared/views/CometChatAICard/resources/nomessage.png +0 -0
  137. package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +4 -0
  138. package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +11 -7
  139. package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +56 -47
  140. package/src/shared/views/CometChatBottomSheet/style.ts +0 -2
  141. package/src/shared/views/CometChatDate/CometChatDate.tsx +7 -3
  142. package/src/shared/views/CometChatDate/DateConfiguration.ts +4 -0
  143. package/src/shared/views/CometChatDate/style.ts +1 -1
  144. package/src/shared/views/CometChatListItem/CometChatListItem.tsx +31 -19
  145. package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +1 -2
  146. package/src/shared/views/CometChatPanel/CometChatPanel.tsx +51 -0
  147. package/src/shared/views/CometChatPanel/PanelStyle.tsx +43 -0
  148. package/src/shared/views/CometChatPanel/resources/CloseIcon.png +0 -0
  149. package/src/shared/views/CometChatPanel/resources/index.ts +5 -0
  150. package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +7 -5
  151. package/src/AI/AIEnabler.ts +0 -115
  152. package/src/AI/AIEnablerDecorator.tsx +0 -324
  153. package/src/AI/AISmartReplies/AISmartRepliesDecorator.ts +0 -18
  154. package/src/calls/CometChatCallDetails/CallDetailsConfiguration.ts +0 -68
  155. package/src/calls/CometChatCallDetails/CallDetailsStyle.ts +0 -52
  156. package/src/calls/CometChatCallDetails/CometChatCallDetails.tsx +0 -268
  157. package/src/calls/CometChatCallDetails/index.ts +0 -9
  158. package/src/calls/CometChatCallHistory/CallHistoryStyle.ts +0 -34
  159. package/src/calls/CometChatCallHistory/CometChatCallHistory.tsx +0 -422
  160. package/src/calls/CometChatCallHistory/index.ts +0 -9
  161. package/src/calls/CometChatCallHistory/resources/index.ts +0 -17
  162. package/src/calls/CometChatCallHistoryWithDetails/HistoryWithDetailsConfiguration.ts +0 -7
  163. package/src/calls/CometChatCallHistoryWithDetails/HistoryWithDetailsStyle.ts +0 -3
  164. package/src/calls/CometChatCallHistoryWithDetails/index.ts +0 -8
  165. /package/src/{calls/CometChatCallDetails → AI/AIAssistBot}/resources/CloseIcon.png +0 -0
  166. /package/src/{AI → CometChatMessageComposer}/resources/ai.png +0 -0
  167. /package/src/calls/{CometChatCallDetails → CometChatCallLogDetails}/resources/index.ts +0 -0
  168. /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Back.png +0 -0
  169. /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Call.png +0 -0
  170. /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Info.png +0 -0
  171. /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Selection.png +0 -0
  172. /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Spineer.png +0 -0
  173. /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Video.png +0 -0
  174. /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/check.png +0 -0
  175. /package/src/calls/{CometChatCallHistoryWithDetails → CometChatCallLogsWithDetails}/style.ts +0 -0
@@ -1,52 +0,0 @@
1
- import { BaseStyle, BaseStyleInterface, FontStyleInterface } from "../../shared";
2
-
3
- export interface CallDetailsStyleInterface extends BaseStyleInterface {
4
- titleFont?: FontStyleInterface,
5
- titleColor?: string,
6
- backIconTint?: string,
7
- closeIconTint?: string,
8
- onlineStatusColor?: string,
9
- privateGroupIconBackground?: string,
10
- protectedGroupIconBackground?: string,
11
- }
12
-
13
- export class CallDetailsStyle extends BaseStyle {
14
- titleFont?: FontStyleInterface
15
- titleColor?: string
16
- backIconTint?: string
17
- closeIconTint?: string
18
- onlineStatusColor?: string
19
- privateGroupIconBackground?: string
20
- protectedGroupIconBackground?: string
21
-
22
- constructor({
23
- titleFont,
24
- titleColor,
25
- backIconTint,
26
- closeIconTint,
27
- onlineStatusColor,
28
- privateGroupIconBackground,
29
- protectedGroupIconBackground,
30
- backgroundColor,
31
- border,
32
- borderRadius,
33
- height,
34
- width,
35
- }: CallDetailsStyleInterface) {
36
- super({
37
- backgroundColor,
38
- border,
39
- borderRadius,
40
- height,
41
- width,
42
- });
43
- this.titleFont = titleFont;
44
- this.titleColor = titleColor;
45
- this.backIconTint = backIconTint;
46
- this.closeIconTint = closeIconTint;
47
- this.onlineStatusColor = onlineStatusColor;
48
- this.privateGroupIconBackground = privateGroupIconBackground;
49
- this.protectedGroupIconBackground = protectedGroupIconBackground;
50
-
51
- }
52
- }
@@ -1,268 +0,0 @@
1
- import React, { useEffect, useRef, useState } from 'react'
2
- import { View, TouchableOpacity, Image, Text, FlatList, SectionList } from 'react-native'
3
- import { CometChat } from '@cometchat/chat-sdk-react-native'
4
- import { AvatarStyle, AvatarStyleInterface, CometChatContext, CometChatDetailsTemplate, CometChatListItem, ImageType, ListItemStyle, ListItemStyleInterface, localize } from '../../shared'
5
- import { AvatarConfigurationInterface } from '../../shared/views/CometChatAvatar/AvatarConfiguration'
6
- import { StatusIndicatorStyle, StatusIndicatorStyleInterface } from '../../shared/views/CometChatStatusIndicator/StatusIndicatorStyle'
7
- import { CometChatCallButtonConfigurationInterface, CometChatCallButtons } from '../CometChatCallButtons'
8
- import { Style } from './style'
9
- import { CloseIcon } from './resources'
10
- import { useContext } from 'react'
11
- import { CallDetailsStyle } from './CallDetailsStyle'
12
- import { CallDetailsStyleInterface } from './CallDetailsStyle'
13
- import { CallingDetailsUtils } from '../CallingDetailsUtils'
14
- import { PASSWORD_GROUP_COLOR, PRIVATE_GROUP_COLOR } from '../../shared/constants/UIKitConstants'
15
-
16
- interface CometChatCallDetailsInterface {
17
- /**
18
- * Pass CometChat.Call object. This parameter is required
19
- */
20
- call: CometChat.Call,
21
- /**
22
- * title sets the string in top navigation bar.
23
- */
24
- title?: string,
25
- /**
26
- * toggle visibility of close button
27
- */
28
- showCloseButton?: boolean,
29
- /**
30
- * This will change the close button icon
31
- */
32
- closeButtonIconImage?: ImageType,
33
- /**
34
- * toggle the profile view
35
- */
36
- hideProfile?: boolean,
37
- /**
38
- * customize the subtitle view as per your need.
39
- */
40
- SubtitleView?: (props: { user?: CometChat.User, group?: CometChat.Group }) => JSX.Element,
41
- /**
42
- * Pass the custom profile view here.
43
- */
44
- CustomProfileView?: (props: { user?: CometChat.User }) => JSX.Element,
45
- /**
46
- * List of templates tobe shown
47
- */
48
- data?: (props: { message: CometChat.BaseMessage, user?: CometChat.User, group?: CometChat.Group }) => CometChatDetailsTemplate[],
49
- /**
50
- * toggle user presence
51
- */
52
- disableUsersPresence?: boolean,
53
- /**
54
- * call back for error
55
- */
56
- onError?: (e: CometChat.CometChatException) => void,
57
- /**
58
- * custom functionality on back press
59
- */
60
- onBack?: () => void,
61
- /**
62
- * Style object for Avatar
63
- */
64
- avatarStyle?: AvatarStyleInterface,
65
- /**
66
- * Style object for StatusIndicator
67
- */
68
- statusIndicatorStyle?: StatusIndicatorStyleInterface,
69
- /**
70
- * Style object for ListItem
71
- */
72
- listItemStyle?: ListItemStyleInterface,
73
- /**
74
- * Style object for CallDetails
75
- */
76
- callDetailsStyle?: CallDetailsStyleInterface,
77
- }
78
-
79
- const listenerId = "userListener_" + new Date().getTime();
80
-
81
- const CometChatCallDetails = (props: CometChatCallDetailsInterface) => {
82
-
83
- const {
84
- onBack,
85
- onError,
86
- CustomProfileView,
87
- SubtitleView,
88
- data,
89
- disableUsersPresence,
90
- hideProfile,
91
- call,
92
- closeButtonIconImage,
93
- showCloseButton = true,
94
- title = localize("CALL_DETAILS"),
95
- avatarStyle,
96
- callDetailsStyle,
97
- listItemStyle,
98
- statusIndicatorStyle,
99
- } = props;
100
-
101
- const { theme } = useContext(CometChatContext);
102
- const [tempates, setTemplates] = useState([]);
103
- const [group, setGroup] = useState(undefined);
104
- const [user, setUser] = useState(undefined);
105
- const [error, setError] = useState(undefined);
106
- const loggedInUser = useRef(null);
107
-
108
- const _avatarStyle = new AvatarStyle({
109
- nameTextColor: theme.palette.getAccent(),
110
- backgroundColor: theme.palette.getBackgroundColor(),
111
- nameTextFont: theme.typography.heading,
112
- ...avatarStyle
113
- });
114
-
115
- const _listStyle = new ListItemStyle({
116
- backgroundColor: theme.palette.getBackgroundColor(),
117
- titleColor: theme.palette.getAccent(),
118
- titleFont: theme.typography.body,
119
- ...listItemStyle
120
- });
121
-
122
- const _statusStyle = new StatusIndicatorStyle({
123
- ...statusIndicatorStyle
124
- });
125
-
126
- const _callDetailsStyle = new CallDetailsStyle({
127
- backIconTint: theme.palette.getPrimary(),
128
- titleColor: theme.palette.getAccent(),
129
- titleFont: theme.typography.heading,
130
- closeIconTint: theme.palette.getPrimary(),
131
- backgroundColor: theme.palette.getBackgroundColor(),
132
- ...callDetailsStyle
133
- });
134
-
135
- useEffect(() => {
136
- CometChat.getLoggedinUser().then(
137
- (loggedUser: CometChat.User) => {
138
- let tmpList: CometChatDetailsTemplate[];
139
- loggedInUser.current = loggedUser;
140
- let user = call?.getReceiverType() == "user" ? call.getReceiver() as CometChat.User : undefined
141
- let group = call?.getReceiverType() == "group" ? call['receiver'] as CometChat.Group : undefined
142
- if (data) {
143
- tmpList = data({ message: call, user, group });
144
- } else {
145
- tmpList = CallingDetailsUtils.getDefaultDetailsTemplates(call, loggedUser, user, group)
146
- }
147
- setTemplates(tmpList.map(item => {
148
- item['data'] = item.options;
149
- return item;
150
- }))
151
- setUser(user);
152
- setGroup(group);
153
- },
154
- (error: CometChat.CometChatException) => {
155
- setError(localize("SOMETHING_WRONG"));
156
- onError && onError(error);
157
- }
158
- );
159
- CometChat.addUserListener(
160
- listenerId,
161
- new CometChat.UserListener({
162
- onUserOnline: (user) => {
163
- setUser(user);
164
- },
165
- onUserOffline: (user) => {
166
- setUser(user);
167
- },
168
- })
169
- );
170
- return () => {
171
- CometChat.removeUserListener(listenerId);
172
- }
173
- }, []);
174
-
175
- const getStatusColor = () => {
176
- if (disableUsersPresence)
177
- return "transparent";
178
- if (user && user['status'] == "online")
179
- return theme.palette.getSuccess();
180
- if (group) {
181
- if (group['type'] == "password")
182
- return PASSWORD_GROUP_COLOR;
183
- if (group['type'] == "private")
184
- return PRIVATE_GROUP_COLOR;
185
- }
186
- return "transparent";
187
- }
188
-
189
- const subtitleView = () => {
190
- if (SubtitleView)
191
- return <SubtitleView group={group} user={user} />
192
- return <Text style={{ color: theme.palette.getAccent() }}>
193
- {
194
- user ?
195
- user['status'] :
196
- group ?
197
- `${group['membersCount']} ${localize("MEMBERS")}`
198
- :
199
- undefined
200
- }
201
- </Text>
202
- }
203
-
204
- const _render = ({ item }) => {
205
- return item.CustomView && item.CustomView()
206
- }
207
-
208
- return (
209
- <View style={{ flex: 1, backgroundColor: theme.palette.getBackgroundColor() }}>
210
- {
211
- !hideProfile &&
212
- <View style={[Style.row, { height: 60, alignItems: "center" }]}>
213
- {
214
- CustomProfileView && <CustomProfileView user={user} />
215
- }
216
- {
217
- showCloseButton &&
218
- <TouchableOpacity onPress={onBack}>
219
- <Image style={[Style.imageStyle, { tintColor: _callDetailsStyle.backIconTint }]} source={closeButtonIconImage || CloseIcon} />
220
- </TouchableOpacity>
221
- }
222
- <Text style={[theme.typography.heading, Style.heading, { color: theme.palette.getAccent() }]}>{title}</Text>
223
- </View>
224
- }
225
- {
226
- error &&
227
- <View style={{ justifyContent: "center", alignItems: "center" }}>
228
- <Text style={{color: theme.palette.getError()}}>{error}</Text>
229
- </View> ||
230
- <>
231
- <CometChatListItem
232
- id={user ? user['uid'] : group ? group['guid'] : undefined}
233
- statusIndicatorColor={getStatusColor()}
234
- avatarURL={user && user['avatar'] ? { uri: user['avatar'] } : group && group['icon'] ? { uri: group['icon'] } : undefined}
235
- SubtitleView={() => subtitleView()}
236
- avatarName={user ? user['name'] : group ? group['name'] : undefined}
237
- title={user ? user['name'] : group ? group['name'] : undefined}
238
- avatarStyle={_avatarStyle}
239
- statusIndicatorStyle={_statusStyle}
240
- listItemStyle={_listStyle}
241
- />
242
- <SectionList
243
- sections={tempates}
244
- keyExtractor={(item, index) => item + index}
245
- renderItem={_render}
246
- renderSectionHeader={({ section }) => {
247
- const { title, titleColor, titleFont, titleStyle } = section;
248
- if (!title)
249
- return null;
250
-
251
- return (
252
- <Text
253
- style={[
254
- { color: titleColor ?? theme.palette.getAccent500() },
255
- titleFont ? titleFont : theme.typography.text2,
256
- titleStyle ? titleStyle : {},
257
- ]}
258
- >
259
- {title}
260
- </Text>
261
- );
262
- }}
263
- />
264
- </>
265
- }
266
- </View>
267
- )
268
- }
@@ -1,9 +0,0 @@
1
- import { CallDetailsConfiguration, CallDetailsConfigurationInterface } from "./CallDetailsConfiguration";
2
- import { CallDetailsStyle, CallDetailsStyleInterface } from "./CallDetailsStyle";
3
-
4
- export {
5
- CallDetailsConfiguration,
6
- CallDetailsConfigurationInterface,
7
- CallDetailsStyle,
8
- CallDetailsStyleInterface
9
- }
@@ -1,34 +0,0 @@
1
- import { BaseStyle, BaseStyleInterface, FontStyle, FontStyleInterface } from "../../shared";
2
-
3
- export interface CallHistoryStyleInterface extends BaseStyleInterface {
4
- titleFont?: FontStyleInterface,
5
- titleColor?: string,
6
- }
7
-
8
- export class CallHistoryStyle extends BaseStyle implements CallHistoryStyleInterface {
9
- titleFont?: FontStyleInterface;
10
- titleColor?: string;
11
- loadingTint?: string;
12
- emptyTextFont?: FontStyleInterface;
13
- emptyTextColor?: string
14
-
15
- constructor({
16
- titleFont = { fontSize: 20, fontWeight: "600"},
17
- backgroundColor = "white",
18
- border,
19
- borderRadius,
20
- height,
21
- titleColor = "#000",
22
- width
23
- }: CallHistoryStyleInterface) {
24
- super({
25
- backgroundColor: backgroundColor,
26
- border: border,
27
- borderRadius: borderRadius,
28
- height: height,
29
- width: width
30
- });
31
- this.titleColor = titleColor;
32
- this.titleFont = titleFont;
33
- }
34
- }