From bdde9a98356139b51e0d9b648a86b82f58e46d96 Mon Sep 17 00:00:00 2001
From: WilfredoAaronSosaRamosBoushtech
<113047749+AaronSosaRamos@users.noreply.github.com>
Date: Sat, 28 Dec 2024 17:07:19 -0500
Subject: [PATCH 01/10] new syllabus generator error solved.
---
components/UserAvatar/styles.js | 29 +-
functions/seed_data.json | 108 +-------
.../SyllabusGeneratorResponse.jsx | 256 ++++++++++++------
3 files changed, 194 insertions(+), 199 deletions(-)
diff --git a/components/UserAvatar/styles.js b/components/UserAvatar/styles.js
index fed3611d4..b9593e70a 100644
--- a/components/UserAvatar/styles.js
+++ b/components/UserAvatar/styles.js
@@ -20,24 +20,27 @@ const styles = {
width: '100%',
},
name: {
- maxWidth: '86px',
- width: 'auto',
- height: '24px',
- fontFamily: 'Satoshi Bold',
- fontSize: '16px',
- color: '#9E94A5',
- textAlign: 'left',
- lineHeight: '16px',
+ maxWidth: "150px", // Incrementamos el ancho mรกximo para permitir dos palabras completas
+ width: "auto",
+ height: "24px",
+ fontFamily: "Satoshi Bold",
+ fontSize: "16px",
+ color: "#9E94A5",
+ textAlign: "left",
+ lineHeight: "16px",
+ whiteSpace: "nowrap",
+ overflow: "hidden",
+ textOverflow: "ellipsis", // Aseguramos truncamiento con "..."
},
nameContainer: {
- position: 'relative',
+ position: "relative",
container: true,
item: true,
mobileSmall: true,
- display: 'flex',
- width: 'auto',
- height: '19px',
- whiteSpace: 'nowrap',
+ display: "flex",
+ width: "auto",
+ height: "19px",
+ whiteSpace: "nowrap",
},
userAvatarCircle: {
width: '45px',
diff --git a/functions/seed_data.json b/functions/seed_data.json
index 29871e491..b08b5e897 100644
--- a/functions/seed_data.json
+++ b/functions/seed_data.json
@@ -1156,10 +1156,10 @@
"id": "syllabus-generator",
"inputs": [
{
- "defaultValue": "5th grade",
+ "defaultValue": "Elementary",
"label": "Grade Level",
"name": "grade_level",
- "placeholder": "Enter the grade level (e.g., 10th Grade)",
+ "placeholder": "Select the grade level",
"type": "select",
"values": [
{
@@ -1171,112 +1171,24 @@
"label": "Kindergarten"
},
{
- "key": "1st grade",
- "label": "1st grade"
+ "key": "Elementary",
+ "label": "Elementary"
},
{
- "key": "2nd grade",
- "label": "2nd grade"
+ "key": "Middle",
+ "label": "Middle"
},
{
- "key": "3rd grade",
- "label": "3rd grade"
- },
- {
- "key": "4th grade",
- "label": "4th grade"
- },
- {
- "key": "5th grade",
- "label": "5th grade"
- },
- {
- "key": "6th grade",
- "label": "6th grade"
- },
- {
- "key": "7th grade",
- "label": "7th grade"
- },
- {
- "key": "8th grade",
- "label": "8th grade"
- },
- {
- "key": "9th grade",
- "label": "9th grade"
- },
- {
- "key": "10th grade",
- "label": "10th grade"
- },
- {
- "key": "11th grade",
- "label": "11th grade"
- },
- {
- "key": "12th grade",
- "label": "12th grade"
+ "key": "High",
+ "label": "High"
},
{
"key": "University",
"label": "University"
},
{
- "key": "Professional Staff",
- "label": "Professional Staff"
- },
- {
- "key": "Year 1",
- "label": "Year 1"
- },
- {
- "key": "Year 2",
- "label": "Year 2"
- },
- {
- "key": "Year 3",
- "label": "Year 3"
- },
- {
- "key": "Year 4",
- "label": "Year 4"
- },
- {
- "key": "Year 5",
- "label": "Year 5"
- },
- {
- "key": "Year 6",
- "label": "Year 6"
- },
- {
- "key": "Year 7",
- "label": "Year 7"
- },
- {
- "key": "Year 8",
- "label": "Year 8"
- },
- {
- "key": "Year 9",
- "label": "Year 9"
- },
- {
- "key": "Year 10",
- "label": "Year 10"
- },
- {
- "key": "Year 11",
- "label": "Year 11"
- },
- {
- "key": "Year 12",
- "label": "Year 12"
- },
- {
- "key": "Year 13",
- "label": "Year 13"
+ "key": "Professional",
+ "label": "Professional"
}
]
},
diff --git a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
index 7e75e75f7..1f23af90b 100644
--- a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
+++ b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
@@ -1,102 +1,182 @@
import {
+ Box,
+ Typography,
+ Paper,
+ Divider,
+ List,
+ ListItem,
+ ListItemText,
Fade,
Grid,
- Paper,
- Table,
- TableBody,
- TableCell,
- TableContainer,
- TableHead,
- TableRow,
-} from '@mui/material';
+} from "@mui/material";
-import { useSelector } from 'react-redux';
+import { useSelector } from "react-redux";
-import styles from './styles';
+import styles from "./styles";
-/**
- * Displays the response from the Syllabus Generator tool in a table format.
- *
- * The table has two columns: "Section" and "Details". The "Section" column
- * displays the name of the section, and the "Details" column displays the
- * details of the section.
- *
- * The sections and their details are as follows:
- *
- * - Course Title: The title of the course.
- * - Grade Level: The grade level of the course.
- * - Description: A brief description of the course.
- * - Instructor Name: The name of the instructor.
- * - Instructor Title: The title of the instructor.
- * - Objectives: The objectives of the course.
- * - Learning Outcomes: The learning outcomes of the course.
- */
const SyllabusGeneratorResponse = () => {
const { response } = useSelector((state) => state.tools);
+ const formatContent = (content) =>
+ content
+ .split("\n")
+ .map((item) => item.trim().replace(/^[-*]+\s*/, ""));
+
+ const renderCourseContent = () =>
+ response.course_content.map((content, idx) => (
+
+
+ ๐
Week {content.unit_time_value}: {content.topic.split("\n")[0]}
+
+
+
+ {formatContent(content.topic).map((item, index) => (
+
+
+
+ ))}
+
+
+ ));
+
const renderTable = () => {
return (
-
-
-
-
- Section
- Details
-
-
-
-
- Course Title
- {response.course_information.course_title}
-
-
- Grade Level
- {response.course_information.grade_level}
-
-
- Description
- {response.course_information.description}
-
-
- Instructor Name
- {response.instructor_information.name}
-
-
- Instructor Title
- {response.instructor_information.title}
-
-
- Objectives
-
-
- {response.course_description_objectives.objectives.map(
- (objective, index) => (
- - {objective}
- )
- )}
-
-
-
-
-
- Learning Outcomes
-
-
-
- {response.course_description_objectives.intended_learning_outcomes.map(
- (outcome, index) => (
- - {outcome}
- )
- )}
-
-
-
-
-
-
+
+
+
+ ๐ Course Information
+
+
+ Title: {response.course_information.course_title}
+
+
+ Grade Level: {response.course_information.grade_level}
+
+
+ {response.course_information.description}
+
+
+
+
+
+ ๐ฏ Objectives and Learning Outcomes
+
+
+
+ Objectives:
+
+
+ {response.course_description_objectives.objectives.map((obj, idx) => (
+
+
+
+ ))}
+
+
+ Intended Learning Outcomes:
+
+
+ {response.course_description_objectives.intended_learning_outcomes.map(
+ (outcome, idx) => (
+
+
+
+ )
+ )}
+
+
+
+
+
+ ๐ Course Content
+
+
+ {renderCourseContent()}
+
+
+
+
+ โ๏ธ Policies and Procedures
+
+
+ Attendance Policy: {response.policies_procedures.attendance_policy}
+
+
+ Late Submission Policy: {response.policies_procedures.late_submission_policy}
+
+
+ Academic Honesty: {response.policies_procedures.academic_honesty}
+
+
+
+
+
+ ๐ Assessment and Grading
+
+
+ Assessment Methods:
+
+
+ {response.assessment_grading_criteria.assessment_methods.map(
+ (method, idx) => (
+
+
+
+ )
+ )}
+
+
+ Grading Scale:
+
+
+ {Object.entries(response.assessment_grading_criteria.grading_scale).map(
+ ([range, grade], idx) => (
+
+
+
+ )
+ )}
+
+
+
+
+
+ ๐ Learning Resources
+
+
+ {response.learning_resources.map((resource, idx) => (
+
+
+
+ ))}
+
+
+
+
+
+ ๐๏ธ Course Schedule
+
+ {response.course_schedule.map((schedule, idx) => (
+
+
+ Week {schedule.unit_time_value} ({schedule.date}): {schedule.topic}
+
+ {schedule.activity_desc}
+
+ ))}
+
+
);
};
From 4e888a8f4ffb1f8dbb5ba4518338282fbce4ba73 Mon Sep 17 00:00:00 2001
From: WilfredoAaronSosaRamosBoushtech
<113047749+AaronSosaRamos@users.noreply.github.com>
Date: Sat, 28 Dec 2024 17:16:26 -0500
Subject: [PATCH 02/10] new updates
---
components/UserAvatar/styles.js | 4 +-
.../SyllabusGeneratorResponse.jsx | 51 ++++++++++++++++++-
2 files changed, 52 insertions(+), 3 deletions(-)
diff --git a/components/UserAvatar/styles.js b/components/UserAvatar/styles.js
index b9593e70a..810272d1e 100644
--- a/components/UserAvatar/styles.js
+++ b/components/UserAvatar/styles.js
@@ -20,7 +20,7 @@ const styles = {
width: '100%',
},
name: {
- maxWidth: "150px", // Incrementamos el ancho mรกximo para permitir dos palabras completas
+ maxWidth: "150px",
width: "auto",
height: "24px",
fontFamily: "Satoshi Bold",
@@ -30,7 +30,7 @@ const styles = {
lineHeight: "16px",
whiteSpace: "nowrap",
overflow: "hidden",
- textOverflow: "ellipsis", // Aseguramos truncamiento con "..."
+ textOverflow: "ellipsis",
},
nameContainer: {
position: "relative",
diff --git a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
index 1f23af90b..fe47451bf 100644
--- a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
+++ b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
@@ -14,6 +14,55 @@ import { useSelector } from "react-redux";
import styles from "./styles";
+/**
+ * Renders the response from the Syllabus Generator tool in a structured format.
+ *
+ * The component displays course information in a table-like format using
+ * Material-UI components. The layout includes two primary columns: "Section"
+ * and "Details".
+ *
+ * Structure:
+ * Each section is displayed within a `Paper` component for separation and clarity.
+ * The data is organized as follows:
+ *
+ * - Course Information:
+ * - Course Title: Displays the title of the course.
+ * - Grade Level: Indicates the grade level for the course.
+ * - Description: A brief overview of the course content.
+ *
+ * - Instructor Information:
+ * - Instructor Name: The name of the course instructor.
+ * - Instructor Title: The title or designation of the instructor.
+ *
+ * - Objectives and Learning Outcomes:
+ * - Objectives: Key objectives of the course displayed as a bullet list.
+ * - Learning Outcomes: The intended learning outcomes for students.
+ *
+ * - Course Content:
+ * - Week-by-week breakdown of topics covered in the course, formatted as a list.
+ *
+ * - Policies and Procedures:
+ * - Attendance Policy: Guidelines for attendance.
+ * - Late Submission Policy: Rules for late submissions.
+ * - Academic Honesty: Expectations for academic integrity.
+ *
+ * - Assessment and Grading:
+ * - Assessment Methods: Evaluation criteria and their respective weights.
+ * - Grading Scale: The grading scale used for the course.
+ *
+ * - Learning Resources:
+ * - A list of books, articles, or tools recommended for the course.
+ *
+ * - Course Schedule:
+ * - Detailed schedule of activities, including topics, assignments, and due dates.
+ *
+ * Usage:
+ * Import this component and pass the syllabus data through a `response` object.
+ * Ensure that the data follows the required structure to be displayed correctly.
+ *
+ */
+
+
const SyllabusGeneratorResponse = () => {
const { response } = useSelector((state) => state.tools);
@@ -21,7 +70,7 @@ const SyllabusGeneratorResponse = () => {
content
.split("\n")
.map((item) => item.trim().replace(/^[-*]+\s*/, ""));
-
+
const renderCourseContent = () =>
response.course_content.map((content, idx) => (
Date: Sat, 28 Dec 2024 20:50:20 -0500
Subject: [PATCH 03/10] Update SyllabusGeneratorResponse.jsx
---
.../SyllabusGeneratorResponse.jsx | 317 +++++++-----------
1 file changed, 122 insertions(+), 195 deletions(-)
diff --git a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
index fe47451bf..400e559a0 100644
--- a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
+++ b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
@@ -14,55 +14,6 @@ import { useSelector } from "react-redux";
import styles from "./styles";
-/**
- * Renders the response from the Syllabus Generator tool in a structured format.
- *
- * The component displays course information in a table-like format using
- * Material-UI components. The layout includes two primary columns: "Section"
- * and "Details".
- *
- * Structure:
- * Each section is displayed within a `Paper` component for separation and clarity.
- * The data is organized as follows:
- *
- * - Course Information:
- * - Course Title: Displays the title of the course.
- * - Grade Level: Indicates the grade level for the course.
- * - Description: A brief overview of the course content.
- *
- * - Instructor Information:
- * - Instructor Name: The name of the course instructor.
- * - Instructor Title: The title or designation of the instructor.
- *
- * - Objectives and Learning Outcomes:
- * - Objectives: Key objectives of the course displayed as a bullet list.
- * - Learning Outcomes: The intended learning outcomes for students.
- *
- * - Course Content:
- * - Week-by-week breakdown of topics covered in the course, formatted as a list.
- *
- * - Policies and Procedures:
- * - Attendance Policy: Guidelines for attendance.
- * - Late Submission Policy: Rules for late submissions.
- * - Academic Honesty: Expectations for academic integrity.
- *
- * - Assessment and Grading:
- * - Assessment Methods: Evaluation criteria and their respective weights.
- * - Grading Scale: The grading scale used for the course.
- *
- * - Learning Resources:
- * - A list of books, articles, or tools recommended for the course.
- *
- * - Course Schedule:
- * - Detailed schedule of activities, including topics, assignments, and due dates.
- *
- * Usage:
- * Import this component and pass the syllabus data through a `response` object.
- * Ensure that the data follows the required structure to be displayed correctly.
- *
- */
-
-
const SyllabusGeneratorResponse = () => {
const { response } = useSelector((state) => state.tools);
@@ -71,167 +22,143 @@ const SyllabusGeneratorResponse = () => {
.split("\n")
.map((item) => item.trim().replace(/^[-*]+\s*/, ""));
- const renderCourseContent = () =>
- response.course_content.map((content, idx) => (
-
-
- ๐
Week {content.unit_time_value}: {content.topic.split("\n")[0]}
-
-
-
- {formatContent(content.topic).map((item, index) => (
-
-
-
- ))}
-
-
- ));
+ const renderCourseInfo = () => (
+
+ ๐ Course Information
+ Title: {response.course_information.course_title}
+ Grade Level: {response.course_information.grade_level}
+ {response.course_information.description}
+
+ );
- const renderTable = () => {
- return (
-
-
-
- ๐ Course Information
-
-
- Title: {response.course_information.course_title}
-
-
- Grade Level: {response.course_information.grade_level}
-
-
- {response.course_information.description}
-
-
+ const renderObjectivesAndOutcomes = () => (
+
+ ๐ฏ Objectives and Learning Outcomes
+
+ Objectives:
+
+ {response.course_description_objectives.objectives.map((obj, idx) => (
+
+
+
+ ))}
+
+ Intended Learning Outcomes:
+
+ {response.course_description_objectives.intended_learning_outcomes.map((outcome, idx) => (
+
+
+
+ ))}
+
+
+ );
-
-
- ๐ฏ Objectives and Learning Outcomes
-
-
-
- Objectives:
-
+ const renderCourseContent = () => (
+
+ ๐ Course Content
+
+ {response.course_content.map((content, idx) => (
+
+
+ ๐
Week {content.unit_time_value}: {content.topic.split("\n")[0]}
+
+
- {response.course_description_objectives.objectives.map((obj, idx) => (
-
-
+ {content.topic.split("\n").map((item, index) => (
+
+
))}
-
- Intended Learning Outcomes:
-
-
- {response.course_description_objectives.intended_learning_outcomes.map(
- (outcome, idx) => (
-
-
-
- )
- )}
-
-
-
-
-
- ๐ Course Content
-
-
- {renderCourseContent()}
+ ))}
+
+ );
-
-
- โ๏ธ Policies and Procedures
-
-
- Attendance Policy: {response.policies_procedures.attendance_policy}
-
-
- Late Submission Policy: {response.policies_procedures.late_submission_policy}
-
-
- Academic Honesty: {response.policies_procedures.academic_honesty}
-
-
+ const renderPoliciesAndProcedures = () => (
+
+ โ๏ธ Policies and Procedures
+ Attendance Policy: {response.policies_procedures.attendance_policy}
+
+ Late Submission Policy: {response.policies_procedures.late_submission_policy}
+
+
+ Academic Honesty: {response.policies_procedures.academic_honesty}
+
+
+ );
-
-
- ๐ Assessment and Grading
-
-
- Assessment Methods:
-
-
- {response.assessment_grading_criteria.assessment_methods.map(
- (method, idx) => (
-
-
-
- )
- )}
-
-
- Grading Scale:
-
-
- {Object.entries(response.assessment_grading_criteria.grading_scale).map(
- ([range, grade], idx) => (
-
-
-
- )
- )}
-
-
+ const renderAssessmentAndGrading = () => (
+
+ ๐ Assessment and Grading
+ Assessment Methods:
+
+ {response.assessment_grading_criteria.assessment_methods.map((method, idx) => (
+
+
+
+ ))}
+
+ Grading Scale:
+
+ {Object.entries(response.assessment_grading_criteria.grading_scale).map(([range, grade], idx) => (
+
+
+
+ ))}
+
+
+ );
-
-
- ๐ Learning Resources
-
-
- {response.learning_resources.map((resource, idx) => (
-
-
-
- ))}
-
-
+ const renderLearningResources = () => (
+
+ ๐ Learning Resources
+
+ {response.learning_resources.map((resource, idx) => (
+
+
+
+ ))}
+
+
+ );
-
-
- ๐๏ธ Course Schedule
+ const renderCourseSchedule = () => (
+
+ ๐๏ธ Course Schedule
+ {response.course_schedule.map((schedule, idx) => (
+
+
+ Week {schedule.unit_time_value} ({schedule.date}): {schedule.topic}
- {response.course_schedule.map((schedule, idx) => (
-
-
- Week {schedule.unit_time_value} ({schedule.date}): {schedule.topic}
-
- {schedule.activity_desc}
-
- ))}
-
-
- );
- };
+ {schedule.activity_desc}
+
+ ))}
+
+ );
return (
- {renderTable()}
+
+
+ {renderCourseInfo()}
+ {renderObjectivesAndOutcomes()}
+ {renderCourseContent()}
+ {renderPoliciesAndProcedures()}
+ {renderAssessmentAndGrading()}
+ {renderLearningResources()}
+ {renderCourseSchedule()}
+
+
);
};
From 9e5a742727db0f0b15cc7dd010924d2d91ffb5ba Mon Sep 17 00:00:00 2001
From: WilfredoAaronSosaRamosBoushtech
<113047749+AaronSosaRamos@users.noreply.github.com>
Date: Sat, 28 Dec 2024 20:51:32 -0500
Subject: [PATCH 04/10] Update SyllabusGeneratorResponse.jsx
---
.../SyllabusGeneratorResponse.jsx | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
index 400e559a0..fef78b19d 100644
--- a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
+++ b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
@@ -14,6 +14,51 @@ import { useSelector } from "react-redux";
import styles from "./styles";
+/**
+* Renders the response from the Syllabus Generator tool in a structured format.
+ *
+ * The component displays course information in a table-like format using
+ * Material-UI components. The layout includes two primary columns: "Section"
+ * and "Details".
+ *
+ * Structure:
+ * Each section is displayed within a `Paper` component for separation and clarity.
+ * The data is organized as follows:
+ *
+ * - Course Information:
+ * - Course Title: Displays the title of the course.
+ * - Grade Level: Indicates the grade level for the course.
+ * - Description: A brief overview of the course content.
+ *
+ * - Instructor Information:
+ * - Instructor Name: The name of the course instructor.
+ * - Instructor Title: The title or designation of the instructor.
+ *
+ * - Objectives and Learning Outcomes:
+ * - Objectives: Key objectives of the course displayed as a bullet list.
+ * - Learning Outcomes: The intended learning outcomes for students.
+ * - Course Content:
+ * - Week-by-week breakdown of topics covered in the course, formatted as a list.
+ * - Policies and Procedures:
+ * - Attendance Policy: Guidelines for attendance.
+ * - Late Submission Policy: Rules for late submissions.
+ * - Academic Honesty: Expectations for academic integrity.
+ *
+ * - Assessment and Grading:
+ * - Assessment Methods: Evaluation criteria and their respective weights.
+ * - Grading Scale: The grading scale used for the course.
+ *
+ * - Learning Resources:
+ * - A list of books, articles, or tools recommended for the course.
+ *
+ * - Course Schedule:
+ * - Detailed schedule of activities, including topics, assignments, and due dates.
+ *
+ * Usage:
+ * Import this component and pass the syllabus data through a `response` object.
+ * Ensure that the data follows the required structure to be displayed correctly.
+*/
+
const SyllabusGeneratorResponse = () => {
const { response } = useSelector((state) => state.tools);
From 32dd34e3664f5808596866b2da49344969eca7c8 Mon Sep 17 00:00:00 2001
From: WilfredoAaronSosaRamosBoushtech
<113047749+AaronSosaRamos@users.noreply.github.com>
Date: Mon, 30 Dec 2024 10:11:52 -0500
Subject: [PATCH 05/10] new pdf file export imp
---
package-lock.json | 193 ++++++++++++++++++
package.json | 2 +
tools/libs/utils/createPdf.js | 81 ++++++++
.../SyllabusGeneratorResponse.jsx | 103 +++++++++-
4 files changed, 377 insertions(+), 2 deletions(-)
create mode 100644 tools/libs/utils/createPdf.js
diff --git a/package-lock.json b/package-lock.json
index cc40c3a54..86bb77316 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -19,6 +19,8 @@
"dotenv": "^16.4.5",
"firebase": "^9.22.0",
"firebase-admin": "^11.8.0",
+ "jspdf": "^2.5.2",
+ "jspdf-autotable": "^3.8.4",
"moment": "^2.29.4",
"next": "12.3.0",
"next-transpile-modules": "^10.0.1",
@@ -4288,6 +4290,12 @@
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw=="
},
+ "node_modules/@types/raf": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.3.tgz",
+ "integrity": "sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==",
+ "optional": true
+ },
"node_modules/@types/range-parser": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
@@ -4744,6 +4752,17 @@
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
+ "node_modules/atob": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
+ "bin": {
+ "atob": "bin/atob.js"
+ },
+ "engines": {
+ "node": ">= 4.5.0"
+ }
+ },
"node_modules/available-typed-arrays": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
@@ -4861,6 +4880,15 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"devOptional": true
},
+ "node_modules/base64-arraybuffer": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
+ "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",
+ "optional": true,
+ "engines": {
+ "node": ">= 0.6.0"
+ }
+ },
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -4952,6 +4980,17 @@
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
}
},
+ "node_modules/btoa": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
+ "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==",
+ "bin": {
+ "btoa": "bin/btoa.js"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
"node_modules/buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
@@ -5009,6 +5048,31 @@
}
]
},
+ "node_modules/canvg": {
+ "version": "3.0.10",
+ "resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz",
+ "integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==",
+ "optional": true,
+ "dependencies": {
+ "@babel/runtime": "^7.12.5",
+ "@types/raf": "^3.4.0",
+ "core-js": "^3.8.3",
+ "raf": "^3.4.1",
+ "regenerator-runtime": "^0.13.7",
+ "rgbcolor": "^1.0.1",
+ "stackblur-canvas": "^2.0.0",
+ "svg-pathdata": "^6.0.3"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/canvg/node_modules/regenerator-runtime": {
+ "version": "0.13.11",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
+ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
+ "optional": true
+ },
"node_modules/catharsis": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz",
@@ -5361,6 +5425,17 @@
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",
"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="
},
+ "node_modules/core-js": {
+ "version": "3.39.0",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz",
+ "integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==",
+ "hasInstallScript": true,
+ "optional": true,
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/core-js"
+ }
+ },
"node_modules/core-js-compat": {
"version": "3.30.2",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.30.2.tgz",
@@ -5403,6 +5478,15 @@
"node": ">= 8"
}
},
+ "node_modules/css-line-break": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
+ "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
+ "optional": true,
+ "dependencies": {
+ "utrie": "^1.0.2"
+ }
+ },
"node_modules/css-select": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz",
@@ -5654,6 +5738,12 @@
"url": "https://github.com/fb55/domhandler?sponsor=1"
}
},
+ "node_modules/dompurify": {
+ "version": "2.5.8",
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.8.tgz",
+ "integrity": "sha512-o1vSNgrmYMQObbSSvF/1brBYEQPHhV1+gsmrusO7/GXtp1T9rCS8cXFqVxK/9crT1jA6Ccv+5MTSjBNqr7Sovw==",
+ "optional": true
+ },
"node_modules/domutils": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz",
@@ -6649,6 +6739,11 @@
"node": ">=0.8.0"
}
},
+ "node_modules/fflate": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz",
+ "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A=="
+ },
"node_modules/file-entry-cache": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@@ -7641,6 +7736,19 @@
"url": "https://github.com/sponsors/wooorm"
}
},
+ "node_modules/html2canvas": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz",
+ "integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
+ "optional": true,
+ "dependencies": {
+ "css-line-break": "^2.1.0",
+ "text-segmentation": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
"node_modules/http-parser-js": {
"version": "0.5.8",
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz",
@@ -8281,6 +8389,31 @@
"safe-buffer": "^5.0.1"
}
},
+ "node_modules/jspdf": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.5.2.tgz",
+ "integrity": "sha512-myeX9c+p7znDWPk0eTrujCzNjT+CXdXyk7YmJq5nD5V7uLLKmSXnlQ/Jn/kuo3X09Op70Apm0rQSnFWyGK8uEQ==",
+ "dependencies": {
+ "@babel/runtime": "^7.23.2",
+ "atob": "^2.1.2",
+ "btoa": "^1.2.1",
+ "fflate": "^0.8.1"
+ },
+ "optionalDependencies": {
+ "canvg": "^3.0.6",
+ "core-js": "^3.6.0",
+ "dompurify": "^2.5.4",
+ "html2canvas": "^1.0.0-rc.5"
+ }
+ },
+ "node_modules/jspdf-autotable": {
+ "version": "3.8.4",
+ "resolved": "https://registry.npmjs.org/jspdf-autotable/-/jspdf-autotable-3.8.4.tgz",
+ "integrity": "sha512-rSffGoBsJYX83iTRv8Ft7FhqfgEL2nLpGAIiqruEQQ3e4r0qdLFbPUB7N9HAle0I3XgpisvyW751VHCqKUVOgQ==",
+ "peerDependencies": {
+ "jspdf": "^2.5.1"
+ }
+ },
"node_modules/jsx-ast-utils": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz",
@@ -10181,6 +10314,12 @@
"node": ">=8"
}
},
+ "node_modules/performance-now": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+ "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==",
+ "optional": true
+ },
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
@@ -10402,6 +10541,15 @@
}
]
},
+ "node_modules/raf": {
+ "version": "3.4.1",
+ "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
+ "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==",
+ "optional": true,
+ "dependencies": {
+ "performance-now": "^2.1.0"
+ }
+ },
"node_modules/react": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
@@ -11007,6 +11155,15 @@
"integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==",
"dev": true
},
+ "node_modules/rgbcolor": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz",
+ "integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==",
+ "optional": true,
+ "engines": {
+ "node": ">= 0.8.15"
+ }
+ },
"node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -11242,6 +11399,15 @@
"url": "https://github.com/sponsors/wooorm"
}
},
+ "node_modules/stackblur-canvas": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.7.0.tgz",
+ "integrity": "sha512-yf7OENo23AGJhBriGx0QivY5JP6Y1HbrrDI6WLt6C5auYZXlQrheoY8hD4ibekFKz1HOfE48Ww8kMWMnJD/zcQ==",
+ "optional": true,
+ "engines": {
+ "node": ">=0.1.14"
+ }
+ },
"node_modules/stream-events": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz",
@@ -11507,6 +11673,15 @@
"integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==",
"dev": true
},
+ "node_modules/svg-pathdata": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz",
+ "integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==",
+ "optional": true,
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
"node_modules/svgo": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/svgo/-/svgo-3.0.2.tgz",
@@ -11560,6 +11735,15 @@
"resolved": "https://registry.npmjs.org/text-decoding/-/text-decoding-1.0.0.tgz",
"integrity": "sha512-/0TJD42KDnVwKmDK6jj3xP7E2MG7SHAOG4tyTgyUCRPdHwvkquYNLEQltmdMa3owq3TkddCVcTsoctJI8VQNKA=="
},
+ "node_modules/text-segmentation": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
+ "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
+ "optional": true,
+ "dependencies": {
+ "utrie": "^1.0.2"
+ }
+ },
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -11947,6 +12131,15 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"optional": true
},
+ "node_modules/utrie": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz",
+ "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
+ "optional": true,
+ "dependencies": {
+ "base64-arraybuffer": "^1.0.2"
+ }
+ },
"node_modules/uuid": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
diff --git a/package.json b/package.json
index 981c79253..6455b701a 100644
--- a/package.json
+++ b/package.json
@@ -28,6 +28,8 @@
"dotenv": "^16.4.5",
"firebase": "^9.22.0",
"firebase-admin": "^11.8.0",
+ "jspdf": "^2.5.2",
+ "jspdf-autotable": "^3.8.4",
"moment": "^2.29.4",
"next": "12.3.0",
"next-transpile-modules": "^10.0.1",
diff --git a/tools/libs/utils/createPdf.js b/tools/libs/utils/createPdf.js
new file mode 100644
index 000000000..66fc573b8
--- /dev/null
+++ b/tools/libs/utils/createPdf.js
@@ -0,0 +1,81 @@
+import { jsPDF } from "jspdf";
+import "jspdf-autotable";
+
+export const createPdf = (sections) => {
+ const doc = new jsPDF("p", "mm", "a4");
+
+ // Define Margins and Page Constraints
+ const marginLeft = 20;
+ const marginTop = 20;
+ const marginRight = 190;
+ const pageHeight = 297; // A4 height in mm
+ const lineHeight = 7; // Space between lines
+
+ // Global Styles
+ const titleFontSize = 18;
+ const headerFontSize = 14;
+ const bodyFontSize = 12;
+
+ // Document Title
+ doc.setFont("helvetica", "bold");
+ doc.setFontSize(titleFontSize);
+ doc.text("Course Syllabus", marginLeft, marginTop);
+
+ // Cursor Position
+ let cursorY = marginTop + 10;
+
+ // Function to Add Text with Word Wrapping
+ const addText = (text, fontSize) => {
+ const lines = doc.splitTextToSize(text, marginRight - marginLeft);
+ doc.setFontSize(fontSize);
+ lines.forEach((line) => {
+ if (cursorY + lineHeight > pageHeight - 10) {
+ doc.addPage();
+ cursorY = marginTop;
+ }
+ doc.text(line, marginLeft, cursorY);
+ cursorY += lineHeight;
+ });
+ };
+
+ // Iterate Through Sections
+ sections.forEach((section) => {
+ // Section Header
+ if (section.header) {
+ if (cursorY + lineHeight > pageHeight - 10) {
+ doc.addPage();
+ cursorY = marginTop;
+ }
+ doc.setFont("helvetica", "bold");
+ addText(section.header, headerFontSize);
+ }
+
+ // Section Content
+ if (section.content) {
+ doc.setFont("helvetica", "normal");
+ section.content.forEach((line) => {
+ addText(line, bodyFontSize);
+ });
+ }
+
+ // Section Table
+ if (section.table) {
+ if (cursorY + 30 > pageHeight - 10) {
+ doc.addPage();
+ cursorY = marginTop;
+ }
+ doc.autoTable({
+ startY: cursorY,
+ head: section.table.head,
+ body: section.table.body,
+ margin: { left: marginLeft },
+ styles: { fontSize: 10 },
+ headStyles: { fillColor: [200, 0, 0], textColor: 255 },
+ });
+ cursorY = doc.lastAutoTable.finalY + 10;
+ }
+ });
+
+ // Save the PDF
+ doc.save("syllabus.pdf");
+};
diff --git a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
index fef78b19d..43736b77a 100644
--- a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
+++ b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
@@ -8,10 +8,15 @@ import {
ListItemText,
Fade,
Grid,
+ Button
} from "@mui/material";
+import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";
+
import { useSelector } from "react-redux";
+import { createPdf } from "../../libs/utils/createPdf";
+
import styles from "./styles";
/**
@@ -64,8 +69,63 @@ const SyllabusGeneratorResponse = () => {
const formatContent = (content) =>
content
- .split("\n")
- .map((item) => item.trim().replace(/^[-*]+\s*/, ""));
+ .split("\n")
+ .map((item) => item.trim().replace(/^[-*]+\s*/, ""));
+
+ const handleExportPdf = () => {
+ const sections = [
+ {
+ header: "Course Information",
+ content: [
+ `Title: ${response.course_information.course_title}`,
+ `Grade Level: ${response.course_information.grade_level}`,
+ `Description: ${response.course_information.description}`,
+ ],
+ },
+ {
+ header: "Objectives and Learning Outcomes",
+ content: response.course_description_objectives.objectives.map(
+ (obj, idx) => `Objective ${idx + 1}: ${obj}`
+ ),
+ },
+ {
+ header: "Course Content",
+ table: {
+ head: [["Week", "Topic"]],
+ body: response.course_content.map((content) => [
+ `Week ${content.unit_time_value}`,
+ content.topic,
+ ]),
+ },
+ },
+ {
+ header: "Policies and Procedures",
+ content: [
+ `Attendance Policy: ${response.policies_procedures.attendance_policy}`,
+ `Late Submission Policy: ${response.policies_procedures.late_submission_policy}`,
+ `Academic Honesty: ${response.policies_procedures.academic_honesty}`,
+ ],
+ },
+ {
+ header: "Assessment and Grading",
+ table: {
+ head: [["Assessment Type", "Weight"]],
+ body: response.assessment_grading_criteria.assessment_methods.map(
+ (method) => [method.type_assessment, `${method.weight}%`]
+ ),
+ },
+ },
+ {
+ header: "Learning Resources",
+ content: response.learning_resources.map(
+ (resource, idx) =>
+ `Resource ${idx + 1}: ${resource.title} by ${resource.author} (${resource.year})`
+ ),
+ },
+ ];
+
+ createPdf(sections);
+ };
const renderCourseInfo = () => (
@@ -191,6 +251,44 @@ const SyllabusGeneratorResponse = () => {
);
+ const renderExportPdfButton = () => (
+
+ }
+ onClick={handleExportPdf}
+ >
+ Export PDF
+
+
+
+
+ );
+
return (
@@ -202,6 +300,7 @@ const SyllabusGeneratorResponse = () => {
{renderAssessmentAndGrading()}
{renderLearningResources()}
{renderCourseSchedule()}
+ {renderExportPdfButton()}
From f657b310655a0eca23b8a1338a35aedc8beeaa25 Mon Sep 17 00:00:00 2001
From: WilfredoAaronSosaRamosBoushtech
<113047749+AaronSosaRamos@users.noreply.github.com>
Date: Mon, 30 Dec 2024 10:20:00 -0500
Subject: [PATCH 06/10] Update SyllabusGeneratorResponse.jsx
---
.../SyllabusGeneratorResponse.jsx | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
index 43736b77a..f27eb8d27 100644
--- a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
+++ b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
@@ -108,6 +108,7 @@ const SyllabusGeneratorResponse = () => {
},
{
header: "Assessment and Grading",
+ content: [`Grading Scale:`],
table: {
head: [["Assessment Type", "Weight"]],
body: response.assessment_grading_criteria.assessment_methods.map(
@@ -115,6 +116,15 @@ const SyllabusGeneratorResponse = () => {
),
},
},
+ {
+ header: "Grading Scale",
+ table: {
+ head: [["Grade Range", "Grade"]],
+ body: Object.entries(response.assessment_grading_criteria.grading_scale).map(
+ ([range, grade]) => [range, grade]
+ ),
+ },
+ },
{
header: "Learning Resources",
content: response.learning_resources.map(
@@ -122,11 +132,25 @@ const SyllabusGeneratorResponse = () => {
`Resource ${idx + 1}: ${resource.title} by ${resource.author} (${resource.year})`
),
},
+ {
+ header: "Course Schedule",
+ table: {
+ head: [["Week", "Date", "Topic", "Activity"]],
+ body: response.course_schedule.map((schedule) => [
+ `Week ${schedule.unit_time_value}`,
+ schedule.date,
+ schedule.topic,
+ schedule.activity_desc,
+ ]),
+ },
+ },
];
createPdf(sections);
};
+
+
const renderCourseInfo = () => (
๐ Course Information
From 4bfe694f40d5c728a3073e71ad1a60fe8c0cba89 Mon Sep 17 00:00:00 2001
From: WilfredoAaronSosaRamosBoushtech
<113047749+AaronSosaRamos@users.noreply.github.com>
Date: Mon, 30 Dec 2024 10:43:01 -0500
Subject: [PATCH 07/10] final imp
---
.../SyllabusGeneratorResponse.jsx | 222 ++++++++++++++----
1 file changed, 170 insertions(+), 52 deletions(-)
diff --git a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
index f27eb8d27..b4a5641cd 100644
--- a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
+++ b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
@@ -8,7 +8,13 @@ import {
ListItemText,
Fade,
Grid,
- Button
+ Button,
+ TableContainer,
+ Table,
+ TableHead,
+ TableRow,
+ TableCell,
+ TableBody
} from "@mui/material";
import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";
@@ -84,9 +90,16 @@ const SyllabusGeneratorResponse = () => {
},
{
header: "Objectives and Learning Outcomes",
- content: response.course_description_objectives.objectives.map(
- (obj, idx) => `Objective ${idx + 1}: ${obj}`
- ),
+ content: [
+ ...response.course_description_objectives.objectives.map(
+ (obj, idx) => `Objective ${idx + 1}: ${obj}`
+ ),
+ "",
+ "Intended Learning Outcomes:",
+ ...response.course_description_objectives.intended_learning_outcomes.map(
+ (outcome, idx) => `Outcome ${idx + 1}: ${outcome}`
+ ),
+ ],
},
{
header: "Course Content",
@@ -150,7 +163,6 @@ const SyllabusGeneratorResponse = () => {
};
-
const renderCourseInfo = () => (
๐ Course Information
@@ -185,30 +197,62 @@ const SyllabusGeneratorResponse = () => {
const renderCourseContent = () => (
- ๐ Course Content
-
- {response.course_content.map((content, idx) => (
-
-
- ๐
Week {content.unit_time_value}: {content.topic.split("\n")[0]}
-
-
-
- {content.topic.split("\n").map((item, index) => (
-
-
-
+
+ ๐ Course Content
+
+
+
+
+
+
+ Week
+ Topic
+
+
+
+ {response.course_content.map((content, idx) => (
+
+
+ Week {content.unit_time_value}
+
+
+
+ {content.topic.split("\n")[0]}
+
+
+ {content.topic.split("\n").slice(1).map((item, index) => (
+
+
+
+ ))}
+
+
+
))}
-
-
- ))}
+
+
+
);
+
const renderPoliciesAndProcedures = () => (
โ๏ธ Policies and Procedures
@@ -224,25 +268,82 @@ const SyllabusGeneratorResponse = () => {
const renderAssessmentAndGrading = () => (
- ๐ Assessment and Grading
- Assessment Methods:
-
- {response.assessment_grading_criteria.assessment_methods.map((method, idx) => (
-
-
-
- ))}
-
- Grading Scale:
-
- {Object.entries(response.assessment_grading_criteria.grading_scale).map(([range, grade], idx) => (
-
-
-
- ))}
-
+
+ ๐ Assessment and Grading
+
+
+ Assessment Methods
+
+
+
+
+
+ ๐ Type
+ Weight
+
+
+
+ {response.assessment_grading_criteria.assessment_methods.map((method, idx) => (
+
+
+ {method.type_assessment}
+
+
+ {method.weight}%
+
+
+ ))}
+
+
+
+
+
+ Grading Scale
+
+
+
+
+
+ ๐ Range
+ Grade
+
+
+
+ {Object.entries(response.assessment_grading_criteria.grading_scale).map(([range, grade], idx) => (
+
+ {range}
+ {grade}
+
+ ))}
+
+
+
);
@@ -264,14 +365,31 @@ const SyllabusGeneratorResponse = () => {
const renderCourseSchedule = () => (
๐๏ธ Course Schedule
- {response.course_schedule.map((schedule, idx) => (
-
-
- Week {schedule.unit_time_value} ({schedule.date}): {schedule.topic}
-
- {schedule.activity_desc}
-
- ))}
+
+
+
+
+ Week
+ Date
+ Topic
+ Activity
+
+
+
+ {response.course_schedule.map((schedule, idx) => (
+
+ Week {schedule.unit_time_value}
+ {schedule.date}
+ {schedule.topic}
+ {schedule.activity_desc}
+
+ ))}
+
+
+
);
From 960e6dc7acc36a735d242dc25892f35e657fa1b0 Mon Sep 17 00:00:00 2001
From: WilfredoAaronSosaRamosBoushtech
<113047749+AaronSosaRamos@users.noreply.github.com>
Date: Mon, 30 Dec 2024 17:22:35 -0500
Subject: [PATCH 08/10] update for tool history
---
libs/utils/ToolUtils.js | 20 +++
.../ToolOutputHistoryDrawer.jsx | 2 +
.../toolRenderers/SyllabusOutput.jsx | 167 ++++++++++++++++++
tools/libs/utils/createPdf.js | 81 ---------
.../SyllabusGeneratorResponse.jsx | 125 -------------
5 files changed, 189 insertions(+), 206 deletions(-)
create mode 100644 tools/components/ToolOutputHistoryDrawer/toolRenderers/SyllabusOutput.jsx
delete mode 100644 tools/libs/utils/createPdf.js
diff --git a/libs/utils/ToolUtils.js b/libs/utils/ToolUtils.js
index 0ec55408d..115dcd55b 100644
--- a/libs/utils/ToolUtils.js
+++ b/libs/utils/ToolUtils.js
@@ -62,6 +62,26 @@ const getToolData = (props) => {
...item,
};
}
+ case TOOLS_ID.SYLLABUS_GENERATOR: {
+ const title = `Syllabus - ${item.response.course_information.course_title}`;
+ const description =
+ item.response.course_information.description ||
+ `Syllabus generated from ${item.response.course_information.course_title}`;
+ const output = item.response;
+ const backgroundImgURL =
+ 'https://firebasestorage.googleapis.com/v0/b/kai-ai-f63c8.appspot.com/o/Quizify.png?alt=media&token=d1255f27-b1a1-444e-b96a-4a3ac559237d';
+ const logo =
+ 'https://firebasestorage.googleapis.com/v0/b/kai-ai-f63c8.appspot.com/o/SyllabusLogo.png?alt=media&token=5ea7b96a-d0c9-444a-823f-4fd5721e7e14';
+
+ return {
+ title,
+ description,
+ backgroundImgURL,
+ logo,
+ output,
+ ...item,
+ };
+ }
default:
return {
title: 'Default Title',
diff --git a/tools/components/ToolOutputHistoryDrawer/ToolOutputHistoryDrawer.jsx b/tools/components/ToolOutputHistoryDrawer/ToolOutputHistoryDrawer.jsx
index 91f477121..a72966bbf 100644
--- a/tools/components/ToolOutputHistoryDrawer/ToolOutputHistoryDrawer.jsx
+++ b/tools/components/ToolOutputHistoryDrawer/ToolOutputHistoryDrawer.jsx
@@ -6,6 +6,7 @@ import styles from './styles';
import FlashCardsOutput from './toolRenderers/FlashCardsOutput';
import QuizOutput from './toolRenderers/QuizOutput';
+import SyllabusOutput from './toolRenderers/SyllabusOutput';
import { convertToUnixTimestamp } from '@/libs/utils/FirebaseUtils';
import { copyToClipboard, exportToCSV } from '@/libs/utils/ToolHistoryUtils';
@@ -14,6 +15,7 @@ import { TOOLS_ID } from '@/tools/libs/constants/tools';
const DRAWER_RENDERERS = {
[TOOLS_ID.MULTIPLE_CHOICE_QUIZ_GENERATOR]: QuizOutput,
[TOOLS_ID.FLASHCARDS_GENERATOR]: FlashCardsOutput,
+ [TOOLS_ID.SYLLABUS_GENERATOR]: SyllabusOutput,
};
const DEFAULT_DATA = {
diff --git a/tools/components/ToolOutputHistoryDrawer/toolRenderers/SyllabusOutput.jsx b/tools/components/ToolOutputHistoryDrawer/toolRenderers/SyllabusOutput.jsx
new file mode 100644
index 000000000..c5236dc5e
--- /dev/null
+++ b/tools/components/ToolOutputHistoryDrawer/toolRenderers/SyllabusOutput.jsx
@@ -0,0 +1,167 @@
+import { Grid, List, ListItem, Typography, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, ListItemText } from '@mui/material';
+
+const formatContent = (content) =>
+ content.split("\n").map((item) => item.trim().replace(/^[-*]+\s*/, ""));
+
+const renderSection = (title, content) => (
+
+ {title}
+ {content}
+
+);
+
+const renderList = (title, items, icon) => (
+ <>
+ {title}:
+
+ {items.map((item, idx) => (
+
+
+
+ ))}
+
+ >
+);
+
+const renderTable = (headers, rows, rowRenderer) => (
+
+
+
+
+ {headers.map((header, idx) => (
+
+ {header}
+
+ ))}
+
+
+
+ {rows.map((row, idx) => rowRenderer(row, idx))}
+
+
+
+);
+
+const SyllabusOutput = ({ data }) => {
+
+ const response = data?.response || {};
+
+ return (
+
+ {renderSection(
+ '๐ Course Information',
+ <>
+ Title: {response.course_information.course_title}
+ Grade Level: {response.course_information.grade_level}
+ {response.course_information.description}
+ >
+ )}
+
+ {renderSection(
+ '๐ฏ Objectives and Learning Outcomes',
+ <>
+ {renderList('Objectives', response.course_description_objectives.objectives, 'โ๏ธ')}
+ {renderList('Intended Learning Outcomes', response.course_description_objectives.intended_learning_outcomes, '๐')}
+ >
+ )}
+
+ {renderSection(
+ '๐ Course Content',
+ renderTable(
+ ['Week', 'Topic'],
+ response.course_content,
+ (content, idx) => (
+
+
+ Week {content.unit_time_value}
+
+
+
+ {content.topic.split("\n")[0]}
+
+
+ {content.topic.split("\n").slice(1).map((item, index) => (
+
+
+
+ ))}
+
+
+
+ )
+ )
+ )}
+
+ {renderSection(
+ 'โ๏ธ Policies and Procedures',
+ <>
+ Attendance Policy: {response.policies_procedures.attendance_policy}
+
+ Late Submission Policy: {response.policies_procedures.late_submission_policy}
+
+
+ Academic Honesty: {response.policies_procedures.academic_honesty}
+
+ >
+ )}
+
+ {renderSection(
+ '๐ Assessment and Grading',
+ <>
+ {renderTable(
+ ['๐ Type', 'Weight'],
+ response.assessment_grading_criteria.assessment_methods,
+ (method, idx) => (
+
+ {method.type_assessment}
+ {method.weight}%
+
+ )
+ )}
+ {renderTable(
+ ['๐ Range', 'Grade'],
+ Object.entries(response.assessment_grading_criteria.grading_scale),
+ ([range, grade], idx) => (
+
+ {range}
+ {grade}
+
+ )
+ )}
+ >
+ )}
+
+ {renderSection(
+ '๐ Learning Resources',
+ renderList('Resources', response.learning_resources.map(resource => `${resource.title} by ${resource.author} (${resource.year})`), '๐')
+ )}
+
+ {renderSection(
+ '๐๏ธ Course Schedule',
+ renderTable(
+ ['Week', 'Date', 'Topic', 'Activity'],
+ response.course_schedule,
+ (schedule, idx) => (
+
+ Week {schedule.unit_time_value}
+ {schedule.date}
+ {schedule.topic}
+ {schedule.activity_desc}
+
+ )
+ )
+ )}
+
+ )
+};
+
+export default SyllabusOutput;
diff --git a/tools/libs/utils/createPdf.js b/tools/libs/utils/createPdf.js
deleted file mode 100644
index 66fc573b8..000000000
--- a/tools/libs/utils/createPdf.js
+++ /dev/null
@@ -1,81 +0,0 @@
-import { jsPDF } from "jspdf";
-import "jspdf-autotable";
-
-export const createPdf = (sections) => {
- const doc = new jsPDF("p", "mm", "a4");
-
- // Define Margins and Page Constraints
- const marginLeft = 20;
- const marginTop = 20;
- const marginRight = 190;
- const pageHeight = 297; // A4 height in mm
- const lineHeight = 7; // Space between lines
-
- // Global Styles
- const titleFontSize = 18;
- const headerFontSize = 14;
- const bodyFontSize = 12;
-
- // Document Title
- doc.setFont("helvetica", "bold");
- doc.setFontSize(titleFontSize);
- doc.text("Course Syllabus", marginLeft, marginTop);
-
- // Cursor Position
- let cursorY = marginTop + 10;
-
- // Function to Add Text with Word Wrapping
- const addText = (text, fontSize) => {
- const lines = doc.splitTextToSize(text, marginRight - marginLeft);
- doc.setFontSize(fontSize);
- lines.forEach((line) => {
- if (cursorY + lineHeight > pageHeight - 10) {
- doc.addPage();
- cursorY = marginTop;
- }
- doc.text(line, marginLeft, cursorY);
- cursorY += lineHeight;
- });
- };
-
- // Iterate Through Sections
- sections.forEach((section) => {
- // Section Header
- if (section.header) {
- if (cursorY + lineHeight > pageHeight - 10) {
- doc.addPage();
- cursorY = marginTop;
- }
- doc.setFont("helvetica", "bold");
- addText(section.header, headerFontSize);
- }
-
- // Section Content
- if (section.content) {
- doc.setFont("helvetica", "normal");
- section.content.forEach((line) => {
- addText(line, bodyFontSize);
- });
- }
-
- // Section Table
- if (section.table) {
- if (cursorY + 30 > pageHeight - 10) {
- doc.addPage();
- cursorY = marginTop;
- }
- doc.autoTable({
- startY: cursorY,
- head: section.table.head,
- body: section.table.body,
- margin: { left: marginLeft },
- styles: { fontSize: 10 },
- headStyles: { fillColor: [200, 0, 0], textColor: 255 },
- });
- cursorY = doc.lastAutoTable.finalY + 10;
- }
- });
-
- // Save the PDF
- doc.save("syllabus.pdf");
-};
diff --git a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
index b4a5641cd..f073b2eb8 100644
--- a/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
+++ b/tools/outputs/SyllabusGeneratorResponse/SyllabusGeneratorResponse.jsx
@@ -21,8 +21,6 @@ import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";
import { useSelector } from "react-redux";
-import { createPdf } from "../../libs/utils/createPdf";
-
import styles from "./styles";
/**
@@ -78,90 +76,6 @@ const SyllabusGeneratorResponse = () => {
.split("\n")
.map((item) => item.trim().replace(/^[-*]+\s*/, ""));
- const handleExportPdf = () => {
- const sections = [
- {
- header: "Course Information",
- content: [
- `Title: ${response.course_information.course_title}`,
- `Grade Level: ${response.course_information.grade_level}`,
- `Description: ${response.course_information.description}`,
- ],
- },
- {
- header: "Objectives and Learning Outcomes",
- content: [
- ...response.course_description_objectives.objectives.map(
- (obj, idx) => `Objective ${idx + 1}: ${obj}`
- ),
- "",
- "Intended Learning Outcomes:",
- ...response.course_description_objectives.intended_learning_outcomes.map(
- (outcome, idx) => `Outcome ${idx + 1}: ${outcome}`
- ),
- ],
- },
- {
- header: "Course Content",
- table: {
- head: [["Week", "Topic"]],
- body: response.course_content.map((content) => [
- `Week ${content.unit_time_value}`,
- content.topic,
- ]),
- },
- },
- {
- header: "Policies and Procedures",
- content: [
- `Attendance Policy: ${response.policies_procedures.attendance_policy}`,
- `Late Submission Policy: ${response.policies_procedures.late_submission_policy}`,
- `Academic Honesty: ${response.policies_procedures.academic_honesty}`,
- ],
- },
- {
- header: "Assessment and Grading",
- content: [`Grading Scale:`],
- table: {
- head: [["Assessment Type", "Weight"]],
- body: response.assessment_grading_criteria.assessment_methods.map(
- (method) => [method.type_assessment, `${method.weight}%`]
- ),
- },
- },
- {
- header: "Grading Scale",
- table: {
- head: [["Grade Range", "Grade"]],
- body: Object.entries(response.assessment_grading_criteria.grading_scale).map(
- ([range, grade]) => [range, grade]
- ),
- },
- },
- {
- header: "Learning Resources",
- content: response.learning_resources.map(
- (resource, idx) =>
- `Resource ${idx + 1}: ${resource.title} by ${resource.author} (${resource.year})`
- ),
- },
- {
- header: "Course Schedule",
- table: {
- head: [["Week", "Date", "Topic", "Activity"]],
- body: response.course_schedule.map((schedule) => [
- `Week ${schedule.unit_time_value}`,
- schedule.date,
- schedule.topic,
- schedule.activity_desc,
- ]),
- },
- },
- ];
-
- createPdf(sections);
- };
-
const renderCourseInfo = () => (
@@ -393,44 +307,6 @@ const SyllabusGeneratorResponse = () => {
);
- const renderExportPdfButton = () => (
-
- }
- onClick={handleExportPdf}
- >
- Export PDF
-
-
-
-
- );
-
return (
@@ -442,7 +318,6 @@ const SyllabusGeneratorResponse = () => {
{renderAssessmentAndGrading()}
{renderLearningResources()}
{renderCourseSchedule()}
- {renderExportPdfButton()}
From f977923fc80997ed3ece7aff5477599875cfd3f1 Mon Sep 17 00:00:00 2001
From: WilfredoAaronSosaRamosBoushtech
<113047749+AaronSosaRamos@users.noreply.github.com>
Date: Mon, 30 Dec 2024 17:25:46 -0500
Subject: [PATCH 09/10] Update package.json
---
package.json | 2 --
1 file changed, 2 deletions(-)
diff --git a/package.json b/package.json
index 6455b701a..981c79253 100644
--- a/package.json
+++ b/package.json
@@ -28,8 +28,6 @@
"dotenv": "^16.4.5",
"firebase": "^9.22.0",
"firebase-admin": "^11.8.0",
- "jspdf": "^2.5.2",
- "jspdf-autotable": "^3.8.4",
"moment": "^2.29.4",
"next": "12.3.0",
"next-transpile-modules": "^10.0.1",
From c69b69c25608ab203f19e988037f1d1c5b28069d Mon Sep 17 00:00:00 2001
From: WilfredoAaronSosaRamosBoushtech
<113047749+AaronSosaRamos@users.noreply.github.com>
Date: Mon, 30 Dec 2024 17:26:51 -0500
Subject: [PATCH 10/10] Update package-lock.json
---
package-lock.json | 193 ----------------------------------------------
1 file changed, 193 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 86bb77316..cc40c3a54 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -19,8 +19,6 @@
"dotenv": "^16.4.5",
"firebase": "^9.22.0",
"firebase-admin": "^11.8.0",
- "jspdf": "^2.5.2",
- "jspdf-autotable": "^3.8.4",
"moment": "^2.29.4",
"next": "12.3.0",
"next-transpile-modules": "^10.0.1",
@@ -4290,12 +4288,6 @@
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw=="
},
- "node_modules/@types/raf": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.3.tgz",
- "integrity": "sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==",
- "optional": true
- },
"node_modules/@types/range-parser": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
@@ -4752,17 +4744,6 @@
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
- "node_modules/atob": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
- "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
- "bin": {
- "atob": "bin/atob.js"
- },
- "engines": {
- "node": ">= 4.5.0"
- }
- },
"node_modules/available-typed-arrays": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
@@ -4880,15 +4861,6 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"devOptional": true
},
- "node_modules/base64-arraybuffer": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
- "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",
- "optional": true,
- "engines": {
- "node": ">= 0.6.0"
- }
- },
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -4980,17 +4952,6 @@
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
}
},
- "node_modules/btoa": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
- "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==",
- "bin": {
- "btoa": "bin/btoa.js"
- },
- "engines": {
- "node": ">= 0.4.0"
- }
- },
"node_modules/buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
@@ -5048,31 +5009,6 @@
}
]
},
- "node_modules/canvg": {
- "version": "3.0.10",
- "resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz",
- "integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==",
- "optional": true,
- "dependencies": {
- "@babel/runtime": "^7.12.5",
- "@types/raf": "^3.4.0",
- "core-js": "^3.8.3",
- "raf": "^3.4.1",
- "regenerator-runtime": "^0.13.7",
- "rgbcolor": "^1.0.1",
- "stackblur-canvas": "^2.0.0",
- "svg-pathdata": "^6.0.3"
- },
- "engines": {
- "node": ">=10.0.0"
- }
- },
- "node_modules/canvg/node_modules/regenerator-runtime": {
- "version": "0.13.11",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
- "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
- "optional": true
- },
"node_modules/catharsis": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz",
@@ -5425,17 +5361,6 @@
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",
"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="
},
- "node_modules/core-js": {
- "version": "3.39.0",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz",
- "integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==",
- "hasInstallScript": true,
- "optional": true,
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/core-js"
- }
- },
"node_modules/core-js-compat": {
"version": "3.30.2",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.30.2.tgz",
@@ -5478,15 +5403,6 @@
"node": ">= 8"
}
},
- "node_modules/css-line-break": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
- "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
- "optional": true,
- "dependencies": {
- "utrie": "^1.0.2"
- }
- },
"node_modules/css-select": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz",
@@ -5738,12 +5654,6 @@
"url": "https://github.com/fb55/domhandler?sponsor=1"
}
},
- "node_modules/dompurify": {
- "version": "2.5.8",
- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.8.tgz",
- "integrity": "sha512-o1vSNgrmYMQObbSSvF/1brBYEQPHhV1+gsmrusO7/GXtp1T9rCS8cXFqVxK/9crT1jA6Ccv+5MTSjBNqr7Sovw==",
- "optional": true
- },
"node_modules/domutils": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz",
@@ -6739,11 +6649,6 @@
"node": ">=0.8.0"
}
},
- "node_modules/fflate": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz",
- "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A=="
- },
"node_modules/file-entry-cache": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@@ -7736,19 +7641,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/html2canvas": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz",
- "integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
- "optional": true,
- "dependencies": {
- "css-line-break": "^2.1.0",
- "text-segmentation": "^1.0.3"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
"node_modules/http-parser-js": {
"version": "0.5.8",
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz",
@@ -8389,31 +8281,6 @@
"safe-buffer": "^5.0.1"
}
},
- "node_modules/jspdf": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.5.2.tgz",
- "integrity": "sha512-myeX9c+p7znDWPk0eTrujCzNjT+CXdXyk7YmJq5nD5V7uLLKmSXnlQ/Jn/kuo3X09Op70Apm0rQSnFWyGK8uEQ==",
- "dependencies": {
- "@babel/runtime": "^7.23.2",
- "atob": "^2.1.2",
- "btoa": "^1.2.1",
- "fflate": "^0.8.1"
- },
- "optionalDependencies": {
- "canvg": "^3.0.6",
- "core-js": "^3.6.0",
- "dompurify": "^2.5.4",
- "html2canvas": "^1.0.0-rc.5"
- }
- },
- "node_modules/jspdf-autotable": {
- "version": "3.8.4",
- "resolved": "https://registry.npmjs.org/jspdf-autotable/-/jspdf-autotable-3.8.4.tgz",
- "integrity": "sha512-rSffGoBsJYX83iTRv8Ft7FhqfgEL2nLpGAIiqruEQQ3e4r0qdLFbPUB7N9HAle0I3XgpisvyW751VHCqKUVOgQ==",
- "peerDependencies": {
- "jspdf": "^2.5.1"
- }
- },
"node_modules/jsx-ast-utils": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz",
@@ -10314,12 +10181,6 @@
"node": ">=8"
}
},
- "node_modules/performance-now": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
- "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==",
- "optional": true
- },
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
@@ -10541,15 +10402,6 @@
}
]
},
- "node_modules/raf": {
- "version": "3.4.1",
- "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
- "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==",
- "optional": true,
- "dependencies": {
- "performance-now": "^2.1.0"
- }
- },
"node_modules/react": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
@@ -11155,15 +11007,6 @@
"integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==",
"dev": true
},
- "node_modules/rgbcolor": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz",
- "integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==",
- "optional": true,
- "engines": {
- "node": ">= 0.8.15"
- }
- },
"node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -11399,15 +11242,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/stackblur-canvas": {
- "version": "2.7.0",
- "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.7.0.tgz",
- "integrity": "sha512-yf7OENo23AGJhBriGx0QivY5JP6Y1HbrrDI6WLt6C5auYZXlQrheoY8hD4ibekFKz1HOfE48Ww8kMWMnJD/zcQ==",
- "optional": true,
- "engines": {
- "node": ">=0.1.14"
- }
- },
"node_modules/stream-events": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz",
@@ -11673,15 +11507,6 @@
"integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==",
"dev": true
},
- "node_modules/svg-pathdata": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz",
- "integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==",
- "optional": true,
- "engines": {
- "node": ">=12.0.0"
- }
- },
"node_modules/svgo": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/svgo/-/svgo-3.0.2.tgz",
@@ -11735,15 +11560,6 @@
"resolved": "https://registry.npmjs.org/text-decoding/-/text-decoding-1.0.0.tgz",
"integrity": "sha512-/0TJD42KDnVwKmDK6jj3xP7E2MG7SHAOG4tyTgyUCRPdHwvkquYNLEQltmdMa3owq3TkddCVcTsoctJI8VQNKA=="
},
- "node_modules/text-segmentation": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
- "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
- "optional": true,
- "dependencies": {
- "utrie": "^1.0.2"
- }
- },
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -12131,15 +11947,6 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"optional": true
},
- "node_modules/utrie": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz",
- "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
- "optional": true,
- "dependencies": {
- "base64-arraybuffer": "^1.0.2"
- }
- },
"node_modules/uuid": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",