mario-core 2.9.340-release → 2.9.342-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.
@@ -24,5 +24,6 @@ declare const useEmailTemplateDetail: (id?: number | undefined) => {
24
24
  updateAttachment: () => void;
25
25
  fileUpload: any;
26
26
  removeAttachment: (inputId: string, fileName: string) => void;
27
+ tinyMCEKey: string;
27
28
  };
28
29
  export default useEmailTemplateDetail;
package/dist/index.js CHANGED
@@ -1921,8 +1921,8 @@ var financial_planning = "Financial Planning";
1921
1921
  var add_new_plan = "Add New Plan";
1922
1922
  var rows_per_page = "Rows per page";
1923
1923
  var anonymous_link = "Anonymous Link";
1924
- var select_ratings_of_questions = "Select Ratings of Questions";
1925
- var select_responses_distribution = "Select Responses Distribution";
1924
+ var select_ratings_of_questions = "Select ratings of questions";
1925
+ var select_responses_distribution = "Select responses distribution";
1926
1926
  var you_can_only_select_one_question_per_time = "You can only select one question per time";
1927
1927
  var number_of_answers = "Number of Answers";
1928
1928
  var my_interests = "My Interests";
@@ -2001,8 +2001,11 @@ var open_responses = "Open Responses";
2001
2001
  var this_survey_was_sent_all_survey_links_that_were_sent_will_be_invalid_are_you_sure_to_delete_it = "This survey was sent all survey links that were sent will be invalid. Are you sure to delete it";
2002
2002
  var assign_teacher = "Assign Teacher";
2003
2003
  var teachers_list = "Teachers list";
2004
+ var you_can_only_select_1_question_at_a_time = "You can only select 1 question at a time";
2004
2005
  var educator = "Educator";
2005
2006
  var the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in = "The data presented in this chart reflects the student's <b>most recent check-in</b>.";
