mario-education 2.3.4 → 2.4.0
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/containers/CSVImport/hooks/useCSVImport.d.ts +1 -0
- package/dist/MarioFramework.Education/ClientApp/src/containers/LearningStrategy/hooks/useStrategyDetail.d.ts +1 -0
- package/dist/containers/Assessment/components/AssessmentDetailModal.d.ts +3 -0
- package/dist/containers/Assessment/hooks/useAssessmentDetail.d.ts +17 -0
- package/dist/containers/Assessment/hooks/useAssessmentList.d.ts +9 -0
- package/dist/containers/Assessment/views/AssessmentAssignment.d.ts +3 -0
- package/dist/containers/Assessment/views/AssessmentList.d.ts +3 -0
- package/dist/containers/Badge/components/BadgeDetailModal.d.ts +3 -0
- package/dist/containers/Badge/hooks/useBadgeDetail.d.ts +14 -0
- package/dist/containers/Badge/hooks/useBadgeList.d.ts +9 -0
- package/dist/containers/Badge/views/BadgeList.d.ts +3 -0
- package/dist/containers/Classes/components/ClassDetailModal.d.ts +3 -0
- package/dist/containers/Classes/hooks/useClassDetail.d.ts +12 -0
- package/dist/containers/Classes/hooks/useClassList.d.ts +9 -0
- package/dist/containers/Classes/views/ClassList.d.ts +3 -0
- package/dist/containers/ConferenceRubric/components/CellList.d.ts +10 -0
- package/dist/containers/ConferenceRubric/components/ColumnList.d.ts +11 -0
- package/dist/containers/ConferenceRubric/components/RowList.d.ts +11 -0
- package/dist/containers/ConferenceRubric/configs/conferenceRubricDetailSchema.d.ts +8 -0
- package/dist/containers/ConferenceRubric/hooks/useConferenceRubricDetail.d.ts +48 -0
- package/dist/containers/ConferenceRubric/hooks/useConferenceRubricList.d.ts +10 -0
- package/dist/containers/ConferenceRubric/views/ConferenceRubricDetail.d.ts +3 -0
- package/dist/containers/ConferenceRubric/views/ConferenceRubricList.d.ts +3 -0
- package/dist/containers/Feedback/components/FeedbackDetailModal.d.ts +3 -0
- package/dist/containers/Feedback/hooks/useFeedbackDetail.d.ts +12 -0
- package/dist/containers/Feedback/hooks/useFeedbackList.d.ts +8 -0
- package/dist/containers/Feedback/views/FeedbackList.d.ts +3 -0
- package/dist/containers/GoalExample/components/GoalExampleDetailModal.d.ts +3 -0
- package/dist/containers/GoalExample/hooks/useGoalExampleDetail.d.ts +13 -0
- package/dist/containers/GoalExample/hooks/useGoalExampleList.d.ts +9 -0
- package/dist/containers/GoalExample/views/GoalExampleList.d.ts +3 -0
- package/dist/containers/LearningStrategy/components/StrategyDetailModal.d.ts +3 -0
- package/dist/containers/LearningStrategy/hooks/useLearningStrategyList.d.ts +9 -0
- package/dist/containers/LearningStrategy/hooks/useStrategyDetail.d.ts +13 -0
- package/dist/containers/LearningStrategy/views/LearningStrategyList.d.ts +3 -0
- package/dist/containers/ManageAssistant/views/ManageAssistantList.d.ts +3 -0
- package/dist/containers/QuestionBank/components/AdditionalComponent.d.ts +7 -0
- package/dist/containers/QuestionBank/components/AgGridComponents.d.ts +9 -0
- package/dist/containers/QuestionBank/components/AnswerList.d.ts +8 -0
- package/dist/containers/QuestionBank/components/QuestionPreview.d.ts +3 -0
- package/dist/containers/QuestionBank/components/SliderScale.d.ts +8 -0
- package/dist/containers/QuestionBank/components/StarRating.d.ts +7 -0
- package/dist/containers/QuestionBank/configs/questionDetailSchema.d.ts +21 -0
- package/dist/containers/QuestionBank/configs/validationAnswerId.d.ts +2 -0
- package/dist/containers/QuestionBank/configs/validationChoices.d.ts +2 -0
- package/dist/containers/QuestionBank/hooks/useQuestionAnswerList.d.ts +7 -0
- package/dist/containers/QuestionBank/hooks/useQuestionDetail.d.ts +23 -0
- package/dist/containers/QuestionBank/hooks/useQuestionList.d.ts +12 -0
- package/dist/containers/QuestionBank/views/QuestionBankList.d.ts +3 -0
- package/dist/containers/QuestionBank/views/QuestionDetail.d.ts +3 -0
- package/dist/containers/QuestionCategory/components/QuestionCateModal.d.ts +3 -0
- package/dist/containers/QuestionCategory/hooks/useQuestionCateDetail.d.ts +13 -0
- package/dist/containers/QuestionCategory/hooks/useQuestionCateList.d.ts +9 -0
- package/dist/containers/QuestionCategory/views/QuestionCategogyList.d.ts +3 -0
- package/dist/containers/ReflectionForm/components/QuestionSplitPaneSelector.d.ts +3 -0
- package/dist/containers/ReflectionForm/components/ReflectionDetailModal.d.ts +3 -0
- package/dist/containers/ReflectionForm/hooks/useQuestionCategory.d.ts +13 -0
- package/dist/containers/ReflectionForm/hooks/useReflectionFormDetail.d.ts +16 -0
- package/dist/containers/ReflectionForm/hooks/useReflectionFormList.d.ts +9 -0
- package/dist/containers/ReflectionForm/views/ReflectionFormList.d.ts +3 -0
- package/dist/containers/Setup/views/SetupContainer.d.ts +3 -0
- package/dist/containers/Subject/components/SubjectDetailModal.d.ts +3 -0
- package/dist/containers/Subject/hooks/useSubjectDetail.d.ts +13 -0
- package/dist/containers/Subject/hooks/useSubjectList.d.ts +9 -0
- package/dist/containers/Subject/views/SubjectList.d.ts +3 -0
- package/dist/containers/SuggestionBank/components/SuggestionDetailModal.d.ts +3 -0
- package/dist/containers/SuggestionBank/hooks/useKeywordList.d.ts +10 -0
- package/dist/containers/SuggestionBank/hooks/useSuggestionDetail.d.ts +24 -0
- package/dist/containers/SuggestionBank/hooks/useSuggestionList.d.ts +10 -0
- package/dist/containers/SuggestionBank/views/SuggestionList.d.ts +3 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +89 -36
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +89 -36
- package/dist/index.modern.js.map +1 -1
- package/dist/index.test.d.ts +1 -0
- package/dist/services/assessmentService.d.ts +6 -0
- package/dist/services/badgeService.d.ts +6 -0
- package/dist/services/classService.d.ts +6 -0
- package/dist/services/conferenceRubricService.d.ts +7 -0
- package/dist/services/feedbackService.d.ts +6 -0
- package/dist/services/goalExampleService.d.ts +6 -0
- package/dist/services/learningStrategyService.d.ts +6 -0
- package/dist/services/questionCategoryService.d.ts +6 -0
- package/dist/services/questionService.d.ts +6 -0
- package/dist/services/reflectionFormService.d.ts +6 -0
- package/dist/services/studentService.d.ts +2 -0
- package/dist/services/subjectService.d.ts +6 -0
- package/dist/services/suggestionService.d.ts +6 -0
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -2745,8 +2745,9 @@ var StrategyDetailModal = function StrategyDetailModal(props, ref) {
|
|
|
2745
2745
|
}), touched.name && errors.name && React.createElement(ErrorHandler, {
|
|
2746
2746
|
text: errors.name
|
|
2747
2747
|
})), React.createElement(Col, {
|
|
2748
|
-
md: 12
|
|
2749
|
-
|
|
2748
|
+
md: 12,
|
|
2749
|
+
className: "mb-2"
|
|
2750
|
+
}, React.createElement(Label, null, "Detail"), React.createElement(Input, {
|
|
2750
2751
|
type: "textarea",
|
|
2751
2752
|
rows: 5,
|
|
2752
2753
|
name: "description",
|
|
@@ -2757,6 +2758,19 @@ var StrategyDetailModal = function StrategyDetailModal(props, ref) {
|
|
|
2757
2758
|
setEditedTrue();
|
|
2758
2759
|
},
|
|
2759
2760
|
onBlur: handleBlur("description")
|
|
2761
|
+
})), React.createElement(Col, {
|
|
2762
|
+
md: 12
|
|
2763
|
+
}, React.createElement(Label, null, "Best fit"), React.createElement(Input, {
|
|
2764
|
+
type: "textarea",
|
|
2765
|
+
rows: 5,
|
|
2766
|
+
name: "bestfit",
|
|
2767
|
+
placeholder: "Best fit",
|
|
2768
|
+
value: values.bestfit,
|
|
2769
|
+
onChange: function onChange(e) {
|
|
2770
|
+
handleChange(e);
|
|
2771
|
+
setEditedTrue();
|
|
2772
|
+
},
|
|
2773
|
+
onBlur: handleBlur("bestfit")
|
|
2760
2774
|
}))));
|
|
2761
2775
|
});
|
|
2762
2776
|
};
|
|
@@ -2882,7 +2896,8 @@ var useStrategyList = function useStrategyList() {
|
|
|
2882
2896
|
|
|
2883
2897
|
var initValue$3 = {
|
|
2884
2898
|
name: "",
|
|
2885
|
-
description: ""
|
|
2899
|
+
description: "",
|
|
2900
|
+
bestfit: ""
|
|
2886
2901
|
};
|
|
2887
2902
|
|
|
2888
2903
|
var useStrategyDetail = function useStrategyDetail() {
|
|
@@ -3088,7 +3103,7 @@ var LearningStrategyList = function LearningStrategyList() {
|
|
|
3088
3103
|
className: "align-top"
|
|
3089
3104
|
}, "Strategy name"), React.createElement("th", {
|
|
3090
3105
|
className: "align-top"
|
|
3091
|
-
}, "
|
|
3106
|
+
}, "Detail"), React.createElement("th", {
|
|
3092
3107
|
className: "text-center"
|
|
3093
3108
|
}, "Action"))), React.createElement("tbody", null, strategyList.map(function (record) {
|
|
3094
3109
|
return React.createElement("tr", {
|
|
@@ -5207,6 +5222,9 @@ var UploadCSVButton = function UploadCSVButton(_ref) {
|
|
|
5207
5222
|
|
|
5208
5223
|
var CSV_FILE_URL = BASE_URL + "/api/ImportCsv/csv";
|
|
5209
5224
|
var CSV_FILE_TEACHER = BASE_URL + "/api/Teacher";
|
|
5225
|
+
var importCSV = function importCSV(formData, subFolder) {
|
|
5226
|
+
return apiUpload.post(CSV_FILE_URL + "/" + subFolder, formData);
|
|
5227
|
+
};
|
|
5210
5228
|
var importStudentCSV = function importStudentCSV(formData) {
|
|
5211
5229
|
return apiUpload.post(CSV_FILE_TEACHER + "/adminImportStudent", formData);
|
|
5212
5230
|
};
|
|
@@ -5226,9 +5244,9 @@ var CSVType;
|
|
|
5226
5244
|
})(CSVType || (CSVType = {}));
|
|
5227
5245
|
|
|
5228
5246
|
var buttons = [{
|
|
5229
|
-
text: "Import
|
|
5230
|
-
backgroundColor: "#
|
|
5231
|
-
type: CSVType.
|
|
5247
|
+
text: "Import class reflections",
|
|
5248
|
+
backgroundColor: "#e74c3c",
|
|
5249
|
+
type: CSVType.ClassReflection
|
|
5232
5250
|
}];
|
|
5233
5251
|
var title = "CSV Import";
|
|
5234
5252
|
var id = "csvupload";
|
|
@@ -5261,15 +5279,19 @@ var useCSVImport = function useCSVImport() {
|
|
|
5261
5279
|
initImportReflection = _useState4[0],
|
|
5262
5280
|
setInitImportReflection = _useState4[1];
|
|
5263
5281
|
|
|
5282
|
+
var domainName = window.location.hostname;
|
|
5283
|
+
var isCheckDomainIBS = domainName.includes('isb');
|
|
5264
5284
|
useEffect(function () {
|
|
5265
5285
|
document.title = title;
|
|
5266
5286
|
}, []);
|
|
5267
5287
|
var upload = useCallback(function (file) {
|
|
5268
5288
|
try {
|
|
5269
|
-
var
|
|
5289
|
+
var _temp8 = function _temp8() {
|
|
5270
5290
|
dispatch(setLoading(false));
|
|
5291
|
+
var inputId = document.getElementById(id);
|
|
5271
5292
|
var input = document.getElementById('import-student');
|
|
5272
5293
|
var importClass = document.getElementById('import-classReflection');
|
|
5294
|
+
inputId && (inputId.value = "");
|
|
5273
5295
|
input && (input.value = "");
|
|
5274
5296
|
importClass && (importClass.value = "");
|
|
5275
5297
|
};
|
|
@@ -5277,34 +5299,42 @@ var useCSVImport = function useCSVImport() {
|
|
|
5277
5299
|
if (!type || !file) return Promise.resolve();
|
|
5278
5300
|
dispatch(setLoading(true));
|
|
5279
5301
|
|
|
5280
|
-
var
|
|
5281
|
-
function
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
}));
|
|
5287
|
-
}
|
|
5288
|
-
|
|
5289
|
-
var _temp = function () {
|
|
5290
|
-
if (type == CSVType.ClassReflection) {
|
|
5291
|
-
return Promise.resolve(importClassReflectionCSV(formData)).then(function () {});
|
|
5292
|
-
}
|
|
5293
|
-
}();
|
|
5294
|
-
|
|
5295
|
-
return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
|
|
5302
|
+
var _temp9 = _catch(function () {
|
|
5303
|
+
function _temp5() {
|
|
5304
|
+
dispatch(setAlert({
|
|
5305
|
+
type: "success",
|
|
5306
|
+
message: "Import CSV successfully"
|
|
5307
|
+
}));
|
|
5296
5308
|
}
|
|
5297
5309
|
|
|
5298
5310
|
var formData = new FormData();
|
|
5299
5311
|
formData.append("file", file, file.name);
|
|
5300
5312
|
|
|
5301
|
-
var
|
|
5302
|
-
if (
|
|
5303
|
-
|
|
5313
|
+
var _temp4 = function () {
|
|
5314
|
+
if (isCheckDomainIBS) {
|
|
5315
|
+
var _temp10 = function _temp10() {
|
|
5316
|
+
var _temp = function () {
|
|
5317
|
+
if (type == CSVType.ClassReflection) {
|
|
5318
|
+
return Promise.resolve(importClassReflectionCSV(formData)).then(function () {});
|
|
5319
|
+
}
|
|
5320
|
+
}();
|
|
5321
|
+
|
|
5322
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
5323
|
+
};
|
|
5324
|
+
|
|
5325
|
+
var _temp11 = function () {
|
|
5326
|
+
if (type == CSVType.Students) {
|
|
5327
|
+
return Promise.resolve(importStudentCSV(formData)).then(function () {});
|
|
5328
|
+
}
|
|
5329
|
+
}();
|
|
5330
|
+
|
|
5331
|
+
return _temp11 && _temp11.then ? _temp11.then(_temp10) : _temp10(_temp11);
|
|
5332
|
+
} else {
|
|
5333
|
+
return Promise.resolve(importCSV(formData, type.toString())).then(function () {});
|
|
5304
5334
|
}
|
|
5305
5335
|
}();
|
|
5306
5336
|
|
|
5307
|
-
return
|
|
5337
|
+
return _temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4);
|
|
5308
5338
|
}, function (err) {
|
|
5309
5339
|
var _err$response, _err$response$data;
|
|
5310
5340
|
|
|
@@ -5314,7 +5344,7 @@ var useCSVImport = function useCSVImport() {
|
|
|
5314
5344
|
}));
|
|
5315
5345
|
});
|
|
5316
5346
|
|
|
5317
|
-
return Promise.resolve(
|
|
5347
|
+
return Promise.resolve(_temp9 && _temp9.then ? _temp9.then(_temp8) : _temp8(_temp9));
|
|
5318
5348
|
} catch (e) {
|
|
5319
5349
|
return Promise.reject(e);
|
|
5320
5350
|
}
|
|
@@ -5322,7 +5352,7 @@ var useCSVImport = function useCSVImport() {
|
|
|
5322
5352
|
|
|
5323
5353
|
var onConfirm = function onConfirm(values) {
|
|
5324
5354
|
try {
|
|
5325
|
-
var
|
|
5355
|
+
var _temp14 = function _temp14() {
|
|
5326
5356
|
dispatch(setLoading(false));
|
|
5327
5357
|
var input = document.getElementById(id);
|
|
5328
5358
|
input && (input.value = "");
|
|
@@ -5331,7 +5361,7 @@ var useCSVImport = function useCSVImport() {
|
|
|
5331
5361
|
if (!dataFile || !dataFile) return Promise.resolve();
|
|
5332
5362
|
dispatch(setLoading(true));
|
|
5333
5363
|
|
|
5334
|
-
var
|
|
5364
|
+
var _temp15 = _catch(function () {
|
|
5335
5365
|
var formData = new FormData();
|
|
5336
5366
|
formData.append("file", dataFile, dataFile.name);
|
|
5337
5367
|
formData.append("teacherName", values.teacherName);
|
|
@@ -5355,7 +5385,7 @@ var useCSVImport = function useCSVImport() {
|
|
|
5355
5385
|
}));
|
|
5356
5386
|
});
|
|
5357
5387
|
|
|
5358
|
-
return Promise.resolve(
|
|
5388
|
+
return Promise.resolve(_temp15 && _temp15.then ? _temp15.then(_temp14) : _temp14(_temp15));
|
|
5359
5389
|
} catch (e) {
|
|
5360
5390
|
return Promise.reject(e);
|
|
5361
5391
|
}
|
|
@@ -5374,7 +5404,8 @@ var useCSVImport = function useCSVImport() {
|
|
|
5374
5404
|
dataFile: dataFile,
|
|
5375
5405
|
setDataFile: setDataFile,
|
|
5376
5406
|
setArrStudent: setArrStudent,
|
|
5377
|
-
arrStudent: arrStudent
|
|
5407
|
+
arrStudent: arrStudent,
|
|
5408
|
+
isCheckDomainIBS: isCheckDomainIBS
|
|
5378
5409
|
};
|
|
5379
5410
|
};
|
|
5380
5411
|
|
|
@@ -5400,11 +5431,12 @@ var CSVImport = function CSVImport() {
|
|
|
5400
5431
|
setDataFile = _useCSVImport.setDataFile,
|
|
5401
5432
|
setArrStudent = _useCSVImport.setArrStudent,
|
|
5402
5433
|
buttons = _useCSVImport.buttons,
|
|
5403
|
-
upload = _useCSVImport.upload
|
|
5434
|
+
upload = _useCSVImport.upload,
|
|
5435
|
+
isCheckDomainIBS = _useCSVImport.isCheckDomainIBS;
|
|
5404
5436
|
|
|
5405
5437
|
return React.createElement("div", {
|
|
5406
5438
|
className: "animated fadeIn pt-3"
|
|
5407
|
-
}, React.createElement(Input, {
|
|
5439
|
+
}, isCheckDomainIBS ? React.createElement(React.Fragment, null, React.createElement(Input, {
|
|
5408
5440
|
className: "d-none",
|
|
5409
5441
|
type: "file",
|
|
5410
5442
|
id: "import-student",
|
|
@@ -5496,7 +5528,28 @@ var CSVImport = function CSVImport() {
|
|
|
5496
5528
|
}
|
|
5497
5529
|
});
|
|
5498
5530
|
})))));
|
|
5499
|
-
})))
|
|
5531
|
+
}))) : React.createElement(React.Fragment, null, React.createElement(Input, {
|
|
5532
|
+
className: "d-none",
|
|
5533
|
+
type: "file",
|
|
5534
|
+
id: id,
|
|
5535
|
+
onChange: function onChange(e) {
|
|
5536
|
+
return upload(e.target.files[0]);
|
|
5537
|
+
},
|
|
5538
|
+
accept: "text/csv"
|
|
5539
|
+
}), React.createElement("div", {
|
|
5540
|
+
className: "d-flex align-items-center"
|
|
5541
|
+
}, buttons.map(function (button) {
|
|
5542
|
+
return React.createElement(UploadCSVButton, {
|
|
5543
|
+
key: button.text,
|
|
5544
|
+
htmlFor: id,
|
|
5545
|
+
text: button.text,
|
|
5546
|
+
isDisabled: isLoading,
|
|
5547
|
+
backgroundColor: button.backgroundColor,
|
|
5548
|
+
onClick: function onClick() {
|
|
5549
|
+
return setType(button.type);
|
|
5550
|
+
}
|
|
5551
|
+
});
|
|
5552
|
+
}))));
|
|
5500
5553
|
};
|
|
5501
5554
|
|
|
5502
5555
|
var schema$5 = object({
|