@samparkchat/sampark-web-chat 0.0.2 → 0.0.4

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 (29) hide show
  1. package/package.json +1 -1
  2. package/sampark/sampark-chat/components/Actions/GroupMessageActions.d.ts +1 -0
  3. package/sampark/sampark-chat/components/Actions/GroupMessageActions.js +56 -31
  4. package/sampark/sampark-chat/components/Actions/MessageActions.d.ts +2 -1
  5. package/sampark/sampark-chat/components/Actions/MessageActions.js +161 -158
  6. package/sampark/sampark-chat/components/AttachmentFileSharing.js +2 -1
  7. package/sampark/sampark-chat/components/Headers/ChatHeader.d.ts +1 -0
  8. package/sampark/sampark-chat/components/Headers/ChatHeader.js +4 -4
  9. package/sampark/sampark-chat/components/Headers/GroupChatHeader.d.ts +1 -0
  10. package/sampark/sampark-chat/components/Headers/GroupChatHeader.js +3 -1
  11. package/sampark/sampark-chat/components/Headers/SearchHeader.d.ts +8 -0
  12. package/sampark/sampark-chat/components/Headers/SearchHeader.js +57 -0
  13. package/sampark/sampark-chat/components/ThreadConversation.d.ts +50 -0
  14. package/sampark/sampark-chat/components/ThreadConversation.js +293 -0
  15. package/sampark/sampark-chat/components/lists/ViewParticipents.d.ts +1 -0
  16. package/sampark/sampark-chat/components/lists/ViewParticipents.js +9 -5
  17. package/sampark/sampark-chat/index.d.ts +5 -0
  18. package/sampark/sampark-chat/index.js +5 -5
  19. package/sampark/sampark-chat/screens/PeerChatScreen.js +191 -172
  20. package/sampark/sampark-chat/screens/SamparkChatProvider.d.ts +1 -1
  21. package/sampark/sampark-chat/screens/SamparkchatScreen.d.ts +1 -1
  22. package/sampark/sampark-chat/screens/SamparkchatScreen.js +1 -1
  23. package/sampark/sampark-chat/screens/groupChatScreen.js +110 -107
  24. package/sampark/sampark-chat/theme/colors.d.ts +1 -0
  25. package/sampark/sampark-chat/theme/colors.js +1 -0
  26. package/sampark/sampark-chat/theme/fonts.d.ts +12 -0
  27. package/sampark/sampark-chat/theme/fonts.js +12 -1
  28. package/sampark/sampark-chat/theme/icons.d.ts +70 -0
  29. package/sampark/sampark-chat/theme/icons.js +16 -1
