touchstudy-core 0.1.139 → 0.1.141

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 (74) hide show
  1. package/README.md +46 -46
  2. package/dist/StudyTouch_Character_v1_Question~jLFvuYmI.png +0 -0
  3. package/dist/components/Chats/ChatHeader.d.ts +25 -0
  4. package/dist/components/Chats/ChatItem.d.ts +31 -0
  5. package/dist/components/Chats/ChatLeftItem.d.ts +4 -0
  6. package/dist/components/Chats/ChatList.d.ts +14 -0
  7. package/dist/components/Chats/ChatRightItem.d.ts +4 -0
  8. package/dist/components/Chats/InputChat.d.ts +16 -0
  9. package/dist/components/Chats/components/CustomTooltip.d.ts +2 -0
  10. package/dist/components/CkEditor/CkEditor.d.ts +19 -0
  11. package/dist/components/CkEditor/config.d.ts +19 -0
  12. package/dist/components/CkEditor/index.d.ts +2 -0
  13. package/dist/components/ErrorHandler.d.ts +6 -0
  14. package/dist/components/LabelRequired.d.ts +8 -0
  15. package/dist/components/List/configs/interfaces.d.ts +1 -1
  16. package/dist/components/List/partials/VirtualListItem.d.ts +1 -1
  17. package/dist/components/Selectors/InActiveAcademySelector.d.ts +16 -0
  18. package/dist/components/Tables/VirtualTableRowItem.d.ts +6 -5
  19. package/dist/components/Tables/VirtualTableView.d.ts +1 -1
  20. package/dist/components/Tables/configs/interfaces.d.ts +11 -4
  21. package/dist/components/Tables/hooks/useVirtualTableView.d.ts +7 -0
  22. package/dist/containers/Academies/hooks/usePassCodeDialog.d.ts +10 -0
  23. package/dist/containers/ExamResult/components/MyAnswer/components/CreateNewQuestion.d.ts +15 -0
  24. package/dist/containers/Exams/configs/types.d.ts +22 -0
  25. package/dist/containers/Notes/components/NoteItem.d.ts +1 -0
  26. package/dist/containers/PreparedTextbook/apiClients/academyService.d.ts +1 -0
  27. package/dist/containers/PreparedTextbook/apiClients/textbookService.d.ts +1 -1
  28. package/dist/containers/PreparedTextbook/components/AcademySelector.d.ts +1 -0
  29. package/dist/containers/PreparedTextbook/components/Article.d.ts +2 -3
  30. package/dist/containers/PreparedTextbook/components/OwnerSelector.d.ts +2 -2
  31. package/dist/containers/PreparedTextbook/components/PreparedTextbookForm.d.ts +1 -0
  32. package/dist/containers/PreparedTextbook/components/TextbookOwners.d.ts +13 -0
  33. package/dist/containers/PreparedTextbook/configs/types.d.ts +1 -3
  34. package/dist/containers/PreparedTextbook/hooks/useSelect.d.ts +8 -10
  35. package/dist/containers/Users/components/Dialogs/DeleteUserCsvDialog.d.ts +10 -0
  36. package/dist/containers/Users/components/Dialogs/RecentUserActionDialog.d.ts +9 -0
  37. package/dist/containers/Users/components/Dialogs/UserDialog.d.ts +12 -0
  38. package/dist/index.css +9 -9
  39. package/dist/index.js +762 -454
  40. package/dist/index.js.map +1 -1
  41. package/dist/index.modern.js +764 -465
  42. package/dist/index.modern.js.map +1 -1
  43. package/dist/tests/performances/do-exam-session-list-student.d.ts +19 -0
  44. package/dist/tests/performances/do-exam-session-request-answer-one-time.d.ts +19 -0
  45. package/dist/tests/performances/do-exam-session-skip-answer.d.ts +19 -0
  46. package/dist/tests/performances/do-exam-session2.d.ts +19 -0
  47. package/dist/utils/canAccessRoute.d.ts +2 -0
  48. package/dist/utils/constants.d.ts +2 -10
  49. package/dist/utils/diffFromNow.d.ts +3 -0
  50. package/dist/utils/encodeParams.d.ts +2 -0
  51. package/dist/utils/formatTime.d.ts +4 -0
  52. package/dist/utils/getAcademyDomain.d.ts +2 -0
  53. package/dist/utils/getAccessToken.d.ts +2 -0
  54. package/dist/utils/getErrorMessage.d.ts +1 -0
  55. package/dist/utils/getLanguage.d.ts +2 -0
  56. package/dist/utils/getLearningSpace.d.ts +2 -0
  57. package/dist/utils/getRedirectUrl.d.ts +2 -0
  58. package/dist/utils/helpers.d.ts +22 -0
  59. package/dist/utils/index.d.ts +1 -0
  60. package/dist/utils/isLocalHost.d.ts +2 -0
  61. package/dist/utils/minutesToTimeSpan.d.ts +2 -0
  62. package/dist/utils/pusherTo.d.ts +1 -0
  63. package/dist/utils/times.d.ts +6 -0
  64. package/dist/utils/toISOString.d.ts +2 -0
  65. package/dist/utils/toLocalTime.d.ts +1 -0
  66. package/dist/utils/types/checkSuperUrl.d.ts +1 -0
  67. package/dist/utils/types.d.ts +9 -0
  68. package/dist/utils/utcToLocalTime.d.ts +2 -0
  69. package/package.json +102 -102
  70. package/dist/.DS_Store +0 -0
  71. package/dist/components/.DS_Store +0 -0
  72. package/dist/containers/.DS_Store +0 -0
  73. package/dist/redux/.DS_Store +0 -0
  74. package/dist/utils/.DS_Store +0 -0
