@royalschedule/maps 2.3.2 → 2.3.3

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.
@@ -14,7 +14,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
14
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
15
  var _default = (teachers, belongsTo) => {
16
16
  if (!Array.isArray(teachers)) throw new Error('(SS12000::To::Duty) Teacher input is not of array type');
17
- if (!teachers.every(teacher => _lodash.default.has(teacher, 'id'))) throw new Error('(SS12000::To::Duty) Some teachers are missing "id" values');
17
+ if (!teachers.every(teacher => teacher.id != null)) throw new Error('(SS12000::To::Duty) Some teachers are missing "id" values');
18
18
  if (!belongsTo && !teachers.every(teacher => _lodash.default.has(teacher, 'belongsTo'))) throw new Error('(SS12000::To::Duty) Some top layer teachers are missing "belongsTo" values');
19
19
  return teachers.map(teacher => {
20
20
  var _belongsTo$id, _ref;
@@ -1 +1 @@
1
- {"version":3,"file":"duties.js","mappings":";;;;;;AAAA;AACA;AAAyD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAO1C,CAACA,QAA2C,EAAEC,SAA8B,KAAY;EACrG,IAAI,CAAEC,KAAK,CAACC,OAAO,CAACH,QAAQ,CAAC,EAC3B,MAAM,IAAII,KAAK,CAAC,wDAAwD,CAAC;EAE3E,IAAI,CAAEJ,QAAQ,CAACK,KAAK,CAAEC,OAAO,IAAKC,eAAC,CAACC,GAAG,CAACF,OAAO,EAAE,IAAI,CAAC,CAAC,EACrD,MAAM,IAAIF,KAAK,CAAC,2DAA2D,CAAC;EAE9E,IAAI,CAAEH,SAAS,IAAI,CAAED,QAAQ,CAACK,KAAK,CAAEC,OAAO,IAAKC,eAAC,CAACC,GAAG,CAACF,OAAO,EAAE,WAAW,CAAC,CAAC,EAC3E,MAAM,IAAIF,KAAK,CAAC,4EAA4E,CAAC;EAE/F,OAAOJ,QAAQ,CAACS,GAAG,CAAEH,OAAO;IAAA;IAAA;MAC1BI,EAAE,6BAAcT,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAES,EAAE,yDAAIJ,OAAO,CAACL,SAAU,CAACS,EAAG,cAAKJ,OAAO,CAACI,EAAG,CAAE;MACzEC,IAAI,EAAE;QACJC,OAAO,EAAG,mBAAM,EAACN,OAAO,CAACO,SAAS,CAAC,CAACC,WAAW,EAAE;QACjDC,QAAQ,EAAE,mBAAM,EAACT,OAAO,CAACU,SAAS,CAAC,CAACF,WAAW;OAChD;MACDG,SAAS,EAAE,mBAAM,UAAEhB,SAAS,aAATA,SAAS,cAATA,SAAS,GAAIK,OAAO,CAACL,SAAS,yCAA/B,KAAkCiB,KAAK,CAAC,CAACJ,WAAW;IAAG,GACtER,OAAO,CAACa,WAAW,IAAI;MAAEA,WAAW,EAAEb,OAAO,CAACa;IAAW,CAAE;MAM9DC,QAAQ,EAAE;IAAQ;EAAA,CAClB,CAAC;AACL,CAAC;AAAA","names":["teachers","belongsTo","Array","isArray","Error","every","teacher","_","has","map","id","meta","created","createdAt","toISOString","modified","updatedAt","startDate","start","displayName","dutyRole"],"sourceRoot":"","sources":["../../../src/SS12000/to/duties.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"duties.js","mappings":";;;;;;AAAA;AACA;AAAyD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAO1C,CAACA,QAA2C,EAAEC,SAA8B,KAAY;EACrG,IAAI,CAAEC,KAAK,CAACC,OAAO,CAACH,QAAQ,CAAC,EAC3B,MAAM,IAAII,KAAK,CAAC,wDAAwD,CAAC;EAE3E,IAAI,CAAEJ,QAAQ,CAACK,KAAK,CAAEC,OAAO,IAAKA,OAAO,CAACC,EAAE,IAAI,IAAI,CAAC,EACnD,MAAM,IAAIH,KAAK,CAAC,2DAA2D,CAAC;EAE9E,IAAI,CAAEH,SAAS,IAAI,CAAED,QAAQ,CAACK,KAAK,CAAEC,OAAO,IAAKE,eAAC,CAACC,GAAG,CAACH,OAAO,EAAE,WAAW,CAAC,CAAC,EAC3E,MAAM,IAAIF,KAAK,CAAC,4EAA4E,CAAC;EAE/F,OAAOJ,QAAQ,CAACU,GAAG,CAAEJ,OAAO;IAAA;IAAA;MAC1BC,EAAE,6BAAcN,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEM,EAAE,yDAAID,OAAO,CAACL,SAAU,CAACM,EAAG,cAAKD,OAAO,CAACC,EAAG,CAAE;MACzEI,IAAI,EAAE;QACJC,OAAO,EAAG,mBAAM,EAACN,OAAO,CAACO,SAAS,CAAC,CAACC,WAAW,EAAE;QACjDC,QAAQ,EAAE,mBAAM,EAACT,OAAO,CAACU,SAAS,CAAC,CAACF,WAAW;OAChD;MACDG,SAAS,EAAE,mBAAM,UAAEhB,SAAS,aAATA,SAAS,cAATA,SAAS,GAAIK,OAAO,CAACL,SAAS,yCAA/B,KAAkCiB,KAAK,CAAC,CAACJ,WAAW;IAAG,GACtER,OAAO,CAACa,WAAW,IAAI;MAAEA,WAAW,EAAEb,OAAO,CAACa;IAAW,CAAE;MAM9DC,QAAQ,EAAE;IAAQ;EAAA,CAClB,CAAC;AACL,CAAC;AAAA","names":["teachers","belongsTo","Array","isArray","Error","every","teacher","id","_","has","map","meta","created","createdAt","toISOString","modified","updatedAt","startDate","start","displayName","dutyRole"],"sourceRoot":"","sources":["../../../src/SS12000/to/duties.ts"],"sourcesContent":[null]}
@@ -15,7 +15,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
15
15
  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
16
  var _default = (groups, belongsTo) => {
17
17
  if (!Array.isArray(groups)) throw new Error('(SS12000::To::Groups) Group input is not of array type');
18
- if (!groups.every(group => _lodash.default.has(group, 'id'))) throw new Error('(SS12000::To::Groups) Some groups are missing "id" values');
18
+ if (!groups.every(group => group.id != null)) throw new Error('(SS12000::To::Groups) Some groups are missing "id" values');
19
19
  if (!belongsTo && !groups.every(group => _lodash.default.has(group, 'belongsTo'))) throw new Error('(SS12000::To::Groups) Some top layer groups are missing "belongsTo" values');
20
20
  return groups.map(group => {
21
21
  var _belongsTo$id;
@@ -1 +1 @@
1
- {"version":3,"file":"groups.js","mappings":";;;;;;AAAA;AACA;AAOA;AAA4D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAE7C,CAACA,MAAuC,EAAEC,SAA8B,KAAa;EAClG,IAAI,CAAEC,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,EACzB,MAAM,IAAII,KAAK,CAAC,wDAAwD,CAAC;EAE3E,IAAI,CAAEJ,MAAM,CAACK,KAAK,CAAEC,KAAK,IAAKC,eAAC,CAACC,GAAG,CAACF,KAAK,EAAE,IAAI,CAAC,CAAC,EAC/C,MAAM,IAAIF,KAAK,CAAC,2DAA2D,CAAC;EAE9E,IAAI,CAAEH,SAAS,IAAI,CAAED,MAAM,CAACK,KAAK,CAAEC,KAAK,IAAKC,eAAC,CAACC,GAAG,CAACF,KAAK,EAAE,WAAW,CAAC,CAAC,EACrE,MAAM,IAAIF,KAAK,CAAC,4EAA4E,CAAC;EAE/F,OAAOJ,MAAM,CAACS,GAAG,CAAEH,KAAK;IAAA;IAAA;MACtBI,EAAE,6BAAcT,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAES,EAAE,yDAAIJ,KAAK,CAACL,SAAU,CAACS,EAAG,cAAKJ,KAAK,CAACI,EAAG,CAAE;MACrEC,IAAI,EAAE;QACJC,OAAO,EAAG,mBAAM,EAACN,KAAK,CAACO,SAAS,CAAC,CAACC,WAAW,EAAE;QAC/CC,QAAQ,EAAE,mBAAM,EAACT,KAAK,CAACU,SAAS,CAAC,CAACF,WAAW;OAC9C;MACDG,SAAS,EAAI,OAAO;MACpBC,WAAW,EAAEZ,KAAK,CAACY;IAAW,GAC3BZ,KAAK,CAACa,OAAO,IAAI;MAClBC,gBAAgB,EAAE,oBAAQ,EAACd,KAAK,CAACa,OAAO,EAAElB,SAAS,aAATA,SAAS,cAATA,SAAS,GAAIK,KAAK,CAACL,SAAS,CAAC,CAACQ,GAAG,CAACY,MAAM;QAAA;QAAA,OAAK;UACrFC,SAAS,EAAO,mBAAM,UAAErB,SAAS,aAATA,SAAS,cAATA,SAAS,GAAIK,KAAK,CAACL,SAAS,yCAA7B,KAAgCsB,KAAK,CAAC,CAACT,WAAW,EAAG;UAC5EU,OAAO,EAAS,mBAAM,WAAEvB,SAAS,aAATA,SAAS,cAATA,SAAS,GAAIK,KAAK,CAACL,SAAS,0CAA7B,MAAgCwB,GAAG,CAAC,CAACX,WAAW,EAAG;UAC1EO,MAAM,EAAUd,eAAC,CAACmB,IAAI,CAACL,MAAM,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC;SACrD;MAAA,CAAC;KACH;EAAA,CACD,CAAC;AACL,CAAC;AAAA","names":["groups","belongsTo","Array","isArray","Error","every","group","_","has","map","id","meta","created","createdAt","toISOString","modified","updatedAt","groupType","displayName","members","groupMemberships","person","startDate","start","endDate","end","pick"],"sourceRoot":"","sources":["../../../src/SS12000/to/groups.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"groups.js","mappings":";;;;;;AAAA;AACA;AAOA;AAA4D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAE7C,CAACA,MAAuC,EAAEC,SAA8B,KAAa;EAClG,IAAI,CAAEC,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,EACzB,MAAM,IAAII,KAAK,CAAC,wDAAwD,CAAC;EAE3E,IAAI,CAAEJ,MAAM,CAACK,KAAK,CAAEC,KAAK,IAAKA,K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I,EAAE,aAAa,CAAC;SACrD;MAAA,CAAC;KACH;EAAA,CACD,CAAC;AACL,CAAC;AAAA","names":["groups","belongsTo","Array","isArray","Error","every","group","id","_","has","map","meta","created","createdAt","toISOString","modified","updatedAt","groupType","displayName","members","groupMemberships","person","startDate","start","endDate","end","pick"],"sourceRoot":"","sources":["../../../src/SS12000/to/groups.ts"],"sourcesContent":[null]}
@@ -23,9 +23,9 @@ var _default = courses => {
23
23
  id
24
24
  } = _ref2;
25
25
  return id;
26
- }))).length) throw new Error('(Core::From::V2::Courses) Course array have two or more courses with the same ID');
26
+ }))).length) throw new Error('(Core::From::V1::Courses) Course array have two or more courses with the same ID');
27
27
  return courses.map(course => {
28
- if (!course.id) throw new Error('(Core::From::V2::Courses) Course id is undefined');
28
+ if (!course.id) throw new Error('(Core::From::V1::Courses) Course id is undefined');
29
29
  var {
30
30
  events,
31
31
  groups,
@@ -21,9 +21,9 @@ var _default = groups => {
21
21
  id
22
22
  } = _ref2;
23
23
  return id;
24
- }))).length) throw new Error('(Core::From::V2::Groups) Groups array have two or more groups with the same ID');
24
+ }))).length) throw new Error('(Core::From::V1::Groups) Groups array have two or more groups with the same ID');
25
25
  return groups.map(group => {
26
- if (!group.id) throw new Error('(Core::From::V2::Groups) Group id is undefined');
26
+ if (!group.id) throw new Error('(Core::From::V1::Groups) Group id is undefined');
27
27
  if (!group.displayName) group.displayName = group.id;
28
28
  return _objectSpread({}, group);
29
29
  }, []);
