@royalschedule/maps 4.0.28 → 4.0.29
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/Additio/to/index.d.ts +2 -2
- package/dist/Admentum/from/courses.js +11 -4
- package/dist/Admentum/from/courses.js.map +1 -1
- package/dist/Admentum/from/events.js +29 -30
- package/dist/Admentum/from/events.js.map +1 -1
- package/dist/Admentum/from/schedules.js +3 -3
- package/dist/Admentum/from/schedules.js.map +1 -1
- package/dist/Excel/v1/index.d.ts +3 -3
- package/dist/Excel/v2/index.d.ts +3 -3
- package/dist/SchoolSoft/file/to/index.d.ts +2 -2
- package/dist/Skola24/txt/from/schedules.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { Types } from "../../core/types/index.js";
|
|
|
2
2
|
import { Types as Types$1 } from "../types/index.js";
|
|
3
3
|
import "../index.js";
|
|
4
4
|
import "../../index.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as xlsx0 from "xlsx";
|
|
6
6
|
|
|
7
7
|
//#region src/Additio/to/index.d.ts
|
|
8
8
|
declare class export_default {
|
|
@@ -16,7 +16,7 @@ declare class export_default {
|
|
|
16
16
|
courses: Types.Mixed.Course[];
|
|
17
17
|
events: Types.Mixed.Event[];
|
|
18
18
|
lockedTimes: Types.Mixed.LockedTime[];
|
|
19
|
-
}, _options?: Types$1.options) =>
|
|
19
|
+
}, _options?: Types$1.options) => xlsx0.WorkBook;
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
22
22
|
export { export_default };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { v4 } from "uuid";
|
|
2
|
+
|
|
1
3
|
//#region src/Admentum/from/courses.ts
|
|
2
|
-
function courses_default(scheduledGroups, school, importErrors, importWarnings) {
|
|
4
|
+
function courses_default(scheduledGroups, school, courseMap, importErrors, importWarnings) {
|
|
3
5
|
const courses = [];
|
|
4
6
|
scheduledGroups?.forEach((scheduledGroup) => {
|
|
5
7
|
const subjects = school.school_type == "GR" ? scheduledGroup.subjects : scheduledGroup.courses;
|
|
@@ -8,13 +10,18 @@ function courses_default(scheduledGroups, school, importErrors, importWarnings)
|
|
|
8
10
|
const warn = `The schedule group "${scheduledGroup.name}" with id "${scheduledGroup.id}" did not contain any teachers.`;
|
|
9
11
|
importWarnings.push(warn);
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
const id = scheduledGroup.id;
|
|
14
|
+
const ids = v4();
|
|
15
|
+
if (!courseMap.has(id)) courseMap.set(id, []);
|
|
16
|
+
const course = {
|
|
17
|
+
ids,
|
|
13
18
|
displayName: scheduledGroup.name,
|
|
14
19
|
subject: subject.name,
|
|
15
20
|
groups: scheduledGroup.users_primary_groups.map((x) => ({ to: x.toString() })),
|
|
16
21
|
teachers: scheduledGroup.teachers?.map((x) => ({ to: x.id.toString() }))
|
|
17
|
-
}
|
|
22
|
+
};
|
|
23
|
+
courseMap.get(id)?.push(course);
|
|
24
|
+
courses.push(course);
|
|
18
25
|
}
|
|
19
26
|
});
|
|
20
27
|
return courses;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"courses.js","names":["courses: OutTypes.course[]"],"sources":["../../../src/Admentum/from/courses.ts"],"sourcesContent":["import type { ScheduleGroup } from '../types/schedule-groups';\nimport type { School } from '../types/schools';\nimport type { OutTypes } from './schedules';\n\n\nexport default function (\n scheduledGroups: ScheduleGroup[] | undefined,\n school: School,\n importErrors: string[],\n importWarnings: string[],\n): OutTypes.course[] {\n\n const courses: OutTypes.course[] = [];\n\n scheduledGroups?.forEach(scheduledGroup => {\n\n ////\n //// check number of subjects/courses\n ////\n const subjects = school.school_type == 'GR' ? scheduledGroup.subjects : scheduledGroup.courses;\n // Nikos takes full responsibility for this line of code and the decision to allow multiple subjects per schedule group, which is a scenario that we have observed in the wild but that we do not fully understand the implications of.\n for (const subject of subjects) {\n ////\n //// check number of teachers\n ////\n if (scheduledGroup.teachers?.length == 0) {\n const warn = `The schedule group \"${scheduledGroup.name}\" with id \"${scheduledGroup.id}\" did not contain any teachers.`;\n importWarnings.push(warn);\n }\n\n
|
|
1
|
+
{"version":3,"file":"courses.js","names":["courses: OutTypes.course[]","uuid"],"sources":["../../../src/Admentum/from/courses.ts"],"sourcesContent":["import { v4 as uuid } from 'uuid';\nimport type { ScheduleGroup } from '../types/schedule-groups';\nimport type { School } from '../types/schools';\nimport type { OutTypes } from './schedules';\n\n\nexport default function (\n scheduledGroups: ScheduleGroup[] | undefined,\n school: School,\n courseMap: Map<number, OutTypes.course[]>,\n importErrors: string[],\n importWarnings: string[],\n): OutTypes.course[] {\n\n const courses: OutTypes.course[] = [];\n\n scheduledGroups?.forEach(scheduledGroup => {\n\n ////\n //// check number of subjects/courses\n ////\n const subjects = school.school_type == 'GR' ? scheduledGroup.subjects : scheduledGroup.courses;\n // Nikos takes full responsibility for this line of code and the decision to allow multiple subjects per schedule group, which is a scenario that we have observed in the wild but that we do not fully understand the implications of.\n for (const subject of subjects) {\n ////\n //// check number of teachers\n ////\n if (scheduledGroup.teachers?.length == 0) {\n const warn = `The schedule group \"${scheduledGroup.name}\" with id \"${scheduledGroup.id}\" did not contain any teachers.`;\n importWarnings.push(warn);\n }\n\n const id = scheduledGroup.id;\n // generate a uuid since admentum id is degenerate now when we have multiple subjects per schedule group\n const ids = uuid();\n if (!courseMap.has(id)) {\n courseMap.set(id, []);\n }\n\n const course ={\n ids,\n displayName: scheduledGroup.name,\n subject: subject.name,\n groups: scheduledGroup.users_primary_groups.map(x => ({ to: x.toString() })),\n teachers: scheduledGroup.teachers?.map(x => ({ to: x.id.toString() }))\n } satisfies OutTypes.course;\n\n courseMap.get(id)?.push(course);\n\n courses.push(course);\n }\n });\n\n return courses;\n}\n"],"mappings":";;;AAMA,yBACE,iBACA,QACA,WACA,cACA,gBACmB;CAEnB,MAAMA,UAA6B,EAAE;AAErC,kBAAiB,SAAQ,mBAAkB;EAKzC,MAAM,WAAW,OAAO,eAAe,OAAO,eAAe,WAAW,eAAe;AAEvF,OAAK,MAAM,WAAW,UAAU;AAI9B,OAAI,eAAe,UAAU,UAAU,GAAG;IACxC,MAAM,OAAO,uBAAuB,eAAe,KAAK,aAAa,eAAe,GAAG;AACvF,mBAAe,KAAK,KAAK;;GAG3B,MAAM,KAAK,eAAe;GAE1B,MAAM,MAAMC,IAAM;AAClB,OAAI,CAAC,UAAU,IAAI,GAAG,CACpB,WAAU,IAAI,IAAI,EAAE,CAAC;GAGvB,MAAM,SAAQ;IACZ;IACA,aAAa,eAAe;IAC5B,SAAa,QAAQ;IACrB,QAAa,eAAe,qBAAqB,KAAI,OAAM,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;IACjF,UAAa,eAAe,UAAU,KAAI,OAAM,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,EAAE;IAC1E;AAED,aAAU,IAAI,GAAG,EAAE,KAAK,OAAO;AAE/B,WAAQ,KAAK,OAAO;;GAEtB;AAEF,QAAO"}
|
|
@@ -3,26 +3,23 @@ import moment from "moment";
|
|
|
3
3
|
//#region src/Admentum/from/events.ts
|
|
4
4
|
const firstDay = moment.utc("1970-01-05");
|
|
5
5
|
function fromTimeString(day, timeString) {
|
|
6
|
-
const [hours, minutes
|
|
6
|
+
const [hours, minutes] = timeString.split(":").map((time) => parseInt(time));
|
|
7
7
|
return firstDay.clone().add(day, "day").set("hour", hours).set("minute", minutes);
|
|
8
8
|
}
|
|
9
|
-
function events_default(lessons,
|
|
10
|
-
const group2course = /* @__PURE__ */ new Map();
|
|
11
|
-
courses?.forEach((c) => group2course.set(c.ids, c));
|
|
9
|
+
function events_default(lessons, courseMap, teachers, importErrors, importWarnings) {
|
|
12
10
|
const teacherSet = /* @__PURE__ */ new Set();
|
|
13
11
|
teachers?.forEach((t) => teacherSet.add(t.ids));
|
|
14
12
|
const events = [];
|
|
15
13
|
lessons?.forEach((l) => {
|
|
16
14
|
groupScope: for (const group of l.info.groups ?? []) {
|
|
17
|
-
if (!
|
|
15
|
+
if (!courseMap.has(group.id)) {
|
|
18
16
|
const warn = `The lesson with id "${l.id}" referenced the unknown/faulty schedule_group (course) "${group.id}" and was therefore ignored.`;
|
|
19
17
|
importWarnings.push(warn);
|
|
20
18
|
continue groupScope;
|
|
21
19
|
}
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const warn = `The lesson with id "${l.id}" referenced the unknown/faulty schedule_group (course) "${course_id}" and was therefore ignored.`;
|
|
20
|
+
const courses = courseMap.get(group.id);
|
|
21
|
+
if (!courses?.length) {
|
|
22
|
+
const warn = `The lesson with id "${l.id}" referenced the unknown/faulty schedule_group (course) "${group.id}" and was therefore ignored.`;
|
|
26
23
|
importWarnings.push(warn);
|
|
27
24
|
continue groupScope;
|
|
28
25
|
}
|
|
@@ -30,29 +27,31 @@ function events_default(lessons, courses, teachers, importErrors, importWarnings
|
|
|
30
27
|
const end = fromTimeString(l.weekday, l.info.end);
|
|
31
28
|
const preferredDuration = l.info.duration;
|
|
32
29
|
const duration = l.info.duration;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
for (const course of courses) {
|
|
31
|
+
let eventTeachers;
|
|
32
|
+
if (!course.teachers || !course.teachers?.every((x) => l.info.teachers?.some((y) => y.id.toString() == x.to))) {
|
|
33
|
+
eventTeachers = l.info.teachers?.map((x) => x.id.toString());
|
|
34
|
+
for (const teacher of eventTeachers ?? []) if (!teacherSet.has(teacher)) {
|
|
35
|
+
const warn = `The lesson with id "${l.id}" referenced the unknown teacher "${teacher}" and was therefore ignored.`;
|
|
36
|
+
importWarnings.push(warn);
|
|
37
|
+
continue groupScope;
|
|
38
|
+
}
|
|
40
39
|
}
|
|
40
|
+
const location = l.info.room?.id.toString();
|
|
41
|
+
events.push({
|
|
42
|
+
ids: l.id.toString(),
|
|
43
|
+
start,
|
|
44
|
+
end,
|
|
45
|
+
preferredDuration,
|
|
46
|
+
duration,
|
|
47
|
+
course: course.ids,
|
|
48
|
+
...location && {
|
|
49
|
+
inLocations: [location],
|
|
50
|
+
locations: [{ locations: [location] }]
|
|
51
|
+
},
|
|
52
|
+
...eventTeachers && { teachers: eventTeachers.map((to) => ({ to })) }
|
|
53
|
+
});
|
|
41
54
|
}
|
|
42
|
-
const location = l.info.room?.id.toString();
|
|
43
|
-
events.push({
|
|
44
|
-
ids: l.id.toString(),
|
|
45
|
-
start,
|
|
46
|
-
end,
|
|
47
|
-
preferredDuration,
|
|
48
|
-
duration,
|
|
49
|
-
course: course_id,
|
|
50
|
-
...location && {
|
|
51
|
-
inLocations: [location],
|
|
52
|
-
locations: [{ locations: [location] }]
|
|
53
|
-
},
|
|
54
|
-
...eventTeachers && { teachers: eventTeachers.map((to) => ({ to })) }
|
|
55
|
-
});
|
|
56
55
|
}
|
|
57
56
|
});
|
|
58
57
|
return events;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","names":["events: OutTypes.event[]","eventTeachers: string[] | undefined"],"sources":["../../../src/Admentum/from/events.ts"],"sourcesContent":["\nimport moment from 'moment';\nimport type { Lesson } from '../types/lessons';\nimport type { OutTypes } from './schedules';\n\nconst firstDay = moment.utc('1970-01-05');\n\nfunction fromTimeString (\n day: number,\n timeString: string\n): moment.Moment {\n const [hours, minutes
|
|
1
|
+
{"version":3,"file":"events.js","names":["events: OutTypes.event[]","eventTeachers: string[] | undefined"],"sources":["../../../src/Admentum/from/events.ts"],"sourcesContent":["\nimport moment from 'moment';\nimport type { Lesson } from '../types/lessons';\nimport type { OutTypes } from './schedules';\n\nconst firstDay = moment.utc('1970-01-05');\n\nfunction fromTimeString (\n day: number,\n timeString: string\n): moment.Moment {\n const [hours, minutes] = timeString.split(':').map((time: string) => parseInt(time));\n return firstDay.clone().add(day, 'day')\n .set('hour', hours)\n .set('minute', minutes);\n}\n\nexport default function (\n lessons: Lesson[] | undefined,\n courseMap: Map<number, OutTypes.course[]>,\n teachers: OutTypes.teacher[] | undefined,\n importErrors: string[],\n importWarnings: string[],\n): OutTypes.event[] {\n\n // create teacher set for quick lookup\n const teacherSet = new Set<string>();\n teachers?.forEach(t => teacherSet.add(t.ids!));\n\n const events: OutTypes.event[] = [];\n lessons?.forEach(l => {\n\n // Nikos takes full responsibility for this line of code\n groupScope: for (const group of l.info.groups ?? []) {\n if (!courseMap.has(group.id)) {\n const warn = `The lesson with id \"${l.id}\" referenced the unknown/faulty schedule_group (course) \"${group.id}\" and was therefore ignored.`;\n importWarnings.push(warn);\n continue groupScope;\n }\n const courses = courseMap.get(group.id);\n\n if (!courses?.length) {\n const warn = `The lesson with id \"${l.id}\" referenced the unknown/faulty schedule_group (course) \"${group.id}\" and was therefore ignored.`;\n importWarnings.push(warn);\n continue groupScope;\n }\n\n const start = fromTimeString(l.weekday, l.info.start);\n const end = fromTimeString(l.weekday, l.info.end);\n const preferredDuration = l.info.duration;\n const duration = l.info.duration;\n\n for (const course of courses) {\n // store only teachers if they mismatch teachers of parent course\n let eventTeachers: string[] | undefined;\n if (!course.teachers || !course.teachers?.every(x => l.info.teachers?.some(y => y.id.toString() == x.to))) {\n eventTeachers = l.info.teachers?.map(x => x.id.toString());\n\n // ensure that the teachers exist\n for (const teacher of eventTeachers ?? []) {\n if (!teacherSet.has(teacher)) {\n const warn = `The lesson with id \"${l.id}\" referenced the unknown teacher \"${teacher}\" and was therefore ignored.`;\n importWarnings.push(warn);\n continue groupScope;\n }\n }\n }\n\n // location\n const location = l.info.room?.id.toString();\n\n events.push({\n ids: l.id.toString(),\n start,\n end,\n preferredDuration,\n duration,\n course: course.ids,\n ...location && { inLocations: [ location ], locations: [{ locations: [ location ] }] },\n ...(eventTeachers && { teachers: eventTeachers.map((to) => ({ to })) })\n } satisfies OutTypes.event);\n }\n }\n });\n\n return events;\n}\n"],"mappings":";;;AAKA,MAAM,WAAW,OAAO,IAAI,aAAa;AAEzC,SAAS,eACP,KACA,YACe;CACf,MAAM,CAAC,OAAO,WAAW,WAAW,MAAM,IAAI,CAAC,KAAK,SAAiB,SAAS,KAAK,CAAC;AACpF,QAAO,SAAS,OAAO,CAAC,IAAI,KAAK,MAAM,CACpC,IAAI,QAAQ,MAAM,CAClB,IAAI,UAAU,QAAQ;;AAG3B,wBACE,SACA,WACA,UACA,cACA,gBACkB;CAGlB,MAAM,6BAAa,IAAI,KAAa;AACpC,WAAU,SAAQ,MAAK,WAAW,IAAI,EAAE,IAAK,CAAC;CAE9C,MAAMA,SAA2B,EAAE;AACnC,UAAS,SAAQ,MAAK;AAGpB,aAAY,MAAK,MAAM,SAAS,EAAE,KAAK,UAAU,EAAE,EAAE;AACnD,OAAI,CAAC,UAAU,IAAI,MAAM,GAAG,EAAE;IAC5B,MAAM,OAAO,uBAAuB,EAAE,GAAG,2DAA2D,MAAM,GAAG;AAC7G,mBAAe,KAAK,KAAK;AACzB,aAAS;;GAEX,MAAM,UAAU,UAAU,IAAI,MAAM,GAAG;AAEvC,OAAI,CAAC,SAAS,QAAQ;IACpB,MAAM,OAAO,uBAAuB,EAAE,GAAG,2DAA2D,MAAM,GAAG;AAC7G,mBAAe,KAAK,KAAK;AACzB,aAAS;;GAGX,MAAM,QAAoB,eAAe,EAAE,SAAS,EAAE,KAAK,MAAM;GACjE,MAAM,MAAoB,eAAe,EAAE,SAAS,EAAE,KAAK,IAAI;GAC/D,MAAM,oBAAoB,EAAE,KAAK;GACjC,MAAM,WAAoB,EAAE,KAAK;AAEjC,QAAK,MAAM,UAAU,SAAS;IAE5B,IAAIC;AACJ,QAAI,CAAC,OAAO,YAAY,CAAC,OAAO,UAAU,OAAM,MAAK,EAAE,KAAK,UAAU,MAAK,MAAK,EAAE,GAAG,UAAU,IAAI,EAAE,GAAG,CAAC,EAAE;AACzG,qBAAgB,EAAE,KAAK,UAAU,KAAI,MAAK,EAAE,GAAG,UAAU,CAAC;AAG1D,UAAK,MAAM,WAAW,iBAAiB,EAAE,CACvC,KAAI,CAAC,WAAW,IAAI,QAAQ,EAAE;MAC5B,MAAM,OAAO,uBAAuB,EAAE,GAAG,oCAAoC,QAAQ;AACrF,qBAAe,KAAK,KAAK;AACzB,eAAS;;;IAMf,MAAM,WAAW,EAAE,KAAK,MAAM,GAAG,UAAU;AAE3C,WAAO,KAAK;KACV,KAAQ,EAAE,GAAG,UAAU;KACvB;KACA;KACA;KACA;KACA,QAAQ,OAAO;KACf,GAAG,YAAY;MAAE,aAAa,CAAE,SAAU;MAAE,WAAW,CAAC,EAAE,WAAW,CAAE,SAAU,EAAE,CAAC;MAAE;KACtF,GAAI,iBAAiB,EAAE,UAAU,cAAc,KAAK,QAAQ,EAAE,IAAI,EAAE,EAAE;KACvE,CAA0B;;;GAG/B;AAEF,QAAO"}
|
|
@@ -9,18 +9,18 @@ import persons_default from "./persons.js";
|
|
|
9
9
|
function schedules_default(schedule) {
|
|
10
10
|
if (schedule.schools.length != 1) return { meta: { errors: [`Received ${schedule.schools.length} number of schools: only a single school is allowed.`] } };
|
|
11
11
|
const school = schedule.schools[0];
|
|
12
|
+
const courseMap = /* @__PURE__ */ new Map();
|
|
12
13
|
const errors = [];
|
|
13
14
|
const warnings = [];
|
|
14
15
|
const locations = locations_default(schedule.rooms, errors, warnings);
|
|
15
16
|
const teachers = teachers_default(schedule.schedule_groups, schedule.lessons, errors, warnings);
|
|
16
17
|
const groups = groups_default(schedule.primary_groups, errors, warnings);
|
|
17
|
-
const courses = courses_default(schedule.schedule_groups, school, errors, warnings);
|
|
18
18
|
return {
|
|
19
19
|
locations,
|
|
20
20
|
teachers,
|
|
21
21
|
groups,
|
|
22
|
-
courses,
|
|
23
|
-
events: events_default(schedule.lessons,
|
|
22
|
+
courses: courses_default(schedule.schedule_groups, school, courseMap, errors, warnings),
|
|
23
|
+
events: events_default(schedule.lessons, courseMap, teachers, errors, warnings),
|
|
24
24
|
persons: persons_default(schedule.users, groups, errors, warnings),
|
|
25
25
|
meta: {
|
|
26
26
|
...errors.length ? { errors } : {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedules.js","names":["errors: string[]","warnings: string[]","locations: OutTypes.location[]","_locations","teachers: OutTypes.teacher []","_teachers","groups: OutTypes.group []","_groups","
|
|
1
|
+
{"version":3,"file":"schedules.js","names":["errors: string[]","warnings: string[]","locations: OutTypes.location[]","_locations","teachers: OutTypes.teacher []","_teachers","groups: OutTypes.group []","_groups","_courses","_events","_persons"],"sources":["../../../src/Admentum/from/schedules.ts"],"sourcesContent":["import type { Schedule } from '../types/schedules';\nimport _teachers from './teachers';\nimport _locations from './locations';\nimport _groups from './groups';\nimport _courses from './courses';\nimport _events from './events';\nimport _persons from './persons';\nimport type { CoreTypes } from '../../core';\nimport type { InternalIdKey } from '../../core/types/common';\n\n\nexport namespace OutTypes {\n export type location = Omit<CoreTypes.Serialized.Location, InternalIdKey>;\n export type teacher = Omit<CoreTypes.Serialized.Teacher, InternalIdKey>;\n export type group = Omit<CoreTypes.Serialized.Group, InternalIdKey>;\n export type course = Omit<CoreTypes.Serialized.Course, InternalIdKey>;\n export type event = Omit<CoreTypes.Serialized.Event, InternalIdKey>;\n export type person = Omit<CoreTypes.Serialized.Person, InternalIdKey>;\n};\n\nexport default function (\n schedule: Omit<Schedule, 'start_date' | 'end_date' | 'schedule' | 'school_year'>\n) {\n\n ////\n //// check the number of contained schools\n ////\n if (schedule.schools.length != 1) {\n return { meta: { errors: [`Received ${schedule.schools.length} number of schools: only a single school is allowed.`] } };\n }\n const school = schedule.schools[0];\n\n const courseMap = new Map<number, OutTypes.course[]>();\n // gather all import related warnings/errors\n const errors: string[] = [];\n const warnings: string[] = [];\n\n const locations: OutTypes.location[] = _locations(schedule.rooms, errors, warnings);\n const teachers: OutTypes.teacher [] = _teachers (schedule.schedule_groups, schedule.lessons, errors, warnings);\n const groups: OutTypes.group [] = _groups (schedule.primary_groups, errors, warnings);\n const courses: OutTypes.course [] = _courses (schedule.schedule_groups, school, courseMap, errors, warnings);\n const events: OutTypes.event [] = _events (schedule.lessons, courseMap, teachers, errors, warnings);\n const persons: OutTypes.person [] = _persons (schedule.users, groups, errors, warnings);\n\n return { locations, teachers, groups, courses, events, persons,\n meta: {\n ...( errors.length ? { errors } : { } ),\n ...( warnings.length ? { warnings } : { } )\n }\n };\n}\n"],"mappings":";;;;;;;;AAoBA,2BACE,UACA;AAKA,KAAI,SAAS,QAAQ,UAAU,EAC7B,QAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,SAAS,QAAQ,OAAO,sDAAsD,EAAE,EAAE;CAE1H,MAAM,SAAS,SAAS,QAAQ;CAEhC,MAAM,4BAAY,IAAI,KAAgC;CAEtD,MAAMA,SAAqB,EAAE;CAC7B,MAAMC,WAAqB,EAAE;CAE7B,MAAMC,YAAiCC,kBAAW,SAAS,OAAoC,QAAQ,SAAS;CAChH,MAAMC,WAAiCC,iBAAW,SAAS,iBAAiB,SAAS,SAAU,QAAQ,SAAS;CAChH,MAAMC,SAAiCC,eAAW,SAAS,gBAAoC,QAAQ,SAAS;AAKhH,QAAO;EAAE;EAAW;EAAU;EAAQ,SAJCC,gBAAW,SAAS,iBAAiB,QAAQ,WAAW,QAAQ,SAAS;EAIjE,QAHRC,eAAW,SAAS,SAAS,WAAW,UAAgB,QAAQ,SAAS;EAGzD,SAFhBC,gBAAW,SAAS,OAAO,QAA6B,QAAQ,SAAS;EAG9G,MAAM;GACJ,GAAK,OAAO,SAAW,EAAE,QAAQ,GAAK,EAAG;GACzC,GAAK,SAAS,SAAS,EAAE,UAAU,GAAG,EAAG;GAC1C;EACF"}
|
package/dist/Excel/v1/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { PlannedScheduledDuration } from "../../core/interfaces/vertices/propert
|
|
|
7
7
|
import { MinBreakLength } from "../../core/interfaces/vertices/properties/min-break-length.js";
|
|
8
8
|
import { Types } from "./types/index.js";
|
|
9
9
|
import "../../index.js";
|
|
10
|
-
import * as
|
|
10
|
+
import * as moment197 from "moment";
|
|
11
11
|
|
|
12
12
|
//#region src/Excel/v1/index.d.ts
|
|
13
13
|
declare class Map {
|
|
@@ -200,8 +200,8 @@ declare class Map {
|
|
|
200
200
|
lastModifiedBy?: string | undefined;
|
|
201
201
|
course?: string | undefined;
|
|
202
202
|
period?: string | undefined;
|
|
203
|
-
start?: (
|
|
204
|
-
end?: (
|
|
203
|
+
start?: (moment197.Moment | string) | undefined;
|
|
204
|
+
end?: (moment197.Moment | string) | undefined;
|
|
205
205
|
belongsTo?: string | undefined;
|
|
206
206
|
potentialCenter?: string | undefined;
|
|
207
207
|
type?: string | undefined;
|
package/dist/Excel/v2/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { PlannedScheduledDuration } from "../../core/interfaces/vertices/propert
|
|
|
7
7
|
import { MinBreakLength } from "../../core/interfaces/vertices/properties/min-break-length.js";
|
|
8
8
|
import { Types } from "./types/index.js";
|
|
9
9
|
import "../../index.js";
|
|
10
|
-
import * as
|
|
10
|
+
import * as moment199 from "moment";
|
|
11
11
|
|
|
12
12
|
//#region src/Excel/v2/index.d.ts
|
|
13
13
|
declare class Map {
|
|
@@ -198,8 +198,8 @@ declare class Map {
|
|
|
198
198
|
createdAt?: string | undefined;
|
|
199
199
|
updatedAt?: string | undefined;
|
|
200
200
|
lastModifiedBy?: string | undefined;
|
|
201
|
-
start?: (
|
|
202
|
-
end?: (
|
|
201
|
+
start?: (moment199.Moment | string) | undefined;
|
|
202
|
+
end?: (moment199.Moment | string) | undefined;
|
|
203
203
|
potentialCenter?: string | undefined;
|
|
204
204
|
type?: string | undefined;
|
|
205
205
|
tags?: Tag[] | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { BaseOptions } from "../../../common/types.js";
|
|
2
2
|
import { Types } from "../../../core/types/index.js";
|
|
3
3
|
import "../../../index.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as xlsx1 from "xlsx";
|
|
5
5
|
|
|
6
6
|
//#region src/SchoolSoft/file/to/index.d.ts
|
|
7
7
|
declare class export_default {
|
|
8
8
|
static schedules: (schedule: Types.Mixed.Schedule & {
|
|
9
9
|
division?: Types.Mixed.Division;
|
|
10
|
-
}, options?: BaseOptions) =>
|
|
10
|
+
}, options?: BaseOptions) => xlsx1.WorkBook;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
export { export_default };
|
|
@@ -4,8 +4,8 @@ import { extractStartAndEnd } from "./division.js";
|
|
|
4
4
|
import { fromWeekNumberRange, parsePeriod } from "./period.js";
|
|
5
5
|
import { parseCalendarExceptions } from "./calendar-exceptions.js";
|
|
6
6
|
import moment from "moment";
|
|
7
|
-
import Papa from "papaparse";
|
|
8
7
|
import { v4 } from "uuid";
|
|
8
|
+
import Papa from "papaparse";
|
|
9
9
|
|
|
10
10
|
//#region src/Skola24/txt/from/schedules.ts
|
|
11
11
|
const daysToIndex = {
|