@@ -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: number;
19
+ 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: 200;
19
+ 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: 96;
19
+ 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: 400;
19
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const canAccess: (userRoles: any[], componentRoles: any[]) => boolean;
2
+ export default canAccess;
@@ -62,19 +62,11 @@ export declare const PrintTitleClassName = "print-title";
62
62
  export declare const PrintContentClassName = "print-content";
63
63
  export declare const PrintContainerClassName = "print-container";
64
64
  export declare const DEFAULT_PAGING_RESPONSE: PagingResponse;
65
- export declare const SCHOOL_OPTIONS: {
65
+ export declare const GRADE_OPTIONS: {
66
66
  label: string;
67
67
  value: number;
68
68
  }[];
69
- export declare const ELEMENTARY_GRADES: {
70
- label: string;
71
- value: number;
72
- }[];
73
- export declare const MIDDLE_GRADES: {
74
- label: string;
75
- value: number;
76
- }[];
77
- export declare const HIGH_GRADES: {
69
+ export declare const BRIEF_GRADE_OPTIONS: {
78
70
  label: string;
79
71
  value: number;
80
72
  }[];
@@ -0,0 +1,3 @@
1
+ import { unitOfTime } from "moment";
2
+ declare const _default: (time: string, unitOfTime: unitOfTime.Diff, targetTime?: string | undefined) => number | "";
3
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: (params: any) => string;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import moment from "moment";
2
+ declare const _default: (time: string, ORIGINAL_FORMAT: string, FORMAT?: string | undefined) => string;
3
+ export default _default;
4
+ export declare const compareTimeSpanFromMoment: (time1: moment.Moment, time2: moment.Moment) => 0 | 1 | -1;
@@ -0,0 +1,2 @@
1
+ declare const getAcademyDomain: () => string | null;
2
+ export default getAcademyDomain;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => string | null;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const getErrorMessage: (t: any, error: any, defaultErrorMessage?: string | undefined) => string;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => string | null;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const getLearningSpace: () => boolean;
2
+ export default getLearningSpace;
@@ -0,0 +1,2 @@
1
+ declare const getRedirectUrl: () => string | null | undefined;
2
+ export default getRedirectUrl;
@@ -0,0 +1,22 @@
1
+ import { Category, CategoryResponse, ExamResult, Question } from "../containers/ExamResult/configs/types";
2
+ import { Role } from "./constants";
3
+ export declare const formatDateTime: (inputDate: string) => string;
4
+ export declare type FormatDataMyAnswer = {
5
+ category: Category;
6
+ questions: Question[];
7
+ };
8
+ export declare const ellipsisText: (text: string, maxLength: number) => string;
9
+ export declare const getOrdinalSuffix: (number: number, lang: string) => string;
10
+ export declare const formatDataMyAnswer: (inputData: ExamResult, categories: CategoryResponse[]) => FormatDataMyAnswer[];
11
+ export declare const totalSolveTimeCategories: (inputData: ExamResult, categories: CategoryResponse[]) => {
12
+ totalSolveTime: any;
13
+ id: number;
14
+ name: string;
15
+ totalQuestions: number;
16
+ totalCorrectQuestions: number;
17
+ totalAnsweredQuestions: number;
18
+ percentageAmongStudents: number;
19
+ }[];
20
+ export declare const formatTimeSecond: (duration: number, t: any) => string;
21
+ export declare const formatRole: (roles: string[], t: any) => any;
22
+ export declare const getRole: (roles: string[]) => Role.Student | Role.Teacher | Role.Admin | Role.AcademyAdmin | null;
@@ -7,5 +7,6 @@ export * from "./functions";
7
7
  export * from "./hooks";
8
8
  export { useTranslation } from "react-i18next";
9
9
  export { moment, toast };
10
+ export { CellMeasurerCache, Index, MultiGrid } from "react-virtualized";
10
11
  export { OrderBy, RecentUserActionSortBy } from "./types";
11
12
  export type { LoginAccessTokenRequest, BaseSearchQuery, LoginRequest, LoginResponse, RecentUserActionQuery, RecentUserActionResponse, SearchQuery, TableHeaderType, User, UserResponse, UserSearchQuery, PagingResponse, Category, CategoryResponse, ConcurrentConnection, CourseInfo, ExamResult, Question, Student, Exam, ArticleGroup, QuestionResponse, NoteRequest, NoteResponse, QuestionData } from "./types";
@@ -0,0 +1,2 @@
1
+ declare const isLocalHost: boolean;
2
+ export default isLocalHost;
@@ -0,0 +1,2 @@
1
+ declare const _default: (time: number) => string;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const pushTo: (history: any, data: any, isReplace?: boolean) => void;
@@ -0,0 +1,6 @@
1
+ import moment from "moment";
2
+ export declare const getLocalDayOfWeek: (utcDateTime: string, dayOfWeek: number) => number;
3
+ export declare const getUtcDayOfWeek: (localDateTime: moment.Moment, dayOfWeek: number) => number;
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;
@@ -0,0 +1,2 @@
1
+ declare const _default: (time?: string | undefined) => string;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const toLocalTime: (time?: string | undefined, FORMAT?: string | undefined) => string;
@@ -0,0 +1 @@
1
+ export declare const checkSuperUrl: (superUrls: string[], pathname: string) => boolean;
@@ -0,0 +1,9 @@
1
+ export interface INavigateProps {
2
+ history: any;
3
+ }
4
+ export declare enum ExamEvent {
5
+ StartExam = "start-exam",
6
+ TerminateExam = "terminate-exam",
7
+ AddExtraDuration = "add-extra-duration-exam",
8
+ TeacherKickOutStudent = "teacher-kick-out-student"
9
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: (time?: string | undefined, FORMAT?: string | undefined) => string;
2
+ export default _default;
package/package.json CHANGED
@@ -1,102 +1,102 @@
1
- {
2
- "name": "touchstudy-core",
3
- "version": "0.1.139",
4
- "description": "Contains core components && functions for TouchStudy project",
5
- "author": "brss",
6
- "license": "MIT",
7
- "repository": "brss/touchstudy-core",
8
- "main": "dist/index.js",
9
- "module": "dist/index.modern.js",
10
- "source": "src/index.tsx",
11
- "engines": {
12
- "node": ">=10"
13
- },
14
- "dependencies": {
15
- "@hookform/resolvers": "^3.3.3",
16
- "@leecheuk/react-google-login": "^5.4.1",
17
- "@mui/material": "^5.14.12",
18
- "@mui/x-date-pickers": "^6.19.6",
19
- "@reduxjs/toolkit": "^2.0.1",
20
- "@tinymce/tinymce-react": "^6.0.0",
21
- "@wiris/mathtype-tinymce6": "^8.12.0",
22
- "axios": "^1.6.2",
23
- "better-react-mathjax": "^2.1.0",
24
- "formik": "^2.4.5",
25
- "gapi-script": "^1.2.0",
26
- "html2pdf.js": "^0.10.2",
27
- "i18next": "^23.7.16",
28
- "link": "^2.1.0",
29
- "lodash": "^4.17.21",
30
- "moment": "^2.29.4",
31
- "node-sass": "^7.0.3",
32
- "pusher-js": "^8.4.0-rc2",
33
- "react-google-recaptcha-v3": "^1.10.1",
34
- "react-hook-form": "^7.49.2",
35
- "react-i18next": "^14.0.0",
36
- "react-icons": "^4.12.0",
37
- "react-select": "^5.8.0",
38
- "react-slick": "^0.29.0",
39
- "react-toastify": "^9.1.3",
40
- "react-virtualized": "^9.22.5",
41
- "tinymce": "^7.7.0",
42
- "yup": "^1.3.3"
43
- },
44
- "peerDependencies": {
45
- "react": "^18.2.0",
46
- "react-dom": "^18.2.0",
47
- "react-redux": "^9.0.4"
48
- },
49
- "scripts": {
50
- "build": "microbundle-crl --no-compress --format modern,cjs",
51
- "start": "microbundle-crl watch --no-compress --format modern,cjs",
52
- "prepare": "run-s build",
53
- "test": "run-s test:unit test:lint test:build",
54
- "test:build": "run-s build",
55
- "test:lint": "eslint .",
56
- "test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
57
- "test:watch": "react-scripts test --env=jsdom"
58
- },
59
- "files": [
60
- "dist"
61
- ],
62
- "devDependencies": {
63
- "@babel/plugin-proposal-unicode-property-regex": "^7.18.6",
64
- "@testing-library/jest-dom": "^5.17.0",
65
- "@testing-library/react": "^13.4.0",
66
- "@testing-library/user-event": "^13.5.0",
67
- "@types/file-saver": "2.0.7",
68
- "@types/jest": "^27.5.2",
69
- "@types/lodash": "^4.17.16",
70
- "@types/node": "^16.18.68",
71
- "@types/react": "^18.2.45",
72
- "@types/react-dom": "^18.2.18",
73
- "@types/react-redux": "^7.1.33",
74
- "@types/react-slick": "^0.23.13",
75
- "@types/react-virtualized": "^9.22.0",
76
- "@types/redux-logger": "^3.0.12",
77
- "@types/resize-observer-browser": "^0.1.11",
78
- "@types/yup": "^0.32.0",
79
- "apexcharts": "3.15.5",
80
- "babel-eslint": "^10.0.3",
81
- "cross-env": "^7.0.3",
82
- "eslint": "^8.56.0",
83
- "eslint-config-prettier": "^9.1.0",
84
- "eslint-config-standard": "^17.1.0",
85
- "eslint-config-standard-react": "^13.0.0",
86
- "eslint-plugin-import": "^2.29.1",
87
- "eslint-plugin-node": "^11.1.0",
88
- "eslint-plugin-prettier": "^5.1.2",
89
- "eslint-plugin-promise": "^6.1.1",
90
- "eslint-plugin-react": "^7.33.2",
91
- "eslint-plugin-standard": "^5.0.0",
92
- "file-saver": "^2.0.5",
93
- "gh-pages": "^6.1.1",
94
- "microbundle-crl": "^0.13.11",
95
- "npm-run-all": "^4.1.5",
96
- "prettier": "^3.1.1",
97
- "react-apexcharts": "1.3.6",
98
- "react-scripts": "5.0.1",
99
- "redux-logger": "^3.0.6",
100
- "typescript": "^4.9.5"
101
- }
102
- }
1
+ {
2
+ "name": "touchstudy-core",
3
+ "version": "0.1.141",
4
+ "description": "Contains core components && functions for TouchStudy project",
5
+ "author": "brss",
6
+ "license": "MIT",
7
+ "repository": "brss/touchstudy-core",
8
+ "main": "dist/index.js",
9
+ "module": "dist/index.modern.js",
10
+ "source": "src/index.tsx",
11
+ "engines": {
12
+ "node": ">=10"
13
+ },
14
+ "dependencies": {
15
+ "@hookform/resolvers": "^3.3.3",
16
+ "@leecheuk/react-google-login": "^5.4.1",
17
+ "@mui/material": "^5.14.12",
18
+ "@mui/x-date-pickers": "^6.19.6",
19
+ "@reduxjs/toolkit": "^2.0.1",
20
+ "@tinymce/tinymce-react": "^6.0.0",
21
+ "@wiris/mathtype-tinymce6": "^8.12.0",
22
+ "axios": "^1.6.2",
23
+ "better-react-mathjax": "^2.1.0",
24
+ "formik": "^2.4.5",
25
+ "gapi-script": "^1.2.0",
26
+ "html2pdf.js": "^0.10.2",
27
+ "i18next": "^23.7.16",
28
+ "link": "^2.1.0",
29
+ "lodash": "^4.17.21",
30
+ "moment": "^2.29.4",
31
+ "node-sass": "^7.0.3",
32
+ "pusher-js": "^8.4.0-rc2",
33
+ "react-google-recaptcha-v3": "^1.10.1",
34
+ "react-hook-form": "^7.49.2",
35
+ "react-i18next": "^14.0.0",
36
+ "react-icons": "^4.12.0",
37
+ "react-select": "^5.8.0",
38
+ "react-slick": "^0.29.0",
39
+ "react-toastify": "^9.1.3",
40
+ "react-virtualized": "^9.22.6",
41
+ "tinymce": "^7.7.0",
42
+ "yup": "^1.3.3"
43
+ },
44
+ "peerDependencies": {
45
+ "react": "^18.2.0",
46
+ "react-dom": "^18.2.0",
47
+ "react-redux": "^9.0.4"
48
+ },
49
+ "scripts": {
50
+ "build": "microbundle-crl --no-compress --format modern,cjs",
51
+ "start": "microbundle-crl watch --no-compress --format modern,cjs",
52
+ "prepare": "run-s build",
53
+ "test": "run-s test:unit test:lint test:build",
54
+ "test:build": "run-s build",
55
+ "test:lint": "eslint .",
56
+ "test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
57
+ "test:watch": "react-scripts test --env=jsdom"
58
+ },
59
+ "files": [
60
+ "dist"
61
+ ],
62
+ "devDependencies": {
63
+ "@babel/plugin-proposal-unicode-property-regex": "^7.18.6",
64
+ "@testing-library/jest-dom": "^5.17.0",
65
+ "@testing-library/react": "^13.4.0",
66
+ "@testing-library/user-event": "^13.5.0",
67
+ "@types/file-saver": "2.0.7",
68
+ "@types/jest": "^27.5.2",
69
+ "@types/lodash": "^4.17.16",
70
+ "@types/node": "^16.18.68",
71
+ "@types/react": "^18.2.45",
72
+ "@types/react-dom": "^18.2.18",
73
+ "@types/react-redux": "^7.1.33",
74
+ "@types/react-slick": "^0.23.13",
75
+ "@types/react-virtualized": "^9.22.0",
76
+ "@types/redux-logger": "^3.0.12",
77
+ "@types/resize-observer-browser": "^0.1.11",
78
+ "@types/yup": "^0.32.0",
79
+ "apexcharts": "3.15.5",
80
+ "babel-eslint": "^10.0.3",
81
+ "cross-env": "^7.0.3",
82
+ "eslint": "^8.56.0",
83
+ "eslint-config-prettier": "^9.1.0",
84
+ "eslint-config-standard": "^17.1.0",
85
+ "eslint-config-standard-react": "^13.0.0",
86
+ "eslint-plugin-import": "^2.29.1",
87
+ "eslint-plugin-node": "^11.1.0",
88
+ "eslint-plugin-prettier": "^5.1.2",
89
+ "eslint-plugin-promise": "^6.1.1",
90
+ "eslint-plugin-react": "^7.33.2",
91
+ "eslint-plugin-standard": "^5.0.0",
92
+ "file-saver": "^2.0.5",
93
+ "gh-pages": "^6.1.1",
94
+ "microbundle-crl": "^0.13.11",
95
+ "npm-run-all": "^4.1.5",
96
+ "prettier": "^3.1.1",
97
+ "react-apexcharts": "1.3.6",
98
+ "react-scripts": "5.0.1",
99
+ "redux-logger": "^3.0.6",
100
+ "typescript": "^4.9.5"
101
+ }
102
+ }
package/dist/.DS_Store DELETED
Binary file
Binary file
Binary file
Binary file
Binary file