mario-teacher-student-client 2.1.99-beta → 2.2.2-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.
Files changed (28) hide show
  1. package/dist/components/Header/HeaderComponent.d.ts +1 -0
  2. package/dist/components/selector/CustomFilterComponent.d.ts +2 -1
  3. package/dist/containers/ConductSurvey/components/ShareSurveyDialog.d.ts +12 -0
  4. package/dist/containers/ConductSurvey/constant/types.d.ts +11 -0
  5. package/dist/containers/ConductSurvey/hooks/usePreviewSurvey.d.ts +7 -1
  6. package/dist/containers/ExternalSurvey/api/externalService.d.ts +5 -0
  7. package/dist/containers/ExternalSurvey/components/ConductTop/ConductItem.d.ts +7 -0
  8. package/dist/containers/ExternalSurvey/components/ConductTop/SurveyTop.d.ts +14 -0
  9. package/dist/containers/ExternalSurvey/components/QuestionConduct.d.ts +12 -0
  10. package/dist/containers/ExternalSurvey/constant/types.d.ts +65 -0
  11. package/dist/containers/ExternalSurvey/hooks/useExternalSurvey.d.ts +16 -0
  12. package/dist/containers/ExternalSurvey/views/ExternalSurvey.d.ts +3 -0
  13. package/dist/containers/Surveys/apiClient/surveyService.d.ts +2 -0
  14. package/dist/containers/Surveys/components/StepComponents/ConfirmPublishSurvey.d.ts +4 -0
  15. package/dist/containers/Surveys/components/StepComponents/ModelSendSurvey.d.ts +4 -0
  16. package/dist/containers/Surveys/constants/types.d.ts +28 -0
  17. package/dist/containers/Surveys/hook/useCreateSurvey.d.ts +14 -0
  18. package/dist/containers/Surveys/hook/useExternalSurvey.d.ts +19 -0
  19. package/dist/containers/Surveys/hook/useListSurveyDetail.d.ts +3 -1
  20. package/dist/containers/Surveys/hook/useStudentSurvey.d.ts +1 -1
  21. package/dist/index.css +598 -16
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.js +1301 -156
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.modern.js +1247 -103
  26. package/dist/index.modern.js.map +1 -1
  27. package/dist/services/SurveyService.d.ts +2 -0
  28. package/package.json +1 -1
@@ -26,6 +26,7 @@ interface Props {
26
26
  handleSubmit?: Function;
27
27
  duplicateSurvey?: Function;
28
28
  isShowDuplicate?: boolean;
29
+ shareSurvey?: Function;
29
30
  }
30
31
  declare const HeaderComponent: FC<Props>;
31
32
  export default HeaderComponent;
@@ -11,6 +11,7 @@ interface PROPS_FILTER {
11
11
  inputSearch: any;
12
12
  isShowSelectRight?: boolean;
13
13
  handleChangeStatus?: Function;
14
+ placeholderSearch?: string;
14
15
  }
15
- declare const CustomFilterComponent: ({ filters, handleChangeStartDate, handleChangeEndDate, handleChangeInputSearch, inputSearch, isShowSelectRight, handleChangeStatus }: PROPS_FILTER) => JSX.Element;
16
+ declare const CustomFilterComponent: ({ filters, handleChangeStartDate, handleChangeEndDate, handleChangeInputSearch, inputSearch, isShowSelectRight, handleChangeStatus, placeholderSearch }: PROPS_FILTER) => JSX.Element;
16
17
  export default CustomFilterComponent;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { DATA_FORM_EMAIL } from "../constant/types";
3
+ interface Props {
4
+ open: boolean;
5
+ handleClose: Function;
6
+ handleShareSurvey: Function;
7
+ listTeacher: string[];
8
+ dataFormEmail?: DATA_FORM_EMAIL;
9
+ setDataFormEmail: Function;
10
+ }
11
+ declare const ShareSurveyDialog: ({ open, handleClose, handleShareSurvey, listTeacher, dataFormEmail, setDataFormEmail }: Props) => JSX.Element;
12
+ export default ShareSurveyDialog;
@@ -52,3 +52,14 @@ export interface SURVEY_DETAIL {
52
52
  studentIds?: number[];
53
53
  isFavorite?: boolean;
54
54
  }
