@royalschedule/maps 3.3.12 → 3.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -24,8 +24,10 @@ var dynamic_locked_times_default = (docs, settings, options, set, destructMap) =
|
|
|
24
24
|
if (duration == null) throw new Error("(RS::V2::To::DynamicLockedTimes) Length of a locked time is null");
|
|
25
25
|
if (duration < 5) throw new Error("(RS::V2::To::DynamicLockedTimes) Length of a locked time is less than 5 min");
|
|
26
26
|
if (!coalesced) throw new Error("(RS::V2::To::DynamicLockedTimes) Length of a locked time is less than 5 min");
|
|
27
|
-
let days = intervals?.map(({ start }) => (moment(start).day() + 6) % 7);
|
|
27
|
+
let days = intervals?.length ? intervals.map(({ start }) => (moment(start).day() + 6) % 7) : void 0;
|
|
28
28
|
if (days) days = [...new Set(days)];
|
|
29
|
+
const day = days?.length == 1 ? days[0] : void 0;
|
|
30
|
+
if (day != null && group.days?.length && !group.days.some((x) => x.day == day)) return acc$1;
|
|
29
31
|
let groups = coalesced.filter((x) => x.toModel != "locations")?.map(({ to, toModel }) => `${toModel}.${to[idKey]?.toString()}`);
|
|
30
32
|
if (destructMap?.size) groups = coalesced.filter((x) => x.toModel == "groups").map(({ to }) => to[idKey]?.toString()).filter(Boolean).reduce((acc$2, groupId) => {
|
|
31
33
|
if (destructMap.has(groupId)) {
|
|
@@ -42,7 +44,8 @@ var dynamic_locked_times_default = (docs, settings, options, set, destructMap) =
|
|
|
42
44
|
length: duration,
|
|
43
45
|
minBreakLength: false,
|
|
44
46
|
intervals: intervals_default(intervals, settings),
|
|
45
|
-
...days &&
|
|
47
|
+
...days && { days },
|
|
48
|
+
...day && { day },
|
|
46
49
|
...durationVariance != null && { maxLengthVariance: durationVariance }
|
|
47
50
|
});
|
|
48
51
|
}, []));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-locked-times.js","names":["idKey: 'id' | '_id' | 'ids'","lunch","id: string","acc","set","_intervals"],"sources":["../../../../src/RS/v2/to/dynamic-locked-times.ts"],"sourcesContent":["import moment from 'moment';\nimport { nanoid } from 'nanoid';\n\nimport { OutOptions } from '../types/out-options';\nimport { CourseEvent } from '../types/course-events';\n\nimport _intervals from './intervals';\n\nimport { Types as CoreTypes } from '../../../core/types';\nimport { Deserialized } from '../../../core/types';\nimport { pick } from 'lodash-es';\n\nexport default (docs: (Deserialized<CoreTypes.group> | Deserialized<CoreTypes.teacher>)[],\n settings: Deserialized<CoreTypes.divisionSettings>,\n options: OutOptions,\n set: Set<string>,\n destructMap?: Map<string | null, Set<string>>) => {\n //let docs: SourceLockedTime[] = (Array.isArray(lockedTimes) ? lockedTimes : [lockedTimes]);\n const idKey: 'id' | '_id' | 'ids' = (options.idKey ?? 'id');\n\n return docs.filter(x => !!x).reduce((acc: CourseEvent[], group): CourseEvent[] => {\n let lunch = group.lunch;\n if (lunch == null) {\n lunch = settings.defaultLunch?.map(lunch => ({ ...lunch, coalesced: [{ to: pick(group, idKey), toModel: '' }] }));\n }\n\n if (lunch == null)\n return acc;\n\n\n return acc.concat(\n lunch.reduce((acc: CourseEvent[], lockedTime) => {\n\n const { _id, intervals, duration, durationVariance, coalesced } = lockedTime;\n\n const id: string = (lockedTime[idKey as keyof CoreTypes.lockedTime] || _id)?.toString() ?? nanoid();\n\n if (set.has(id))\n return acc;\n\n set.add(id);\n\n if (duration == null)\n throw new Error('(RS::V2::To::DynamicLockedTimes) Length of a locked time is null');\n\n if (duration < 5)\n throw new Error('(RS::V2::To::DynamicLockedTimes) Length of a locked time is less than 5 min');\n\n if (!coalesced)\n throw new Error('(RS::V2::To::DynamicLockedTimes) Length of a locked time is less than 5 min');\n /*\n
|
|
1
|
+
{"version":3,"file":"dynamic-locked-times.js","names":["idKey: 'id' | '_id' | 'ids'","lunch","id: string","acc","set","_intervals"],"sources":["../../../../src/RS/v2/to/dynamic-locked-times.ts"],"sourcesContent":["import moment from 'moment';\nimport { nanoid } from 'nanoid';\n\nimport { OutOptions } from '../types/out-options';\nimport { CourseEvent } from '../types/course-events';\n\nimport _intervals from './intervals';\n\nimport { Types as CoreTypes } from '../../../core/types';\nimport { Deserialized } from '../../../core/types';\nimport { pick } from 'lodash-es';\n\nexport default (docs: (Deserialized<CoreTypes.group> | Deserialized<CoreTypes.teacher>)[],\n settings: Deserialized<CoreTypes.divisionSettings>,\n options: OutOptions,\n set: Set<string>,\n destructMap?: Map<string | null, Set<string>>) => {\n //let docs: SourceLockedTime[] = (Array.isArray(lockedTimes) ? lockedTimes : [lockedTimes]);\n const idKey: 'id' | '_id' | 'ids' = (options.idKey ?? 'id');\n\n return docs.filter(x => !!x).reduce((acc: CourseEvent[], group): CourseEvent[] => {\n let lunch = group.lunch;\n if (lunch == null) {\n lunch = settings.defaultLunch?.map(lunch => ({ ...lunch, coalesced: [{ to: pick(group, idKey), toModel: '' }] }));\n }\n\n if (lunch == null)\n return acc;\n\n\n return acc.concat(\n lunch.reduce((acc: CourseEvent[], lockedTime) => {\n\n const { _id, intervals, duration, durationVariance, coalesced } = lockedTime;\n\n const id: string = (lockedTime[idKey as keyof CoreTypes.lockedTime] || _id)?.toString() ?? nanoid();\n\n if (set.has(id))\n return acc;\n\n set.add(id);\n\n if (duration == null)\n throw new Error('(RS::V2::To::DynamicLockedTimes) Length of a locked time is null');\n\n if (duration < 5)\n throw new Error('(RS::V2::To::DynamicLockedTimes) Length of a locked time is less than 5 min');\n\n if (!coalesced)\n throw new Error('(RS::V2::To::DynamicLockedTimes) Length of a locked time is less than 5 min');\n\n /*\n find the day(s) the events should be placed on\n */\n let days = intervals?.length\n ? intervals.map(({ start }) => (moment(start).day() + 6) % 7)\n : undefined;\n if (days) days = [...new Set(days)];\n const day = days?.length == 1 ? days[0] : undefined;\n\n // ignore locked times that reside on days that are not part of the group's days\n if (day != null && group.days?.length && !group.days.some(x => x.day == day)) return acc;\n\n /*\n find all references to destructured groups and replace with composite\n */\n let groups = coalesced.filter(x => x.toModel != 'locations')?.map(({ to, toModel }) => `${ toModel }.${ to[idKey]?.toString() }`);\n if (destructMap?.size) {\n groups = coalesced.filter(x => x.toModel == 'groups')\n .map(({ to }) => to[idKey]?.toString()!)\n .filter(Boolean)\n .reduce((acc: string[], groupId) => {\n if (destructMap.has(groupId)) {\n const set = destructMap.get(groupId)!;\n const destructuredGroups = Array.from(set).map(x => `persons.${ x }`);\n acc = acc.concat(destructuredGroups);\n }\n return acc;\n }, groups);\n }\n\n return acc.concat({\n id: `${ group.lunch == null ? 'virtual' : 'lockedTimes' }.${ id }`,\n groups: [...new Set(groups.filter(Boolean))].map(x => [x]),\n dependencies: [...new Set(coalesced.filter(x => x.toModel == 'locations').map(({ to }) => to[idKey]?.toString()!)\n .filter(Boolean))].map(x => [x]),\n length: duration,\n minBreakLength: false,\n intervals: _intervals(intervals, settings),\n ...days && { days },\n ...day && { day },\n ...durationVariance != null && { maxLengthVariance: durationVariance },\n });\n }, []));\n\n }, [])\n .flat()\n .filter(Boolean);\n};"],"mappings":";;;;;;AAYA,oCAAgB,MACd,UACA,SACA,KACA,gBAAkD;CAElD,MAAMA,QAA+B,QAAQ,SAAS;AAEtD,QAAO,KAAK,QAAO,MAAK,CAAC,CAAC,GAAG,QAAQ,KAAoB,UAAyB;EAChF,IAAI,QAAQ,MAAM;AAClB,MAAI,SAAS,KACX,SAAQ,SAAS,cAAc,KAAI,aAAU;GAAE,GAAGC;GAAO,WAAW,CAAC;IAAE,IAAI,KAAK,OAAO;IAAQ,SAAS;;;AAG1G,MAAI,SAAS,KACX,QAAO;AAGT,SAAO,IAAI,OACT,MAAM,QAAQ,OAAoB,eAAe;GAE/C,MAAM,EAAE,KAAK,WAAW,UAAU,kBAAkB,cAAc;GAElE,MAAMC,MAAc,WAAW,UAAwC,MAAM,cAAc;AAE3F,OAAI,IAAI,IAAI,IACV,QAAOC;AAET,OAAI,IAAI;AAER,OAAI,YAAY,KACd,OAAM,IAAI,MAAM;AAElB,OAAI,WAAW,EACb,OAAM,IA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+45,7 @@ var dynamic_locked_times_default = (docs, settings, options, set, destructMap) =
|
|
|
45
45
|
let days = intervals?.length ? intervals.map(({ start }) => (moment(start).day() + 6) % 7) : void 0;
|
|
46
46
|
if (days) days = [...new Set(days)];
|
|
47
47
|
const day = days?.length == 1 ? days[0] : void 0;
|
|
48
|
+
if (day != null && group.days?.length && !group.days.some((x) => x.day == day)) return acc$1;
|
|
48
49
|
const groups = mapCoalescedReferences(coalesced, options, destructMap);
|
|
49
50
|
const distributionKey = lockedTime.type == "COMPLEMENTARY_TIME" ? "COMPLEMENTARY_TIME." + lockedTime.tags?.at(0)?.value : void 0;
|
|
50
51
|
const doc = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-locked-times.js","names":["idKey: 'id' | '_id' | 'ids'","lunch","id: string","acc","doc: CourseEvent","_intervals"],"sources":["../../../../src/RS/v3/to/dynamic-locked-times.ts"],"sourcesContent":["import moment from 'moment';\nimport { nanoid } from 'nanoid';\nimport { pick } from 'lodash-es';\n\nimport { OutOptions } from '../types/out-options';\nimport { CourseEvent } from '../types/course-events';\nimport { Individual } from '../types/individuals';\n\nimport _intervals from './intervals';\n\nimport { Types as CoreTypes } from '../../../core/types';\nimport { Deserialized } from '../../../core/types';\nimport { toDayAndStart } from './course-events';\n\nfunction mapCoalescedReferences (\n coalesced: Deserialized<CoreTypes.lockedTime>['coalesced'],\n options: OutOptions,\n destructMap?: Map<string | null, Individual>\n) {\n const idKey = options.idKey || 'id';\n\n if (!coalesced) return [];\n\n const teachers = coalesced.filter(x => x.toModel == 'teachers');\n const groups = coalesced.filter(x => x.toModel == 'groups');\n const participants = coalesced.filter(x => x.toModel == 'persons');\n\n const teacherIds = teachers .map(({ to }) => to[idKey]).filter((x): x is NonNullable<typeof x> => !!x)\n .map(x => ({ individuals: ['teachers.individuals.' + x.toString()] }));\n const groupIds = groups .map(({ to }) => to[idKey]).filter((x): x is NonNullable<typeof x> => !!x)\n .map(x => 'groups.' + x.toString());\n const participantIds = participants.map(({ to }) => to[idKey]).filter((x): x is NonNullable<typeof x> => !!x)\n .map(x => ({ individuals: ['persons.' + x.toString()] }));\n\n\n const out = [...new Set(teacherIds), ...new Set(groupIds), ...new Set(participantIds)].map(x => [x]);\n return out;\n}\n\nexport default (\n docs: (Deserialized<CoreTypes.group> | Deserialized<CoreTypes.teacher>)[],\n settings: Deserialized<CoreTypes.divisionSettings>,\n options: OutOptions,\n set: Set<string>,\n destructMap?: Map<string | null, Individual>\n) => {\n //let docs: SourceLockedTime[] = (Array.isArray(lockedTimes) ? lockedTimes : [lockedTimes]);\n const idKey: 'id' | '_id' | 'ids' = (options.idKey ?? 'id');\n\n return docs\n .filter(x => !!x)\n .reduce((acc: CourseEvent[], group): CourseEvent[] => {\n let lunch = group.lunch;\n if (lunch == null) {\n lunch = settings.defaultLunch?.map(lunch => ({ ...lunch, coalesced: [{ to: pick(group, idKey), toModel: '' }] }));\n }\n\n if ('complementaryTimes' in group) {\n lunch = lunch?.concat(group.complementaryTimes ?? []);\n }\n\n if (lunch == null)\n return acc;\n\n return acc.concat(\n lunch.reduce((acc: CourseEvent[], lockedTime) => {\n\n const { _id, intervals, duration, durationVariance, coalesced } = lockedTime;\n\n const id: string = (lockedTime[idKey as keyof CoreTypes.lockedTime] || _id)?.toString() ?? nanoid();\n\n if (set.has(id))\n return acc;\n\n set.add(id);\n\n if (duration == null)\n throw new Error('(RS::V3::To::DynamicLockedTimes) Length of a locked time is null');\n\n if (duration < 5)\n throw new Error('(RS::V3::To::DynamicLockedTimes) Length of a locked time is less than 5 min');\n\n if (!coalesced)\n throw new Error('(RS::V3::To::DynamicLockedTimes) Length of a locked time is less than 5 min');\n /*\n
|
|
1
|
+
{"version":3,"file":"dynamic-locked-times.js","names":["idKey: 'id' | '_id' | 'ids'","lunch","id: string","acc","doc: CourseEvent","_intervals"],"sources":["../../../../src/RS/v3/to/dynamic-locked-times.ts"],"sourcesContent":["import moment from 'moment';\nimport { nanoid } from 'nanoid';\nimport { pick } from 'lodash-es';\n\nimport { OutOptions } from '../types/out-options';\nimport { CourseEvent } from '../types/course-events';\nimport { Individual } from '../types/individuals';\n\nimport _intervals from './intervals';\n\nimport { Types as CoreTypes } from '../../../core/types';\nimport { Deserialized } from '../../../core/types';\nimport { toDayAndStart } from './course-events';\n\nfunction mapCoalescedReferences (\n coalesced: Deserialized<CoreTypes.lockedTime>['coalesced'],\n options: OutOptions,\n destructMap?: Map<string | null, Individual>\n) {\n const idKey = options.idKey || 'id';\n\n if (!coalesced) return [];\n\n const teachers = coalesced.filter(x => x.toModel == 'teachers');\n const groups = coalesced.filter(x => x.toModel == 'groups');\n const participants = coalesced.filter(x => x.toModel == 'persons');\n\n const teacherIds = teachers .map(({ to }) => to[idKey]).filter((x): x is NonNullable<typeof x> => !!x)\n .map(x => ({ individuals: ['teachers.individuals.' + x.toString()] }));\n const groupIds = groups .map(({ to }) => to[idKey]).filter((x): x is NonNullable<typeof x> => !!x)\n .map(x => 'groups.' + x.toString());\n const participantIds = participants.map(({ to }) => to[idKey]).filter((x): x is NonNullable<typeof x> => !!x)\n .map(x => ({ individuals: ['persons.' + x.toString()] }));\n\n\n const out = [...new Set(teacherIds), ...new Set(groupIds), ...new Set(participantIds)].map(x => [x]);\n return out;\n}\n\nexport default (\n docs: (Deserialized<CoreTypes.group> | Deserialized<CoreTypes.teacher>)[],\n settings: Deserialized<CoreTypes.divisionSettings>,\n options: OutOptions,\n set: Set<string>,\n destructMap?: Map<string | null, Individual>\n) => {\n //let docs: SourceLockedTime[] = (Array.isArray(lockedTimes) ? lockedTimes : [lockedTimes]);\n const idKey: 'id' | '_id' | 'ids' = (options.idKey ?? 'id');\n\n return docs\n .filter(x => !!x)\n .reduce((acc: CourseEvent[], group): CourseEvent[] => {\n let lunch = group.lunch;\n if (lunch == null) {\n lunch = settings.defaultLunch?.map(lunch => ({ ...lunch, coalesced: [{ to: pick(group, idKey), toModel: '' }] }));\n }\n\n if ('complementaryTimes' in group) {\n lunch = lunch?.concat(group.complementaryTimes ?? []);\n }\n\n if (lunch == null)\n return acc;\n\n return acc.concat(\n lunch.reduce((acc: CourseEvent[], lockedTime) => {\n\n const { _id, intervals, duration, durationVariance, coalesced } = lockedTime;\n\n const id: string = (lockedTime[idKey as keyof CoreTypes.lockedTime] || _id)?.toString() ?? nanoid();\n\n if (set.has(id))\n return acc;\n\n set.add(id);\n\n if (duration == null)\n throw new Error('(RS::V3::To::DynamicLockedTimes) Length of a locked time is null');\n\n if (duration < 5)\n throw new Error('(RS::V3::To::DynamicLockedTimes) Length of a locked time is less than 5 min');\n\n if (!coalesced)\n throw new Error('(RS::V3::To::DynamicLockedTimes) Length of a locked time is less than 5 min');\n\n /*\n find the day(s) the events should be placed on\n */\n let days = intervals?.length\n ? intervals.map(({ start }) => (moment(start).day() + 6) % 7)\n : undefined;\n if (days) days = [...new Set(days)];\n const day = days?.length == 1 ? days[0] : undefined;\n\n // ignore locked times that reside on days that are not part of the group's days\n if (day != null && group.days?.length && !group.days.some(x => x.day == day)) return acc;\n\n const groups = mapCoalescedReferences(coalesced, options, destructMap);\n\n const distributionKey = lockedTime.type == 'COMPLEMENTARY_TIME'\n ? 'COMPLEMENTARY_TIME.' + lockedTime.tags?.at(0)?.value\n : undefined;\n\n\n const doc: CourseEvent = {\n id: `${ group.lunch == null ? 'virtual' : 'lockedTimes' }.${ id }`,\n groups: [...new Set(groups.filter(Boolean))],\n dependencies: [...new Set(coalesced.filter(x => x.toModel == 'locations').map(({ to }) => to[idKey]?.toString()!)\n .filter(Boolean))].map(x => [x]),\n length: duration,\n minBreakLength: false,\n intervals: intervals?.length ? _intervals(intervals, settings) : undefined,\n ...distributionKey && { distributionKey },\n ...days && { days },\n ...day && { day },\n ...durationVariance != null && { maxLengthVariance: durationVariance },\n };\n\n\n\n ////\n //// filter events based on partialScheduleOptions\n ////\n if (options.partialScheduleOptions) {\n const { includedEvents, omittedEventsHandling } = options.partialScheduleOptions;\n if (includedEvents && !includedEvents.has(doc.id)) {\n\n if (omittedEventsHandling == 'ignore') return acc;\n\n if (omittedEventsHandling == 'freeze') {\n // must not be parked and have a start and duration to be frozen, otherwise it's ignored\n if (lockedTime.parked || !lockedTime.start || !lockedTime.duration) return acc;\n\n // fix day, start and end\n Object.assign(doc, toDayAndStart(lockedTime.start));\n doc.length = lockedTime.duration;\n doc.maxLengthVariance = 0;\n\n // override intervals and days to not cause conflicts\n const numDays = settings.numDays ?? 5;\n doc.days = Array.from({ length: numDays }, (_, i) => i);\n doc.intervals = Array.from({ length: numDays }, () => [{ beg: 0, end: 23.55 }]);\n\n // fix locations\n // > locations are always fixed for locked times\n }\n }\n }\n\n return acc.concat(doc);\n }, []));\n\n }, [])\n .flat()\n .filter(Boolean);\n};"],"mappings":";;;;;;;AAcA,SAAS,uBACP,WACA,SACA,aACA;CACA,MAAM,QAAQ,QAAQ,SAAS;AAE/B,KAAI,CAAC,UAAW,QAAO;CAEvB,MAAM,WAAe,UAAU,QAAO,MAAK,EAAE,WAAW;CACxD,MAAM,SAAe,UAAU,QAAO,MAAK,EAAE,WAAW;CACxD,MAAM,eAAe,UAAU,QAAO,MAAK,EAAE,WAAW;CAExD,MAAM,aAAiB,SAAa,KAAK,EAAE,SAAS,GAAG,QAAQ,QAAQ,MAAkC,CAAC,CAAC,GACxG,KAAI,OAAM,EAAE,aAAa,CAAC,0BAA0B,EAAE;CACzD,MAAM,WAAiB,OAAa,KAAK,EAAE,SAAS,GAAG,QAAQ,QAAQ,MAAkC,CAAC,CAAC,GACxG,KAAI,MAAK,YAAY,EAAE;CAC1B,MAAM,iBAAiB,aAAa,KAAK,EAAE,SAAS,GAAG,QAAQ,QAAQ,MAAkC,CAAC,CAAC,GACxG,KAAI,OAAM,EAAE,aAAa,CAAC,aAAc,EAAE;CAG7C,MAAM,MAAM;EAAC,GAAG,IAAI,IAAI;EAAa,GAAG,IAAI,IAAI;EAAW,GAAG,IAAI,IAAI;GAAiB,KAAI,MAAK,CAAC;AACjG,QAAO;;AAGT,oCACE,MACA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