touchstudy-core 0.1.64 → 0.1.66

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 (37) hide show
  1. package/dist/components/Selectors/styles.d.ts +6 -0
  2. package/dist/containers/ExamResult/components/GradesByTerritory/index.d.ts +3 -1
  3. package/dist/containers/ExamResult/components/ProtractedProblem/index.d.ts +1 -0
  4. package/dist/containers/ExamResult/components/Vulnerable/index.d.ts +1 -0
  5. package/dist/containers/ExamResult/configs/constants.d.ts +1 -0
  6. package/dist/containers/ExamResult/configs/functions.d.ts +1 -0
  7. package/dist/containers/ExamResult/configs/types.d.ts +5 -2
  8. package/dist/containers/ExamResult/hooks/useExamResult.d.ts +2 -0
  9. package/dist/containers/ExamResult/views/ExamResultV2.d.ts +1 -0
  10. package/dist/containers/Textbooks/configs/types.d.ts +1 -6
  11. package/dist/index.css +34 -30
  12. package/dist/index.d.ts +7 -1
  13. package/dist/index.js +1117 -334
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.modern.js +1110 -331
  16. package/dist/index.modern.js.map +1 -1
  17. package/dist/layouts/Header.d.ts +1 -1
  18. package/dist/services/examService.d.ts +1 -0
  19. package/dist/tests/performances/do-exam-session-skip-answer.d.ts +19 -0
  20. package/dist/tests/performances/do-exam-session.d.ts +20 -0
  21. package/dist/tests/performances/do-exam-session2.d.ts +19 -0
  22. package/dist/tests/performances/do-exam.d.ts +15 -0
  23. package/dist/tests/performances/join-exam.d.ts +13 -0
  24. package/dist/tests/performances/login.d.ts +20 -0
  25. package/dist/tests/performances/ramping-vus.d.ts +7 -0
  26. package/dist/utils/constants.d.ts +1 -0
  27. package/dist/utils/enums/examStatus.d.ts +6 -0
  28. package/dist/utils/enums/index.d.ts +2 -1
  29. package/dist/utils/enums/orderBy.d.ts +4 -0
  30. package/dist/utils/helpers.d.ts +10 -0
  31. package/dist/utils/hooks/useCheckExam.d.ts +5 -0
  32. package/dist/utils/hooks/useCountDownTimer.d.ts +11 -0
  33. package/dist/utils/hooks/useLoadMore.d.ts +9 -0
  34. package/dist/utils/hooks/useSwitchAcademy.d.ts +1 -0
  35. package/dist/utils/hooks/useVirtualizeList.d.ts +9 -0
  36. package/dist/utils/times.d.ts +2 -0
  37. package/package.json +1 -1
@@ -3,11 +3,11 @@ import { TabType } from "../utils/types/tab";
3
3
  import { Role } from "../utils/constants";
4
4
  interface Props {
5
5
  role: Role;
6
- onSignOut: () => void;
7
6
  academyListRoute: any;
8
7
  homeRoute: any;
9
8
  headerTabs: TabType[];
10
9
  history: any;
10
+ onSignOut: () => void;
11
11
  }
12
12
  declare const Header: FC<Props>;
13
13
  export default Header;
