@royalschedule/maps 2.2.89 → 2.2.90
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/Admentum/from/courses.js +1 -1
- package/dist/Admentum/from/courses.js.map +1 -1
- package/dist/Admentum/from/schedules.js +1 -1
- package/dist/Admentum/from/schedules.js.map +1 -1
- package/dist/Admentum/to/schedules.d.ts +1 -1
- package/dist/Admentum/types/course-sections.d.ts +1 -1
- package/dist/Admentum/types/courses.d.ts +1 -1
- package/dist/Admentum/types/lessons.d.ts +2 -2
- package/dist/Admentum/types/primary-groups.d.ts +1 -1
- package/dist/Admentum/types/rooms.d.ts +1 -1
- package/dist/Admentum/types/schedule-groups.d.ts +2 -2
- package/dist/Admentum/types/schedules.d.ts +1 -1
- package/dist/Admentum/types/schools.d.ts +1 -1
- package/dist/Admentum/types/users.d.ts +1 -1
- package/dist/PlanDigital/types/index.d.ts +4 -4
- package/dist/RS/v0/from/placements.d.ts +1 -1
- package/dist/RS/v0/to/course-events/days.d.ts +1 -1
- package/dist/RS/v0/to/course-events/dependencies.d.ts +1 -1
- package/dist/RS/v0/to/course-events/groups.d.ts +2 -2
- package/dist/RS/v0/to/course-events/intervals.d.ts +1 -1
- package/dist/RS/v0/to/course-events/meta.d.ts +1 -1
- package/dist/RS/v0/types/break-lengths.d.ts +2 -2
- package/dist/RS/v0/types/configurations.d.ts +1 -1
- package/dist/RS/v0/types/groups.d.ts +1 -1
- package/dist/RS/v0/types/out-options.d.ts +1 -1
- package/dist/RS/v0/types/schedules.d.ts +1 -1
- package/dist/RS/v1/from/placements.d.ts +1 -1
- package/dist/RS/v1/to/course-events/days.d.ts +1 -1
- package/dist/RS/v1/to/course-events/dependencies.d.ts +1 -1
- package/dist/RS/v1/to/course-events/groups.d.ts +1 -1
- package/dist/RS/v1/to/course-events/intervals.d.ts +1 -1
- package/dist/RS/v1/to/course-events/meta.d.ts +1 -1
- package/dist/RS/v1/types/break-lengths.d.ts +2 -2
- package/dist/RS/v1/types/configurations.d.ts +1 -1
- package/dist/RS/v1/types/groups.d.ts +1 -1
- package/dist/RS/v1/types/out-options.d.ts +1 -1
- package/dist/RS/v1/types/schedules.d.ts +1 -1
- package/dist/RS/v2/from/collections.js.map +1 -1
- package/dist/RS/v2/from/course-events.d.ts +1 -1
- package/dist/RS/v2/from/placements.d.ts +1 -1
- package/dist/RS/v2/to/course-events/days.d.ts +1 -1
- package/dist/RS/v2/to/course-events/dependencies.d.ts +1 -1
- package/dist/RS/v2/to/course-events/groups.d.ts +1 -1
- package/dist/RS/v2/to/course-events/intervals.d.ts +1 -1
- package/dist/RS/v2/to/course-events/meta.d.ts +1 -1
- package/dist/RS/v2/types/break-lengths.d.ts +2 -2
- package/dist/RS/v2/types/configurations.d.ts +1 -1
- package/dist/RS/v2/types/groups.d.ts +1 -1
- package/dist/RS/v2/types/out-options.d.ts +1 -1
- package/dist/RS/v2/types/schedules.d.ts +1 -1
- package/dist/SS12000/to/activities.d.ts +1 -1
- package/dist/SS12000/to/calendar-events.d.ts +1 -1
- package/dist/SS12000/types/activities.d.ts +1 -1
- package/dist/SS12000/types/calendar-events.d.ts +1 -1
- package/dist/SS12000/types/codes.d.ts +7 -7
- package/dist/SS12000/types/duties.d.ts +1 -1
- package/dist/SS12000/types/duty-assignments.d.ts +1 -1
- package/dist/SS12000/types/groups.d.ts +1 -1
- package/dist/SS12000/types/organisation.d.ts +1 -1
- package/dist/SS12000/types/persons.d.ts +1 -1
- package/dist/SS12000/types/resources.d.ts +1 -1
- package/dist/SS12000/types/rooms.d.ts +1 -1
- package/dist/SchoolSoft/api/types/group.d.ts +1 -1
- package/dist/SchoolSoft/api/types/lesson.d.ts +1 -1
- package/dist/SchoolSoft/api/types/location.d.ts +1 -1
- package/dist/SchoolSoft/api/types/schedule.d.ts +1 -1
- package/dist/SchoolSoft/api/types/teacher.d.ts +1 -1
- package/dist/SchoolSoft/file/types/events.d.ts +2 -2
- package/dist/SchoolSoft/file/types/index.d.ts +1 -1
- package/dist/core/types/available-locations.d.ts +1 -1
- package/dist/core/types/break-lengths.d.ts +1 -1
- package/dist/core/types/common/index.d.ts +10 -10
- package/dist/core/types/course-events.d.ts +2 -0
- package/dist/core/types/courses.d.ts +2 -0
- package/dist/core/types/index.d.ts +2 -0
- package/dist/core/types/periods.d.ts +17 -0
- package/dist/core/types/{students.js → periods.js} +1 -1
- package/dist/core/types/periods.js.map +1 -0
- package/dist/identify/types/index.d.ts +3 -3
- package/dist/vKlass/types/index.d.ts +8 -8
- package/package.json +2 -2
- package/dist/core/types/students.d.ts +0 -8
- package/dist/core/types/students.js.map +0 -1
|
@@ -20,7 +20,7 @@ function _default(scheduledGroups, school, importErrors, importWarnings) {
|
|
|
20
20
|
courses.push({
|
|
21
21
|
ids: scheduledGroup.id.toString(),
|
|
22
22
|
displayName: scheduledGroup.name,
|
|
23
|
-
subject: subjects
|
|
23
|
+
subject: subjects.map(x => x.name).join(', '),
|
|
24
24
|
groups: scheduledGroup.users_primary_groups.map(x => x.toString()),
|
|
25
25
|
teachers: scheduledGroup.teachers.map(x => x.id.toString())
|
|
26
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"courses.js","mappings":";;;;;;AAIc,kBACZA,eAAgC,EAChCC,MAAuB,EACvBC,YAAyB,EACzBC,cAAyB;EAGzB,IAAIC,OAAO,GAAmB,EAAE;EAEhCJ,eAAe,CAACK,OAAO,CAACC,cAAc,IAAG;IAKvC,IAAIC,QAAQ,GAAGN,MAAM,CAACO,WAAW,IAAI,IAAI,GAAGF,cAAc,CAACC,QAAQ,GAAGD,cAAc,CAACF,OAAO;IAC5F,IAAIG,QAAQ,CAACE,MAAM,IAAI,CAAC,EAAE;MACxB,IAAIC,IAAI,kCAA0BJ,cAAc,CAACK,IAAI,0BAAcL,cAAc,CAACM,EAAE,0BAAeL,QAAQ,CAACE,MAAM,wBAAcR,MAAM,CAACO,WAAW,IAAI,IAAI,GAAG,UAAU,GAAG,SA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,IAAI,0BAAcL,cAAc,CAACM,EAAE,qCAAiC;MACrHT,cAAc,CAACU,IAAI,CAACH,KAAI,CAAC;;IAI3BN,OAAO,CAACS,IAAI,CAAC;MACXE,GAAG,EAAUT,cAAc,CAACM,EAAE,CAACI,QAAQ,EAAE;MACzCC,WAAW,EAAEX,cAAc,CAACK,IAAI;MAChCO,OAAO,EAAMX,QAAQ,CAACY,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACT,IAAI,CAAC,CAACU,IAAI,CAAC,IAAI,CAAC;MACjDC,MAAM,EAAOhB,cAAc,CAACiB,oBAAoB,CAACJ,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACJ,QAAQ,EAAE,CAAC;MACvEF,QAAQ,EAAKR,cAAc,CAACQ,QAAQ,CAACK,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACR,EAAE,CAACI,QAAQ,EAAE;KAC9D,CAAC;EAEJ,CAAC,CAAC;EAEF,OAAOZ,OAAO;AAChB","names":["scheduledGroups","school","importErrors","importWarnings","courses","forEach","scheduledGroup","subjects","school_type","length","warn","name","id","push","teachers","ids","toString","displayName","subject","map","x","join","groups","users_primary_groups"],"sourceRoot":"","sources":["../../../src/Admentum/from/courses.ts"],"sourcesContent":[null]}
|
|
@@ -17,7 +17,7 @@ function _default(schedule) {
|
|
|
17
17
|
if (schedule.schools.length != 1) {
|
|
18
18
|
return {
|
|
19
19
|
meta: {
|
|
20
|
-
errors: ["
|
|
20
|
+
errors: ["Received ".concat(schedule.schools.length, " number of schools: only a single school is allowed.")]
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedules.js","mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AAAkC;AAAA;AAAA;AAAA;AAKpB,kBACZA,QAAgF;EAMhF,IAAIA,QAAQ,CAACC,OAAO,CAACC,MAAM,IAAI,CAAC,EAAE;IAChC,OAAO;MAAEC,IAAI,EAAE;QA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CAAC;EAEnH,OAAO;IAAEC,SAAS;IAAEE,QAAQ;IAAEG,MAAM;IAAEE,OAAO;IAAEC,MAAM;IAC5CZ,IAAI,kCACGC,MAAM,CAACF,MAAM,GAAK;MAAEE,MAAM,EAAIA;IAAM,CAAI,GAAG,EAAG,GAC9CE,QAAQ,CAACJ,MAAM,GAAG;MAAEI,QAAQ,EAAEA;IAAQ,CAAE,GAAG,EAAG;GAEtD;AACV","names":["schedule","schools","length","meta","errors","school","warnings","locations","rooms","teachers","schedule_groups","lessons","groups","primary_groups","courses","events"],"sourceRoot":"","sources":["../../../src/Admentum/from/schedules.ts"],"sourcesContent":[null]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XLSX from 'xlsx';
|
|
2
2
|
import { CourseEvent } from '../../core/types/course-events';
|
|
3
3
|
import { Deserialized } from '../../core/types/common';
|
|
4
|
-
|
|
4
|
+
type Options = {
|
|
5
5
|
inWeek: string;
|
|
6
6
|
};
|
|
7
7
|
declare const _default: (courseEvents: Deserialized<CourseEvent>[], options?: Options) => XLSX.WorkBook;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { User } from './users';
|
|
2
|
-
export
|
|
2
|
+
export type LessonInfo = {
|
|
3
3
|
start: string;
|
|
4
4
|
end: string;
|
|
5
5
|
duration: number;
|
|
@@ -13,7 +13,7 @@ export declare type LessonInfo = {
|
|
|
13
13
|
id: number;
|
|
14
14
|
}[];
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type Lesson = {
|
|
17
17
|
id: number;
|
|
18
18
|
weekday: number;
|
|
19
19
|
date: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { User } from "./users";
|
|
2
2
|
import { Course } from "./courses";
|
|
3
3
|
import { Schedule } from "./schedules";
|
|
4
|
-
|
|
4
|
+
type Subject = {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type ScheduleGroup = {
|
|
9
9
|
id: number;
|
|
10
10
|
eid: number | null;
|
|
11
11
|
school_id: number;
|
|
@@ -3,7 +3,7 @@ import { Room } from './rooms';
|
|
|
3
3
|
import { PrimaryGroup } from './primary-groups';
|
|
4
4
|
import { ScheduleGroup } from './schedule-groups';
|
|
5
5
|
import { Lesson } from './lessons';
|
|
6
|
-
export
|
|
6
|
+
export type Schedule = {
|
|
7
7
|
start_date: Date;
|
|
8
8
|
end_date: Date;
|
|
9
9
|
school_year: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Options = {
|
|
2
2
|
selectedPeriods?: string[];
|
|
3
3
|
displayName?: 'Gruppnamn' | 'Kursnamn';
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type Period = {
|
|
6
6
|
Namn: string;
|
|
7
7
|
Tidsenhet: 'Timmar/Period' | 'Minuter/Vecka';
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type Course = {
|
|
10
10
|
Gruppnamn: string;
|
|
11
11
|
Klass: string;
|
|
12
12
|
Kurskod: string;
|
|
@@ -18,7 +18,7 @@ declare type Course = {
|
|
|
18
18
|
Ämne: string;
|
|
19
19
|
Kursnamn: string;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type Schedule = {
|
|
22
22
|
'Perioder': Period[];
|
|
23
23
|
'Tabell Tjänstefördelning': Course[];
|
|
24
24
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Placement } from '../types/placements';
|
|
2
2
|
import { CourseEvent } from '../../../core/types/course-events';
|
|
3
|
-
|
|
3
|
+
type Options = {
|
|
4
4
|
idKey?: '_id' | 'id' | 'ids';
|
|
5
5
|
};
|
|
6
6
|
declare const _default: (events: Placement[], options?: Options) => CourseEvent[];
|
|
@@ -2,7 +2,7 @@ import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-
|
|
|
2
2
|
import { DivisionSettings } from '../../../../core/types/division-settings';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
4
|
import { Day } from '../../types/days';
|
|
5
|
-
|
|
5
|
+
type Output = {
|
|
6
6
|
days: Day[] | null;
|
|
7
7
|
};
|
|
8
8
|
export default function (event: SourceCourseEvent, settings: DivisionSettings, options: OutOptions): Output | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AvailableLocation } from '../../../../core/types/available-locations';
|
|
2
2
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
dependencies: AvailableLocation[] | AvailableLocation[][] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,10 +2,10 @@ import { Group as SourceGroup } from '../../../../core/types/groups';
|
|
|
2
2
|
import { Teacher as SourceTeacher } from '../../../../core/types/teachers';
|
|
3
3
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
4
4
|
import { OutOptions } from '../../types/out-options';
|
|
5
|
-
|
|
5
|
+
type MergedOutput = {
|
|
6
6
|
groups: (SourceGroup | SourceTeacher)[] | null;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type SeparatedOutput = {
|
|
9
9
|
groups?: SourceGroup[] | null;
|
|
10
10
|
teachers?: SourceTeacher[] | null;
|
|
11
11
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
2
2
|
import { OutOptions } from '../../types/out-options';
|
|
3
3
|
import { Interval } from '../../types/intervals';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
intervals: Interval[] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,7 +2,7 @@ import moment from 'moment';
|
|
|
2
2
|
import { CourseEvent } from '../../../../core/types/course-events';
|
|
3
3
|
import { BreakLength } from '../../types/break-lengths';
|
|
4
4
|
import { OutOptions } from '../../types/out-options';
|
|
5
|
-
|
|
5
|
+
type Meta = {
|
|
6
6
|
minBreakLength?: BreakLength;
|
|
7
7
|
course?: string;
|
|
8
8
|
name?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Placement } from './placements';
|
|
2
|
-
export
|
|
2
|
+
export type Configuration = Placement[];
|
|
@@ -2,7 +2,7 @@ import { BreakLength } from './break-lengths';
|
|
|
2
2
|
import { Day } from './days';
|
|
3
3
|
import { LockedTime } from './locked-times';
|
|
4
4
|
import { Interval } from './intervals';
|
|
5
|
-
|
|
5
|
+
type GroupType = 'personal' | 'classes';
|
|
6
6
|
export interface Group {
|
|
7
7
|
id: string;
|
|
8
8
|
group_type: GroupType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Configuration } from '../types/configurations';
|
|
2
2
|
import { CourseEvent } from '../../../core/types/course-events';
|
|
3
|
-
|
|
3
|
+
type Options = {
|
|
4
4
|
idKey?: '_id' | 'id' | 'ids';
|
|
5
5
|
};
|
|
6
6
|
declare const _default: (configuration: Configuration, options?: Options) => CourseEvent[];
|
|
@@ -2,7 +2,7 @@ import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-
|
|
|
2
2
|
import { DivisionSettings } from '../../../../core/types/division-settings';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
4
|
import { Day } from '../../types/days';
|
|
5
|
-
|
|
5
|
+
type Output = {
|
|
6
6
|
days: Day[] | null;
|
|
7
7
|
};
|
|
8
8
|
export default function (event: SourceCourseEvent, settings: DivisionSettings, options: OutOptions): Output | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AvailableLocation } from '../../../../core/types/available-locations';
|
|
2
2
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
dependencies: AvailableLocation[] | AvailableLocation[][] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,7 +2,7 @@ import { Group as SourceGroup } from '../../../../core/types/groups';
|
|
|
2
2
|
import { Teacher as SourceTeacher } from '../../../../core/types/teachers';
|
|
3
3
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
4
4
|
import { OutOptions } from '../../types/out-options';
|
|
5
|
-
|
|
5
|
+
type MergedOutput = {
|
|
6
6
|
groups: (SourceGroup | SourceTeacher)[][] | null;
|
|
7
7
|
};
|
|
8
8
|
export default function (event: SourceCourseEvent, options: OutOptions): MergedOutput | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
2
2
|
import { OutOptions } from '../../types/out-options';
|
|
3
3
|
import { Interval } from '../../types/intervals';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
intervals: Interval[] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,7 +2,7 @@ import { Day } from './days';
|
|
|
2
2
|
import { LockedTime } from './locked-times';
|
|
3
3
|
import { Interval } from './intervals';
|
|
4
4
|
import { BreakLength } from './break-lengths';
|
|
5
|
-
|
|
5
|
+
type GroupType = 'personal' | 'classes';
|
|
6
6
|
export interface Group {
|
|
7
7
|
id: string;
|
|
8
8
|
group_type: GroupType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.js","mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AAAkE;AAAA;AAAA;AAAA;AAWlE,SAASA,OAAO,CAACC,MAAwB,EACxBC,YAAsB,EACtBC,UAAsB,EACtBC,QAAsB,EACY;EAAA;EAAA,IAAlCC,mFAA8B,IAAI;EAEjD,IAAMC,KAAK,GAAqBF,QAAQ,CAAC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ACG,MAAM,CAAChC,OAAO,CAACC,MAAM,EAAEC,YAAY,EAAEC,UAAU,EAAEC,QAAQ,CAAC,CAAC;EACxE,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAAA,eAEc+B,aAAa;AAAA","names":["_course","course","teachersList","groupsList","settings","overlapGroup","idKey","collectionIdKey","Error","doc","ids","toString","name","displayName","subject","color","minBreakLength","density","weight","potentialCenter","dependencies","locations","intervals","lockedTimes","days","teachers","groups","flat","reduce","acc","gId","indexOf","concat","length","events","reduceCourses","courses","Array","isArray","_overlapGroup","innerCourse"],"sourceRoot":"","sources":["../../../../src/RS/v2/from/collections.ts"],"sourcesContent":[null]}
|
|
@@ -3,6 +3,6 @@ import { CourseEvent } from '../types/course-events';
|
|
|
3
3
|
import { Collection } from '../types/collections';
|
|
4
4
|
import { Types as CoreTypes } from '../../../core/types';
|
|
5
5
|
import { Serialized, Deserialized } from '../../../core/types/common';
|
|
6
|
-
|
|
6
|
+
type RetrunType = Deserialized<CoreTypes.courseEvent> & Serialized<Pick<CoreTypes.courseEvent, 'teachers' | 'groups'>>;
|
|
7
7
|
declare const _default: (courseEvents: (CourseEvent | number)[], course: Collection, teachersList: string[], groupsList: string[], settings: Settings) => RetrunType[];
|
|
8
8
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Configuration } from '../types/configurations';
|
|
2
2
|
import { CourseEvent } from '../../../core/types/course-events';
|
|
3
3
|
import { LockedTime } from '../../../core/types/locked-times';
|
|
4
|
-
|
|
4
|
+
type Options = {
|
|
5
5
|
idKey?: '_id' | 'id' | 'ids';
|
|
6
6
|
};
|
|
7
7
|
declare const _default: (configuration: Configuration, options?: Options) => [Omit<CourseEvent, 'preferredDuration'>[], LockedTime[]];
|
|
@@ -2,7 +2,7 @@ import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-
|
|
|
2
2
|
import { DivisionSettings } from '../../../../core/types/division-settings';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
4
|
import { Day } from '../../types/days';
|
|
5
|
-
|
|
5
|
+
type Output = {
|
|
6
6
|
days: Day[] | null;
|
|
7
7
|
};
|
|
8
8
|
export default function (event: SourceCourseEvent, settings: DivisionSettings, options: OutOptions): Output | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AvailableLocation } from '../../../../core/types/available-locations';
|
|
2
2
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
dependencies: AvailableLocation[] | AvailableLocation[][] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,7 +2,7 @@ import { Group as SourceGroup } from '../../../../core/types/groups';
|
|
|
2
2
|
import { Teacher as SourceTeacher } from '../../../../core/types/teachers';
|
|
3
3
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
4
4
|
import { OutOptions } from '../../types/out-options';
|
|
5
|
-
|
|
5
|
+
type MergedOutput = {
|
|
6
6
|
groups: (SourceGroup | SourceTeacher)[][] | null;
|
|
7
7
|
};
|
|
8
8
|
export default function (event: SourceCourseEvent, options: OutOptions): MergedOutput | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
2
2
|
import { OutOptions } from '../../types/out-options';
|
|
3
3
|
import { Interval } from '../../types/intervals';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
intervals: Interval[] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,7 +2,7 @@ import { Day } from './days';
|
|
|
2
2
|
import { LockedTime } from './locked-times';
|
|
3
3
|
import { Interval } from './intervals';
|
|
4
4
|
import { BreakLength } from './break-lengths';
|
|
5
|
-
|
|
5
|
+
type GroupType = 'personal' | 'classes';
|
|
6
6
|
export interface Group {
|
|
7
7
|
id: string;
|
|
8
8
|
group_type: GroupType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Types as CoreTypes } from '../../core/types';
|
|
2
2
|
import { Deserialized } from '../../core/types/common';
|
|
3
3
|
import { Activity } from '../types/activities';
|
|
4
|
-
|
|
4
|
+
type Expand = ('referenceNames' | 'teachers' | 'syllabus' | 'groups')[];
|
|
5
5
|
declare const _default: (activities: Deserialized<CoreTypes.course>[], belongsTo?: CoreTypes.division, expand?: Expand) => Activity[];
|
|
6
6
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Types as CoreTypes } from '../../core/types';
|
|
2
2
|
import { Deserialized } from '../../core/types/common';
|
|
3
3
|
import { CalendarEvent } from '../types/calendar-events';
|
|
4
|
-
|
|
4
|
+
type Expand = ('referenceNames' | 'teachers' | 'activity' | 'groups')[];
|
|
5
5
|
declare const _default: (events: Deserialized<CoreTypes.courseEvent>[], belongsTo?: CoreTypes.division, expand?: Expand) => Partial<CalendarEvent>[];
|
|
6
6
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import { Group } from './groups';
|
|
|
2
2
|
import { Organisation } from './organisation';
|
|
3
3
|
import { ActivityType } from './codes';
|
|
4
4
|
import { DutyAssignment } from './duty-assignments';
|
|
5
|
-
export
|
|
5
|
+
export type Activity = {
|
|
6
6
|
id: string;
|
|
7
7
|
organisation?: Organisation;
|
|
8
8
|
meta?: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
1
|
+
export type OrganisationType = 'Huvudman' | 'Verksamhetsområde' | 'Förvaltning' | 'Rektorsområde' | 'Skola' | 'Skolenhet' | 'Varumärke' | 'Bolag' | 'Övrigt';
|
|
2
|
+
export type SchoolType = 'FS' | 'FKLASS' | 'FTH' | 'OPPFTH' | 'GR' | 'GRS' | 'TR' | 'SP' | 'SAM' | 'GY' | 'GYS' | 'SFI' | 'SARVUX' | 'SARVUXGR' | 'SARVUXGY' | 'VUX' | 'VUXSFI' | 'VUXGR' | 'VUXGY' | 'VUXSARTR' | 'VUXSARGR' | 'VUXSARGY' | 'KU' | 'YH' | 'FHS' | 'STF' | 'KKU' | 'HS' | 'ABU' | 'AU';
|
|
3
|
+
export type DutyRole = 'Rektor' | 'Lärare' | 'Förskollärare' | 'Barnskötare' | 'Bibliotekarie' | 'Lärarassistent' | 'Fritidspedagog' | 'Annan personal' | 'Studie- och yrkesvägledare' | 'Förstelärare' | 'Kurator' | 'Skolsköterska' | 'Skolläkare' | 'Skolpsykolog' | 'Speciallärare/specialpedagog' | 'Skoladministratör' | 'Övrig arbetsledning';
|
|
4
|
+
export type GroupType = 'Undervisning' | 'Klass' | 'Mentor' | 'Provgrupp' | 'Schema' | 'Avdelning' | 'Övrigt';
|
|
5
|
+
export type ProgrammeType = 'Yrkesprogram' | 'Högskoleförberedande program' | 'Introduktionsprogram' | 'Nationellt yrkespaket' | 'Regionalt yrkespaket' | 'Fjärde tekniskt år' | 'Programinriktning' | 'Utgång';
|
|
6
|
+
export type ProgrammeContentType = 'Gymnasiegemensamma' | 'Programgemensamma' | 'Inriktning' | 'Programfärdjupning' | 'Gymnasiearbete' | 'Individuellt val';
|
|
7
|
+
export type ActivityType = 'Undervisning' | 'Elevaktivitet' | 'Provaktivitet' | 'Läraraktivitet' | 'Övrigt';
|
|
@@ -2,7 +2,7 @@ import { Location } from "./location";
|
|
|
2
2
|
import { Teacher } from "./teacher";
|
|
3
3
|
import { Group } from "./group";
|
|
4
4
|
import { Lesson } from "./lesson";
|
|
5
|
-
export
|
|
5
|
+
export type Schedule = {
|
|
6
6
|
locations: Location[];
|
|
7
7
|
teachers: Teacher[];
|
|
8
8
|
groups: Group[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type Time = `${number}${number}${number}${number}`;
|
|
2
|
+
export type Day = 'Mån' | 'Tis' | 'Ons' | 'Tor' | 'Fre' | 'Lör' | 'Sön';
|
|
3
3
|
export interface Event {
|
|
4
4
|
id?: string;
|
|
5
5
|
group?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type BreakLength = boolean | number | number[];
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { Types } from 'mongoose';
|
|
2
|
-
|
|
2
|
+
type Vertex = {
|
|
3
3
|
_id?: Types.ObjectId;
|
|
4
4
|
id?: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
6
|
+
export type Edge<T> = T extends Vertex[] ? T | Types.ObjectId[] | string[] : (T extends Vertex ? T | Types.ObjectId | string : never);
|
|
7
|
+
export type ExtractEdge<T> = T extends Vertex[] ? Exclude<T, Types.ObjectId[] | string[]> : (T extends Vertex ? Exclude<T, Types.ObjectId | string> : never);
|
|
8
|
+
export type NestedKeyOf<ObjectType extends object | object[]> = {
|
|
9
9
|
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object | object[] ? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}` : `${Key}`;
|
|
10
10
|
}[keyof ObjectType & (string | number)];
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type Join<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
|
|
12
|
+
export type firstChild<ObjectType extends object> = {
|
|
13
13
|
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? ObjectType[Key] : (ObjectType[Key] extends any ? ObjectType[Key] : never);
|
|
14
14
|
}[keyof ObjectType & (string | number)];
|
|
15
|
-
export
|
|
15
|
+
export type DeserializedOld<ObjectType> = {
|
|
16
16
|
[Key in keyof ObjectType]: (ObjectType[Key] extends Types.ObjectId | Types.ObjectId[] ? ObjectType[Key] : (Edge<Vertex> extends ObjectType[Key] ? Extract<Exclude<ObjectType[Key], Types.ObjectId>, Vertex> : (Edge<Vertex[]> extends ObjectType[Key] ? Extract<Exclude<ObjectType[Key], Types.ObjectId[]>, Vertex[]> : (Exclude<object, Types.ObjectId | Types.ObjectId[]> extends ObjectType[Key] ? Deserialized<ObjectType[Key]> : (Exclude<any[], string[] | number[] | boolean[] | Types.ObjectId | Types.ObjectId[]>[] extends ObjectType[Key] ? Deserialized<ObjectType[Key]> : ObjectType[Key])))));
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
export
|
|
18
|
+
type ArrayType<T> = T extends object[] ? T[0] : never;
|
|
19
|
+
export type Deserialized<ObjectType> = {
|
|
20
20
|
[Key in keyof ObjectType]: (ExtractEdge<ObjectType[Key]> extends never ? (ArrayType<ObjectType[Key]> extends never ? ObjectType[Key] : (ArrayType<ObjectType[Key]> extends object ? Deserialized<ArrayType<ObjectType[Key]>>[] : ObjectType[Key])) : Deserialized<ExtractEdge<ObjectType[Key]>>);
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type Serialized<ObjectType> = {
|
|
23
23
|
[Key in keyof ObjectType]: (Edge<Vertex> extends ObjectType[Key] ? Extract<ObjectType[Key], string> : (Edge<Vertex[]> extends ObjectType[Key] ? Extract<ObjectType[Key], string[]> : (ObjectType[Key] extends Exclude<{}, Types.ObjectId | Types.ObjectId[]> ? Serialized<ObjectType[Key]> : ObjectType[Key])));
|
|
24
24
|
};
|
|
25
25
|
export {};
|
|
@@ -12,6 +12,7 @@ import { Teacher } from './teachers';
|
|
|
12
12
|
import { Location } from './locations';
|
|
13
13
|
import { AvailableLocation } from './available-locations';
|
|
14
14
|
import { OverlapGroup } from './overlap-groups';
|
|
15
|
+
import { Period } from './periods';
|
|
15
16
|
import { Person } from './persons';
|
|
16
17
|
export interface CourseEventBare {
|
|
17
18
|
belongsTo?: Edge<Division>;
|
|
@@ -19,6 +20,7 @@ export interface CourseEventBare {
|
|
|
19
20
|
groups?: Edge<Group[]> | null;
|
|
20
21
|
teachers?: Edge<Teacher[]> | null;
|
|
21
22
|
participants?: Edge<Person[]> | null;
|
|
23
|
+
period?: Edge<Period> | null;
|
|
22
24
|
locations?: AvailableLocation[] | null;
|
|
23
25
|
inLocations?: Edge<Location[]>;
|
|
24
26
|
density?: number;
|
|
@@ -10,6 +10,7 @@ import { Teacher } from './teachers';
|
|
|
10
10
|
import { AvailableLocation } from './available-locations';
|
|
11
11
|
import { CourseEvent } from './course-events';
|
|
12
12
|
import { OverlapGroup } from './overlap-groups';
|
|
13
|
+
import { Period } from './periods';
|
|
13
14
|
import { Person } from './persons';
|
|
14
15
|
export interface CourseBare {
|
|
15
16
|
belongsTo?: Edge<Division>;
|
|
@@ -17,6 +18,7 @@ export interface CourseBare {
|
|
|
17
18
|
groups?: Edge<Group[]>;
|
|
18
19
|
teachers?: Edge<Teacher[]>;
|
|
19
20
|
participants?: Edge<Person[]>;
|
|
21
|
+
period?: Edge<Period>;
|
|
20
22
|
locations?: AvailableLocation[];
|
|
21
23
|
density?: number;
|
|
22
24
|
weight?: number;
|
|
@@ -11,6 +11,7 @@ import { LockedTime } from './locked-times';
|
|
|
11
11
|
import { Division } from './divisions';
|
|
12
12
|
import { DivisionSettings } from './division-settings';
|
|
13
13
|
import { OverlapGroup } from './overlap-groups';
|
|
14
|
+
import { Period } from './periods';
|
|
14
15
|
import { Person } from './persons';
|
|
15
16
|
import { Teacher } from './teachers';
|
|
16
17
|
import { Meta } from './meta';
|
|
@@ -28,6 +29,7 @@ export declare module Types {
|
|
|
28
29
|
type division = Division;
|
|
29
30
|
type divisionSettings = DivisionSettings;
|
|
30
31
|
type overlapGroup = OverlapGroup;
|
|
32
|
+
type period = Period;
|
|
31
33
|
type person = Person;
|
|
32
34
|
type teacher = Teacher;
|
|
33
35
|
type meta = Meta;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Types } from 'mongoose';
|
|
2
|
+
import { Edge } from './common';
|
|
3
|
+
import { Division } from './divisions';
|
|
4
|
+
export interface PeriodBare {
|
|
5
|
+
belongsTo?: Edge<Division>;
|
|
6
|
+
displayIndex?: number;
|
|
7
|
+
displayName?: string;
|
|
8
|
+
ranges: {
|
|
9
|
+
start?: moment.Moment | string | Date;
|
|
10
|
+
end?: moment.Moment | string | Date;
|
|
11
|
+
}[];
|
|
12
|
+
lastModifiedBy?: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface Period extends PeriodBare {
|
|
15
|
+
_id?: Types.ObjectId;
|
|
16
|
+
id?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"periods.js","mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { maps } from '../constants';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type MapInstance = typeof maps[number];
|
|
3
|
+
export type MapName = MapInstance['name'];
|
|
4
|
+
export type IdentifiedMaps = {
|
|
5
5
|
none: MapInstance[];
|
|
6
6
|
weak: MapInstance[];
|
|
7
7
|
strong: MapInstance[];
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
type Staff = {
|
|
2
2
|
ID: number;
|
|
3
3
|
Firstname: string;
|
|
4
4
|
Lastname: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type Group = {
|
|
7
7
|
ID: number;
|
|
8
8
|
Name: string;
|
|
9
9
|
FriendlyName: string;
|
|
10
10
|
StartDate: string;
|
|
11
11
|
EndDate: string;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type Class = {
|
|
14
14
|
ID: number;
|
|
15
15
|
Name: string;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type GroupStaffReference = {
|
|
18
18
|
groupId: number;
|
|
19
19
|
userId: number;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type GroupStudentReference = {
|
|
22
22
|
groupId: number;
|
|
23
23
|
userId: number;
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
type ClassStudentReference = {
|
|
26
26
|
classId: number;
|
|
27
27
|
userId: number;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
type Schedule = {
|
|
30
30
|
staff: Staff[];
|
|
31
31
|
groups: Group[];
|
|
32
32
|
classes: Class[];
|
|
@@ -43,7 +43,7 @@ export declare module Types {
|
|
|
43
43
|
type classStudentReference = ClassStudentReference;
|
|
44
44
|
type schedule = Schedule;
|
|
45
45
|
}
|
|
46
|
-
export
|
|
46
|
+
export type Options = {
|
|
47
47
|
beg: string;
|
|
48
48
|
end: string;
|
|
49
49
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@royalschedule/maps",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.90",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"nodemon": "^2.0.20",
|
|
48
48
|
"ts-node": "^10.9.1",
|
|
49
49
|
"tslib": "^2.4.1",
|
|
50
|
-
"typescript": "^4.
|
|
50
|
+
"typescript": "^4.9.4"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"app-module-path": "^2.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"students.js","mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
|