@samparkchat/sampark-web-chat 0.0.3 → 0.0.5

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 (71) hide show
  1. package/package.json +2 -1
  2. package/sampark/sampark-chat/App.js +10 -0
  3. package/sampark/sampark-chat/components/Actions/GroupMessageActions.d.ts +6 -0
  4. package/sampark/sampark-chat/components/Actions/GroupMessageActions.js +203 -161
  5. package/sampark/sampark-chat/components/Actions/MessageActions.d.ts +4 -1
  6. package/sampark/sampark-chat/components/Actions/MessageActions.js +206 -161
  7. package/sampark/sampark-chat/components/AttachmentFileSharing.js +8 -5
  8. package/sampark/sampark-chat/components/AttachmentGroupFileSharing.js +9 -6
  9. package/sampark/sampark-chat/components/AudioPlayerInline.d.ts +8 -0
  10. package/sampark/sampark-chat/components/AudioPlayerInline.js +82 -0
  11. package/sampark/sampark-chat/components/Headers/ChatHeader.d.ts +5 -0
  12. package/sampark/sampark-chat/components/Headers/ChatHeader.js +17 -10
  13. package/sampark/sampark-chat/components/Headers/GroupChatHeader.d.ts +3 -0
  14. package/sampark/sampark-chat/components/Headers/GroupChatHeader.js +13 -7
  15. package/sampark/sampark-chat/components/Headers/HeaderPanel/CallHistory.d.ts +2 -0
  16. package/sampark/sampark-chat/components/Headers/HeaderPanel/CallHistory.js +7 -3
  17. package/sampark/sampark-chat/components/Headers/HeaderPanel/GroupList.d.ts +6 -1
  18. package/sampark/sampark-chat/components/Headers/HeaderPanel/GroupList.js +125 -7
  19. package/sampark/sampark-chat/components/Headers/SearchHeader.d.ts +29 -0
  20. package/sampark/sampark-chat/components/Headers/SearchHeader.js +214 -0
  21. package/sampark/sampark-chat/components/MentionList.d.ts +2 -0
  22. package/sampark/sampark-chat/components/MentionList.js +4 -3
  23. package/sampark/sampark-chat/components/RecorderPanel.d.ts +12 -0
  24. package/sampark/sampark-chat/components/RecorderPanel.js +312 -0
  25. package/sampark/sampark-chat/components/ThreadConversation.d.ts +50 -0
  26. package/sampark/sampark-chat/components/ThreadConversation.js +293 -0
  27. package/sampark/sampark-chat/components/bottomsheets/GroupBottomSheet.d.ts +1 -0
  28. package/sampark/sampark-chat/components/bottomsheets/GroupBottomSheet.js +40 -6
  29. package/sampark/sampark-chat/components/lists/CommonList.d.ts +3 -0
  30. package/sampark/sampark-chat/components/lists/CommonList.js +17 -7
  31. package/sampark/sampark-chat/components/lists/ParticipantList.d.ts +2 -0
  32. package/sampark/sampark-chat/components/lists/ParticipantList.js +8 -4
  33. package/sampark/sampark-chat/components/lists/UserInfo.d.ts +4 -0
  34. package/sampark/sampark-chat/components/lists/UserInfo.js +23 -9
  35. package/sampark/sampark-chat/components/lists/ViewParticipents.d.ts +5 -0
  36. package/sampark/sampark-chat/components/lists/ViewParticipents.js +458 -25
  37. package/sampark/sampark-chat/components/modals/GroupPasswordModal.d.ts +17 -0
  38. package/sampark/sampark-chat/components/modals/GroupPasswordModal.js +238 -0
  39. package/sampark/sampark-chat/screens/PeerChatScreen.d.ts +6 -0
  40. package/sampark/sampark-chat/screens/PeerChatScreen.js +522 -262
  41. package/sampark/sampark-chat/screens/SamparkchatScreen.js +804 -173
  42. package/sampark/sampark-chat/screens/groupChatScreen.d.ts +3 -0
  43. package/sampark/sampark-chat/screens/groupChatScreen.js +348 -155
  44. package/sampark/sampark-chat/sdk/client/Groupchat.d.ts +22 -3
  45. package/sampark/sampark-chat/sdk/client/Groupchat.js +316 -32
  46. package/sampark/sampark-chat/sdk/client/PeerChat.d.ts +38 -1
  47. package/sampark/sampark-chat/sdk/client/PeerChat.js +320 -19
  48. package/sampark/sampark-chat/sdk/enum/constant.d.ts +1 -1
  49. package/sampark/sampark-chat/sdk/enum/constant.js +1 -1
  50. package/sampark/sampark-chat/sdk/interface/SamparkGroupChatService.d.ts +16 -1
  51. package/sampark/sampark-chat/sdk/interface/SamparkPeerChatService.d.ts +13 -0
  52. package/sampark/sampark-chat/sdk/types/CreateGroupChatRequest.d.ts +2 -1
  53. package/sampark/sampark-chat/sdk/types/CreateGroupChatRequest.js +2 -1
  54. package/sampark/sampark-chat/sdk/types/GroupChatHistoryRequest.d.ts +4 -1
  55. package/sampark/sampark-chat/sdk/types/GroupChatHistoryRequest.js +5 -2
  56. package/sampark/sampark-chat/sdk/types/SetGroupPasswordRequest.d.ts +10 -0
  57. package/sampark/sampark-chat/sdk/types/SetGroupPasswordRequest.js +13 -0
  58. package/sampark/sampark-chat/sdk/types/VerifyGroupPasswordRequest.d.ts +10 -0
  59. package/sampark/sampark-chat/sdk/types/VerifyGroupPasswordRequest.js +13 -0
  60. package/sampark/sampark-chat/services/Common.d.ts +20 -1
  61. package/sampark/sampark-chat/services/Common.js +71 -3
  62. package/sampark/sampark-chat/services/NotificationPersistence.d.ts +47 -0
  63. package/sampark/sampark-chat/services/NotificationPersistence.js +208 -0
  64. package/sampark/sampark-chat/services/useNotificationManager.d.ts +51 -0
  65. package/sampark/sampark-chat/services/useNotificationManager.js +153 -0
  66. package/sampark/sampark-chat/theme/colors.d.ts +2 -0
  67. package/sampark/sampark-chat/theme/colors.js +8 -0
  68. package/sampark/sampark-chat/theme/fonts.d.ts +12 -0
  69. package/sampark/sampark-chat/theme/fonts.js +12 -1
  70. package/sampark/sampark-chat/theme/icons.d.ts +200 -0
  71. package/sampark/sampark-chat/theme/icons.js +42 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samparkchat/sampark-web-chat",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "main": "sampark/sampark-web-chat/index.js",
