touchstudy-core 0.1.194 → 0.1.196

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 (115) hide show
  1. package/dist/add-ts-nocheck.js +33 -0
  2. package/dist/alert-circle-fill~CSSkoNUz.svg +3 -0
  3. package/dist/calendar_fill~zEgxFwDs.svg +4 -0
  4. package/dist/check-circle_fill~bbGHfKpz.svg +3 -0
  5. package/dist/checked-circle_fill~KLGxfRpW.svg +3 -0
  6. package/dist/clock_fill~mcRclYYO.svg +3 -0
  7. package/dist/close-circle_fill~PRVaHJUQ.svg +3 -0
  8. package/dist/components/Chats/ChatContainer.d.ts +5 -1
  9. package/dist/components/Chats/components/CanvasOverlay.d.ts +11 -0
  10. package/dist/components/Chats/components/InputChat.d.ts +8 -2
  11. package/dist/components/Chats/components/SketchDialog/BgColorTool.d.ts +8 -0
  12. package/dist/components/Chats/components/SketchDialog/BgImgAlignTool.d.ts +10 -0
  13. package/dist/components/Chats/components/SketchDialog/BgImgAlignToolList.d.ts +9 -0
  14. package/dist/components/Chats/components/SketchDialog/BgImgTool.d.ts +13 -0
  15. package/dist/components/Chats/components/SketchDialog/CanvasOverlay.d.ts +11 -0
  16. package/dist/components/Chats/components/SketchDialog/ColorPicker.d.ts +8 -0
  17. package/dist/components/Chats/components/SketchDialog/EraserTool.d.ts +9 -0
  18. package/dist/components/Chats/components/SketchDialog/PencilTool.d.ts +11 -0
  19. package/dist/components/Chats/components/SketchDialog/WidthSlider.d.ts +7 -0
  20. package/dist/components/Chats/components/SketchDialog/index.d.ts +9 -0
  21. package/dist/components/Chats/components/SketchDialog.d.ts +7 -0
  22. package/dist/components/Chats/configs/constants.d.ts +8 -1
  23. package/dist/components/Chats/configs/types.d.ts +2 -0
  24. package/dist/components/Chats/hooks/useChatContainer.d.ts +6 -2
  25. package/dist/components/Chats/styles/styles.d.ts +42 -0
  26. package/dist/components/CkEditor/CkEditor.d.ts +10 -0
  27. package/dist/components/CkEditor/config.d.ts +19 -0
  28. package/dist/components/CkEditor/index.d.ts +2 -0
  29. package/dist/components/Print/hooks/useDeviceType.d.ts +4 -0
  30. package/dist/containers/ExamResult/components/GradesByTerritory/Textbook.d.ts +12 -0
  31. package/dist/containers/ExamResult/components/GradesByTerritory/index.d.ts +12 -0
  32. package/dist/containers/ExamResult/components/ProtractedProblem/index.d.ts +10 -0
  33. package/dist/containers/ExamResult/components/TrickyProblem/Textbook.d.ts +10 -0
  34. package/dist/containers/ExamResult/components/TrickyProblem/index.d.ts +11 -0
  35. package/dist/containers/ExamResult/components/Vulnerable/Textbook.d.ts +11 -0
  36. package/dist/containers/ExamResult/components/Vulnerable/index.d.ts +12 -0
  37. package/dist/containers/Exams/components/ArticleBlock.d.ts +20 -0
  38. package/dist/containers/Exams/components/ArticleGroupView.d.ts +33 -0
  39. package/dist/containers/Exams/components/QuestionBlock.d.ts +19 -0
  40. package/dist/containers/Exams/components/QuestionCompareType.d.ts +9 -0
  41. package/dist/containers/Exams/components/QuestionGroupBlock.d.ts +28 -0
  42. package/dist/containers/Exams/components/QuestionGroupBlockBody.d.ts +23 -0
  43. package/dist/containers/Exams/components/QuestionOrderName.d.ts +9 -0
  44. package/dist/containers/Exams/components/QuestionShortInput.d.ts +13 -0
  45. package/dist/containers/Exams/components/QuestionView.d.ts +20 -0
  46. package/dist/containers/Exams/hooks/useOverallChartContainer.d.ts +9 -0
  47. package/dist/containers/Exams/styles/styles.d.ts +6 -0
  48. package/dist/containers/Notes/components/TeacherAdminNoteDialog.d.ts +4 -0
  49. package/dist/containers/PreparedTextbook/components/Article.d.ts +20 -0
  50. package/dist/containers/PreparedTextbook/components/ArticleBlock.d.ts +20 -0
  51. package/dist/containers/PreparedTextbook/components/Chapter.d.ts +19 -0
  52. package/dist/containers/PreparedTextbook/components/QuestionBlock.d.ts +19 -0
  53. package/dist/containers/PreparedTextbook/components/QuestionCompareType.d.ts +8 -0
  54. package/dist/containers/PreparedTextbook/components/QuestionGroupBlock.d.ts +28 -0
  55. package/dist/containers/PreparedTextbook/components/QuestionGroupBlockBody.d.ts +24 -0
  56. package/dist/containers/PreparedTextbook/components/QuestionOrderName.d.ts +9 -0
  57. package/dist/containers/PreparedTextbook/components/QuestionScore.d.ts +9 -0
  58. package/dist/containers/PreparedTextbook/components/QuestionShortInput.d.ts +12 -0
  59. package/dist/containers/PreparedTextbook/components/QuestionTypeFilter.d.ts +10 -0
  60. package/dist/containers/PreparedTextbook/components/SubChapter.d.ts +18 -0
  61. package/dist/containers/PreparedTextbook/components/TextbookOwners.d.ts +13 -0
  62. package/dist/containers/PreparedTextbook/hooks/useExamDetailView.d.ts +30 -0
  63. package/dist/containers/PreparedTextbook/hooks/useTextbookOptions.d.ts +15 -0
  64. package/dist/containers/PreparedTextbook/styles/styles.d.ts +6 -0
  65. package/dist/containers/PreparedTextbook/views/PreparedTextbook.d.ts +8 -0
  66. package/dist/containers/StudentInfoDrawer/components/Attendance/AttedanceFormDialog.d.ts +13 -0
  67. package/dist/containers/StudentInfoDrawer/components/AttendanceCourseTable.d.ts +15 -0
  68. package/dist/containers/StudentInfoDrawer/components/CourseAttendanceItem.d.ts +10 -0
  69. package/dist/containers/StudentInfoDrawer/components/CourseAttendanceList.d.ts +4 -0
  70. package/dist/containers/StudentInfoDrawer/components/DrawerAttendanceTab.d.ts +4 -0
  71. package/dist/containers/StudentInfoDrawer/components/DrawerExamResultTab.d.ts +9 -0
  72. package/dist/containers/StudentInfoDrawer/components/DrawerNoteTab.d.ts +8 -0
  73. package/dist/containers/StudentInfoDrawer/components/DrawerTextbookResultTab.d.ts +7 -0
  74. package/dist/containers/StudentInfoDrawer/components/Exam/ExanResultList.d.ts +4 -0
  75. package/dist/containers/StudentInfoDrawer/components/ExamResultDrawer.d.ts +13 -0
  76. package/dist/containers/StudentInfoDrawer/components/ExamResultItem.d.ts +10 -0
  77. package/dist/containers/StudentInfoDrawer/components/ExanResultList.d.ts +4 -0
  78. package/dist/containers/StudentInfoDrawer/components/LessonTooltip.d.ts +8 -0
  79. package/dist/containers/StudentInfoDrawer/components/NoteDrawer.d.ts +13 -0
  80. package/dist/containers/StudentInfoDrawer/components/TextbookResultItem.d.ts +10 -0
  81. package/dist/containers/StudentInfoDrawer/components/TextbookResultList.d.ts +4 -0
  82. package/dist/containers/Textbooks/components/ChapterBox.d.ts +4 -0
  83. package/dist/containers/Textbooks/configs/interfaces.d.ts +21 -0
  84. package/dist/containers/Textbooks/hooks/useExam.d.ts +16 -0
  85. package/dist/containers/Textbooks/hooks/useTextbookDetail.d.ts +55 -0
  86. package/dist/containers/Textbooks/views/TextbookDetail.d.ts +15 -0
  87. package/dist/iconPerson~bfprHOKm.svg +4 -0
  88. package/dist/index.js +1001 -139
  89. package/dist/index.js.map +1 -1
  90. package/dist/index.modern.js +1006 -144
  91. package/dist/index.modern.js.map +1 -1
  92. package/dist/layouts/HeaderLink.d.ts +8 -0
  93. package/dist/layouts/TimerCountItem.d.ts +10 -0
  94. package/dist/layouts/TimerDialog.d.ts +9 -0
  95. package/dist/layouts/TimerDropdown.d.ts +3 -0
  96. package/dist/layouts/TimerItem.d.ts +11 -0
  97. package/dist/layouts/configs/constants.d.ts +12 -0
  98. package/dist/layouts/hooks/useCountDownTimer.d.ts +9 -0
  99. package/dist/layouts/partials/AlarmClock.d.ts +10 -0
  100. package/dist/layouts/partials/AlarmClockPanel.d.ts +10 -0
  101. package/dist/layouts/partials/AlarmClockTab.d.ts +10 -0
  102. package/dist/layouts/partials/CircularTimer/index.d.ts +11 -0
  103. package/dist/layouts/partials/CircularTimer/tick.d.ts +9 -0
  104. package/dist/layouts/partials/CircularTimer.d.ts +11 -0
  105. package/dist/layouts/partials/StudyTimerTab.d.ts +12 -0
  106. package/dist/layouts/partials/TimerCountItem.d.ts +10 -0
  107. package/dist/layouts/partials/TimerItem.d.ts +11 -0
  108. package/dist/layouts/partials/TimerTabPanel.d.ts +8 -0
  109. package/dist/layouts/partials/TimerTabs.d.ts +7 -0
  110. package/dist/utils/enums/subject.d.ts +6 -0
  111. package/dist/utils/functions/checkSuperUrl.d.ts +1 -0
  112. package/dist/utils/functions/isRealTabletOrMobileDevice.d.ts +1 -0
  113. package/dist/utils/types/subjects.d.ts +19 -0
  114. package/package.json +8 -9
  115. /package/dist/utils/types/{questionTypeFilter.d.ts → QuestionTypeFilter.d.ts} +0 -0