@@ -21,9 +21,9 @@ var _default = locations => {
21
21
  id
22
22
  } = _ref2;
23
23
  return id;
24
- }))).length) throw new Error('(Core::From::V2::Locations) Location array have two or more locations with the same ID');
24
+ }))).length) throw new Error('(Core::From::V1::Locations) Location array have two or more locations with the same ID');
25
25
  return locations.map(location => {
26
- if (!location.id) throw new Error('(Core::From::V2::Locations) Location id is undefined');
26
+ if (!location.id) throw new Error('(Core::From::V1::Locations) Location id is undefined');
27
27
  if (!location.displayName) location.displayName = location.id;
28
28
  return _objectSpread({}, location);
29
29
  }, []);
@@ -21,9 +21,9 @@ var _default = LockedTimes => {
21
21
  id
22
22
  } = _ref2;
23
23
  return id;
24
- }))).length) throw new Error('(Core::From::V2::LockedTimes) LockedTimes array have two or more LockedTimes with the same ID');
24
+ }))).length) throw new Error('(Core::From::V1::LockedTimes) LockedTimes array have two or more LockedTimes with the same ID');
25
25
  return LockedTimes.map(lockedTime => {
26
- if (!lockedTime.id) throw new Error('(Core::From::V2::LockedTimes) Locked time id is undefined');
26
+ if (!lockedTime.id) throw new Error('(Core::From::V1::LockedTimes) Locked time id is undefined');
27
27
  return _objectSpread({}, lockedTime);
28
28
  }, []);
