touchstudy-core 0.1.18 → 0.1.20
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/assets/iconAssignedQuestions.d.ts +3 -0
- package/dist/assets/iconBtnFeedback.d.ts +3 -0
- package/dist/assets/iconBtnNextChart.d.ts +3 -0
- package/dist/assets/iconBtnPrevChart.d.ts +3 -0
- package/dist/assets/iconBtnTerminate.d.ts +3 -0
- package/dist/assets/iconChat.d.ts +3 -0
- package/dist/assets/iconCloseDialog.d.ts +3 -0
- package/dist/assets/iconCorrectAnswer.d.ts +3 -0
- package/dist/assets/iconDownArrow.d.ts +3 -0
- package/dist/assets/iconInCorrectAnswer.d.ts +3 -0
- package/dist/assets/iconMeanTime.d.ts +3 -0
- package/dist/assets/iconMyPoolTime.d.ts +3 -0
- package/dist/assets/iconNoGrass.d.ts +3 -0
- package/dist/assets/iconNoStarQuestion.d.ts +3 -0
- package/dist/assets/iconStarQuestion.d.ts +3 -0
- package/dist/assets/iconTopTime.d.ts +3 -0
- package/dist/assets/iconUpArrow.d.ts +3 -0
- package/dist/assets/iconWarning.d.ts +3 -0
- package/dist/assets/iconX.d.ts +3 -0
- package/dist/components/Chats/apiClient/conversationService.d.ts +1 -1
- package/dist/components/Dialogs/CommonDialog.d.ts +3 -3
- package/dist/components/Dialogs/ConfirmDialog.d.ts +1 -0
- package/dist/components/Inputs/InputText.d.ts +4 -0
- package/dist/components/Selectors/AnswerCountSelector.d.ts +9 -0
- package/dist/components/Selectors/ArticleCategorySelector.d.ts +11 -0
- package/dist/components/Selectors/QuestionCountSelector.d.ts +9 -0
- package/dist/components/Selectors/ScoreSelector.d.ts +9 -0
- package/dist/components/Selectors/configs/constants.d.ts +4 -0
- package/dist/containers/ExamResult/apiClients/index.d.ts +12 -0
- package/dist/containers/ExamResult/components/CompareGrass/index.d.ts +5 -0
- package/dist/containers/ExamResult/components/Dialog/CreateNewQuestion.d.ts +9 -0
- package/dist/containers/ExamResult/components/GradesByTerritory/index.d.ts +12 -0
- package/dist/containers/ExamResult/components/MyAnswer/components/CreateNewQuestion.d.ts +12 -0
- package/dist/containers/ExamResult/components/MyAnswer/hooks/useCreateDialog.d.ts +10 -0
- package/dist/containers/ExamResult/components/MyAnswer/hooks/useMyAnswer.d.ts +10 -0
- package/dist/containers/ExamResult/components/MyAnswer/index.d.ts +9 -0
- package/dist/containers/ExamResult/components/ProtractedProblem/index.d.ts +12 -0
- package/dist/containers/ExamResult/components/TrickyProblem/index.d.ts +12 -0
- package/dist/containers/ExamResult/components/Vulnerable/index.d.ts +12 -0
- package/dist/containers/ExamResult/configs/constants.d.ts +19 -0
- package/dist/containers/ExamResult/configs/functions.d.ts +1 -0
- package/dist/containers/ExamResult/configs/types.d.ts +95 -0
- package/dist/containers/ExamResult/hooks/useCreateDialog.d.ts +9 -0
- package/dist/containers/ExamResult/hooks/useExamResult.d.ts +109 -0
- package/dist/containers/ExamResult/views/ExamResultV2.d.ts +7 -0
- package/dist/containers/Exams/components/ArticleGroupView.d.ts +5 -1
- package/dist/containers/Exams/components/QuestionView.d.ts +1 -1
- package/dist/containers/Exams/configs/constants.d.ts +0 -4
- package/dist/containers/Exams/configs/interfaces.d.ts +1 -2
- package/dist/containers/Exams/configs/types.d.ts +1 -0
- package/dist/containers/Exams/hooks/useExamDetailView.d.ts +2 -0
- package/dist/containers/Select/Category/apiClient/categoryService.d.ts +3 -0
- package/dist/containers/Select/Category/configs/types.d.ts +17 -0
- package/dist/containers/Select/Category/hook/useCategorySelect.d.ts +15 -0
- package/dist/containers/Select/Subject/apiClient/subjectService.d.ts +2 -0
- package/dist/containers/Select/Subject/configs/types.d.ts +9 -0
- package/dist/containers/Select/Subject/hook/useSubjectSelect.d.ts +12 -0
- package/dist/index.css +496 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +4517 -413
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +4513 -419
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/constants.d.ts +5 -0
- package/dist/utils/enums/index.d.ts +2 -0
- package/dist/utils/enums/order.d.ts +4 -0
- package/dist/utils/helpers.d.ts +8 -0
- package/dist/utils/hooks/index.d.ts +2 -1
- package/dist/utils/hooks/useList.d.ts +17 -0
- package/dist/utils/types/index.d.ts +3 -0
- package/dist/utils/types/searchQuery.d.ts +8 -0
- package/dist/utils/types/tableHeaderType.d.ts +4 -0
- package/package.json +4 -4
- package/dist/components/Alerts/CommonAlert.d.ts +0 -3
- package/dist/components/Alerts/EmptyDataAlert.d.ts +0 -8
- package/dist/components/Chats/hooks/useConversationList.d.ts +0 -20
- package/dist/utils/useGoogleSignOut.d.ts +0 -10
- package/dist/utils/useLanguage.d.ts +0 -12
@@ -18,3 +18,8 @@ export declare const EXAM_STUDENT_CHANNEL = "EXAM-CHANNEL-{examCode}-STUDENT-{st
|
|
18
18
|
export declare const getAccessToken: () => string | null;
|
19
19
|
export declare const getAcademyDomain: () => string | null;
|
20
20
|
export declare const encodeParams: (params: any) => string;
|
21
|
+
export declare enum Roles {
|
22
|
+
Student = "Student",
|
23
|
+
Teacher = "Teacher",
|
24
|
+
Admin = "Admin"
|
25
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { Category, CategoryResponse, ExamResult, Question } from "../containers/ExamResult/configs/types";
|
2
|
+
export declare const formatDateTime: (inputDate: string) => string;
|
3
|
+
export declare type FormatDataMyAnswer = {
|
4
|
+
category: Category;
|
5
|
+
questions: Question[];
|
6
|
+
};
|
7
|
+
export declare const formatDataMyAnswer: (inputData: ExamResult, categories: CategoryResponse[]) => FormatDataMyAnswer[];
|
8
|
+
export declare const formatTimeSecond: (duration: number, t: any) => string;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { ChangeEvent } from "react";
|
2
|
+
import { AxiosResponse } from "axios";
|
3
|
+
import { SearchQuery } from "../types/searchQuery";
|
4
|
+
declare const useList: <TResponse>(fetchData: (filter: SearchQuery) => Promise<AxiosResponse<any, any>>, defaultQuery: SearchQuery) => {
|
5
|
+
filter: SearchQuery;
|
6
|
+
textSearchRef: import("react").RefObject<HTMLInputElement>;
|
7
|
+
totalPages: number;
|
8
|
+
data: TResponse[];
|
9
|
+
selectedItem: TResponse | undefined;
|
10
|
+
handleSort: (sortColumnName: string) => void;
|
11
|
+
handleChangeSearchText: (e: ChangeEvent<HTMLInputElement>) => void;
|
12
|
+
handleChangePage: (_: any, page: number) => void;
|
13
|
+
calcOrderNumber: (index: number) => number;
|
14
|
+
handleChangeSelectedItem: (item?: TResponse | undefined) => void;
|
15
|
+
getData: (isLoading?: boolean) => Promise<void>;
|
16
|
+
};
|
17
|
+
export default useList;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "touchstudy-core",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.20",
|
4
4
|
"description": "Contains core components && functions for TouchStudy project",
|
5
5
|
"author": "brss",
|
6
6
|
"license": "MIT",
|
@@ -29,14 +29,12 @@
|
|
29
29
|
"react-icons": "^4.12.0",
|
30
30
|
"react-select": "^5.8.0",
|
31
31
|
"react-toastify": "^9.1.3",
|
32
|
-
"reactstrap": "^9.2.1",
|
33
32
|
"yup": "^1.3.3"
|
34
33
|
},
|
35
34
|
"peerDependencies": {
|
36
35
|
"react": "^18.2.0",
|
37
36
|
"react-dom": "^18.2.0",
|
38
|
-
"react-redux": "^9.0.4"
|
39
|
-
"react-router-dom": "^5.2.0"
|
37
|
+
"react-redux": "^9.0.4"
|
40
38
|
},
|
41
39
|
"scripts": {
|
42
40
|
"build": "microbundle-crl --no-compress --format modern,cjs",
|
@@ -65,6 +63,7 @@
|
|
65
63
|
"@types/react-router-dom": "^5.3.3",
|
66
64
|
"@types/redux-logger": "^3.0.12",
|
67
65
|
"@types/yup": "^0.32.0",
|
66
|
+
"apexcharts": "3.15.5",
|
68
67
|
"babel-eslint": "^10.0.3",
|
69
68
|
"cross-env": "^7.0.3",
|
70
69
|
"eslint": "^8.56.0",
|
@@ -81,6 +80,7 @@
|
|
81
80
|
"microbundle-crl": "^0.13.10",
|
82
81
|
"npm-run-all": "^4.1.5",
|
83
82
|
"prettier": "^3.1.1",
|
83
|
+
"react-apexcharts": "1.3.6",
|
84
84
|
"react-scripts": "5.0.1",
|
85
85
|
"redux-logger": "^3.0.6",
|
86
86
|
"typescript": "^4.9.5"
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { ChangeEvent } from "react";
|
2
|
-
import { ConversationFilter, ConversationResponse, MessageResponse } from "../configs/types";
|
3
|
-
declare const useConversationList: () => {
|
4
|
-
isStudent: any;
|
5
|
-
conversationFilter: ConversationFilter;
|
6
|
-
selectedConversation: ConversationResponse | undefined;
|
7
|
-
conversations: ConversationResponse[];
|
8
|
-
handleUpdateTotalUnreadMessage: () => void;
|
9
|
-
handleChangeFilter: (filter: ConversationFilter) => void;
|
10
|
-
handleChangeSelectedConversation: (val: ConversationResponse) => void;
|
11
|
-
handleChangeTextSearch: (e: ChangeEvent<HTMLInputElement>) => void;
|
12
|
-
setSelectedConversation: import("react").Dispatch<import("react").SetStateAction<ConversationResponse | undefined>>;
|
13
|
-
handleUpdateLastMessage: (lastMessage: MessageResponse) => void;
|
14
|
-
getConversationList: () => Promise<void>;
|
15
|
-
formatConversationLastMessageContent: (conversation: ConversationResponse) => string;
|
16
|
-
handleNewMessageConversation: (val: ConversationResponse) => void;
|
17
|
-
handleCreateConversationSuccess: (id: number) => Promise<void>;
|
18
|
-
handleMessageReadConversation: (id: number, totalUnread: number) => void;
|
19
|
-
};
|
20
|
-
export default useConversationList;
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { Language } from "../configs/constants";
|
3
|
-
import "moment/locale/ko.js";
|
4
|
-
import "moment/locale/en-au.js";
|
5
|
-
declare const useLanguage: () => {
|
6
|
-
language: string;
|
7
|
-
dropdownOpen: boolean;
|
8
|
-
currentLanguage: Language | null;
|
9
|
-
toggle: () => void;
|
10
|
-
setItemLanguage: import("react").Dispatch<import("react").SetStateAction<string>>;
|
11
|
-
};
|
12
|
-
export default useLanguage;
|