@@ -0,0 +1,8 @@
1
+ import { FC, ReactElement } from "react";
2
+ import { TabType } from "../utils/types/tab";
3
+ interface HeaderLinkProps {
4
+ data: TabType;
5
+ render: (data: TabType, active: boolean) => ReactElement;
6
+ }
7
+ declare const HeaderLink: FC<HeaderLinkProps>;
8
+ export default HeaderLink;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { SubjectTimerResponse } from "../utils/types/subjects";
3
+ interface Props {
4
+ data: SubjectTimerResponse;
5
+ loading: boolean;
6
+ activeTimerId?: number;
7
+ onChangeTime: (data: SubjectTimerResponse, time?: number) => void;
8
+ }
9
+ declare const TimerCountItem: FC<Props>;
10
+ export default TimerCountItem;
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ import { StudyTimerTabProps } from "./partials/StudyTimerTab";
3
+ interface Props {
4
+ studyTimerProps: StudyTimerTabProps;
5
+ open: boolean;
6
+ onTogge: () => void;
7
+ }
8
+ declare const TimerDialog: FC<Props>;
9
+ export default TimerDialog;
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ declare const TimerDropdown: FC;
3
+ export default TimerDropdown;
@@ -0,0 +1,11 @@
1
+ import { FC } from "react";
2
+ import { SubjectTimerResponse } from "../utils/types/subjects";
3
+ interface Props {
4
+ data: SubjectTimerResponse;
5
+ seconds?: number;
6
+ loading: boolean;
7
+ activeTimerId?: number;
8
+ onStartOrPauseTimer: (data: SubjectTimerResponse) => void;
9
+ }
10
+ declare const TimerItem: FC<Props>;
11
+ export default TimerItem;
@@ -0,0 +1,12 @@
1
+ export declare const QUICK_START_OPTIONS: number[];
2
+ export declare const SUBJECT_OPTIONS: {
3
+ label: string;
4
+ value: number;
5
+ }[];
6
+ export declare const INNER_OFFSET = 24;
7
+ export declare const TICK_WIDTH = 1;
8
+ export declare const ACTIVE_TICK_WIDTH = 2;
9
+ export declare const TICK_SPACING: number;
10
+ export declare const STROKE_WIDTH = 4;
11
+ export declare const DEFAULT_CIRCULAR_TIMER_SIZE = 160;
12
+ export declare const MAX_TIME_CIRCULAR_TIMER = 999;
@@ -0,0 +1,9 @@
1
+ import { TimerStatus } from "../../utils";
2
+ interface Props {
3
+ startTime?: string;
4
+ status?: TimerStatus;
5
+ duration: number;
6
+ onFinish?: () => void;
7
+ }
8
+ declare const useCountDownTimer: (props: Props) => number | undefined;
9
+ export default useCountDownTimer;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ export interface AlarmClockProps {
3
+ totalMinutes: number;
4
+ isPlaying: boolean;
5
+ onTerminate: () => void;
6
+ onPause: () => void;
7
+ onResume: () => void;
8
+ }
9
+ declare const AlarmClock: FC<AlarmClockProps>;
10
+ export default AlarmClock;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ export interface AlarmClockPanelProps {
3
+ value: number;
4
+ max?: number;
5
+ onStart: () => void;
6
+ onChange: (val: number) => void;
7
+ onIncrease: (val: number) => void;
8
+ }
9
+ declare const AlarmClockPanel: FC<AlarmClockPanelProps>;
10
+ export default AlarmClockPanel;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { AlarmClockPanelProps } from "./AlarmClockPanel";
3
+ import { AlarmClockProps } from "./AlarmClock";
4
+ interface Props {
5
+ isStarted: boolean;
6
+ panelProps: AlarmClockPanelProps;
7
+ alarmProps: AlarmClockProps;
8
+ }
9
+ declare const AlarmClockTab: FC<Props>;
10
+ export default AlarmClockTab;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ interface CircularTimerProps {
3
+ edit: boolean;
4
+ value?: number;
5
+ remainSeconds?: number;
6
+ onChange?: (val: number) => void;
7
+ maxMinutes: number;
8
+ size?: number;
9
+ }
10
+ declare const CircularTimer: React.FC<CircularTimerProps>;
11
+ export default CircularTimer;
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ index: number;
4
+ isDragging: boolean;
5
+ isActive: boolean;
6
+ isHovering: boolean;
7
+ }
8
+ declare const Tick: FC<Props>;
9
+ export default Tick;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ interface CircularTimerProps {
3
+ edit: boolean;
4
+ value?: number;
5
+ passedSeconds?: number;
6
+ onChange?: (val: number) => void;
7
+ maxMinutes?: number;
8
+ size?: number;
9
+ }
10
+ declare const CircularTimer: React.FC<CircularTimerProps>;
11
+ export default CircularTimer;
@@ -0,0 +1,12 @@
1
+ import { FC } from "react";
2
+ import { SubjectTimerResponse } from "../../utils/types";
3
+ export interface StudyTimerTabProps {
4
+ subjects: SubjectTimerResponse[];
5
+ isFetching: boolean;
6
+ loadingItem: boolean;
7
+ activeTimerId?: number;
8
+ time?: number;
9
+ onStartOrPause: (data: SubjectTimerResponse) => void;
10
+ }
11
+ declare const StudyTimerTab: FC<StudyTimerTabProps>;
12
+ export default StudyTimerTab;
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { SubjectTimerResponse } from "../../utils/types/subjects";
3
+ interface Props {
4
+ data: SubjectTimerResponse;
5
+ loading: boolean;
6
+ activeTimerId?: number;
7
+ onChangeTime: (data: SubjectTimerResponse, time?: number) => void;
8
+ }
9
+ declare const TimerCountItem: FC<Props>;
10
+ export default TimerCountItem;
@@ -0,0 +1,11 @@
1
+ import { FC } from "react";
2
+ import { SubjectTimerResponse } from "../../utils/types/subjects";
3
+ interface Props {
4
+ data: SubjectTimerResponse;
5
+ seconds?: number;
6
+ loading: boolean;
7
+ activeTimerId?: number;
8
+ onStartOrPauseTimer: (data: SubjectTimerResponse) => void;
9
+ }
10
+ declare const TimerItem: FC<Props>;
11
+ export default TimerItem;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface Props {
3
+ children?: React.ReactNode;
4
+ index: number;
5
+ value: number;
6
+ }
7
+ declare const TimerTabPanel: React.FC<Props>;
8
+ export default TimerTabPanel;
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ value: number;
4
+ onChange: (e: any, newValue: number) => void;
5
+ }
6
+ declare const TimerTabs: FC<Props>;
7
+ export default TimerTabs;
@@ -0,0 +1,6 @@
1
+ export declare enum TimerStatus {
2
+ NotStarted = 0,
3
+ Started = 1,
4
+ Paused = 2,
5
+ Stopped = 3
6
+ }
@@ -0,0 +1 @@
1
+ export declare const checkSuperUrl: (superUrls: string[], pathname: string) => boolean;
@@ -0,0 +1 @@
1
+ export declare const isMobileOrTabletRealDevice: () => boolean;
@@ -0,0 +1,19 @@
1
+ import { TimerStatus } from "../enums/subject";
2
+ export declare type SubjectTimerResponse = {
3
+ id: number;
4
+ recordId: number;
5
+ name: string;
6
+ startTime: string;
7
+ lastResumeTime: string;
8
+ lastPauseTime: string;
9
+ duration: number;
10
+ status: TimerStatus;
11
+ rowVersion: string;
12
+ };
13
+ export declare type ResumeOrPauseRequest = {
14
+ status: TimerStatus;
15
+ pauseTime?: number;
16
+ startTime?: number;
17
+ duration?: number;
18
+ rowVersion: string;
19
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "touchstudy-core",
3
- "version": "0.1.194",
3
+ "version": "0.1.196",
4
4
  "description": "Contains core components && functions for TouchStudy project",
5
5
  "author": "brss",
6
6
  "license": "MIT",
@@ -17,6 +17,8 @@
17
17
  "@mui/material": "^5.14.12",
18
18
  "@mui/x-date-pickers": "^6.19.6",
19
19
  "@reduxjs/toolkit": "^2.0.1",
20
+ "@tinymce/tinymce-react": "^6.0.0",
21
+ "@wiris/mathtype-tinymce6": "^8.12.0",
20
22
  "axios": "^1.6.2",
21
23
  "better-react-mathjax": "^2.1.0",
22
24
  "formik": "^2.4.5",
@@ -24,6 +26,7 @@
24
26
  "html2pdf.js": "^0.10.2",
25
27
  "i18next": "^23.7.16",
26
28
  "link": "^2.1.0",
29
+ "lodash": "^4.17.21",
27
30
  "moment": "^2.29.4",
28
31
  "node-sass": "^7.0.3",
29
32
  "pusher-js": "^8.4.0-rc2",
@@ -32,19 +35,17 @@
32
35
  "react-i18next": "^14.0.0",
33
36
  "react-icons": "^4.12.0",
34
37
  "react-select": "^5.8.0",
38
+ "react-sketch-canvas": "^6.2.0",
35
39
  "react-slick": "^0.29.0",
36
40
  "react-toastify": "^9.1.3",
37
41
  "react-virtualized": "^9.22.6",
42
+ "tinymce": "^7.7.0",
38
43
  "yup": "^1.3.3"
39
44
  },
40
45
  "peerDependencies": {
41
46
  "react": "^18.2.0",
42
47
  "react-dom": "^18.2.0",
43
- "react-redux": "^9.0.4",
44
- "lodash": "^4.17.21",
45
- "@wiris/mathtype-tinymce6": "^8.12.0",
46
- "@tinymce/tinymce-react": "^6.0.0",
47
- "tinymce": "^7.7.0"
48
+ "react-redux": "^9.0.4"
48
49
  },
49
50
  "scripts": {
50
51
  "build": "microbundle-crl --no-compress --format modern,cjs",
@@ -97,8 +98,6 @@
97
98
  "react-apexcharts": "1.3.6",
98
99
  "react-scripts": "5.0.1",
99
100
  "redux-logger": "^3.0.6",
100
- "typescript": "^4.9.5",
101
- "@tinymce/tinymce-react": "^6.0.0",
102
- "tinymce": "^7.7.0"
101
+ "typescript": "^4.9.5"
103
102
  }
104
103
  }