mario-education 2.4.165-level → 2.4.166-level
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/dist/MarioFramework.Education/ClientApp/src/components/Select/SelectFilter.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/AdminTraining/views/AdminTraining.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Assessment/components/QuestionSplitPaneSelector.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/AssessmentAssignment/views/AssessmentAssignmentContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/AssignAssistant/views/AssignAssistantList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/AssignCounselor/views/AssignCounselorList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/AssignSecondaryTeacher/views/AssignSecondaryTeacherList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Assignment/components/AcademicClassSelector.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Assignment/components/AssessmentSelector.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Certificate/views/CertificateContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ConferenceRubric/views/ConferenceRubricDetail.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/CurrentLicense/views/CurrentLicense.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/CustomBarChart.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/CustomLineChart.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/DashboardToPDF.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/LearningStrategiesTable.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/StudentByGender.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/StudentPressureChart.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/TopSkill.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/components/TotalCard.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/constants.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/configs/types.d.ts +35 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Dashboard/hooks/useExportSessionCsv.d.ts +4 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Destinations/views/Destinations.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/FixData/views/FixDataStudent.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/components/AgGridComponents.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/components/QuestionPreview.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/components/UserForQuestion.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/views/QuestionBankContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/QuestionBank/views/SurveyQuestionContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/EmotionalResponse.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/MultipleChoiceResponse.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/RatingReponse.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/RatingStarReponse.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionResponse/TextInputResponse.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/components/QuestionSplitPaneSelector.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/ReflectionForm/views/ReflectionContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Setup/views/SetupContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SurveyDashboard/components/ChoiceChartType.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SurveyDashboard/components/TotalCard.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SurveyDashboard/configs/types.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchAssistant/views/SwitchAssistantList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchCounselor/views/SwitchCounselorList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchSecondaryTeacher/views/SwitchSecondaryTeacherList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/SwitchTeacher/views/SwitchTeacherList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/components/SelectorTemplate.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/TemplateSystem/views/TemplateContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/Training/views/Training.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/TutorialScreen/views/TutorialScreenContainer.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/UserDeleted/views/UserDeletedList.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/UserRevert/views/RevertUser.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/WelcomeEmailResend/views/WelcomeEmailResend.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/services/dashboardService.d.ts +1 -0
- package/dist/index.js +111 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +111 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -28487,6 +28487,7 @@ var overallReadinessToLearn = "overall_readiness_to_learn";
|
|
|
28487
28487
|
var studentStressByZone = "student_stress_by_zone";
|
|
28488
28488
|
var studentDistribution = "student_distribution";
|
|
28489
28489
|
var chartNames = [averageStudentSafetyName, averageStudentStressName, preparednessChartName, overallReadinessToLearn, successIndicatorsName, learningProcessName, topLearningStrategyName, studentStressByZone, studentDistribution];
|
|
28490
|
+
var CSV_PREFIX = "data:text/csv;charset=utf-8,";
|
|
28490
28491
|
|
|
28491
28492
|
var gradeOptions = function gradeOptions(grades, studentUserId) {
|
|
28492
28493
|
var result = !studentUserId ? GRAGE_DEFAULT : GRAGE_DEFAULT.filter(function (val) {
|
|
@@ -29190,6 +29191,11 @@ var getAllAcademicYearApi = function getAllAcademicYearApi(filters) {
|
|
|
29190
29191
|
params: filters
|
|
29191
29192
|
});
|
|
29192
29193
|
};
|
|
29194
|
+
var getSessionExportCsvApi = function getSessionExportCsvApi(filters) {
|
|
29195
|
+
return api.get(REPORT_URL + "/sessions/export-csv", {
|
|
29196
|
+
params: filters
|
|
29197
|
+
});
|
|
29198
|
+
};
|
|
29193
29199
|
|
|
29194
29200
|
var TITLE$y = "Dashboard";
|
|
29195
29201
|
|
|
@@ -32143,6 +32149,92 @@ var DashboardToPDF = function DashboardToPDF(props) {
|
|
|
32143
32149
|
}, "Export"));
|
|
32144
32150
|
};
|
|
32145
32151
|
|
|
32152
|
+
var useExportSessionCsv = function useExportSessionCsv() {
|
|
32153
|
+
var dispatch = useDispatch();
|
|
32154
|
+
|
|
32155
|
+
var exportSessionsCsv = function exportSessionsCsv(filters) {
|
|
32156
|
+
try {
|
|
32157
|
+
var _temp3 = function _temp3() {
|
|
32158
|
+
dispatch(setLoading(false));
|
|
32159
|
+
};
|
|
32160
|
+
|
|
32161
|
+
dispatch(setLoading(true));
|
|
32162
|
+
|
|
32163
|
+
var _temp4 = _catch(function () {
|
|
32164
|
+
return Promise.resolve(getSessionExportCsvApi(filters)).then(function (res) {
|
|
32165
|
+
var data = res.data;
|
|
32166
|
+
var encodedUri = convertDataExportSession(data, filters.startDate, filters.endDate);
|
|
32167
|
+
var link = document.createElement("a");
|
|
32168
|
+
link.href = encodedUri;
|
|
32169
|
+
link.download = "Sessions_Template.csv";
|
|
32170
|
+
link.click();
|
|
32171
|
+
});
|
|
32172
|
+
}, function (err) {
|
|
32173
|
+
var _err$response, _err$response$data;
|
|
32174
|
+
|
|
32175
|
+
dispatch(setAlert({
|
|
32176
|
+
type: "danger",
|
|
32177
|
+
message: ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.title) || err.message
|
|
32178
|
+
}));
|
|
32179
|
+
});
|
|
32180
|
+
|
|
32181
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
32182
|
+
} catch (e) {
|
|
32183
|
+
return Promise.reject(e);
|
|
32184
|
+
}
|
|
32185
|
+
};
|
|
32186
|
+
|
|
32187
|
+
var convertDataExportSession = function convertDataExportSession(data, startDate, endDate) {
|
|
32188
|
+
var headers = "Student Name, ID/Email, Question, Answer, Teacher, Start Time";
|
|
32189
|
+
|
|
32190
|
+
if (startDate || endDate) {
|
|
32191
|
+
headers = "" + (moment(startDate).isValid() ? moment(startDate).format("DD/MM/YYYY") : '') + (moment(startDate).isValid() && moment(endDate).isValid() ? '-' : '') + moment(endDate).format("DD/MM/YYYY") + "\n" + headers;
|
|
32192
|
+
}
|
|
32193
|
+
|
|
32194
|
+
var content = data.map(function (session) {
|
|
32195
|
+
var studentName = escapeCell(session.studentName);
|
|
32196
|
+
var studentEmail = escapeCell(session.studentEmail ? session.studentEmail : "" + session.studentId);
|
|
32197
|
+
var teacherName = escapeCell(session.teacherName);
|
|
32198
|
+
var startTime = utcToLocalTime(session.startTime, "DD-MM-YYYY HH:mm:ss");
|
|
32199
|
+
var questions = session.studentResult.questions;
|
|
32200
|
+
var learningStrategyQuestions = session.teacherResult.questions;
|
|
32201
|
+
var questionsContent = questions.map(function (question) {
|
|
32202
|
+
return "\n" + studentName + ", " + studentEmail + ", " + escapeCell(htmlToText(question.text)) + ", " + (question.type != "Rating" ? escapeCell(question.answer) : question.answer) + "," + teacherName + ", " + startTime;
|
|
32203
|
+
});
|
|
32204
|
+
var learningStrategyQuestionsContent = learningStrategyQuestions.map(function (learning) {
|
|
32205
|
+
var learningStrategyAnswers = learning.learningStrategyAnswers,
|
|
32206
|
+
answer = learning.answer;
|
|
32207
|
+
var answers = (answer === null || answer === void 0 ? void 0 : answer.split(";")) || [];
|
|
32208
|
+
var answerConverted = answers.map(function (a) {
|
|
32209
|
+
var questionAnswer = a.split("|");
|
|
32210
|
+
var learningAnswer = questionAnswer.length ? learningStrategyAnswers.find(function (i) {
|
|
32211
|
+
return "" + i.id == (questionAnswer === null || questionAnswer === void 0 ? void 0 : questionAnswer[0]);
|
|
32212
|
+
}) : null;
|
|
32213
|
+
var questionText = learningAnswer ? "" + learningAnswer.text + (learningAnswer.questionText ? "/" + learningAnswer : '') : '';
|
|
32214
|
+
var ans = questionAnswer.length > 1 ? questionAnswer === null || questionAnswer === void 0 ? void 0 : questionAnswer[1] : "";
|
|
32215
|
+
return questionText ? "\n" + studentName + ", " + studentEmail + ", " + escapeCell(questionText) + ", " + escapeCell(ans) + ", " + teacherName + ", " + startTime : '';
|
|
32216
|
+
});
|
|
32217
|
+
return answerConverted.join('');
|
|
32218
|
+
});
|
|
32219
|
+
return "" + questionsContent.join('') + learningStrategyQuestionsContent.join('');
|
|
32220
|
+
}).join('');
|
|
32221
|
+
return "" + CSV_PREFIX + headers + encodeURIComponent(content);
|
|
32222
|
+
};
|
|
32223
|
+
|
|
32224
|
+
var htmlToText = function htmlToText(html) {
|
|
32225
|
+
return html.replace(/<[^>]+>/g, '');
|
|
32226
|
+
};
|
|
32227
|
+
|
|
32228
|
+
var escapeCell = function escapeCell(value) {
|
|
32229
|
+
if (!value) return "";
|
|
32230
|
+
return "\"" + value.replace(/"/g, '""').replaceAll("\n", " ") + "\"";
|
|
32231
|
+
};
|
|
32232
|
+
|
|
32233
|
+
return {
|
|
32234
|
+
exportSessionsCsv: exportSessionsCsv
|
|
32235
|
+
};
|
|
32236
|
+
};
|
|
32237
|
+
|
|
32146
32238
|
var Dashboard = function Dashboard() {
|
|
32147
32239
|
var _useChartDatas = useChartDatas(),
|
|
32148
32240
|
user = _useChartDatas.user,
|
|
@@ -32181,6 +32273,9 @@ var Dashboard = function Dashboard() {
|
|
|
32181
32273
|
teacherUserId = _useBehavior.teacherUserId,
|
|
32182
32274
|
changeCurrentTeacherUserId = _useBehavior.changeCurrentTeacherUserId;
|
|
32183
32275
|
|
|
32276
|
+
var _useExportSessionCsv = useExportSessionCsv(),
|
|
32277
|
+
exportSessionsCsv = _useExportSessionCsv.exportSessionsCsv;
|
|
32278
|
+
|
|
32184
32279
|
var _useTranslation = useTranslation(),
|
|
32185
32280
|
t = _useTranslation.t;
|
|
32186
32281
|
|
|
@@ -32270,7 +32365,21 @@ var Dashboard = function Dashboard() {
|
|
|
32270
32365
|
className: "mx-2",
|
|
32271
32366
|
src: "images/waving-hand.png",
|
|
32272
32367
|
alt: ""
|
|
32273
|
-
})), React.createElement("
|
|
32368
|
+
})), React.createElement("div", {
|
|
32369
|
+
className: "d-flex"
|
|
32370
|
+
}, React.createElement("button", {
|
|
32371
|
+
className: styles$1["button-export"] + " d-flex align-items-center border-0 p-0 mr-2",
|
|
32372
|
+
onClick: function onClick() {
|
|
32373
|
+
return exportSessionsCsv(filter);
|
|
32374
|
+
}
|
|
32375
|
+
}, React.createElement("div", {
|
|
32376
|
+
className: "" + styles$1["button-icon"]
|
|
32377
|
+
}, React.createElement("img", {
|
|
32378
|
+
src: "images/export-icon.svg",
|
|
32379
|
+
alt: ""
|
|
32380
|
+
})), React.createElement("p", {
|
|
32381
|
+
className: styles$1["button-content"] + " mb-0"
|
|
32382
|
+
}, "Export to CSV")), React.createElement("button", {
|
|
32274
32383
|
className: styles$1["button-export"] + " d-flex align-items-center border-0 p-0",
|
|
32275
32384
|
onClick: toggle
|
|
32276
32385
|
}, React.createElement("div", {
|
|
@@ -32280,7 +32389,7 @@ var Dashboard = function Dashboard() {
|
|
|
32280
32389
|
alt: ""
|
|
32281
32390
|
})), React.createElement("p", {
|
|
32282
32391
|
className: styles$1["button-content"] + " mb-0"
|
|
32283
|
-
}, t("export_to_pdf")))), React.createElement("div", {
|
|
32392
|
+
}, t("export_to_pdf"))))), React.createElement("div", {
|
|
32284
32393
|
className: styles$1['filter-mobile-block'] + " p-3 my-4"
|
|
32285
32394
|
}, React.createElement("div", {
|
|
32286
32395
|
onClick: function onClick() {
|