l-min-components 1.7.1511 → 1.7.1513

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.
Files changed (38) hide show
  1. package/package.json +1 -1
  2. package/src/components/AppMainLayout/index.jsx +0 -2
  3. package/src/components/deactivated/index.jsx +1 -1
  4. package/src/components/getErrorFeatures/errorWrapper.jsx +2 -1
  5. package/src/components/header/account-dropdown.jsx +5 -5
  6. package/src/components/header/index.jsx +1 -1
  7. package/src/components/messageAddon/messages/messages.jsx +2 -0
  8. package/src/components/reportsComponents/fullAnalysis/api/sampleApi.jsx +57 -0
  9. package/src/components/reportsComponents/fullAnalysis/icons/info.jsx +22 -0
  10. package/src/components/reportsComponents/fullAnalysis/icons/navArrow.jsx +60 -0
  11. package/src/components/reportsComponents/hooks/useRreportUtils.jsx +2 -0
  12. package/src/components/reportsComponents/reportQuestions/components/comment.jsx +207 -108
  13. package/src/components/reportsComponents/reportQuestions/components/questionDropdown.jsx +64 -0
  14. package/src/components/reportsComponents/reportQuestions/components/response.jsx +29 -2
  15. package/src/components/reportsComponents/reportQuestions/components/responseAudio.v2.jsx +114 -0
  16. package/src/components/reportsComponents/reportQuestions/components/style/comment.style.jsx +41 -15
  17. package/src/components/reportsComponents/reportQuestions/components/style/questionDropdown.style.jsx +62 -0
  18. package/src/components/reportsComponents/reportQuestions/components/style/quizQuestion.style.jsx +0 -4
  19. package/src/components/reportsComponents/reportQuestions/components/style/response.style.jsx +0 -4
  20. package/src/components/reportsComponents/reportQuestions/components/style/responseAutio.style.jsx +34 -0
  21. package/src/components/reportsComponents/reportQuestions/components/style/tabs.style.jsx +6 -6
  22. package/src/components/reportsComponents/reportQuestions/contants.jsx +78 -11
  23. package/src/components/reportsComponents/reportQuestions/index.jsx +172 -104
  24. package/src/components/reportsComponents/reportQuestions/questions/dialogueScripted.jsx +52 -33
  25. package/src/components/reportsComponents/reportQuestions/questions/dialogueUnscripted.jsx +43 -28
  26. package/src/components/reportsComponents/reportQuestions/questions/essayScripted.jsx +42 -30
  27. package/src/components/reportsComponents/reportQuestions/questions/essayUnscripted.jsx +29 -21
  28. package/src/components/reportsComponents/reportQuestions/questions/essayWritten.jsx +20 -12
  29. package/src/components/reportsComponents/reportQuestions/questions/matchPair.jsx +18 -5
  30. package/src/components/reportsComponents/reportQuestions/questions/quizMultipleChoice.jsx +37 -13
  31. package/src/components/reportsComponents/reportQuestions/questions/quizScripted.jsx +43 -23
  32. package/src/components/reportsComponents/reportQuestions/questions/quizUnsripted.jsx +32 -14
  33. package/src/components/reportsComponents/reportQuestions/questions/reading.jsx +30 -19
  34. package/src/components/reportsComponents/reportQuestions/questions/soundPlay.jsx +30 -21
  35. package/src/components/reportsComponents/reportQuestions/questions/wordPlayMultipleChoice.jsx +40 -15
  36. package/src/components/reportsComponents/reportQuestions/questions/wordPlayText.jsx +22 -9
  37. package/src/components/reportsComponents/reportQuestions/style.jsx +66 -22
  38. package/src/utils/formatDuration..js +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.7.1511",
