touchstudy-core 0.1.39 → 0.1.41

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 (26) hide show
  1. package/dist/containers/ExamResult/components/CompareGrass/index.d.ts +6 -3
  2. package/dist/containers/ExamResult/components/GradesByTerritory/index.d.ts +6 -3
  3. package/dist/containers/ExamResult/components/MyAnswer/index.d.ts +2 -1
  4. package/dist/containers/ExamResult/components/ProtractedProblem/index.d.ts +6 -3
  5. package/dist/containers/ExamResult/components/TrickyProblem/index.d.ts +6 -3
  6. package/dist/containers/ExamResult/components/Vulnerable/index.d.ts +6 -3
  7. package/dist/containers/ExamResult/configs/constants.d.ts +73 -0
  8. package/dist/containers/ExamResult/hooks/useExamResult.d.ts +105 -25
  9. package/dist/containers/Login/configs/constants.d.ts +0 -6
  10. package/dist/containers/Login/views/block/BlockLogin.d.ts +1 -1
  11. package/dist/containers/Textbooks/apiClient/articleService.d.ts +1 -1
  12. package/dist/containers/Textbooks/apiClient/chapterService.d.ts +1 -1
  13. package/dist/containers/Textbooks/apiClient/textbookService.d.ts +1 -1
  14. package/dist/containers/Textbooks/views/TextbookDetail.d.ts +1 -1
  15. package/dist/containers/Textbooks/views/TextbookList.d.ts +1 -1
  16. package/dist/index.css +12 -5
  17. package/dist/index.d.ts +1 -2
  18. package/dist/index.js +1561 -1182
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.modern.js +1560 -1181
  21. package/dist/index.modern.js.map +1 -1
  22. package/dist/layouts/Header.d.ts +1 -1
  23. package/dist/layouts/TheAcademyDropdown.d.ts +1 -1
  24. package/dist/utils/constants.d.ts +6 -2
  25. package/dist/utils/hooks/useSwitchAcademy.d.ts +1 -1
  26. package/package.json +1 -1
@@ -1,5 +1,8 @@
1
- import React from "react";
1
+ import { FC } from "react";
2
2
  import { EffectSize } from "../../configs/types";
3
- export default function CompareGrass({ effectSize }: {
3
+ interface Props {
4
4
  effectSize: EffectSize[];
5
- }): React.JSX.Element;
5
+ isPrint?: boolean;
6
+ }
7
+ declare const CompareGrass: FC<Props>;
8
+ export default CompareGrass;
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import { FC } from "react";
2
2
  import { CategoryResponse } from "../../configs/types";