@@ -0,0 +1,57 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from 'react';
13
+ import colors from '../../theme/colors';
14
+ import fonts from '../../theme/fonts';
15
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
16
+ import CustomIcons, { AppIcons } from '../../theme/icons';
17
+ var SearchHeader = function (_a) {
18
+ var onClose = _a.onClose, onSearch = _a.onSearch, _b = _a.context, context = _b === void 0 ? 'peer' : _b;
19
+ var _c = React.useState(''), query = _c[0], setQuery = _c[1];
20
+ var _d = React.useState([]), selectedTags = _d[0], setSelectedTags = _d[1];
21
+ var tags = ['Audio', 'Documents', 'Photos', 'Videos', 'Links'];
22
+ var selectTag = function (t) { return setSelectedTags([t]); };
23
+ var clearTag = function () { return setSelectedTags([]); };
24
+ return (React.createElement("div", { style: {
25
+ width: '360px',
26
+ maxWidth: '38vw',
27
+ height: '100%',
28
+ background: '#fff',
29
+ boxShadow: 'rgba(15, 23, 42, 0.08) 0px 8px 24px',
30
+ display: 'flex',
31
+ flexDirection: 'column',
32
+ padding: '0',
33
+ overflow: 'hidden',
34
+ borderRadius: 8
35
+ } },
36
+ React.createElement("div", { style: { padding: '17px', display: 'flex', alignItems: 'center', justifyContent: 'space-between', background: colors.headerGradient, borderRadius: '10px', overflow: 'hidden' } },
37
+ React.createElement("h3", { style: __assign({ margin: 0, color: colors.white, fontSize: 16, lineHeight: '20px' }, fonts.content) }, context === 'group' ? 'Search Group Messages' : 'Search Messages'),
38
+ React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: 8 } },
39
+ React.createElement("div", { style: { width: 36, height: 36, borderRadius: '50%', display: 'flex', alignItems: 'center', justifyContent: 'center', background: 'rgba(255,255,255,0.08)' } },
40
+ React.createElement(FontAwesomeIcon, { icon: AppIcons.Search.icon, style: { fontSize: 14, color: colors.white } })),
41
+ React.createElement("button", { onClick: onClose, style: { background: 'rgba(255,255,255,0.08)', border: 'none', cursor: 'pointer', padding: 6, borderRadius: '50%', width: 36, height: 36, display: 'inline-flex', alignItems: 'center', justifyContent: 'center' }, "aria-label": "Close search panel" },
42
+ React.createElement(FontAwesomeIcon, { icon: CustomIcons.Close.icon, style: { fontSize: CustomIcons.Close.size, color: CustomIcons.Close.color } })))),
43
+ React.createElement("div", { style: { padding: 14, display: 'flex', flexDirection: 'column', gap: 12, flex: 1 } },
44
+ React.createElement("div", { style: { marginBottom: 2 } },
45
+ React.createElement("input", { value: query, onChange: function (e) { return setQuery(e.target.value); }, onKeyDown: function (e) { if (e.key === 'Enter')
46
+ onSearch && onSearch(query); }, placeholder: "Search", style: __assign({ width: '100%', padding: '10px 12px', borderRadius: 18, border: '1px solid #eee', outline: 'none' }, fonts.content) })),
47
+ React.createElement("div", { style: { display: 'flex', gap: 8, flexWrap: 'wrap', marginBottom: 6 } }, (selectedTags.length ? selectedTags : tags).map(function (t) { return (React.createElement("button", { key: t, onClick: function () { return selectTag(t); }, style: __assign({ borderRadius: 18, padding: '8px 12px', background: selectedTags.includes(t) ? colors.headerGradient : '#f6f6f6', color: selectedTags.includes(t) ? '#fff' : '#111', border: 'none', cursor: 'pointer' }, fonts.messageitems) }, t)); })),
48
+ React.createElement("div", { style: { minHeight: 120, display: 'flex', flexDirection: 'column', gap: 12 } },
49
+ selectedTags.length > 0 && (React.createElement("div", { style: { display: 'flex', gap: 8, flexWrap: 'wrap' } }, selectedTags.map(function (t) { return (React.createElement("div", { key: t, style: { display: 'inline-flex', alignItems: 'center', gap: 8, background: colors.headerGradient, color: '#fff', padding: '6px 10px', borderRadius: 20 } },
50
+ React.createElement("button", { onClick: function () { return clearTag(); }, style: { background: 'transparent', border: 'none', color: '#fff', cursor: 'pointer', padding: 0, marginRight: 6 } }, "\u2715"),
51
+ React.createElement("span", { style: { fontSize: 14 } }, t))); }))),
52
+ React.createElement("div", { style: { flex: 1, display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: selectedTags.length > 0 ? 'flex-start' : 'center', color: '#9aa0a6' } },
53
+ React.createElement("div", { style: { width: 80, height: 80, borderRadius: 86, border: '2px solid #e6e6e6', marginBottom: 12 } }),
54
+ React.createElement("div", { style: __assign({ fontWeight: 600, marginBottom: 6 }, fonts.content) }, selectedTags.length > 0 ? 'Messages' : 'Start Your Search'),
55
+ React.createElement("div", { style: __assign({ textAlign: 'center', maxWidth: 220 }, fonts.content) }, selectedTags.length > 0 ? '' : 'Search for conversations or messages by typing a keyword above.'))))));
56
+ };
57
+ export default SearchHeader;
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ type Reaction = {
3
+ id: string;
4
+ type: string;
5
+ by: string;
6
+ };
7
+ type FileInfo = {
8
+ fileId: string;
9
+ originalName: string;
10
+ size: number;
11
+ mimeType: string;
12
+ downloadUrl: string;
13
+ };
14
+ type Message = {
15
+ messageId: string;
16
+ user: string;
17
+ message: string;
18
+ time: string;
19
+ reply: boolean;
20
+ replyToMessageId?: string;
21
+ replyToUser?: string;
22
+ replyToText?: string;
23
+ reaction?: Reaction;
24
+ reactions?: Reaction[];
25
+ is_edited?: boolean;
26
+ edited_at?: string;
27
+ messageType?: string;
28
+ fileInfo?: FileInfo;
29
+ status?: 'sent' | 'delivered' | 'read';
30
+ };
31
+ interface User {
32
+ user_id: string;
33
+ user_name: string;
34
+ profile_pic?: string;
35
+ }
36
+ interface ThreadConversationProps {
37
+ showThreadPanel: boolean;
38
+ threadMessageId: string | null;
39
+ messages: Message[];
40
+ repliesMap: Map<string, Message[]>;
41
+ userId: string;
42
+ userName?: string;
43
+ peerUserName?: string;
44
+ allParticipantsList?: User[];
45
+ getUserNameById?: (participantsList: User[], userId: string) => string | undefined;
46
+ onCloseThread: () => void;
47
+ setReplyTarget: (target: any) => void;
48
+ }
49
+ declare const ThreadConversation: React.FC<ThreadConversationProps>;
50
+ export default ThreadConversation;
@@ -0,0 +1,293 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from 'react';
13
+ import { getTimeFromTimestamp, getChatDateDisplay } from '../services/DateFormat';
14
+ import colors from '../theme/colors';
15
+ import fonts from '../theme/fonts';
16
+ var ThreadConversation = function (_a) {
17
+ var showThreadPanel = _a.showThreadPanel, threadMessageId = _a.threadMessageId, messages = _a.messages, repliesMap = _a.repliesMap, userId = _a.userId, userName = _a.userName, peerUserName = _a.peerUserName, allParticipantsList = _a.allParticipantsList, getUserNameById = _a.getUserNameById, onCloseThread = _a.onCloseThread, setReplyTarget = _a.setReplyTarget;
18
+ if (!showThreadPanel || !threadMessageId) {
19
+ return null;
20
+ }
21
+ var getDisplayName = function (messageUserId) {
22
+ if (messageUserId === userId) {
23
+ return userName || 'You';
24
+ }
25
+ if (getUserNameById && allParticipantsList) {
26
+ return getUserNameById(allParticipantsList, messageUserId) || messageUserId;
27
+ }
28
+ if (peerUserName) {
29
+ return peerUserName;
30
+ }
31
+ return messageUserId;
32
+ };
33
+ var getDateKey = function (timestamp) {
34
+ var date = new Date(timestamp);
35
+ return "".concat(date.getUTCFullYear(), "-").concat(date.getUTCMonth(), "-").concat(date.getUTCDate());
36
+ };
37
+ var groupMessagesByDate = function (messages) {
38
+ var groups = [];
39
+ var currentGroup = null;
40
+ messages.forEach(function (message) {
41
+ var messageDate = getDateKey(message.time);
42
+ if (!currentGroup || currentGroup.date !== messageDate) {
43
+ currentGroup = { date: messageDate, messages: [] };
44
+ groups.push(currentGroup);
45
+ }
46
+ currentGroup.messages.push(message);
47
+ });
48
+ return groups;
49
+ };
50
+ var original = messages.find(function (m) { return m.messageId === threadMessageId; });
51
+ var replies = repliesMap.get(threadMessageId) || [];
52
+ return (React.createElement("div", { style: styles.container },
53
+ React.createElement("div", { style: styles.header },
54
+ React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
55
+ React.createElement("div", { style: styles.title }, "Thread"),
56
+ React.createElement("div", { style: styles.subtitle }, original ? getDisplayName(original.user) : 'Replies to message')),
57
+ React.createElement("button", { onClick: function () {
58
+ onCloseThread();
59
+ setReplyTarget(null);
60
+ }, style: styles.closeButton, "aria-label": "Close thread" }, "\u2715")),
61
+ React.createElement("div", { style: styles.content },
62
+ original ? (React.createElement("div", { style: styles.originalWrapper },
63
+ React.createElement("div", { style: styles.originalCard },
64
+ React.createElement("div", { style: styles.originalAuthor }, getDisplayName(original.user)),
65
+ React.createElement("div", { style: styles.originalText }, original.message),
66
+ React.createElement("div", { style: styles.originalTime }, getTimeFromTimestamp && getTimeFromTimestamp(original.time))))) : (React.createElement("div", { style: styles.notFound }, "Original message not found")),
67
+ React.createElement("div", { style: styles.repliesHeader },
68
+ replies.length,
69
+ " Replies"),
70
+ React.createElement("div", { style: styles.divider }),
71
+ React.createElement("div", { style: styles.repliesContainer },
72
+ groupMessagesByDate(replies).map(function (group) { return (React.createElement(React.Fragment, { key: group.date },
73
+ React.createElement("div", { style: styles.dateChip }, getChatDateDisplay(group.messages[0].time)),
74
+ group.messages.map(function (replyMsg) {
75
+ var _a, _b;
76
+ var displayName = getDisplayName(replyMsg.user);
77
+ var initial = ((_b = (_a = (displayName || '').split(' ')[0]) === null || _a === void 0 ? void 0 : _a.charAt(0)) === null || _b === void 0 ? void 0 : _b.toUpperCase()) || '';
78
+ return (React.createElement("div", { key: replyMsg.messageId, style: replyMsg.reply ? styles.replyRowSelf : styles.replyRow },
79
+ React.createElement("div", { style: styles.avatarPlaceholder, "aria-hidden": true },
80
+ React.createElement("span", { style: styles.avatarText }, initial)),
81
+ React.createElement("div", { style: replyMsg.reply ? styles.messageBlockSelf : styles.messageBlock },
82
+ React.createElement("div", { style: replyMsg.reply ? styles.replyAuthorSelf : styles.replyAuthor }, displayName),
83
+ React.createElement("div", { style: replyMsg.reply ? __assign({}, styles.replyTextSelf) : __assign({}, styles.replyText) },
84
+ React.createElement("div", { style: styles.replyMessageContent }, replyMsg.message),
85
+ React.createElement("span", { style: styles.replyTimeInside },
86
+ getTimeFromTimestamp && getTimeFromTimestamp(replyMsg.time),
87
+ replyMsg.is_edited && React.createElement("span", { style: { marginLeft: 6, fontStyle: 'italic' } }, "edited"))))));
88
+ }))); }),
89
+ replies.length === 0 && (React.createElement("div", { style: styles.noReplies }, "No replies yet"))))));
90
+ };
91
+ var styles = {
92
+ container: {
93
+ position: 'absolute',
94
+ right: 0,
95
+ top: 0,
96
+ bottom: 0,
97
+ height: '100%',
98
+ width: 340,
99
+ maxWidth: 'calc(100% - 24px)',
100
+ background: colors.white,
101
+ borderLeft: '1px solid rgba(15,23,42,0.04)',
102
+ boxShadow: '-6px 0 28px rgba(12,28,56,0.06)',
103
+ display: 'flex',
104
+ flexDirection: 'column',
105
+ borderRadius: '8px 0 0 8px',
106
+ overflow: 'hidden',
107
+ marginTop: 0,
108
+ },
109
+ header: {
110
+ padding: '10px 12px',
111
+ display: 'flex',
112
+ alignItems: 'center',
113
+ justifyContent: 'space-between',
114
+ background: colors.headerGradient,
115
+ borderBottom: '1px solid rgba(255,255,255,0.06)',
116
+ color: '#fff'
117
+ },
118
+ title: __assign({}, fonts.listsStyle),
119
+ subtitle: {
120
+ fontSize: 13,
121
+ color: 'rgba(255,255,255,0.9)',
122
+ marginTop: 6,
123
+ fontWeight: 500
124
+ },
125
+ repliesContainer: {
126
+ flex: 1,
127
+ minHeight: 0,
128
+ overflowY: 'auto',
129
+ paddingRight: 6,
130
+ WebkitOverflowScrolling: 'touch',
131
+ boxSizing: 'border-box',
132
+ scrollbarWidth: 'none',
133
+ msOverflowStyle: 'none',
134
+ },
135
+ '::-webkit-scrollbar': {
136
+ display: 'none'
137
+ },
138
+ closeButton: {
139
+ background: 'transparent',
140
+ border: 'none',
141
+ cursor: 'pointer',
142
+ fontSize: 18,
143
+ color: '#fff',
144
+ padding: 6,
145
+ lineHeight: 1
146
+ },
147
+ content: {
148
+ display: 'flex',
149
+ flexDirection: 'column',
150
+ padding: '16px',
151
+ paddingRight: 20,
152
+ flex: 1,
153
+ minHeight: 0,
154
+ boxSizing: 'border-box'
155
+ },
156
+ originalWrapper: {
157
+ marginBottom: 14,
158
+ position: 'relative',
159
+ display: 'flex',
160
+ alignItems: 'flex-start',
161
+ paddingTop: 28,
162
+ paddingRight: 12
163
+ },
164
+ dateChip: {
165
+ display: 'flex',
166
+ justifyContent: 'center',
167
+ alignItems: 'center',
168
+ backgroundColor: '#e9ecef',
169
+ color: '#6b6f75',
170
+ padding: '8px 18px',
171
+ borderRadius: '20px',
172
+ fontSize: 13,
173
+ fontWeight: 600,
174
+ width: 'fit-content',
175
+ margin: '10px auto',
176
+ boxShadow: 'inset 0 0 0 1px rgba(0,0,0,0.02)'
177
+ },
178
+ originalCard: {
179
+ display: 'inline-block',
180
+ padding: '8px 12px',
181
+ borderRadius: 14,
182
+ background: '#ececec',
183
+ boxShadow: 'none',
184
+ border: '1px solid rgba(15,23,42,0.03)',
185
+ wordBreak: 'break-word',
186
+ position: 'relative',
187
+ minWidth: 'auto',
188
+ maxWidth: '75%',
189
+ height: 'auto',
190
+ whiteSpace: 'pre-wrap'
191
+ },
192
+ originalAuthor: __assign(__assign({}, fonts.content), { position: 'absolute', top: -26, left: 12, background: 'transparent', padding: 0, margin: 0, color: colors.blue, lineHeight: '14px' }),
193
+ originalText: __assign(__assign({}, fonts.messageitems), { color: '#111827', lineHeight: 1.35, whiteSpace: 'pre-wrap', display: 'inline-block' }),
194
+ originalTime: {
195
+ fontSize: 10,
196
+ color: '#6b7280',
197
+ marginTop: 2,
198
+ opacity: 0.9,
199
+ textAlign: 'right',
200
+ display: 'block',
201
+ marginLeft: 'auto'
202
+ },
203
+ notFound: {
204
+ color: '#999'
205
+ },
206
+ repliesHeader: {
207
+ marginTop: 6,
208
+ marginBottom: 8,
209
+ color: '#6b7280',
210
+ fontSize: 13,
211
+ fontWeight: 600
212
+ },
213
+ divider: {
214
+ height: 1,
215
+ background: 'linear-gradient(to right, rgba(0,0,0,0.03), rgba(0,0,0,0.02))',
216
+ marginBottom: 12
217
+ },
218
+ replyRow: {
219
+ display: 'flex',
220
+ flexDirection: 'row',
221
+ alignItems: 'flex-start',
222
+ gap: 12,
223
+ marginBottom: 12
224
+ },
225
+ replyRowSelf: {
226
+ display: 'flex',
227
+ flexDirection: 'row',
228
+ alignItems: 'flex-start',
229
+ gap: 12,
230
+ marginBottom: 12
231
+ },
232
+ avatarPlaceholder: {
233
+ width: 36,
234
+ minWidth: 36,
235
+ height: 36,
236
+ borderRadius: '50%',
237
+ background: colors.headerGradient,
238
+ boxShadow: 'inset 0 0 0 1px rgba(15,23,42,0.03)',
239
+ flexShrink: 0,
240
+ display: 'flex',
241
+ alignItems: 'center',
242
+ justifyContent: 'center',
243
+ overflow: 'hidden'
244
+ },
245
+ avatarText: __assign(__assign({}, fonts.content), { color: colors.white }),
246
+ messageBlock: {
247
+ display: 'flex',
248
+ flexDirection: 'column',
249
+ alignItems: 'flex-start',
250
+ maxWidth: '76%',
251
+ },
252
+ messageBlockSelf: {
253
+ display: 'flex',
254
+ flexDirection: 'column',
255
+ alignItems: 'flex-start',
256
+ maxWidth: '76%',
257
+ },
258
+ replyAuthor: __assign(__assign({}, fonts.content), { marginBottom: 3, color: colors.blue }),
259
+ replyAuthorSelf: __assign(__assign({}, fonts.content), { marginBottom: 3, color: colors.blue }),
260
+ replyText: __assign(__assign({}, fonts.messageitems), { display: 'inline-block', padding: '10px 14px', paddingBottom: 26, borderRadius: 16, background: '#ececec', color: '#111827', lineHeight: 1.4, boxShadow: 'none', maxWidth: '100%', wordBreak: 'break-word', position: 'relative' }),
261
+ replyTextSelf: __assign(__assign({}, fonts.messageitems), { display: 'inline-block', padding: '10px 14px', paddingBottom: 26, borderRadius: 16, background: '#ececec', color: '#111827', lineHeight: 1.4, boxShadow: 'none', maxWidth: '100%', wordBreak: 'break-word', position: 'relative' }),
262
+ replyMessageContent: {
263
+ display: 'block',
264
+ whiteSpace: 'pre-wrap',
265
+ wordBreak: 'break-word',
266
+ },
267
+ replyTimeInside: {
268
+ position: 'absolute',
269
+ right: 8,
270
+ bottom: 6,
271
+ fontSize: 10,
272
+ color: '#6b7280',
273
+ opacity: 0.95,
274
+ lineHeight: '10px',
275
+ },
276
+ replyTime: {
277
+ fontSize: 10,
278
+ color: '#6b7280',
279
+ marginTop: 8,
280
+ opacity: 0.9
281
+ },
282
+ replyTimeSelf: {
283
+ fontSize: 10,
284
+ color: '#6b7280',
285
+ marginTop: 8,
286
+ opacity: 0.9
287
+ },
288
+ noReplies: {
289
+ color: '#777',
290
+ marginTop: 12
291
+ }
292
+ };
293
+ export default ThreadConversation;
@@ -32,6 +32,7 @@ interface ViewParticipantsProps {
32
32
  showHeader?: boolean;
33
33
  showActions?: boolean;
34
34
  groupName?: string;
35
+ onOpenGroupOptions?: () => void;
35
36
  }
