mario-core 2.9.418-feedback → 2.9.418-release

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.
@@ -2189,7 +2189,6 @@ var save_new_password = "Save new password";
2189
2189
  var teacher_code = "Teacher code";
2190
2190
  var number_of_conversations = "Number of conversations";
2191
2191
  var number_of_expected_conversations_based_on_the_goal = "Number of expected conversations based on the goal";
2192
- var check_in = "Check-in";
2193
2192
  var lang_us = {
2194
2193
  dashboard: dashboard,
2195
2194
  user: user,
@@ -4395,8 +4394,7 @@ var lang_us = {
4395
4394
  save_new_password: save_new_password,
4396
4395
  teacher_code: teacher_code,
4397
4396
  number_of_conversations: number_of_conversations,
4398
- number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal,
4399
- check_in: check_in
4397
+ number_of_expected_conversations_based_on_the_goal: number_of_expected_conversations_based_on_the_goal
4400
4398
  };
4401
4399
 
4402
4400
  var dashboard$1 = "Dashboard";
@@ -4414,7 +4412,7 @@ var cancel$1 = "Cancel";
4414
4412
  var hey$1 = "Hey";
4415
4413
  var readiness_to_learn$1 = "Readiness to Learn";
4416
4414
  var high_impact_learning_strategies$1 = "High Impact Learning Strategies";
4417
- var check_in$1 = "Check In";
4415
+ var check_in = "Check In";
4418
4416
  var check_ins$1 = "Check Ins";
4419
4417
  var reflection$1 = "Reflection";
4420
4418
  var conferences$1 = "Conferences";
@@ -6567,7 +6565,7 @@ var lang_uk = {
6567
6565
  readiness_to_learn: readiness_to_learn$1,
6568
6566
  high_impact_learning_strategies: high_impact_learning_strategies$1,
6569
6567
  "1_to_1": "1 to 1",
6570
- check_in: check_in$1,
6568
+ check_in: check_in,
6571
6569
  check_ins: check_ins$1,
6572
6570
  reflection: reflection$1,
6573
6571
  conferences: conferences$1,
@@ -8771,7 +8769,7 @@ var cancel$2 = "إلغاء";
8771
8769
  var hey$2 = "مرحبًا";
8772
8770
  var readiness_to_learn$2 = "الاستعداد للتعلم";
8773
8771
  var high_impact_learning_strategies$2 = "استراتيجيات التعلم عالية التأثير";
8774
- var check_in$2 = "تسجيل الحضور";
8772
+ var check_in$1 = "تسجيل الحضور";
8775
8773
  var check_ins$2 = "عمليات تسجيل الحضور";
8776
8774
  var reflection$2 = "التفكير";
8777
8775
  var conferences$2 = "اللقاءات";
@@ -10954,7 +10952,7 @@ var lang_ar = {
10954
10952
  readiness_to_learn: readiness_to_learn$2,
10955
10953
  high_impact_learning_strategies: high_impact_learning_strategies$2,
10956
10954
  "1_to_1": "1 إلى 1",
10957
- check_in: check_in$2,
10955
+ check_in: check_in$1,
10958
10956
  check_ins: check_ins$2,
10959
10957
  reflection: reflection$2,
10960
10958
  conferences: conferences$2,
@@ -13190,7 +13188,7 @@ var cancel$3 = "Cancelar";
13190
13188
  var hey$3 = "Hola";
13191
13189
  var readiness_to_learn$3 = "Preparación para el aprendizaje";
13192
13190
  var high_impact_learning_strategies$3 = "Estrategias de aprendizaje de alto impacto";
13193
- var check_in$3 = "Registro";
13191
+ var check_in$2 = "Registro";
13194
13192
  var check_ins$3 = "Registro de entrada";
13195
13193
  var reflection$3 = "Reflexión";
13196
13194
  var conferences$3 = "Conferencias";
@@ -15373,7 +15371,7 @@ var lang_es = {
15373
15371
  readiness_to_learn: readiness_to_learn$3,
15374
15372
  high_impact_learning_strategies: high_impact_learning_strategies$3,
15375
15373
  "1_to_1": "1 a 1",
15376
- check_in: check_in$3,
15374
+ check_in: check_in$2,
15377
15375
  check_ins: check_ins$3,
15378
15376
  reflection: reflection$3,
15379
15377
  conferences: conferences$3,
@@ -17609,7 +17607,7 @@ var cancel$4 = "取消";
17609
17607
  var hey$4 = "您好";
17610
17608
  var readiness_to_learn$4 = "准备学习";
17611
17609
  var high_impact_learning_strategies$4 = "高效学习策略";
17612
- var check_in$4 = "签到";
17610
+ var check_in$3 = "签到";
17613
17611
  var check_ins$4 = "签到";
17614
17612
  var reflection$4 = "反思";
17615
17613
  var conferences$4 = "讨论会";
@@ -19792,7 +19790,7 @@ var lang_zh = {
19792
19790
  readiness_to_learn: readiness_to_learn$4,
19793
19791
  high_impact_learning_strategies: high_impact_learning_strategies$4,
19794
19792
  "1_to_1": "一对一",
19795
- check_in: check_in$4,
19793
+ check_in: check_in$3,
19796
19794
  check_ins: check_ins$4,
19797
19795
  reflection: reflection$4,
19798
19796
  conferences: conferences$4,
@@ -22177,7 +22175,9 @@ var CsvImportType;
22177
22175
 
22178
22176
  var domainName = window.location.hostname;
22179
22177
  var listCheckMalvernCollege = ['malverncollege', 'stage', 'localhost'];
22180
- var isMalvernCollege = listCheckMalvernCollege.includes(domainName);
22178
+ var isMalvernCollege = listCheckMalvernCollege.some(function (e) {
22179
+ return domainName.includes(e);
22180
+ });
22181
22181
 
22182
22182
  var resources$5 = {
22183
22183
  "en-US": {
@@ -39662,7 +39662,7 @@ var BlockLogin = function BlockLogin(_ref) {
39662
39662
 
39663
39663
  var onSuccessGoogle = function onSuccessGoogle(res) {
39664
39664
  if (!!(res !== null && res !== void 0 && res.accessToken)) {
39665
- var _hostName$split, _email$split;
39665
+ var _hostName$split, _email$split, _extensionEmail$split, _extensionEmail$split2;
39666
39666
 
39667
39667
  var _res$profileObj = res.profileObj,
39668
39668
  email = _res$profileObj.email,
@@ -39675,8 +39675,15 @@ var BlockLogin = function BlockLogin(_ref) {
39675
39675
  var hostName = window.location.hostname;
39676
39676
  var subDomain = (_hostName$split = hostName.split(".marioforme.com")) === null || _hostName$split === void 0 ? void 0 : _hostName$split[0];
39677
39677
  var emailDomain = (_email$split = email.split("@")) === null || _email$split === void 0 ? void 0 : _email$split[1];
39678
+ var matchExtension = extensionEmail === null || extensionEmail === void 0 ? void 0 : (_extensionEmail$split = extensionEmail.split(",")) === null || _extensionEmail$split === void 0 ? void 0 : (_extensionEmail$split2 = _extensionEmail$split.map(function (x) {
39679
+ return x.trim();
39680
+ })) === null || _extensionEmail$split2 === void 0 ? void 0 : _extensionEmail$split2.filter(function (x) {
39681
+ return x;
39682
+ }).some(function (ext) {
39683
+ return emailDomain.includes(ext);
39684
+ });
39678
39685
 
39679
- if (!emailDomain.includes(subDomain) && !emailDomain.includes(extensionEmail)) {
39686
+ if (!emailDomain.includes(subDomain) && !matchExtension) {
39680
39687
  alert("The email address you used does not match the login information in the database. Please check that you are using your school assigned email address to log into MARIO for Me. If you have further trouble please notify your school site administrator");
39681
39688
  return;
39682
39689
  }
@@ -41319,14 +41326,7 @@ var BlockCreatePassword = function BlockCreatePassword() {
41319
41326
  className: "" + styles["img-login-rectangle"]
41320
41327
  }), React.createElement("p", {
41321
41328
  className: "" + styles["title-login"]
41322
- }, "You cannot regenerate the password")))), React.createElement(Col, {
41323
- lg: 4,
41324
- md: 4,
41325
- className: "" + styles["img-box"]
41326
- }, React.createElement("img", {
41327
- src: "/images/img-login.png",
41328
- className: "" + styles["img-login"]
41329
- })));
41329
+ }, "You cannot regenerate the password")))));
41330
41330
  });