5
5
  "types": "sampark/sampark-web-chat/index.d.ts",
6
6
  "private": false,
@@ -21,6 +21,7 @@
21
21
  "react": ">=16.8.0",
22
22
  "react-dom": ">=16.8.0",
23
23
  "react-scripts": "5.0.1",
24
+ "recordrtc": "^5.6.2",
24
25
  "socket.io-client": "^4.8.0",
25
26
  "web-vitals": "^2.1.4"
26
27
  },
@@ -15,9 +15,19 @@ function App() {
15
15
  { user_id: 'user003', user_name: 'Anuj', profile_pic: '' },
16
16
  { user_id: 'user004', user_name: 'Sachin', profile_pic: '' },
17
17
  { user_id: 'user005', user_name: 'Deepak', profile_pic: '' },
18
+ { user_id: 'user006', user_name: 'Raju', profile_pic: '' },
19
+ { user_id: 'user007', user_name: 'Ankit', profile_pic: '' },
20
+ { user_id: 'user008', user_name: 'Arvind', profile_pic: '' },
21
+ { user_id: 'user009', user_name: 'Rohan', profile_pic: '' },
22
+ { user_id: 'user010', user_name: 'Vishal', profile_pic: '' },
23
+ { user_id: 'user011', user_name: 'Vinod', profile_pic: '' },
24
+ { user_id: 'user012', user_name: 'Sonu', profile_pic: '' },
18
25
  ]), userList = _d[0], setUserList = _d[1];
19
26
  var appId = 'INmD4HqR1yEs6f0NRwecDZoAyc9geghk';
20
27
  var secretKey = 'ux7YMNSeFzKv6a1HA2aCDnN7Cpwlt7X1ZFiAFXiu7ZcRq8Wqb3b5agc';