36
37
  declare const ViewParticipentList: FunctionComponent<ViewParticipantsProps>;
37
38
  export default ViewParticipentList;
@@ -49,13 +49,14 @@ import React, { useEffect, useState } from 'react';
49
49
  import Header from '../Headers/ChatHeader';
50
50
  import { getProfilePicById } from '../../services/Common';
51
51
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
52
+ import { faEllipsisV } from '@fortawesome/free-solid-svg-icons';
52
53
  import colors from '../../theme/colors';
53
54
  import { AppIcons } from '../../theme/icons';
54
55
  import fonts from '../../theme/fonts';
55
56
  import CommonList from './CommonList';
56
57
  var ViewParticipentList = function (_a) {
57
58
  var _b, _c;
58
- var ViewParticipants = _a.ViewParticipants, setShowHideParticipantScreen = _a.setShowHideParticipantScreen, userId = _a.userId, userName = _a.userName, setViewParticipantsList = _a.setViewParticipantsList, setShowParticipantsList = _a.setShowParticipantsList, client = _a.client, joinRoomId = _a.joinRoomId, setViewParticipants = _a.setViewParticipants, userJoinedGroupRole = _a.userJoinedGroupRole, setPeerUserId = _a.setPeerUserId, setPeerUserName = _a.setPeerUserName, setUserProfilePic = _a.setUserProfilePic, setIsChatInitialized = _a.setIsChatInitialized, setShowUserList = _a.setShowUserList, setIsGroupActive = _a.setIsGroupActive, orgParticipantList = _a.orgParticipantList, onClose = _a.onClose, _d = _a.showHeader, showHeader = _d === void 0 ? true : _d, _e = _a.showActions, showActions = _e === void 0 ? true : _e, groupName = _a.groupName;
59
+ var ViewParticipants = _a.ViewParticipants, setShowHideParticipantScreen = _a.setShowHideParticipantScreen, userId = _a.userId, userName = _a.userName, setViewParticipantsList = _a.setViewParticipantsList, setShowParticipantsList = _a.setShowParticipantsList, client = _a.client, joinRoomId = _a.joinRoomId, setViewParticipants = _a.setViewParticipants, userJoinedGroupRole = _a.userJoinedGroupRole, setPeerUserId = _a.setPeerUserId, setPeerUserName = _a.setPeerUserName, setUserProfilePic = _a.setUserProfilePic, setIsChatInitialized = _a.setIsChatInitialized, setShowUserList = _a.setShowUserList, setIsGroupActive = _a.setIsGroupActive, orgParticipantList = _a.orgParticipantList, onClose = _a.onClose, _d = _a.showHeader, showHeader = _d === void 0 ? true : _d, _e = _a.showActions, showActions = _e === void 0 ? true : _e, groupName = _a.groupName, onOpenGroupOptions = _a.onOpenGroupOptions;
59
60
  var _f = useState(null), chatroomid = _f[0], setChatroomId = _f[1];
60
61
  var getGroupInitials = function (name) {
61
62
  var n = (name || '').toString().trim();
@@ -147,10 +148,13 @@ var ViewParticipentList = function (_a) {
147
148
  }, showActionButtons: false })),
