mario-core 2.9.244-release → 2.9.245-multi

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/index.js CHANGED
@@ -43633,32 +43633,12 @@ var TeacherSelector = function TeacherSelector(_ref) {
43633
43633
  var options = _ref.options,
43634
43634
  isDisabled = _ref.isDisabled,
43635
43635
  scrollBottom = _ref.scrollBottom,
43636
- onCreateOption = _ref.onCreateOption,
43637
43636
  rest = _objectWithoutPropertiesLoose(_ref, ["options", "isDisabled", "scrollBottom", "onCreateOption"]);
43638
43637
 
43639
43638
  var _useState = React.useState(),
43640
43639
  errorMessage = _useState[0],
43641
43640
  setErrorMessage = _useState[1];
43642
43641
 
43643
- var validateEmail = function validateEmail(email) {
43644
- return String(email).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
43645
- };
43646
-
43647
- var handleCreateTeacherOption = function handleCreateTeacherOption(newTeacherEmail) {
43648
- if (!validateEmail(newTeacherEmail)) {
43649
- setErrorMessage("Invalid email format for email: " + newTeacherEmail);
43650
- return;
43651
- } else {
43652
- setErrorMessage(undefined);
43653
- }
43654
-
43655
- var newTeacher = {
43656
- label: newTeacherEmail,
43657
- value: -new Date().getTime()
43658
- };
43659
- onCreateOption === null || onCreateOption === void 0 ? void 0 : onCreateOption(newTeacher);
43660
- };
43661
-
43662
43642
  var handleFocus = function handleFocus() {
43663
43643
  setErrorMessage(undefined);
43664
43644
  };
@@ -43671,7 +43651,6 @@ var TeacherSelector = function TeacherSelector(_ref) {
43671
43651
  isDisabled: isDisabled,
43672
43652
  options: options,
43673
43653
  menuPlacement: scrollBottom ? "top" : "auto",
43674
- onCreateOption: handleCreateTeacherOption,
43675
43654
  onFocus: handleFocus
43676
43655
  }, rest))), !!errorMessage && React__default.createElement("p", {
43677
43656
  className: "text-danger mb-0 mt-1"
@@ -44367,28 +44346,24 @@ var AssignStudentList = function AssignStudentList() {
44367
44346
  var _useTeacherList = useTeacherList(),
44368
44347
  selectedTeachers = _useTeacherList.selectedTeachers,
44369
44348
  teacherOptions = _useTeacherList.teacherOptions,
44370
- handleCreateTeacherOption = _useTeacherList.handleCreateTeacherOption,
44371
44349
  handleSelectTeacher = _useTeacherList.handleSelectTeacher,
44372
44350
  setSelectedTeachers = _useTeacherList.setSelectedTeachers;
44373
44351
 
44374
44352
  var _useAssistantList = useAssistantList(),
44375
44353
  selectedAssistants = _useAssistantList.selectedAssistants,
44376
44354
  assistantOptions = _useAssistantList.assistantOptions,
44377
- handleCreateAssistantOption = _useAssistantList.handleCreateAssistantOption,
44378
44355
  handleSelectAssistant = _useAssistantList.handleSelectAssistant,
44379
44356
  setSelectedAssistants = _useAssistantList.setSelectedAssistants;
44380
44357
 
44381
44358
  var _useCounselorList = useCounselorList(),
44382
44359
  selectedCounselors = _useCounselorList.selectedCounselors,
44383
44360
  counselorOptions = _useCounselorList.counselorOptions,
44384
- handleCreateCounselorOption = _useCounselorList.handleCreateCounselorOption,
44385
44361
  handleSelectCounselor = _useCounselorList.handleSelectCounselor,
44386
44362
  setSelectedCounselors = _useCounselorList.setSelectedCounselors;
44387
44363
 
44388
44364
  var _useSecondaryTeacherL = useSecondaryTeacherList(),
44389
44365
  selectedSecondaryTeachers = _useSecondaryTeacherL.selectedSecondaryTeachers,
44390
44366
  secondaryTeacherOptions = _useSecondaryTeacherL.secondaryTeacherOptions,
44391
- handleCreateSecondaryTeacherOption = _useSecondaryTeacherL.handleCreateSecondaryTeacherOption,
44392
44367
  handleSelectSecondaryTeacher = _useSecondaryTeacherL.handleSelectSecondaryTeacher,
44393
44368
  setSelectedSecondaryTeachers = _useSecondaryTeacherL.setSelectedSecondaryTeachers;
44394
44369
 
@@ -44523,7 +44498,6 @@ var AssignStudentList = function AssignStudentList() {
44523
44498
  return handleChangeStaffBulk("teacherId", e.value);
44524
44499
  },
44525
44500
  onCreateOption: function onCreateOption(value) {
44526
- handleCreateTeacherOption(value, "");
44527
44501
  handleChangeStaffBulk("teacherEmail", value.label);
44528
44502
  },
44529
44503
  placeholder: t("select_teacher"),
@@ -44537,7 +44511,6 @@ var AssignStudentList = function AssignStudentList() {
44537
44511
  return handleChangeStaffBulk("assistantId", e.value);
44538
44512
  },
44539
44513
  onCreateOption: function onCreateOption(value) {
44540
- handleCreateAssistantOption(value, "");
44541
44514
  handleChangeStaffBulk("assistantEmail", value.label);
44542
44515
  },
44543
44516
  placeholder: t("select_assistant"),
@@ -44551,7 +44524,6 @@ var AssignStudentList = function AssignStudentList() {
44551
44524
  return handleChangeStaffBulk("counselorId", e.value);
44552
44525
  },
44553
44526
  onCreateOption: function onCreateOption(value) {
44554
- handleCreateCounselorOption(value, "");
44555
44527
  handleChangeStaffBulk("counselorEmail", value.label);
44556
44528
  },
44557
44529
  placeholder: t("select_counselor"),
@@ -44565,7 +44537,6 @@ var AssignStudentList = function AssignStudentList() {
44565
44537
  return handleChangeStaffBulk("secondaryTeacherId", e.value);
44566
44538
  },
44567
44539
  onCreateOption: function onCreateOption(value) {
44568
- handleCreateSecondaryTeacherOption(value, "");
44569
44540
  handleChangeStaffBulk("secondaryTeacherEmail", value.label);
44570
44541
  },
44571
44542
  placeholder: t("select_support_teacher"),
@@ -44660,9 +44631,6 @@ var AssignStudentList = function AssignStudentList() {
44660
44631
  return i.value;
44661
44632
  }), item.id);
44662
44633
  },
