chuvsu-js 5.4.1 → 5.5.0
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/README.md +32 -3
- package/dist/common/http.d.ts +3 -1
- package/dist/common/http.js +9 -2
- package/dist/{tt/utils → common}/lesson-type.d.ts +4 -2
- package/dist/{tt/utils → common}/lesson-type.js +17 -2
- package/dist/core.d.ts +13 -5
- package/dist/core.js +7 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lk/client.d.ts +23 -1
- package/dist/lk/client.js +95 -0
- package/dist/lk/parse/grade-value.d.ts +4 -0
- package/dist/lk/parse/grade-value.js +16 -0
- package/dist/lk/parse/portfolio-content.d.ts +10 -0
- package/dist/lk/parse/portfolio-content.js +116 -0
- package/dist/lk/parse/portfolio-grades.d.ts +8 -0
- package/dist/lk/parse/portfolio-grades.js +41 -0
- package/dist/lk/parse/portfolio-performance.d.ts +2 -0
- package/dist/lk/parse/portfolio-performance.js +44 -0
- package/dist/lk/parse/portfolio.d.ts +6 -0
- package/dist/lk/parse/portfolio.js +64 -0
- package/dist/lk/parse/webinar-lesson.d.ts +7 -0
- package/dist/lk/parse/webinar-lesson.js +28 -0
- package/dist/lk/parse/webinars.d.ts +3 -0
- package/dist/lk/parse/webinars.js +67 -0
- package/dist/lk/portfolio-types.d.ts +113 -0
- package/dist/lk/portfolio-types.js +1 -0
- package/dist/lk/types.d.ts +29 -0
- package/dist/{tt → lk}/webinars.d.ts +3 -1
- package/dist/lk/webinars.js +52 -0
- package/dist/parsers.d.ts +3 -1
- package/dist/parsers.js +3 -1
- package/dist/tt/client.d.ts +1 -11
- package/dist/tt/client.js +1 -45
- package/dist/tt/domain/types.d.ts +1 -1
- package/dist/tt/observations.js +2 -1
- package/dist/tt/parse/index.d.ts +0 -1
- package/dist/tt/parse/index.js +0 -1
- package/dist/tt/types.d.ts +0 -21
- package/dist/tt/utils/index.d.ts +0 -1
- package/dist/tt/utils/index.js +0 -1
- package/dist/webinar/client.d.ts +52 -0
- package/dist/webinar/client.js +184 -0
- package/dist/webinar/ddp.d.ts +31 -0
- package/dist/webinar/ddp.js +208 -0
- package/dist/webinar/events.d.ts +6 -0
- package/dist/webinar/events.js +38 -0
- package/dist/webinar/gateway.d.ts +30 -0
- package/dist/webinar/gateway.js +114 -0
- package/dist/webinar/media-protocol.d.ts +9 -0
- package/dist/webinar/media-protocol.js +24 -0
- package/dist/webinar/media-types.d.ts +10 -0
- package/dist/webinar/media-types.js +1 -0
- package/dist/webinar/media.d.ts +21 -0
- package/dist/webinar/media.js +76 -0
- package/dist/webinar/parse.d.ts +14 -0
- package/dist/webinar/parse.js +113 -0
- package/dist/webinar/playback.d.ts +32 -0
- package/dist/webinar/playback.js +188 -0
- package/dist/webinar/socket.d.ts +3 -0
- package/dist/webinar/socket.js +18 -0
- package/dist/webinar/state.d.ts +4 -0
- package/dist/webinar/state.js +98 -0
- package/dist/webinar/types.d.ts +148 -0
- package/dist/webinar/types.js +12 -0
- package/docs/student-portal.md +151 -0
- package/docs/testing.md +13 -0
- package/docs/v5-migration.md +25 -2
- package/docs/webinar.md +145 -0
- package/package.json +2 -2
- package/dist/tt/parse/webinars.d.ts +0 -2
- package/dist/tt/parse/webinars.js +0 -97
- package/dist/tt/webinars.js +0 -39
package/dist/tt/webinars.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { LessonType, parseLessonType } from "./utils/lesson-type.js";
|
|
2
|
-
function normalize(value) {
|
|
3
|
-
return value
|
|
4
|
-
.toLocaleLowerCase("ru-RU")
|
|
5
|
-
.replace(/ё/gu, "е")
|
|
6
|
-
.replace(/\s+/gu, " ")
|
|
7
|
-
.trim();
|
|
8
|
-
}
|
|
9
|
-
export function findWebinar(lesson, webinars) {
|
|
10
|
-
return webinars.find((webinar) => {
|
|
11
|
-
if (!webinar.scheduled)
|
|
12
|
-
return false;
|
|
13
|
-
if (webinar.scheduledDate &&
|
|
14
|
-
webinar.scheduledDate !== lesson.scheduledDate)
|
|
15
|
-
return false;
|
|
16
|
-
if (webinar.slotNumber != null &&
|
|
17
|
-
webinar.slotNumber !== lesson.slotNumber) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
if (!lesson.time ||
|
|
21
|
-
webinar.time.start.hours !== lesson.time.start.hours ||
|
|
22
|
-
webinar.time.start.minutes !== lesson.time.start.minutes ||
|
|
23
|
-
webinar.time.end.hours !== lesson.time.end.hours ||
|
|
24
|
-
webinar.time.end.minutes !== lesson.time.end.minutes) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
if (normalize(webinar.subject) !== normalize(lesson.subject))
|
|
28
|
-
return false;
|
|
29
|
-
if (webinar.type && lesson.type !== LessonType.Unknown && parseLessonType(webinar.type) !== lesson.type)
|
|
30
|
-
return false;
|
|
31
|
-
return true;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
export function attachWebinars(lessons, webinars) {
|
|
35
|
-
return lessons.map((lesson) => {
|
|
36
|
-
const webinar = findWebinar(lesson, webinars);
|
|
37
|
-
return webinar ? { ...lesson, webinar } : lesson;
|
|
38
|
-
});
|
|
39
|
-
}
|