@@ -0,0 +1 @@
1
+ export declare const getCheckStatusExam: (examCode: string) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -0,0 +1,19 @@
1
+ export function setup(): {
2
+ id: number;
3
+ code: string;
4
+ teacherAuthorizeHeaders: {
5
+ Authorization: string;
6
+ } & {
7
+ "Academy-Headers": string;
8
+ "Content-Type": string;
9
+ "Accept-Language": string;
10
+ };
11
+ }[];
12
+ export default function _default(data: any): void;
13
+ export namespace options {
14
+ export { MAX_DEMO_STUDENTS as vus };
15
+ export { MAX_DEMO_STUDENTS as iterations };
16
+ }
17
+ declare const AcademyHeaders: "Academy-Headers";
18
+ declare const MAX_DEMO_STUDENTS: 96;
19
+ export {};
@@ -0,0 +1,20 @@
1
+ export function setup(): {
2
+ id: number;
3
+ code: string;
4
+ teacherAuthorizeHeaders: {
5
+ Authorization: string;
6
+ } & {
7
+ "Academy-Headers": string;
8
+ "Content-Type": string;
9
+ "Accept-Language": string;
10
+ };
11
+ }[];
12
+ export function teardown(data: any): void;
13
+ export default function _default(data: any): void;
14
+ export namespace options {
15
+ export { MAX_DEMO_STUDENTS as vus };
16
+ export { MAX_DEMO_STUDENTS as iterations };
17
+ }
18
+ declare const AcademyHeaders: "Academy-Headers";
19
+ declare const MAX_DEMO_STUDENTS: 300;
20
+ export {};
@@ -0,0 +1,19 @@
1
+ export function setup(): {
2
+ id: number;
3
+ code: string;
4
+ teacherAuthorizeHeaders: {
5
+ Authorization: string;
6
+ } & {
7
+ "Academy-Headers": string;
8
+ "Content-Type": string;
9
+ "Accept-Language": string;
10
+ };
11
+ }[];
12
+ export default function _default(data: any): void;
13
+ export namespace options {
14
+ export { MAX_DEMO_STUDENTS as vus };
15
+ export { MAX_DEMO_STUDENTS as iterations };
16
+ }
17
+ declare const AcademyHeaders: "Academy-Headers";
18
+ declare const MAX_DEMO_STUDENTS: 1;
19
+ export {};
@@ -0,0 +1,15 @@
1
+ export function teacherScenario(): void;
2
+ export function studentsScenario(): void;
3
+ export function setup(): {
4
+ abc: string;
5
+ };
6
+ export default function _default(data: any): void;
7
+ export namespace options {
8
+ export namespace scenarios {
9
+ export namespace students_scenario {
10
+ export const executor: string;
11
+ export const vus: number;
12
+ export const iterations: number;
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,13 @@
1
+ export function teacherGetOrCreateExamSession(): any;
2
+ export function studentsScenario(code: any): void;
3
+ export function setup(): any;
4
+ export default function _default(data: any): void;
5
+ export namespace options {
6
+ export namespace scenarios {
7
+ export namespace students_scenario {
8
+ export const executor: string;
9
+ export const vus: number;
10
+ export const iterations: number;
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,20 @@
1
+ export function teacher_scenario(): void;
2
+ export function students_scenario(): void;
3
+ export default function _default(): void;
4
+ export namespace options {
5
+ export namespace scenarios {
6
+ export namespace teacher_scenario {
7
+ export const executor: string;
8
+ export const vus: number;
9
+ export const iterations: number;
10
+ }
11
+ export namespace students_scenario {
12
+ const executor_1: string;
13
+ export { executor_1 as executor };
14
+ const vus_1: number;
15
+ export { vus_1 as vus };
16
+ const iterations_1: number;
17
+ export { iterations_1 as iterations };
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,7 @@
1
+ export default function _default(): void;
2
+ export namespace options {
3
+ export const stages: {
4
+ target: number;
5
+ duration: string;
6
+ }[];
7
+ }
@@ -31,5 +31,6 @@ export declare enum Language {
31
31
  en = "en"
32
32
  }
33
33
  export declare const PrintHeaderClassName = "print-header";
34
+ export declare const PrintTitleClassName = "print-title";
34
35
  export declare const PrintContentClassName = "print-content";
35
36
  export declare const PrintContainerClassName = "print-container";
@@ -0,0 +1,6 @@
1
+ export declare enum ExamStatus {
2
+ Default = 0,
3
+ Pending = 1,
4
+ InProgress = 2,
5
+ Completed = 3
6
+ }
@@ -1,2 +1,3 @@
1
+ import { ExamStatus } from "./examStatus";
1
2
  import { OrderType } from "./order";
2
- export { OrderType };
3
+ export { OrderType, ExamStatus };
@@ -0,0 +1,4 @@
1
+ export declare enum OrderBy {
2
+ ASC = "ASC",
3
+ DESC = "DESC"
4
+ }
@@ -5,5 +5,15 @@ export declare type FormatDataMyAnswer = {
5
5
  questions: Question[];
6
6
  };
7
7
  export declare const ellipsisText: (text: string, maxLength: number) => string;
8
+ export declare const getOrdinalSuffix: (number: number, lang: string) => string;
8
9
  export declare const formatDataMyAnswer: (inputData: ExamResult, categories: CategoryResponse[]) => FormatDataMyAnswer[];
10
+ export declare const totalSolveTimeCategories: (inputData: ExamResult, categories: CategoryResponse[]) => {
11
+ totalSolveTime: any;
12
+ id: number;
13
+ name: string;
14
+ totalQuestions: number;
15
+ totalCorrectQuestions: number;
16
+ totalAnsweredQuestions: number;
17
+ percentageAmongStudents: number;
18
+ }[];
9
19
  export declare const formatTimeSecond: (duration: number, t: any) => string;
@@ -0,0 +1,5 @@
1
+ import { ExamStatus } from "../enums";
2
+ declare const useCheckExam: (code: string, status?: ExamStatus | undefined) => {
3
+ isCheck: any;
4
+ };
5
+ export default useCheckExam;
@@ -0,0 +1,11 @@
1
+ import { ExamStatus } from "../enums/examStatus";
2
+ interface Props {
3
+ startTime?: string;
4
+ code?: string;
5
+ status?: ExamStatus;
6
+ duration?: string;
7
+ fetchedCount?: number;
8
+ onFinish: () => void;
9
+ }
10
+ declare const useCountDownTimer: (props: Props) => number | undefined;
11
+ export default useCountDownTimer;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ interface Props {
3
+ onLoadMore: () => void;
4
+ loading: boolean;
5
+ }
6
+ declare const useLoadMore: (props: Props) => {
7
+ observerTarget: import("react").RefObject<HTMLDivElement>;
8
+ };
9
+ export default useLoadMore;
@@ -6,5 +6,6 @@ declare const useSwitchAcademy: (role: Role | undefined, history: any, homeAcade
6
6
  academyList: AcademyResponse[];
7
7
  toggleDropdown: () => void;
8
8
  handleSwitchAcademy: (selectedAcademy?: AcademyResponse | undefined, isLoading?: boolean) => Promise<void>;
9
+ handleLogOutAcademy: (selectedAcademy: AcademyResponse, callback: any) => Promise<void>;
9
10
  };
10
11
  export default useSwitchAcademy;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ declare const useVirtualizeList: (totalItems: number, rowHeight: number, offsetRow?: number, minRows?: number | undefined) => {
3
+ startIndex: number;
4
+ endIndex: number;
5
+ containerRef: import("react").RefObject<HTMLDivElement>;
6
+ handleChangeStartIndex: (index: number) => void;
7
+ handleChangeEndIndex: (index: number) => void;
8
+ };
9
+ export default useVirtualizeList;
@@ -2,3 +2,5 @@ import moment from "moment";
2
2
  export declare const getLocalDayOfWeek: (utcDateTime: string, dayOfWeek: number) => number;
3
3
  export declare const getUtcDayOfWeek: (localDateTime: moment.Moment, dayOfWeek: number) => number;
4
4
  export declare const timeSpanToLocalMoment: (time: string, date?: string | undefined) => moment.Moment | null;
5
+ export declare const convertHHMMSStoSeconds: (time: string) => number;
6
+ export declare const getRemainTime: (startTime: string, duration: string) => number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "touchstudy-core",
3
- "version": "0.1.64",
3
+ "version": "0.1.66",
4
4
  "description": "Contains core components && functions for TouchStudy project",
5
5
  "author": "brss",
6
6
  "license": "MIT",