29
29
  };
@@ -21,9 +21,9 @@ var _default = overlapGroups => {
21
21
  id
22
22
  } = _ref2;
23
23
  return id;
24
- }))).length) throw new Error('(Core::From::V2::OverlapGroup) overlapGroups array have two or more overlapGroups with the same ID');
24
+ }))).length) throw new Error('(Core::From::V1::OverlapGroup) overlapGroups array have two or more overlapGroups with the same ID');
25
25
  return overlapGroups.map(overlapGroup => {
26
- if (!overlapGroup.id) throw new Error('(Core::From::V2::OverlapGroup) Overlap group id is undefined');
26
+ if (!overlapGroup.id) throw new Error('(Core::From::V1::OverlapGroup) Overlap group id is undefined');
27
27
  return _objectSpread({}, overlapGroup);
28
28
  }, []);
29
29
  };
@@ -16,9 +16,9 @@ var _default = periods => {
16
16
  id
17
17
  } = _ref2;
18
18
  return id;
19
- }))).length) throw new Error('(Core::From::V2::Periods) Periods array have two or more periods with the same ID');
19
+ }))).length) throw new Error('(Core::From::V1::Periods) Periods array have two or more periods with the same ID');
20
20
  return periods.map(period => {
21
- if (!period.id) throw new Error('(Core::From::V2::Periods) Period id is undefined');
21
+ if (!period.id) throw new Error('(Core::From::V1::Periods) Period id is undefined');
22
22
  if (!period.displayName) period.displayName = period.id;
23
23
  return period;
24
24
  });
