l-min-components 1.7.1570 → 1.7.1571

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.7.1570",
3
+ "version": "1.7.1571",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -0,0 +1,47 @@
1
+ import React from "react";
2
+ import {
3
+ ComprehensionContainer,
4
+ ComprehensionContainerResponse,
5
+ ComprehensionFeekback,
6
+ } from "../style";
7
+
8
+ const FeekbackResponsive = ({ title, content, color = "#00C2C2" }) => {
9
+ return (
10
+ <ComprehensionFeekback>
11
+ <h3 style={{ color }}>{title}</h3>
12
+ <p>{content}</p>
13
+ </ComprehensionFeekback>
14
+ );
15
+ };
16
+
17
+ const Comprehension = ({ Aidata }) => {
18
+ const model = Aidata?.data;
19
+
20
+ return (
21
+ <ComprehensionContainer>
22
+ <li>
23
+ <ComprehensionContainerResponse>
24
+ <p>Student response</p>
25
+ <div>
26
+ <p>{model?.studentTextAnswers?.[0] || Aidata?.responseText}</p>
27
+ </div>
28
+ </ComprehensionContainerResponse>
29
+ </li>
30
+ <li>
31
+ <FeekbackResponsive
32
+ title="Correct answer"
33
+ content={model?.model_data?.generate?.answers?.[0]?.answer}
34
+ />
35
+ </li>
36
+ <li>
37
+ <FeekbackResponsive
38
+ title="Feekback"
39
+ color="#30D468"
40
+ content={model?.model_data?.evaluate?.results?.[0]?.feedback}
41
+ />
42
+ </li>
43
+ </ComprehensionContainer>
44
+ );
45
+ };
46
+
47
+ export default Comprehension;
@@ -24,6 +24,7 @@ import useReportUtils from "../hooks/useRreportUtils";
24
24
  import GrammarV2 from "./components/Grammar.v2";
25
25
  import useTranslation from "../../../hooks/useTranslation.jsx";
26
26
  import wordStore from "../../../mc/wordStore.json";
27
+ import Comprehension from "./components/Comprehension.jsx";
27
28
  const FullAnalysis = ({ data, onClose, accountType }) => {
28
29
  const { findText } = useTranslation(wordStore);
29
30
  const { setRightLayout, setCenterLayoutStyle } = useContext(OutletContext);
@@ -241,6 +242,9 @@ const FullAnalysis = ({ data, onClose, accountType }) => {
241
242
  setCheckingPlayingAudio={setCheckingPlayingAudio}
242
243
  />
243
244
  )}
245
+ {selectedModel?.id === "comprehension" && (
246
+ <Comprehension Aidata={selectedModel} />
247
+ )}
244
248
  {selectedModel?.id === "grammar" && (
245
249
  <>
246
250
  {selectedModel?.version === 2 ? (
@@ -720,3 +720,62 @@ export const GrammarV2FeedbackList = styled.ul`
720
720
  }
721
721
  }
722
722
  `;
723
+
724
+ export const ComprehensionContainer = styled.ul`
725
+ border-radius: 32px;
726
+ background: #fff;
727
+ padding: 20px;
728
+ list-style: none;
729
+ display: flex;
730
+ flex-direction: column;
731
+ width: 100%;
732
+ gap: 15px;
733
+ li {
734
+ border-bottom: 1px solid #dfe5e5;
735
+
736
+ padding-bottom: 15px;
737
+ &:last-child {
738
+ border-bottom: transparent;
739
+ }
740
+ }
741
+ `;
742
+
743
+ export const ComprehensionContainerResponse = styled.div`
744
+ display: flex;
745
+ flex-direction: column;
746
+ width: 100%;
747
+ gap: 10px;
748
+ padding-bottom: 5px;
749
+ > p {
750
+ color: #636666;
751
+ font-size: 14px;
752
+ line-height: 24px;
753
+ }
754
+ > div {
755
+ border-radius: 24px;
756
+ background: #f5f7f7;
757
+ min-height: 150px;
758
+ padding: 10px;
759
+ > p {
760
+ color: #4a4d4d;
761
+
762
+ font-size: 16px;
763
+ line-height: 25px;
764
+ &::first-letter {
765
+ text-transform: capitalize;
766
+ }
767
+ }
768
+ }
769
+ `;
770
+
771
+ export const ComprehensionFeekback = styled.div`
772
+ h3 {
773
+ font-size: 16px;
774
+ font-weight: 600;
775
+ margin-bottom: 10px;
776
+ }
777
+ p {
778
+ color: #4a4d4d;
779
+ font-size: 14px;
780
+ }
781
+ `;