isometrik-chat 0.1.0

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 (188) hide show
  1. package/README.md +74 -0
  2. package/babel.config.js +6 -0
  3. package/dist/index.js +684 -0
  4. package/package.json +59 -0
  5. package/public/Logo-192x192.png +0 -0
  6. package/public/Logo-512x512.png +0 -0
  7. package/public/favicon.ico +0 -0
  8. package/public/fonts/BenjaminVictoria.ttf +0 -0
  9. package/public/icons/arrow_logo.svg +9 -0
  10. package/public/icons/assets/ic_placeholder_banner.svg +1 -0
  11. package/public/icons/attach-file.svg +9 -0
  12. package/public/icons/audio_pause.svg +1 -0
  13. package/public/icons/audio_play.svg +6 -0
  14. package/public/icons/back.svg +3 -0
  15. package/public/icons/bell.svg +1 -0
  16. package/public/icons/block.svg +1 -0
  17. package/public/icons/bottom-arrow.svg +1 -0
  18. package/public/icons/camera-switch.svg +12 -0
  19. package/public/icons/camera.svg +4 -0
  20. package/public/icons/cancel.svg +1 -0
  21. package/public/icons/chat empty placeholder.svg +58 -0
  22. package/public/icons/chat_audio_pause.png +0 -0
  23. package/public/icons/chat_audio_play.png +0 -0
  24. package/public/icons/close.svg +5 -0
  25. package/public/icons/crossCarousel.svg +3 -0
  26. package/public/icons/delete.svg +3 -0
  27. package/public/icons/disappear.svg +24 -0
  28. package/public/icons/document.png +0 -0
  29. package/public/icons/document.svg +1 -0
  30. package/public/icons/downloadCarousel.svg +6 -0
  31. package/public/icons/edit-pencil.svg +6 -0
  32. package/public/icons/emoji.svg +8 -0
  33. package/public/icons/emojiCarousel.svg +3 -0
  34. package/public/icons/filter.svg +1 -0
  35. package/public/icons/forwardCarousel.svg +3 -0
  36. package/public/icons/gallery.svg +1 -0
  37. package/public/icons/goToMessageCarousel.svg +3 -0
  38. package/public/icons/ic_uil_arrow-left.svg +1 -0
  39. package/public/icons/ic_uil_eye-slash.svg +1 -0
  40. package/public/icons/ic_uil_eye.svg +1 -0
  41. package/public/icons/leftArrowCarousel.svg +6 -0
  42. package/public/icons/light-mode.svg +14 -0
  43. package/public/icons/lock.svg +1 -0
  44. package/public/icons/login_background.png +0 -0
  45. package/public/icons/menu .svg +5 -0
  46. package/public/icons/menuCarousel.svg +5 -0
  47. package/public/icons/message.svg +3 -0
  48. package/public/icons/placeholder.svg +958 -0
  49. package/public/icons/poll.svg +1 -0
  50. package/public/icons/retake.png +0 -0
  51. package/public/icons/right-arrow.svg +3 -0
  52. package/public/icons/right.svg +3 -0
  53. package/public/icons/round-star.svg +1 -0
  54. package/public/icons/search.svg +3 -0
  55. package/public/icons/send.svg +10 -0
  56. package/public/icons/starCarousel.svg +3 -0
  57. package/public/icons/status.svg +1 -0
  58. package/public/icons/sticker.svg +1 -0
  59. package/public/icons/thumb-down.svg +1 -0
  60. package/public/icons/user.svg +1 -0
  61. package/public/icons/users.svg +1 -0
  62. package/public/icons/voice.png +0 -0
  63. package/public/index.html +38 -0
  64. package/public/logo192.png +0 -0
  65. package/public/logo512.png +0 -0
  66. package/public/manifest.json +25 -0
  67. package/public/offline.html +12 -0
  68. package/public/robots.txt +3 -0
  69. package/public/service-worker.js +81 -0
  70. package/src/App.js +15 -0
  71. package/src/App.test.js +8 -0
  72. package/src/Authpage.js +16 -0
  73. package/src/ChatContext.js +172 -0
  74. package/src/Data/index.js +110 -0
  75. package/src/assets/icons.js +49 -0
  76. package/src/assets/images/WhatsApp.html +258 -0
  77. package/src/assets/images/WhatsApp_files/301446776_522918349234681_1974693392291574064_n.jpg +0 -0
  78. package/src/assets/images/WhatsApp_files/app-bf223f825866ee433b07.css +242 -0
  79. package/src/assets/images/WhatsApp_files/app.77ee8aa7a4c593101105.js +77 -0
  80. package/src/assets/images/WhatsApp_files/lazy_loaded_high_priority_components.85a06e74a0a4ade1640b.css +16 -0
  81. package/src/assets/images/WhatsApp_files/lazy_loaded_low_priority_components.8621270bc215a9298a97.css +47 -0
  82. package/src/assets/images/WhatsApp_files/libsignal-protocol-ee5b8ba.min.js +21 -0
  83. package/src/assets/images/WhatsApp_files/main.48b845d68e066fb27a75.css +161 -0
  84. package/src/assets/images/WhatsApp_files/runtime.e6018f3c1e255e8f4dc7.js +2 -0
  85. package/src/assets/images/WhatsApp_files/stylex-d50abd61e6cf7eab2afd855adccf14e5.css +2841 -0
  86. package/src/assets/images/WhatsApp_files/vendor1_app.58a51d93a250f83ab555.js +79 -0
  87. package/src/assets/images/bg.jpeg +0 -0
  88. package/src/assets/images/drkbg.jpg +0 -0
  89. package/src/assets/images/notFound.jpeg +0 -0
  90. package/src/assets/images/watsapp.jpg +0 -0
  91. package/src/assets/images/watsappbg.png +0 -0
  92. package/src/assets/images/wb.jpg +0 -0
  93. package/src/assets/images/whatsapp.jpeg +0 -0
  94. package/src/components/ChatBox/AudioBubble.js +162 -0
  95. package/src/components/ChatBox/ChatBubble.js +232 -0
  96. package/src/components/ChatBox/DocumentBubble.js +87 -0
  97. package/src/components/ChatBox/MessagesBox.js +533 -0
  98. package/src/components/CustomModal.js +60 -0
  99. package/src/components/Icon.js +10 -0
  100. package/src/components/ImageComponent.js +24 -0
  101. package/src/components/MediaDocs.js +155 -0
  102. package/src/components/MediaDocumentContainer.js +55 -0
  103. package/src/components/MessageInfoDropdown.js +124 -0
  104. package/src/components/Modal/AllowMicPermissionModal.js +63 -0
  105. package/src/components/Modal/BlockUnblockChatModal.js +78 -0
  106. package/src/components/Modal/CameraPermissionBlockedModal.js +61 -0
  107. package/src/components/Modal/CameraPermissionRequestModal.js +60 -0
  108. package/src/components/Modal/ClearChatModal.js +78 -0
  109. package/src/components/Modal/DeleteChatModal.js +79 -0
  110. package/src/components/Modal/MicPermissionDisableModal.js +63 -0
  111. package/src/components/Modal/Modal.js +103 -0
  112. package/src/components/Modal/ModalDialog.js +103 -0
  113. package/src/components/Modal/ProfilePictureUploadPreview.js +160 -0
  114. package/src/components/OutsideAlerter/OutsideAlerter.js +38 -0
  115. package/src/components/ProfilePicture/ProfilePicture.js +127 -0
  116. package/src/components/Registration/Login.js +265 -0
  117. package/src/components/Registration/SignUp.js +322 -0
  118. package/src/components/SnackBar.js +42 -0
  119. package/src/components/common/Modal/useDetectOutsideClick.js +23 -0
  120. package/src/components/common/styled/PageWrapper.js +25 -0
  121. package/src/components/formcontrol/CustomButton.js +38 -0
  122. package/src/components/formcontrol/InputText.js +60 -0
  123. package/src/global-styles.js +42 -0
  124. package/src/hooks/useDeviceType.js +28 -0
  125. package/src/hooks/useThrottle.js +29 -0
  126. package/src/index.css +225 -0
  127. package/src/index.js +23 -0
  128. package/src/lib/constant.js +21 -0
  129. package/src/lib/functionality.js +13 -0
  130. package/src/lib/helpers.js +320 -0
  131. package/src/lib/mockData/index.js +76 -0
  132. package/src/lib/session/index.js +31 -0
  133. package/src/lib/validation.js +4 -0
  134. package/src/logo.svg +1 -0
  135. package/src/pages/WhatsappMainBox/index.js +574 -0
  136. package/src/reportWebVitals.js +13 -0
  137. package/src/services/deliveryStatus.js +27 -0
  138. package/src/setupTests.js +5 -0
  139. package/src/utils/chatSdk.js +14 -0
  140. package/src/utils/global.js +57 -0
  141. package/src/utils/media.js +79 -0
  142. package/src/view/component/BlockedContactSlide.js +134 -0
  143. package/src/view/component/Carousle/UpperMenuBar.js +106 -0
  144. package/src/view/component/Carousle/index.js +204 -0
  145. package/src/view/component/Chatbox.js/AudioRecorder.js +311 -0
  146. package/src/view/component/Chatbox.js/ChatBubbleReply.js +27 -0
  147. package/src/view/component/Chatbox.js/TakePhoto.js +363 -0
  148. package/src/view/component/Chatbox.js/index.js +856 -0
  149. package/src/view/component/Chatbox.js/styles.css +231 -0
  150. package/src/view/component/Contact/index.js +56 -0
  151. package/src/view/component/Contact/styles.css +208 -0
  152. package/src/view/component/ContactInfo/index.js +543 -0
  153. package/src/view/component/ContactInfo/styles.css +289 -0
  154. package/src/view/component/Context/index.js +3 -0
  155. package/src/view/component/DialogBox.js +15 -0
  156. package/src/view/component/ImageCropper/ImageCropper.js +128 -0
  157. package/src/view/component/Loader/Loader.js +52 -0
  158. package/src/view/component/Loader/UserPagingLoader.js +62 -0
  159. package/src/view/component/MainChatBox/index.js +819 -0
  160. package/src/view/component/MainChatBox/styles.css +124 -0
  161. package/src/view/component/Menu/index.js +261 -0
  162. package/src/view/component/Menu/styles.css +68 -0
  163. package/src/view/component/Profile/ProfileInfoContainer.js +112 -0
  164. package/src/view/component/Profile/ProfileUpdate.js +178 -0
  165. package/src/view/component/Profile/TakeProfilePhoto.js +391 -0
  166. package/src/view/component/Profile/index.js +550 -0
  167. package/src/view/component/Profile/styles.css +370 -0
  168. package/src/view/component/ReplyChatMessage/ReplyChatMessage.js +48 -0
  169. package/src/view/component/SeachBar/index.js +106 -0
  170. package/src/view/component/SeachBar/styles.css +53 -0
  171. package/src/view/component/Siderbar/index.js +512 -0
  172. package/src/view/component/Siderbar/styles.css +138 -0
  173. package/src/view/component/Toaster/Toaster.js +117 -0
  174. package/src/view/component/UserDetailsCard/UserDetailCard.js +337 -0
  175. package/src/view/component/deleteMessageMoal.js +80 -0
  176. package/src/view/component/emoji/index.js +22 -0
  177. package/src/view/component/emoji/sstyles.css +0 -0
  178. package/src/view/component/forwardData/index.js +327 -0
  179. package/src/view/component/forwardData/styles.css +112 -0
  180. package/src/view/component/forwardPopup/index.js +55 -0
  181. package/src/view/component/forwardPopup/styles.css +144 -0
  182. package/src/view/component/mediaList/index.js +92 -0
  183. package/src/view/component/menuDialog/index.js +71 -0
  184. package/src/view/component/menuDialog/styles.css +24 -0
  185. package/src/view/component/pagination/pagination.js +52 -0
  186. package/src/view/component/pagination/paginationForMsg.js +43 -0
  187. package/src/view/component/sidebarChat/index.js +321 -0
  188. package/src/view/component/sidebarChat/styles.css +109 -0