2007
+ var free_fields_responses = "Free fields responses";
2008
+ var please_select_a_category_to_view_data = "Please select a category to view data";
2006
2009
  var lang_us = {
2007
2010
  dashboard: dashboard,
2008
2011
  user: user,
@@ -4002,8 +4005,11 @@ var lang_us = {
4002
4005
  this_survey_was_sent_all_survey_links_that_were_sent_will_be_invalid_are_you_sure_to_delete_it: this_survey_was_sent_all_survey_links_that_were_sent_will_be_invalid_are_you_sure_to_delete_it,
4003
4006
  assign_teacher: assign_teacher,
4004
4007
  teachers_list: teachers_list,
4008
+ you_can_only_select_1_question_at_a_time: you_can_only_select_1_question_at_a_time,
4005
4009
  educator: educator,
4006
- the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in: the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in
4010
+ the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in: the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in,
4011
+ free_fields_responses: free_fields_responses,
4012
+ please_select_a_category_to_view_data: please_select_a_category_to_view_data
4007
4013
  };
4008
4014
 
4009
4015
  var dashboard$1 = "Dashboard";
@@ -5887,8 +5893,8 @@ var financial_planning$1 = "Financial Planning";
5887
5893
  var add_new_plan$1 = "Add New Plan";
5888
5894
  var rows_per_page$1 = "Rows per page";
5889
5895
  var anonymous_link$1 = "Anonymous Link";
5890
- var select_ratings_of_questions$1 = "Select Ratings of Questions";
5891
- var select_responses_distribution$1 = "Select Responses Distribution";
5896
+ var select_ratings_of_questions$1 = "Select ratings of questions";
5897
+ var select_responses_distribution$1 = "Select responses distribution";
5892
5898
  var you_can_only_select_one_question_per_time$1 = "You can only select one question per time";
5893
5899
  var number_of_answers$1 = "Number of Answers";
5894
5900
  var my_interests$1 = "My Interests";
@@ -5967,8 +5973,11 @@ var open_responses$1 = "Open Responses";
5967
5973
  var this_survey_was_sent_all_survey_links_that_were_sent_will_be_invalid_are_you_sure_to_delete_it$1 = "This survey was sent all survey links that were sent will be invalid. Are you sure to delete it";
5968
5974
  var assign_teacher$1 = "Assign Teacher";
5969
5975
  var teachers_list$1 = "Teachers list";
5976
+ var you_can_only_select_1_question_at_a_time$1 = "You can only select 1 question at a time";
5970
5977
  var educator$1 = "Educator";
5971
5978
  var the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in$1 = "The data presented in this chart reflects the student's <b>most recent check-in</b>.";
5979
+ var free_fields_responses$1 = "Free fields responses";
5980
+ var please_select_a_category_to_view_data$1 = "Please select a category to view data";
5972
5981
  var lang_uk = {
5973
5982
  dashboard: dashboard$1,
5974
5983
  user: user$1,
@@ -7968,8 +7977,11 @@ var lang_uk = {
7968
7977
  this_survey_was_sent_all_survey_links_that_were_sent_will_be_invalid_are_you_sure_to_delete_it: this_survey_was_sent_all_survey_links_that_were_sent_will_be_invalid_are_you_sure_to_delete_it$1,
7969
7978
  assign_teacher: assign_teacher$1,
7970
7979
  teachers_list: teachers_list$1,
7980
+ you_can_only_select_1_question_at_a_time: you_can_only_select_1_question_at_a_time$1,
7971
7981
  educator: educator$1,
7972
- the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in: the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in$1
7982
+ the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in: the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in$1,
7983
+ free_fields_responses: free_fields_responses$1,
7984
+ please_select_a_category_to_view_data: please_select_a_category_to_view_data$1
7973
7985
  };
7974
7986
 
7975
7987
  var dashboard$2 = "لوحة المعلومات";
@@ -9966,6 +9978,9 @@ var good_job_you_filled_out_support_network_in_the_my_support_network_section =
9966
9978
  var good_job_you_filled_out_learning_strategies_in_the_my_learning_strategies_section = "أحسنت! لقد قمت بملء \"استراتيجيات التعلم\" في قسم استراتيجيات التعلم الخاصة بي.";
9967
9979
  var open_responses$2 = "الردود المفتوحة";
9968
9980
  var teachers_list$2 = "قائمة المعلمين";
9981
+ var you_can_only_select_1_question_at_a_time$2 = "لا يمكنك اختيار سوى سؤال واحد في كل مرة";
9982
+ var free_fields_responses$2 = "استجابات الحقول المجانية";
9983
+ var please_select_a_category_to_view_data$2 = "الرجاء تحديد الفئة لعرض البيانات";
9969
9984
  var educator$2 = "مُعلّم";
9970
9985
  var the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in$2 = "تعكس البيانات المقدمة في هذا المخطط <b>آخر تسجيل دخول</b> للطالب.";
9971
9986
  var lang_ar = {
@@ -12002,6 +12017,9 @@ var lang_ar = {
12002
12017
  good_job_you_filled_out_learning_strategies_in_the_my_learning_strategies_section: good_job_you_filled_out_learning_strategies_in_the_my_learning_strategies_section,
12003
12018
  open_responses: open_responses$2,
12004
12019
  teachers_list: teachers_list$2,
12020
+ you_can_only_select_1_question_at_a_time: you_can_only_select_1_question_at_a_time$2,
12021
+ free_fields_responses: free_fields_responses$2,
12022
+ please_select_a_category_to_view_data: please_select_a_category_to_view_data$2,
12005
12023
  educator: educator$2,
12006
12024
  the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in: the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in$2
12007
12025
  };
@@ -14000,8 +14018,11 @@ var good_job_you_filled_out_support_network_in_the_my_support_network_section$1
14000
14018
  var good_job_you_filled_out_learning_strategies_in_the_my_learning_strategies_section$1 = "¡Buen trabajo! Completaste \"Estrategias de aprendizaje\" en la sección Mis estrategias de aprendizaje.";
14001
14019
  var open_responses$3 = "Respuestas abiertas";
14002
14020
  var teachers_list$3 = "Lista de profesores";
14021
+ var you_can_only_select_1_question_at_a_time$3 = "You can only select 1 question at a time";
14003
14022
  var educator$3 = "Educadora";
14004
14023
  var the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in$3 = "Los datos presentados en este gráfico reflejan el <b>registro más reciente</b> del estudiante.";
14024
+ var free_fields_responses$3 = "Respuestas de campos libres";
14025
+ var please_select_a_category_to_view_data$3 = "Seleccione una categoría para ver los datos";
14005
14026
  var lang_es = {
14006
14027
  dashboard: dashboard$3,
14007
14028
  user: user$3,
@@ -16036,8 +16057,11 @@ var lang_es = {
16036
16057
  good_job_you_filled_out_learning_strategies_in_the_my_learning_strategies_section: good_job_you_filled_out_learning_strategies_in_the_my_learning_strategies_section$1,
16037
16058
  open_responses: open_responses$3,
16038
16059
  teachers_list: teachers_list$3,
16060
+ you_can_only_select_1_question_at_a_time: you_can_only_select_1_question_at_a_time$3,
16039
16061
  educator: educator$3,
16040
- the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in: the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in$3
16062
+ the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in: the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in$3,
16063
+ free_fields_responses: free_fields_responses$3,
16064
+ please_select_a_category_to_view_data: please_select_a_category_to_view_data$3
16041
16065
  };
16042
16066
 
16043
16067
  var dashboard$4 = "仪表板";
@@ -18034,8 +18058,11 @@ var good_job_you_filled_out_support_network_in_the_my_support_network_section$2
18034
18058
  var good_job_you_filled_out_learning_strategies_in_the_my_learning_strategies_section$2 = "干得好!您已在我的学习策略部分填写“学习策略”。";
18035
18059
  var open_responses$4 = "开放式回应";
18036
18060
  var teachers_list$4 = "教师名单";
18061
+ var you_can_only_select_1_question_at_a_time$4 = "您一次只能选择一个问题";
18037
18062
  var educator$4 = "教育者";
18038
18063
  var the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in$4 = "此图表中显示的数据反映了学生<b>最近的签到情况</b>。";
18064
+ var free_fields_responses$4 = "自由场响应";
18065
+ var please_select_a_category_to_view_data$4 = "请选择一个类别来查看数据";
18039
18066
  var lang_zh = {
18040
18067
  dashboard: dashboard$4,
18041
18068
  user: user$4,
@@ -20070,8 +20097,11 @@ var lang_zh = {
20070
20097
  good_job_you_filled_out_learning_strategies_in_the_my_learning_strategies_section: good_job_you_filled_out_learning_strategies_in_the_my_learning_strategies_section$2,
20071
20098
  open_responses: open_responses$4,
20072
20099
  teachers_list: teachers_list$4,
20100
+ you_can_only_select_1_question_at_a_time: you_can_only_select_1_question_at_a_time$4,
20073
20101
  educator: educator$4,
20074
- the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in: the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in$4
20102
+ the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in: the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in$4,
20103
+ free_fields_responses: free_fields_responses$4,
20104
+ please_select_a_category_to_view_data: please_select_a_category_to_view_data$4
20075
20105
  };
20076
20106
 
20077
20107
  var TINY_MCE_API_KEY = "htqausuofrnali3nh9ivmlpq6v415o0tv2qikpg39bqf4pnk";
@@ -40026,6 +40056,7 @@ var setEmailTemplateList = toolkit.createAction("emailTemplate/setEmailTemplateL
40026
40056
 
40027
40057
  var setMailCategory = toolkit.createAction("mailCategories/setMailCategory");
40028
40058
 
40059
+ var TINY_MCE_KEY_URL = "/api/TinyMCEKey";
40029
40060
  var EMAIL_TEMPLATE_URL = BASE_URL + "/api/emailtemplate";
40030
40061
  var get$1 = function get(filter) {
40031
40062
  return api.get(EMAIL_TEMPLATE_URL, {
@@ -40044,6 +40075,9 @@ var update$5 = function update(data) {
40044
40075
  var remove = function remove(id) {
40045
40076
  return api["delete"](EMAIL_TEMPLATE_URL + "/" + id);
40046
40077
  };
40078
+ var getTinyMCEKeyApi = function getTinyMCEKeyApi() {
40079
+ return api.get("" + TINY_MCE_KEY_URL);
40080
+ };
40047
40081
 
40048
40082
  var MAIL_CATEGORY_URL = BASE_URL + "/api/EmailTemplateCategory";
40049
40083
  var get$2 = function get() {
@@ -40711,11 +40745,10 @@ var useEmailTemplateDetail = function useEmailTemplateDetail(id) {
40711
40745
  fileUpload = _useState4[0],
40712
40746
  setFileUpload = _useState4[1];
40713
40747
 
40714
- React.useEffect(function () {
40715
- document.title = TITLE$5;
40716
- setEdited(false);
40717
- if (!!localStorage.getItem(window.location.href)) localStorage.removeItem(window.location.href);
40718
- }, []);
40748
+ var _useState5 = React.useState(""),
40749
+ tinyMCEKey = _useState5[0],
40750
+ setTinyMCEKey = _useState5[1];
40751
+
40719
40752
  React.useEffect(function () {
40720
40753
  !!id && getData();
40721
40754
  }, [id]);
@@ -40754,6 +40787,37 @@ var useEmailTemplateDetail = function useEmailTemplateDetail(id) {
40754
40787
  }
40755
40788
  }, [id]);
40756
40789
 
40790
+ var getTinyMCEKey = function getTinyMCEKey() {
40791
+ try {
40792
+ var _temp7 = function _temp7() {
40793
+ dispatch(setLoading(false));
40794
+ };
40795
+
40796
+ dispatch(setLoading(true));
40797
+
40798
+ var _temp8 = _catch(function () {
40799
+ return Promise.resolve(getTinyMCEKeyApi()).then(function (res) {
40800
+ var data = res.data;
40801
+
40802
+ if (!!data) {
40803
+ setTinyMCEKey(data.key);
40804
+ }
40805
+ });
40806
+ }, function (err) {
40807
+ var _err$response2, _err$response2$data;
40808
+
40809
+ dispatch(setAlert({
40810
+ type: "danger",
40811
+ message: ((_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : _err$response2$data.title) || "Get key failed"
40812
+ }));
40813
+ });
40814
+
40815
+ return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp7) : _temp7(_temp8));
40816
+ } catch (e) {
40817
+ return Promise.reject(e);
40818
+ }
40819
+ };
40820
+
40757
40821
  var setEditorRef = function setEditorRef(node) {
40758
40822
  return editorRef = node;
40759
40823
  };
@@ -40767,14 +40831,14 @@ var useEmailTemplateDetail = function useEmailTemplateDetail(id) {
40767
40831
  }, []);
40768
40832
  var confirmData = React.useCallback(function (data) {
40769
40833
  try {
40770
- var _temp9 = function _temp9() {
40834
+ var _temp13 = function _temp13() {
40771
40835
  dispatch(setLoading(false));
40772
40836
  };
40773
40837
 
40774
40838
  dispatch(setLoading(true));
40775
40839
 
40776
- var _temp10 = _catch(function () {
40777
- function _temp6() {
40840
+ var _temp14 = _catch(function () {
40841
+ function _temp10() {
40778
40842
  var next = !!id ? update$5 : create$5;
40779
40843
  return Promise.resolve(next(data)).then(function () {
40780
40844
  dispatch(setAlert({
@@ -40785,7 +40849,7 @@ var useEmailTemplateDetail = function useEmailTemplateDetail(id) {
40785
40849
  });
40786
40850
  }
40787
40851
 
40788
- var _temp5 = function () {
40852
+ var _temp9 = function () {
40789
40853
  if (!!fileUpload && !!fileUpload.length) {
40790
40854
  return Promise.resolve(uploadFiles()).then(function (fileData) {
40791
40855
  var newAttachments = fileData.map(function (item) {
@@ -40799,17 +40863,17 @@ var useEmailTemplateDetail = function useEmailTemplateDetail(id) {
40799
40863
  }
40800
40864
  }();
40801
40865
 
40802
- return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
40866
+ return _temp9 && _temp9.then ? _temp9.then(_temp10) : _temp10(_temp9);
40803
40867
  }, function (err) {
40804
- var _err$response2, _err$response2$data;
40868
+ var _err$response3, _err$response3$data;
40805
40869
 
40806
40870
  dispatch(setAlert({
40807
40871
  type: "danger",
40808
- message: ((_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : _err$response2$data.title) || err.message
40872
+ message: ((_err$response3 = err.response) === null || _err$response3 === void 0 ? void 0 : (_err$response3$data = _err$response3.data) === null || _err$response3$data === void 0 ? void 0 : _err$response3$data.title) || err.message
40809
40873
  }));
40810
40874
  });
40811
40875
 
40812
- return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(_temp9) : _temp9(_temp10));
40876
+ return Promise.resolve(_temp14 && _temp14.then ? _temp14.then(_temp13) : _temp13(_temp14));
40813
40877
  } catch (e) {
40814
40878
  return Promise.reject(e);
40815
40879
  }
@@ -40927,6 +40991,12 @@ var useEmailTemplateDetail = function useEmailTemplateDetail(id) {
40927
40991
  }
40928
40992
  };
40929
40993
 
40994
+ React.useEffect(function () {
40995
+ document.title = TITLE$5;
40996
+ getTinyMCEKey();
40997
+ setEdited(false);
40998
+ if (!!localStorage.getItem(window.location.href)) localStorage.removeItem(window.location.href);
40999
+ }, []);
40930
41000
  return {
40931
41001
  emailTemplateDetail: emailTemplateDetail,
40932
41002
  setEditorRef: setEditorRef,
@@ -40939,7 +41009,8 @@ var useEmailTemplateDetail = function useEmailTemplateDetail(id) {
40939
41009
  onAttachFile: onAttachFile,
40940
41010
  updateAttachment: updateAttachment,
40941
41011
  fileUpload: fileUpload,
40942
- removeAttachment: removeAttachment
41012
+ removeAttachment: removeAttachment,
41013
+ tinyMCEKey: tinyMCEKey
40943
41014
  };
40944
41015
  };
40945
41016
 
@@ -40973,7 +41044,8 @@ var EmailTemplateDetail = function EmailTemplateDetail() {
40973
41044
  setEditedTrue = _useEmailTemplateDeta.setEditedTrue,
40974
41045
  onAttachFile = _useEmailTemplateDeta.onAttachFile,
40975
41046
  fileUpload = _useEmailTemplateDeta.fileUpload,
40976
- removeAttachment = _useEmailTemplateDeta.removeAttachment;
41047
+ removeAttachment = _useEmailTemplateDeta.removeAttachment,
41048
+ tinyMCEKey = _useEmailTemplateDeta.tinyMCEKey;
40977
41049
 
40978
41050
  var header = !!id ? t(EDIT_TEMPLATE_HEADER) : t(CREATE_TEMPLATE_HEADER);
40979
41051
  var confirmText = !!id ? t("update") : t("create");
@@ -41047,7 +41119,7 @@ var EmailTemplateDetail = function EmailTemplateDetail() {
41047
41119
  ref: function ref(node) {
41048
41120
  return setEditorRef(node);
41049
41121
  },
41050
- apiKey: TINY_MCE_API_KEY,
41122
+ apiKey: tinyMCEKey,
41051
41123
  initialValue: emailTemplateDetail.body,
41052
41124
  init: editorConfig.email,
41053
41125
  onEditorChange: function onEditorChange(content) {