55
+ export interface TEACHER_DETAIL {
56
+ email: string;
57
+ name: string;
58
+ teacherId: number;
59
+ userId: string;
60
+ }
61
+ export interface DATA_FORM_EMAIL {
62
+ emails: string[];
63
+ emailContent: string;
64
+ surveyId: number;
65
+ }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { QuestionSummarizeType, SURVEY_DETAIL } from "../constant/types";
2
+ import { DATA_FORM_EMAIL, QuestionSummarizeType, SURVEY_DETAIL } from "../constant/types";
3
3
  import { MaterialUiPickersDate } from "@material-ui/pickers/typings/date";
4
4
  declare const usePreviewSurvey: () => {
5
5
  currentUser: any;
@@ -18,5 +18,11 @@ declare const usePreviewSurvey: () => {
18
18
  surveyDetail: SURVEY_DETAIL | undefined;
19
19
  handleChangeDeadline: (date: MaterialUiPickersDate | null) => void;
20
20
  duplicateSurvey: () => void;
21
+ handleShareSurvey: () => Promise<void>;
22
+ openDialogShareSurvey: boolean;
23
+ handleToggleModelSurvey: () => void;
24
+ listTeacher: string[];
25
+ dataFormEmail: DATA_FORM_EMAIL | undefined;
26
+ setDataFormEmail: import("react").Dispatch<import("react").SetStateAction<DATA_FORM_EMAIL | undefined>>;
21
27
  };
22
28
  export default usePreviewSurvey;
@@ -0,0 +1,5 @@
1
+ export declare const shareSurvey: (data: any) => void;
2
+ export declare const getAllEduTeacher: () => Promise<import("axios").AxiosResponse<any>>;
3
+ export declare const startExternalSurvey: (token: string, email: string) => Promise<import("axios").AxiosResponse<any>>;
4
+ export declare const updateItemQuestionAnswer: (isAdditional: boolean, body: any) => Promise<import("axios").AxiosResponse<any>>;
5
+ export declare const finishExternalSurvey: (externalSurveyId: number, email: string) => Promise<import("axios").AxiosResponse<any>>;
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ import { ItemConduct } from "../../constant/types";
3
+ interface Props {
4
+ listItem: ItemConduct[];
5
+ }
6
+ declare const ConductItem: FC<Props>;
7
+ export default ConductItem;
@@ -0,0 +1,14 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ name: string;
4
+ imageUrl: string;
5
+ isResultSurvey?: boolean;
6
+ startTime?: string;
7
+ gradeLevel?: string;
8
+ informationUser?: any;
9
+ clickOpenProfileDialog?: any;
10
+ classFontSize?: string;
11
+ dayLeft?: number;
12
+ }
13
+ declare const SurveyTop: FC<Props>;
14
+ export default SurveyTop;
@@ -0,0 +1,12 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ questionName?: string;
4
+ questionList: any;
5
+ onChangeQuestionAnswer?: (questionId: number, value: string) => void;
6
+ isPageResult?: boolean;
7
+ isPageSessionResult?: boolean;
8
+ avatar?: string;
9
+ isUserChangeSession?: boolean;
10
+ }
11
+ declare const QuestionConduct: FC<Props>;
12
+ export default QuestionConduct;
@@ -0,0 +1,65 @@
1
+ export interface ItemConduct {
2
+ color: string;
3
+ label: string;
4
+ backgroundColor: string;
5
+ }
6
+ export declare enum QuestionType {
7
+ Default = "Default",
8
+ SingleChoice = "SingleChoice",
9
+ MultipleChoice = "MultipleChoice",
10
+ TextInput = "TextInput",
11
+ Slider = "Slider",
12
+ ProgressBar = "ProgressBar",
13
+ StarRating = "StarRating",
14
+ TextInputWithSuggestions = "TextInputWithSuggestions",
15
+ Emotional = "Emotional",
16
+ Summarize = "Summarize",
17
+ Rating = "Rating",
18
+ LearningStrategy = "LearningStrategy"
19
+ }
20
+ export declare enum TypeTime {
21
+ Default = 0,
22
+ StartTime = 1,
23
+ StopTime = 2
24
+ }
25
+ export interface LearningStrategyType {
26
+ id?: number;
27
+ text: string;
28
+ description?: string;
29
+ }
30
+ export interface EmotionType {
31
+ id?: number;
32
+ text: string;
33
+ emotionalText: string;
34
+ }
35
+ export interface LearningStrategyCategory {
36
+ id?: number;
37
+ name: string;
38
+ color: string;
39
+ }
40
+ export declare const IBProfile: {
41
+ id: number;
42
+ text: string;
43
+ }[];
44
+ export interface QuestionSummarizeType {
45
+ answer: string;
46
+ text: string;
47
+ type: string;
48
+ }
49
+ export interface SURVEY_DETAIL {
50
+ deadline: number | null;
51
+ title?: string;
52
+ studentIds?: number[];
53
+ isFavorite?: boolean;
54
+ }
55
+ export interface TEACHER_DETAIL {
56
+ email: string;
57
+ name: string;
58
+ teacherId: number;
59
+ userId: string;
60
+ }
61
+ export interface DATA_FORM_EMAIL {
62
+ emails: string[];
63
+ emailContent: string;
64
+ surveyId: number;
65
+ }
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ declare const useExternalSurvey: () => {
3
+ listQuestionStudents: any;
4
+ updateQuestionAnswer: (questionId: number, text: string, isAdditional?: boolean | undefined) => void;
5
+ finishSurvey: () => Promise<void>;
6
+ informationUser: any;
7
+ category: string;
8
+ setCategory: import("react").Dispatch<import("react").SetStateAction<string>>;
9
+ classFontSize: string;
10
+ isStudentChangeAfter: boolean;
11
+ listAdditionalQuestionAnswer: any;
12
+ questionSummarize: any;
13
+ setQuestionSummarize: import("react").Dispatch<any>;
14
+ isDone: boolean;
15
+ };
16
+ export default useExternalSurvey;
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ declare const ExternalSurvey: FC;
3
+ export default ExternalSurvey;
@@ -8,3 +8,5 @@ export declare const getSurveysByStudent: (params: any, studentId: number) => Pr
8
8
  export declare const getNewSurvey: () => Promise<import("axios").AxiosResponse<any>>;