44663
- onCreateOption: function onCreateOption(value) {
44664
- return handleCreateTeacherOption(value, item.id, true);
44665
- },
44666
44634
  placeholder: t("select_teacher"),
44667
44635
  className: "flex-grow-1 mr-2"
44668
44636
  })), React__default.createElement("td", {
@@ -44677,9 +44645,6 @@ var AssignStudentList = function AssignStudentList() {
44677
44645
  onChange: function onChange(e) {
44678
44646
  return handleSelectAssistant(e.value, item.id);
44679
44647
  },
44680
- onCreateOption: function onCreateOption(value) {
44681
- return handleCreateAssistantOption(value, item.id, true);
44682
- },
44683
44648
  placeholder: t("select_assistant"),
44684
44649
  className: "flex-grow-1 mr-2"
44685
44650
  })), React__default.createElement("td", {
@@ -44694,9 +44659,6 @@ var AssignStudentList = function AssignStudentList() {
44694
44659
  onChange: function onChange(e) {
44695
44660
  return handleSelectCounselor(e.value, item.id);
44696
44661
  },
44697
- onCreateOption: function onCreateOption(value) {
44698
- return handleCreateCounselorOption(value, item.id, true);
44699
- },
44700
44662
  placeholder: t("select_counselor"),
44701
44663
  className: "flex-grow-1 mr-2"
44702
44664
  })), React__default.createElement("td", {
@@ -44711,9 +44673,6 @@ var AssignStudentList = function AssignStudentList() {
44711
44673
  onChange: function onChange(e) {
44712
44674
  return handleSelectSecondaryTeacher(e.value, item.id);
44713
44675
  },
44714
- onCreateOption: function onCreateOption(value) {
44715
- return handleCreateSecondaryTeacherOption(value, item.id, true);
44716
- },
44717
44676
  placeholder: t("select_support_teacher"),
44718
44677
  className: "flex-grow-1 mr-2"
44719
44678
  })), React__default.createElement("td", {