41331
41331
  };
41332
41332
 
@@ -46316,9 +46316,6 @@ var importUsersCSV = function importUsersCSV(formData) {
46316
46316
  var downloadTemplateFileUser = function downloadTemplateFileUser() {
46317
46317
  return api.get(CSV_FILE_TEACHER + "/download-template-file-user");
46318
46318
  };
46319
- var validateCsvApi = function validateCsvApi(formData, type) {
46320
- return api.post(CSV_FILE_TEACHER + "/validate-csv-template-student/" + type, formData);
46321
- };
46322
46319
 
46323
46320
  var CSVType;
46324
46321
 
@@ -50115,7 +50112,7 @@ var style$2 = {
50115
50112
  color: "#fff",
50116
50113
  fontWeight: 500,
50117
50114
  fontSize: "14px",
50118
- height: "56px",
50115
+ height: "100%",
50119
50116
  justifyContent: "center"
50120
50117
  };
50121
50118
 
@@ -50214,19 +50211,15 @@ var useCSVImportTab = function useCSVImportTab() {
50214
50211
  studentDataFile = _useState5[0],
50215
50212
  setStudentDataFile = _useState5[1];
50216
50213
 
50217
- var _useState6 = useState([]),
50218
- errorsValidate = _useState6[0],
50219
- setErrorsValidate = _useState6[1];
50220
-
50221
50214
  var isCheckDomainIBS = true;
50222
50215
 
50223
- var _useState7 = useState(0),
50224
- defaultTeacher = _useState7[0],
50225
- setDefaultTeacher = _useState7[1];
50216
+ var _useState6 = useState(0),
50217
+ defaultTeacher = _useState6[0],
50218
+ setDefaultTeacher = _useState6[1];
50226
50219
 
50227
- var _useState8 = useState(""),
50228
- fileName = _useState8[0],
50229
- setFileName = _useState8[1];
50220
+ var _useState7 = useState(""),
50221
+ fileName = _useState7[0],
50222
+ setFileName = _useState7[1];
50230
50223
 
50231
50224
  useEffect(function () {
50232
50225
  document.title = title$5;
@@ -50271,10 +50264,10 @@ var useCSVImportTab = function useCSVImportTab() {
50271
50264
 
50272
50265
  var upload = useCallback(function (file) {
50273
50266
  try {
50274
- var _exit3 = false;
50267
+ var _exit2 = false;
50275
50268
 
50276
- var _temp12 = function _temp12(_result) {
50277
- if (_exit3) return _result;
50269
+ var _temp12 = function _temp12(_result2) {
50270
+ if (_exit2) return _result2;
50278
50271
  dispatch(setLoading(false));
50279
50272
  var inputId = document.getElementById(id$1);
50280
50273
  var input = document.getElementById('import-student');
@@ -50288,114 +50281,103 @@ var useCSVImportTab = function useCSVImportTab() {
50288
50281
  dispatch(setLoading(true));
50289
50282
 
50290
50283
  var _temp13 = _catch(function () {
50284
+ function _temp9(_result) {
50285
+ if (_exit2) return _result;
50286
+ dispatch(setAlert({
50287
+ type: "success",
50288
+ message: "Import CSV successfully"
50289
+ }));
50290
+ }
50291
+
50291
50292
  var formData = new FormData();
50292
50293
  formData.append("file", file, file.name);
50293
- var typeOfCsv = type === CSVType$1.AllUser ? CsvImportType.Admin : CsvImportType.Teacher;
50294
- return Promise.resolve(validateCsvApi(formData, typeOfCsv)).then(function (res) {
50295
- var _exit2 = false;
50296
-
50297
- function _temp9(_result2) {
50298
- if (_exit2) return _result2;
50299
- dispatch(setAlert({
50300
- type: "success",
50301
- message: "Import CSV successfully"
50302
- }));
50303
- }
50304
50294
 
50305
- if (res.data && res.data.length > 0) {
50306
- setErrorsValidate(res.data);
50307
- dispatch(setLoading(false));
50308
- _exit3 = true;
50309
- return;
50310
- }
50311
-
50312
- var _temp8 = function () {
50313
- if (type == CSVType$1.AllUser) {
50314
- return Promise.resolve(file.text()).then(function (fileTextRaw) {
50315
- var fileText = fileTextRaw.trim();
50316
- var rows = fileText.split("\n").map(function (row) {
50317
- return row.trim();
50318
- });
50319
- var headerIndex = rows.findIndex(function (row) {
50320
- return row.split(",").includes("First Name");
50321
- });
50295
+ var _temp8 = function () {
50296
+ if (type == CSVType$1.AllUser) {
50297
+ return Promise.resolve(file.text()).then(function (fileTextRaw) {
50298
+ var fileText = fileTextRaw.trim();
50299
+ var rows = fileText.split("\n").map(function (row) {
50300
+ return row.trim();
50301
+ });
50302
+ var headerIndex = rows.findIndex(function (row) {
50303
+ return row.split(",").includes("First Name");
50304
+ });
50322
50305
 
50323
- if (headerIndex === 0) {
50324
- throw new Error("Invalid CSV: Missing header row.");
50325
- }
50306
+ if (headerIndex === 0) {
50307
+ throw new Error("Invalid CSV: Missing header row.");
50308
+ }
50326
50309
 
50327
- fileText = rows.slice(headerIndex).join("\n");
50328
- var parsedData = Papa.parse(fileText, {
50329
- header: true,
50330
- skipEmptyLines: true
50331
- });
50332
- var header = parsedData.meta.fields;
50333
- var dataRows = parsedData.data;
50310
+ fileText = rows.slice(headerIndex).join("\n");
50311
+ var parsedData = Papa.parse(fileText, {
50312
+ header: true,
50313
+ skipEmptyLines: true
50314
+ });
50315
+ var header = parsedData.meta.fields;
50316
+ var dataRows = parsedData.data;
50334
50317
 
50335
- if (!!!dataRows.length) {
50336
- dispatch(setLoading(false));
50337
- dispatch(setAlert({
50338
- type: "danger",
50339
- message: 'The file has no data or some column names are misformed.'
50340
- }));
50341
- _exit3 = true;
50342
- return;
50343
- }
50318
+ if (!!!dataRows.length) {
50319
+ dispatch(setLoading(false));
50320
+ dispatch(setAlert({
50321
+ type: "danger",
50322
+ message: 'The file has no data or some column names are misformed.'
50323
+ }));
50324
+ _exit2 = true;
50325
+ return;
50326
+ }
50344
50327
 
50345
- var chunkSize = 10;
50346
- var chunks = [];
50328
+ var chunkSize = 10;
50329
+ var chunks = [];
50347
50330
 
50348
- for (var _i = 0; _i < dataRows.length; _i += chunkSize) {
50349
- var chunkData = dataRows.slice(_i, _i + chunkSize);
50350
- var valuesOnly = chunkData.map(function (row) {
50351
- return Object.values(row).map(function (v) {
50352
- return (v != null ? v : "").toString().trim();
50353
- });
50331
+ for (var _i = 0; _i < dataRows.length; _i += chunkSize) {
50332
+ var chunkData = dataRows.slice(_i, _i + chunkSize);
50333
+ var valuesOnly = chunkData.map(function (row) {
50334
+ return Object.values(row).map(function (v) {
50335
+ return (v != null ? v : "").toString().trim();
50354
50336
  });
50337
+ });
50355
50338
 
50356
- if (header) {
50357
- valuesOnly.unshift(header);
50358
- }
50359
-
50360
- console.log({
50361
- valuesOnly: valuesOnly
50362
- });
50363
- chunks.push(valuesOnly);
50339
+ if (header) {
50340
+ valuesOnly.unshift(header);
50364
50341
  }
50365
50342
 
50366
- var _temp5 = _forTo(chunks, function (i) {
50367
- return Promise.resolve(importChunkFileUsers({
50368
- chunks: chunks[i]
50369
- })).then(function () {
50370
- return Promise.resolve(new Promise(function (res) {
50371
- return setTimeout(res, 500);
50372
- })).then(function () {});
50373
- });
50343
+ console.log({
50344
+ valuesOnly: valuesOnly
50374
50345
  });
50346
+ chunks.push(valuesOnly);
50347
+ }
50375
50348
 
50376
- if (_temp5 && _temp5.then) return _temp5.then(function () {});
50349
+ var _temp5 = _forTo(chunks, function (i) {
50350
+ return Promise.resolve(importChunkFileUsers({
50351
+ chunks: chunks[i]
50352
+ })).then(function () {
50353
+ return Promise.resolve(new Promise(function (res) {
50354
+ return setTimeout(res, 500);
50355
+ })).then(function () {});
50356
+ });
50377
50357
  });
50378
- } else {
50379
- var _temp14 = function () {
50380
- if (isCheckDomainIBS) {
50381
- var _temp15 = function () {
50382
- if (type == CSVType$1.ClassReflection) {
50383
- return Promise.resolve(importClassReflectionCSV$1(formData)).then(function () {});
50384
- }
50385
- }();
50386
-
50387
- if (_temp15 && _temp15.then) return _temp15.then(function () {});
50388
- } else {
50389
- return Promise.resolve(importCSV$1(formData, type.toString())).then(function () {});
50390
- }
50391
- }();
50392
50358
 
50393
- if (_temp14 && _temp14.then) return _temp14.then(function () {});
50394
- }
50395
- }();
50359
+ if (_temp5 && _temp5.then) return _temp5.then(function () {});
50360
+ });
50361
+ } else {
50362
+ var _temp14 = function () {
50363
+ if (isCheckDomainIBS) {
50364
+ var _temp15 = function () {
50365
+ if (type == CSVType$1.ClassReflection) {
50366
+ return Promise.resolve(importClassReflectionCSV$1(formData)).then(function () {});
50367
+ }
50368
+ }();
50396
50369
 
50397
- return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
50398
- });
50370
+ if (_temp15 && _temp15.then) return _temp15.then(function () {});
50371
+ } else {
50372
+ return Promise.resolve(importCSV$1(formData, type.toString())).then(function () {});
50373
+ }
50374
+ }();
50375
+
50376
+ if (_temp14 && _temp14.then) return _temp14.then(function () {});
50377
+ }
50378
+ }();
50379
+
50380
+ return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
50399
50381
  }, function (err) {
50400
50382
  var _err$response, _err$response$data;
50401
50383
 
@@ -50550,9 +50532,7 @@ var useCSVImportTab = function useCSVImportTab() {
50550
50532
  defaultTeacher: defaultTeacher,
50551
50533
  fileName: fileName,
50552
50534
  onStudentSubmit: onStudentSubmit,
50553
- downloadTemplateUser: downloadTemplateUser,
50554
- errorsValidate: errorsValidate,
50555
- setErrorsValidate: setErrorsValidate
50535
+ downloadTemplateUser: downloadTemplateUser
50556
50536
  };
50557
50537
  };
50558
50538
 
@@ -50579,8 +50559,7 @@ var CSVImport = function CSVImport() {
50579
50559
  setArrStudent = _useCSVImportTab.setArrStudent,
50580
50560
  buttons = _useCSVImportTab.buttons,
50581
50561
  upload = _useCSVImportTab.upload,
50582
- downloadTemplateUser = _useCSVImportTab.downloadTemplateUser,
50583
- errorsValidate = _useCSVImportTab.errorsValidate;
50562
+ downloadTemplateUser = _useCSVImportTab.downloadTemplateUser;
50584
50563
 
50585
50564
  var _useTranslation = useTranslation(),
50586
50565
  t = _useTranslation.t;
@@ -50633,9 +50612,9 @@ var CSVImport = function CSVImport() {
50633
50612
  accept: "text/csv"
50634
50613
  }), React.createElement(Col, {
50635
50614
  md: 6,
50636
- className: "mb-2 d-flex mt-5"
50615
+ className: "mb-2 d-flex align-items-end"
50637
50616
  }, React.createElement(Row, {
50638
- className: "w-100 flex-column"
50617
+ className: "w-100"
50639
50618
  }, React.createElement(Col, {
50640
50619
  md: 12,
50641
50620
  className: ""
@@ -50664,9 +50643,7 @@ var CSVImport = function CSVImport() {
50664
50643
  })))), React.createElement(Col, {
50665
50644
  md: 6,
50666
50645
  className: "mb-2"
50667
- }, React.createElement(Row, {
50668
- className: "flex-column"
50669
- }, React.createElement(Col, {
50646
+ }, React.createElement(Row, null, React.createElement(Col, {
50670
50647
  md: 12,
50671
50648
  className: "mb-2 text-right"
50672
50649
  }, React.createElement(Button, {
@@ -50696,12 +50673,7 @@ var CSVImport = function CSVImport() {
50696
50673
  return setType(button.type);
50697
50674
  }
50698
50675
  });
50699
- })), (errorsValidate === null || errorsValidate === void 0 ? void 0 : errorsValidate.length) > 0 && errorsValidate.map(function (error, index) {
50700
- return React.createElement(ErrorHandler, {
50701
- key: index,
50702
- text: error
50703
- });
50704
- }))));
50676
+ })))));
50705
50677
  }))) );
50706
50678
  };
50707
50679