dmed-voice-assistant 1.1.5 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/RecognitionListItem.js +51 -40
- package/dist/components/RecordListItem.js +159 -133
- package/dist/components/svgs.js +203 -167
- package/dist/index.js +22 -17
- package/dist/recognition.js +768 -531
- package/dist/recorder.js +389 -313
- package/package.json +6 -6
package/dist/recorder.js
CHANGED
@@ -11,6 +11,7 @@ var _svgs = require("./components/svgs");
|
|
11
11
|
var _StyledSelect = _interopRequireDefault(require("./components/StyledSelect"));
|
12
12
|
var _RecordListItem = _interopRequireDefault(require("./components/RecordListItem"));
|
13
13
|
var _recorderJs = _interopRequireDefault(require("recorder-js"));
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
14
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
15
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
16
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
@@ -198,318 +199,393 @@ const RecorderBox = _ref => {
|
|
198
199
|
(0, _react.useEffect)(() => {
|
199
200
|
// uploadRecording();
|
200
201
|
}, [audioBlob]);
|
201
|
-
return /*#__PURE__*/
|
202
|
-
className: "bg-[#0B0B0B] rounded-[5px] border p-[20px] w-[850px]"
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
202
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
203
|
+
className: "bg-[#0B0B0B] rounded-[5px] border p-[20px] w-[850px]",
|
204
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Grid.default, {
|
205
|
+
container: true,
|
206
|
+
spacing: 2,
|
207
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Grid.default, {
|
208
|
+
size: 6,
|
209
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
210
|
+
className: "flex items-center justify-between",
|
211
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
212
|
+
className: "!text-[24px] !font-[600]",
|
213
|
+
color: "#EAE5DC",
|
214
|
+
children: "Voice assistant"
|
215
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
216
|
+
className: "flex items-center px-[10px] py-[4px] bg-[#006FFF4D] rounded-[89.1px] cursor-pointer h-[28px]",
|
217
|
+
sx: {
|
218
|
+
border: '0.9px solid #006FFFB2'
|
219
|
+
},
|
220
|
+
onClick: handleModeChange,
|
221
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
222
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.MicIcon, {})
|
223
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
224
|
+
className: "!font-600 !text-[14px]",
|
225
|
+
color: "#EAE5DC",
|
226
|
+
children: "Recorder mode"
|
227
|
+
})]
|
228
|
+
})]
|
229
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
230
|
+
className: "flex items-center justify-between mt-4",
|
231
|
+
children: [!isStartedRecord ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
232
|
+
className: "flex items-center space-x-1 cursor-pointer px-[9px] py-[6px] rounded-[5px] bg-[#0B0B0B]",
|
233
|
+
sx: {
|
234
|
+
'&:hover': {
|
235
|
+
boxShadow: '0px 0px 5px 1px #44C63380',
|
236
|
+
cursor: isVoiceMode && 'not-allowed'
|
237
|
+
}
|
238
|
+
},
|
239
|
+
onClick: handleStartRecord,
|
240
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
241
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.StartIcon, {})
|
242
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
243
|
+
className: "!font-400 !text-[16px]",
|
244
|
+
color: "#EAE5DC",
|
245
|
+
children: "Start"
|
246
|
+
})]
|
247
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
248
|
+
className: "flex items-center space-x-1 cursor-pointer px-[9px] py-[6px] rounded-[5px] bg-[#0B0B0B]",
|
249
|
+
sx: {
|
250
|
+
border: '0.9px solid #F3151580',
|
251
|
+
'&:hover': {
|
252
|
+
boxShadow: '0px 0px 5px 1px #F3151580'
|
253
|
+
}
|
254
|
+
},
|
255
|
+
onClick: handleStartRecord,
|
256
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
257
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.SmallPauseIcon, {})
|
258
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
259
|
+
className: "!font-400 !text-[14px]",
|
260
|
+
color: "#EAE5DC",
|
261
|
+
children: "Stop"
|
262
|
+
})]
|
263
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
264
|
+
className: "flex items-center space-x-1 cursor-pointer px-[9px] py-[6px] rounded-[5px] bg-[#0B0B0B]",
|
265
|
+
sx: {
|
266
|
+
'&:hover': {
|
267
|
+
boxShadow: '0px 0px 5px 2px #58585880',
|
268
|
+
cursor: isStartedRecord && 'not-allowed'
|
269
|
+
}
|
270
|
+
},
|
271
|
+
onClick: handleSteupChange,
|
272
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
273
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.SettingIcon, {})
|
274
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
275
|
+
className: "!font-400 !text-[14px]",
|
276
|
+
color: "#EAE5DC",
|
277
|
+
children: "Setup"
|
278
|
+
})]
|
279
|
+
})]
|
280
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
281
|
+
className: "rounded-[5px] bg-[#A3DBFE] mt-2",
|
282
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
283
|
+
className: "flex items-center justify-between p-[4.5px]",
|
284
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
285
|
+
className: "flex items-center space-x-1 rounded-[5px] px-[5px] py-[2px] bg-[#0B0B0B]",
|
286
|
+
sx: {
|
287
|
+
boxShadow: '0px 0px 1.8px 0px #00000040'
|
288
|
+
},
|
289
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
290
|
+
children: !isStartedRecord ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.StopIcon, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.RedStopIcon, {})
|
291
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
292
|
+
className: "!font-[600] !text-[14px]",
|
293
|
+
color: "#A3DBFE",
|
294
|
+
children: !isStartedRecord ? 'STOP' : 'REC'
|
295
|
+
})]
|
296
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
297
|
+
className: "!font-400 !text-[20px] px-[9px]",
|
298
|
+
color: "#1A2123",
|
299
|
+
sx: {
|
300
|
+
fontFamily: "Space Grotesk !important"
|
301
|
+
},
|
302
|
+
children: "01.08.2024"
|
303
|
+
})]
|
304
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
305
|
+
className: "flex justify-between p-[9px]",
|
306
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
307
|
+
className: "!font-400 !text-[36px]",
|
308
|
+
color: "#1A2123",
|
309
|
+
sx: {
|
310
|
+
fontFamily: "Space Grotesk !important"
|
311
|
+
},
|
312
|
+
children: [getTimeValues(newRecordTime).hours, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
313
|
+
style: {
|
314
|
+
color: '#494A48',
|
315
|
+
fontWeight: "300",
|
316
|
+
fontSize: "16px"
|
317
|
+
},
|
318
|
+
children: "h"
|
319
|
+
}), " ", getTimeValues(newRecordTime).minutes, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
320
|
+
style: {
|
321
|
+
color: '#494A48',
|
322
|
+
fontWeight: "300",
|
323
|
+
fontSize: "16px"
|
324
|
+
},
|
325
|
+
children: "m"
|
326
|
+
}), " ", getTimeValues(newRecordTime).seconds, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
327
|
+
style: {
|
328
|
+
color: '#494A48',
|
329
|
+
fontWeight: "300",
|
330
|
+
fontSize: "16px"
|
331
|
+
},
|
332
|
+
children: "s"
|
333
|
+
})]
|
334
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
335
|
+
className: "flex flex-col space-y-3 text-right",
|
336
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
337
|
+
className: "!font-400 !text-[16px]",
|
338
|
+
color: "#494A48",
|
339
|
+
sx: {
|
340
|
+
fontFamily: "Space Grotesk !important"
|
341
|
+
},
|
342
|
+
children: [audioSize, " ", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
343
|
+
style: {
|
344
|
+
fontSize: "14px",
|
345
|
+
fontFamily: "Space Grotesk !important"
|
346
|
+
},
|
347
|
+
children: "MB"
|
348
|
+
})]
|
349
|
+
}), isStartedRecord && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
350
|
+
className: "!font-bold !text-[16px]",
|
351
|
+
color: "#494A48",
|
352
|
+
sx: {
|
353
|
+
fontFamily: "Space Grotesk !important"
|
354
|
+
},
|
355
|
+
children: newRecordFileName
|
356
|
+
})]
|
357
|
+
})]
|
358
|
+
})]
|
359
|
+
})]
|
360
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Grid.default, {
|
361
|
+
size: 6,
|
362
|
+
className: `w-full ${isVoiceMode ? 'pr-[10px]' : ''}`,
|
363
|
+
children: [isVoiceMode && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
364
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
365
|
+
className: "flex space-x-1 w-full",
|
366
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
367
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.MicIcon, {})
|
368
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
369
|
+
className: "flex-1",
|
370
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
371
|
+
className: "!font-[600] !text-[16px]",
|
372
|
+
color: "#EAE5DC",
|
373
|
+
children: "Voice"
|
374
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
375
|
+
className: "!font-400 !text-[14px] pt-1",
|
376
|
+
color: "#EAE5DC",
|
377
|
+
children: "Input device"
|
378
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledSelect.default, {
|
379
|
+
className: "mt-1",
|
380
|
+
fullWidth: true,
|
381
|
+
displayEmpty: true,
|
382
|
+
value: selectedVoice,
|
383
|
+
onChange: handleVoiceChange,
|
384
|
+
renderValue: selected => {
|
385
|
+
if (selected === "") {
|
386
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
387
|
+
style: {
|
388
|
+
fontSize: '12.6px',
|
389
|
+
fontWeight: '400',
|
390
|
+
lineHeight: '25.2px',
|
391
|
+
color: '#EAE5DC99'
|
392
|
+
},
|
393
|
+
children: "Auto-Detect"
|
394
|
+
});
|
395
|
+
}
|
396
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
397
|
+
style: {
|
398
|
+
fontSize: '12.6px',
|
399
|
+
fontWeight: '400',
|
400
|
+
lineHeight: '25.2px',
|
401
|
+
color: '#EAE5DC99'
|
402
|
+
},
|
403
|
+
children: voiceList[selected]
|
404
|
+
});
|
405
|
+
},
|
406
|
+
MenuProps: {
|
407
|
+
PaperProps: {
|
408
|
+
sx: {
|
409
|
+
marginTop: "5px",
|
410
|
+
padding: '5px',
|
411
|
+
background: '#0B0B0B',
|
412
|
+
border: '0.9px solid #565656',
|
413
|
+
'& .MuiList-root': {
|
414
|
+
padding: "unset"
|
415
|
+
},
|
416
|
+
'& .MuiMenuItem-root': {
|
417
|
+
padding: "7.2px 9px",
|
418
|
+
color: '#EAE5DC99',
|
419
|
+
fontFamily: 'Reddit Sans',
|
420
|
+
fontSize: '12.6px',
|
421
|
+
fontWeight: '400',
|
422
|
+
lineHeight: '25.2px'
|
423
|
+
},
|
424
|
+
'& .MuiMenuItem-root:hover': {
|
425
|
+
background: "#A3DBFE99",
|
426
|
+
color: '#1A2123'
|
427
|
+
},
|
428
|
+
'& .MuiMenuItem-root.Mui-selected': {
|
429
|
+
background: "#A3DBFE",
|
430
|
+
color: '#1A2123'
|
431
|
+
},
|
432
|
+
'& .MuiMenuItem-root.Mui-selected:hover': {
|
433
|
+
background: "#A3DBFE99",
|
434
|
+
color: '#1A2123'
|
435
|
+
}
|
436
|
+
}
|
437
|
+
}
|
438
|
+
},
|
439
|
+
children: voiceList.map((device, index) => {
|
440
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
441
|
+
value: index,
|
442
|
+
children: device
|
443
|
+
}, index);
|
444
|
+
})
|
445
|
+
})]
|
446
|
+
})]
|
447
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
448
|
+
className: "flex space-x-1 w-full mt-2",
|
449
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
450
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.LanguageIcon, {})
|
451
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
452
|
+
className: "flex-1",
|
453
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
454
|
+
className: "!font-[600] !text-[16px]",
|
455
|
+
color: "#EAE5DC",
|
456
|
+
children: "Language"
|
457
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
458
|
+
className: "!font-400 !text-[14px] pt-1",
|
459
|
+
color: "#EAE5DC",
|
460
|
+
children: "Prefer language"
|
461
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StyledSelect.default, {
|
462
|
+
className: "mt-1",
|
463
|
+
fullWidth: true,
|
464
|
+
displayEmpty: true,
|
465
|
+
value: selectedLanguage,
|
466
|
+
onChange: handleLanguageChange,
|
467
|
+
renderValue: selected => {
|
468
|
+
if (selected === "") {
|
469
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
470
|
+
style: {
|
471
|
+
fontSize: '12.6px',
|
472
|
+
fontWeight: '400',
|
473
|
+
lineHeight: '25.2px',
|
474
|
+
color: '#EAE5DC99'
|
475
|
+
},
|
476
|
+
children: "Auto-Detect"
|
477
|
+
});
|
478
|
+
}
|
479
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
480
|
+
style: {
|
481
|
+
fontSize: '12.6px',
|
482
|
+
fontWeight: '400',
|
483
|
+
lineHeight: '25.2px',
|
484
|
+
color: '#EAE5DC99'
|
485
|
+
},
|
486
|
+
children: languageList[selected]
|
487
|
+
});
|
488
|
+
},
|
489
|
+
MenuProps: {
|
490
|
+
PaperProps: {
|
491
|
+
sx: {
|
492
|
+
marginTop: "5px",
|
493
|
+
padding: '5px',
|
494
|
+
background: '#0B0B0B',
|
495
|
+
border: '0.9px solid #565656',
|
496
|
+
'& .MuiList-root': {
|
497
|
+
padding: "unset"
|
498
|
+
},
|
499
|
+
'& .MuiMenuItem-root': {
|
500
|
+
padding: "7.2px 9px",
|
501
|
+
color: '#EAE5DC99',
|
502
|
+
fontFamily: 'Reddit Sans',
|
503
|
+
fontSize: '12.6px',
|
504
|
+
fontWeight: '400',
|
505
|
+
lineHeight: '25.2px'
|
506
|
+
},
|
507
|
+
'& .MuiMenuItem-root:hover': {
|
508
|
+
background: "#A3DBFE99",
|
509
|
+
color: '#1A2123'
|
510
|
+
},
|
511
|
+
'& .MuiMenuItem-root.Mui-selected': {
|
512
|
+
background: "#A3DBFE",
|
513
|
+
color: '#1A2123'
|
514
|
+
},
|
515
|
+
'& .MuiMenuItem-root.Mui-selected:hover': {
|
516
|
+
background: "#A3DBFE99",
|
517
|
+
color: '#1A2123'
|
518
|
+
}
|
519
|
+
}
|
520
|
+
}
|
521
|
+
},
|
522
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
523
|
+
value: 0,
|
524
|
+
children: "Auto-Detect"
|
525
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
526
|
+
value: 1,
|
527
|
+
children: "English"
|
528
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
529
|
+
value: 2,
|
530
|
+
children: "Chinese (Simplified)"
|
531
|
+
})]
|
532
|
+
})]
|
533
|
+
})]
|
534
|
+
})]
|
535
|
+
}), !isVoiceMode && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
536
|
+
children: [recordList.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
537
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
538
|
+
className: "flex flex-col items-center justify-center h-full",
|
539
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
540
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.BoxIcon, {})
|
541
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
542
|
+
className: "!font-[600] !text-[16px] pt-2",
|
543
|
+
color: "#EAE5DC",
|
544
|
+
sx: {
|
545
|
+
fontFamily: "Afacad !important"
|
546
|
+
},
|
547
|
+
children: "Record Empty"
|
548
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
549
|
+
className: "flex items-center space-x-1 mt-1",
|
550
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
551
|
+
className: "!font-400 !text-[14px]",
|
552
|
+
color: "#EAE5DC",
|
553
|
+
sx: {
|
554
|
+
fontFamily: "Afacad !important"
|
555
|
+
},
|
556
|
+
children: "Push"
|
557
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
558
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.SmallStartIcon, {})
|
559
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
560
|
+
className: "!font-400 !text-[16px]",
|
561
|
+
color: "#EAE5DC",
|
562
|
+
sx: {
|
563
|
+
fontFamily: "Afacad !important"
|
564
|
+
},
|
565
|
+
children: "to start"
|
566
|
+
})]
|
567
|
+
})]
|
568
|
+
})
|
569
|
+
}), recordList.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
570
|
+
className: "flex flex-col space-y-2 p-[10px] scrollableBox",
|
571
|
+
sx: {
|
572
|
+
maxHeight: "225px"
|
573
|
+
},
|
574
|
+
children: recordList.map((record, index) => {
|
575
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RecordListItem.default, {
|
576
|
+
audioURL: record.audioURL,
|
577
|
+
label: record.name,
|
578
|
+
capacity: record.size,
|
579
|
+
time: record.time,
|
580
|
+
createdDate: record.date,
|
581
|
+
onLabelChange: newLabel => handleLabelChange(index, newLabel),
|
582
|
+
onDelete: () => handleDelete(index)
|
583
|
+
}, index);
|
584
|
+
})
|
585
|
+
})]
|
586
|
+
})]
|
587
|
+
})]
|
588
|
+
})
|
589
|
+
});
|
514
590
|
};
|
515
591
|
var _default = exports.default = RecorderBox;
|