touchstudy-core 0.1.10 → 0.1.11
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/Chats/ChatHeader.d.ts +1 -0
- package/dist/components/Chats/hooks/useChatContainer.d.ts +1 -0
- package/dist/components/Dialogs/ConfirmDialog.d.ts +1 -0
- package/dist/components/Selects/CustomAsyncSelect.d.ts +3 -0
- package/dist/components/Selects/CustomCreatable.d.ts +3 -0
- package/dist/components/Selects/CustomSelect.d.ts +1 -1
- package/dist/containers/Exams/components/ArticleGroupView.d.ts +19 -0
- package/dist/containers/Exams/components/QuestionView.d.ts +11 -0
- package/dist/containers/Exams/configs/constants.d.ts +8 -0
- package/dist/containers/Exams/configs/interfaces.d.ts +9 -0
- package/dist/containers/Exams/configs/types.d.ts +21 -0
- package/dist/containers/Exams/hooks/useExamDetailView.d.ts +23 -0
- package/dist/containers/Exams/views/ExamDetailView.d.ts +4 -0
- package/dist/containers/Login/configs/constants.d.ts +5 -0
- package/dist/containers/Login/views/Login.d.ts +2 -1
- package/dist/containers/Login/views/block/BlockLogin.d.ts +2 -1
- package/dist/index.css +38 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.js +825 -41
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +810 -42
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/useLanguage.d.ts +10 -0
- package/package.json +3 -1
- package/dist/services/api.d.ts +0 -3
@@ -1,3 +1,3 @@
|
|
1
1
|
import React from "react";
|
2
|
-
declare const CustomSelect: ({ defaultValue, options, isDisabled, scrollBottom, value, isMulti, ...rest }: any) => React.JSX.Element;
|
2
|
+
declare const CustomSelect: ({ isDefault, defaultValue, options, isDisabled, scrollBottom, value, isMulti, ...rest }: any) => React.JSX.Element;
|
3
3
|
export default CustomSelect;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
export interface ArticleGroupViewProps {
|
3
|
+
categoryOptions: any[];
|
4
|
+
article: number;
|
5
|
+
questionCount: number;
|
6
|
+
categoryId?: number;
|
7
|
+
answerCount: number;
|
8
|
+
questions: any;
|
9
|
+
isMultiple?: boolean;
|
10
|
+
isActive?: boolean;
|
11
|
+
isDisabled?: boolean;
|
12
|
+
onChangeQuestionCount: (article: number, questionCount: number, answerCount: number) => void;
|
13
|
+
onChangeCategory: (article: number, categoryId: number) => void;
|
14
|
+
onChangeAnswerCount: (article: number, newAnswerCount: number, answerCount: number) => void;
|
15
|
+
onChangeCorrectAnswers: (article: number, index: number, answer: number) => void;
|
16
|
+
onChangeScoreAnswer: (article: number, index: number, score: number) => void;
|
17
|
+
}
|
18
|
+
declare const ArticleGroupView: FC<ArticleGroupViewProps>;
|
19
|
+
export default ArticleGroupView;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { FC } from 'react';
|
2
|
+
export interface QuestionViewProps {
|
3
|
+
index: number;
|
4
|
+
question: any;
|
5
|
+
answerCount: number;
|
6
|
+
isDisabled?: boolean;
|
7
|
+
onChangeCorrectAnswers: (value: any, index: number) => void;
|
8
|
+
onChangeScoreAnswer: (value: number, index: number) => void;
|
9
|
+
}
|
10
|
+
declare const QuestionView: FC<QuestionViewProps>;
|
11
|
+
export default QuestionView;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { Exam } from "./types";
|
2
|
+
export declare const DURATION_OPTIONS: number[];
|
3
|
+
export declare const SCORE_OPTIONS: number[];
|
4
|
+
export declare const QUESTION_OPTIONS: number[];
|
5
|
+
export declare const ANSWER_OPTIONS: number[];
|
6
|
+
export declare const DEFAULT_SCORE = 2;
|
7
|
+
export declare const DEFAULT_ANSWER_COUNT = 5;
|
8
|
+
export declare const DEFAULT_EXAM: Exam;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export declare type Question = {
|
2
|
+
id?: number;
|
3
|
+
numberOfAnswers: number;
|
4
|
+
correctAnswers: number[];
|
5
|
+
score: number;
|
6
|
+
categoryId?: number;
|
7
|
+
article: number;
|
8
|
+
questionOrder: number;
|
9
|
+
};
|
10
|
+
export declare type Exam = {
|
11
|
+
title: string;
|
12
|
+
duration: number;
|
13
|
+
questions: Question[];
|
14
|
+
};
|
15
|
+
export declare type ArticleGroup = {
|
16
|
+
article: number;
|
17
|
+
categoryId?: number;
|
18
|
+
answerCount: number;
|
19
|
+
questionCount: number;
|
20
|
+
questions: Question[];
|
21
|
+
};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { ArticleGroup, Exam } from "../configs/types";
|
2
|
+
import { ChangeEvent } from "react";
|
3
|
+
interface Props {
|
4
|
+
exam: Exam;
|
5
|
+
onChangeExam: (value: Exam) => void;
|
6
|
+
}
|
7
|
+
declare const useExamDetailView: (props: Props) => {
|
8
|
+
t: any;
|
9
|
+
durationOptions: {
|
10
|
+
label: string;
|
11
|
+
value: number;
|
12
|
+
}[];
|
13
|
+
examGroupByArticle: ArticleGroup[];
|
14
|
+
handleAddArticle: () => void;
|
15
|
+
handleChangeScoreAnswer: (article: number, index: number, score: number) => void;
|
16
|
+
handleChangeTitle: (e: ChangeEvent<HTMLInputElement>) => void;
|
17
|
+
handleChangeDuration: (value: any) => void;
|
18
|
+
handleChangeCorrectAnswers: (article: number, index: number, answer: number) => void;
|
19
|
+
handleChangeAnswerCount: (article: number, newAnswerCount: number, answerCount: number) => void;
|
20
|
+
handleChangeQuestionCount: (article: number, questionCount: number, answerCount: number) => void;
|
21
|
+
handleChangeCategory: (article: number, categoryId: number) => void;
|
22
|
+
};
|
23
|
+
export default useExamDetailView;
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { FC } from "react";
|
2
2
|
import { INavigateProps } from "../../../utils/types";
|
3
|
+
import { Role } from "../configs/constants";
|
3
4
|
interface Props {
|
4
|
-
|
5
|
+
role?: Role;
|
5
6
|
}
|
6
7
|
declare const Login: FC<INavigateProps & Props>;
|
7
8
|
export default Login;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { FC } from "react";
|
2
2
|
import { INavigateProps } from "../../../../utils/types";
|
3
|
+
import { Role } from "../../configs/constants";
|
3
4
|
interface Props {
|
4
5
|
defaultInfo?: any;
|
5
|
-
|
6
|
+
role?: Role;
|
6
7
|
}
|
7
8
|
declare const BlockLogin: FC<Props & INavigateProps>;
|
8
9
|
export default BlockLogin;
|
package/dist/index.css
CHANGED
@@ -171,3 +171,41 @@
|
|
171
171
|
-webkit-line-clamp: 1;
|
172
172
|
-webkit-box-orient: vertical;
|
173
173
|
line-height: 42px; }
|
174
|
+
|
175
|
+
._2uc_W {
|
176
|
+
padding: 0.5rem 1.5rem;
|
177
|
+
border-radius: 6px;
|
178
|
+
border: 1px solid #EBEBFF; }
|
179
|
+
._2p7kY {
|
180
|
+
font-weight: 700;
|
181
|
+
font-size: 14px;
|
182
|
+
color: #5458D5; }
|
183
|
+
._2tHmc {
|
184
|
+
font-weight: 700;
|
185
|
+
font-size: 14px;
|
186
|
+
color: #414E62; }
|
187
|
+
._3IHYm {
|
188
|
+
border: 1px solid #5458D5; }
|
189
|
+
|
190
|
+
._26ATj {
|
191
|
+
font-weight: 600;
|
192
|
+
font-size: 13px;
|
193
|
+
color: #202B37; }
|
194
|
+
|
195
|
+
._3R8PR {
|
196
|
+
font-weight: 600;
|
197
|
+
font-size: 13px;
|
198
|
+
color: #5458D5;
|
199
|
+
border: 1px solid #97A1AF;
|
200
|
+
padding: 12px; }
|
201
|
+
._3R8PR:focus {
|
202
|
+
box-shadow: none;
|
203
|
+
color: #5458D5;
|
204
|
+
border: 1px solid #5458D5; }
|
205
|
+
|
206
|
+
._1VZac {
|
207
|
+
border-color: #5458D5;
|
208
|
+
color: #5458D5; }
|
209
|
+
._1VZac:hover {
|
210
|
+
color: #FFF;
|
211
|
+
background: #5458D5; }
|
package/dist/index.d.ts
CHANGED
@@ -32,4 +32,14 @@ import useChatContainer from "./components/Chats/hooks/useChatContainer";
|
|
32
32
|
import useConversationList from "./components/Chats/hooks/useConversationList";
|
33
33
|
import { ConversationResponse, ExamResponse } from "./components/Chats/configs/types";
|
34
34
|
import usePusherConversation from "./components/Chats/hooks/usePusherConversation";
|
35
|
-
|
35
|
+
import { ToastContainer, toast } from "react-toastify";
|
36
|
+
import { Role } from "./containers/Login/configs/constants";
|
37
|
+
import useLanguage from "./utils/useLanguage";
|
38
|
+
import { LANGUAGES } from "./configs/constants";
|
39
|
+
import CustomCreatable from "./components/Selects/CustomCreatable";
|
40
|
+
import moment from "moment";
|
41
|
+
import CustomAsyncSelect from "./components/Selects/CustomAsyncSelect";
|
42
|
+
import ExamDetailView from "./containers/Exams/views/ExamDetailView";
|
43
|
+
import { ExamDetailViewProps } from "./containers/Exams/configs/interfaces";
|
44
|
+
import { Exam, Question, ArticleGroup } from "./containers/Exams/configs/types";
|
45
|
+
export { diffFromNow, formatTime, utcToLocalTime, setLoading, BASE_URL, ACCESS_TOKEN, Login, store, historyCore, setAlert, setUser, Loading, NotFound, LayoutContext, api, ConfirmDialog, CommonDialog, CommonAlert, CustomPagination, useGoogleSignOut, PUSHER_CONFIG, ExamEvent, EXAM_CHANNEL, EXAM_STUDENT_CHANNEL, setLanguage, i18n, TheLanguageDropdown, useTranslation, I18nextProvider, DATE_MIN_VALUE, minutesToTimeSpan, toISOString, canAccessRoute, CustomSelect, CustomAsyncSelect, getAccessToken, ChatContainer, IChatContainerProps, IChatItemProps, IChatHeaderProps, IInputChatProps, ChatItemType, useChatContainer, useConversationList, ConversationResponse, ExamResponse, usePusherConversation, ToastContainer, toast, Role, useLanguage, LANGUAGES, CustomCreatable, moment, ExamDetailView, ExamDetailViewProps, Exam, Question, ArticleGroup };
|