@royalschedule/maps 4.0.32 → 4.0.33
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/from/courses.js.map +1 -1
- package/dist/Additio/from/events.js.map +1 -1
- package/dist/Additio/from/groups.js.map +1 -1
- package/dist/Additio/from/index.js.map +1 -1
- package/dist/Additio/from/locations.js.map +1 -1
- package/dist/Additio/from/persons.js.map +1 -1
- package/dist/Additio/from/schedules.d.ts +1 -0
- package/dist/Additio/from/schedules.js +2 -4
- package/dist/Additio/from/schedules.js.map +1 -1
- package/dist/Additio/from/teachers.js.map +1 -1
- package/dist/Additio/to/index.d.ts +2 -0
- package/dist/Additio/to/schedules.js +2 -4
- package/dist/Additio/to/schedules.js.map +1 -1
- package/dist/Admentum/from/courses.js.map +1 -1
- package/dist/Admentum/from/events.js.map +1 -1
- package/dist/Admentum/from/groups.js.map +1 -1
- package/dist/Admentum/from/index.js.map +1 -1
- package/dist/Admentum/from/locations.js.map +1 -1
- package/dist/Admentum/from/persons.js.map +1 -1
- package/dist/Admentum/from/schedules.d.ts +1 -0
- package/dist/Admentum/from/schedules.js +3 -6
- package/dist/Admentum/from/schedules.js.map +1 -1
- package/dist/Admentum/from/teachers.js.map +1 -1
- package/dist/Admentum/to/index.d.ts +1 -0
- package/dist/Admentum/to/schedules.js +4 -7
- package/dist/Admentum/to/schedules.js.map +1 -1
- package/dist/Excel/index.d.ts +4 -3
- package/dist/Excel/v1/from/index.js +1 -1
- package/dist/Excel/v1/from/index.js.map +1 -1
- package/dist/Excel/v1/index.d.ts +1 -0
- package/dist/Excel/v2/from/index.js +45 -54
- package/dist/Excel/v2/from/index.js.map +1 -1
- package/dist/Excel/v2/index.d.ts +1 -0
- package/dist/IdunSoft/from/courses.js.map +1 -1
- package/dist/IdunSoft/from/events.js +1 -2
- package/dist/IdunSoft/from/events.js.map +1 -1
- package/dist/IdunSoft/from/groups.js.map +1 -1
- package/dist/IdunSoft/from/index.js.map +1 -1
- package/dist/IdunSoft/from/locations.js.map +1 -1
- package/dist/IdunSoft/from/schedules.d.ts +1 -0
- package/dist/IdunSoft/from/schedules.js.map +1 -1
- package/dist/IdunSoft/from/teachers.js.map +1 -1
- package/dist/IdunSoft/to/index.d.ts +1 -0
- package/dist/IdunSoft/to/schedules.js +3 -6
- package/dist/IdunSoft/to/schedules.js.map +1 -1
- package/dist/InfoMentor/to/index.d.ts +1 -0
- package/dist/InfoMentor/to/schedules.js +1 -2
- package/dist/InfoMentor/to/schedules.js.map +1 -1
- package/dist/PlanDigital/from/index.js.map +1 -1
- package/dist/PlanDigital/from/schedules.js +9 -11
- package/dist/PlanDigital/from/schedules.js.map +1 -1
- package/dist/PlanDigital/index.d.ts +1 -0
- package/dist/Quiculum/file/to/index.d.ts +1 -0
- package/dist/Quiculum/file/to/schedules.js +5 -9
- package/dist/Quiculum/file/to/schedules.js.map +1 -1
- package/dist/RS/from/division.d.ts +1 -0
- package/dist/RS/from/division.js +1 -2
- package/dist/RS/from/division.js.map +1 -1
- package/dist/RS/from/index.js.map +1 -1
- package/dist/RS/from/schedules.d.ts +1 -0
- package/dist/RS/from/schedules.js.map +1 -1
- package/dist/RS/make-connected.d.ts +3 -1
- package/dist/RS/make-connected.js +34 -42
- package/dist/RS/make-connected.js.map +1 -1
- package/dist/RS/to/index.js.map +1 -1
- package/dist/RS/to/initial-configuration.js +4 -6
- package/dist/RS/to/initial-configuration.js.map +1 -1
- package/dist/RS/to/input/collections.js.map +1 -1
- package/dist/RS/to/input/default.js +1 -2
- package/dist/RS/to/input/default.js.map +1 -1
- package/dist/RS/to/input/dependencies.js +1 -2
- package/dist/RS/to/input/dependencies.js.map +1 -1
- package/dist/RS/to/input/dynamic-locked-times.js +1 -2
- package/dist/RS/to/input/dynamic-locked-times.js.map +1 -1
- package/dist/RS/to/input/events.js.map +1 -1
- package/dist/RS/to/input/groups.js.map +1 -1
- package/dist/RS/to/input/individuals.js +1 -2
- package/dist/RS/to/input/individuals.js.map +1 -1
- package/dist/RS/to/input/input.js +1 -2
- package/dist/RS/to/input/input.js.map +1 -1
- package/dist/RS/to/input/intervals.js +2 -4
- package/dist/RS/to/input/intervals.js.map +1 -1
- package/dist/RS/to/input/periods.js +2 -4
- package/dist/RS/to/input/periods.js.map +1 -1
- package/dist/RS/to/input/settings.js.map +1 -1
- package/dist/RS/to/input/teachers.js +1 -1
- package/dist/RS/to/input/teachers.js.map +1 -1
- package/dist/RS/to/input/util/attach-locked-times.js.map +1 -1
- package/dist/RS/to/input/util/parse-days.js.map +1 -1
- package/dist/RS/to/input/util/parse-group-references.js.map +1 -1
- package/dist/RS/to/input/util/parse-intervals.js +2 -4
- package/dist/RS/to/input/util/parse-intervals.js.map +1 -1
- package/dist/RS/to/input/util/parse-location-references.js +1 -2
- package/dist/RS/to/input/util/parse-location-references.js.map +1 -1
- package/dist/RS/to/input/util/parse-max-working-hours.js.map +1 -1
- package/dist/RS/to/input/util/parse-minimum-break-length.js.map +1 -1
- package/dist/RS/to/input/util/util.js +1 -2
- package/dist/RS/to/input/util/util.js.map +1 -1
- package/dist/RS/to/schedules.js.map +1 -1
- package/dist/RS/types/to.d.ts +1 -0
- package/dist/SS12000/from/activities.js +1 -2
- package/dist/SS12000/from/activities.js.map +1 -1
- package/dist/SS12000/from/calendar-events.js.map +1 -1
- package/dist/SS12000/from/duties.js.map +1 -1
- package/dist/SS12000/from/groups.js.map +1 -1
- package/dist/SS12000/from/index.js.map +1 -1
- package/dist/SS12000/from/persons.js.map +1 -1
- package/dist/SS12000/from/resources.js.map +1 -1
- package/dist/SS12000/from/rooms.js.map +1 -1
- package/dist/SS12000/from/syllabuses.js.map +1 -1
- package/dist/SS12000/index.d.ts +236 -201
- package/dist/SS12000/to/activities.js.map +1 -1
- package/dist/SS12000/to/calendar-events.js.map +1 -1
- package/dist/SS12000/to/common.js.map +1 -1
- package/dist/SS12000/to/duties.js.map +1 -1
- package/dist/SS12000/to/groups.js.map +1 -1
- package/dist/SS12000/to/index.d.ts +1 -0
- package/dist/SS12000/to/persons.js.map +1 -1
- package/dist/SS12000/to/resources.js.map +1 -1
- package/dist/SS12000/to/rooms.js.map +1 -1
- package/dist/SS12000/to/syllabuses.js.map +1 -1
- package/dist/SchoolSoft/api/from/index.js.map +1 -1
- package/dist/SchoolSoft/api/from/schedules.js +8 -12
- package/dist/SchoolSoft/api/from/schedules.js.map +1 -1
- package/dist/SchoolSoft/api/index.d.ts +1 -0
- package/dist/SchoolSoft/file/from/index.js.map +1 -1
- package/dist/SchoolSoft/file/from/schedules.js +83 -87
- package/dist/SchoolSoft/file/from/schedules.js.map +1 -1
- package/dist/SchoolSoft/file/index.d.ts +1 -0
- package/dist/SchoolSoft/file/to/index.d.ts +1 -0
- package/dist/SchoolSoft/file/to/schedules.js +1 -2
- package/dist/SchoolSoft/file/to/schedules.js.map +1 -1
- package/dist/SchoolSoft/index.d.ts +1 -0
- package/dist/Schoolity/txt/to/index.d.ts +1 -0
- package/dist/Schoolity/txt/to/schedules.js +5 -12
- package/dist/Schoolity/txt/to/schedules.js.map +1 -1
- package/dist/Skola24/mdb/from/course-and-events.js +3 -5
- package/dist/Skola24/mdb/from/course-and-events.js.map +1 -1
- package/dist/Skola24/mdb/from/groups.js.map +1 -1
- package/dist/Skola24/mdb/from/index.js.map +1 -1
- package/dist/Skola24/mdb/from/locations.js.map +1 -1
- package/dist/Skola24/mdb/from/schedule.d.ts +1 -0
- package/dist/Skola24/mdb/from/schedule.js.map +1 -1
- package/dist/Skola24/mdb/from/teachers.js.map +1 -1
- package/dist/Skola24/txt/from/calendar-exceptions.js +1 -2
- package/dist/Skola24/txt/from/calendar-exceptions.js.map +1 -1
- package/dist/Skola24/txt/from/division.js.map +1 -1
- package/dist/Skola24/txt/from/index.js.map +1 -1
- package/dist/Skola24/txt/from/period.js +31 -34
- package/dist/Skola24/txt/from/period.js.map +1 -1
- package/dist/Skola24/txt/from/schedules.d.ts +1 -0
- package/dist/Skola24/txt/from/schedules.js +6 -10
- package/dist/Skola24/txt/from/schedules.js.map +1 -1
- package/dist/Skola24/txt/from/util.js.map +1 -1
- package/dist/Skola24/txt/index.d.ts +1 -0
- package/dist/Skola24/txt/to/index.d.ts +1 -0
- package/dist/Skola24/txt/to/schedules.js +5 -12
- package/dist/Skola24/txt/to/schedules.js.map +1 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/functions.js.map +1 -1
- package/dist/common/get-date.js.map +1 -1
- package/dist/common/make-chainable/index.js.map +1 -1
- package/dist/common/types.d.ts +1 -3
- package/dist/core/from/configurations.js.map +1 -1
- package/dist/core/from/courses.js.map +1 -1
- package/dist/core/from/events.js.map +1 -1
- package/dist/core/from/exceptions.js.map +1 -1
- package/dist/core/from/groups.js.map +1 -1
- package/dist/core/from/index.js.map +1 -1
- package/dist/core/from/locations.js.map +1 -1
- package/dist/core/from/locked-times.js.map +1 -1
- package/dist/core/from/overlap-groups.js.map +1 -1
- package/dist/core/from/periods.js.map +1 -1
- package/dist/core/from/persons.js.map +1 -1
- package/dist/core/from/root-intervals.js.map +1 -1
- package/dist/core/from/schedules.js.map +1 -1
- package/dist/core/from/settings.js.map +1 -1
- package/dist/core/from/syllabuses.js.map +1 -1
- package/dist/core/from/teachers.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/interfaces/index.d.ts +23 -0
- package/dist/core/interfaces/other/companies.d.ts +1 -0
- package/dist/core/interfaces/other/companies.js.map +1 -1
- package/dist/core/interfaces/other/index.d.ts +6 -0
- package/dist/core/interfaces/other/operations.d.ts +1 -0
- package/dist/core/interfaces/vertices/companies.d.ts +1 -0
- package/dist/core/interfaces/vertices/configurations.d.ts +1 -0
- package/dist/core/interfaces/vertices/courses.d.ts +1 -0
- package/dist/core/interfaces/vertices/division-settings.d.ts +2 -0
- package/dist/core/interfaces/vertices/divisions.d.ts +1 -0
- package/dist/core/interfaces/vertices/events.d.ts +1 -0
- package/dist/core/interfaces/vertices/exceptions.d.ts +1 -0
- package/dist/core/interfaces/vertices/generations.d.ts +2 -0
- package/dist/core/interfaces/vertices/groups.d.ts +1 -0
- package/dist/core/interfaces/vertices/index.d.ts +1 -0
- package/dist/core/interfaces/vertices/locations.d.ts +1 -0
- package/dist/core/interfaces/vertices/locked-times.d.ts +2 -0
- package/dist/core/interfaces/vertices/overlap-groups.d.ts +1 -0
- package/dist/core/interfaces/vertices/periods.d.ts +3 -0
- package/dist/core/interfaces/vertices/persons.d.ts +1 -0
- package/dist/core/interfaces/vertices/properties/belongs-to.d.ts +1 -0
- package/dist/core/interfaces/vertices/properties/coalesced.d.ts +1 -0
- package/dist/core/interfaces/vertices/root-intervals.d.ts +2 -0
- package/dist/core/interfaces/vertices/syllabuses.d.ts +1 -0
- package/dist/core/interfaces/vertices/teachers.d.ts +1 -0
- package/dist/core/interfaces/vertices/threads.d.ts +6 -4
- package/dist/core/interfaces/vertices/users.d.ts +1 -0
- package/dist/core/interfaces/vertices/util/custom-vertex-export/index.d.ts +6 -6
- package/dist/core/interfaces/vertices/util/custom-vertex-export/util.d.ts +4 -4
- package/dist/core/interfaces/vertices/util/deep-vertex-export/index.d.ts +9 -9
- package/dist/core/interfaces/vertices/util/edges.d.ts +7 -7
- package/dist/core/interfaces/vertices/util/index.d.ts +6 -0
- package/dist/core/interfaces/vertices/util/util.d.ts +20 -24
- package/dist/core/interfaces/vertices/util/vertex-query/index.d.ts +11 -11
- package/dist/core/interfaces/vertices/util/vertex.d.ts +1 -1
- package/dist/core/interfaces/vertices/vertex-query.d.ts +27 -26
- package/dist/core/interfaces/vertices/vertex-query.js.map +1 -1
- package/dist/core/to/configurations.js +1 -2
- package/dist/core/to/configurations.js.map +1 -1
- package/dist/core/to/courses.js +1 -2
- package/dist/core/to/courses.js.map +1 -1
- package/dist/core/to/division.js.map +1 -1
- package/dist/core/to/events.js +1 -2
- package/dist/core/to/events.js.map +1 -1
- package/dist/core/to/exceptions.js +1 -2
- package/dist/core/to/exceptions.js.map +1 -1
- package/dist/core/to/groups.js +1 -2
- package/dist/core/to/groups.js.map +1 -1
- package/dist/core/to/locations.js +1 -2
- package/dist/core/to/locations.js.map +1 -1
- package/dist/core/to/locked-times.js +1 -2
- package/dist/core/to/locked-times.js.map +1 -1
- package/dist/core/to/overlap-groups.js +1 -2
- package/dist/core/to/overlap-groups.js.map +1 -1
- package/dist/core/to/periods.js +1 -2
- package/dist/core/to/periods.js.map +1 -1
- package/dist/core/to/persons.js +1 -2
- package/dist/core/to/persons.js.map +1 -1
- package/dist/core/to/root-intervals.js +1 -2
- package/dist/core/to/root-intervals.js.map +1 -1
- package/dist/core/to/schedules.d.ts +1 -0
- package/dist/core/to/schedules.js.map +1 -1
- package/dist/core/to/settings.js +1 -2
- package/dist/core/to/settings.js.map +1 -1
- package/dist/core/to/syllabuses.js +1 -2
- package/dist/core/to/syllabuses.js.map +1 -1
- package/dist/core/to/teachers.js +1 -2
- package/dist/core/to/teachers.js.map +1 -1
- package/dist/core/to/util.d.ts +2 -0
- package/dist/core/to/util.js +1 -2
- package/dist/core/to/util.js.map +1 -1
- package/dist/core/types/index.d.ts +1 -0
- package/dist/core/util.js +1 -2
- package/dist/core/util.js.map +1 -1
- package/dist/identify/constants/index.js.map +1 -1
- package/dist/identify/index.js +1 -2
- package/dist/identify/index.js.map +1 -1
- package/dist/sdui/from/classes.js.map +1 -1
- package/dist/sdui/from/courses.js.map +1 -1
- package/dist/sdui/from/holidays.js.map +1 -1
- package/dist/sdui/from/index.js.map +1 -1
- package/dist/sdui/from/lessons.js.map +1 -1
- package/dist/sdui/from/rooms.js.map +1 -1
- package/dist/sdui/from/schedules.d.ts +2 -0
- package/dist/sdui/from/schedules.js.map +1 -1
- package/dist/sdui/from/school-years.js.map +1 -1
- package/dist/sdui/from/substitution-plans.js.map +1 -1
- package/dist/sdui/from/teachers.js.map +1 -1
- package/dist/sdui/to/classes.js.map +1 -1
- package/dist/sdui/to/courses.js.map +1 -1
- package/dist/sdui/to/holidays.js.map +1 -1
- package/dist/sdui/to/hours.js.map +1 -1
- package/dist/sdui/to/index.d.ts +2 -0
- package/dist/sdui/to/lessons.js.map +1 -1
- package/dist/sdui/to/rooms.js.map +1 -1
- package/dist/sdui/to/schedules.js.map +1 -1
- package/dist/sdui/to/school-years.js.map +1 -1
- package/dist/sdui/to/substitution-plans.js +3 -6
- package/dist/sdui/to/substitution-plans.js.map +1 -1
- package/dist/sdui/to/teachers.js.map +1 -1
- package/dist/vKlass/from/index.js.map +1 -1
- package/dist/vKlass/from/schedule.d.ts +1 -0
- package/dist/vKlass/from/schedule.js.map +1 -1
- package/dist/vKlass/to/schedules.js +6 -17
- package/dist/vKlass/to/schedules.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,55 +5,51 @@ import { EdgeMultiplicity } from "./edges.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* Similar to O[K], but does not require K to be a key of O. Extracts the property K from each member of the possible union types in U.
|
|
7
7
|
*/
|
|
8
|
-
type GetByKey<O, K extends keyof any> = O extends { [P in K]: infer T } ? T : O extends { [P in K]?: infer T } ? T | undefined : never;
|
|
8
|
+
type GetByKey<O, K$1 extends keyof any> = O extends { [P in K$1]: infer T } ? T : O extends { [P in K$1]?: infer T } ? T | undefined : never;
|
|
9
9
|
/**
|
|
10
10
|
* keyof { a1: ..., a2: ..., ... } | { b1: ..., b2: ..., ... } | ... => 'a1' | 'a2' | ... | 'b1' | 'b2' | ...
|
|
11
11
|
*/
|
|
12
|
-
type AllKeys<U> = U extends any ? keyof U : never;
|
|
12
|
+
type AllKeys<U$1> = U$1 extends any ? keyof U$1 : never;
|
|
13
13
|
declare namespace MakeMixedNs {
|
|
14
|
-
type ExtractArrayType<T> = T extends Array<any> ? T : never;
|
|
15
|
-
type ExtractObjectType<T> = T extends Array<any> ? never : T extends object ? T : never;
|
|
16
|
-
type _MakeMixedArray<T extends any[]> = [T] extends [never] ? never : (T extends Array<infer U> ? U : never) extends infer U ? Array<MakeMixed<U>> : never;
|
|
17
|
-
type _MakeMixedObject<T extends object> = [T] extends [never] ? never : { [K in AllKeys<T>]: MakeMixed<GetByKey<T, K>> };
|
|
18
|
-
export type MakeMixed<T> = (ExtractArrayType<T> extends (infer V extends any[]) ? _MakeMixedArray<V> : never) | (ExtractObjectType<T> extends (infer V extends object) ? _MakeMixedObject<V> : never) | (T extends object ? never : T);
|
|
14
|
+
type ExtractArrayType<T$1> = T$1 extends Array<any> ? T$1 : never;
|
|
15
|
+
type ExtractObjectType<T$1> = T$1 extends Array<any> ? never : T$1 extends object ? T$1 : never;
|
|
16
|
+
type _MakeMixedArray<T$1 extends any[]> = [T$1] extends [never] ? never : (T$1 extends Array<infer U> ? U : never) extends infer U ? Array<MakeMixed<U>> : never;
|
|
17
|
+
type _MakeMixedObject<T$1 extends object> = [T$1] extends [never] ? never : { [K in AllKeys<T$1>]: MakeMixed<GetByKey<T$1, K>> };
|
|
18
|
+
export type MakeMixed<T$1> = (ExtractArrayType<T$1> extends (infer V extends any[]) ? _MakeMixedArray<V> : never) | (ExtractObjectType<T$1> extends (infer V extends object) ? _MakeMixedObject<V> : never) | (T$1 extends object ? never : T$1);
|
|
19
19
|
export {};
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Merges a union of types into a single type by combining properties of object types and merging array element types.
|
|
23
23
|
*/
|
|
24
|
-
type MakeMixed<T> = MakeMixedNs.MakeMixed<T>;
|
|
24
|
+
type MakeMixed<T$1> = MakeMixedNs.MakeMixed<T$1>;
|
|
25
25
|
/**
|
|
26
26
|
* Deep partial type that allows for partial properties at any level of nesting.
|
|
27
27
|
*/
|
|
28
|
-
type DeepPartial<T> = T extends Array<infer U> ? Array<DeepPartial<U>> : T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T;
|
|
28
|
+
type DeepPartial<T$1> = T$1 extends Array<infer U> ? Array<DeepPartial<U>> : T$1 extends object ? { [K in keyof T$1]?: DeepPartial<T$1[K]> } : T$1;
|
|
29
29
|
/**
|
|
30
30
|
* A deep version of NonNullable<T> that recursively removes null and undefined from all properties and nested properties.
|
|
31
31
|
*/
|
|
32
|
-
type DeepNonNullable<T> = T extends any ? T extends ((...args: any[]) => any) ? T : T extends Array<infer U> ? Array<DeepNonNullable<NonNullable<U>>> : T extends object ? { [K in keyof T]-?: DeepNonNullable<NonNullable<T[K]>> } : NonNullable<T> : never;
|
|
33
|
-
type _IsUnion<T, U = T> = T extends any ? [U] extends [T] ? false : true : never;
|
|
32
|
+
type DeepNonNullable<T$1> = T$1 extends any ? T$1 extends ((...args: any[]) => any) ? T$1 : T$1 extends Array<infer U> ? Array<DeepNonNullable<NonNullable<U>>> : T$1 extends object ? { [K in keyof T$1]-?: DeepNonNullable<NonNullable<T$1[K]>> } : NonNullable<T$1> : never;
|
|
33
|
+
type _IsUnion<T$1, U$1 = T$1> = T$1 extends any ? [U$1] extends [T$1] ? false : true : never;
|
|
34
34
|
/**
|
|
35
35
|
* Lets a type pass if it is a union type, otherwise returns `never`.
|
|
36
36
|
*/
|
|
37
|
-
type IsUnion<T> = _IsUnion<T> extends true ? T : never;
|
|
38
|
-
/**
|
|
39
|
-
* Lets a type pass if it is not a union type, otherwise returns `never`.
|
|
40
|
-
*/
|
|
41
|
-
|
|
37
|
+
type IsUnion<T$1> = _IsUnion<T$1> extends true ? T$1 : never;
|
|
42
38
|
/**
|
|
43
39
|
* Returns never if any type in the tuple is a union, otherwise returns the tuple.
|
|
44
40
|
*/
|
|
45
|
-
type NoneIsUnion<T extends any[]> = AnyUnion<T> extends true ? never : T;
|
|
46
|
-
type AnyUnion<T extends any[]> = T extends [infer Head, ...infer Tail] ? _IsUnion<Head> extends true ? true : AnyUnion<Tail extends any[] ? Tail : []> : false;
|
|
41
|
+
type NoneIsUnion<T$1 extends any[]> = AnyUnion<T$1> extends true ? never : T$1;
|
|
42
|
+
type AnyUnion<T$1 extends any[]> = T$1 extends [infer Head, ...infer Tail] ? _IsUnion<Head> extends true ? true : AnyUnion<Tail extends any[] ? Tail : []> : false;
|
|
47
43
|
/**
|
|
48
44
|
* Returns `true` if every element in the tuple is `true`, otherwise returns `false`.
|
|
49
45
|
* Returns `never` for an empty tuple.
|
|
50
46
|
*/
|
|
51
|
-
type AllTrue<T extends any[]> = T extends [] ? never : _AllTrue<T>;
|
|
52
|
-
type _AllTrue<T extends any[]> = T extends [infer Head, ...infer Tail] ? Head extends true ? Tail extends any[] ? _AllTrue<Tail> : never : false : true;
|
|
47
|
+
type AllTrue<T$1 extends any[]> = T$1 extends [] ? never : _AllTrue<T$1>;
|
|
48
|
+
type _AllTrue<T$1 extends any[]> = T$1 extends [infer Head, ...infer Tail] ? Head extends true ? Tail extends any[] ? _AllTrue<Tail> : never : false : true;
|
|
53
49
|
/**
|
|
54
50
|
* Returns the tail of a tuple, or `never` if the tuple is empty.
|
|
55
51
|
*/
|
|
56
|
-
type Tail<T extends any[]> = T extends [any, ...infer V extends [any, ...any[]]] ? Tail<V> : T extends [infer U] ? U : never;
|
|
52
|
+
type Tail<T$1 extends any[]> = T$1 extends [any, ...infer V extends [any, ...any[]]] ? Tail<V> : T$1 extends [infer U] ? U : never;
|
|
57
53
|
/**
|
|
58
54
|
* Prettify<T>
|
|
59
55
|
* Materializes T into a plain object type for clearer tooltips and stable structural equality.
|
|
@@ -70,15 +66,15 @@ type Tail<T extends any[]> = T extends [any, ...infer V extends [any, ...any[]]]
|
|
|
70
66
|
* - Inner unions remain unions; only the outer shape is normalized.
|
|
71
67
|
* - The `& {}` forces recomputation and a simpler displayed shape in editor/tooling.
|
|
72
68
|
*/
|
|
73
|
-
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
69
|
+
type Prettify<T$1> = { [K in keyof T$1]: T$1[K] } & {};
|
|
74
70
|
/**
|
|
75
71
|
* Wraps the given type T into an array if its multiplicity M is 'array'.
|
|
76
72
|
*/
|
|
77
|
-
type SetMultiplicity<T, M = EdgeMultiplicity> = M extends 'array' ? T[] : T;
|
|
73
|
+
type SetMultiplicity<T$1, M = EdgeMultiplicity> = M extends 'array' ? T$1[] : T$1;
|
|
78
74
|
/**
|
|
79
75
|
* Extracts null and undefined from a type T, resulting in `null | undefined` if both are present, otherwise `null`, `undefined`, or `never`.
|
|
80
76
|
*/
|
|
81
|
-
type ExtractNullish<T> = Extract<T, null | undefined>;
|
|
77
|
+
type ExtractNullish<T$1> = Extract<T$1, null | undefined>;
|
|
82
78
|
//#endregion
|
|
83
79
|
export { AllKeys, AllTrue, DeepNonNullable, DeepPartial, ExtractNullish, IsUnion, MakeMixed, NoneIsUnion, Prettify, SetMultiplicity, Tail };
|
|
84
80
|
//# sourceMappingURL=util.d.ts.map
|
|
@@ -7,26 +7,26 @@ import { FLATTEN_KEY, _Flatten } from "./util.js";
|
|
|
7
7
|
|
|
8
8
|
//#region src/core/interfaces/vertices/util/vertex-query/index.d.ts
|
|
9
9
|
declare namespace HandleEdge {
|
|
10
|
-
type Plain<E extends EdgeBase<any, any>, D extends SupportedDepths> = E extends Plain.Edge<infer U> ? _VertexQuery<U, D> : never;
|
|
11
|
-
type Wrapped<E extends EdgeBase<any, any>, D extends SupportedDepths> = E extends Wrapped.Edge<infer K extends string, infer V extends Vertex<Collection>, object> ? ({
|
|
10
|
+
type Plain<E$1 extends EdgeBase<any, any>, D extends SupportedDepths> = E$1 extends Plain.Edge<infer U> ? _VertexQuery<U, D> : never;
|
|
11
|
+
type Wrapped<E$1 extends EdgeBase<any, any>, D extends SupportedDepths> = E$1 extends Wrapped.Edge<infer K extends string, infer V extends Vertex<Collection>, object> ? ({
|
|
12
12
|
[FLATTEN_KEY]: true;
|
|
13
13
|
} & { [k in K]: V extends any ? _VertexQuery<V, D> : never }) : never;
|
|
14
|
-
type Coalesced<E extends EdgeBase<any, any>, D extends SupportedDepths> = (E extends Coalesced.Edge<infer V, any, object> ? V : null) extends (infer V extends Vertex<Collection>) ? {
|
|
14
|
+
type Coalesced<E$1 extends EdgeBase<any, any>, D extends SupportedDepths> = (E$1 extends Coalesced.Edge<infer V, any, object> ? V : null) extends (infer V extends Vertex<Collection>) ? {
|
|
15
15
|
[FLATTEN_KEY]: true;
|
|
16
16
|
[Coalesced.Util.Keys.TO]: MakeMixed<
|
|
17
17
|
// must mix here to support all different vertex types
|
|
18
18
|
V extends any ? _VertexQuery<V, D> : never>;
|
|
19
19
|
} : never;
|
|
20
|
-
type GroupWithExclude<E extends EdgeBase<any, any>, D extends SupportedDepths> = E extends GroupWithExclude.Edge<infer G extends Vertex<Collection>, infer P extends Vertex<Collection>, object> ? {
|
|
20
|
+
type GroupWithExclude<E$1 extends EdgeBase<any, any>, D extends SupportedDepths> = E$1 extends GroupWithExclude.Edge<infer G extends Vertex<Collection>, infer P extends Vertex<Collection>, object> ? {
|
|
21
21
|
[FLATTEN_KEY]: true;
|
|
22
22
|
[GroupWithExclude.Util.Keys.TO]: G extends any ? _VertexQuery<G, D> : never;
|
|
23
23
|
[GroupWithExclude.Util.Keys.EXCLUDE]: P extends any ? _VertexQuery<P, D> : never;
|
|
24
24
|
} : never;
|
|
25
|
-
type AvailableLocation<E extends EdgeBase<any, any>, D extends SupportedDepths> = E extends AvailableLocation.Edge<infer L extends Vertex<Collection>, object> ? {
|
|
25
|
+
type AvailableLocation<E$1 extends EdgeBase<any, any>, D extends SupportedDepths> = E$1 extends AvailableLocation.Edge<infer L extends Vertex<Collection>, object> ? {
|
|
26
26
|
[FLATTEN_KEY]: true;
|
|
27
27
|
[AvailableLocation.Util.Keys.LOCATIONS]: L extends any ? _VertexQuery<L, D> : never;
|
|
28
28
|
} : never;
|
|
29
|
-
type ThreadMessage<E extends EdgeBase<any, any>, D extends SupportedDepths> = E extends ThreadMessage.Edge<infer U extends Vertex<Collection>, infer T extends Vertex<Collection>, object> ? {
|
|
29
|
+
type ThreadMessage<E$1 extends EdgeBase<any, any>, D extends SupportedDepths> = E$1 extends ThreadMessage.Edge<infer U extends Vertex<Collection>, infer T extends Vertex<Collection>, object> ? {
|
|
30
30
|
[FLATTEN_KEY]: true;
|
|
31
31
|
[ThreadMessage.Util.Keys.USER]: U extends any ? _VertexQuery<U, D> : never;
|
|
32
32
|
[ThreadMessage.Util.Keys.TAGGED_PERSONS]: T extends any ? _VertexQuery<T, D> : never;
|
|
@@ -35,17 +35,17 @@ declare namespace HandleEdge {
|
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
37
|
*/
|
|
38
|
-
type _VertexQuery<V extends Vertex<Collection>, D extends SupportedDepths> = D extends MinDepth ? {
|
|
39
|
-
[SELECT_KEY]: Array<AllKeysOf<V>>;
|
|
38
|
+
type _VertexQuery<V$1 extends Vertex<Collection>, D extends SupportedDepths> = D extends MinDepth ? {
|
|
39
|
+
[SELECT_KEY]: Array<AllKeysOf<V$1>>;
|
|
40
40
|
} : {
|
|
41
|
-
[EXPAND_KEY]: { [K in keyof PickEdges<V> as V[K] extends never ? K : never]: InvalidEdgeMessage } & _Flatten<RemoveNeverValues<{ [K in keyof PickEdges<V> as V[K] extends never ? never : K]-?: NonNullable<V[K]> extends EdgeWrapper<EdgeMultiplicity, infer E extends EdgeBase<any, any> | null | undefined> ? (HandleEdge.Plain<NonNullable<E>, Decrement<D>> | HandleEdge.Wrapped<NonNullable<E>, Decrement<D>> | HandleEdge.Coalesced<NonNullable<E>, Decrement<D>> | HandleEdge.GroupWithExclude<NonNullable<E>, Decrement<D>> | HandleEdge.AvailableLocation<NonNullable<E>, Decrement<D>> | HandleEdge.ThreadMessage<NonNullable<E>, Decrement<D>>) : never }>>;
|
|
41
|
+
[EXPAND_KEY]: { [K in keyof PickEdges<V$1> as V$1[K] extends never ? K : never]: InvalidEdgeMessage } & _Flatten<RemoveNeverValues<{ [K in keyof PickEdges<V$1> as V$1[K] extends never ? never : K]-?: NonNullable<V$1[K]> extends EdgeWrapper<EdgeMultiplicity, infer E extends EdgeBase<any, any> | null | undefined> ? (HandleEdge.Plain<NonNullable<E>, Decrement<D>> | HandleEdge.Wrapped<NonNullable<E>, Decrement<D>> | HandleEdge.Coalesced<NonNullable<E>, Decrement<D>> | HandleEdge.GroupWithExclude<NonNullable<E>, Decrement<D>> | HandleEdge.AvailableLocation<NonNullable<E>, Decrement<D>> | HandleEdge.ThreadMessage<NonNullable<E>, Decrement<D>>) : never }>>;
|
|
42
42
|
} & {
|
|
43
|
-
[SELECT_KEY]: Array<AllKeysOf<V>>;
|
|
43
|
+
[SELECT_KEY]: Array<AllKeysOf<V$1>>;
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
46
|
*
|
|
47
47
|
*/
|
|
48
|
-
type VertexQuery<V extends Vertex<Collection>> = DeepPartial<_VertexQuery<V, MaxDepth>>;
|
|
48
|
+
type VertexQuery<V$1 extends Vertex<Collection>> = DeepPartial<_VertexQuery<V$1, MaxDepth>>;
|
|
49
49
|
//#endregion
|
|
50
50
|
export { VertexQuery };
|
|
51
51
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -66,5 +66,5 @@ type OmitVertexProperties<T extends object> = Omit<T, keyof Vertex<Collection>>;
|
|
|
66
66
|
type PickVertexProperties<T extends Vertex<Collection>> = Pick<T, keyof Vertex<Collection>>;
|
|
67
67
|
type VertexFactory<C extends Collection, T extends object = object> = Vertex<C> & T;
|
|
68
68
|
//#endregion
|
|
69
|
-
export { Collection, IDKey, IDType, OmitInternalVertexKeys, OmitVertexProperties, PickVertexProperties, PrivateIDKey, PrivateIDType, PublicIDKey, RealCollection, Vertex, VertexFactory };
|
|
69
|
+
export { Collection, IDKey, IDType, OmitInternalVertexKeys, OmitVertexProperties, PickVertexProperties, PrivateIDKey, PrivateIDType, PseudoCollection, PublicIDKey, RealCollection, Vertex, VertexFactory };
|
|
70
70
|
//# sourceMappingURL=vertex.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { VertexQuery } from "./util/vertex-query/index.js";
|
|
2
2
|
import { AssertNoInvalidExpandKeys } from "./util/custom-vertex-export/assert-no-invalid-expand-keys.js";
|
|
3
3
|
import { CustomVertexExport } from "./util/custom-vertex-export/index.js";
|
|
4
|
+
import "./util/index.js";
|
|
4
5
|
import { PeriodVertex } from "./periods.js";
|
|
5
6
|
import { RootIntervalVertex } from "./root-intervals.js";
|
|
6
7
|
import { DivisionSettingsVertex } from "./division-settings.js";
|
|
@@ -47,16 +48,16 @@ type VertexRecord = {
|
|
|
47
48
|
users: UserVertex;
|
|
48
49
|
threads: ThreadVertex;
|
|
49
50
|
};
|
|
50
|
-
type BaseQueryRecord<C extends keyof VertexRecord> = VertexQuery<VertexRecord[C]>;
|
|
51
|
+
type BaseQueryRecord<C$1 extends keyof VertexRecord> = VertexQuery<VertexRecord[C$1]>;
|
|
51
52
|
/**
|
|
52
53
|
* See {@link createVertexQuery}
|
|
53
54
|
*/
|
|
54
|
-
declare class VertexQuery$1<C extends keyof VertexRecord, Q extends BaseQueryRecord<C> & AssertNoInvalidExpandKeys<VertexRecord[C], Q>> {
|
|
55
|
+
declare class VertexQuery$1<C$1 extends keyof VertexRecord, Q$1 extends BaseQueryRecord<C$1> & AssertNoInvalidExpandKeys<VertexRecord[C$1], Q$1>> {
|
|
55
56
|
private readonly _collection;
|
|
56
57
|
private readonly _query;
|
|
57
|
-
constructor(_collection: C, _query: Q);
|
|
58
|
-
get collection(): C;
|
|
59
|
-
get query(): Q;
|
|
58
|
+
constructor(_collection: C$1, _query: Q$1);
|
|
59
|
+
get collection(): C$1;
|
|
60
|
+
get query(): Q$1;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
62
63
|
* Infers the result type for a query created via createVertexQuery.
|
|
@@ -81,27 +82,27 @@ type Infer<T extends VertexQuery$1<any, any>> = T extends VertexQuery$1<infer C,
|
|
|
81
82
|
* type GroupType = Infer<typeof groupQuery>;
|
|
82
83
|
*/
|
|
83
84
|
declare namespace createVertexQuery {
|
|
84
|
-
function division<Q extends VertexQuery<DivisionVertex> & AssertNoInvalidExpandKeys<DivisionVertex, Q>>(query: Q): VertexQuery$1<"divisions", Q>;
|
|
85
|
-
function settings<Q extends VertexQuery<DivisionSettingsVertex> & AssertNoInvalidExpandKeys<DivisionSettingsVertex, Q>>(query: Q): VertexQuery$1<"settings", Q>;
|
|
86
|
-
function exception<Q extends VertexQuery<ExceptionVertex> & AssertNoInvalidExpandKeys<ExceptionVertex, Q>>(query: Q): VertexQuery$1<"exceptions", Q>;
|
|
87
|
-
function event<Q extends VertexQuery<EventVertex> & AssertNoInvalidExpandKeys<EventVertex, Q>>(query: Q): VertexQuery$1<"events", Q>;
|
|
88
|
-
function scheduleEvent<Q extends VertexQuery<ScheduleEventVertex> & AssertNoInvalidExpandKeys<ScheduleEventVertex, Q>>(query: Q): VertexQuery$1<"scheduleEvents", Q>;
|
|
89
|
-
function calendarEvent<Q extends VertexQuery<CalendarEventVertex> & AssertNoInvalidExpandKeys<CalendarEventVertex, Q>>(query: Q): VertexQuery$1<"calendarEvents", Q>;
|
|
90
|
-
function course<Q extends VertexQuery<CourseVertex> & AssertNoInvalidExpandKeys<CourseVertex, Q>>(query: Q): VertexQuery$1<"courses", Q>;
|
|
91
|
-
function generation<Q extends VertexQuery<GenerationVertex> & AssertNoInvalidExpandKeys<GenerationVertex, Q>>(query: Q): VertexQuery$1<"generations", Q>;
|
|
92
|
-
function location<Q extends VertexQuery<LocationVertex> & AssertNoInvalidExpandKeys<LocationVertex, Q>>(query: Q): VertexQuery$1<"locations", Q>;
|
|
93
|
-
function lockedTime<Q extends VertexQuery<LockedTimeVertex> & AssertNoInvalidExpandKeys<LockedTimeVertex, Q>>(query: Q): VertexQuery$1<"lockedTimes", Q>;
|
|
94
|
-
function overlapGroup<Q extends VertexQuery<OverlapGroupVertex> & AssertNoInvalidExpandKeys<OverlapGroupVertex, Q>>(query: Q): VertexQuery$1<"overlapGroups", Q>;
|
|
95
|
-
function period<Q extends VertexQuery<PeriodVertex> & AssertNoInvalidExpandKeys<PeriodVertex, Q>>(query: Q): VertexQuery$1<"periods", Q>;
|
|
96
|
-
function person<Q extends VertexQuery<PersonVertex> & AssertNoInvalidExpandKeys<PersonVertex, Q>>(query: Q): VertexQuery$1<"persons", Q>;
|
|
97
|
-
function student<Q extends VertexQuery<PersonVertex> & AssertNoInvalidExpandKeys<PersonVertex, Q>>(query: Q): VertexQuery$1<"students", Q>;
|
|
98
|
-
function rootInterval<Q extends VertexQuery<RootIntervalVertex> & AssertNoInvalidExpandKeys<RootIntervalVertex, Q>>(query: Q): VertexQuery$1<"rootIntervals", Q>;
|
|
99
|
-
function syllabus<Q extends VertexQuery<SyllabusVertex> & AssertNoInvalidExpandKeys<SyllabusVertex, Q>>(query: Q): VertexQuery$1<"syllabuses", Q>;
|
|
100
|
-
function group<Q extends VertexQuery<GroupVertex> & AssertNoInvalidExpandKeys<GroupVertex, Q>>(query: Q): VertexQuery$1<"groups", Q>;
|
|
101
|
-
function teacher<Q extends VertexQuery<TeacherVertex> & AssertNoInvalidExpandKeys<TeacherVertex, Q>>(query: Q): VertexQuery$1<"teachers", Q>;
|
|
102
|
-
function configuration<Q extends VertexQuery<ConfigurationVertex> & AssertNoInvalidExpandKeys<ConfigurationVertex, Q>>(query: Q): VertexQuery$1<"configurations", Q>;
|
|
103
|
-
function thread<Q extends VertexQuery<ThreadVertex> & AssertNoInvalidExpandKeys<ThreadVertex, Q>>(query: Q): VertexQuery$1<"threads", Q>;
|
|
104
|
-
function user<Q extends VertexQuery<UserVertex> & AssertNoInvalidExpandKeys<UserVertex, Q>>(query: Q): VertexQuery$1<"users", Q>;
|
|
85
|
+
function division<Q$1 extends VertexQuery<DivisionVertex> & AssertNoInvalidExpandKeys<DivisionVertex, Q$1>>(query: Q$1): VertexQuery$1<"divisions", Q$1>;
|
|
86
|
+
function settings<Q$1 extends VertexQuery<DivisionSettingsVertex> & AssertNoInvalidExpandKeys<DivisionSettingsVertex, Q$1>>(query: Q$1): VertexQuery$1<"settings", Q$1>;
|
|
87
|
+
function exception<Q$1 extends VertexQuery<ExceptionVertex> & AssertNoInvalidExpandKeys<ExceptionVertex, Q$1>>(query: Q$1): VertexQuery$1<"exceptions", Q$1>;
|
|
88
|
+
function event<Q$1 extends VertexQuery<EventVertex> & AssertNoInvalidExpandKeys<EventVertex, Q$1>>(query: Q$1): VertexQuery$1<"events", Q$1>;
|
|
89
|
+
function scheduleEvent<Q$1 extends VertexQuery<ScheduleEventVertex> & AssertNoInvalidExpandKeys<ScheduleEventVertex, Q$1>>(query: Q$1): VertexQuery$1<"scheduleEvents", Q$1>;
|
|
90
|
+
function calendarEvent<Q$1 extends VertexQuery<CalendarEventVertex> & AssertNoInvalidExpandKeys<CalendarEventVertex, Q$1>>(query: Q$1): VertexQuery$1<"calendarEvents", Q$1>;
|
|
91
|
+
function course<Q$1 extends VertexQuery<CourseVertex> & AssertNoInvalidExpandKeys<CourseVertex, Q$1>>(query: Q$1): VertexQuery$1<"courses", Q$1>;
|
|
92
|
+
function generation<Q$1 extends VertexQuery<GenerationVertex> & AssertNoInvalidExpandKeys<GenerationVertex, Q$1>>(query: Q$1): VertexQuery$1<"generations", Q$1>;
|
|
93
|
+
function location<Q$1 extends VertexQuery<LocationVertex> & AssertNoInvalidExpandKeys<LocationVertex, Q$1>>(query: Q$1): VertexQuery$1<"locations", Q$1>;
|
|
94
|
+
function lockedTime<Q$1 extends VertexQuery<LockedTimeVertex> & AssertNoInvalidExpandKeys<LockedTimeVertex, Q$1>>(query: Q$1): VertexQuery$1<"lockedTimes", Q$1>;
|
|
95
|
+
function overlapGroup<Q$1 extends VertexQuery<OverlapGroupVertex> & AssertNoInvalidExpandKeys<OverlapGroupVertex, Q$1>>(query: Q$1): VertexQuery$1<"overlapGroups", Q$1>;
|
|
96
|
+
function period<Q$1 extends VertexQuery<PeriodVertex> & AssertNoInvalidExpandKeys<PeriodVertex, Q$1>>(query: Q$1): VertexQuery$1<"periods", Q$1>;
|
|
97
|
+
function person<Q$1 extends VertexQuery<PersonVertex> & AssertNoInvalidExpandKeys<PersonVertex, Q$1>>(query: Q$1): VertexQuery$1<"persons", Q$1>;
|
|
98
|
+
function student<Q$1 extends VertexQuery<PersonVertex> & AssertNoInvalidExpandKeys<PersonVertex, Q$1>>(query: Q$1): VertexQuery$1<"students", Q$1>;
|
|
99
|
+
function rootInterval<Q$1 extends VertexQuery<RootIntervalVertex> & AssertNoInvalidExpandKeys<RootIntervalVertex, Q$1>>(query: Q$1): VertexQuery$1<"rootIntervals", Q$1>;
|
|
100
|
+
function syllabus<Q$1 extends VertexQuery<SyllabusVertex> & AssertNoInvalidExpandKeys<SyllabusVertex, Q$1>>(query: Q$1): VertexQuery$1<"syllabuses", Q$1>;
|
|
101
|
+
function group<Q$1 extends VertexQuery<GroupVertex> & AssertNoInvalidExpandKeys<GroupVertex, Q$1>>(query: Q$1): VertexQuery$1<"groups", Q$1>;
|
|
102
|
+
function teacher<Q$1 extends VertexQuery<TeacherVertex> & AssertNoInvalidExpandKeys<TeacherVertex, Q$1>>(query: Q$1): VertexQuery$1<"teachers", Q$1>;
|
|
103
|
+
function configuration<Q$1 extends VertexQuery<ConfigurationVertex> & AssertNoInvalidExpandKeys<ConfigurationVertex, Q$1>>(query: Q$1): VertexQuery$1<"configurations", Q$1>;
|
|
104
|
+
function thread<Q$1 extends VertexQuery<ThreadVertex> & AssertNoInvalidExpandKeys<ThreadVertex, Q$1>>(query: Q$1): VertexQuery$1<"threads", Q$1>;
|
|
105
|
+
function user<Q$1 extends VertexQuery<UserVertex> & AssertNoInvalidExpandKeys<UserVertex, Q$1>>(query: Q$1): VertexQuery$1<"users", Q$1>;
|
|
105
106
|
}
|
|
106
107
|
//#endregion
|
|
107
108
|
export { Infer, VertexQuery$1 as VertexQuery, createVertexQuery };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertex-query.js","names":["_collection: C","_query: Q"],"sources":["../../../../src/core/interfaces/vertices/vertex-query.ts"],"sourcesContent":["import type { AssertNoInvalidExpandKeys, Collection, CustomVertexExport } from './util';\nimport type { TeacherVertex } from './teachers';\nimport type { ExceptionVertex } from './exceptions';\nimport type { EventVertex, ScheduleEventVertex, CalendarEventVertex } from './events';\nimport type { CourseVertex } from './courses';\nimport type { DivisionSettingsVertex } from './division-settings';\nimport type { DivisionVertex } from './divisions';\nimport type { GenerationVertex } from './generations';\nimport type { GroupVertex } from './groups';\nimport type { LocationVertex } from './locations';\nimport type { LockedTimeVertex } from './locked-times';\nimport type { OverlapGroupVertex } from './overlap-groups';\nimport type { PeriodVertex } from './periods';\nimport type { PersonVertex } from './persons';\nimport type { RootIntervalVertex } from './root-intervals';\nimport type { SyllabusVertex } from './syllabuses';\nimport type { ConfigurationVertex } from './configurations';\nimport type { CompanyVertex } from './companies';\nimport type { UserVertex } from './users';\nimport type { ThreadVertex } from './threads';\nimport type { VertexQuery as Query } from './util/vertex-query';\nimport type { TypeEqual } from 'ts-expect';\nimport { expectType } from 'ts-expect';\n\n\nexport type VertexRecord = {\n divisions: DivisionVertex;\n divisionSettings: DivisionSettingsVertex;\n settings: DivisionSettingsVertex;\n teachers: TeacherVertex;\n exceptions: ExceptionVertex;\n events: EventVertex;\n scheduleEvents: ScheduleEventVertex;\n calendarEvents: CalendarEventVertex;\n courses: CourseVertex;\n generations: GenerationVertex;\n groups: GroupVertex;\n locations: LocationVertex;\n lockedTimes: LockedTimeVertex;\n overlapGroups: OverlapGroupVertex;\n periods: PeriodVertex;\n persons: PersonVertex;\n students: PersonVertex;\n rootIntervals: RootIntervalVertex;\n syllabuses: SyllabusVertex;\n configurations: ConfigurationVertex;\n companies: CompanyVertex;\n users: UserVertex;\n threads: ThreadVertex;\n};\nexport type BaseQueryRecord<C extends keyof VertexRecord> = Query<VertexRecord[C]>;\n{\n // the keys must all be a collection\n type Mismatches = keyof {\n [K in keyof VertexRecord as K extends Collection ? never : K]: true\n };\n expectType<TypeEqual<Mismatches, never>>(true);\n}\n\n/**\n * See {@link createVertexQuery}\n */\nexport class VertexQuery <\n C extends keyof VertexRecord,\n Q extends BaseQueryRecord<C> & AssertNoInvalidExpandKeys<VertexRecord[C], Q>\n> {\n constructor (\n private readonly _collection: C,\n private readonly _query: Q\n ) {}\n\n get collection () { return this._collection }\n get query () { return this._query }\n}\n\n\n/**\n * Infers the result type for a query created via createVertexQuery.\n *\n * @example\n * const personQuery = createVertexQuery('persons', { select: ['id', 'firstName'] });\n * type PersonType = Infer<typeof personQuery>;\n */\nexport type Infer<T extends VertexQuery<any, any>> = // eslint-disable-line @typescript-eslint/no-explicit-any\n T extends VertexQuery<infer C, infer Q>\n ? CustomVertexExport<VertexRecord[C], Q>\n : never;\n\n\n/**\n * Builds a typed vertex query for a given vertex type using a select/expand shape.\n *\n * Use together with Infer<T> to obtain the serialized result type.\n *\n * @typeParam Q - The select/expand query shape for that vertex.\n *\n * @example\n * const groupQuery = createVertexQuery.group({\n * select: ['id', 'displayName'],\n * expand: { members: { select: ['id'] } }\n * });\n * type GroupType = Infer<typeof groupQuery>;\n */\nexport namespace createVertexQuery {\n //\n // The following did not work: it seems we need to define Q as an completely independent type parameter (?)\n //\n // export function createVertexQuery <\n // C extends keyof VertexRecord,\n // const Q extends Query<VertexRecord[C]>\n // > (\n // collection: C,\n // query: Q\n // ) {\n // return new VertexQuery(collection, query);\n // }\n\n export function division <Q extends Query<DivisionVertex > & AssertNoInvalidExpandKeys<DivisionVertex, Q>> (query: Q) { return new VertexQuery('divisions', query) }\n export function settings <Q extends Query<DivisionSettingsVertex> & AssertNoInvalidExpandKeys<DivisionSettingsVertex, Q>> (query: Q) { return new VertexQuery('settings', query) }\n export function exception <Q extends Query<ExceptionVertex > & AssertNoInvalidExpandKeys<ExceptionVertex, Q>> (query: Q) { return new VertexQuery('exceptions', query) }\n export function event <Q extends Query<EventVertex > & AssertNoInvalidExpandKeys<EventVertex, Q>> (query: Q) { return new VertexQuery('events', query) }\n export function scheduleEvent<Q extends Query<ScheduleEventVertex > & AssertNoInvalidExpandKeys<ScheduleEventVertex, Q>> (query: Q) { return new VertexQuery('scheduleEvents', query) }\n export function calendarEvent<Q extends Query<CalendarEventVertex > & AssertNoInvalidExpandKeys<CalendarEventVertex, Q>> (query: Q) { return new VertexQuery('calendarEvents', query) }\n export function course <Q extends Query<CourseVertex > & AssertNoInvalidExpandKeys<CourseVertex, Q>> (query: Q) { return new VertexQuery('courses', query) }\n export function generation <Q extends Query<GenerationVertex > & AssertNoInvalidExpandKeys<GenerationVertex, Q>> (query: Q) { return new VertexQuery('generations', query) }\n export function location <Q extends Query<LocationVertex > & AssertNoInvalidExpandKeys<LocationVertex, Q>> (query: Q) { return new VertexQuery('locations', query) }\n export function lockedTime <Q extends Query<LockedTimeVertex > & AssertNoInvalidExpandKeys<LockedTimeVertex, Q>> (query: Q) { return new VertexQuery('lockedTimes', query) }\n export function overlapGroup <Q extends Query<OverlapGroupVertex > & AssertNoInvalidExpandKeys<OverlapGroupVertex, Q>> (query: Q) { return new VertexQuery('overlapGroups', query) }\n export function period <Q extends Query<PeriodVertex > & AssertNoInvalidExpandKeys<PeriodVertex, Q>> (query: Q) { return new VertexQuery('periods', query) }\n export function person <Q extends Query<PersonVertex > & AssertNoInvalidExpandKeys<PersonVertex, Q>> (query: Q) { return new VertexQuery('persons', query) }\n export function student <Q extends Query<PersonVertex > & AssertNoInvalidExpandKeys<PersonVertex, Q>> (query: Q) { return new VertexQuery('students', query) }\n export function rootInterval <Q extends Query<RootIntervalVertex > & AssertNoInvalidExpandKeys<RootIntervalVertex, Q>> (query: Q) { return new VertexQuery('rootIntervals', query) }\n export function syllabus <Q extends Query<SyllabusVertex > & AssertNoInvalidExpandKeys<SyllabusVertex, Q>> (query: Q) { return new VertexQuery('syllabuses', query) }\n export function group <Q extends Query<GroupVertex > & AssertNoInvalidExpandKeys<GroupVertex, Q>> (query: Q) { return new VertexQuery('groups', query) }\n export function teacher <Q extends Query<TeacherVertex > & AssertNoInvalidExpandKeys<TeacherVertex, Q>> (query: Q) { return new VertexQuery('teachers', query) }\n export function configuration<Q extends Query<ConfigurationVertex > & AssertNoInvalidExpandKeys<ConfigurationVertex, Q>> (query: Q) { return new VertexQuery('configurations', query) }\n export function thread <Q extends Query<ThreadVertex > & AssertNoInvalidExpandKeys<ThreadVertex, Q>> (query: Q) { return new VertexQuery('threads', query) }\n export function user <Q extends Query<UserVertex > & AssertNoInvalidExpandKeys<UserVertex, Q>> (query: Q) { return new VertexQuery('users', query) }\n}"],"mappings":";;;AAwDE,WAAyC;;;;
|
|
1
|
+
{"version":3,"file":"vertex-query.js","names":["_collection: C","_query: Q"],"sources":["../../../../src/core/interfaces/vertices/vertex-query.ts"],"sourcesContent":["import type { AssertNoInvalidExpandKeys, Collection, CustomVertexExport } from './util';\nimport type { TeacherVertex } from './teachers';\nimport type { ExceptionVertex } from './exceptions';\nimport type { EventVertex, ScheduleEventVertex, CalendarEventVertex } from './events';\nimport type { CourseVertex } from './courses';\nimport type { DivisionSettingsVertex } from './division-settings';\nimport type { DivisionVertex } from './divisions';\nimport type { GenerationVertex } from './generations';\nimport type { GroupVertex } from './groups';\nimport type { LocationVertex } from './locations';\nimport type { LockedTimeVertex } from './locked-times';\nimport type { OverlapGroupVertex } from './overlap-groups';\nimport type { PeriodVertex } from './periods';\nimport type { PersonVertex } from './persons';\nimport type { RootIntervalVertex } from './root-intervals';\nimport type { SyllabusVertex } from './syllabuses';\nimport type { ConfigurationVertex } from './configurations';\nimport type { CompanyVertex } from './companies';\nimport type { UserVertex } from './users';\nimport type { ThreadVertex } from './threads';\nimport type { VertexQuery as Query } from './util/vertex-query';\nimport type { TypeEqual } from 'ts-expect';\nimport { expectType } from 'ts-expect';\n\n\nexport type VertexRecord = {\n divisions: DivisionVertex;\n divisionSettings: DivisionSettingsVertex;\n settings: DivisionSettingsVertex;\n teachers: TeacherVertex;\n exceptions: ExceptionVertex;\n events: EventVertex;\n scheduleEvents: ScheduleEventVertex;\n calendarEvents: CalendarEventVertex;\n courses: CourseVertex;\n generations: GenerationVertex;\n groups: GroupVertex;\n locations: LocationVertex;\n lockedTimes: LockedTimeVertex;\n overlapGroups: OverlapGroupVertex;\n periods: PeriodVertex;\n persons: PersonVertex;\n students: PersonVertex;\n rootIntervals: RootIntervalVertex;\n syllabuses: SyllabusVertex;\n configurations: ConfigurationVertex;\n companies: CompanyVertex;\n users: UserVertex;\n threads: ThreadVertex;\n};\nexport type BaseQueryRecord<C extends keyof VertexRecord> = Query<VertexRecord[C]>;\n{\n // the keys must all be a collection\n type Mismatches = keyof {\n [K in keyof VertexRecord as K extends Collection ? never : K]: true\n };\n expectType<TypeEqual<Mismatches, never>>(true);\n}\n\n/**\n * See {@link createVertexQuery}\n */\nexport class VertexQuery <\n C extends keyof VertexRecord,\n Q extends BaseQueryRecord<C> & AssertNoInvalidExpandKeys<VertexRecord[C], Q>\n> {\n constructor (\n private readonly _collection: C,\n private readonly _query: Q\n ) {}\n\n get collection () { return this._collection }\n get query () { return this._query }\n}\n\n\n/**\n * Infers the result type for a query created via createVertexQuery.\n *\n * @example\n * const personQuery = createVertexQuery('persons', { select: ['id', 'firstName'] });\n * type PersonType = Infer<typeof personQuery>;\n */\nexport type Infer<T extends VertexQuery<any, any>> = // eslint-disable-line @typescript-eslint/no-explicit-any\n T extends VertexQuery<infer C, infer Q>\n ? CustomVertexExport<VertexRecord[C], Q>\n : never;\n\n\n/**\n * Builds a typed vertex query for a given vertex type using a select/expand shape.\n *\n * Use together with Infer<T> to obtain the serialized result type.\n *\n * @typeParam Q - The select/expand query shape for that vertex.\n *\n * @example\n * const groupQuery = createVertexQuery.group({\n * select: ['id', 'displayName'],\n * expand: { members: { select: ['id'] } }\n * });\n * type GroupType = Infer<typeof groupQuery>;\n */\nexport namespace createVertexQuery {\n //\n // The following did not work: it seems we need to define Q as an completely independent type parameter (?)\n //\n // export function createVertexQuery <\n // C extends keyof VertexRecord,\n // const Q extends Query<VertexRecord[C]>\n // > (\n // collection: C,\n // query: Q\n // ) {\n // return new VertexQuery(collection, query);\n // }\n\n export function division <Q extends Query<DivisionVertex > & AssertNoInvalidExpandKeys<DivisionVertex, Q>> (query: Q) { return new VertexQuery('divisions', query) }\n export function settings <Q extends Query<DivisionSettingsVertex> & AssertNoInvalidExpandKeys<DivisionSettingsVertex, Q>> (query: Q) { return new VertexQuery('settings', query) }\n export function exception <Q extends Query<ExceptionVertex > & AssertNoInvalidExpandKeys<ExceptionVertex, Q>> (query: Q) { return new VertexQuery('exceptions', query) }\n export function event <Q extends Query<EventVertex > & AssertNoInvalidExpandKeys<EventVertex, Q>> (query: Q) { return new VertexQuery('events', query) }\n export function scheduleEvent<Q extends Query<ScheduleEventVertex > & AssertNoInvalidExpandKeys<ScheduleEventVertex, Q>> (query: Q) { return new VertexQuery('scheduleEvents', query) }\n export function calendarEvent<Q extends Query<CalendarEventVertex > & AssertNoInvalidExpandKeys<CalendarEventVertex, Q>> (query: Q) { return new VertexQuery('calendarEvents', query) }\n export function course <Q extends Query<CourseVertex > & AssertNoInvalidExpandKeys<CourseVertex, Q>> (query: Q) { return new VertexQuery('courses', query) }\n export function generation <Q extends Query<GenerationVertex > & AssertNoInvalidExpandKeys<GenerationVertex, Q>> (query: Q) { return new VertexQuery('generations', query) }\n export function location <Q extends Query<LocationVertex > & AssertNoInvalidExpandKeys<LocationVertex, Q>> (query: Q) { return new VertexQuery('locations', query) }\n export function lockedTime <Q extends Query<LockedTimeVertex > & AssertNoInvalidExpandKeys<LockedTimeVertex, Q>> (query: Q) { return new VertexQuery('lockedTimes', query) }\n export function overlapGroup <Q extends Query<OverlapGroupVertex > & AssertNoInvalidExpandKeys<OverlapGroupVertex, Q>> (query: Q) { return new VertexQuery('overlapGroups', query) }\n export function period <Q extends Query<PeriodVertex > & AssertNoInvalidExpandKeys<PeriodVertex, Q>> (query: Q) { return new VertexQuery('periods', query) }\n export function person <Q extends Query<PersonVertex > & AssertNoInvalidExpandKeys<PersonVertex, Q>> (query: Q) { return new VertexQuery('persons', query) }\n export function student <Q extends Query<PersonVertex > & AssertNoInvalidExpandKeys<PersonVertex, Q>> (query: Q) { return new VertexQuery('students', query) }\n export function rootInterval <Q extends Query<RootIntervalVertex > & AssertNoInvalidExpandKeys<RootIntervalVertex, Q>> (query: Q) { return new VertexQuery('rootIntervals', query) }\n export function syllabus <Q extends Query<SyllabusVertex > & AssertNoInvalidExpandKeys<SyllabusVertex, Q>> (query: Q) { return new VertexQuery('syllabuses', query) }\n export function group <Q extends Query<GroupVertex > & AssertNoInvalidExpandKeys<GroupVertex, Q>> (query: Q) { return new VertexQuery('groups', query) }\n export function teacher <Q extends Query<TeacherVertex > & AssertNoInvalidExpandKeys<TeacherVertex, Q>> (query: Q) { return new VertexQuery('teachers', query) }\n export function configuration<Q extends Query<ConfigurationVertex > & AssertNoInvalidExpandKeys<ConfigurationVertex, Q>> (query: Q) { return new VertexQuery('configurations', query) }\n export function thread <Q extends Query<ThreadVertex > & AssertNoInvalidExpandKeys<ThreadVertex, Q>> (query: Q) { return new VertexQuery('threads', query) }\n export function user <Q extends Query<UserVertex > & AssertNoInvalidExpandKeys<UserVertex, Q>> (query: Q) { return new VertexQuery('users', query) }\n}"],"mappings":";;;AAwDE,WAAyC,KAAK;;;;AAMhD,IAAa,cAAb,MAGE;CACA,YACE,AAAiBA,aACjB,AAAiBC,QACjB;EAFiB;EACA;;CAGnB,IAAI,aAAc;AAAE,SAAO,KAAK;;CAChC,IAAI,QAAc;AAAE,SAAO,KAAK;;;;;CA6CzB,SAAS,SAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,aAAoB,MAAM;;;CACrL,SAAS,SAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,YAAoB,MAAM;;;CACrL,SAAS,UAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,cAAoB,MAAM;;;CACrL,SAAS,MAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,UAAoB,MAAM;;;CACrL,SAAS,cAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,kBAAoB,MAAM;;;CACrL,SAAS,cAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,kBAAoB,MAAM;;;CACrL,SAAS,OAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,WAAoB,MAAM;;;CACrL,SAAS,WAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,eAAoB,MAAM;;;CACrL,SAAS,SAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,aAAoB,MAAM;;;CACrL,SAAS,WAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,eAAoB,MAAM;;;CACrL,SAAS,aAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,iBAAoB,MAAM;;;CACrL,SAAS,OAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,WAAoB,MAAM;;;CACrL,SAAS,OAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,WAAoB,MAAM;;;CACrL,SAAS,QAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,YAAoB,MAAM;;;CACrL,SAAS,aAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,iBAAoB,MAAM;;;CACrL,SAAS,SAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,cAAoB,MAAM;;;CACrL,SAAS,MAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,UAAoB,MAAM;;;CACrL,SAAS,QAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,YAAoB,MAAM;;;CACrL,SAAS,cAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,kBAAoB,MAAM;;;CACrL,SAAS,OAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,WAAoB,MAAM;;;CACrL,SAAS,KAA+G,OAAU;AAAE,SAAO,IAAI,YAAY,SAAoB,MAAM"}
|
|
@@ -4,9 +4,8 @@ import { omitEdgesAndInternalProperties } from "./util.js";
|
|
|
4
4
|
var configurations_default = (configurations, _options) => {
|
|
5
5
|
return configurations.map((x) => {
|
|
6
6
|
const edges = {};
|
|
7
|
-
const nonEdges = omitEdgesAndInternalProperties(x, edges);
|
|
8
7
|
return {
|
|
9
|
-
...
|
|
8
|
+
...omitEdgesAndInternalProperties(x, edges),
|
|
10
9
|
...edges
|
|
11
10
|
};
|
|
12
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurations.js","names":["edges: SerializedEdgesOnlyVertexExport<ConfigurationVertex>"],"sources":["../../../src/core/to/configurations.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport type { BaseOptions } from '../../common/types';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { ConfigurationVertex } from '../interfaces/vertices/configurations';\n\nexport default (\n configurations: Types.Mixed.Configuration[],\n _options: BaseOptions\n): OutTypes.configuration[] => {\n return configurations\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<ConfigurationVertex> = {\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<ConfigurationVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;AAMA,8BACE,gBACA,aAC6B;AAC7B,QAAO,eACJ,KAAI,MAAK;EACR,MAAMA,QAA8D;
|
|
1
|
+
{"version":3,"file":"configurations.js","names":["edges: SerializedEdgesOnlyVertexExport<ConfigurationVertex>"],"sources":["../../../src/core/to/configurations.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport type { BaseOptions } from '../../common/types';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { ConfigurationVertex } from '../interfaces/vertices/configurations';\n\nexport default (\n configurations: Types.Mixed.Configuration[],\n _options: BaseOptions\n): OutTypes.configuration[] => {\n return configurations\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<ConfigurationVertex> = {\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<ConfigurationVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;AAMA,8BACE,gBACA,aAC6B;AAC7B,QAAO,eACJ,KAAI,MAAK;EACR,MAAMA,QAA8D,EACnE;AAGD,SAAO;GAAE,GAFQ,+BAA+B,GAAG,MAAM;GAEnC,GAAG;GAAO;GAChC"}
|
package/dist/core/to/courses.js
CHANGED
|
@@ -29,9 +29,8 @@ var courses_default = (courses, options) => {
|
|
|
29
29
|
locations: [getVertexId(x$1.locations[0], options)]
|
|
30
30
|
}))
|
|
31
31
|
};
|
|
32
|
-
const nonEdges = omitEdgesAndInternalProperties(x, edges);
|
|
33
32
|
return {
|
|
34
|
-
...
|
|
33
|
+
...omitEdgesAndInternalProperties(x, edges),
|
|
35
34
|
...edges
|
|
36
35
|
};
|
|
37
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"courses.js","names":["edges: SerializedEdgesOnlyVertexExport<CourseVertex>","x"],"sources":["../../../src/core/to/courses.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { CourseVertex } from '../interfaces/vertices/courses';\n\n\nexport default (\n courses: Types.Mixed.Course[],\n options: BaseOptions\n): OutTypes.course[] => {\n return courses\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<CourseVertex> = {\n period: x.period ? getVertexId(x.period, options) : undefined,\n overlapGroup: x.overlapGroup ? getVertexId(x.overlapGroup, options) : undefined,\n // overlapSpecies: x.overlapSpecies ? getVertexId(x.overlapSpecies, options) : undefined,\n syllabus: x.syllabus ? getVertexId(x.syllabus, options) : undefined,\n events: x.events ?.map(x => getVertexId(x, options)),\n lockedTimes: x.lockedTimes ?.map(x => getVertexId(x, options)),\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n teachers: x.teachers ?.map(x => ({ ...x, to: getVertexId(x.to, options) })),\n participants: x.participants?.map(x => ({ ...x, to: getVertexId(x.to, options) })),\n groups: x.groups ?.map(x => ({ ...x, to: getVertexId(x.to, options), exclude: x.exclude?.map(y => getVertexId(y, options)) })),\n locations: x.locations ?.map(x => ({ ...x, locations: [getVertexId(x.locations[0], options)] as [string] })),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<CourseVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAQA,uBACE,SACA,YACsB;AACtB,QAAO,QACJ,KAAI,MAAK;EACR,MAAMA,QAAuD;GAC3D,QAAgB,EAAE,SAAiB,YAAY,EAAE,QAAgB,
|
|
1
|
+
{"version":3,"file":"courses.js","names":["edges: SerializedEdgesOnlyVertexExport<CourseVertex>","x"],"sources":["../../../src/core/to/courses.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { CourseVertex } from '../interfaces/vertices/courses';\n\n\nexport default (\n courses: Types.Mixed.Course[],\n options: BaseOptions\n): OutTypes.course[] => {\n return courses\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<CourseVertex> = {\n period: x.period ? getVertexId(x.period, options) : undefined,\n overlapGroup: x.overlapGroup ? getVertexId(x.overlapGroup, options) : undefined,\n // overlapSpecies: x.overlapSpecies ? getVertexId(x.overlapSpecies, options) : undefined,\n syllabus: x.syllabus ? getVertexId(x.syllabus, options) : undefined,\n events: x.events ?.map(x => getVertexId(x, options)),\n lockedTimes: x.lockedTimes ?.map(x => getVertexId(x, options)),\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n teachers: x.teachers ?.map(x => ({ ...x, to: getVertexId(x.to, options) })),\n participants: x.participants?.map(x => ({ ...x, to: getVertexId(x.to, options) })),\n groups: x.groups ?.map(x => ({ ...x, to: getVertexId(x.to, options), exclude: x.exclude?.map(y => getVertexId(y, options)) })),\n locations: x.locations ?.map(x => ({ ...x, locations: [getVertexId(x.locations[0], options)] as [string] })),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<CourseVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAQA,uBACE,SACA,YACsB;AACtB,QAAO,QACJ,KAAI,MAAK;EACR,MAAMA,QAAuD;GAC3D,QAAgB,EAAE,SAAiB,YAAY,EAAE,QAAgB,QAAQ,GAAG;GAC5E,cAAgB,EAAE,eAAiB,YAAY,EAAE,cAAgB,QAAQ,GAAG;GAE5E,UAAgB,EAAE,WAAiB,YAAY,EAAE,UAAgB,QAAQ,GAAG;GAC5E,QAAgB,EAAE,QAAc,KAAI,QAAK,YAAYC,KAAG,QAAQ,CAAC;GACjE,aAAgB,EAAE,aAAc,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GACjE,YAAgB,EAAE,YAAc,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GACjE,UAAgB,EAAE,UAAc,KAAI,SAAM;IAAE,GAAGA;IAAG,IAAI,YAAYA,IAAE,IAAI,QAAQ;IAAE,EAAE;GACpF,cAAgB,EAAE,cAAc,KAAI,SAAM;IAAE,GAAGA;IAAG,IAAI,YAAYA,IAAE,IAAI,QAAQ;IAAE,EAAE;GACpF,QAAgB,EAAE,QAAc,KAAI,SAAM;IAAE,GAAGA;IAAG,IAAI,YAAYA,IAAE,IAAI,QAAQ;IAAE,SAASA,IAAE,SAAS,KAAI,MAAK,YAAY,GAAG,QAAQ,CAAC;IAAE,EAAE;GAC3I,WAAgB,EAAE,WAAc,KAAI,SAAM;IAAE,GAAGA;IAAG,WAAW,CAAC,YAAYA,IAAE,UAAU,IAAI,QAAQ,CAAC;IAAc,EAAE;GACpH;AAGD,SAAO;GAAE,GAFQ,+BAA+B,GAAG,MAAM;GAEnC,GAAG;GAAO;GAChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"division.js","names":[],"sources":["../../../src/core/to/division.ts"],"sourcesContent":["import { pick } from 'lodash-es';\nimport type { Types } from '../types';\nimport type { BaseOptions } from '../../common/types';\nimport type { OutTypes } from './schedules';\n\nexport default (\n division: Types.Mixed.Division,\n options: BaseOptions\n): Pick<OutTypes.division, 'displayName' | 'start' | 'end'> => {\n return pick(division, 'displayName', 'start', 'end');\n};\n"],"mappings":";;;AAKA,wBACE,UACA,YAC6D;AAC7D,QAAO,KAAK,UAAU,eAAe,SAAS"}
|
|
1
|
+
{"version":3,"file":"division.js","names":[],"sources":["../../../src/core/to/division.ts"],"sourcesContent":["import { pick } from 'lodash-es';\nimport type { Types } from '../types';\nimport type { BaseOptions } from '../../common/types';\nimport type { OutTypes } from './schedules';\n\nexport default (\n division: Types.Mixed.Division,\n options: BaseOptions\n): Pick<OutTypes.division, 'displayName' | 'start' | 'end'> => {\n return pick(division, 'displayName', 'start', 'end');\n};\n"],"mappings":";;;AAKA,wBACE,UACA,YAC6D;AAC7D,QAAO,KAAK,UAAU,eAAe,SAAS,MAAM"}
|
package/dist/core/to/events.js
CHANGED
|
@@ -30,9 +30,8 @@ var events_default = (events, options) => {
|
|
|
30
30
|
inLocations: x.inLocations?.map((x$1) => x$1 ? getVertexId(x$1, options) : null),
|
|
31
31
|
threads: void 0
|
|
32
32
|
};
|
|
33
|
-
const nonEdges = omitEdgesAndInternalProperties(x, edges);
|
|
34
33
|
return {
|
|
35
|
-
...
|
|
34
|
+
...omitEdgesAndInternalProperties(x, edges),
|
|
36
35
|
...edges
|
|
37
36
|
};
|
|
38
37
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","names":["edges: SerializedEdgesOnlyVertexExport<EventVertex>","x"],"sources":["../../../src/core/to/events.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { EventVertex } from '../interfaces/vertices/events';\n\n\n\n\nexport default (\n events: Types.Mixed.Event[],\n options: BaseOptions\n): OutTypes.event[] => {\n return events\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<EventVertex> = {\n period: x.period ? getVertexId(x.period, options) : undefined,\n // overlapGroup: x.overlapGroup ? getVertexId(x.overlapGroup, options) : undefined,\n overlapSpecies: x.overlapSpecies ? getVertexId(x.overlapSpecies, options) : undefined,\n course: x.course ? getVertexId(x.course, options) : undefined,\n lockedTimes: x.lockedTimes ?.map(x => getVertexId(x, options)),\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n teachers: x.teachers ?.map(x => ({ ...x, to: getVertexId(x.to, options) })),\n participants: x.participants?.map(x => ({ ...x, to: getVertexId(x.to, options) })),\n groups: x.groups ?.map(x => ({ ...x, to: getVertexId(x.to, options), exclude: x.exclude?.map(y => getVertexId(y, options)) })),\n locations: x.locations ?.map(x => ({ ...x, locations: [getVertexId(x.locations[0], options)] as [string] })),\n inLocations: x.inLocations ?.map(x => x ? getVertexId(x, options) : null),\n threads: undefined\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<EventVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n\n"],"mappings":";;;;AAUA,sBACE,QACA,YACqB;AACrB,QAAO,OACJ,KAAI,MAAK;EACR,MAAMA,QAAsD;GAC1D,QAAgB,EAAE,SAAiB,YAAY,EAAE,QAAgB,
|
|
1
|
+
{"version":3,"file":"events.js","names":["edges: SerializedEdgesOnlyVertexExport<EventVertex>","x"],"sources":["../../../src/core/to/events.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { EventVertex } from '../interfaces/vertices/events';\n\n\n\n\nexport default (\n events: Types.Mixed.Event[],\n options: BaseOptions\n): OutTypes.event[] => {\n return events\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<EventVertex> = {\n period: x.period ? getVertexId(x.period, options) : undefined,\n // overlapGroup: x.overlapGroup ? getVertexId(x.overlapGroup, options) : undefined,\n overlapSpecies: x.overlapSpecies ? getVertexId(x.overlapSpecies, options) : undefined,\n course: x.course ? getVertexId(x.course, options) : undefined,\n lockedTimes: x.lockedTimes ?.map(x => getVertexId(x, options)),\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n teachers: x.teachers ?.map(x => ({ ...x, to: getVertexId(x.to, options) })),\n participants: x.participants?.map(x => ({ ...x, to: getVertexId(x.to, options) })),\n groups: x.groups ?.map(x => ({ ...x, to: getVertexId(x.to, options), exclude: x.exclude?.map(y => getVertexId(y, options)) })),\n locations: x.locations ?.map(x => ({ ...x, locations: [getVertexId(x.locations[0], options)] as [string] })),\n inLocations: x.inLocations ?.map(x => x ? getVertexId(x, options) : null),\n threads: undefined\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<EventVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n\n"],"mappings":";;;;AAUA,sBACE,QACA,YACqB;AACrB,QAAO,OACJ,KAAI,MAAK;EACR,MAAMA,QAAsD;GAC1D,QAAgB,EAAE,SAAiB,YAAY,EAAE,QAAgB,QAAQ,GAAG;GAE5E,gBAAgB,EAAE,iBAAiB,YAAY,EAAE,gBAAgB,QAAQ,GAAG;GAC5E,QAAgB,EAAE,SAAiB,YAAY,EAAE,QAAgB,QAAQ,GAAG;GAC5E,aAAgB,EAAE,aAAc,KAAI,QAAK,YAAYC,KAAG,QAAQ,CAAC;GACjE,YAAgB,EAAE,YAAc,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GACjE,UAAgB,EAAE,UAAc,KAAI,SAAM;IAAE,GAAGA;IAAG,IAAI,YAAYA,IAAE,IAAI,QAAQ;IAAE,EAAE;GACpF,cAAgB,EAAE,cAAc,KAAI,SAAM;IAAE,GAAGA;IAAG,IAAI,YAAYA,IAAE,IAAI,QAAQ;IAAE,EAAE;GACpF,QAAgB,EAAE,QAAc,KAAI,SAAM;IAAE,GAAGA;IAAG,IAAI,YAAYA,IAAE,IAAI,QAAQ;IAAE,SAASA,IAAE,SAAS,KAAI,MAAK,YAAY,GAAG,QAAQ,CAAC;IAAE,EAAE;GAC3I,WAAgB,EAAE,WAAc,KAAI,SAAM;IAAE,GAAGA;IAAG,WAAW,CAAC,YAAYA,IAAE,UAAU,IAAI,QAAQ,CAAC;IAAc,EAAE;GACnH,aAAgB,EAAE,aAAc,KAAI,QAAKA,MAAI,YAAYA,KAAG,QAAQ,GAAG,KAAK;GAC5E,SAAgB;GACjB;AAGD,SAAO;GAAE,GAFQ,+BAA+B,GAAG,MAAM;GAEnC,GAAG;GAAO;GAChC"}
|
|
@@ -17,9 +17,8 @@ var exceptions_default = (exceptions, options) => {
|
|
|
17
17
|
exceptions: x.exceptions?.map((x$1) => getVertexId(x$1, options)),
|
|
18
18
|
parentExceptions: x.parentExceptions?.map((x$1) => getVertexId(x$1, options))
|
|
19
19
|
};
|
|
20
|
-
const nonEdges = omitEdgesAndInternalProperties(x, edges);
|
|
21
20
|
return {
|
|
22
|
-
...
|
|
21
|
+
...omitEdgesAndInternalProperties(x, edges),
|
|
23
22
|
...edges
|
|
24
23
|
};
|
|
25
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exceptions.js","names":["edges: SerializedEdgesOnlyVertexExport<ExceptionVertex>","x"],"sources":["../../../src/core/to/exceptions.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { ExceptionVertex } from '../interfaces/vertices/exceptions';\nimport { omit } from 'lodash-es';\n\n\nexport default (\n exceptions: Types.Mixed.Exception[],\n options: BaseOptions\n): OutTypes.exception[] => {\n return exceptions\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<ExceptionVertex> = {\n exception: x.exception\n ? {\n ...omit(x.exception, 'to'),\n ...x.exception.to && { to: getVertexId(x.exception.to, options) }\n }\n : undefined,\n sources: x.sources ?.map(x => ({ toModel: x.toModel, to: getVertexId(x.to, options) })),\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n parentExceptions: x.parentExceptions?.map(x => getVertexId(x, options)),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<ExceptionVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;;AASA,0BACE,YACA,YACyB;AACzB,QAAO,WACJ,KAAI,MAAK;EACR,MAAMA,QAA0D;GAC9D,WAAW,EAAE,YACT;IACA,GAAG,KAAK,EAAE,WAAW;
|
|
1
|
+
{"version":3,"file":"exceptions.js","names":["edges: SerializedEdgesOnlyVertexExport<ExceptionVertex>","x"],"sources":["../../../src/core/to/exceptions.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { ExceptionVertex } from '../interfaces/vertices/exceptions';\nimport { omit } from 'lodash-es';\n\n\nexport default (\n exceptions: Types.Mixed.Exception[],\n options: BaseOptions\n): OutTypes.exception[] => {\n return exceptions\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<ExceptionVertex> = {\n exception: x.exception\n ? {\n ...omit(x.exception, 'to'),\n ...x.exception.to && { to: getVertexId(x.exception.to, options) }\n }\n : undefined,\n sources: x.sources ?.map(x => ({ toModel: x.toModel, to: getVertexId(x.to, options) })),\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n parentExceptions: x.parentExceptions?.map(x => getVertexId(x, options)),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<ExceptionVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;;AASA,0BACE,YACA,YACyB;AACzB,QAAO,WACJ,KAAI,MAAK;EACR,MAAMA,QAA0D;GAC9D,WAAW,EAAE,YACT;IACA,GAAG,KAAK,EAAE,WAAW,KAAK;IAC1B,GAAG,EAAE,UAAU,MAAM,EAAE,IAAI,YAAY,EAAE,UAAU,IAAI,QAAQ,EAAE;IAClE,GACC;GACJ,SAAkB,EAAE,SAAkB,KAAI,SAAM;IAAE,SAASC,IAAE;IAAS,IAAI,YAAYA,IAAE,IAAI,QAAQ;IAAE,EAAE;GACxG,YAAkB,EAAE,YAAkB,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GACvE,kBAAkB,EAAE,kBAAkB,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GACxE;AAGD,SAAO;GAAE,GAFQ,+BAA+B,GAAG,MAAM;GAEnC,GAAG;GAAO;GAChC"}
|
package/dist/core/to/groups.js
CHANGED
|
@@ -13,9 +13,8 @@ var groups_default = (groups, options) => {
|
|
|
13
13
|
parentGroups: x.parentGroups?.map((x$1) => getVertexId(x$1, options)),
|
|
14
14
|
subGroups: x.subGroups?.map((x$1) => getVertexId(x$1, options))
|
|
15
15
|
};
|
|
16
|
-
const nonEdges = omitEdgesAndInternalProperties(x, edges);
|
|
17
16
|
return {
|
|
18
|
-
...
|
|
17
|
+
...omitEdgesAndInternalProperties(x, edges),
|
|
19
18
|
...edges
|
|
20
19
|
};
|
|
21
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups.js","names":["edges: SerializedEdgesOnlyVertexExport<GroupVertex>","x"],"sources":["../../../src/core/to/groups.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { GroupVertex } from '../interfaces/vertices/groups';\n\nexport default (\n groups: Types.Mixed.Group[],\n options: BaseOptions\n): OutTypes.group[] => {\n return groups\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<GroupVertex> = {\n rootInterval: x.rootInterval ? getVertexId(x.rootInterval, options) : undefined,\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n lockedTimes: x.lockedTimes ?.map(x => getVertexId(x, options)),\n lunch: x.lunch ?.map(x => getVertexId(x, options)),\n members: x.members ?.map(x => getVertexId(x, options)),\n parentGroups: x.parentGroups?.map(x => getVertexId(x, options)),\n subGroups: x.subGroups ?.map(x => getVertexId(x, options)),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<GroupVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,sBACE,QACA,YACqB;AACrB,QAAO,OACJ,KAAI,MAAK;EACR,MAAMA,QAAsD;GAC1D,cAAc,EAAE,eAAe,YAAY,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"groups.js","names":["edges: SerializedEdgesOnlyVertexExport<GroupVertex>","x"],"sources":["../../../src/core/to/groups.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { GroupVertex } from '../interfaces/vertices/groups';\n\nexport default (\n groups: Types.Mixed.Group[],\n options: BaseOptions\n): OutTypes.group[] => {\n return groups\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<GroupVertex> = {\n rootInterval: x.rootInterval ? getVertexId(x.rootInterval, options) : undefined,\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n lockedTimes: x.lockedTimes ?.map(x => getVertexId(x, options)),\n lunch: x.lunch ?.map(x => getVertexId(x, options)),\n members: x.members ?.map(x => getVertexId(x, options)),\n parentGroups: x.parentGroups?.map(x => getVertexId(x, options)),\n subGroups: x.subGroups ?.map(x => getVertexId(x, options)),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<GroupVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,sBACE,QACA,YACqB;AACrB,QAAO,OACJ,KAAI,MAAK;EACR,MAAMA,QAAsD;GAC1D,cAAc,EAAE,eAAe,YAAY,EAAE,cAAc,QAAQ,GAAG;GACtE,YAAc,EAAE,YAAc,KAAI,QAAK,YAAYC,KAAG,QAAQ,CAAC;GAC/D,aAAc,EAAE,aAAc,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GAC/D,OAAc,EAAE,OAAc,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GAC/D,SAAc,EAAE,SAAc,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GAC/D,cAAc,EAAE,cAAc,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GAC/D,WAAc,EAAE,WAAc,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GAChE;AAGD,SAAO;GAAE,GAFQ,+BAA+B,GAAG,MAAM;GAEnC,GAAG;GAAO;GAChC"}
|
|
@@ -9,9 +9,8 @@ var locations_default = (locations, options) => {
|
|
|
9
9
|
lockedTimes: x.lockedTimes?.map((x$1) => getVertexId(x$1, options)),
|
|
10
10
|
lunch: x.lunch?.map((x$1) => getVertexId(x$1, options))
|
|
11
11
|
};
|
|
12
|
-
const nonEdges = omitEdgesAndInternalProperties(x, edges);
|
|
13
12
|
return {
|
|
14
|
-
...
|
|
13
|
+
...omitEdgesAndInternalProperties(x, edges),
|
|
15
14
|
...edges
|
|
16
15
|
};
|
|
17
16
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locations.js","names":["edges: SerializedEdgesOnlyVertexExport<LocationVertex>","x"],"sources":["../../../src/core/to/locations.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { LocationVertex } from '../interfaces/vertices/locations';\n\nexport default (\n locations: Types.Mixed.Location[],\n options: BaseOptions\n): OutTypes.location[] => {\n return locations\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<LocationVertex> = {\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n lockedTimes: x.lockedTimes?.map(x => getVertexId(x, options)),\n lunch: x.lunch ?.map(x => getVertexId(x, options)),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<LocationVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,yBACE,WACA,YACwB;AACxB,QAAO,UACJ,KAAI,MAAK;EACR,MAAMA,QAAyD;GAC7D,YAAa,EAAE,YAAa,KAAI,QAAK,YAAYC,KAAG;
|
|
1
|
+
{"version":3,"file":"locations.js","names":["edges: SerializedEdgesOnlyVertexExport<LocationVertex>","x"],"sources":["../../../src/core/to/locations.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { LocationVertex } from '../interfaces/vertices/locations';\n\nexport default (\n locations: Types.Mixed.Location[],\n options: BaseOptions\n): OutTypes.location[] => {\n return locations\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<LocationVertex> = {\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n lockedTimes: x.lockedTimes?.map(x => getVertexId(x, options)),\n lunch: x.lunch ?.map(x => getVertexId(x, options)),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<LocationVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,yBACE,WACA,YACwB;AACxB,QAAO,UACJ,KAAI,MAAK;EACR,MAAMA,QAAyD;GAC7D,YAAa,EAAE,YAAa,KAAI,QAAK,YAAYC,KAAG,QAAQ,CAAC;GAC7D,aAAa,EAAE,aAAa,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GAC7D,OAAa,EAAE,OAAa,KAAI,QAAK,YAAYA,KAAG,QAAQ,CAAC;GAC9D;AAGD,SAAO;GAAE,GAFQ,+BAA+B,GAAG,MAAM;GAEnC,GAAG;GAAO;GAChC"}
|
|
@@ -8,9 +8,8 @@ var locked_times_default = (lockedTimes, options) => {
|
|
|
8
8
|
toModel: x$1.toModel,
|
|
9
9
|
to: getVertexId(x$1.to, options)
|
|
10
10
|
})) };
|
|
11
|
-
const nonEdges = omitEdgesAndInternalProperties(x, edges);
|
|
12
11
|
return {
|
|
13
|
-
...
|
|
12
|
+
...omitEdgesAndInternalProperties(x, edges),
|
|
14
13
|
...edges
|
|
15
14
|
};
|
|
16
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locked-times.js","names":["edges: SerializedEdgesOnlyVertexExport<LockedTimeVertex>","x"],"sources":["../../../src/core/to/locked-times.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { LockedTimeVertex } from '../interfaces/vertices/locked-times';\n\nexport default (\n lockedTimes: Types.Mixed.LockedTime[],\n options: BaseOptions\n): OutTypes.lockedTime[] => {\n return lockedTimes\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<LockedTimeVertex> = {\n coalesced: x.coalesced?.map(x => ({ toModel: x.toModel, to: getVertexId(x.to, options) })),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<LockedTimeVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,4BACE,aACA,YAC0B;AAC1B,QAAO,YACJ,KAAI,MAAK;EACR,MAAMA,QAA2D,EAC/D,WAAW,EAAE,WAAW,KAAI,SAAM;GAAE,SAASC,IAAE;GAAS,IAAI,YAAYA,IAAE,IAAI
|
|
1
|
+
{"version":3,"file":"locked-times.js","names":["edges: SerializedEdgesOnlyVertexExport<LockedTimeVertex>","x"],"sources":["../../../src/core/to/locked-times.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { LockedTimeVertex } from '../interfaces/vertices/locked-times';\n\nexport default (\n lockedTimes: Types.Mixed.LockedTime[],\n options: BaseOptions\n): OutTypes.lockedTime[] => {\n return lockedTimes\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<LockedTimeVertex> = {\n coalesced: x.coalesced?.map(x => ({ toModel: x.toModel, to: getVertexId(x.to, options) })),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<LockedTimeVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,4BACE,aACA,YAC0B;AAC1B,QAAO,YACJ,KAAI,MAAK;EACR,MAAMA,QAA2D,EAC/D,WAAW,EAAE,WAAW,KAAI,SAAM;GAAE,SAASC,IAAE;GAAS,IAAI,YAAYA,IAAE,IAAI,QAAQ;GAAE,EAAE,EAC3F;AAGD,SAAO;GAAE,GAFQ,+BAA+B,GAAG,MAAM;GAEnC,GAAG;GAAO;GAChC"}
|
|
@@ -15,9 +15,8 @@ var overlap_groups_default = (overlapGroups, options) => {
|
|
|
15
15
|
to: getVertexId(x$1.to, options)
|
|
16
16
|
}))
|
|
17
17
|
};
|
|
18
|
-
const nonEdges = omitEdgesAndInternalProperties(x, edges);
|
|
19
18
|
return {
|
|
20
|
-
...
|
|
19
|
+
...omitEdgesAndInternalProperties(x, edges),
|
|
21
20
|
...edges
|
|
22
21
|
};
|
|
23
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlap-groups.js","names":["edges: SerializedEdgesOnlyVertexExport<OverlapGroupVertex>","x"],"sources":["../../../src/core/to/overlap-groups.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { OverlapGroupVertex } from '../interfaces/vertices/overlap-groups';\n\nexport default (\n overlapGroups: Types.Mixed.OverlapGroup[],\n options: BaseOptions\n): OutTypes.overlapGroup[] => {\n return overlapGroups\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<OverlapGroupVertex> = {\n coalesced: x.coalesced?.map(x => ({ toModel: x.toModel, to: getVertexId(x.to, options) })),\n species: x.species ?.map(x => ({ toModel: x.toModel, id: x.id, to: getVertexId(x.to, options) })),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<OverlapGroupVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,8BACE,eACA,YAC4B;AAC5B,QAAO,cACJ,KAAI,MAAK;EACR,MAAMA,QAA6D;GACjE,WAAW,EAAE,WAAW,KAAI,SAAM;IAAE,SAASC,IAAE;IAAmB,IAAI,YAAYA,IAAE,IAAI
|
|
1
|
+
{"version":3,"file":"overlap-groups.js","names":["edges: SerializedEdgesOnlyVertexExport<OverlapGroupVertex>","x"],"sources":["../../../src/core/to/overlap-groups.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { OverlapGroupVertex } from '../interfaces/vertices/overlap-groups';\n\nexport default (\n overlapGroups: Types.Mixed.OverlapGroup[],\n options: BaseOptions\n): OutTypes.overlapGroup[] => {\n return overlapGroups\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<OverlapGroupVertex> = {\n coalesced: x.coalesced?.map(x => ({ toModel: x.toModel, to: getVertexId(x.to, options) })),\n species: x.species ?.map(x => ({ toModel: x.toModel, id: x.id, to: getVertexId(x.to, options) })),\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<OverlapGroupVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,8BACE,eACA,YAC4B;AAC5B,QAAO,cACJ,KAAI,MAAK;EACR,MAAMA,QAA6D;GACjE,WAAW,EAAE,WAAW,KAAI,SAAM;IAAE,SAASC,IAAE;IAAmB,IAAI,YAAYA,IAAE,IAAI,QAAQ;IAAE,EAAE;GACpG,SAAW,EAAE,SAAW,KAAI,SAAM;IAAE,SAASA,IAAE;IAAS,IAAIA,IAAE;IAAI,IAAI,YAAYA,IAAE,IAAI,QAAQ;IAAE,EAAE;GACrG;AAGD,SAAO;GAAE,GAFQ,+BAA+B,GAAG,MAAM;GAEnC,GAAG;GAAO;GAChC"}
|
package/dist/core/to/periods.js
CHANGED
|
@@ -4,9 +4,8 @@ import { omitEdgesAndInternalProperties } from "./util.js";
|
|
|
4
4
|
var periods_default = (periods, options) => {
|
|
5
5
|
return periods.map((x) => {
|
|
6
6
|
const edges = {};
|
|
7
|
-
const nonEdges = omitEdgesAndInternalProperties(x, edges);
|
|
8
7
|
return {
|
|
9
|
-
...
|
|
8
|
+
...omitEdgesAndInternalProperties(x, edges),
|
|
10
9
|
...edges
|
|
11
10
|
};
|
|
12
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"periods.js","names":["edges: SerializedEdgesOnlyVertexExport<PeriodVertex>"],"sources":["../../../src/core/to/periods.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { PeriodVertex } from '../interfaces/vertices/periods';\n\nexport default (\n periods: Types.Mixed.Period[],\n options: BaseOptions\n): OutTypes.period[] => {\n return periods\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<PeriodVertex> = {\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<PeriodVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;AAMA,uBACE,SACA,YACsB;AACtB,QAAO,QACJ,KAAI,MAAK;EACR,MAAMA,QAAuD;
|
|
1
|
+
{"version":3,"file":"periods.js","names":["edges: SerializedEdgesOnlyVertexExport<PeriodVertex>"],"sources":["../../../src/core/to/periods.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { PeriodVertex } from '../interfaces/vertices/periods';\n\nexport default (\n periods: Types.Mixed.Period[],\n options: BaseOptions\n): OutTypes.period[] => {\n return periods\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<PeriodVertex> = {\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<PeriodVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;AAMA,uBACE,SACA,YACsB;AACtB,QAAO,QACJ,KAAI,MAAK;EACR,MAAMA,QAAuD,EAC5D;AAGD,SAAO;GAAE,GAFQ,+BAA+B,GAAG,MAAM;GAEnC,GAAG;GAAO;GAChC"}
|
package/dist/core/to/persons.js
CHANGED
|
@@ -5,9 +5,8 @@ import { omitEdgesAndInternalProperties } from "./util.js";
|
|
|
5
5
|
var persons_default = (persons, options) => {
|
|
6
6
|
return persons.map((x) => {
|
|
7
7
|
const edges = { group: x.group ? getVertexId(x.group, options) : void 0 };
|
|
8
|
-
const nonEdges = omitEdgesAndInternalProperties(x, edges);
|
|
9
8
|
return {
|
|
10
|
-
...
|
|
9
|
+
...omitEdgesAndInternalProperties(x, edges),
|
|
11
10
|
...edges
|
|
12
11
|
};
|
|
13
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persons.js","names":["edges: SerializedEdgesOnlyVertexExport<PersonVertex>"],"sources":["../../../src/core/to/persons.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { PersonVertex } from '../interfaces/vertices/persons';\n\nexport default (\n persons: Types.Mixed.Person[],\n options: BaseOptions\n): OutTypes.person[] => {\n return persons\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<PersonVertex> = {\n group: x.group ? getVertexId(x.group, options) : undefined,\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<PersonVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,uBACE,SACA,YACsB;AACtB,QAAO,QACJ,KAAI,MAAK;EACR,MAAMA,QAAuD,EAC3D,OAAO,EAAE,QAAQ,YAAY,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"persons.js","names":["edges: SerializedEdgesOnlyVertexExport<PersonVertex>"],"sources":["../../../src/core/to/persons.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { PersonVertex } from '../interfaces/vertices/persons';\n\nexport default (\n persons: Types.Mixed.Person[],\n options: BaseOptions\n): OutTypes.person[] => {\n return persons\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<PersonVertex> = {\n group: x.group ? getVertexId(x.group, options) : undefined,\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<PersonVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,uBACE,SACA,YACsB;AACtB,QAAO,QACJ,KAAI,MAAK;EACR,MAAMA,QAAuD,EAC3D,OAAO,EAAE,QAAQ,YAAY,EAAE,OAAO,QAAQ,GAAG,QAClD;AAGD,SAAO;GAAE,GAFQ,+BAA+B,GAAG,MAAM;GAEnC,GAAG;GAAO;GAChC"}
|
|
@@ -4,9 +4,8 @@ import { omitEdgesAndInternalProperties } from "./util.js";
|
|
|
4
4
|
var root_intervals_default = (rootIntervals, options) => {
|
|
5
5
|
return rootIntervals.map((x) => {
|
|
6
6
|
const edges = {};
|
|
7
|
-
const nonEdges = omitEdgesAndInternalProperties(x, edges);
|
|
8
7
|
return {
|
|
9
|
-
...
|
|
8
|
+
...omitEdgesAndInternalProperties(x, edges),
|
|
10
9
|
...edges
|
|
11
10
|
};
|
|
12
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-intervals.js","names":["edges: SerializedEdgesOnlyVertexExport<RootIntervalVertex>"],"sources":["../../../src/core/to/root-intervals.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { RootIntervalVertex } from '../interfaces/vertices/root-intervals';\n\nexport default (\n rootIntervals: Types.Mixed.RootInterval[],\n options: BaseOptions\n): OutTypes.rootInterval[] => {\n return rootIntervals\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<RootIntervalVertex> = {\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<RootIntervalVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;AAMA,8BACE,eACA,YAC4B;AAC5B,QAAO,cACJ,KAAI,MAAK;EACR,MAAMA,QAA6D;
|
|
1
|
+
{"version":3,"file":"root-intervals.js","names":["edges: SerializedEdgesOnlyVertexExport<RootIntervalVertex>"],"sources":["../../../src/core/to/root-intervals.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { omitEdgesAndInternalProperties, type SerializedEdgesOnlyVertexExport, type SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { RootIntervalVertex } from '../interfaces/vertices/root-intervals';\n\nexport default (\n rootIntervals: Types.Mixed.RootInterval[],\n options: BaseOptions\n): OutTypes.rootInterval[] => {\n return rootIntervals\n .map(x => {\n const edges: SerializedEdgesOnlyVertexExport<RootIntervalVertex> = {\n } satisfies SerializedEdgesShape<SerializedEdgesOnlyVertexExport<RootIntervalVertex>>;\n const nonEdges = omitEdgesAndInternalProperties(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;AAMA,8BACE,eACA,YAC4B;AAC5B,QAAO,cACJ,KAAI,MAAK;EACR,MAAMA,QAA6D,EAClE;AAGD,SAAO;GAAE,GAFQ,+BAA+B,GAAG,MAAM;GAEnC,GAAG;GAAO;GAChC"}
|