@royalschedule/maps 3.0.18 → 3.0.20
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/RS/v3/from/index.d.ts +4 -22
- package/dist/RS/v3/from/index.js +4 -55
- package/dist/RS/v3/from/index.js.map +1 -1
- package/dist/RS/v3/from/schedules.d.ts +5 -11
- package/dist/RS/v3/from/schedules.js +48 -149
- package/dist/RS/v3/from/schedules.js.map +1 -1
- package/dist/RS/v3/index.d.ts +2 -0
- package/dist/RS/v3/index.js +2 -0
- package/dist/RS/v3/index.js.map +1 -1
- package/dist/RS/v3/to/course-events/groups.js +3 -3
- package/dist/RS/v3/to/course-events/groups.js.map +1 -1
- package/dist/RS/v3/to/index.d.ts +223 -2
- package/dist/RS/v3/to/schedules.d.ts +223 -2
- package/dist/RS/v3/to/schedules.js +8 -4
- package/dist/RS/v3/to/schedules.js.map +1 -1
- package/dist/RS/v3/types/out-options.d.ts +2 -0
- package/dist/RS/v3/types/schedules.d.ts +3 -2
- package/dist/identify/constants/index.d.ts +9 -0
- package/dist/identify/constants/index.js +10 -0
- package/dist/identify/constants/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
export default class {
|
|
2
|
-
static
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
static dependency: (dependencies: (string | import("../types/dependencies").Dependency)[], settings: import("../types/settings").Settings) => import("../../../core/types").Deserialized<import("../../../core/v2/types/locations").Location>[];
|
|
7
|
-
static group: (groups: import("../types/groups").Group[], settings: import("../types/settings").Settings) => import("../../../core/types").Deserialized<import("../../../core/v2/types/groups").Group>[];
|
|
8
|
-
static interval: (intervals: import("../types/intervals").Interval[][]) => import("../../../core/v2/types/intervals").Interval[];
|
|
9
|
-
static lockedTime: (lockedTimes: import("../types/locked-times").LockedTime[]) => import("../../../core/types").Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[];
|
|
10
|
-
static placement: (configuration: import("../types/configurations").Configuration, options?: {
|
|
11
|
-
idKey?: "id" | "_id" | "ids" | undefined;
|
|
12
|
-
}) => [Omit<import("../../../core/v2/types/events").Event, "preferredDuration">[], import("../../../core/v2/types/locked-times").LockedTime[]];
|
|
13
|
-
static schedules: (schedule: import("../types/schedules").Schedule) => {
|
|
14
|
-
overlapGroups: any;
|
|
15
|
-
settings: any;
|
|
16
|
-
area?: import("../types/areas").Area | undefined;
|
|
17
|
-
courses?: never[] | undefined;
|
|
18
|
-
groups?: import("../../../core/types").Deserialized<import("../../../core/v2/types/groups").Group>[] | undefined;
|
|
19
|
-
teachers?: import("../../../core/types").Deserialized<import("../../../core/v2/types/teachers").Teacher>[] | undefined;
|
|
20
|
-
locations?: import("../../../core/types").Deserialized<import("../../../core/v2/types/locations").Location>[] | undefined;
|
|
21
|
-
periods?: import("../../../core/types").Deserialized<import("../../../core/v2/types/periods").Period>[] | undefined;
|
|
2
|
+
static schedules: (arg: import("../types/schedules").Schedule) => import("../../../core/types").Serialized<Omit<import("../../../core/v2/types/divisions").Division, "settings">> & Pick<import("../../../core/v2/types/divisions").Division, "settings"> & {
|
|
3
|
+
meta: {
|
|
4
|
+
warnings?: string[] | undefined;
|
|
5
|
+
};
|
|
22
6
|
};
|
|
23
|
-
static setting: (settings: import("../types/settings").Settings, _default: import("../types/default").Default) => import("../../../core/types").Deserialized<Omit<import("../../../core/v2/types/division-settings").DivisionSettings, "belongsTo" | "period" | "defaultLunch">> & import("../../../core/types").Serialized<Pick<import("../../../core/v2/types/division-settings").DivisionSettings, "period">>;
|
|
24
|
-
static teacher: (teachers: import("../types/groups").Group[], settings: import("../types/settings").Settings) => import("../../../core/types").Deserialized<import("../../../core/v2/types/teachers").Teacher>[];
|
|
25
7
|
}
|
package/dist/RS/v3/from/index.js
CHANGED
|
@@ -4,63 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _availableDependencies = _interopRequireDefault(require("./available-dependencies"));
|
|
8
|
-
var _courseEvents = _interopRequireDefault(require("./course-events"));
|
|
9
|
-
var _collections = _interopRequireDefault(require("./collections"));
|
|
10
|
-
var _days = _interopRequireDefault(require("./days"));
|
|
11
|
-
var _dependencies = _interopRequireDefault(require("./dependencies"));
|
|
12
|
-
var _groups = _interopRequireDefault(require("./groups"));
|
|
13
|
-
var _intervals = _interopRequireDefault(require("./intervals"));
|
|
14
|
-
var _lockedTimes = _interopRequireDefault(require("./locked-times"));
|
|
15
|
-
var _placements = _interopRequireDefault(require("./placements"));
|
|
16
7
|
var _schedules2 = _interopRequireDefault(require("./schedules"));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
default: obj
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function _defineProperty(obj, key, value) {
|
|
25
|
-
key = _toPropertyKey(key);
|
|
26
|
-
if (key in obj) {
|
|
27
|
-
Object.defineProperty(obj, key, {
|
|
28
|
-
value: value,
|
|
29
|
-
enumerable: true,
|
|
30
|
-
configurable: true,
|
|
31
|
-
writable: true
|
|
32
|
-
});
|
|
33
|
-
} else {
|
|
34
|
-
obj[key] = value;
|
|
35
|
-
}
|
|
36
|
-
return obj;
|
|
37
|
-
}
|
|
38
|
-
function _toPropertyKey(arg) {
|
|
39
|
-
var key = _toPrimitive(arg, "string");
|
|
40
|
-
return typeof key === "symbol" ? key : String(key);
|
|
41
|
-
}
|
|
42
|
-
function _toPrimitive(input, hint) {
|
|
43
|
-
if (typeof input !== "object" || input === null) return input;
|
|
44
|
-
var prim = input[Symbol.toPrimitive];
|
|
45
|
-
if (prim !== undefined) {
|
|
46
|
-
var res = prim.call(input, hint || "default");
|
|
47
|
-
if (typeof res !== "object") return res;
|
|
48
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
49
|
-
}
|
|
50
|
-
return (hint === "string" ? String : Number)(input);
|
|
51
|
-
}
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
11
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
52
12
|
class default_1 {}
|
|
53
13
|
exports.default = default_1;
|
|
54
|
-
_defineProperty(default_1, "availableDependency", _availableDependencies.default);
|
|
55
|
-
_defineProperty(default_1, "courseEvent", _courseEvents.default);
|
|
56
|
-
_defineProperty(default_1, "collection", _collections.default);
|
|
57
|
-
_defineProperty(default_1, "day", _days.default);
|
|
58
|
-
_defineProperty(default_1, "dependency", _dependencies.default);
|
|
59
|
-
_defineProperty(default_1, "group", _groups.default);
|
|
60
|
-
_defineProperty(default_1, "interval", _intervals.default);
|
|
61
|
-
_defineProperty(default_1, "lockedTime", _lockedTimes.default);
|
|
62
|
-
_defineProperty(default_1, "placement", _placements.default);
|
|
63
14
|
_defineProperty(default_1, "schedules", _schedules2.default);
|
|
64
|
-
_defineProperty(default_1, "setting", _settings.default);
|
|
65
|
-
_defineProperty(default_1, "teacher", _teachers.default);
|
|
66
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_schedules2","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","default_1","_schedules"],"sources":["../../../../src/RS/v3/from/index.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAqC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AAEvB,MAAAU,SAAA;;gBAAAA,SAAA,eACOC,mBAAU"}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { Deserialized } from '../../../core/types';
|
|
2
1
|
import { Schedule } from '../types/schedules';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
courses?: never[] | undefined;
|
|
8
|
-
groups?: Deserialized<import("../../../core/v2/types/groups").Group>[] | undefined;
|
|
9
|
-
teachers?: Deserialized<import("../../../core/v2/types/teachers").Teacher>[] | undefined;
|
|
10
|
-
locations?: Deserialized<import("../../../core/v2/types/locations").Location>[] | undefined;
|
|
11
|
-
periods?: Deserialized<import("../../../core/v2/types/periods").Period>[] | undefined;
|
|
2
|
+
declare const _default: (arg: Schedule) => import("../../../core/types").Serialized<Omit<import("../../../core/v2/types/divisions").Division, "settings">> & Pick<import("../../../core/v2/types/divisions").Division, "settings"> & {
|
|
3
|
+
meta: {
|
|
4
|
+
warnings?: string[] | undefined;
|
|
5
|
+
};
|
|
12
6
|
};
|
|
13
|
-
export default
|
|
7
|
+
export default _default;
|
|
@@ -4,159 +4,58 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
25
|
-
})), t.push.apply(t, o);
|
|
7
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
8
|
+
var _excluded = ["id"];
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
14
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
|
+
var _default = arg => {
|
|
18
|
+
var _arg$output, _schedule$events;
|
|
19
|
+
var warnings = [];
|
|
20
|
+
var schedule = arg.coreData;
|
|
21
|
+
var placements = (_arg$output = arg.output) === null || _arg$output === void 0 ? void 0 : _arg$output[0].events;
|
|
22
|
+
if (!schedule) {
|
|
23
|
+
throw new Error('Missing schedule data.');
|
|
26
24
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
function _objectSpread(e) {
|
|
30
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
31
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
32
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
33
|
-
_defineProperty(e, r, t[r]);
|
|
34
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
35
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
36
|
-
});
|
|
25
|
+
if (!placements) {
|
|
26
|
+
throw new Error('Missing placement data.');
|
|
37
27
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (typeof input !== "object" || input === null) return input;
|
|
60
|
-
var prim = input[Symbol.toPrimitive];
|
|
61
|
-
if (prim !== undefined) {
|
|
62
|
-
var res = prim.call(input, hint || "default");
|
|
63
|
-
if (typeof res !== "object") return res;
|
|
64
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
65
|
-
}
|
|
66
|
-
return (hint === "string" ? String : Number)(input);
|
|
67
|
-
}
|
|
68
|
-
var _default2 = schedule => {
|
|
69
|
-
var _periods$split$map;
|
|
70
|
-
var {
|
|
71
|
-
input: {
|
|
72
|
-
settings,
|
|
73
|
-
default: _default,
|
|
74
|
-
dependencies,
|
|
75
|
-
groups,
|
|
76
|
-
events,
|
|
77
|
-
areas,
|
|
78
|
-
periods
|
|
79
|
-
} = {}
|
|
80
|
-
} = schedule;
|
|
81
|
-
var [configuration, ...meta] = schedule.output || [];
|
|
82
|
-
var _courses;
|
|
83
|
-
var _groups;
|
|
84
|
-
var _teachers;
|
|
85
|
-
var _locations;
|
|
86
|
-
if (!settings) throw new Error("(RS::V3::From::Schedules) Settings cannot be undefined");
|
|
87
|
-
if (dependencies) _locations = (0, _dependencies.default)(dependencies, settings);
|
|
88
|
-
if (groups) _teachers = (0, _teachers2.default)(groups, settings);
|
|
89
|
-
if (groups) _groups = (0, _groups2.default)(groups, settings);
|
|
90
|
-
if (events) _courses = (0, _collections.default)(events, (_teachers || []).map(x => x.ids).filter(Boolean), (_groups || []).map(x => x.ids).filter(Boolean), settings);
|
|
91
|
-
if (configuration) {
|
|
92
|
-
var _courses2;
|
|
93
|
-
var [_placements] = (0, _placements2.default)(configuration, {
|
|
94
|
-
idKey: 'ids'
|
|
95
|
-
});
|
|
96
|
-
var placementMap = new Map(_placements.map(x => [x.ids, x]));
|
|
97
|
-
(_courses2 = _courses) === null || _courses2 === void 0 || _courses2.forEach(course => {
|
|
98
|
-
var _course$events;
|
|
99
|
-
(_course$events = course.events) === null || _course$events === void 0 || _course$events.forEach(event => {
|
|
100
|
-
var _placedEvent = placementMap.get(event.ids);
|
|
101
|
-
if (_placedEvent) Object.assign(event, _placedEvent);
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
var overlapGroups = [];
|
|
106
|
-
events === null || events === void 0 || events.forEach(x => {
|
|
107
|
-
if (Array.isArray(x)) {
|
|
108
|
-
var overlapGroup = {
|
|
109
|
-
id: overlapGroups.length.toString(),
|
|
110
|
-
coalesced: [],
|
|
111
|
-
species: []
|
|
112
|
-
};
|
|
113
|
-
var collections = x.filter(c => 'events' in c);
|
|
114
|
-
var _events = collections.flatMap(c => c.events || []).filter(e => !_lodash.default.isNumber(e));
|
|
115
|
-
collections.forEach(c => {
|
|
116
|
-
var _overlapGroup$coalesc;
|
|
117
|
-
return (_overlapGroup$coalesc = overlapGroup.coalesced) === null || _overlapGroup$coalesc === void 0 ? void 0 : _overlapGroup$coalesc.push({
|
|
118
|
-
to: c.id,
|
|
119
|
-
toModel: 'courses'
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
_events.filter(e => !!e.forcedOverlapId).forEach(e => {
|
|
123
|
-
var _overlapGroup$species;
|
|
124
|
-
return (_overlapGroup$species = overlapGroup.species) === null || _overlapGroup$species === void 0 ? void 0 : _overlapGroup$species.push({
|
|
125
|
-
id: e.forcedOverlapId,
|
|
126
|
-
to: e.id,
|
|
127
|
-
toModel: 'courseevents'
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
overlapGroups.push(overlapGroup);
|
|
28
|
+
var eventsToUpdate = new Set((_schedule$events = schedule.events) === null || _schedule$events === void 0 ? void 0 : _schedule$events.map(x => x.id));
|
|
29
|
+
placements.forEach(_ref => {
|
|
30
|
+
var _schedule$collection;
|
|
31
|
+
var {
|
|
32
|
+
id: _id
|
|
33
|
+
} = _ref,
|
|
34
|
+
placement = _objectWithoutProperties(_ref, _excluded);
|
|
35
|
+
var collection = _id.split('.')[0] == 'events' ? 'events' : 'lockedTimes';
|
|
36
|
+
var id = _id.split('.')[1];
|
|
37
|
+
var event = (_schedule$collection = schedule[collection]) === null || _schedule$collection === void 0 ? void 0 : _schedule$collection.find(x => x.id === id);
|
|
38
|
+
if (!event) {
|
|
39
|
+
warnings.push("Could not find ".concat(id, " (").concat(_id, ") in ").concat(collection, " collection."));
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
event.parked = false;
|
|
43
|
+
event.start = _moment.default.utc('1970-01-05T00:00').add(placement.day, 'days').add(placement.start, 'minutes').toISOString();
|
|
44
|
+
event.end = _moment.default.utc('1970-01-05T00:00').add(placement.day, 'days').add(placement.end, 'minutes').toISOString();
|
|
45
|
+
if (collection == 'events') {
|
|
46
|
+
var _placement$dependenci, _placement$dependenci2;
|
|
47
|
+
event.inLocations = (_placement$dependenci = (_placement$dependenci2 = placement.dependencies) === null || _placement$dependenci2 === void 0 ? void 0 : _placement$dependenci2.filter(Boolean)) !== null && _placement$dependenci !== void 0 ? _placement$dependenci : [];
|
|
48
|
+
eventsToUpdate.delete(id);
|
|
131
49
|
}
|
|
132
50
|
});
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
ranges: []
|
|
141
|
-
};
|
|
142
|
-
});
|
|
143
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _periods.length && {
|
|
144
|
-
periods: _periods
|
|
145
|
-
}), _locations && {
|
|
146
|
-
locations: _locations
|
|
147
|
-
}), _teachers && {
|
|
148
|
-
teachers: _teachers
|
|
149
|
-
}), groups && {
|
|
150
|
-
groups: _groups
|
|
151
|
-
}), events && {
|
|
152
|
-
courses: _courses
|
|
153
|
-
}), areas && {
|
|
154
|
-
area: areas
|
|
155
|
-
}), settings && {
|
|
156
|
-
settings: (0, _settings.default)(settings, _default)
|
|
157
|
-
}), {}, {
|
|
158
|
-
overlapGroups: overlapGroups
|
|
51
|
+
if (eventsToUpdate.size) {
|
|
52
|
+
warnings.push("The following events were not updated: ".concat([...eventsToUpdate].join(', ')));
|
|
53
|
+
}
|
|
54
|
+
return Object.assign(schedule, {
|
|
55
|
+
meta: _objectSpread({}, warnings.length && {
|
|
56
|
+
warnings: warnings
|
|
57
|
+
})
|
|
159
58
|
});
|
|
160
59
|
};
|
|
161
|
-
exports.default =
|
|
60
|
+
exports.default = _default;
|
|
162
61
|
//# sourceMappingURL=schedules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedules.js","names":["
|
|
1
|
+
{"version":3,"file":"schedules.js","names":["_moment","_interopRequireDefault","require","_excluded","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","i","sourceSymbolKeys","indexOf","prototype","propertyIsEnumerable","sourceKeys","_default","_arg$output","_schedule$events","warnings","schedule","coreData","placements","output","events","Error","eventsToUpdate","Set","map","x","id","_ref","_schedule$collection","_id","placement","collection","split","event","find","concat","parked","start","moment","utc","add","day","toISOString","end","_placement$dependenci","_placement$dependenci2","inLocations","dependencies","Boolean","delete","size","join","assign","meta","exports"],"sources":["../../../../src/RS/v3/from/schedules.ts"],"sourcesContent":[null],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyD,IAAAC,SAAA;AAAA,SAAAF,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,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V,SAAS,CAACW,GAAG,EAAE,MAAM,CAAC,CAACD,GAAG,CAACV,SAAS,CAACa,GAAG,EAAI,SAAS,CAAC,CAACD,WAAW,EAAE;IAEtH,IAAIX,UAAU,IAAI,QAAQ,EAAE;MAAA,IAAAa,qBAAA,EAAAC,sBAAA;MACzBZ,KAAyB,CAACa,WAAW,IAAAF,qBAAA,IAAAC,sBAAA,GAAGf,SAAS,CAACiB,YAAY,cAAAF,sBAAA,uBAAtBA,sBAAA,CAAwB3E,MAAM,CAAC8E,OAAO,CAAC,cAAAJ,qBAAA,cAAAA,qBAAA,GAAI,EAAE;MAGtFtB,cAAc,CAAC2B,MAAM,CAACvB,EAAE,CAAC;;EAE7B,CAAC,CAAC;EAGF,IAAIJ,cAAc,CAAC4B,IAAI,EAAE;IACvBnC,QAAQ,CAAC1C,IAAI,2CAAA8D,MAAA,CAA2C,CAAC,GAAGb,cAAc,CAAC,CAAC6B,IAAI,CAAC,IAAI,CAAC,CAAE,CAAC;;EAI3F,OAAOrF,MAAM,CAACsF,MAAM,CAACpC,QAAQ,EAAE;IAC7BqC,IAAI,EAAA9E,aAAA,KACCwC,QAAQ,CAACtC,MAAM,IAAI;MAAEsC,QAAQ,EAAEA;IAAQ,CAAE;GAE/C,CAAC;AACJ,CAAC;AAAAuC,OAAA,CAAA7F,OAAA,GAAAmD,QAAA"}
|
package/dist/RS/v3/index.d.ts
CHANGED
package/dist/RS/v3/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Map = void 0;
|
|
7
|
+
var _from2 = _interopRequireDefault(require("./from"));
|
|
7
8
|
var _to2 = _interopRequireDefault(require("./to"));
|
|
8
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
10
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -12,4 +13,5 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
12
13
|
class Map {}
|
|
13
14
|
exports.Map = Map;
|
|
14
15
|
_defineProperty(Map, "to", _to2.default);
|
|
16
|
+
_defineProperty(Map, "from", _from2.default);
|
|
15
17
|
//# sourceMappingURL=index.js.map
|
package/dist/RS/v3/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_from2","_interopRequireDefault","require","_to2","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","Map","_to","_from"],"sources":["../../../src/RS/v3/index.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAuD,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AAGjD,MAAOU,GAAG;;gBAAHA,GAAG,QACAC,YAAG;AAAAvB,eAAA,CADNsB,GAAG,UAEAE,cAAK"}
|
|
@@ -29,9 +29,9 @@ function deconstructGroups(groups, participantIds, destructMap, options) {
|
|
|
29
29
|
function mapGroupReferences(source, options, destructMap) {
|
|
30
30
|
var _ref, _source$teachers, _source$course, _ref2, _source$groups, _source$course2, _ref3, _source$participants, _source$course3;
|
|
31
31
|
var idKey = options.idKey || 'id';
|
|
32
|
-
var teachers = (_ref = (_source$teachers = source.teachers) !== null && _source$teachers !== void 0 ? _source$teachers : (_source$course = source.course) === null || _source$course === void 0 ? void 0 : _source$course.teachers) !== null && _ref !== void 0 ? _ref : [];
|
|
33
|
-
var groups = (_ref2 = (_source$groups = source.groups) !== null && _source$groups !== void 0 ? _source$groups : (_source$course2 = source.course) === null || _source$course2 === void 0 ? void 0 : _source$course2.groups) !== null && _ref2 !== void 0 ? _ref2 : [];
|
|
34
|
-
var participants = (_ref3 = (_source$participants = source.participants) !== null && _source$participants !== void 0 ? _source$participants : (_source$course3 = source.course) === null || _source$course3 === void 0 ? void 0 : _source$course3.participants) !== null && _ref3 !== void 0 ? _ref3 : [];
|
|
32
|
+
var teachers = ((_ref = (_source$teachers = source.teachers) !== null && _source$teachers !== void 0 ? _source$teachers : (_source$course = source.course) === null || _source$course === void 0 ? void 0 : _source$course.teachers) !== null && _ref !== void 0 ? _ref : []).filter(x => x.to != null);
|
|
33
|
+
var groups = ((_ref2 = (_source$groups = source.groups) !== null && _source$groups !== void 0 ? _source$groups : (_source$course2 = source.course) === null || _source$course2 === void 0 ? void 0 : _source$course2.groups) !== null && _ref2 !== void 0 ? _ref2 : []).filter(x => x.to != null);
|
|
34
|
+
var participants = ((_ref3 = (_source$participants = source.participants) !== null && _source$participants !== void 0 ? _source$participants : (_source$course3 = source.course) === null || _source$course3 === void 0 ? void 0 : _source$course3.participants) !== null && _ref3 !== void 0 ? _ref3 : []).filter(x => x.to != null);
|
|
35
35
|
var teacherIds = teachers.map(_ref4 => {
|
|
36
36
|
var {
|
|
37
37
|
to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups.js","names":["deconstructGroups","groups","participantIds","destructMap","options","idKey","size","map","group","_group$exclude","_group$to$idKey","exclude","length","arr","to","toString","concat","y","_y$idKey","key","sort","join","destructed","get","push","individuals","id","filter","x","mapGroupReferences","source","_ref","_source$teachers","_source$course","_ref2","_source$groups","_source$course2","_ref3","_source$participants","_source$course3","teachers","course","participants","teacherIds","_ref4","_ref5","groupIds","_ref6","_to$idKey","species","out","Set"],"sources":["../../../../../src/RS/v3/to/course-events/groups.ts"],"sourcesContent":[null],"mappings":";;;;;;;AAUM,SAAUA,iBAAiBA,CAC/BC,MAAoE,EACpEC,cAAoD,EACpDC,WAA8C,EAC9CC,OAA0B;EAE1B,IAAMC,KAAK,GAAGD,OAAO,CAACC,KAAK,IAAI,IAAI;EAEnC,IAAIF,WAAW,CAACG,IAAI,EAAE;IACpBL,MAAM,GAAGA,MAAM,CAACM,GAAG,CAACC,KAAK,IAAG;MAAA,IAAAC,cAAA,EAAAC,eAAA;MAE1B,IAAI,GAAAD,cAAA,GAAED,KAAK,CAACG,OAAO,cAAAF,cAAA,eAAbA,cAAA,CAAeG,MAAM,GAAE,OAAOJ,KAAK;MAEzC,IAAMK,GAAG,GAAG,EAAAH,eAAA,GAACF,KAAK,CAACM,EAAE,CAACT,KAAK,CAAC,cAAAK,eAAA,uBAAfA,eAAA,CAAiBK,QAAQ,EAAE,CAAC,CAACC,MAAM,CAACR,KAAK,CAACG,OAAO,CAACJ,GAAG,CAACU,CAAC;QAAA,IAAAC,QAAA;QAAA,QAAAA,QAAA,GAAID,CAAC,CAACZ,KAAK,CAAC,cAAAa,QAAA,uBAARA,QAAA,CAAUH,QAAQ,EAAG;MAAA,EAAC,CAAC;MAC/F,IAAMI,GAAG,GAAGN,GAAG,CAACO,IAAI,EAAE,CAACC,IAAI,CAAC,GAAG,CAAC;MAChC,IAAMC,UAAU,GAAGnB,WAAW,CAACoB,GAAG,CAACJ,GAAG,CAAC;MACvC,IAAI,CAAEG,UAAU,EAAE,OAAOd,KAAK;MAG9BN,cAAc,CAACsB,IAAI,CAAC;QAAEC,WAAW,EAAEH,UAAU,CAACI;MAAE,CAAE,CAAC;MACnD,OAAO,IAAI;IACb,CAAC,CAAC,CACDC,MAAM,CAAEC,CAAC,IAAiCA,CAAC,IAAI,IAAI,CAAC;;EAGvD,OAAO3B,MAAM;AACf;AAEM,SAAU4B,kBAAkBA,CAChCC,MAA6E,EAC7E1B,OAAyB,EACzBD,WAA6C;EAAA,IAAA4B,IAAA,EAAAC,gBAAA,EAAAC,cAAA,EAAAC,KAAA,EAAAC,cAAA,EAAAC,eAAA,EAAAC,KAAA,EAAAC,oBAAA,EAAAC,eAAA;EAE7C,IAAMlC,KAAK,GAAGD,OAAO,CAACC,KAAK,IAAI,IAAI;EAEnC,IAAMmC,QAAQ,
|
|
1
|
+
{"version":3,"file":"groups.js","names":["deconstructGroups","groups","participantIds","destructMap","options","idKey","size","map","group","_group$exclude","_group$to$idKey","exclude","length","arr","to","toString","concat","y","_y$idKey","key","sort","join","destructed","get","push","individuals","id","filter","x","mapGroupReferences","source","_ref","_source$teachers","_source$course","_ref2","_source$groups","_source$course2","_ref3","_source$participants","_source$course3","teachers","course","participants","teacherIds","_ref4","_ref5","groupIds","_ref6","_to$idKey","species","out","Set"],"sources":["../../../../../src/RS/v3/to/course-events/groups.ts"],"sourcesContent":[null],"mappings":";;;;;;;AAUM,SAAU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1,28 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
26
|
export default class {
|
|
2
27
|
static availableDependency: (availableLocations: import("../../../core/types").Deserialized<import("../../../core/v2/types/available-locations").AvailableLocationBare>[], options: import("../types/out-options").OutOptions) => import("../types/available-dependencies").AvailableDependency[][];
|
|
3
28
|
static configuration: (events: import("../../../core/types").Deserialized<import("../../../core/v2/types/events").Event>[], options: import("../types/out-options").OutOptions) => import("../types/configurations").Configuration[];
|
|
@@ -11,12 +36,208 @@ export default class {
|
|
|
11
36
|
static lockedTime: (lockedTimes: import("../../../core/v2/types/locked-times").LockedTime | import("../../../core/v2/types/locked-times").LockedTime[], options: import("../types/out-options").OutOptions) => import("../types/locked-times").LockedTime[];
|
|
12
37
|
static persons: (persons: import("../../../core/types").Deserialized<import("../../../core/v2/types/persons").Person> | import("../../../core/types").Deserialized<import("../../../core/v2/types/persons").Person>[], settings: import("../../../core/v2/types/division-settings").DivisionSettings, options: import("../types/out-options").OutOptions) => import("../types/groups").Group[];
|
|
13
38
|
static schedules: (schedule: import("../../../core/types").Deserialized<import("../../../core/v2/types/schedules").Schedule>, options?: import("../types/out-options").OutOptions) => {
|
|
14
|
-
|
|
39
|
+
input: import("../types/constraints").Constraint;
|
|
40
|
+
output?: import("../types/configurations").Configuration[] | undefined;
|
|
41
|
+
coreData?: {
|
|
42
|
+
settings: import("../../../core/v2/types/division-settings").DivisionSettings;
|
|
43
|
+
rootIntervals: import("../../../core/v2/types/root-intervals").RootInterval[];
|
|
44
|
+
overlapGroups: import("../../../core/types").Serialized<Omit<import("../../../core/v2/types/overlap-groups").OverlapGroup, "belongsTo" | "lastModifiedBy">>[];
|
|
45
|
+
lockedTimes: import("../../../core/v2/types/locked-times").LockedTime[];
|
|
46
|
+
events: {
|
|
47
|
+
period?: string | undefined;
|
|
48
|
+
exceptions?: string[] | undefined;
|
|
49
|
+
inLocations?: string[] | undefined;
|
|
50
|
+
locations?: {
|
|
51
|
+
locations: string[];
|
|
52
|
+
rank?: number | undefined;
|
|
53
|
+
groupIndex?: number | undefined;
|
|
54
|
+
}[] | undefined;
|
|
55
|
+
participants?: {
|
|
56
|
+
groupIndex?: number | undefined;
|
|
57
|
+
to: string;
|
|
58
|
+
}[] | undefined;
|
|
59
|
+
groups?: {
|
|
60
|
+
groupIndex?: number | undefined;
|
|
61
|
+
to: string;
|
|
62
|
+
exclude: string[] | undefined;
|
|
63
|
+
}[] | undefined;
|
|
64
|
+
teachers?: {
|
|
65
|
+
groupIndex?: number | undefined;
|
|
66
|
+
to: string;
|
|
67
|
+
}[] | undefined;
|
|
68
|
+
course: string | undefined;
|
|
69
|
+
_id?: import("mongoose").Types.ObjectId | undefined;
|
|
70
|
+
id?: string | undefined;
|
|
71
|
+
belongsTo?: import("../../../core/types").Deserialized<import("../../../core/v2/types/divisions").Division> | undefined;
|
|
72
|
+
density?: number | undefined;
|
|
73
|
+
weight?: number | undefined;
|
|
74
|
+
parked?: boolean | undefined;
|
|
75
|
+
color?: string | undefined;
|
|
76
|
+
fixedStart?: boolean | undefined;
|
|
77
|
+
start?: string | Date | import("moment").Moment | undefined;
|
|
78
|
+
end?: string | Date | import("moment").Moment | undefined;
|
|
79
|
+
ids?: string | undefined;
|
|
80
|
+
minBreakLength?: import("../../../core/v2/types/break-lengths").BreakLength | undefined;
|
|
81
|
+
weeks?: number[] | undefined;
|
|
82
|
+
type?: string | undefined;
|
|
83
|
+
displayName?: string | undefined;
|
|
84
|
+
visible?: boolean | undefined;
|
|
85
|
+
duration?: number | undefined;
|
|
86
|
+
preferredDuration?: number | undefined;
|
|
87
|
+
durationVariance?: number | undefined;
|
|
88
|
+
lockedTimes?: import("../../../core/types").Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[] | undefined;
|
|
89
|
+
intervals?: import("../../../core/types").Deserialized<import("../../../core/v2/types/intervals").Interval>[] | undefined;
|
|
90
|
+
centerOfAttraction?: string | null | undefined;
|
|
91
|
+
days?: import("../../../core/types").Deserialized<import("../../../core/v2/types/days").Day>[] | undefined;
|
|
92
|
+
overlapGroup?: import("../../../core/types").Deserialized<import("../../../core/v2/types/overlap-groups").OverlapGroup> | undefined;
|
|
93
|
+
overlapSpecies?: import("../../../core/types").Deserialized<import("../../../core/v2/types/overlap-groups").OverlapGroup> | undefined;
|
|
94
|
+
createdAt?: string | undefined;
|
|
95
|
+
updatedAt?: string | undefined;
|
|
96
|
+
lastModifiedBy?: unknown;
|
|
97
|
+
}[];
|
|
98
|
+
courses: {
|
|
99
|
+
period?: string | undefined;
|
|
100
|
+
locations?: {
|
|
101
|
+
locations: string[];
|
|
102
|
+
rank?: number | undefined;
|
|
103
|
+
groupIndex?: number | undefined;
|
|
104
|
+
}[] | undefined;
|
|
105
|
+
participants?: {
|
|
106
|
+
groupIndex?: number | undefined;
|
|
107
|
+
to: string;
|
|
108
|
+
}[] | undefined;
|
|
109
|
+
groups?: {
|
|
110
|
+
groupIndex?: number | undefined;
|
|
111
|
+
to: string;
|
|
112
|
+
exclude: string[] | undefined;
|
|
113
|
+
}[] | undefined;
|
|
114
|
+
teachers?: {
|
|
115
|
+
groupIndex?: number | undefined;
|
|
116
|
+
to: string;
|
|
117
|
+
}[] | undefined;
|
|
118
|
+
type?: string | undefined;
|
|
119
|
+
id?: string | undefined;
|
|
120
|
+
color?: string | undefined;
|
|
121
|
+
weeks?: number[] | undefined;
|
|
122
|
+
days?: import("../../../core/types").Deserialized<import("../../../core/v2/types/days").Day>[] | undefined;
|
|
123
|
+
comment?: string | undefined;
|
|
124
|
+
updatedAt?: string | undefined;
|
|
125
|
+
displayName?: string | undefined;
|
|
126
|
+
exceptions?: import("../../../core/types").Deserialized<import("../../../core/v2/types/exceptions").Exception>[] | undefined;
|
|
127
|
+
ids?: string | undefined;
|
|
128
|
+
minBreakLength?: import("../../../core/v2/types/break-lengths").BreakLength | undefined;
|
|
129
|
+
weight?: number | undefined;
|
|
130
|
+
intervals?: import("../../../core/types").Deserialized<import("../../../core/v2/types/intervals").Interval>[] | undefined;
|
|
131
|
+
density?: number | undefined;
|
|
132
|
+
subject?: string | undefined;
|
|
133
|
+
eventDurationVariance?: number | undefined;
|
|
134
|
+
totalTime?: string | undefined;
|
|
135
|
+
centerOfAttraction?: string | null | undefined;
|
|
136
|
+
minutesPerWeek?: number | undefined;
|
|
137
|
+
expectedTotalHours?: number | undefined;
|
|
138
|
+
}[];
|
|
139
|
+
persons: {
|
|
140
|
+
exceptions?: string[] | undefined;
|
|
141
|
+
group: string | undefined;
|
|
142
|
+
_id?: import("mongoose").Types.ObjectId | undefined;
|
|
143
|
+
id?: string | undefined;
|
|
144
|
+
belongsTo?: import("../../../core/types").Deserialized<import("../../../core/v2/types/divisions").Division> | undefined;
|
|
145
|
+
ids?: string | undefined;
|
|
146
|
+
displayName?: string | undefined;
|
|
147
|
+
lastName?: string | undefined;
|
|
148
|
+
firstName?: string | undefined;
|
|
149
|
+
birthDate?: Date | undefined;
|
|
150
|
+
sex?: "Man" | "Woman" | undefined;
|
|
151
|
+
type?: "Student" | "Teacher" | "Other" | undefined;
|
|
152
|
+
SSN?: {
|
|
153
|
+
value: string;
|
|
154
|
+
nationality?: string | undefined;
|
|
155
|
+
} | undefined;
|
|
156
|
+
emails?: import("../../../core/types").Deserialized<{
|
|
157
|
+
value: string;
|
|
158
|
+
type: "private" | "organization";
|
|
159
|
+
}>[] | undefined;
|
|
160
|
+
phoneNumbers?: import("../../../core/types").Deserialized<{
|
|
161
|
+
value: string;
|
|
162
|
+
type: "private" | "organization";
|
|
163
|
+
}>[] | undefined;
|
|
164
|
+
lockedTimes?: import("../../../core/types").Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[] | undefined;
|
|
165
|
+
lunch?: import("../../../core/types").Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[] | undefined;
|
|
166
|
+
createdAt?: string | undefined;
|
|
167
|
+
updatedAt?: string | undefined;
|
|
168
|
+
}[];
|
|
169
|
+
groups: {
|
|
170
|
+
exceptions?: string[] | undefined;
|
|
171
|
+
parentGroups?: string[] | undefined;
|
|
172
|
+
rootInterval?: string | import("../../../core/types").Deserialized<import("../../../core/v2/types/root-intervals").RootInterval> | undefined;
|
|
173
|
+
members?: string[] | undefined;
|
|
174
|
+
id?: string | undefined;
|
|
175
|
+
days?: import("../../../core/types").Deserialized<import("../../../core/v2/types/days").Day>[] | undefined;
|
|
176
|
+
updatedAt?: string | undefined;
|
|
177
|
+
displayName?: string | undefined;
|
|
178
|
+
ids?: string | undefined;
|
|
179
|
+
minBreakLength?: import("../../../core/v2/types/break-lengths").BreakLength | undefined;
|
|
180
|
+
maxNumWorkingHours?: number | boolean | undefined;
|
|
181
|
+
maxNumDailyWorkingHours?: number | boolean | number[] | undefined;
|
|
182
|
+
forbidOverlappingEvents?: boolean | undefined;
|
|
183
|
+
disableDayLengthPunishment?: boolean | undefined;
|
|
184
|
+
weight?: number | undefined;
|
|
185
|
+
rank?: number | undefined;
|
|
186
|
+
species?: string | undefined;
|
|
187
|
+
intervals?: import("../../../core/types").Deserialized<import("../../../core/v2/types/intervals").Interval>[] | undefined;
|
|
188
|
+
}[];
|
|
189
|
+
teachers: {
|
|
190
|
+
exceptions?: string[] | import("../../../core/types").Deserialized<import("../../../core/v2/types/exceptions").Exception>[] | undefined;
|
|
191
|
+
person?: string | undefined;
|
|
192
|
+
id?: string | undefined;
|
|
193
|
+
days?: import("../../../core/types").Deserialized<import("../../../core/v2/types/days").Day>[] | undefined;
|
|
194
|
+
updatedAt?: string | undefined;
|
|
195
|
+
displayName?: string | undefined;
|
|
196
|
+
ids?: string | undefined;
|
|
197
|
+
minBreakLength?: import("../../../core/v2/types/break-lengths").BreakLength | undefined;
|
|
198
|
+
maxNumWorkingHours?: number | boolean | undefined;
|
|
199
|
+
maxNumDailyWorkingHours?: number | boolean | number[] | undefined;
|
|
200
|
+
forbidOverlappingEvents?: boolean | undefined;
|
|
201
|
+
disableDayLengthPunishment?: boolean | undefined;
|
|
202
|
+
weight?: number | undefined;
|
|
203
|
+
rank?: number | undefined;
|
|
204
|
+
intervals?: import("../../../core/types").Deserialized<import("../../../core/v2/types/intervals").Interval>[] | undefined;
|
|
205
|
+
}[];
|
|
206
|
+
locations: {
|
|
207
|
+
exceptions?: string[] | import("../../../core/types").Deserialized<import("../../../core/v2/types/exceptions").Exception>[] | undefined;
|
|
208
|
+
_id?: import("mongoose").Types.ObjectId | undefined;
|
|
209
|
+
id?: string | undefined;
|
|
210
|
+
belongsTo?: import("../../../core/types").Deserialized<import("../../../core/v2/types/divisions").Division> | undefined;
|
|
211
|
+
ids?: string | undefined;
|
|
212
|
+
rank?: number | undefined;
|
|
213
|
+
seats?: number | undefined;
|
|
214
|
+
displayName?: string | undefined;
|
|
215
|
+
text?: string | undefined;
|
|
216
|
+
lockedTimes?: import("../../../core/types").Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[] | undefined;
|
|
217
|
+
lunch?: import("../../../core/types").Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[] | undefined;
|
|
218
|
+
intervals?: import("../../../core/types").Deserialized<import("../../../core/v2/types/intervals").Interval>[] | undefined;
|
|
219
|
+
days?: import("../../../core/types").Deserialized<import("../../../core/v2/types/days").Day>[] | undefined;
|
|
220
|
+
area?: string | undefined;
|
|
221
|
+
minBreakLength?: number | undefined;
|
|
222
|
+
createdAt?: string | undefined;
|
|
223
|
+
updatedAt?: string | undefined;
|
|
224
|
+
lastModifiedBy?: unknown;
|
|
225
|
+
tags?: import("../../../core/types").Deserialized<{
|
|
226
|
+
type: string;
|
|
227
|
+
value: string;
|
|
228
|
+
}>[] | undefined;
|
|
229
|
+
}[];
|
|
230
|
+
periods: import("../../../core/v2/types/periods").Period[];
|
|
231
|
+
exceptions: import("../../../core/v2/types/exceptions").Exception[];
|
|
232
|
+
division: Pick<import("../../../core/v2/types/divisions").Division, "end" | "start" | "displayName">;
|
|
233
|
+
meta: {
|
|
234
|
+
structure: "RS/core-2.0.0";
|
|
235
|
+
};
|
|
236
|
+
} | undefined;
|
|
15
237
|
meta: {
|
|
16
238
|
structure: "RS/algorithm-3.0.0";
|
|
17
239
|
division: Pick<import("../../../core/types").Deserialized<import("../../../core/v2/types/divisions").Division>, "end" | "start" | "displayName">;
|
|
18
240
|
};
|
|
19
|
-
input: import("../types/constraints").Constraint;
|
|
20
241
|
};
|
|
21
242
|
static setting: (settings: import("../../../core/v2/types/division-settings").DivisionSettings) => import("../types/settings").Settings;
|
|
22
243
|
static teacher: (teachers: import("../../../core/types").Deserialized<import("../../../core/v2/types/teachers").Teacher> | import("../../../core/types").Deserialized<import("../../../core/v2/types/teachers").Teacher>[], settings: import("../../../core/v2/types/division-settings").DivisionSettings, options: import("../types/out-options").OutOptions) => import("../types/groups").Group[];
|
|
@@ -1,12 +1,233 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
26
|
import { Types as CoreTypes } from '../../../core/types';
|
|
2
27
|
import { Deserialized } from '../../../core/types';
|
|
3
28
|
import { OutOptions } from '../types/out-options';
|
|
4
29
|
declare const _default: (schedule: Deserialized<import("../../../core/v2/types/schedules").Schedule>, options?: OutOptions) => {
|
|
5
|
-
|
|
30
|
+
input: import("../types/constraints").Constraint;
|
|
31
|
+
output?: import("../types/configurations").Configuration[] | undefined;
|
|
32
|
+
coreData?: {
|
|
33
|
+
settings: import("../../../core/v2/types/division-settings").DivisionSettings;
|
|
34
|
+
rootIntervals: import("../../../core/v2/types/root-intervals").RootInterval[];
|
|
35
|
+
overlapGroups: import("../../../core/types").Serialized<Omit<import("../../../core/v2/types/overlap-groups").OverlapGroup, "belongsTo" | "lastModifiedBy">>[];
|
|
36
|
+
lockedTimes: import("../../../core/v2/types/locked-times").LockedTime[];
|
|
37
|
+
events: {
|
|
38
|
+
period?: string | undefined;
|
|
39
|
+
exceptions?: string[] | undefined;
|
|
40
|
+
inLocations?: string[] | undefined;
|
|
41
|
+
locations?: {
|
|
42
|
+
locations: string[];
|
|
43
|
+
rank?: number | undefined;
|
|
44
|
+
groupIndex?: number | undefined;
|
|
45
|
+
}[] | undefined;
|
|
46
|
+
participants?: {
|
|
47
|
+
groupIndex?: number | undefined;
|
|
48
|
+
to: string;
|
|
49
|
+
}[] | undefined;
|
|
50
|
+
groups?: {
|
|
51
|
+
groupIndex?: number | undefined;
|
|
52
|
+
to: string;
|
|
53
|
+
exclude: string[] | undefined;
|
|
54
|
+
}[] | undefined;
|
|
55
|
+
teachers?: {
|
|
56
|
+
groupIndex?: number | undefined;
|
|
57
|
+
to: string;
|
|
58
|
+
}[] | undefined;
|
|
59
|
+
course: string | undefined;
|
|
60
|
+
_id?: import("mongoose").Types.ObjectId | undefined;
|
|
61
|
+
id?: string | undefined;
|
|
62
|
+
belongsTo?: Deserialized<import("../../../core/v2/types/divisions").Division> | undefined;
|
|
63
|
+
density?: number | undefined;
|
|
64
|
+
weight?: number | undefined;
|
|
65
|
+
parked?: boolean | undefined;
|
|
66
|
+
color?: string | undefined;
|
|
67
|
+
fixedStart?: boolean | undefined;
|
|
68
|
+
start?: string | Date | import("moment").Moment | undefined;
|
|
69
|
+
end?: string | Date | import("moment").Moment | undefined;
|
|
70
|
+
ids?: string | undefined;
|
|
71
|
+
minBreakLength?: import("../../../core/v2/types/break-lengths").BreakLength | undefined;
|
|
72
|
+
weeks?: number[] | undefined;
|
|
73
|
+
type?: string | undefined;
|
|
74
|
+
displayName?: string | undefined;
|
|
75
|
+
visible?: boolean | undefined;
|
|
76
|
+
duration?: number | undefined;
|
|
77
|
+
preferredDuration?: number | undefined;
|
|
78
|
+
durationVariance?: number | undefined;
|
|
79
|
+
lockedTimes?: Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[] | undefined;
|
|
80
|
+
intervals?: Deserialized<import("../../../core/v2/types/intervals").Interval>[] | undefined;
|
|
81
|
+
centerOfAttraction?: string | null | undefined;
|
|
82
|
+
days?: Deserialized<import("../../../core/v2/types/days").Day>[] | undefined;
|
|
83
|
+
overlapGroup?: Deserialized<import("../../../core/v2/types/overlap-groups").OverlapGroup> | undefined;
|
|
84
|
+
overlapSpecies?: Deserialized<import("../../../core/v2/types/overlap-groups").OverlapGroup> | undefined;
|
|
85
|
+
createdAt?: string | undefined;
|
|
86
|
+
updatedAt?: string | undefined;
|
|
87
|
+
lastModifiedBy?: unknown;
|
|
88
|
+
}[];
|
|
89
|
+
courses: {
|
|
90
|
+
period?: string | undefined;
|
|
91
|
+
locations?: {
|
|
92
|
+
locations: string[];
|
|
93
|
+
rank?: number | undefined;
|
|
94
|
+
groupIndex?: number | undefined;
|
|
95
|
+
}[] | undefined;
|
|
96
|
+
participants?: {
|
|
97
|
+
groupIndex?: number | undefined;
|
|
98
|
+
to: string;
|
|
99
|
+
}[] | undefined;
|
|
100
|
+
groups?: {
|
|
101
|
+
groupIndex?: number | undefined;
|
|
102
|
+
to: string;
|
|
103
|
+
exclude: string[] | undefined;
|
|
104
|
+
}[] | undefined;
|
|
105
|
+
teachers?: {
|
|
106
|
+
groupIndex?: number | undefined;
|
|
107
|
+
to: string;
|
|
108
|
+
}[] | undefined;
|
|
109
|
+
type?: string | undefined;
|
|
110
|
+
id?: string | undefined;
|
|
111
|
+
color?: string | undefined;
|
|
112
|
+
weeks?: number[] | undefined;
|
|
113
|
+
days?: Deserialized<import("../../../core/v2/types/days").Day>[] | undefined;
|
|
114
|
+
comment?: string | undefined;
|
|
115
|
+
updatedAt?: string | undefined;
|
|
116
|
+
displayName?: string | undefined;
|
|
117
|
+
exceptions?: Deserialized<import("../../../core/v2/types/exceptions").Exception>[] | undefined;
|
|
118
|
+
ids?: string | undefined;
|
|
119
|
+
minBreakLength?: import("../../../core/v2/types/break-lengths").BreakLength | undefined;
|
|
120
|
+
weight?: number | undefined;
|
|
121
|
+
intervals?: Deserialized<import("../../../core/v2/types/intervals").Interval>[] | undefined;
|
|
122
|
+
density?: number | undefined;
|
|
123
|
+
subject?: string | undefined;
|
|
124
|
+
eventDurationVariance?: number | undefined;
|
|
125
|
+
totalTime?: string | undefined;
|
|
126
|
+
centerOfAttraction?: string | null | undefined;
|
|
127
|
+
minutesPerWeek?: number | undefined;
|
|
128
|
+
expectedTotalHours?: number | undefined;
|
|
129
|
+
}[];
|
|
130
|
+
persons: {
|
|
131
|
+
exceptions?: string[] | undefined;
|
|
132
|
+
group: string | undefined;
|
|
133
|
+
_id?: import("mongoose").Types.ObjectId | undefined;
|
|
134
|
+
id?: string | undefined;
|
|
135
|
+
belongsTo?: Deserialized<import("../../../core/v2/types/divisions").Division> | undefined;
|
|
136
|
+
ids?: string | undefined;
|
|
137
|
+
displayName?: string | undefined;
|
|
138
|
+
lastName?: string | undefined;
|
|
139
|
+
firstName?: string | undefined;
|
|
140
|
+
birthDate?: Date | undefined;
|
|
141
|
+
sex?: "Man" | "Woman" | undefined;
|
|
142
|
+
type?: "Student" | "Teacher" | "Other" | undefined;
|
|
143
|
+
SSN?: {
|
|
144
|
+
value: string;
|
|
145
|
+
nationality?: string | undefined;
|
|
146
|
+
} | undefined;
|
|
147
|
+
emails?: Deserialized<{
|
|
148
|
+
value: string;
|
|
149
|
+
type: "private" | "organization";
|
|
150
|
+
}>[] | undefined;
|
|
151
|
+
phoneNumbers?: Deserialized<{
|
|
152
|
+
value: string;
|
|
153
|
+
type: "private" | "organization";
|
|
154
|
+
}>[] | undefined;
|
|
155
|
+
lockedTimes?: Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[] | undefined;
|
|
156
|
+
lunch?: Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[] | undefined;
|
|
157
|
+
createdAt?: string | undefined;
|
|
158
|
+
updatedAt?: string | undefined;
|
|
159
|
+
}[];
|
|
160
|
+
groups: {
|
|
161
|
+
exceptions?: string[] | undefined;
|
|
162
|
+
parentGroups?: string[] | undefined;
|
|
163
|
+
rootInterval?: string | Deserialized<import("../../../core/v2/types/root-intervals").RootInterval> | undefined;
|
|
164
|
+
members?: string[] | undefined;
|
|
165
|
+
id?: string | undefined;
|
|
166
|
+
days?: Deserialized<import("../../../core/v2/types/days").Day>[] | undefined;
|
|
167
|
+
updatedAt?: string | undefined;
|
|
168
|
+
displayName?: string | undefined;
|
|
169
|
+
ids?: string | undefined;
|
|
170
|
+
minBreakLength?: import("../../../core/v2/types/break-lengths").BreakLength | undefined;
|
|
171
|
+
maxNumWorkingHours?: number | boolean | undefined;
|
|
172
|
+
maxNumDailyWorkingHours?: number | boolean | number[] | undefined;
|
|
173
|
+
forbidOverlappingEvents?: boolean | undefined;
|
|
174
|
+
disableDayLengthPunishment?: boolean | undefined;
|
|
175
|
+
weight?: number | undefined;
|
|
176
|
+
rank?: number | undefined;
|
|
177
|
+
species?: string | undefined;
|
|
178
|
+
intervals?: Deserialized<import("../../../core/v2/types/intervals").Interval>[] | undefined;
|
|
179
|
+
}[];
|
|
180
|
+
teachers: {
|
|
181
|
+
exceptions?: string[] | Deserialized<import("../../../core/v2/types/exceptions").Exception>[] | undefined;
|
|
182
|
+
person?: string | undefined;
|
|
183
|
+
id?: string | undefined;
|
|
184
|
+
days?: Deserialized<import("../../../core/v2/types/days").Day>[] | undefined;
|
|
185
|
+
updatedAt?: string | undefined;
|
|
186
|
+
displayName?: string | undefined;
|
|
187
|
+
ids?: string | undefined;
|
|
188
|
+
minBreakLength?: import("../../../core/v2/types/break-lengths").BreakLength | undefined;
|
|
189
|
+
maxNumWorkingHours?: number | boolean | undefined;
|
|
190
|
+
maxNumDailyWorkingHours?: number | boolean | number[] | undefined;
|
|
191
|
+
forbidOverlappingEvents?: boolean | undefined;
|
|
192
|
+
disableDayLengthPunishment?: boolean | undefined;
|
|
193
|
+
weight?: number | undefined;
|
|
194
|
+
rank?: number | undefined;
|
|
195
|
+
intervals?: Deserialized<import("../../../core/v2/types/intervals").Interval>[] | undefined;
|
|
196
|
+
}[];
|
|
197
|
+
locations: {
|
|
198
|
+
exceptions?: string[] | Deserialized<import("../../../core/v2/types/exceptions").Exception>[] | undefined;
|
|
199
|
+
_id?: import("mongoose").Types.ObjectId | undefined;
|
|
200
|
+
id?: string | undefined;
|
|
201
|
+
belongsTo?: Deserialized<import("../../../core/v2/types/divisions").Division> | undefined;
|
|
202
|
+
ids?: string | undefined;
|
|
203
|
+
rank?: number | undefined;
|
|
204
|
+
seats?: number | undefined;
|
|
205
|
+
displayName?: string | undefined;
|
|
206
|
+
text?: string | undefined;
|
|
207
|
+
lockedTimes?: Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[] | undefined;
|
|
208
|
+
lunch?: Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[] | undefined;
|
|
209
|
+
intervals?: Deserialized<import("../../../core/v2/types/intervals").Interval>[] | undefined;
|
|
210
|
+
days?: Deserialized<import("../../../core/v2/types/days").Day>[] | undefined;
|
|
211
|
+
area?: string | undefined;
|
|
212
|
+
minBreakLength?: number | undefined;
|
|
213
|
+
createdAt?: string | undefined;
|
|
214
|
+
updatedAt?: string | undefined;
|
|
215
|
+
lastModifiedBy?: unknown;
|
|
216
|
+
tags?: Deserialized<{
|
|
217
|
+
type: string;
|
|
218
|
+
value: string;
|
|
219
|
+
}>[] | undefined;
|
|
220
|
+
}[];
|
|
221
|
+
periods: import("../../../core/v2/types/periods").Period[];
|
|
222
|
+
exceptions: import("../../../core/v2/types/exceptions").Exception[];
|
|
223
|
+
division: Pick<import("../../../core/v2/types/divisions").Division, "end" | "start" | "displayName">;
|
|
224
|
+
meta: {
|
|
225
|
+
structure: "RS/core-2.0.0";
|
|
226
|
+
};
|
|
227
|
+
} | undefined;
|
|
6
228
|
meta: {
|
|
7
229
|
structure: "RS/algorithm-3.0.0";
|
|
8
230
|
division: Pick<Deserialized<import("../../../core/v2/types/divisions").Division>, "end" | "start" | "displayName">;
|
|
9
231
|
};
|
|
10
|
-
input: import("../types/constraints").Constraint;
|
|
11
232
|
};
|
|
12
233
|
export default _default;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
8
|
+
var _index = require("../../../index");
|
|
8
9
|
var _constraints2 = _interopRequireDefault(require("./constraints"));
|
|
9
10
|
var _configurations2 = _interopRequireDefault(require("./configurations"));
|
|
10
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -15,14 +16,17 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
15
16
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
17
|
var _default = exports.default = function _default(schedule) {
|
|
17
18
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
18
|
-
return _objectSpread({
|
|
19
|
+
return _objectSpread(_objectSpread(_objectSpread({
|
|
19
20
|
meta: {
|
|
20
21
|
structure: 'RS/algorithm-3.0.0',
|
|
21
22
|
division: _lodash.default.pick(schedule.divisions, 'displayName', 'start', 'end')
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
}
|
|
24
|
+
}, options.appendCoreData && {
|
|
25
|
+
coreData: _index.CoreMap.to.schedules(schedule)
|
|
26
|
+
}), options.appendOutput && schedule.events && {
|
|
25
27
|
output: (0, _configurations2.default)(schedule.events, options)
|
|
28
|
+
}), {}, {
|
|
29
|
+
input: (0, _constraints2.default)(schedule, options)
|
|
26
30
|
});
|
|
27
31
|
};
|
|
28
32
|
//# sourceMappingURL=schedules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedules.js","names":["_lodash","_interopRequireDefault","require","_constraints2","_configurations2","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","_default","exports","schedule","options","meta","structure","division","_","pick","divisions","
|
|
1
|
+
{"version":3,"file":"schedules.js","names":["_lodash","_interopRequireDefault","require","_index","_constraints2","_configurations2","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","_default","exports","schedule","options","meta","structure","division","_","pick","divisions","appendCoreData","coreData","CoreMap","to","schedules","appendOutput","events","output","_configurations","_constraints"],"sources":["../../../../src/RS/v3/to/schedules.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,gBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAmE,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,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Gb,KAAK,EAAE,IAAA6B,qBAAY,EAACjB,QAAQ,EAAEC,OAAO;EAAC;AAE1C,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Types as CoreTypes, Serialized } from '../../../core/types';
|
|
2
2
|
import { Configuration } from './configurations';
|
|
3
3
|
import { Constraint } from './constraints';
|
|
4
4
|
type Structure = 'RS/algorithm-3.0.0';
|
|
5
5
|
export interface Schedule {
|
|
6
6
|
meta?: {
|
|
7
7
|
structure?: Structure;
|
|
8
|
-
division: Pick<
|
|
8
|
+
division: Pick<CoreTypes.division, 'displayName' | 'start' | 'end'>;
|
|
9
9
|
};
|
|
10
10
|
score?: [number, number, number, number];
|
|
11
11
|
input?: Constraint;
|
|
12
12
|
output?: Configuration[];
|
|
13
|
+
coreData?: Serialized<Omit<CoreTypes.division, 'settings'>> & Pick<CoreTypes.division, 'settings'>;
|
|
13
14
|
}
|
|
14
15
|
export {};
|
|
@@ -105,6 +105,15 @@ export declare const maps: readonly [{
|
|
|
105
105
|
readonly meta: {
|
|
106
106
|
readonly structure: "RS/algorithm-2.0.0";
|
|
107
107
|
};
|
|
108
|
+
}, {
|
|
109
|
+
readonly structure: {
|
|
110
|
+
events: string[];
|
|
111
|
+
};
|
|
112
|
+
readonly name: "Royal Schedule Algorithm v3";
|
|
113
|
+
readonly map: typeof import("../../RS/v3").Map;
|
|
114
|
+
readonly meta: {
|
|
115
|
+
readonly structure: "RS/algorithm-3.0.0";
|
|
116
|
+
};
|
|
108
117
|
}, {
|
|
109
118
|
readonly structure: {
|
|
110
119
|
groups: string[];
|
|
@@ -34,6 +34,9 @@ var RS1_structure = {
|
|
|
34
34
|
var RS2_structure = {
|
|
35
35
|
events: ['collection', 'day', 'dependencies', 'end', 'id', 'start']
|
|
36
36
|
};
|
|
37
|
+
var RS3_structure = {
|
|
38
|
+
events: ['output', 'coreData']
|
|
39
|
+
};
|
|
37
40
|
var Admentum_structure = {
|
|
38
41
|
schools: ['url', 'id', 'unit_code', 'school_code', 'school_type', 'name'],
|
|
39
42
|
schedule: ['url', 'id', 'school_id', 'school_year', 'start_date', 'end_date', 'start_time', 'end_time', 'is_active', 'archived_at'],
|
|
@@ -134,6 +137,13 @@ var maps = exports.maps = [{
|
|
|
134
137
|
meta: {
|
|
135
138
|
structure: 'RS/algorithm-2.0.0'
|
|
136
139
|
}
|
|
140
|
+
}, {
|
|
141
|
+
structure: RS3_structure,
|
|
142
|
+
name: 'Royal Schedule Algorithm v3',
|
|
143
|
+
map: _RS.RSMap.V3,
|
|
144
|
+
meta: {
|
|
145
|
+
structure: 'RS/algorithm-3.0.0'
|
|
146
|
+
}
|
|
137
147
|
}, {
|
|
138
148
|
structure: core_structure,
|
|
139
149
|
name: 'Royal Schedule',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_core","require","_SchoolSoft","_PlanDigital","_Admentum","_IdunSoft","_Skola","_RS","_Excel","core_structure","groups","locations","teachers","courses","excel_structure","meta","RS0_structure","input","output","RS1_structure","events","RS2_structure","Admentum_structure","schools","schedule","rooms","principals","schedule_groups","primary_groups","schedule_events","schedule_event_instances","lessons","lesson_infos","IdunSoft_structure","Grupp","Lärare","Rum","Ämne","Lektion","Skola24_structure","unit_tblroom","school_tblsubject","school_tblteacher","school_tblgroup","school_tblplan","school_tblcourse","school_tblschedule","school_tblgroup_group","school_tblplan_period","school_tblplan_teacher","school_tblplan_group","unit_tblperiod_date","school_tblschedule_period","school_tblschedule_teacher","school_tblschedule_group","school_tblschedule_room","PlanDigital_structure","Perioder","SchoolSoft_structure","maps","exports","structure","name","map","AdmentumMap","SchoolSoftMap","PlanDigitalMap","IdunSoftMap","Skola24Map","RSMap","V0","V1","V2","CoreMap","ExcelMap"],"sources":["../../../src/identify/constants/index.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GA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AAE,UAAU,EAAE,WAAW,EAAE,aAAa,CAAC;EACnJC,KAAK,EAAqB,CAAC,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_core","require","_SchoolSoft","_PlanDigital","_Admentum","_IdunSoft","_Skola","_RS","_Excel","core_structure","groups","locations","teachers","courses","excel_structure","meta","RS0_structure","input","output","RS1_structure","events","RS2_structure","RS3_structure","Admentum_structure","schools","schedule","rooms","principals","schedule_groups","primary_groups","schedule_events","schedule_event_instances","lessons","lesson_infos","IdunSoft_structure","Grupp","Lärare","Rum","Ämne","Lektion","Skola24_structure","unit_tblroom","school_tblsubject","school_tblteacher","school_tblgroup","school_tblplan","school_tblcourse","school_tblschedule","school_tblgroup_group","school_tblplan_period","school_tblplan_teacher","school_tblplan_group","unit_tblperiod_date","school_tblschedule_period","school_tblschedule_teacher","school_tblschedule_group","school_tblschedule_room","PlanDigital_structure","Perioder","SchoolSoft_structure","maps","exports","structure","name","map","AdmentumMap","SchoolSoftMap","PlanDigitalMap","IdunSoftMap","Skola24Map","RSMap","V0","V1","V2","V3","CoreMap","ExcelMap"],"sources":["../../../src/identify/constants/index.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,GAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAGA,IAAMQ,cAAc,GAAG;EACrBC,MAAM,EAAK,CAAC,IAAI,CAAC;EACjBC,SAAS,EAAE,CAAC,IAAI,CAAC;EACjBC,QAAQ,EAAG,CAAC,IAAI,CAAC;EACjBC,OAAO,EAAI,CAAC,IAAI,EAAE,QA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