148
149
  React.createElement("div", { style: styles.groupHeader },
149
150
  React.createElement("div", { style: styles.groupAvatarLarge }, (getProfilePicById(orgParticipantList, joinRoomId) || '').trim() ? (React.createElement("img", { src: getProfilePicById(orgParticipantList, joinRoomId) || '', alt: groupName || 'Group', style: styles.groupAvatarLargeImg, onError: function (e) { e.currentTarget.style.display = 'none'; } })) : (React.createElement("div", { style: styles.groupAvatarInitials, "aria-hidden": true }, getGroupInitials(groupName || (ViewParticipants && ViewParticipants.length ? (((_b = ViewParticipants[0]) === null || _b === void 0 ? void 0 : _b.user_name) || 'Group') : 'Group'))))),
150
- React.createElement("div", { style: fonts.groupTitle }, groupName !== null && groupName !== void 0 ? groupName : (ViewParticipants && ViewParticipants.length ? (((_c = ViewParticipants[0]) === null || _c === void 0 ? void 0 : _c.user_name) || 'Group') : 'Group')),
151
- React.createElement("div", { style: fonts.content },
152
- ViewParticipants.length,
153
- " Members")),
151
+ React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: 8 } },
152
+ React.createElement("div", { style: fonts.groupTitle }, groupName !== null && groupName !== void 0 ? groupName : (ViewParticipants && ViewParticipants.length ? (((_c = ViewParticipants[0]) === null || _c === void 0 ? void 0 : _c.user_name) || 'Group') : 'Group')),
153
+ React.createElement("div", { style: fonts.content },
154
+ ViewParticipants.length,
155
+ " Members"),
156
+ React.createElement("button", { "aria-label": "More", style: { marginLeft: 8, background: 'transparent', border: 'none', cursor: 'pointer', color: '#6b7280' }, onClick: function () { onOpenGroupOptions && onOpenGroupOptions(); } },
157
+ React.createElement(FontAwesomeIcon, { icon: faEllipsisV, style: { fontSize: 18 } })))),
154
158
  React.createElement("div", { style: styles.divider }),
