mario-core 2.9.62-beta → 2.9.63-beta
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/components/Selectors/CategorySelector.d.ts +3 -0
- package/dist/components/Selectors/constants/constant.d.ts +10 -0
- package/dist/components/Selectors/hooks/useCategorySelector.d.ts +5 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +178 -22
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +178 -23
- package/dist/index.modern.js.map +1 -1
- package/dist/services/questionCategoryService.d.ts +3 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -48,6 +48,7 @@ var cancel = "Cancel";
|
|
|
48
48
|
var hey = "Hey";
|
|
49
49
|
var readiness_to_learn = "Readiness to Learn";
|
|
50
50
|
var high_impact_learning_strategies = "High Impact Learning Strategies";
|
|
51
|
+
var check_in = "Check In";
|
|
51
52
|
var reflection = "Reflection";
|
|
52
53
|
var conferences = "Conferences";
|
|
53
54
|
var safety = "Safety";
|
|
@@ -100,12 +101,14 @@ var current_password = "Current password";
|
|
|
100
101
|
var new_password = "New password";
|
|
101
102
|
var confirm_password = "Confirm password";
|
|
102
103
|
var save = "Save";
|
|
103
|
-
var type_something_to_search_question = "Type something to
|
|
104
|
+
var type_something_to_search_question = "Type something to search question";
|
|
105
|
+
var type_something_to_search_category = "Type something to search category";
|
|
104
106
|
var total_of_questions = "Total of questions";
|
|
105
107
|
var create_question = "Create question";
|
|
106
108
|
var edit_question = "Edit question";
|
|
107
109
|
var question_type = "Question Type";
|
|
108
110
|
var category = "Category";
|
|
111
|
+
var sub_category = "Sub Category";
|
|
109
112
|
var is_default_question_for_one_to_one = "Is default question for one-to-one";
|
|
110
113
|
var default_question_for_students_or_teachers = "Default question for students or teachers";
|
|
111
114
|
var is_default_question_general_class = "Is default question general class";
|
|
@@ -245,6 +248,7 @@ var import_csv = "Import CSV";
|
|
|
245
248
|
var add_new = "Add New";
|
|
246
249
|
var show_only_work_as_assistant = "Show only work as assistant";
|
|
247
250
|
var last_1_to_1 = "Last 1-TO-1";
|
|
251
|
+
var last_check_in = "Last Check In";
|
|
248
252
|
var last_conference = "Last conference";
|
|
249
253
|
var total_time = "Total time";
|
|
250
254
|
var assistant_name = "Assistant Name";
|
|
@@ -261,6 +265,7 @@ var after = "After";
|
|
|
261
265
|
var pick_a_date = "Pick a date";
|
|
262
266
|
var apply = "Apply";
|
|
263
267
|
var new_1_to_1 = "New 1-to-1";
|
|
268
|
+
var new_check_in = "New Check In";
|
|
264
269
|
var do_you_want_to_talk_with_teacher = "Do you want to talk with teacher";
|
|
265
270
|
var start_now = "Start now";
|
|
266
271
|
var book_for_later = "Book for later";
|
|
@@ -271,6 +276,7 @@ var select_question = "Select question";
|
|
|
271
276
|
var select_student = "Select student";
|
|
272
277
|
var select_date_time = "Select Date & Time";
|
|
273
278
|
var book_1_to_1 = "Book 1-to-1";
|
|
279
|
+
var book_new_check_in = "Book new Check In";
|
|
274
280
|
var schedule = "Schedule";
|
|
275
281
|
var sessions_are_booked_as_10_minute_slots = "Sessions are booked as 10 minute slots";
|
|
276
282
|
var does_not_reoccur = "Does not reoccur";
|
|
@@ -285,7 +291,8 @@ var open = "Open";
|
|
|
285
291
|
var no_data = "No Data";
|
|
286
292
|
var schedule_detail = "Schedule Detail";
|
|
287
293
|
var are_you_sure_you_want_to_cancel_this_schedule = "Are you sure you want to Cancel this schedule?";
|
|
288
|
-
var completed_1_to_1 = "Completed 1-
|
|
294
|
+
var completed_1_to_1 = "Completed 1-1 Conversation";
|
|
295
|
+
var completed_check_in = "Completed Check In";
|
|
289
296
|
var done = "Done";
|
|
290
297
|
var what_do_you_want_to_talk_about = "What do you want to talk about?";
|
|
291
298
|
var session_type = "Session Type";
|
|
@@ -406,6 +413,7 @@ var student_request = "Student Request";
|
|
|
406
413
|
var overview = "Overview";
|
|
407
414
|
var plp = "PLP";
|
|
408
415
|
var my_student_1_to_1 = "My Student 1-to-1";
|
|
416
|
+
var my_student_check_in = "My Student Check In";
|
|
409
417
|
var my_student_conference = "My Student Conference";
|
|
410
418
|
var received_date = "Received Date";
|
|
411
419
|
var class_impact_score = "Class Impact Score";
|
|
@@ -595,6 +603,7 @@ var lang_us = {
|
|
|
595
603
|
readiness_to_learn: readiness_to_learn,
|
|
596
604
|
high_impact_learning_strategies: high_impact_learning_strategies,
|
|
597
605
|
"1_to_1": "1 To 1",
|
|
606
|
+
check_in: check_in,
|
|
598
607
|
reflection: reflection,
|
|
599
608
|
conferences: conferences,
|
|
600
609
|
safety: safety,
|
|
@@ -649,11 +658,13 @@ var lang_us = {
|
|
|
649
658
|
confirm_password: confirm_password,
|
|
650
659
|
save: save,
|
|
651
660
|
type_something_to_search_question: type_something_to_search_question,
|
|
661
|
+
type_something_to_search_category: type_something_to_search_category,
|
|
652
662
|
total_of_questions: total_of_questions,
|
|
653
663
|
create_question: create_question,
|
|
654
664
|
edit_question: edit_question,
|
|
655
665
|
question_type: question_type,
|
|
656
666
|
category: category,
|
|
667
|
+
sub_category: sub_category,
|
|
657
668
|
"Question text": "Question text",
|
|
658
669
|
is_default_question_for_one_to_one: is_default_question_for_one_to_one,
|
|
659
670
|
default_question_for_students_or_teachers: default_question_for_students_or_teachers,
|
|
@@ -796,6 +807,7 @@ var lang_us = {
|
|
|
796
807
|
add_new: add_new,
|
|
797
808
|
show_only_work_as_assistant: show_only_work_as_assistant,
|
|
798
809
|
last_1_to_1: last_1_to_1,
|
|
810
|
+
last_check_in: last_check_in,
|
|
799
811
|
last_conference: last_conference,
|
|
800
812
|
total_time: total_time,
|
|
801
813
|
assistant_name: assistant_name,
|
|
@@ -812,6 +824,7 @@ var lang_us = {
|
|
|
812
824
|
pick_a_date: pick_a_date,
|
|
813
825
|
apply: apply,
|
|
814
826
|
new_1_to_1: new_1_to_1,
|
|
827
|
+
new_check_in: new_check_in,
|
|
815
828
|
do_you_want_to_talk_with_teacher: do_you_want_to_talk_with_teacher,
|
|
816
829
|
start_now: start_now,
|
|
817
830
|
book_for_later: book_for_later,
|
|
@@ -822,6 +835,7 @@ var lang_us = {
|
|
|
822
835
|
select_student: select_student,
|
|
823
836
|
select_date_time: select_date_time,
|
|
824
837
|
book_1_to_1: book_1_to_1,
|
|
838
|
+
book_new_check_in: book_new_check_in,
|
|
825
839
|
schedule: schedule,
|
|
826
840
|
sessions_are_booked_as_10_minute_slots: sessions_are_booked_as_10_minute_slots,
|
|
827
841
|
does_not_reoccur: does_not_reoccur,
|
|
@@ -837,6 +851,7 @@ var lang_us = {
|
|
|
837
851
|
schedule_detail: schedule_detail,
|
|
838
852
|
are_you_sure_you_want_to_cancel_this_schedule: are_you_sure_you_want_to_cancel_this_schedule,
|
|
839
853
|
completed_1_to_1: completed_1_to_1,
|
|
854
|
+
completed_check_in: completed_check_in,
|
|
840
855
|
done: done,
|
|
841
856
|
what_do_you_want_to_talk_about: what_do_you_want_to_talk_about,
|
|
842
857
|
session_type: session_type,
|
|
@@ -958,6 +973,7 @@ var lang_us = {
|
|
|
958
973
|
overview: overview,
|
|
959
974
|
plp: plp,
|
|
960
975
|
my_student_1_to_1: my_student_1_to_1,
|
|
976
|
+
my_student_check_in: my_student_check_in,
|
|
961
977
|
my_student_conference: my_student_conference,
|
|
962
978
|
received_date: received_date,
|
|
963
979
|
class_impact_score: class_impact_score,
|
|
@@ -1149,6 +1165,7 @@ var cancel$1 = "Cancel";
|
|
|
1149
1165
|
var hey$1 = "Hey";
|
|
1150
1166
|
var readiness_to_learn$1 = "Readiness to Learn";
|
|
1151
1167
|
var high_impact_learning_strategies$1 = "High Impact Learning Strategies";
|
|
1168
|
+
var check_in$1 = "Check In";
|
|
1152
1169
|
var reflection$1 = "Reflection";
|
|
1153
1170
|
var conferences$1 = "Conferences";
|
|
1154
1171
|
var safety$1 = "Safety";
|
|
@@ -1202,12 +1219,14 @@ var current_password$1 = "Current password";
|
|
|
1202
1219
|
var new_password$1 = "New password";
|
|
1203
1220
|
var confirm_password$1 = "Confirm password";
|
|
1204
1221
|
var save$1 = "Save";
|
|
1205
|
-
var type_something_to_search_question$1 = "Type something to
|
|
1222
|
+
var type_something_to_search_question$1 = "Type something to search question";
|
|
1223
|
+
var type_something_to_search_category$1 = "Type something to search category";
|
|
1206
1224
|
var total_of_questions$1 = "Total of questions";
|
|
1207
1225
|
var create_question$1 = "Create question";
|
|
1208
1226
|
var edit_question$1 = "Edit question";
|
|
1209
1227
|
var question_type$1 = "Question Type";
|
|
1210
1228
|
var category$1 = "Category";
|
|
1229
|
+
var sub_category$1 = "Sub Category";
|
|
1211
1230
|
var question_text = "Question text";
|
|
1212
1231
|
var is_default_question_for_one_to_one$1 = "Is default question for one-to-one";
|
|
1213
1232
|
var default_question_for_students_or_teachers$1 = "Default question for students or teachers";
|
|
@@ -1310,7 +1329,7 @@ var use_for$1 = "Use for";
|
|
|
1310
1329
|
var admin_training$1 = "Admin training";
|
|
1311
1330
|
var teacher_training$1 = "Teacher training";
|
|
1312
1331
|
var created_time$1 = "Create time";
|
|
1313
|
-
var total_reflections$1 = "Total Reflections
|
|
1332
|
+
var total_reflections$1 = "Total Reflections";
|
|
1314
1333
|
var student_training$1 = "Student training";
|
|
1315
1334
|
var create_destination$1 = "Create Destination";
|
|
1316
1335
|
var total_of_designation$1 = "Total of Designation";
|
|
@@ -1348,6 +1367,7 @@ var import_csv$1 = "Import CSV";
|
|
|
1348
1367
|
var add_new$1 = "Add New";
|
|
1349
1368
|
var show_only_work_as_assistant$1 = "Show only work as assistant";
|
|
1350
1369
|
var last_1_to_1$1 = "Last 1-TO-1";
|
|
1370
|
+
var last_check_in$1 = "Last Check In";
|
|
1351
1371
|
var last_conference$1 = "Last conference";
|
|
1352
1372
|
var total_time$1 = "Total time";
|
|
1353
1373
|
var assistant_name$1 = "Assistant Name";
|
|
@@ -1364,6 +1384,7 @@ var after$1 = "After";
|
|
|
1364
1384
|
var pick_a_date$1 = "Pick a date";
|
|
1365
1385
|
var apply$1 = "Apply";
|
|
1366
1386
|
var new_1_to_1$1 = "New 1-to-1";
|
|
1387
|
+
var new_check_in$1 = "New Check In";
|
|
1367
1388
|
var do_you_want_to_talk_with_teacher$1 = "Do you want to talk with teacher";
|
|
1368
1389
|
var start_now$1 = "Start now";
|
|
1369
1390
|
var book_for_later$1 = "Book for later";
|
|
@@ -1374,6 +1395,7 @@ var select_question$1 = "Select question";
|
|
|
1374
1395
|
var select_student$1 = "Select student";
|
|
1375
1396
|
var select_date_time$1 = "Select Date & Time";
|
|
1376
1397
|
var book_1_to_1$1 = "Book 1-to-1";
|
|
1398
|
+
var book_new_check_in$1 = "Book new Check In";
|
|
1377
1399
|
var schedule$1 = "Schedule";
|
|
1378
1400
|
var sessions_are_booked_as_10_minute_slots$1 = "Sessions are booked as 10 minute slots";
|
|
1379
1401
|
var does_not_reoccur$1 = "Does not reoccur";
|
|
@@ -1388,7 +1410,8 @@ var open$1 = "Open";
|
|
|
1388
1410
|
var no_data$1 = "No Data";
|
|
1389
1411
|
var schedule_detail$1 = "Schedule Detail";
|
|
1390
1412
|
var are_you_sure_you_want_to_cancel_this_schedule$1 = "Are you sure you want to Cancel this schedule?";
|
|
1391
|
-
var completed_1_to_1$1 = "Completed 1-
|
|
1413
|
+
var completed_1_to_1$1 = "Completed 1-1 Conversation";
|
|
1414
|
+
var completed_check_in$1 = "Completed Check In";
|
|
1392
1415
|
var done$1 = "Done";
|
|
1393
1416
|
var what_do_you_want_to_talk_about$1 = "What do you want to talk about?";
|
|
1394
1417
|
var session_type$1 = "Session Type";
|
|
@@ -1509,6 +1532,7 @@ var student_request$1 = "Student Request";
|
|
|
1509
1532
|
var overview$1 = "Overview";
|
|
1510
1533
|
var plp$1 = "PLP";
|
|
1511
1534
|
var my_student_1_to_1$1 = "My Student 1-to-1";
|
|
1535
|
+
var my_student_check_in$1 = "My Student Check In";
|
|
1512
1536
|
var my_student_conference$1 = "My Student Conference";
|
|
1513
1537
|
var received_date$1 = "Received Date";
|
|
1514
1538
|
var class_impact_score$1 = "Class Impact Score";
|
|
@@ -1698,6 +1722,7 @@ var lang_uk = {
|
|
|
1698
1722
|
readiness_to_learn: readiness_to_learn$1,
|
|
1699
1723
|
high_impact_learning_strategies: high_impact_learning_strategies$1,
|
|
1700
1724
|
"1_to_1": "1 to 1",
|
|
1725
|
+
check_in: check_in$1,
|
|
1701
1726
|
reflection: reflection$1,
|
|
1702
1727
|
conferences: conferences$1,
|
|
1703
1728
|
safety: safety$1,
|
|
@@ -1752,11 +1777,13 @@ var lang_uk = {
|
|
|
1752
1777
|
confirm_password: confirm_password$1,
|
|
1753
1778
|
save: save$1,
|
|
1754
1779
|
type_something_to_search_question: type_something_to_search_question$1,
|
|
1780
|
+
type_something_to_search_category: type_something_to_search_category$1,
|
|
1755
1781
|
total_of_questions: total_of_questions$1,
|
|
1756
1782
|
create_question: create_question$1,
|
|
1757
1783
|
edit_question: edit_question$1,
|
|
1758
1784
|
question_type: question_type$1,
|
|
1759
1785
|
category: category$1,
|
|
1786
|
+
sub_category: sub_category$1,
|
|
1760
1787
|
question_text: question_text,
|
|
1761
1788
|
is_default_question_for_one_to_one: is_default_question_for_one_to_one$1,
|
|
1762
1789
|
default_question_for_students_or_teachers: default_question_for_students_or_teachers$1,
|
|
@@ -1899,6 +1926,7 @@ var lang_uk = {
|
|
|
1899
1926
|
add_new: add_new$1,
|
|
1900
1927
|
show_only_work_as_assistant: show_only_work_as_assistant$1,
|
|
1901
1928
|
last_1_to_1: last_1_to_1$1,
|
|
1929
|
+
last_check_in: last_check_in$1,
|
|
1902
1930
|
last_conference: last_conference$1,
|
|
1903
1931
|
total_time: total_time$1,
|
|
1904
1932
|
assistant_name: assistant_name$1,
|
|
@@ -1915,6 +1943,7 @@ var lang_uk = {
|
|
|
1915
1943
|
pick_a_date: pick_a_date$1,
|
|
1916
1944
|
apply: apply$1,
|
|
1917
1945
|
new_1_to_1: new_1_to_1$1,
|
|
1946
|
+
new_check_in: new_check_in$1,
|
|
1918
1947
|
do_you_want_to_talk_with_teacher: do_you_want_to_talk_with_teacher$1,
|
|
1919
1948
|
start_now: start_now$1,
|
|
1920
1949
|
book_for_later: book_for_later$1,
|
|
@@ -1925,6 +1954,7 @@ var lang_uk = {
|
|
|
1925
1954
|
select_student: select_student$1,
|
|
1926
1955
|
select_date_time: select_date_time$1,
|
|
1927
1956
|
book_1_to_1: book_1_to_1$1,
|
|
1957
|
+
book_new_check_in: book_new_check_in$1,
|
|
1928
1958
|
schedule: schedule$1,
|
|
1929
1959
|
sessions_are_booked_as_10_minute_slots: sessions_are_booked_as_10_minute_slots$1,
|
|
1930
1960
|
does_not_reoccur: does_not_reoccur$1,
|
|
@@ -1940,6 +1970,7 @@ var lang_uk = {
|
|
|
1940
1970
|
schedule_detail: schedule_detail$1,
|
|
1941
1971
|
are_you_sure_you_want_to_cancel_this_schedule: are_you_sure_you_want_to_cancel_this_schedule$1,
|
|
1942
1972
|
completed_1_to_1: completed_1_to_1$1,
|
|
1973
|
+
completed_check_in: completed_check_in$1,
|
|
1943
1974
|
done: done$1,
|
|
1944
1975
|
what_do_you_want_to_talk_about: what_do_you_want_to_talk_about$1,
|
|
1945
1976
|
session_type: session_type$1,
|
|
@@ -2061,6 +2092,7 @@ var lang_uk = {
|
|
|
2061
2092
|
overview: overview$1,
|
|
2062
2093
|
plp: plp$1,
|
|
2063
2094
|
my_student_1_to_1: my_student_1_to_1$1,
|
|
2095
|
+
my_student_check_in: my_student_check_in$1,
|
|
2064
2096
|
my_student_conference: my_student_conference$1,
|
|
2065
2097
|
received_date: received_date$1,
|
|
2066
2098
|
class_impact_score: class_impact_score$1,
|
|
@@ -2466,18 +2498,6 @@ var QUESTION_TYPES_OPTIONS = [{
|
|
|
2466
2498
|
}, {
|
|
2467
2499
|
label: "Text input",
|
|
2468
2500
|
value: "TextInput"
|
|
2469
|
-
}, {
|
|
2470
|
-
label: "Slider",
|
|
2471
|
-
value: "Slider"
|
|
2472
|
-
}, {
|
|
2473
|
-
label: "Progress bar",
|
|
2474
|
-
value: "ProgressBar"
|
|
2475
|
-
}, {
|
|
2476
|
-
label: "Star rating",
|
|
2477
|
-
value: "StarRating"
|
|
2478
|
-
}, {
|
|
2479
|
-
label: "Text input with sub questions",
|
|
2480
|
-
value: "TextInputWithSuggestions"
|
|
2481
2501
|
}, {
|
|
2482
2502
|
label: "Emotional",
|
|
2483
2503
|
value: "Emotional"
|
|
@@ -3879,7 +3899,7 @@ var TheSidebar = function TheSidebar(_ref) {
|
|
|
3879
3899
|
className: "" + styles["sidebar-logout"]
|
|
3880
3900
|
}), React.createElement("p", {
|
|
3881
3901
|
onClick: signOut
|
|
3882
|
-
}, "Log out")));
|
|
3902
|
+
}, "Log out 123")));
|
|
3883
3903
|
};
|
|
3884
3904
|
|
|
3885
3905
|
var setNotification = createAction("notifications/setNotification");
|
|
@@ -7840,8 +7860,17 @@ var SuggestionCategorySelector = function SuggestionCategorySelector(props) {
|
|
|
7840
7860
|
};
|
|
7841
7861
|
|
|
7842
7862
|
var CATEGORY_URL$1 = BASE_URL + "/api/QuestionCategory";
|
|
7843
|
-
var get$7 = function get() {
|
|
7844
|
-
return api.get(CATEGORY_URL$1
|
|
7863
|
+
var get$7 = function get(parentCategoryId) {
|
|
7864
|
+
return api.get(CATEGORY_URL$1, {
|
|
7865
|
+
params: {
|
|
7866
|
+
parentCategoryId: parentCategoryId
|
|
7867
|
+
}
|
|
7868
|
+
});
|
|
7869
|
+
};
|
|
7870
|
+
var getByFilter = function getByFilter(filter) {
|
|
7871
|
+
return api.get(CATEGORY_URL$1, {
|
|
7872
|
+
params: filter
|
|
7873
|
+
});
|
|
7845
7874
|
};
|
|
7846
7875
|
|
|
7847
7876
|
var QuestionCategorySelector = function QuestionCategorySelector(props) {
|
|
@@ -7849,6 +7878,8 @@ var QuestionCategorySelector = function QuestionCategorySelector(props) {
|
|
|
7849
7878
|
getCategoryList = _useState[0],
|
|
7850
7879
|
setCategoryList = _useState[1];
|
|
7851
7880
|
|
|
7881
|
+
var id = props.id,
|
|
7882
|
+
parentCategoryId = props.parentCategoryId;
|
|
7852
7883
|
useEffect(function () {
|
|
7853
7884
|
fetchCategory();
|
|
7854
7885
|
}, []);
|
|
@@ -7856,7 +7887,7 @@ var QuestionCategorySelector = function QuestionCategorySelector(props) {
|
|
|
7856
7887
|
var fetchCategory = function fetchCategory() {
|
|
7857
7888
|
try {
|
|
7858
7889
|
var _temp2 = _catch(function () {
|
|
7859
|
-
return Promise.resolve(get$7()).then(function (res) {
|
|
7890
|
+
return Promise.resolve(get$7(parentCategoryId)).then(function (res) {
|
|
7860
7891
|
setCategoryList(res.data.items);
|
|
7861
7892
|
});
|
|
7862
7893
|
}, function (err) {
|
|
@@ -7869,7 +7900,6 @@ var QuestionCategorySelector = function QuestionCategorySelector(props) {
|
|
|
7869
7900
|
}
|
|
7870
7901
|
};
|
|
7871
7902
|
|
|
7872
|
-
var id = props.id;
|
|
7873
7903
|
var arrCategory = getCategoryList.map(function (i) {
|
|
7874
7904
|
return {
|
|
7875
7905
|
id: i.id,
|
|
@@ -7886,6 +7916,131 @@ var QuestionCategorySelector = function QuestionCategorySelector(props) {
|
|
|
7886
7916
|
}, props));
|
|
7887
7917
|
};
|
|
7888
7918
|
|
|
7919
|
+
var useCategorySelector = function useCategorySelector() {
|
|
7920
|
+
var _useState = useState([]),
|
|
7921
|
+
categories = _useState[0],
|
|
7922
|
+
setCategories = _useState[1];
|
|
7923
|
+
|
|
7924
|
+
var dispatch = useDispatch();
|
|
7925
|
+
var getData = useCallback(function () {
|
|
7926
|
+
try {
|
|
7927
|
+
var _temp3 = function _temp3() {
|
|
7928
|
+
dispatch(setLoading(false));
|
|
7929
|
+
};
|
|
7930
|
+
|
|
7931
|
+
dispatch(setLoading(true));
|
|
7932
|
+
|
|
7933
|
+
var _temp4 = _catch(function () {
|
|
7934
|
+
return Promise.resolve(getByFilter(_extends({}, DEFAULT_FILTER, {
|
|
7935
|
+
pageSize: -1
|
|
7936
|
+
}))).then(function (res) {
|
|
7937
|
+
var convertedCategories = convertOptions(res.data.items);
|
|
7938
|
+
setCategories(convertedCategories);
|
|
7939
|
+
});
|
|
7940
|
+
}, function (err) {
|
|
7941
|
+
var _err$response, _err$response$data;
|
|
7942
|
+
|
|
7943
|
+
dispatch(setAlert({
|
|
7944
|
+
type: "danger",
|
|
7945
|
+
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
|
|
7946
|
+
}));
|
|
7947
|
+
});
|
|
7948
|
+
|
|
7949
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
7950
|
+
} catch (e) {
|
|
7951
|
+
return Promise.reject(e);
|
|
7952
|
+
}
|
|
7953
|
+
}, []);
|
|
7954
|
+
|
|
7955
|
+
var convertOptions = function convertOptions(categories, parent, children) {
|
|
7956
|
+
var result = [];
|
|
7957
|
+
|
|
7958
|
+
if (!parent) {
|
|
7959
|
+
var noParentCategories = categories.filter(function (c) {
|
|
7960
|
+
return !c.parentCategoryId;
|
|
7961
|
+
});
|
|
7962
|
+
noParentCategories.forEach(function (c) {
|
|
7963
|
+
var childrenOfCategory = categories.filter(function (cg) {
|
|
7964
|
+
return cg.parentCategoryId === c.id;
|
|
7965
|
+
});
|
|
7966
|
+
|
|
7967
|
+
var category = _extends({}, c, {
|
|
7968
|
+
label: c.name,
|
|
7969
|
+
value: c.id,
|
|
7970
|
+
level: 0,
|
|
7971
|
+
isDisabled: childrenOfCategory.length > 0
|
|
7972
|
+
});
|
|
7973
|
+
|
|
7974
|
+
result = result.concat(convertOptions(categories, category, childrenOfCategory));
|
|
7975
|
+
});
|
|
7976
|
+
} else {
|
|
7977
|
+
result.push(parent);
|
|
7978
|
+
children === null || children === void 0 ? void 0 : children.forEach(function (c) {
|
|
7979
|
+
var childrenOfCategory = categories.filter(function (cg) {
|
|
7980
|
+
return cg.parentCategoryId === c.id;
|
|
7981
|
+
});
|
|
7982
|
+
|
|
7983
|
+
var category = _extends({}, c, {
|
|
7984
|
+
label: c.name,
|
|
7985
|
+
value: c.id,
|
|
7986
|
+
level: parent.level ? parent.level + 1 : 1,
|
|
7987
|
+
isDisabled: childrenOfCategory.length > 0
|
|
7988
|
+
});
|
|
7989
|
+
|
|
7990
|
+
result = result.concat(convertOptions(categories, category, childrenOfCategory));
|
|
7991
|
+
});
|
|
7992
|
+
}
|
|
7993
|
+
|
|
7994
|
+
return result;
|
|
7995
|
+
};
|
|
7996
|
+
|
|
7997
|
+
useEffect(function () {
|
|
7998
|
+
getData();
|
|
7999
|
+
}, []);
|
|
8000
|
+
return {
|
|
8001
|
+
categories: categories
|
|
8002
|
+
};
|
|
8003
|
+
};
|
|
8004
|
+
|
|
8005
|
+
var optionStyles = {
|
|
8006
|
+
control: function control(styles) {
|
|
8007
|
+
return _extends({}, styles, {
|
|
8008
|
+
backgroundColor: 'white'
|
|
8009
|
+
});
|
|
8010
|
+
},
|
|
8011
|
+
option: function option(styles, _ref) {
|
|
8012
|
+
var data = _ref.data;
|
|
8013
|
+
return _extends({}, styles, {
|
|
8014
|
+
fontWeight: !(data !== null && data !== void 0 && data.level) ? "bold" : "normal",
|
|
8015
|
+
paddingLeft: ((data === null || data === void 0 ? void 0 : data.level) || 0) + 1 + "rem",
|
|
8016
|
+
paddingRight: "1rem",
|
|
8017
|
+
cursor: data.isDisabled ? 'not-allowed' : 'pointer',
|
|
8018
|
+
color: "var(--color)",
|
|
8019
|
+
"&:first-letter": {
|
|
8020
|
+
textTransform: "uppercase"
|
|
8021
|
+
}
|
|
8022
|
+
});
|
|
8023
|
+
}
|
|
8024
|
+
};
|
|
8025
|
+
|
|
8026
|
+
var CategorySelector = function CategorySelector(_ref2) {
|
|
8027
|
+
var value = _ref2.value,
|
|
8028
|
+
rest = _objectWithoutPropertiesLoose(_ref2, ["value"]);
|
|
8029
|
+
|
|
8030
|
+
var _useCategorySelector = useCategorySelector(),
|
|
8031
|
+
categories = _useCategorySelector.categories;
|
|
8032
|
+
|
|
8033
|
+
var initialValue = !!value ? categories.find(function (option) {
|
|
8034
|
+
return option.value === value;
|
|
8035
|
+
}) || null : null;
|
|
8036
|
+
return React.createElement(Select, Object.assign({
|
|
8037
|
+
value: initialValue,
|
|
8038
|
+
options: categories,
|
|
8039
|
+
styles: optionStyles,
|
|
8040
|
+
placeholder: "Select category..."
|
|
8041
|
+
}, rest));
|
|
8042
|
+
};
|
|
8043
|
+
|
|
7889
8044
|
var StarRatingSelector = function StarRatingSelector(props) {
|
|
7890
8045
|
var id = props.id;
|
|
7891
8046
|
var initValue = !!id ? STAR_OPTIONS.find(function (option) {
|
|
@@ -10513,5 +10668,5 @@ var generateRandomString = (function () {
|
|
|
10513
10668
|
|
|
10514
10669
|
var amplitudeClient = amplitude.getInstance();
|
|
10515
10670
|
|
|
10516
|
-
export { ACCESS_TOKEN, ANSWER_EDITOR_HEIGHT, AcademicClassSelector, AddButton, BASE_URL, CHAT_CHANNEL, CommonAlert, CommonHeader, CommonModal$1 as CommonModal, CreatableSelector, CustomPagination, CustomSelector, CustomTabs as CustomTab, DATE_FORMAT, DATE_RESULT, DEFAULT_FILTER, Dashboard, DeleteButtonIcon, DetailActionButtons, EMOTIONS, EditButtonIcon, EmailTemplateDetail, EmailTemplateList, EmptyDataAlert, ErrorHandler, FULL_DATE_RESULT, FaqList, InputFile as FileInput, GOOGLE_RECAPTCHA_KEY, GalleryList, INIT_AMPLITUDE_KEY, Images, LICENSE_AGGRID, LinkEditButton, Loading, Login, MediaList, NOTIFICATION_ALERT_KEY, NOTIFICATION_CHANNEL, NotFound, NotificationList, NotificationModal, QUESTION_TYPES, QUESTION_TYPES_OPTIONS, QuestionCategorySelector, QuestionTypeSelector, QuitPrompt, ReactNotification, RequiredLabel$1 as RequiredLabel, SchoolList, ScrollToTop, SearchBox$1 as SearchBox, SearchBoxContainer, SkillList, StarRatingSelector, SuggestionCategorySelector, TAB_COLORS, TINY_MCE_API_KEY, TheContent$1 as TheContent, TheLayout, ToggleButton, UploadFileButton, UserDetail, UserList, addTab, amplitudeClient, answerQuestion, answerQuestionDataPlayer, api, apiUpload, canAccess as canAccessRoute, changeNote, changeTags, clearTab, closeTab, debounce, editTab, editorConfig, firstCheckToken, generateRandomString, getFileUrl, getInfo, getTextFromHTML, i18n, initAmplitude, isInViewport, reset, setAlert, setAssessmentList, setAssignmentList, setAssistantList, setBadgeList, setBandScoreList, setCertificateList, setClassList, setConferenceRubricList, setConversationOneToOne, setCurrentStudentId, setCurrentStudentName, setCurrentStudentUserId, setCustomAlertList, setDataPlayer, setEditItemQuesion, setEnableIEP, setEnableSurvey, setFeedbackList, setFilterWidget, setGoalExampleList, setImproveMyClass, setLanguage, setLearningSupportCategoryList, setLoading, setMailCategory, setModal, setMoveItemQuestion, setMyStudent, setQuestionByCategory, setQuestionCateList, setQuestionList, setReflectionList, setReflectionResultList, setResetQuestionList, setSchoolBlankDayList, setSelectQuestion, setSemesterList, setSessionPlayer, setSessionTemplateGeneralClassList, setSessionTemplateList, setStartTime, setStrategyList, setStudentIdSelectedByTeacher, setStudentList, setSubjectList, setSuggestionList, setTurnOffPassWhenChangeMode, setTutorialScreenList, setUser, setUserList, showFontSize, showMenuBar, store, systemCertificateUpload, systemStudentBadge, uploadFile, useFilters, useGalleryList, utcToLocalTime };
|
|
10671
|
+
export { ACCESS_TOKEN, ANSWER_EDITOR_HEIGHT, AcademicClassSelector, AddButton, BASE_URL, CHAT_CHANNEL, CategorySelector, CommonAlert, CommonHeader, CommonModal$1 as CommonModal, CreatableSelector, CustomPagination, CustomSelector, CustomTabs as CustomTab, DATE_FORMAT, DATE_RESULT, DEFAULT_FILTER, Dashboard, DeleteButtonIcon, DetailActionButtons, EMOTIONS, EditButtonIcon, EmailTemplateDetail, EmailTemplateList, EmptyDataAlert, ErrorHandler, FULL_DATE_RESULT, FaqList, InputFile as FileInput, GOOGLE_RECAPTCHA_KEY, GalleryList, INIT_AMPLITUDE_KEY, Images, LICENSE_AGGRID, LinkEditButton, Loading, Login, MediaList, NOTIFICATION_ALERT_KEY, NOTIFICATION_CHANNEL, NotFound, NotificationList, NotificationModal, QUESTION_TYPES, QUESTION_TYPES_OPTIONS, QuestionCategorySelector, QuestionTypeSelector, QuitPrompt, ReactNotification, RequiredLabel$1 as RequiredLabel, SchoolList, ScrollToTop, SearchBox$1 as SearchBox, SearchBoxContainer, SkillList, StarRatingSelector, SuggestionCategorySelector, TAB_COLORS, TINY_MCE_API_KEY, TheContent$1 as TheContent, TheLayout, ToggleButton, UploadFileButton, UserDetail, UserList, addTab, amplitudeClient, answerQuestion, answerQuestionDataPlayer, api, apiUpload, canAccess as canAccessRoute, changeNote, changeTags, clearTab, closeTab, debounce, editTab, editorConfig, firstCheckToken, generateRandomString, getFileUrl, getInfo, getTextFromHTML, i18n, initAmplitude, isInViewport, reset, setAlert, setAssessmentList, setAssignmentList, setAssistantList, setBadgeList, setBandScoreList, setCertificateList, setClassList, setConferenceRubricList, setConversationOneToOne, setCurrentStudentId, setCurrentStudentName, setCurrentStudentUserId, setCustomAlertList, setDataPlayer, setEditItemQuesion, setEnableIEP, setEnableSurvey, setFeedbackList, setFilterWidget, setGoalExampleList, setImproveMyClass, setLanguage, setLearningSupportCategoryList, setLoading, setMailCategory, setModal, setMoveItemQuestion, setMyStudent, setQuestionByCategory, setQuestionCateList, setQuestionList, setReflectionList, setReflectionResultList, setResetQuestionList, setSchoolBlankDayList, setSelectQuestion, setSemesterList, setSessionPlayer, setSessionTemplateGeneralClassList, setSessionTemplateList, setStartTime, setStrategyList, setStudentIdSelectedByTeacher, setStudentList, setSubjectList, setSuggestionList, setTurnOffPassWhenChangeMode, setTutorialScreenList, setUser, setUserList, showFontSize, showMenuBar, store, systemCertificateUpload, systemStudentBadge, uploadFile, useFilters, useGalleryList, utcToLocalTime };
|
|
10517
10672
|
//# sourceMappingURL=index.modern.js.map
|