l-min-components 1.7.1332 → 1.7.1333

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.1332",
3
+ "version": "1.7.1333",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -5,7 +5,7 @@ import { IoCloseOutline } from "react-icons/io5";
5
5
  import { FaCheck } from "react-icons/fa6";
6
6
  import ButtonComponent from "../button";
7
7
 
8
- const Grammer = ({ data }) => {
8
+ const Grammer = ({ data, hideScore }) => {
9
9
  const [selected, setSelected] = useState(null);
10
10
  const [showVersion, setShowVersion] = useState(null);
11
11
 
@@ -134,9 +134,11 @@ const Grammer = ({ data }) => {
134
134
  <CursorClickIcon />
135
135
  <p>Click on the words/sentences highlighted in red to see feedback</p>
136
136
  </div>
137
- <p>
138
- Points: <span>{data?.["Grammar Score"] || 0}</span>
139
- </p>
137
+ {!hideScore && (
138
+ <p>
139
+ Points: <span>{data?.["Grammar Score"] || 0}</span>
140
+ </p>
141
+ )}
140
142
  </Header>
141
143
  <Content>
142
144
  <div className="text_content">
@@ -12,6 +12,7 @@ const AIAnalysis = ({
12
12
  options = [],
13
13
  data,
14
14
  onClose,
15
+ hideScore,
15
16
  }) => {
16
17
  const [selected, setSelectied] = useState(options[0]?.value);
17
18
 
@@ -31,16 +32,18 @@ const AIAnalysis = ({
31
32
  <Relevant
32
33
  data={data?.relevance[0]?.model_data}
33
34
  student_text={data?.student_text}
35
+ hideScore={hideScore}
34
36
  />
35
37
  )}
36
38
  {selected === "grammar" && (
37
- <Grammer data={data?.grammar[0]?.model_data} />
39
+ <Grammer data={data?.grammar[0]?.model_data} hideScore={hideScore} />
38
40
  )}
39
41
  {selected === "speech" &&
40
42
  data?.speech_analysis[0]?.model_data?.Reference && (
41
43
  <Speech
42
44
  data={data?.speech_analysis[0]?.model_data}
43
45
  audio={data?.audio}
46
+ hideScore={hideScore}
44
47
  />
45
48
  )}
46
49
  </Wrapper>
@@ -2,16 +2,18 @@ import React, { useState } from "react";
2
2
  import styled from "styled-components";
3
3
  import ArrowDown from "./assets/arrowDown";
4
4
 
5
- const Relevant = ({ data, student_text }) => {
5
+ const Relevant = ({ data, student_text, hideScore }) => {
6
6
  return (
7
7
  <Container>
8
8
  <Header>
9
9
  <h2 className={data?.Evaluation === "Not Relevant" ? "error" : ""}>
10
10
  {data?.Evaluation}
11
11
  </h2>
12
- <p>
13
- Points: <span>{data?.Point || 0}</span>
14
- </p>
12
+ {!hideScore && (
13
+ <p>
14
+ Points: <span>{data?.Point || 0}</span>
15
+ </p>
16
+ )}
15
17
  </Header>
16
18
  <Dropdown label="Feedback" isFeedback text={data?.Feedback} />
17
19
  {student_text && <Dropdown label="Student essay" text={student_text} />}
@@ -7,7 +7,7 @@ import DropdownResult from "./dropdownResult";
7
7
  import WordWheel from "./wordWheel";
8
8
  import formatScore from "../../utils/formatScore";
9
9
 
10
- const Speech = ({ data, audio }) => {
10
+ const Speech = ({ data, audio, hideScore }) => {
11
11
  const wordsData = Object.values(data["Word Phonetic Evaluation"])?.map(
12
12
  (word, idx) => ({ id: idx, value: word })
13
13
  );
@@ -50,9 +50,11 @@ const Speech = ({ data, audio }) => {
50
50
  <CursorClickIcon />
51
51
  <p>Click on the word to see detailed feedback</p>
52
52
  </div>
53
- <p>
54
- Points: <span>{formatScore(data["General Score"]) || 0}</span>
55
- </p>
53
+ {!hideScore && (
54
+ <p>
55
+ Points: <span>{formatScore(data["General Score"]) || 0}</span>
56
+ </p>
57
+ )}
56
58
  </Header>
57
59
  <WordContent>
58
60
  <p>