l-min-components 1.7.1434 → 1.7.1436
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 +1 -1
- package/src/components/reportsComponents/fullAnalysis/components/Grammar.jsx +1 -21
- package/src/components/reportsComponents/reportQuestions/index.jsx +1 -1
- package/src/components/reportsComponents/reportQuestions/questions/dialogueScripted.jsx +11 -2
- package/src/components/reportsComponents/reportQuestions/questions/dialogueUnscripted.jsx +4 -1
package/package.json
CHANGED
|
@@ -15,11 +15,10 @@ import { useState } from "react";
|
|
|
15
15
|
import GoodCheck from "../../../../assets/svg/goodCheck";
|
|
16
16
|
import RedX from "../../../../assets/svg/redX";
|
|
17
17
|
import DOMPurify from "dompurify";
|
|
18
|
-
import useReportUtils from "../../hooks/useRreportUtils";
|
|
18
|
+
// import useReportUtils from "../../hooks/useRreportUtils";
|
|
19
19
|
|
|
20
20
|
const Grammar = ({ Aidata }) => {
|
|
21
21
|
const [selectedSection, setSelectedSection] = useState(1);
|
|
22
|
-
const [selectedWord, setSelectedWord] = useState(null);
|
|
23
22
|
|
|
24
23
|
const [formattedCopy, setFormattedCopy] = useState("");
|
|
25
24
|
const [operationIndex, setOperationIndex] = useState(null);
|
|
@@ -28,9 +27,6 @@ const Grammar = ({ Aidata }) => {
|
|
|
28
27
|
|
|
29
28
|
const originalText = data?.["Original Speech"] || "";
|
|
30
29
|
const correctText = data?.["Grammatical Correct Version"] || "";
|
|
31
|
-
const feedbacks = data?.["Feedback"];
|
|
32
|
-
|
|
33
|
-
const { grammarFeekbackResult } = useReportUtils();
|
|
34
30
|
|
|
35
31
|
const feedbackCorrection = (
|
|
36
32
|
data?.["Correction Operations (Optional)"] || []
|
|
@@ -79,20 +75,6 @@ const Grammar = ({ Aidata }) => {
|
|
|
79
75
|
[]
|
|
80
76
|
);
|
|
81
77
|
|
|
82
|
-
const wordsFeedback = grammarFeekbackResult(
|
|
83
|
-
originalText,
|
|
84
|
-
feedbackCorrection,
|
|
85
|
-
feedbacks
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
useEffect(() => {
|
|
89
|
-
if (wordsFeedback?.length) {
|
|
90
|
-
const findWord = wordsFeedback?.find((word) => word?.operation);
|
|
91
|
-
|
|
92
|
-
setSelectedWord(findWord);
|
|
93
|
-
}
|
|
94
|
-
}, [wordsFeedback?.length]);
|
|
95
|
-
|
|
96
78
|
useEffect(() => {
|
|
97
79
|
const substitutedCorrections = feedbackCorrection?.filter((correction) =>
|
|
98
80
|
["substituted", "formatting"].includes(correction.operation)
|
|
@@ -124,8 +106,6 @@ const Grammar = ({ Aidata }) => {
|
|
|
124
106
|
|
|
125
107
|
const operation = findOperation();
|
|
126
108
|
|
|
127
|
-
console.log(operation);
|
|
128
|
-
|
|
129
109
|
return (
|
|
130
110
|
<ModelComtainer>
|
|
131
111
|
<ModelContent>
|
|
@@ -73,7 +73,13 @@ const DialogueScripted = ({ data, aiData, setToggle }) => {
|
|
|
73
73
|
<Response response={selectedResponse?.text} />
|
|
74
74
|
<QuestionSectionWithAnalysis>
|
|
75
75
|
{analysis?.models?.length > 0 && transcript?.length > 0 && (
|
|
76
|
-
<Response
|
|
76
|
+
<Response
|
|
77
|
+
title=""
|
|
78
|
+
response={
|
|
79
|
+
!selectedResponse?.recording?.url ? undefined : transcript
|
|
80
|
+
}
|
|
81
|
+
isAiWordFlow
|
|
82
|
+
/>
|
|
77
83
|
)}
|
|
78
84
|
<QuestionSectionAction>
|
|
79
85
|
<ResponseAudio
|
|
@@ -83,7 +89,10 @@ const DialogueScripted = ({ data, aiData, setToggle }) => {
|
|
|
83
89
|
/>
|
|
84
90
|
<div className="right">
|
|
85
91
|
<AnalysisButton
|
|
86
|
-
disabled={
|
|
92
|
+
disabled={
|
|
93
|
+
!analysis?.models?.length > 0 ||
|
|
94
|
+
!selectedResponse?.recording?.url
|
|
95
|
+
}
|
|
87
96
|
onClick={() => {
|
|
88
97
|
setToggle(analysis);
|
|
89
98
|
}}
|
|
@@ -87,7 +87,10 @@ const DialogueUnscripted = ({ data, aiData, setToggle }) => {
|
|
|
87
87
|
/>
|
|
88
88
|
<div className="right">
|
|
89
89
|
<AnalysisButton
|
|
90
|
-
disabled={
|
|
90
|
+
disabled={
|
|
91
|
+
!analysis?.models?.length > 0 ||
|
|
92
|
+
!selectedResponse?.recording?.url
|
|
93
|
+
}
|
|
91
94
|
onClick={() => {
|
|
92
95
|
setToggle(analysis);
|
|
93
96
|
}}
|