@@ -0,0 +1,124 @@
1
+ .mainChat {
2
+ flex: 1;
3
+ flex-direction: column;
4
+ position: absolute;
5
+ width: 70%;
6
+ height: 100vh;
7
+
8
+ /* border-bottom: 1px solid; */
9
+ }
10
+
11
+ .mainChatt {
12
+ flex: 1;
13
+ flex-direction: column;
14
+ position: absolute;
15
+ width: 40%;
16
+ /* border-bottom: 1px solid; */
17
+ }
18
+
19
+ .mainChat .chat_header {
20
+ display: flex;
21
+ align-items: center;
22
+ border-bottom: 1px solid var(--border_color);
23
+ padding: 10px 10px;
24
+ flex: 1;
25
+ background-color:var(--gray_color)
26
+ }
27
+
28
+ .mainChatt .chat_Header {
29
+ display: flex;
30
+ background-color: var(--gray_color);
31
+ align-items: center;
32
+ border-bottom: 1px solid var(--border_color);
33
+ padding: 10px 12px;
34
+ flex: 1;
35
+ /* height: 50px; */
36
+ }
37
+
38
+ .chat_headerInfo {
39
+ flex: 1;
40
+ margin-left: 10px
41
+ }
42
+
43
+ .MuiDialog-container {
44
+ display: flex !important;
45
+ /* justify-content: flex-end !important */
46
+ }
47
+
48
+ .chat_headerInfo p {
49
+ color:var(--black);
50
+ margin-bottom: 0px
51
+ }
52
+
53
+ .chatbox_Bg {
54
+ height: 100%;
55
+
56
+ }
57
+
58
+ .chatbox_Bg img {
59
+ height: 100%;
60
+ width: 100%
61
+ }
62
+
63
+ .bg {
64
+
65
+ height: 100vh;
66
+ text-align: center;
67
+ display: block;
68
+ /* border: 2px solid; */
69
+ }
70
+ .bg div h1 {
71
+ font-size: 32px;
72
+ font-weight: 300px;
73
+ color: var(--black);
74
+ margin-top: 20px;
75
+ }
76
+
77
+ .bg .text {
78
+ font-size: 14px;
79
+ font-weight: 400px;
80
+ line-height: 20px;
81
+ width:33rem;
82
+ }
83
+
84
+ .contactInfo {
85
+ height: 100vh;
86
+ width: 70vw;
87
+ position: fixed;
88
+ z-index: 1;
89
+ top: 0;
90
+ right: 0;
91
+ overflow-x: hidden;
92
+ transition: 0.1s;
93
+ z-index: 999;
94
+ }
95
+
96
+ .contact {
97
+ height: 100vh;
98
+ width: 0px;
99
+ position: fixed;
100
+ z-index: 1;
101
+ top: 0;
102
+ right: 0;
103
+ overflow-x: hidden;
104
+ transition: 0.1s;
105
+ }
106
+
107
+ .mainChat .chatbox_Bg {
108
+ background-color: #f0f2f5
109
+ }
110
+
111
+ .chatbox_Bg .footer {
112
+ font-size: 14px;
113
+ margin-top: 60px
114
+ }
115
+
116
+ @media (max-width: 420px) {
117
+ .search_icon{
118
+ margin: 0.8rem !important;
119
+ }
120
+ .chat_header_right{
121
+ display: flex;
122
+ align-items: center;
123
+ }
124
+ }
@@ -0,0 +1,261 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import Profile from "../Profile";
3
+ import "./styles.css";
4
+
5
+ function Menu({
6
+ index,
7
+ isShown,
8
+ chatPin,
9
+ chatUnPin,
10
+ chatDelete,
11
+ handleClose,
12
+ headerMenu,
13
+ headerMenuCloseHandle,
14
+ pinedData,
15
+ markChatPin,
16
+ markedData,
17
+ data,
18
+ markUnchat,
19
+ }) {
20
+ const [newGroup, setNewGroup] = useState(false);
21
+ const [newCommunity, setNewCommunity] = useState(false);
22
+ const [startedMessage, setStartedMessage] = useState(false);
23
+ const [settings, setSettings] = useState(false);
24
+ const [logout, setLogout] = useState(false);
25
+ var menuItem = [
26
+ "Archiv chat",
27
+ "Mute conversation",
28
+ "Delete chat",
29
+ `${data?.pin ? "unpin chat" : "pin chat"}`,
30
+ `${data?.mark ? "mark as read" : "mark as unread"}`,
31
+ // "mark as read",
32
+ ];
33
+ var headerMenuitem = [
34
+ "New Group",
35
+ "New Community",
36
+ "Started Message",
37
+ "Setting",
38
+ "Logout",
39
+ ];
40
+
41
+
42
+ const chatHandle = (index, data) => {
43
+ if (data == "Delete chat") {
44
+ var deleteItem = isShown;
45
+ chatDelete(deleteItem);
46
+ }
47
+
48
+ if (data == "pin chat") {
49
+ var pinItem = isShown;
50
+ // console.log("kuldeep",isShown );
51
+ chatPin(pinItem);
52
+ }
53
+ if (data == "unpin chat") {
54
+ var unpinItem = isShown;
55
+ chatUnPin(unpinItem);
56
+ }
57
+
58
+ if (data == "mark as unread") {
59
+ var markItem = isShown;
60
+ markChatPin(markItem);
61
+ }
62
+
63
+ if (data == "mark as read") {
64
+ var unMarkItem = isShown;
65
+ markUnchat(unMarkItem);
66
+ // console.log("unMarkItem", unMarkItem);
67
+ }
68
+ };
69
+
70
+ const headerMenuClose = () => {
71
+ headerMenuCloseHandle();
72
+ };
73
+
74
+ const headerMenuHandler = (index) => {
75
+ if (index == "0") {
76
+ setNewGroup(true);
77
+ }
78
+
79
+ if (index == "1") {
80
+ setNewCommunity(true);
81
+ }
82
+
83
+ if (index == "2") {
84
+ setStartedMessage(true);
85
+ }
86
+
87
+ if (index == "3") {
88
+ setSettings(true);
89
+ }
90
+
91
+ if (index == "4") {
92
+ setLogout(true);
93
+ }
94
+ };
95
+ const newGroupHandle = () => {
96
+ setNewGroup(false);
97
+ headerMenuClose();
98
+ };
99
+
100
+ const newCommunityHandle = () => {
101
+ setNewCommunity(false);
102
+ headerMenuClose();
103
+ };
104
+
105
+ const startedMessageHandle = () => {
106
+ setStartedMessage(false);
107
+ headerMenuClose();
108
+ };
109
+
110
+ const settingsHandle = () => {
111
+ setSettings(false);
112
+ headerMenuClose();
113
+ };
114
+
115
+ const modalClose = () => {
116
+ setLogout(false);
117
+ headerMenuClose();
118
+ };
119
+ return (
120
+ <div
121
+ className={`${headerMenu ? "headermenu bg-white" : "bg-white menu"} ${
122
+ logout ? "mw-0" : ""
123
+ }`}
124
+ >
125
+ <div
126
+ className={logout ? "d-none pointer" : "pointer"}
127
+ style={{
128
+ position: "relative",
129
+ color: "black",
130
+ display: "flex",
131
+ padding: "10px 10px 0px 10px",
132
+ justifyContent: "flex-end",
133
+ }}
134
+ >
135
+ <svg
136
+ onClick={!headerMenu ? handleClose : headerMenuClose}
137
+ xmlns="http://www.w3.org/2000/svg"
138
+ width="22"
139
+ height="22"
140
+ fill="currentColor"
141
+ class="bi bi-x-lg"
142
+ viewBox="0 0 16 16"
143
+ >
144
+ <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z" />
145
+ </svg>
146
+ </div>
147
+
148
+ <div
149
+ style={{ display: "flex", flexDirection: "column" }}
150
+ className={logout ? "d-none" : ""}
151
+ >
152
+ {!headerMenu
153
+ ? menuItem?.map((data, index) => {
154
+ return (
155
+ <div className="menuBox">
156
+ <p onClick={() => chatHandle(index, data)}>{data}</p>
157
+ </div>
158
+ );
159
+ })
160
+ : headerMenuitem.map((data, index) => {
161
+ return (
162
+ <div className="menuBox pointer">
163
+ <p
164
+ onClick={() => {
165
+ headerMenuHandler(index, data);
166
+ }}
167
+ >
168
+ {data}
169
+ </p>{" "}
170
+ </div>
171
+ );
172
+ })}
173
+ </div>
174
+
175
+ {newGroup || newCommunity || startedMessage || settings ? (
176
+ <div className="bg-white">
177
+ <Profile
178
+ logout
179
+ settingsHandle={settingsHandle}
180
+ settings={settings}
181
+ newGroup={newGroup}
182
+ newGroupHandle={newGroupHandle}
183
+ newCommunity={newCommunity}
184
+ newCommunityHandle={newCommunityHandle}
185
+ startedMessage={startedMessage}
186
+ startedMessageHandle={startedMessageHandle}
187
+ />
188
+ </div>
189
+ ) : (
190
+ ""
191
+ )}
192
+
193
+ {logout ? (
194
+ <>
195
+ <div className="logoutdialog">
196
+ <div
197
+ className="bg-white position-absolute menumodal "
198
+ aria-hidden="true"
199
+ data-mdb-backdrop="static"
200
+ >
201
+ <div>
202
+ <span
203
+ onClick={modalClose}
204
+ className="d-flex pointer justify-content-end"
205
+ >
206
+ <svg
207
+ xmlns="http://www.w3.org/2000/svg"
208
+ width="22"
209
+ height="22"
210
+ fill="currentColor"
211
+ class="bi bi-x-lg"
212
+ viewBox="0 0 16 16"
213
+ >
214
+ <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z" />
215
+ </svg>
216
+ </span>
217
+ <h>
218
+ <h5 style={{ marginTop: "10px" }}>Log Out</h5>
219
+ </h>
220
+ </div>
221
+ <div style={{ marginTop: "20px" }}>
222
+ <h>Are you sure you want to log out </h>{" "}
223
+ </div>
224
+
225
+ <div
226
+ className="d-flex"
227
+ style={{
228
+ marginTop: "50px",
229
+ paddingLeft: "35px",
230
+ justifyContent: "space-around",
231
+ }}
232
+ >
233
+ <button
234
+ className="bg-white color-green btnn"
235
+ style={{
236
+ marginLeft: "150px",
237
+ color: "#008069",
238
+ border: "1px solid lightgray",
239
+ }}
240
+ onClick={modalClose}
241
+ >
242
+ Cancel
243
+ </button>
244
+ <button
245
+ className="btnn text-white"
246
+ style={{ backgroundColor: "#008069" }}
247
+ >
248
+ Log Out
249
+ </button>{" "}
250
+ </div>
251
+ </div>
252
+ </div>
253
+ </>
254
+ ) : (
255
+ ""
256
+ )}
257
+ </div>
258
+ );
259
+ }
260
+
261
+ export default Menu;
@@ -0,0 +1,68 @@
1
+ :root {
2
+ --primary: #3b4a54;
3
+ }
4
+
5
+ .menu {
6
+ box-shadow: 0 2px 5px 0 rgba(var(--shadow-rgb), 0.26),
7
+ 0 2px 10px 0 rgba(var(--shadow-rgb), 0.16);
8
+ transition: 1s infinite show;
9
+ box-sizing: border-box;
10
+ display: block;
11
+ color: var(--primary);
12
+ white-space: nowrap;
13
+ }
14
+
15
+ .headermenu {
16
+ box-shadow: 0 2px 5px 0 rgba(var(--shadow-rgb), 0.26),
17
+ 0 2px 10px 0 rgba(var(--shadow-rgb), 0.16);
18
+ position: absolute;
19
+ top: 41px;
20
+ width: 215px;
21
+ left: 169px;
22
+ display: block;
23
+ z-index: 10000;
24
+ }
25
+
26
+ .menu p:hover,
27
+ .headermenu p:hover {
28
+ background-color: lightgray;
29
+ }
30
+
31
+ .menuBox p {
32
+ padding: 0 2rem;
33
+ margin: 0;
34
+ line-height: 2.5rem;
35
+ display: flex;
36
+ justify-content: space-between;
37
+ align-items: center;
38
+ font-size: 14.5px;
39
+ color: var(--primary);
40
+ }
41
+
42
+ .logoutdialog {
43
+ background-color: hsla(0, 0%, 100%, 0.85);
44
+ padding: 200px;
45
+ height: 100vh;
46
+ top: -41px;
47
+ margin-left: -169px;
48
+ margin-top: -41px;
49
+ width: 100vw;
50
+ z-index: 100000;
51
+ background-size: cover;
52
+ }
53
+
54
+ .headermenu .menumodal {
55
+ left: 270px;
56
+ box-shadow: 0 2px 5px 0 rgba(var(--shadow-rgb), 0.26),
57
+ 0 2px 10px 0 rgba(var(--shadow-rgb), 0.16);
58
+ top: 150px;
59
+ width: 35vw;
60
+ padding: 22px 24px 20px;
61
+ }
62
+
63
+ div .btnn {
64
+ /* padding: 10px 24px; */
65
+ border: 1px solid transparent;
66
+ border-radius: 3px;
67
+ /* padding: 5px 25px; */
68
+ }
@@ -0,0 +1,112 @@
1
+ import React, { useEffect, useRef, useState } from 'react';
2
+ import ImageComponent from '../../../components/ImageComponent';
3
+ import { CORRECT_ICON, EDITPENCILICON, EMOJI_ICON } from '../../../utils/global';
4
+ import ProfileUpdate from './ProfileUpdate';
5
+ import styled from 'styled-components';
6
+ import { USER_BIO_MAX_LENGTH, USER_NAME_MAX_LENGTH, } from '../../../lib/constant';
7
+
8
+ const UserNameStatus = styled.h5`
9
+ color: var(--danger) !important;
10
+ font-size: 12px;
11
+ width: 90%;
12
+ margin-top: 3px;
13
+ `;
14
+
15
+ const ProfileInfoContainer = (props) => {
16
+ const { setShowImageUploaderOption, userDetails, updateUserDetails, setUpdateUserDetails, showImageUploaderOption, nameDisable, changeInputHandler, theme, nameHandler, saveNameBtn, statusDisable, statusInputHandler, saveStatusBtn, statusHandler, updateUserProfile, setUserDetails, setShowProfilePicture, showUsernameInvalid, handleProfileUpdateKeyDown, setShowUsernameInvalid, setNameDisable } = props;
17
+ const nameInputRef = useRef(null);
18
+ // const statusInputRef = useRef(null);
19
+
20
+ useEffect(() => {
21
+ if (!nameDisable) {
22
+ nameInputRef.current.focus();
23
+ }
24
+ // else if (!statusDisable) {
25
+ // statusInputRef.current.focus();
26
+ // }
27
+ }, [nameDisable ,statusDisable])
28
+
29
+ return (
30
+ <div>
31
+ <div
32
+ className={
33
+ props?.slideShow ? " profile-avatar proAvatar" : "profile-avatar"
34
+ }
35
+ >
36
+ <div className='profile_pic_container' >
37
+ <img className='user_profile_picture objCover' src={updateUserDetails?.userProfileImageUrl} alt="" />
38
+ <ProfileUpdate userDetails={userDetails} setUpdateUserDetails={setUpdateUserDetails} showImageUploaderOption={showImageUploaderOption} updateUserProfile={updateUserProfile} setUserDetails={setUserDetails} setShowProfilePicture={setShowProfilePicture} theme={theme} updateUserDetails={updateUserDetails} setShowUsernameInvalid={setShowUsernameInvalid} setNameDisable={setNameDisable}
39
+ />
40
+ </div>
41
+ </div>
42
+ <div
43
+ className={props?.slideShow ? "profile_body body" : "profile_body"}
44
+ >
45
+ <div className="profile_name">
46
+ <p>Your Name</p>
47
+ <div style={{ alignItems: "center", width:"90%" }}>
48
+ <div className={!nameDisable ? "inputField user_input_text" : "user_input_text"}>
49
+ <input
50
+ ref={nameInputRef}
51
+ name="userName"
52
+ value={updateUserDetails?.userName}
53
+ onChange={changeInputHandler}
54
+ disabled={nameDisable}
55
+ onKeyDown={handleProfileUpdateKeyDown}
56
+ placeholder="Please enter your name"
57
+ className="nameFiled"
58
+ type='text'
59
+ />
60
+ {!nameDisable ? (
61
+ <p className="emoji_Icon">
62
+ <p className={`${updateUserDetails?.userName?.length >= USER_NAME_MAX_LENGTH ? 'danger__text' : ''} input_maxlength_checker`} >{updateUserDetails?.userName?.length}</p>
63
+ <ImageComponent
64
+ src={EMOJI_ICON}
65
+ className={
66
+ theme
67
+ ? "darkicons"
68
+ : "lighticons"
69
+ }
70
+ />
71
+ <ImageComponent
72
+ style={{ marginLeft: "6px" }}
73
+ onClick={saveNameBtn}
74
+ src={CORRECT_ICON}
75
+ className={
76
+ theme
77
+ ? "darkicons"
78
+ : "lighticons"
79
+ }
80
+ />
81
+ </p>
82
+ ) : (
83
+ <p className="edit_Icon">
84
+ <ImageComponent
85
+ onClick={nameHandler}
86
+ src={EDITPENCILICON}
87
+ className={
88
+ theme
89
+ ? "darkicons"
90
+ : "lighticons"
91
+ }
92
+ />
93
+ </p>
94
+ )}
95
+ </div>
96
+ {
97
+ showUsernameInvalid &&
98
+ <UserNameStatus>{'First letter of username should be in uppercase!'}</UserNameStatus>
99
+ }
100
+ </div>
101
+ </div>
102
+ <div className="profile_bio">
103
+ This is your username. This name will be visible to
104
+ your Isometrik contacts.
105
+ </div>
106
+
107
+ </div>
108
+ </div>
109
+ )
110
+ }
111
+
112
+ export default ProfileInfoContainer;