l-min-components 1.0.289 → 1.0.297
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -1
- package/src/components/AppMainLayout/index.jsx +2 -2
- package/src/components/dropdown component/index.jsx +23 -6
- package/src/components/index.js +4 -1
- package/src/components/messageAddon/InputSection/index.jsx +336 -0
- package/src/components/messageAddon/assets/images/avatar.jpg +0 -0
- package/src/components/messageAddon/assets/svg/bin.jsx +14 -0
- package/src/components/messageAddon/assets/svg/check_circle.jsx +25 -0
- package/src/components/messageAddon/assets/svg/emoji.jsx +38 -0
- package/src/components/messageAddon/assets/svg/gallery.jsx +31 -0
- package/src/components/messageAddon/assets/svg/microphone.jsx +38 -0
- package/src/components/messageAddon/assets/svg/more.jsx +22 -0
- package/src/components/messageAddon/assets/svg/noMessage.jsx +49 -0
- package/src/components/messageAddon/assets/svg/send.jsx +24 -0
- package/src/components/messageAddon/assets/svg/send_fail.jsx +15 -0
- package/src/components/messageAddon/assets/svg/sending_status.jsx +22 -0
- package/src/components/messageAddon/assets/svg/warning.jsx +14 -0
- package/src/components/messageAddon/hooks/messagesContext.js +19 -0
- package/src/components/messageAddon/hooks/useFriends.js +30 -0
- package/src/components/messageAddon/hooks/useMedia.js +81 -0
- package/src/components/messageAddon/hooks/useMessaging.js +241 -0
- package/src/components/messageAddon/hooks/useRooms.js +210 -0
- package/src/components/messageAddon/messages/chatheader/index.jsx +94 -0
- package/src/components/messageAddon/messages/dropdown/chat-dropdown.jsx +45 -0
- package/src/components/messageAddon/messages/index.jsx +17 -0
- package/src/components/messageAddon/messages/index.styled.js +988 -0
- package/src/components/messageAddon/messages/message-modals/deleteChat-modal.jsx +111 -0
- package/src/components/messageAddon/messages/message-modals/index.styled.js +366 -0
- package/src/components/messageAddon/messages/message-modals/report-modal.jsx +238 -0
- package/src/components/messageAddon/messages/messagebox/messageBubble.jsx +73 -0
- package/src/components/messageAddon/messages/messagebox/waveSurferPlayer.jsx +69 -0
- package/src/components/messageAddon/messages/messages.jsx +374 -0
- package/src/components/messageAddon/utils/helpers.js +41 -0
- package/src/components/textEditor/assets/binWhite.jsx +14 -0
- package/src/components/textEditor/assets/grammerly.jsx +43 -0
- package/src/components/textEditor/assets/moveUppDownWhite.jsx +26 -0
- package/src/components/textEditor/index.jsx +683 -0
- package/src/components/textEditor/style.scss +256 -0
- package/src/components/textEditor/test.jsx +61 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "l-min-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.297",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src/assets",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"axios-hooks": "^4.0.0",
|
|
18
18
|
"chart.js": "^4.2.1",
|
|
19
19
|
"classnames": "^2.3.2",
|
|
20
|
+
"emoji-picker-react": "^4.4.10",
|
|
20
21
|
"js-cookie": "^3.0.5",
|
|
21
22
|
"l-min-components": "^1.0.220",
|
|
22
23
|
"moment": "^2.29.4",
|
|
@@ -33,6 +34,9 @@
|
|
|
33
34
|
"react-modal": "^3.16.1",
|
|
34
35
|
"react-router-dom": "^6.8.2",
|
|
35
36
|
"react-tooltip": "^5.10.1",
|
|
37
|
+
"slate": "^0.94.0",
|
|
38
|
+
"slate-history": "^0.93.0",
|
|
39
|
+
"slate-react": "^0.94.0",
|
|
36
40
|
"styled-components": "^5.3.6"
|
|
37
41
|
},
|
|
38
42
|
"devDependencies": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect, createContext, useRef } from "react";
|
|
1
|
+
import React, { useState, useEffect, createContext, useRef, useContext } from "react";
|
|
2
2
|
import { Outlet, useLocation } from "react-router-dom";
|
|
3
3
|
import {
|
|
4
4
|
Layout,
|
|
@@ -33,7 +33,7 @@ const AppMainLayout = () => {
|
|
|
33
33
|
|
|
34
34
|
return (
|
|
35
35
|
<OutletContext.Provider
|
|
36
|
-
value={{ setRightComponent, setRightLayout, generalData, setGeneralData }}
|
|
36
|
+
value={{ setRightComponent, setRightLayout, generalData, setGeneralData, coming }}
|
|
37
37
|
>
|
|
38
38
|
<Layout coming={coming}>
|
|
39
39
|
<HeaderComponent />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, CSSProperties, useEffect } from "react";
|
|
1
|
+
import React, { useState, CSSProperties, useEffect, useRef } from "react";
|
|
2
2
|
import {
|
|
3
3
|
ControlInput,
|
|
4
4
|
DropDownContainer,
|
|
@@ -35,13 +35,30 @@ const DropDownComponent = (props) => {
|
|
|
35
35
|
//search params
|
|
36
36
|
const [searchParam, setSearchParam] = useState();
|
|
37
37
|
|
|
38
|
+
// dropdown menu ref
|
|
39
|
+
const dropdownRef = useRef(null);
|
|
40
|
+
|
|
41
|
+
// click outside closes the dropdown menu
|
|
42
|
+
const handleClickOutside = (event) => {
|
|
43
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
44
|
+
setDropdown(false)
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
document.addEventListener('click', handleClickOutside);
|
|
50
|
+
return () => {
|
|
51
|
+
document.removeEventListener('click', handleClickOutside);
|
|
52
|
+
};
|
|
53
|
+
}, []);
|
|
54
|
+
|
|
38
55
|
// useEffect to return a function value onChange
|
|
39
56
|
useEffect(() => {
|
|
40
57
|
props?.onSelect && props?.onSelect(selected);
|
|
41
58
|
}, [selected]);
|
|
42
59
|
|
|
43
60
|
return (
|
|
44
|
-
<DropDownContainer className={props?.className}>
|
|
61
|
+
<DropDownContainer className={props?.className} ref={dropdownRef}>
|
|
45
62
|
<DropDownHeader>{props?.header}</DropDownHeader>
|
|
46
63
|
<DropDownControls>
|
|
47
64
|
{props?.searchable ? (
|
|
@@ -110,8 +127,8 @@ export default DropDownComponent;
|
|
|
110
127
|
export const DownIcon = ({ width, height, fill, onClick }) => {
|
|
111
128
|
return (
|
|
112
129
|
<svg
|
|
113
|
-
width={width || "
|
|
114
|
-
height={height || "
|
|
130
|
+
width={width || "18"}
|
|
131
|
+
height={height || "9"}
|
|
115
132
|
viewBox="0 0 14 8"
|
|
116
133
|
fill="none"
|
|
117
134
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -119,10 +136,10 @@ export const DownIcon = ({ width, height, fill, onClick }) => {
|
|
|
119
136
|
>
|
|
120
137
|
<path
|
|
121
138
|
d="M1 1L7 7L13 1"
|
|
122
|
-
stroke={fill || "#
|
|
139
|
+
stroke={fill || "#7C8080"}
|
|
123
140
|
strokeWidth="2"
|
|
124
141
|
strokeLinecap="round"
|
|
125
|
-
strokeLinejoin="round"
|
|
142
|
+
strokeLinejoin="round"
|
|
126
143
|
/>
|
|
127
144
|
</svg>
|
|
128
145
|
);
|
package/src/components/index.js
CHANGED
|
@@ -28,4 +28,7 @@ export { default as Calender } from "./calender/input";
|
|
|
28
28
|
export { default as ErrorPage } from "./errorPage";
|
|
29
29
|
export { default as AppMainLayout } from "./AppMainLayout";
|
|
30
30
|
export { OutletContext as OutletContext } from "./AppMainLayout";
|
|
31
|
-
export { default as DatePickerCalender } from "./datePicker";
|
|
31
|
+
export { default as DatePickerCalender } from "./datePicker";
|
|
32
|
+
export { default as DatePickerCalender } from "./datePicker";
|
|
33
|
+
export { default as TextEditor } from "./textEditor";
|
|
34
|
+
export { default as MessageAddon } from "./messageAddon/messages";
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
useCallback,
|
|
3
|
+
useEffect,
|
|
4
|
+
useLayoutEffect,
|
|
5
|
+
useRef,
|
|
6
|
+
useState,
|
|
7
|
+
} from "react";
|
|
8
|
+
import { EmojiIcon } from "../../../assets/svg/emoji";
|
|
9
|
+
import { GalleryIcon } from "../../../assets/svg/gallery";
|
|
10
|
+
import { MicrophoneIcon } from "../../../assets/svg/microphone";
|
|
11
|
+
import { SendIcon } from "../../../assets/svg/send";
|
|
12
|
+
import { TextMessagePanel } from "../messages/index.styled";
|
|
13
|
+
import Picker from "emoji-picker-react";
|
|
14
|
+
import cx from "classnames";
|
|
15
|
+
import { ReactMic } from "react-mic";
|
|
16
|
+
import WaveSurfer from "wavesurfer.js";
|
|
17
|
+
import moment from "moment";
|
|
18
|
+
import { RecorderIcon } from "../../../assets/svg/recorder";
|
|
19
|
+
import { RecorderPlayIcon } from "../../../assets/svg/recorderPlay";
|
|
20
|
+
import { PauseIcon } from "../../../assets/svg/pause";
|
|
21
|
+
import { Bin } from "../../../assets/svg/bin";
|
|
22
|
+
import useMessaging from "../../../hooks/useMessaging";
|
|
23
|
+
import useMedia from "../../../hooks/useMedia";
|
|
24
|
+
import { getCookie } from "../../../utils/helpers";
|
|
25
|
+
import InputEmoji from "react-input-emoji";
|
|
26
|
+
|
|
27
|
+
/** The input section of an open chat, for sending texts, emojis and audios
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
const InputSection = ({
|
|
31
|
+
userID,
|
|
32
|
+
setPreviewModalIsOpen,
|
|
33
|
+
mediaForm,
|
|
34
|
+
setMediaForm,
|
|
35
|
+
setAllMessages,
|
|
36
|
+
allMessages,
|
|
37
|
+
newMessages,
|
|
38
|
+
setNewMessages,
|
|
39
|
+
setIsMessageSending,
|
|
40
|
+
}) => {
|
|
41
|
+
const [showEmoji, setShowEmoji] = useState();
|
|
42
|
+
const [inputMethod, setInputMethod] = useState("text"); // text | recorder
|
|
43
|
+
const [text, setText] = useState({ text: "", user_message: true }); // state for user text
|
|
44
|
+
const [blobData, setBlobData] = useState({}); //state for audio
|
|
45
|
+
const [recording, setRecording] = useState(false);
|
|
46
|
+
const imageRef = useRef();
|
|
47
|
+
const {
|
|
48
|
+
handleCreateMessage,
|
|
49
|
+
createMessageData,
|
|
50
|
+
handleCreateMessageWithMedia,
|
|
51
|
+
createMessageWithMediaData,
|
|
52
|
+
} = useMessaging();
|
|
53
|
+
const { handleUploadMedia, uploadMediaData } = useMedia();
|
|
54
|
+
|
|
55
|
+
console.log(text);
|
|
56
|
+
|
|
57
|
+
// Handle Send when Enter key pressed
|
|
58
|
+
const handleEnterKey = (e) => {
|
|
59
|
+
if (e.key === "Enter") {
|
|
60
|
+
handleSendMessage();
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// handle sending a text and audio when button clicked
|
|
65
|
+
const handleSendMessage = (e) => {
|
|
66
|
+
if (inputMethod === "recorder") {
|
|
67
|
+
// const file = new File([blobData.blob], `record-${Date.now()}.wav`);
|
|
68
|
+
const file = new File([blobData.blob], `record-${Date.now()}.wav`, {
|
|
69
|
+
type: "audio/wav",
|
|
70
|
+
});
|
|
71
|
+
const data = {
|
|
72
|
+
media: file,
|
|
73
|
+
};
|
|
74
|
+
handleCreateMessageWithMedia(data.media, userID);
|
|
75
|
+
setInputMethod("text");
|
|
76
|
+
console.log("uploas", file);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (inputMethod === "text") {
|
|
80
|
+
// setNewMessages((prev) => [...prev, text]);
|
|
81
|
+
setIsMessageSending(true);
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
handleCreateMessage(userID, text);
|
|
84
|
+
}, 1000);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
console.log("createMessageData", createMessageData);
|
|
89
|
+
|
|
90
|
+
// handle open modal for image preview when an image selected (future note)
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (mediaForm?.media) {
|
|
93
|
+
setPreviewModalIsOpen(true);
|
|
94
|
+
}
|
|
95
|
+
}, [mediaForm]);
|
|
96
|
+
|
|
97
|
+
//handle update messages state when a message sent successfully for text and audio
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
if (createMessageData?.response?.status === 201) {
|
|
100
|
+
setNewMessages((prev) => [...prev, createMessageData?.data]);
|
|
101
|
+
// newMessages[newMessages.length - 1] = createMessageData?.data;
|
|
102
|
+
setIsMessageSending(false);
|
|
103
|
+
setText({
|
|
104
|
+
...text,
|
|
105
|
+
text: "",
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}, [createMessageData?.response]);
|
|
109
|
+
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
if (createMessageWithMediaData?.response?.status === 201) {
|
|
112
|
+
setNewMessages((prev) => [...prev, createMessageWithMediaData?.data]);
|
|
113
|
+
// newMessages[newMessages.length - 1] = createMessageData?.data;
|
|
114
|
+
setText({
|
|
115
|
+
...text,
|
|
116
|
+
text: "",
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}, [createMessageWithMediaData?.response]);
|
|
120
|
+
|
|
121
|
+
//handle update messages state when a message sent successfully for text and audio ends here
|
|
122
|
+
|
|
123
|
+
console.log("media", mediaForm);
|
|
124
|
+
console.log("media2", uploadMediaData);
|
|
125
|
+
console.log("media3", imageRef);
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<TextMessagePanel>
|
|
129
|
+
<div
|
|
130
|
+
className={cx("text-input-wrapper", {
|
|
131
|
+
"text-mode": inputMethod === "text",
|
|
132
|
+
})}
|
|
133
|
+
>
|
|
134
|
+
{inputMethod === "text" && (
|
|
135
|
+
<>
|
|
136
|
+
<div className="icon-box">
|
|
137
|
+
<>
|
|
138
|
+
{/* for handling sending of media (future note) */}
|
|
139
|
+
{/* <span onClick={(e) => imageRef.current.click()}>
|
|
140
|
+
<GalleryIcon />
|
|
141
|
+
</span>
|
|
142
|
+
<input
|
|
143
|
+
ref={imageRef}
|
|
144
|
+
type="file"
|
|
145
|
+
accept="image/*"
|
|
146
|
+
style={{ display: "none" }}
|
|
147
|
+
onChange={async (e) => {
|
|
148
|
+
console.log("media", e);
|
|
149
|
+
if (e.target.files) {
|
|
150
|
+
const file = e.target.files[0];
|
|
151
|
+
let imageDataUrl = await readFile(file);
|
|
152
|
+
setMediaForm({
|
|
153
|
+
...mediaForm,
|
|
154
|
+
media: e.target.files[0],
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}}
|
|
158
|
+
/> */}
|
|
159
|
+
</>
|
|
160
|
+
<span
|
|
161
|
+
onClick={(e) => {
|
|
162
|
+
setInputMethod("recorder");
|
|
163
|
+
}}
|
|
164
|
+
>
|
|
165
|
+
<MicrophoneIcon />
|
|
166
|
+
</span>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
<InputEmoji
|
|
170
|
+
value={text.text}
|
|
171
|
+
cleanOnEnter
|
|
172
|
+
onEnter={handleSendMessage}
|
|
173
|
+
placeholder="Start typing..."
|
|
174
|
+
onChange={(e) => {
|
|
175
|
+
setText((prev) => ({
|
|
176
|
+
...prev,
|
|
177
|
+
text: e,
|
|
178
|
+
}));
|
|
179
|
+
}}
|
|
180
|
+
theme="light"
|
|
181
|
+
/>
|
|
182
|
+
</>
|
|
183
|
+
)}
|
|
184
|
+
{inputMethod === "recorder" && (
|
|
185
|
+
<>
|
|
186
|
+
<Recorder
|
|
187
|
+
{...{
|
|
188
|
+
setInputMethod,
|
|
189
|
+
blobData,
|
|
190
|
+
setBlobData,
|
|
191
|
+
recording,
|
|
192
|
+
setRecording,
|
|
193
|
+
}}
|
|
194
|
+
/>
|
|
195
|
+
</>
|
|
196
|
+
)}
|
|
197
|
+
</div>
|
|
198
|
+
<button
|
|
199
|
+
className={`send-box ${
|
|
200
|
+
!text.text && (inputMethod === "text" || recording) ? "disabled" : ""
|
|
201
|
+
}`}
|
|
202
|
+
onClick={handleSendMessage}
|
|
203
|
+
disabled={
|
|
204
|
+
!text.text &&
|
|
205
|
+
(inputMethod === "text" || recording || createMessageData?.loading)
|
|
206
|
+
}
|
|
207
|
+
>
|
|
208
|
+
<SendIcon />
|
|
209
|
+
</button>
|
|
210
|
+
</TextMessagePanel>
|
|
211
|
+
);
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/** For audio recording and waves functionality
|
|
215
|
+
*
|
|
216
|
+
*/
|
|
217
|
+
const Recorder = ({
|
|
218
|
+
blobData,
|
|
219
|
+
setBlobData,
|
|
220
|
+
setInputMethod,
|
|
221
|
+
recording,
|
|
222
|
+
setRecording,
|
|
223
|
+
}) => {
|
|
224
|
+
const [recordingTime, setRecordingTime] = useState(0);
|
|
225
|
+
const waveSurfer = useRef(null);
|
|
226
|
+
const counterRef = useRef();
|
|
227
|
+
|
|
228
|
+
console.log("blob", blobData);
|
|
229
|
+
// on record stop, concatenate blob to form a pause and continue recording feature
|
|
230
|
+
const handleStop = (data) => {
|
|
231
|
+
const { blob } = data;
|
|
232
|
+
setBlobData((state) => {
|
|
233
|
+
const newBlob = state.blob
|
|
234
|
+
? new Blob([state.blob, blob], { type: "audio/wav" })
|
|
235
|
+
: blob;
|
|
236
|
+
|
|
237
|
+
const url = URL.createObjectURL(newBlob);
|
|
238
|
+
|
|
239
|
+
return {
|
|
240
|
+
blob: newBlob,
|
|
241
|
+
url,
|
|
242
|
+
};
|
|
243
|
+
});
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
useLayoutEffect(() => {
|
|
247
|
+
setRecording(true);
|
|
248
|
+
}, []);
|
|
249
|
+
|
|
250
|
+
// handle counting time while recording
|
|
251
|
+
useEffect(() => {
|
|
252
|
+
let time = 0;
|
|
253
|
+
if (recording) {
|
|
254
|
+
counterRef.current = setInterval(() => {
|
|
255
|
+
time++;
|
|
256
|
+
const currentDuration = waveSurfer.current?.getDuration() ?? 0;
|
|
257
|
+
// console.log(waveSurfer.current?.getDuration() ?? 0);
|
|
258
|
+
setRecordingTime(() => {
|
|
259
|
+
return Math.floor(currentDuration + time);
|
|
260
|
+
});
|
|
261
|
+
}, 1000);
|
|
262
|
+
}
|
|
263
|
+
return () => {
|
|
264
|
+
if (counterRef.current) {
|
|
265
|
+
clearInterval(counterRef.current);
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
}, [recording]);
|
|
269
|
+
|
|
270
|
+
//handle creating waves each time
|
|
271
|
+
useEffect(() => {
|
|
272
|
+
if (blobData.blob) {
|
|
273
|
+
if (!waveSurfer.current) {
|
|
274
|
+
waveSurfer.current = WaveSurfer.create({
|
|
275
|
+
container: "#waves",
|
|
276
|
+
waveColor: "#E5AD0E",
|
|
277
|
+
progressColor: "#FECF4C",
|
|
278
|
+
cursorWidth: 0,
|
|
279
|
+
height: 58,
|
|
280
|
+
barWidth: 2.5,
|
|
281
|
+
barGap: 4,
|
|
282
|
+
barRadius: 2,
|
|
283
|
+
barMinHeight: 3,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
waveSurfer.current.loadBlob(blobData.blob);
|
|
288
|
+
}
|
|
289
|
+
}, [blobData.blob]);
|
|
290
|
+
|
|
291
|
+
return (
|
|
292
|
+
<>
|
|
293
|
+
<div className="left-recorder-state">
|
|
294
|
+
<span className="icon" onClick={(e) => setRecording((state) => !state)}>
|
|
295
|
+
{recording ? <PauseIcon /> : <RecorderIcon />}
|
|
296
|
+
</span>
|
|
297
|
+
<div className="timer">
|
|
298
|
+
{moment.duration(recordingTime, "seconds").minutes()}:
|
|
299
|
+
{moment.duration(recordingTime, "seconds").seconds()}
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
<div className="waves-section">
|
|
303
|
+
{!recording && (
|
|
304
|
+
<span
|
|
305
|
+
className="icon"
|
|
306
|
+
onClick={() => {
|
|
307
|
+
waveSurfer.current.playPause();
|
|
308
|
+
}}
|
|
309
|
+
>
|
|
310
|
+
<RecorderPlayIcon />
|
|
311
|
+
</span>
|
|
312
|
+
)}
|
|
313
|
+
<div id="waves"></div>
|
|
314
|
+
{!recording && (
|
|
315
|
+
<span
|
|
316
|
+
className="icon"
|
|
317
|
+
onClick={
|
|
318
|
+
() => setInputMethod("text") // resetting input method, everything about recorder shutdown
|
|
319
|
+
}
|
|
320
|
+
>
|
|
321
|
+
<Bin />
|
|
322
|
+
</span>
|
|
323
|
+
)}
|
|
324
|
+
<div className="react-mic">
|
|
325
|
+
<ReactMic
|
|
326
|
+
onStop={handleStop}
|
|
327
|
+
record={recording}
|
|
328
|
+
mimeType="audio/wav"
|
|
329
|
+
/>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
</>
|
|
333
|
+
);
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
export default InputSection;
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const Bin = ({ width, height, fill }) => (
|
|
2
|
+
<svg
|
|
3
|
+
width={width || "14"}
|
|
4
|
+
height={height || "18"}
|
|
5
|
+
viewBox="0 0 14 18"
|
|
6
|
+
fill="none"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
>
|
|
9
|
+
<path
|
|
10
|
+
d="M1 16C1 17.1 1.9 18 3 18H11C12.1 18 13 17.1 13 16V4H1V16ZM3 6H11V16H3V6ZM10.5 1L9.5 0H4.5L3.5 1H0V3H14V1H10.5Z"
|
|
11
|
+
fill="#ADB3B3"
|
|
12
|
+
/>
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const CheckCircleIcon = ({ width, height, fill, onClick }) => (
|
|
2
|
+
<svg
|
|
3
|
+
onClick={onClick}
|
|
4
|
+
width={width || "13"}
|
|
5
|
+
height={height || "13"}
|
|
6
|
+
viewBox="0 0 13 13"
|
|
7
|
+
fill="none"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
>
|
|
10
|
+
<g id="Check circle" clip-path="url(#clip0_14342_79747)">
|
|
11
|
+
<path
|
|
12
|
+
id="Icon"
|
|
13
|
+
fill-rule="evenodd"
|
|
14
|
+
clip-rule="evenodd"
|
|
15
|
+
d="M6.50313 12.9984C10.0947 12.9984 13.0063 10.0869 13.0063 6.49531C13.0063 2.90374 10.0947 -0.0078125 6.50313 -0.0078125C2.91155 -0.0078125 0 2.90374 0 6.49531C0 10.0869 2.91155 12.9984 6.50313 12.9984ZM9.5166 5.44433C9.83405 5.12688 9.83405 4.61219 9.5166 4.29473C9.19915 3.97728 8.68445 3.97728 8.367 4.29473L5.69024 6.97149L4.63925 5.92051C4.3218 5.60306 3.80711 5.60306 3.48965 5.92051C3.1722 6.23797 3.1722 6.75266 3.48965 7.07011L5.11544 8.6959C5.43289 9.01335 5.94758 9.01335 6.26504 8.6959L9.5166 5.44433Z"
|
|
16
|
+
fill="#00C2C2"
|
|
17
|
+
/>
|
|
18
|
+
</g>
|
|
19
|
+
<defs>
|
|
20
|
+
<clipPath id="clip0_14342_79747">
|
|
21
|
+
<rect width="13" height="13" fill="white" />
|
|
22
|
+
</clipPath>
|
|
23
|
+
</defs>
|
|
24
|
+
</svg>
|
|
25
|
+
);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const EmojiIcon = ({ width, height, fill }) => (
|
|
2
|
+
<svg
|
|
3
|
+
width={width || "24"}
|
|
4
|
+
height={height || "24"}
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
fill="none"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
>
|
|
9
|
+
<path
|
|
10
|
+
d="M19.0668 4.94813C23.0368 8.91813 22.9668 15.3981 18.8668 19.2881C15.0768 22.8781 8.92679 22.8781 5.12679 19.2881C1.01679 15.3981 0.946776 8.91813 4.92678 4.94813C8.82678 1.03813 15.1668 1.03813 19.0668 4.94813Z"
|
|
11
|
+
stroke="#ADB3B3"
|
|
12
|
+
stroke-width="1.5"
|
|
13
|
+
stroke-linecap="round"
|
|
14
|
+
stroke-linejoin="round"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M15.834 16.0664C13.714 18.0664 10.2741 18.0664 8.16406 16.0664"
|
|
18
|
+
stroke="#ADB3B3"
|
|
19
|
+
stroke-width="1.5"
|
|
20
|
+
stroke-linecap="round"
|
|
21
|
+
stroke-linejoin="round"
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
d="M8.66638 8.98828H8.67536"
|
|
25
|
+
stroke="#ADB3B3"
|
|
26
|
+
stroke-width="2.5"
|
|
27
|
+
stroke-linecap="round"
|
|
28
|
+
stroke-linejoin="round"
|
|
29
|
+
/>
|
|
30
|
+
<path
|
|
31
|
+
d="M15.8383 8.98828H15.8472"
|
|
32
|
+
stroke="#ADB3B3"
|
|
33
|
+
stroke-width="2.5"
|
|
34
|
+
stroke-linecap="round"
|
|
35
|
+
stroke-linejoin="round"
|
|
36
|
+
/>
|
|
37
|
+
</svg>
|
|
38
|
+
);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const GalleryIcon = ({ width, height, fill }) => (
|
|
2
|
+
<svg
|
|
3
|
+
width={width || "24"}
|
|
4
|
+
height={height || "24"}
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
fill="none"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
>
|
|
9
|
+
<path
|
|
10
|
+
d="M9 22H15C20 22 22 20 22 15V9C22 4 20 2 15 2H9C4 2 2 4 2 9V15C2 20 4 22 9 22Z"
|
|
11
|
+
stroke="#4A4D4D"
|
|
12
|
+
stroke-width="1.5"
|
|
13
|
+
stroke-linecap="round"
|
|
14
|
+
stroke-linejoin="round"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M9 10C10.1046 10 11 9.10457 11 8C11 6.89543 10.1046 6 9 6C7.89543 6 7 6.89543 7 8C7 9.10457 7.89543 10 9 10Z"
|
|
18
|
+
stroke="#4A4D4D"
|
|
19
|
+
stroke-width="1.5"
|
|
20
|
+
stroke-linecap="round"
|
|
21
|
+
stroke-linejoin="round"
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
d="M2.67188 18.9486L7.60187 15.6386C8.39187 15.1086 9.53187 15.1686 10.2419 15.7786L10.5719 16.0686C11.3519 16.7386 12.6119 16.7386 13.3919 16.0686L17.5519 12.4986C18.3319 11.8286 19.5919 11.8286 20.3719 12.4986L22.0019 13.8986"
|
|
25
|
+
stroke="#4A4D4D"
|
|
26
|
+
stroke-width="1.5"
|
|
27
|
+
stroke-linecap="round"
|
|
28
|
+
stroke-linejoin="round"
|
|
29
|
+
/>
|
|
30
|
+
</svg>
|
|
31
|
+
);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const MicrophoneIcon = ({ width, height, fill }) => (
|
|
2
|
+
<svg
|
|
3
|
+
width={width || "24"}
|
|
4
|
+
height={height || "24"}
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
fill="none"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
>
|
|
9
|
+
<path
|
|
10
|
+
d="M12 19C15.31 19 18 16.31 18 13V8C18 4.69 15.31 2 12 2C8.69 2 6 4.69 6 8V13C6 16.31 8.69 19 12 19Z"
|
|
11
|
+
stroke="#4A4D4D"
|
|
12
|
+
stroke-width="1.5"
|
|
13
|
+
stroke-linecap="round"
|
|
14
|
+
stroke-linejoin="round"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M3 11V13C3 17.97 7.03 22 12 22C16.97 22 21 17.97 21 13V11"
|
|
18
|
+
stroke="#4A4D4D"
|
|
19
|
+
stroke-width="1.5"
|
|
20
|
+
stroke-linecap="round"
|
|
21
|
+
stroke-linejoin="round"
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
d="M9.10938 7.47969C10.8894 6.82969 12.8294 6.82969 14.6094 7.47969"
|
|
25
|
+
stroke="#4A4D4D"
|
|
26
|
+
stroke-width="1.5"
|
|
27
|
+
stroke-linecap="round"
|
|
28
|
+
stroke-linejoin="round"
|
|
29
|
+
/>
|
|
30
|
+
<path
|
|
31
|
+
d="M10.0312 10.4819C11.2313 10.1519 12.5013 10.1519 13.7013 10.4819"
|
|
32
|
+
stroke="#4A4D4D"
|
|
33
|
+
stroke-width="1.5"
|
|
34
|
+
stroke-linecap="round"
|
|
35
|
+
stroke-linejoin="round"
|
|
36
|
+
/>
|
|
37
|
+
</svg>
|
|
38
|
+
);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const MoreIcon = ({ width, height, fill }) => (
|
|
2
|
+
<svg
|
|
3
|
+
width={width || "24"}
|
|
4
|
+
height={height || "24"}
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
fill="none"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
>
|
|
9
|
+
<path
|
|
10
|
+
d="M14 5C14 3.9 13.1 3 12 3C10.9 3 10 3.9 10 5C10 6.1 10.9 7 12 7C13.1 7 14 6.1 14 5Z"
|
|
11
|
+
fill="white"
|
|
12
|
+
/>
|
|
13
|
+
<path
|
|
14
|
+
d="M14 19C14 17.9 13.1 17 12 17C10.9 17 10 17.9 10 19C10 20.1 10.9 21 12 21C13.1 21 14 20.1 14 19Z"
|
|
15
|
+
fill="white"
|
|
16
|
+
/>
|
|
17
|
+
<path
|
|
18
|
+
d="M14 12C14 10.9 13.1 10 12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12Z"
|
|
19
|
+
fill="white"
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export const NoMessage = ({ width, height, fill }) => (
|
|
2
|
+
<svg
|
|
3
|
+
width={width || "65"}
|
|
4
|
+
height={height || "65"}
|
|
5
|
+
viewBox="0 0 65 65"
|
|
6
|
+
fill="none"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
>
|
|
9
|
+
<g id="vuesax/linear/message">
|
|
10
|
+
<g id="vuesax/linear/message_2">
|
|
11
|
+
<g id="message">
|
|
12
|
+
<path
|
|
13
|
+
id="Vector"
|
|
14
|
+
d="M23.1423 50.7943H21.8056C11.1123 50.7943 5.76562 48.121 5.76562 34.7543V21.3877C5.76562 10.6943 11.1123 5.34766 21.8056 5.34766H43.1923C53.8856 5.34766 59.2323 10.6943 59.2323 21.3877V34.7543C59.2323 45.4477 53.8856 50.7943 43.1923 50.7943H41.8556C41.0269 50.7943 40.2249 51.1953 39.717 51.8637L35.707 57.2103C33.9426 59.5629 31.0554 59.5629 29.291 57.2103L25.281 51.8637C24.8532 51.2755 23.8641 50.7943 23.1423 50.7943Z"
|
|
15
|
+
stroke="#C6CCCC"
|
|
16
|
+
stroke-width="4.40659"
|
|
17
|
+
stroke-miterlimit="10"
|
|
18
|
+
stroke-linecap="round"
|
|
19
|
+
stroke-linejoin="round"
|
|
20
|
+
/>
|
|
21
|
+
<path
|
|
22
|
+
id="Vector_2"
|
|
23
|
+
d="M43.197 29.407H43.221"
|
|
24
|
+
stroke="#C6CCCC"
|
|
25
|
+
stroke-width="5.87546"
|
|
26
|
+
stroke-linecap="round"
|
|
27
|
+
stroke-linejoin="round"
|
|
28
|
+
/>
|
|
29
|
+
<path
|
|
30
|
+
id="Vector_3"
|
|
31
|
+
d="M32.5017 29.407H32.5257"
|
|
32
|
+
stroke="#C6CCCC"
|
|
33
|
+
stroke-width="5.87546"
|
|
34
|
+
stroke-linecap="round"
|
|
35
|
+
stroke-linejoin="round"
|
|
36
|
+
/>
|
|
37
|
+
<path
|
|
38
|
+
id="Vector_4"
|
|
39
|
+
d="M21.8064 29.407H21.8304"
|
|
40
|
+
stroke="#C6CCCC"
|
|
41
|
+
stroke-width="5.87546"
|
|
42
|
+
stroke-linecap="round"
|
|
43
|
+
stroke-linejoin="round"
|
|
44
|
+
/>
|
|
45
|
+
</g>
|
|
46
|
+
</g>
|
|
47
|
+
</g>
|
|
48
|
+
</svg>
|
|
49
|
+
);
|