155
159
  React.createElement("div", { style: styles.container },
156
160
  React.createElement("div", { style: styles.actionList },
@@ -1 +1,6 @@
1
1
  import './index.css';
2
+ export { default as SamparkChatScreen } from './screens/SamparkchatScreen';
3
+ export { default as SamparkChatProvider } from './screens/SamparkChatProvider';
4
+ export { PeerChat } from "./sdk/client/PeerChat";
5
+ export { GroupChat } from "./sdk/client/Groupchat";
6
+ export { SamparkChat } from "./sdk/client/SamparkChat";
@@ -6,8 +6,8 @@ import reportWebVitals from './reportWebVitals';
6
6
  var root = ReactDOM.createRoot(document.getElementById('root'));
7
7
  root.render(React.createElement(React.StrictMode, null, React.createElement(App)));
8
8
  reportWebVitals();
9
- // export { default as SamparkChatScreen } from './screens/SamparkchatScreen';
10
- // export { default as SamparkChatProvider } from './screens/SamparkChatProvider';
11
- // export { PeerChat } from "./sdk/client/PeerChat";
12
- // export {GroupChat} from "./sdk/client/Groupchat";
13
- // export {SamparkChat} from "./sdk/client/SamparkChat";
9
+ export { default as SamparkChatScreen } from './screens/SamparkchatScreen';
10
+ export { default as SamparkChatProvider } from './screens/SamparkChatProvider';
11
+ export { PeerChat } from "./sdk/client/PeerChat";
12
+ export { GroupChat } from "./sdk/client/Groupchat";
13
+ export { SamparkChat } from "./sdk/client/SamparkChat";