9
9
  export declare const getDetailSurvey: (surveyId: number) => Promise<import("axios").AxiosResponse<any>>;
10
10
  export declare const getSurveyCountStudent: () => Promise<import("axios").AxiosResponse<any>>;
11
+ export declare const getAllEduTeacher: () => Promise<import("axios").AxiosResponse<any>>;
12
+ export declare const shareSurvey: (data: any) => void;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { MODEL_CONFIRM_SURVEY } from "../../constants/types";
3
+ declare const ConfirmPublishSurvey: ({ open, handleClose, handlePublishSurvey }: MODEL_CONFIRM_SURVEY) => JSX.Element;
4
+ export default ConfirmPublishSurvey;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { MODEL_CONFIRM_SURVEY } from "../../constants/types";
3
+ declare const ModelSendSurvey: ({ open, handleClose, handlePublishSurvey, listEduTeacher, handleToggleSuggestedTeacher, handleChangeInputSender, textValueSender, handleEnterAddSender, senderList, handleChangeEmailContent, emailContent }: MODEL_CONFIRM_SURVEY) => JSX.Element;
4
+ export default ModelSendSurvey;
@@ -209,8 +209,11 @@ export interface STUDENT_SURVEY_DETAIL {
209
209
  timeSession: string;
210
210
  studentName: string;
211
211
  teacherName: string;
212
+ avatar: string;
213
+ profileImage: string;
212
214
  status: string;
213
215
  sendDate: string;
216
+ isDone: boolean;
214
217
  isFavorite: boolean;
215
218
  flag: number;
216
219
  dayLeft: number;
@@ -253,3 +256,28 @@ export interface TABS_LABEL {
253
256
  label: string;
254
257
  count: string;
255
258
  }
259
+ export interface MODEL_CONFIRM_SURVEY {
260
+ open: boolean;
261
+ handleClose: Function;
262
+ handlePublishSurvey?: Function;
263
+ handleDeleteEmail?: Function;
264
+ listEduTeacher?: EDU_TEACHER[];
265
+ handleToggleSuggestedTeacher?: Function;
266
+ handleChangeInputSender?: Function;
267
+ textValueSender?: string;
268
+ senderList?: string[];
269
+ handleEnterAddSender?: Function;
270
+ emailContent?: string;
271
+ handleChangeEmailContent?: Function;
272
+ }
273
+ export interface EDU_TEACHER {
274
+ email: string;
275
+ firstName: string;
276
+ fullName: string;
277
+ generalEducationTeacherId: number;
278
+ id: string;
279
+ isActive: boolean;
280
+ lastName: string;
281
+ profileImageFileName: string;
282
+ isSelected?: boolean;
283
+ }
@@ -42,5 +42,19 @@ declare const useListSurveyDetail: () => {
42
42
  handleCheckSelectTemplate: (template: TEMPLATE_SURVEY) => boolean;
43
43
  handleToggleModel: () => void;
44
44
  resizeWidthTable: (percent: number) => number;
45
+ handleToggleModelConfirm: () => void;
46
+ openModelConfirmPublish: boolean;
47
+ openModelShare: boolean;
48
+ handleToggleModelShare: () => void;
49
+ listEduTeacher: import("../constants/types").EDU_TEACHER[];
50
+ handleToggleSuggestedTeacher: (teacherId: number, isChecked: boolean) => void;
51
+ handleChangeInputSender: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
52
+ textValueSender: string;
53
+ handleEnterAddSender: () => void;
54
+ senderList: string[];
55
+ handleChangeEmailContent: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
56
+ emailContent: string;
57
+ handleShareSurvey: () => Promise<void>;
58
+ handleDeleteEmail: (email: string) => void;
45
59
  };
46
60
  export default useListSurveyDetail;
@@ -0,0 +1,19 @@
1
+ import { EDU_TEACHER } from "../constants/types";
2
+ interface PropsCustomHook {
3
+ surveyId: number;
4
+ }
5
+ declare const useExternalSurvey: ({ surveyId }: PropsCustomHook) => {
6
+ openModelShare: boolean;
7
+ handleToggleModelShare: () => void;
8
+ listEduTeacher: EDU_TEACHER[];
9
+ handleToggleSuggestedTeacher: (teacherId: number, isChecked: boolean) => void;
10
+ handleChangeInputSender: (event: React.ChangeEvent<HTMLInputElement>) => void;
11
+ textValueSender: string;
12
+ handleEnterAddSender: () => void;
13
+ senderList: string[];
14
+ handleChangeEmailContent: (event: React.ChangeEvent<HTMLInputElement>) => void;
15
+ emailContent: string;
16
+ handleShareSurvey: () => Promise<void>;
17
+ handleDeleteEmail: (email: string) => void;
18
+ };
19
+ export default useExternalSurvey;
@@ -10,8 +10,10 @@ declare const useListSurveyDetail: ({ type }: SURVEY_STUDENT_PROPS) => {
10
10
  handleSort: (e: string) => void;
11
11
  handleChangePage: (_event: unknown, newPage: number) => void;
12
12
  handleChangeRowsPerPage: (event: React.ChangeEvent<HTMLInputElement>) => void;
13
- dayLeftCellBgColor: (dayLeft: number) => "" | "bg-red" | "bg-yellow" | "bg-green";
13
+ dayLeftCellBgColor: (dayLeft: number) => "" | "bg-red" | "bg-green" | "bg-yellow";
14
14
  handleStartSurvey: (surveyId: number, studentId: number) => void;
15
15
  goToBookSession: (studentId: number, surveyId: number) => void;
16
+ handleShowSession: (status: string, schedule: string, isDone: boolean) => false | "Completed" | "Not Required" | "No Response yet" | "Scheduled";
17
+ sessionBackground: (point: number | null) => "bg-red" | "bg-green" | "bg-yellow";
16
18
  };
17
19
  export default useListSurveyDetail;
@@ -5,7 +5,7 @@ declare const useStudentSurvey: ({ type }: SURVEY_STUDENT_PROPS) => {
5
5
  filters: FILTER_SURVEY;
6
6
  inputSearch: import("react").MutableRefObject<any>;
7
7
  handleChangeInputSearch: (e: React.ChangeEvent<HTMLInputElement>) => void;
8
- dayLeftCellBgColor: (dayLeft: number) => "" | "bg-red" | "bg-yellow" | "bg-green";
8
+ dayLeftCellBgColor: (dayLeft: number) => "" | "bg-red" | "bg-green" | "bg-yellow";
9
9
  newSurvey: NEW_SURVEY | undefined;
10
10
  getNewSurveyData: () => Promise<void>;
11
11
  handleSort: (e: string) => void;