3
- export default function GradesByTerritory({ data, openProblem, changeOpen, }: {
3
+ interface Props {
4
4
  data: CategoryResponse[];
5
5
  openProblem: {
6
6
  problem1: boolean;
@@ -9,4 +9,7 @@ export default function GradesByTerritory({ data, openProblem, changeOpen, }: {
9
9
  problem4: boolean;
10
10
  };
11
11
  changeOpen: any;
12
- }): React.JSX.Element;
12
+ isPrint?: boolean;
13
+ }
14
+ declare const GradesByTerritory: FC<Props>;
15
+ export default GradesByTerritory;
@@ -4,6 +4,7 @@ interface Props {
4
4
  data: ExamResult;
5
5
  categories: CategoryResponse[];
6
6
  isStudent: boolean;
7
+ isPrint?: boolean;
7
8
  }
8
- export default function MyAnswer({ data, categories, isStudent }: Props): React.JSX.Element;
9
+ export default function MyAnswer({ data, categories, isStudent, isPrint }: Props): React.JSX.Element;
9
10
  export {};
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import { FC } from "react";
2
2
  import { LongTimeSpendQuestion } from "../../configs/types";
3
- export default function ProtractedProblem({ data, openProblem, changeOpen, }: {
3
+ interface Props {
4
4
  data: LongTimeSpendQuestion[];
5
5
  openProblem: {
6
6
  problem1: boolean;
@@ -9,4 +9,7 @@ export default function ProtractedProblem({ data, openProblem, changeOpen, }: {
9
9
  problem4: boolean;
10
10
  };
11
11
  changeOpen: any;
12
- }): React.JSX.Element;
12
+ isPrint?: boolean;
13
+ }
14
+ declare const ProtractedProblem: FC<Props>;
15
+ export default ProtractedProblem;
@@ -1,6 +1,6 @@
1
- import React from "react";
1
+ import { FC } from "react";
2
2
  import { ExamResult } from "../../configs/types";
3
- export default function TrickyProblem({ data, openProblem, changeOpen, }: {
3
+ interface Props {
4
4
  data: ExamResult;
5
5
  openProblem: {
6
6
  problem1: boolean;
@@ -9,4 +9,7 @@ export default function TrickyProblem({ data, openProblem, changeOpen, }: {
9
9
  problem4: boolean;
10
10
  };
11
11
  changeOpen: any;
12
- }): React.JSX.Element;
12
+ isPrint?: boolean;
13
+ }
14
+ declare const TrickyProblem: FC<Props>;
15
+ export default TrickyProblem;
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import { FC } from "react";
2
2
  import { ExamResult } from "../../configs/types";
3
- export default function Vulnerable({ data, openProblem, changeOpen, }: {
3
+ interface Props {
4
4
  data: ExamResult;
5
5
  openProblem: {
6
6
  problem1: boolean;
@@ -9,4 +9,7 @@ export default function Vulnerable({ data, openProblem, changeOpen, }: {
9
9
  problem4: boolean;
10
10
  };
11
11
  changeOpen: any;
12
- }): React.JSX.Element;
12
+ isPrint?: boolean;
13
+ }
14
+ declare const Vulnerable: FC<Props>;
15
+ export default Vulnerable;
@@ -21,3 +21,76 @@ export declare const CATEGORY_RESPONSES: {
21
21
  totalAnsweredQuestions: number;
22
22
  percentageAmongStudents: number;
23
23
  }[];
24
+ export declare const DEFAULT_LINE_CHART_OPTIONS: {
25
+ chart: {
26
+ type: string;
27
+ toolbar: {
28
+ show: boolean;
29
+ };
30
+ zoom: {
31
+ enabled: boolean;
32
+ };
33
+ };
34
+ tooltip: {
35
+ enabled: boolean;
36
+ hideEmptySeries: boolean;
37
+ };
38
+ legend: {
39
+ show: boolean;
40
+ fontSize: string;
41
+ fontWeight: number;
42
+ markers: {
43
+ width: number;
44
+ height: number;
45
+ };
46
+ labels: {
47
+ colors: string;
48
+ };
49
+ itemMargin: {
50
+ vertical: number;
51
+ };
52
+ };
53
+ dataLabels: {
54
+ enabled: boolean;
55
+ };
56
+ xaxis: {
57
+ categories: never[];
58
+ axisBorder: {
59
+ show: boolean;
60
+ color: string;
61
+ };
62
+ labels: {
63
+ style: {
64
+ fontSize: string;
65
+ };
66
+ };
67
+ };
68
+ grid: {
69
+ row: {
70
+ colors: string[];
71
+ };
72
+ borderColor: string;
73
+ xaxis: {
74
+ lines: {
75
+ show: boolean;
76
+ };
77
+ };
78
+ };
79
+ yaxis: {
80
+ stepSize: number;
81
+ min: number;
82
+ axisBorder: {
83
+ show: boolean;
84
+ color: string;
85
+ };
86
+ labels: {
87
+ style: {
88
+ fontSize: string;
89
+ };
90
+ };
91
+ };
92
+ };
93
+ export declare const defaultSeries: (t: any) => {
94
+ name: any;
95
+ data: never[];
96
+ }[];
@@ -1,11 +1,47 @@
1
1
  /// <reference types="react" />
2
2
  import { CategoryResponse, EffectSize, ExamResult, LongTimeSpendQuestion, TimelyOrderQuestion } from "../configs/types";
3
- declare const useExamResult: (searchParam: string, navigate: Function, examSessionId?: number, studentId?: number, code?: string) => {
3
+ declare const useExamResult: (searchParam: string, navigate: Function, examSessionId: number | undefined, studentId: number | undefined, code: string | undefined, handleChangeTab: (newValue: number) => void) => {
4
+ examTime: string;
4
5
  series: {
5
6
  name: any;
6
7
  data: (number | null)[];
7
8
  }[];
8
9
  chartOptions: {
10
+ tooltip: {
11
+ y: {
12
+ formatter: (val: any, { dataPointIndex }: any) => any;
13
+ };
14
+ enabled: boolean;
15
+ hideEmptySeries: boolean;
16
+ };
17
+ xaxis: {
18
+ categories: any[];
19
+ axisBorder: {
20
+ show: boolean;
21
+ color: string;
22
+ };
23
+ labels: {
24
+ style: {
25
+ fontSize: string;
26
+ };
27
+ };
28
+ };
29
+ yaxis: {
30
+ tickAmount: number;
31
+ max: number;
32
+ labels: {
33
+ formatter: (val: any) => any;
34
+ style: {
35
+ fontSize: string;
36
+ };
37
+ };
38
+ stepSize: number;
39
+ min: number;
40
+ axisBorder: {
41
+ show: boolean;
42
+ color: string;
43
+ };
44
+ };
9
45
  chart: {
10
46
  type: string;
11
47
  toolbar: {
@@ -15,13 +51,6 @@ declare const useExamResult: (searchParam: string, navigate: Function, examSessi
15
51
  enabled: boolean;
16
52
  };
17
53
  };
18
- tooltip: {
19
- enabled: boolean;
20
- hideEmptySeries: boolean;
21
- y: {
22
- formatter: (val: any, { dataPointIndex }: any) => any;
23
- };
24
- };
25
54
  legend: {
26
55
  show: boolean;
27
56
  fontSize: string;
@@ -40,6 +69,26 @@ declare const useExamResult: (searchParam: string, navigate: Function, examSessi
40
69
  dataLabels: {
41
70
  enabled: boolean;
42
71
  };
72
+ grid: {
73
+ row: {
74
+ colors: string[];
75
+ };
76
+ borderColor: string;
77
+ xaxis: {
78
+ lines: {
79
+ show: boolean;
80
+ };
81
+ };
82
+ };
83
+ };
84
+ allChartOptions: {
85
+ tooltip: {
86
+ y: {
87
+ formatter: (val: any, { dataPointIndex }: any) => any;
88
+ };
89
+ enabled: boolean;
90
+ hideEmptySeries: boolean;
91
+ };
43
92
  xaxis: {
44
93
  categories: any[];
45
94
  axisBorder: {
@@ -52,41 +101,72 @@ declare const useExamResult: (searchParam: string, navigate: Function, examSessi
52
101
  };
53
102
  };
54
103
  };
55
- grid: {
56
- row: {
57
- colors: string[];
58
- };
59
- borderColor: string;
60
- xaxis: {
61
- lines: {
62
- show: boolean;
63
- };
64
- };
65
- };
66
104
  yaxis: {
67
105
  tickAmount: number;
106
+ max: number;
107
+ labels: {
108
+ formatter: (val: any) => any;
109
+ style: {
110
+ fontSize: string;
111
+ };
112
+ };
68
113
  stepSize: number;
69
114
  min: number;
70
- max: number;
71
115
  axisBorder: {
72
116
  show: boolean;
73
117
  color: string;
74
118
  };
119
+ };
120
+ chart: {
121
+ type: string;
122
+ toolbar: {
123
+ show: boolean;
124
+ };
125
+ zoom: {
126
+ enabled: boolean;
127
+ };
128
+ };
129
+ legend: {
130
+ show: boolean;
131
+ fontSize: string;
132
+ fontWeight: number;
133
+ markers: {
134
+ width: number;
135
+ height: number;
136
+ };
75
137
  labels: {
76
- formatter: (val: any) => any;
77
- style: {
78
- fontSize: string;
138
+ colors: string;
139
+ };
140
+ itemMargin: {
141
+ vertical: number;
142
+ };
143
+ };
144
+ dataLabels: {
145
+ enabled: boolean;
146
+ };
147
+ grid: {
148
+ row: {
149
+ colors: string[];
150
+ };
151
+ borderColor: string;
152
+ xaxis: {
153
+ lines: {
154
+ show: boolean;
79
155
  };
80
156
  };
81
157
  };
82
- };
158
+ }[];
159
+ allSeries: {
160
+ name: any;
161
+ data: (number | null)[];
162
+ }[][];
83
163
  dataChartIndex: number;
84
164
  totalTime: any;
85
165
  isStudent: any;
86
166
  resultDatas: ExamResult | undefined;
87
167
  effectSize: EffectSize[] | undefined;
88
168
  longTimeSpend: LongTimeSpendQuestion[];
89
- timelyOrderQuestion: TimelyOrderQuestion[];
169
+ timelyOrderQuestions: TimelyOrderQuestion[];
90
170
  openProblem: {
91
171
  problem1: boolean;
92
172
  problem2: boolean;
@@ -2,9 +2,3 @@ export declare enum AuthenticationMessage {
2
2
  NotAllowedToRegister = "NotAllowedToRegister",
3
3
  InvalidGoogleToken = "InvalidGoogleToken"
4
4
  }
5
- export declare enum Role {
6
- Student = "Student",
7
- Teacher = "Teacher",
8
- Admin = "Admin",
9
- AcademyAdmin = "AcademyAdmin"
10
- }
@@ -1,6 +1,6 @@
1
1
  import { FC } from "react";
2
+ import { Role } from "../../../../utils/constants";
2
3
  import { INavigateProps } from "../../../../utils/types";
3
- import { Role } from "../../configs/constants";
4
4
  interface Props {
5
5
  defaultInfo?: any;
6
6
  role?: Role;
@@ -1,4 +1,4 @@
1
- import { Role } from "../../Login/configs/constants";
1
+ import { Role } from "../../../utils/constants";
2
2
  import { ArticleRequest } from "../configs/types";
3
3
  export declare const getArticleListApi: (query: any, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
4
4
  export declare const getArticleByIdApi: (articleId: number, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -1,4 +1,4 @@
1
- import { Role } from "../../Login/configs/constants";
1
+ import { Role } from "../../../utils/constants";
2
2
  import { ChapterRequest } from "../configs/types";
3
3
  export declare const getChapterListApi: (query: any, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
4
4
  export declare const getChapterByIdApi: (chapterId: number, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -1,4 +1,4 @@
1
- import { Role } from "../../Login/configs/constants";
1
+ import { Role } from "../../../utils/constants";
2
2
  import { TextbookRequest, TextbookSearchQuery, TextbookUpdateRequest } from "../configs/types";
3
3
  export declare const getTextbookListApi: (query: TextbookSearchQuery, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
4
4
  export declare const getTextbookByIdApi: (textbookId: number, role: Role) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import { Role } from "../../Login/configs/constants";
2
+ import { Role } from "../../../utils/constants";
3
3
  export interface TextbookDetailProps {
4
4
  role: Role;
5
5
  isReadonlyParam?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import { Role } from "../../Login/configs/constants";
2
+ import { Role } from "../../../utils/constants";
3
3
  export interface TextbookListProps {
4
4
  role: Role;
5
5
  navigate: any;
package/dist/index.css CHANGED
@@ -1126,8 +1126,7 @@
1126
1126
  border-radius: 6px; }
1127
1127
 
1128
1128
  ._oTqG7 {
1129
- border-top: 1px solid #e4e7ec;
1130
- background-color: #F9FAFB; }
1129
+ border-top: 1px solid #e4e7ec; }
1131
1130
  ._oTqG7 :hover {
1132
1131
  cursor: pointer; }
1133
1132
 
@@ -1139,6 +1138,7 @@
1139
1138
 
1140
1139
  ._35eIx {
1141
1140
  display: flex;
1141
+ background-color: #F9FAFB;
1142
1142
  border-bottom: 1px solid #e4e7ec;
1143
1143
  justify-content: space-between;
1144
1144
  align-items: center;
@@ -1150,6 +1150,7 @@
1150
1150
 
1151
1151
  ._3t4HO {
1152
1152
  display: flex;
1153
+ background-color: #F9FAFB;
1153
1154
  justify-content: space-between;
1154
1155
  align-items: center;
1155
1156
  padding: 10.5px 24px;
@@ -1160,6 +1161,7 @@
1160
1161
 
1161
1162
  ._1-oxK {
1162
1163
  border-bottom: 1px solid #e4e7ec;
1164
+ background-color: #F9FAFB;
1163
1165
  display: flex;
1164
1166
  align-items: center;
1165
1167
  padding: 8px 12px;
@@ -1302,15 +1304,20 @@
1302
1304
  height: 12px;
1303
1305
  background-color: transparent;
1304
1306
  border: 1px solid #ebebff;
1305
- position: relative; }
1307
+ border-radius: 12px;
1308
+ padding: 1px 5px;
1309
+ overflow-x: hidden; }
1310
+ ._3Z1nV ._1MPdO > div {
1311
+ position: relative;
1312
+ height: 100%; }
1306
1313
  ._3Z1nV ._1MPdO ._3CV_y {
1307
1314
  width: 8px;
1308
1315
  height: 8px;
1309
1316
  border-radius: 100%;
1310
1317
  background-color: #5458d5;
1311
1318
  position: absolute;
1312
- top: 50%;
1313
- transform: translate(-50%, -50%); }
1319
+ top: 0;
1320
+ transform: translateX(-50%); }
1314
1321
 
1315
1322
  .__g-ff {
1316
1323
  font-family: "Pretendard";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { setLoading, setAlert, setUser, setLanguage, setReFetchUserAcademies, setReadyRegisterPusher } from "./redux/commons/action";
2
- import { BASE_URL, SUPER_ADMIN_BASE_URL, ACCESS_TOKEN, PUSHER_CONFIG, EXAM_CHANNEL, EXAM_STUDENT_CHANNEL, DATE_MIN_VALUE, DATE_TIME_MIN_VALUE, ACADEMY_DOMAIN, getAcademyDomain, AcademyHeaders } from "./utils/constants";
2
+ import { BASE_URL, SUPER_ADMIN_BASE_URL, ACCESS_TOKEN, PUSHER_CONFIG, EXAM_CHANNEL, EXAM_STUDENT_CHANNEL, DATE_MIN_VALUE, DATE_TIME_MIN_VALUE, ACADEMY_DOMAIN, getAcademyDomain, AcademyHeaders, Role } from "./utils/constants";
3
3
  import utcToLocalTime from "./utils/utcToLocalTime";
4
4
  import Login from "./containers/Login/views/Login";
5
5
  import store from "./store";
@@ -32,7 +32,6 @@ import useChatContainer from "./components/Chats/hooks/useChatContainer";
32
32
  import { ConversationResponse } from "./components/Chats/configs/types";
33
33
  import usePusherConversation from "./components/Chats/hooks/usePusherConversation";
34
34
  import { ToastContainer, toast } from "react-toastify";
35
- import { Role } from "./containers/Login/configs/constants";
36
35
  import { TextbookDetail, TextbookList } from './containers/Textbooks/views';
37
36
  import useLanguage from "./utils/hooks/useLanguage";
38
37
  import * as CoreHooks from "./utils/hooks";