28
+ //Staging
29
+ // const appId = 'FZReo0rOJX7TDH65feuZ9jysumIY9ftU';
30
+ // const secretKey = '1YYnT3yit6fmLpDbhKB5pooJx2QdgBo2HymZ5dMoxjLJZRY8eVBfJVK';
21
31
  var Sampark = new SamparkChat(appId, secretKey);
22
32
  var handleStartChat = function () {
23
33
  if (userId.trim() && userName.trim()) {
@@ -11,9 +11,15 @@ interface GroupMessageActionsProps {
11
11
  onCloseMenu: () => void;
12
12
  message: string;
13
13
  position?: 'left' | 'right';
14
+ inline?: boolean;
14
15
  canEdit?: boolean;
15
16
  onEditClick?: () => void;
16
17
  onReplyClick?: () => void;
18
+ onThreadClick?: () => void;
19
+ allowReact?: boolean;
20
+ visible?: boolean;
21
+ canDelete?: boolean;
22
+ onDeleteClick?: () => void;
17
23
  }
18
24
  declare const GroupMessageActions: React.FC<GroupMessageActionsProps>;
19
25
  export default GroupMessageActions;
@@ -1,9 +1,25 @@
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
+ };
1
12
  import React from 'react';
2
13
  import EmojiPicker from 'emoji-picker-react';
14
+ import { AppIcons } from '../../theme/icons';
15
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
16
  var GroupMessageActions = function (_a) {
4
17
  var _b;
5
- var showEmojiPicker = _a.showEmojiPicker, showMenu = _a.showMenu, onEmojiClick = _a.onEmojiClick, onMenuClick = _a.onMenuClick, onEmojiSelect = _a.onEmojiSelect, onCloseEmojiPicker = _a.onCloseEmojiPicker, onCloseMenu = _a.onCloseMenu, message = _a.message, _c = _a.position, position = _c === void 0 ? 'right' : _c, _d = _a.canEdit, canEdit = _d === void 0 ? false : _d, onEditClick = _a.onEditClick, onReplyClick = _a.onReplyClick;
6
- var _e = React.useState(false), copied = _e[0], setCopied = _e[1];
18
+ var showEmojiPicker = _a.showEmojiPicker, showMenu = _a.showMenu, onEmojiClick = _a.onEmojiClick, onMenuClick = _a.onMenuClick, onEmojiSelect = _a.onEmojiSelect, onCloseEmojiPicker = _a.onCloseEmojiPicker, onCloseMenu = _a.onCloseMenu, message = _a.message, _c = _a.position, position = _c === void 0 ? 'right' : _c, _d = _a.inline, inline = _d === void 0 ? false : _d, _e = _a.canEdit, canEdit = _e === void 0 ? false : _e, onEditClick = _a.onEditClick, onReplyClick = _a.onReplyClick, _f = _a.allowReact, allowReact = _f === void 0 ? true : _f, _g = _a.visible, visible = _g === void 0 ? false : _g, _h = _a.canDelete, canDelete = _h === void 0 ? false : _h, onDeleteClick = _a.onDeleteClick;
19
+ var _j = React.useState(false), copied = _j[0], setCopied = _j[1];
20
+ var _k = React.useState(false), isHovered = _k[0], setIsHovered = _k[1];
21
+ var containerRef = React.useRef(null);
22
+ var _l = React.useState('above'), menuPlacement = _l[0], setMenuPlacement = _l[1];
7
23
  var handleCopy = function () {
8
24
  if (navigator && navigator.clipboard) {
9
25
  navigator.clipboard.writeText(message);
@@ -11,173 +27,199 @@ var GroupMessageActions = function (_a) {
11
27
  setTimeout(function () { return setCopied(false); }, 1200);
12
28
  }
13
29
  };
14
- return (React.createElement("div", { className: "chat-message-icons", style: (_b = {
15
- display: 'flex',
16
- flexDirection: 'row',
17
- alignItems: 'center',
18
- gap: '7px',
19
- position: 'absolute'
20
- },
21
- _b[position === 'right' ? 'right' : 'left'] = '-60px',
22
- _b.top = '50%',
23
- _b.transform = 'translateY(-50%)',
24
- _b.opacity = 0,
25
- _b.pointerEvents = 'none',
26
- _b.zIndex = 10,
27
- _b.minWidth = '80px',
28
- _b.transition = 'opacity 0.2s',
29
- _b) },
30
- React.createElement("span", { style: {
31
- display: 'flex',
32
- alignItems: 'center',
33
- justifyContent: 'center',
34
- width: '30px',
35
- height: '30px',
36
- background: '#fff',
37
- borderRadius: '50%',
38
- boxShadow: '0 2px 8px rgba(0,0,0,0.10)',
39
- border: '1px solid #eee',
40
- } },
41
- React.createElement("button", { style: {
42
- background: 'none',
43
- border: 'none',
44
- padding: 0,
45
- cursor: 'pointer',
46
- color: '#888',
47
- fontSize: '20px',
30
+ React.useEffect(function () {
31
+ var decidePlacement = function () {
32
+ try {
33
+ if (!containerRef.current || typeof window === 'undefined')
34
+ return;
35
+ var rect = containerRef.current.getBoundingClientRect();
36
+ var spaceAbove = rect.top;
37
+ var spaceBelow = window.innerHeight - rect.bottom;
38
+ var estimatedMenuHeight = 260;
39
+ if (showMenu) {
40
+ if (spaceAbove < estimatedMenuHeight && spaceBelow > spaceAbove) {
41
+ setMenuPlacement('below');
42
+ }
43
+ else {
44
+ setMenuPlacement('above');
45
+ }
46
+ }
47
+ if (showEmojiPicker) {
48
+ if (spaceAbove < estimatedMenuHeight && spaceBelow > spaceAbove) {
49
+ setMenuPlacement('below');
50
+ }
51
+ else {
52
+ setMenuPlacement('above');
53
+ }
54
+ }
55
+ }
56
+ catch (e) {
57
+ }
58
+ };
59
+ decidePlacement();
60
+ if (showMenu || showEmojiPicker) {
61
+ window.addEventListener('resize', decidePlacement);
62
+ window.addEventListener('scroll', decidePlacement, true);
63
+ }
64
+ return function () {
65
+ window.removeEventListener('resize', decidePlacement);
66
+ window.removeEventListener('scroll', decidePlacement, true);
67
+ };
68
+ }, [showMenu, showEmojiPicker]);
69
+ return (React.createElement(React.Fragment, null,
70
+ React.createElement("style", null, "\n @keyframes fadeInScale {\n from { opacity: 0; transform: scale(0.98); }\n to { opacity: 1; transform: scale(1); }\n }\n .message-menu-container button:hover { background: rgba(0,0,0,0.04); }\n .message-menu-container i { width: 18px; text-align: center; }\n .chat-message-icons span button:hover { transform: translateY(-2px); }\n "),
71
+ React.createElement("div", { ref: containerRef, className: "chat-message-icons", style: (_b = {
48
72
  display: 'flex',
73
+ flexDirection: 'row',
49
74
  alignItems: 'center',
50
- justifyContent: 'center',
51
- }, onClick: onEmojiClick },
52
- React.createElement("i", { className: "fas fa-smile" }))),
53
- React.createElement("span", { style: {
54
- display: 'flex',
55
- alignItems: 'center',
56
- justifyContent: 'center',
57
- width: '30px',
58
- height: '30px',
59
- background: '#fff',
60
- borderRadius: '50%',
61
- boxShadow: '0 2px 8px rgba(0,0,0,0.10)',
62
- border: '1px solid #eee',
63
- } },
64
- React.createElement("button", { style: {
65
- background: 'none',
66
- border: 'none',
67
- padding: 0,
68
- cursor: 'pointer',
69
- color: '#888',
70
- fontSize: '20px',
75
+ gap: '8px',
76
+ position: 'absolute'
77
+ },
78
+ _b[position === 'right' ? 'right' : 'left'] = position === 'right' ? '-52px' : '-52px',
79
+ _b.top = '50%',
80
+ _b.transform = 'translateY(-50%)',
81
+ _b.opacity = visible || isHovered || showEmojiPicker || showMenu ? 1 : 0,
82
+ _b.pointerEvents = visible || isHovered || showEmojiPicker || showMenu ? 'auto' : 'none',
83
+ _b.zIndex = 10002,
84
+ _b.minWidth = '48px',
85
+ _b.transition = 'opacity 0.2s',
86
+ _b), onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } },
87
+ allowReact && (React.createElement("span", { style: {
71
88
  display: 'flex',
72
89
  alignItems: 'center',
73
90
  justifyContent: 'center',
74
- }, onClick: onMenuClick },
75
- React.createElement("i", { className: "fas fa-ellipsis-h" }))),
76
- showEmojiPicker && (React.createElement("div", { className: "emoji-picker-container", style: {
77
- position: 'absolute',
78
- zIndex: 9999,
79
- backgroundColor: 'white',
80
- borderRadius: '12px',
81
- boxShadow: '0 4px 20px rgba(0,0,0,0.15)',
82
- border: '1px solid #e0e0e0',
83
- } },
84
- React.createElement(EmojiPicker, { onEmojiClick: function (emojiData) {
85
- var _a;
86
- var emojiId = emojiData.unified; // unique
87
- var rawType = ((_a = emojiData.names) === null || _a === void 0 ? void 0 : _a[0]) || "unknown"; // no slug in type
88
- var emojiType = rawType.toLowerCase().replace(/\s+/g, "_");
89
- onEmojiSelect({ emojiId: emojiId, emojiType: emojiType });
90
- }, width: 300, height: 300, previewConfig: { showPreview: false }, searchDisabled: true }))),
91
- showMenu && (React.createElement("div", { className: "message-menu-container", style: {
92
- position: 'absolute',
93
- zIndex: 9999,
94
- background: '#fff',
95
- borderRadius: '16px',
96
- boxShadow: '0 4px 20px rgba(0,0,0,0.15)',
97
- border: '1px solid #e0e0e0',
98
- minWidth: '170px',
99
- padding: '12px 0',
100
- display: 'flex',
101
- flexDirection: 'column',
102
- gap: '2px',
103
- } },
104
- React.createElement("button", { style: {
105
- background: 'none',
106
- border: 'none',
107
- width: '100%',
108
- display: 'flex',
109
- alignItems: 'center',
110
- gap: '14px',
111
- padding: '12px 24px',
112
- fontSize: '16px',
113
- color: '#444',
114
- cursor: 'pointer',
115
- }, onClick: function () {
116
- onCloseMenu();
117
- onReplyClick === null || onReplyClick === void 0 ? void 0 : onReplyClick();
118
- } },
119
- React.createElement("i", { className: "fas fa-reply", style: { fontSize: '18px', color: '#888' } }),
120
- " Reply"),
121
- React.createElement("button", { style: {
122
- background: 'none',
123
- border: 'none',
124
- width: '100%',
125
- display: 'flex',
126
- alignItems: 'center',
127
- gap: '14px',
128
- padding: '12px 24px',
129
- fontSize: '16px',
130
- color: copied ? '#007bff' : '#444',
131
- cursor: 'pointer',
132
- position: 'relative',
133
- }, onClick: handleCopy },
134
- React.createElement("i", { className: "fas fa-copy", style: { fontSize: '18px', color: copied ? '#007bff' : '#888' } }),
135
- " ",
136
- copied ? 'Copied' : 'Copy'),
137
- canEdit && (React.createElement("button", { style: {
138
- background: 'none',
139
- border: 'none',
140
- width: '100%',
141
- display: 'flex',
142
- alignItems: 'center',
143
- gap: '14px',
144
- padding: '12px 24px',
145
- fontSize: '16px',
146
- color: '#444',
147
- cursor: 'pointer',
148
- }, onClick: function () {
149
- onCloseMenu();
150
- onEditClick && onEditClick();
91
+ width: '30px',
92
+ height: '30px',
93
+ background: '#fff',
94
+ borderRadius: '50%',
95
+ boxShadow: '0 2px 8px rgba(0,0,0,0.10)',
96
+ border: '1px solid #eee',
151
97
  } },
152
- React.createElement("i", { className: "fas fa-pencil-alt", style: { fontSize: '18px', color: '#888' } }),
153
- " Edit")),
154
- React.createElement("button", { style: {
155
- background: 'none',
156
- border: 'none',
157
- width: '100%',
98
+ React.createElement("button", { style: {
99
+ background: 'none',
100
+ border: 'none',
101
+ padding: 0,
102
+ cursor: 'pointer',
103
+ color: '#888',
104
+ fontSize: '20px',
105
+ display: 'flex',
106
+ alignItems: 'center',
107
+ justifyContent: 'center',
108
+ }, onClick: function (e) {
109
+ e.stopPropagation();
110
+ onEmojiClick();
111
+ } },
112
+ React.createElement("i", { className: "fas fa-smile" })))),
113
+ React.createElement("span", { style: {
158
114
  display: 'flex',
159
115
  alignItems: 'center',
160
- gap: '14px',
161
- padding: '12px 24px',
162
- fontSize: '16px',
163
- color: '#444',
164
- cursor: 'pointer',
165
- } },
166
- React.createElement("i", { className: "fas fa-info-circle", style: { fontSize: '18px', color: '#888' } }),
167
- " Info"),
168
- React.createElement("button", { style: {
169
- background: 'none',
170
- border: 'none',
171
- width: '100%',
172
- display: 'flex',
173
- alignItems: 'center',
174
- gap: '14px',
175
- padding: '12px 24px',
176
- fontSize: '16px',
177
- color: '#444',
178
- cursor: 'pointer',
116
+ justifyContent: 'center',
117
+ width: '30px',
118
+ height: '30px',
119
+ background: '#fff',
120
+ borderRadius: '50%',
121
+ boxShadow: '0 2px 8px rgba(0,0,0,0.10)',
122
+ border: '1px solid #eee',
179
123
  } },
180
- React.createElement("i", { className: "fas fa-trash", style: { fontSize: '18px', color: '#888' } }),
181
- " Delete")))));
124
+ React.createElement("button", { style: {
125
+ background: 'none',
126
+ border: 'none',
127
+ padding: 0,
128
+ cursor: 'pointer',
129
+ color: '#888',
130
+ fontSize: '20px',
131
+ display: 'flex',
132
+ alignItems: 'center',
133
+ justifyContent: 'center',
134
+ }, onClick: function (e) {
135
+ e.stopPropagation();
136
+ onMenuClick();
137
+ } },
138
+ React.createElement("i", { className: "fas fa-ellipsis-h" }))),
139
+ showEmojiPicker && allowReact && (React.createElement("div", { className: "emoji-picker-container", onClick: function (e) { return e.stopPropagation(); }, style: __assign(__assign({ position: 'absolute' }, (menuPlacement === 'above' ? { bottom: '100%', marginBottom: '8px' } : { top: '100%', marginTop: '8px' })), { zIndex: 10003, backgroundColor: 'white', borderRadius: '12px', boxShadow: '0 4px 20px rgba(0,0,0,0.15)', border: '1px solid #e0e0e0' }) },
140
+ React.createElement(EmojiPicker, { onEmojiClick: function (emojiData) {
141
+ var _a;
142
+ var emojiId = emojiData.unified; // unique
143
+ var rawType = ((_a = emojiData.names) === null || _a === void 0 ? void 0 : _a[0]) || "unknown"; // no slug in type
144
+ var emojiType = rawType.toLowerCase().replace(/\s+/g, "_");
145
+ onEmojiSelect({ emojiId: emojiId, emojiType: emojiType });
146
+ }, width: 300, height: 300, previewConfig: { showPreview: false }, searchDisabled: true }))),
147
+ showMenu && (React.createElement("div", { className: "message-menu-container", style: __assign(__assign({ position: 'absolute' }, (menuPlacement === 'above' ? { bottom: '100%', marginBottom: '8px' } : { top: '100%', marginTop: '8px' })), { right: position === 'right' ? '0' : 'auto', left: position === 'left' ? '0' : 'auto', zIndex: 10003, background: '#fff', borderRadius: '10px', boxShadow: '0 8px 24px rgba(0,0,0,0.10)', border: '1px solid rgba(15,23,42,0.06)', minWidth: '160px', padding: '6px 0', display: 'flex', flexDirection: 'column', gap: '0', animation: 'fadeInScale 0.12s ease-out' }) },
148
+ React.createElement("button", { style: {
149
+ background: 'none',
150
+ border: 'none',
151
+ width: '100%',
152
+ display: 'flex',
153
+ alignItems: 'center',
154
+ gap: '12px', padding: '10px 16px',
155
+ fontSize: '14px', color: '#444', cursor: 'pointer',
156
+ }, onClick: function () {
157
+ onCloseMenu();
158
+ onReplyClick === null || onReplyClick === void 0 ? void 0 : onReplyClick();
159
+ } },
160
+ React.createElement(FontAwesomeIcon, { icon: AppIcons.faCommentDots.icon, style: { fontSize: AppIcons.faCommentDots.size, color: AppIcons.faCommentDots.color }, "aria-hidden": true }),
161
+ "Thread"),
162
+ React.createElement("button", { style: {
163
+ background: 'none',
164
+ border: 'none',
165
+ width: '100%',
166
+ display: 'flex',
167
+ alignItems: 'center', gap: '12px',
168
+ padding: '10px 16px',
169
+ fontSize: '14px',
170
+ color: copied ? '#007bff' : '#444',
171
+ cursor: 'pointer',
172
+ position: 'relative',
173
+ }, onClick: handleCopy },
174
+ React.createElement(FontAwesomeIcon, { icon: AppIcons.faCopy.icon, style: { fontSize: AppIcons.faCopy.size, color: AppIcons.faCopy.color }, "aria-hidden": true }),
175
+ copied ? 'Copied' : 'Copy'),
176
+ canEdit && (React.createElement("button", { style: {
177
+ background: 'none',
178
+ border: 'none',
179
+ width: '100%',
180
+ display: 'flex',
181
+ alignItems: 'center',
182
+ gap: '12px',
183
+ padding: '10px 16px',
184
+ fontSize: '14px',
185
+ color: '#444',
186
+ cursor: 'pointer',
187
+ }, onClick: function () {
188
+ onCloseMenu();
189
+ onEditClick && onEditClick();
190
+ } },
191
+ React.createElement(FontAwesomeIcon, { icon: AppIcons.faPenToSquare.icon, style: { fontSize: AppIcons.faPenToSquare.size, color: AppIcons.faPenToSquare.color }, "aria-hidden": true }),
192
+ "Edit")),
193
+ React.createElement("button", { style: {
194
+ background: 'none',
195
+ border: 'none',
196
+ width: '100%',
197
+ display: 'flex',
198
+ alignItems: 'center',
199
+ gap: '12px',
200
+ padding: '10px 16px',
201
+ fontSize: '14px',
202
+ color: '#444',
203
+ cursor: 'pointer',
204
+ } },
205
+ React.createElement(FontAwesomeIcon, { icon: AppIcons.faReply.icon, style: { fontSize: AppIcons.faReply.size, color: AppIcons.faReply.color }, "aria-hidden": true }),
206
+ "Reply"),
207
+ canDelete && (React.createElement("button", { style: {
208
+ background: 'none',
209
+ border: 'none',
210
+ width: '100%',
211
+ display: 'flex',
212
+ alignItems: 'center',
213
+ gap: '12px',
214
+ padding: '10px 16px',
215
+ fontSize: '14px',
216
+ color: '#444',
217
+ cursor: 'pointer',
218
+ }, onClick: function () {
219
+ onCloseMenu();
220
+ onDeleteClick && onDeleteClick();
221
+ } },
222
+ React.createElement(FontAwesomeIcon, { icon: AppIcons.DeleteChat.icon, style: { fontSize: AppIcons.DeleteChat.size, color: AppIcons.DeleteChat.color }, "aria-hidden": true }),
223
+ "Delete")))))));
182
224
  };
183
225
  export default GroupMessageActions;
@@ -3,6 +3,7 @@ interface MessageActionsProps {
3
3
  showEmojiPicker: boolean;
4
4
  showMenu: boolean;
5
5
  onEmojiClick: () => void;
6
+ allowReact?: boolean;
6
7
  onMenuClick: () => void;
7
8
  onEmojiSelect: (emoji: {
8
9
  emoji: string;
@@ -13,7 +14,9 @@ interface MessageActionsProps {
13
14
  position?: 'left' | 'right';
14
15
  canEdit?: boolean;
15
16
  onEditClick?: () => void;
16
- onReplyClick?: () => void;
17
+ onThreadClick?: () => void;
18
+ canDelete?: boolean;
19
+ onDeleteClick?: () => void;
17
20
  }
18
21
  declare const MessageActions: React.FC<MessageActionsProps>;
19
22
  export default MessageActions;