3
+ "version": "1.7.1513",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -414,10 +414,8 @@ const AppMainLayout = ({ children }) => {
414
414
  "Select plans",
415
415
  "Renew subscription",
416
416
  "Instructor",
417
- "Learngual logo",
418
417
  "profile",
419
418
  "account photo",
420
- "Select Plans",
421
419
  "Search by Name / Email / Username",
422
420
  "Text",
423
421
  "add",
@@ -29,7 +29,7 @@ const GracePeriod = ({
29
29
 
30
30
  const getTitleFromPath = (path) => {
31
31
  const route = routes.find((route) => path.includes(route.path));
32
- return route?.title || "Dashboard";
32
+ return route?.title || findText("Dashboard");
33
33
  };
34
34
 
35
35
  const pageTitle = getTitleFromPath(location.pathname);
@@ -39,6 +39,7 @@ const ErrorWrapper = ({
39
39
  "Seems we can't find the page your looking for. Let's get you back home.",
40
40
  "Go Back",
41
41
  "There was an error",
42
+ "Learngual logo",
42
43
  ];
43
44
 
44
45
  const { findText, translations, isTranslationsLoading } =
@@ -50,7 +51,7 @@ const ErrorWrapper = ({
50
51
  <Container>
51
52
  <Navbar>
52
53
  <a href="/">
53
- <img src={logo} alt="Learngual logo" />
54
+ <img src={logo} alt={findText("Learngual logo")} />
54
55
  </a>
55
56
  </Navbar>
56
57
  <Content>
@@ -70,7 +70,7 @@ const AccountDropdown = (props) => {
70
70
  <div className="img_div">
71
71
  <img
72
72
  src={props?.selectedAccount?.profile_photo?.url || props?.avatar}
73
- alt="account photo"
73
+ alt={props?.findText("account photo")}
74
74
  />
75
75
  </div>
76
76
  <div>
@@ -159,7 +159,7 @@ const AccountDropdown = (props) => {
159
159
  src={
160
160
  developerItem?.profile_photo?.url || props.avatar
161
161
  }
162
- alt="account photo"
162
+ alt={props?.findText("account photo")}
163
163
  />
164
164
  </div>
165
165
  <div className="account-details">
@@ -215,7 +215,7 @@ const AccountDropdown = (props) => {
215
215
  src={
216
216
  instructorItem?.profile_photo?.url || props.avatar
217
217
  }
218
- alt="account photo"
218
+ alt={props?.findText("account photo")}
219
219
  />
220
220
  </div>
221
221
  <div className="account-details">
@@ -262,7 +262,7 @@ const AccountDropdown = (props) => {
262
262
  <div className="avatar-container">
263
263
  <img
264
264
  src={enterpriseItem?.profile_photo?.url || props.avatar}
265
- alt="account photo"
265
+ alt={props?.findText("account photo")}
266
266
  />
267
267
  </div>
268
268
  <div className="account-details">
@@ -310,7 +310,7 @@ const AccountDropdown = (props) => {
310
310
  <div className="avatar-container">
311
311
  <img
312
312
  src={personalItem?.profile_photo?.url || props.avatar}
313
- alt="account photo"
313
+ alt={props?.findText("account photo")}
314
314
  />
315
315
  </div>
316
316
  <div className="account-details">
@@ -545,7 +545,7 @@ const HeaderComponent = (props) => {
545
545
  <div className="user-img-container">
546
546
  <img
547
547
  src={props?.selectedAccount?.profile_photo?.url || avatar}
548
- alt="profile"
548
+ alt={props?.findText("profile")}
549
549
  />
550
550
  </div>
551
551
  <div className="user-info-container">
@@ -272,6 +272,8 @@ const Messages = ({
272
272
  }
273
273
  console.log("websocket data", data);
274
274
  };
275
+
276
+
275
277
  return () => {
276
278
  socket.current.close();
277
279
 
@@ -0,0 +1,57 @@
1
+ import useAxios from "axios-hooks";
2
+
3
+ const useSampleApi = () => {
4
+ const [{ ...getStudentsTestResultData }, getStudentsTestResult] = useAxios(
5
+ {
6
+ method: "GET",
7
+ },
8
+ {
9
+ manual: true,
10
+ }
11
+ );
12
+
13
+ const handleGetStudentsTestResult = async (activity_id, enterprise_id) => {
14
+ try {
15
+ const url = enterprise_id
16
+ ? `/learn/v1/instructor/${enterprise_id}/tests/${activity_id}/submission_test_questions/`
17
+ : `/learn/v1/instructor/tests/${activity_id}/submission_test_questions/`;
18
+ await getStudentsTestResult({
19
+ url,
20
+ });
21
+ } catch (err) {
22
+ console.log(err);
23
+ }
24
+ };
25
+
26
+ const [{ ...getStudentsTestAnswerData }, getStudentsAnser] = useAxios(
27
+ {
28
+ method: "GET",
29
+ },
30
+ {
31
+ manual: true,
32
+ }
33
+ );
34
+
35
+ const handleGetStudentsAnswer = async (
36
+ question_activity_id,
37
+ enterprise_id
38
+ ) => {
39
+ try {
40
+ const url = `/learn/v2/instructor/${enterprise_id}/tests/question_activity/${question_activity_id}/`;
41
+ await getStudentsAnser({
42
+ url,
43
+ });
44
+ } catch (err) {
45
+ console.log(err);
46
+ }
47
+ };
48
+
49
+ return {
50
+ handleGetStudentsTestResult,
51
+ getStudentsTestResultData,
52
+ handleGetStudentsAnswer,
53
+ getStudentsTestAnswerData,
54
+ };
55
+ };
56
+
57
+ export default useSampleApi;
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+
3
+ const InfoIcon2 = () => {
4
+ return (
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ width="21"
8
+ height="20"
9
+ viewBox="0 0 21 20"
10
+ fill="none"
11
+ >
12
+ <path
13
+ fill-rule="evenodd"
14
+ clip-rule="evenodd"
15
+ d="M18.8281 10C18.8281 14.4183 15.2464 18 10.8281 18C6.40985 18 2.82812 14.4183 2.82812 10C2.82812 5.58172 6.40985 2 10.8281 2C15.2464 2 18.8281 5.58172 18.8281 10ZM10.8281 7C10.4593 7 10.1357 7.19922 9.96131 7.50073C9.68477 7.97879 9.07304 8.14215 8.59498 7.86561C8.11692 7.58906 7.95355 6.97733 8.2301 6.49927C8.7473 5.60518 9.71646 5 10.8281 5C12.485 5 13.8281 6.34315 13.8281 8C13.8281 9.30622 12.9933 10.4175 11.8281 10.8293V11C11.8281 11.5523 11.3804 12 10.8281 12C10.2759 12 9.82814 11.5523 9.82814 11V10C9.82814 9.44772 10.2759 9 10.8281 9C11.3804 9 11.8281 8.55228 11.8281 8C11.8281 7.44772 11.3804 7 10.8281 7ZM10.8281 15C11.3804 15 11.8281 14.5523 11.8281 14C11.8281 13.4477 11.3804 13 10.8281 13C10.2758 13 9.82812 13.4477 9.82812 14C9.82812 14.5523 10.2758 15 10.8281 15Z"
16
+ fill="#949999"
17
+ />
18
+ </svg>
19
+ );
20
+ };
21
+
22
+ export default InfoIcon2;
@@ -0,0 +1,60 @@
1
+ import React from "react";
2
+
3
+ const NavBack = ({ disabled }) => {
4
+ return (
5
+ <svg
6
+ width="25"
7
+ height="24"
8
+ viewBox="0 0 25 24"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ >
12
+ <g clip-path="url(#clip0_55110_349655)">
13
+ <path
14
+ d="M20.5 11H8.33L13.92 5.41L12.5 4L4.5 12L12.5 20L13.91 18.59L8.33 13H20.5V11Z"
15
+ fill={disabled ? "#C6CCCC" : "#00C2C2"}
16
+ />
17
+ </g>
18
+ <defs>
19
+ <clipPath id="clip0_55110_349655">
20
+ <rect
21
+ width="24"
22
+ height="24"
23
+ fill="white"
24
+ transform="translate(0.5)"
25
+ />
26
+ </clipPath>
27
+ </defs>
28
+ </svg>
29
+ );
30
+ };
31
+ const NavForword = ({ disabled }) => {
32
+ return (
33
+ <svg
34
+ xmlns="http://www.w3.org/2000/svg"
35
+ width="25"
36
+ height="24"
37
+ viewBox="0 0 25 24"
38
+ fill="none"
39
+ >
40
+ <g clip-path="url(#clip0_55110_349659)">
41
+ <path
42
+ d="M12.5 4L11.09 5.41L16.67 11H4.5V13H16.67L11.09 18.59L12.5 20L20.5 12L12.5 4Z"
43
+ fill={disabled ? "#C6CCCC" : "#00C2C2"}
44
+ />
45
+ </g>
46
+ <defs>
47
+ <clipPath id="clip0_55110_349659">
48
+ <rect
49
+ width="24"
50
+ height="24"
51
+ fill="white"
52
+ transform="translate(0.5)"
53
+ />
54
+ </clipPath>
55
+ </defs>
56
+ </svg>
57
+ );
58
+ };
59
+
60
+ export { NavBack, NavForword };
@@ -26,6 +26,8 @@ const choiceListAndAnswer = ({
26
26
  options,
27
27
  answer,
28
28
  isCorrect: !!(answer && correct && answer.id === correct.id),
29
+ correctIndex: options?.findIndex((option) => option?.id === correct.id),
30
+ correctText: correct?.text,
29
31
  };
30
32
  };
31
33