@@ -15,9 +15,9 @@ var _default = persons => {
15
15
  id
16
16
  } = _ref;
17
17
  return id;
18
- }))).length) throw new Error('(Core::From::V2::Persons) Persons array have two or more persons with the same ID');
18
+ }))).length) throw new Error('(Core::From::V1::Persons) Persons array have two or more persons with the same ID');
19
19
  return persons.map(person => {
20
- if (!person.id) throw new Error('(Core::From::V2::Persons) Person id is undefined');
20
+ if (!person.id) throw new Error('(Core::From::V1::Persons) Person id is undefined');
21
21
  if (!person.displayName) person.displayName = person.id;
22
22
  return _objectSpread({}, person);
23
23
  }, []);
@@ -21,9 +21,9 @@ var _default = teachers => {
21
21
  id
22
22
  } = _ref2;
23
23
  return id;
24
- }))).length) throw new Error('(Core::From::V2::Teachers) Teachers array have two or more teachers with the same ID');
24
+ }))).length) throw new Error('(Core::From::V1::Teachers) Teachers array have two or more teachers with the same ID');
25
25
  return teachers.map(teacher => {
26
- if (!teacher.id) throw new Error('(Core::From::V2::Teachers) Teacher id is undefiend');
26
+ if (!teacher.id) throw new Error('(Core::From::V1::Teachers) Teacher id is undefiend');
27
27
  if (!teacher.displayName) teacher.displayName = teacher.id;
28
28
  return _objectSpread({}, teacher);
29
29
  }, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royalschedule/maps",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",