@royalschedule/maps 4.0.29 → 4.0.30
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.
|
@@ -2,7 +2,7 @@ import { Types } from "../../core/types/index.js";
|
|
|
2
2
|
import { Types as Types$1 } from "../types/index.js";
|
|
3
3
|
import "../index.js";
|
|
4
4
|
import "../../index.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as xlsx1 from "xlsx";
|
|
6
6
|
|
|
7
7
|
//#region src/Additio/to/index.d.ts
|
|
8
8
|
declare class export_default {
|
|
@@ -16,7 +16,7 @@ declare class export_default {
|
|
|
16
16
|
courses: Types.Mixed.Course[];
|
|
17
17
|
events: Types.Mixed.Event[];
|
|
18
18
|
lockedTimes: Types.Mixed.LockedTime[];
|
|
19
|
-
}, _options?: Types$1.options) =>
|
|
19
|
+
}, _options?: Types$1.options) => xlsx1.WorkBook;
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
|
22
22
|
export { export_default };
|
|
@@ -11,7 +11,7 @@ var duties_default = (duties) => {
|
|
|
11
11
|
return first || last || void 0;
|
|
12
12
|
};
|
|
13
13
|
return duties.map((duty) => {
|
|
14
|
-
const person = duty.person ?? duty.
|
|
14
|
+
const person = duty._embedded?.person ?? duty.person;
|
|
15
15
|
const displayName = duty.displayName ?? toDisplayName(person?.givenName, person?.familyName) ?? person?.displayName;
|
|
16
16
|
return {
|
|
17
17
|
ids: duty.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duties.js","names":["toPerson"],"sources":["../../../src/SS12000/from/duties.ts"],"sourcesContent":["import { omit } from 'lodash-es';\nimport type { CoreTypes } from '../../core';\nimport type { Duty } from '../types/duties';\nimport toPerson from './persons';\n\nexport default (duties: Duty[]) => {\n if (!Array.isArray(duties))\n throw new Error('(SS12000::From::Duties) Teacher input is not of array type', { cause: 'invalid_input' });\n\n const toDisplayName = (firstName?: string, lastName?: string) => {\n const first = firstName?.trim();\n const last = lastName?.trim();\n if (first && last) return `${ first } ${ last }`;\n return first || last || undefined;\n };\n\n return duties\n .map((duty): CoreTypes.MixedWithoutInternalId.Teacher => {\n const person = duty.person ?? duty.
|
|
1
|
+
{"version":3,"file":"duties.js","names":["toPerson"],"sources":["../../../src/SS12000/from/duties.ts"],"sourcesContent":["import { omit } from 'lodash-es';\nimport type { CoreTypes } from '../../core';\nimport type { Duty } from '../types/duties';\nimport toPerson from './persons';\n\nexport default (duties: Duty[]) => {\n if (!Array.isArray(duties))\n throw new Error('(SS12000::From::Duties) Teacher input is not of array type', { cause: 'invalid_input' });\n\n const toDisplayName = (firstName?: string, lastName?: string) => {\n const first = firstName?.trim();\n const last = lastName?.trim();\n if (first && last) return `${ first } ${ last }`;\n return first || last || undefined;\n };\n\n return duties\n .map((duty): CoreTypes.MixedWithoutInternalId.Teacher => {\n const person = duty._embedded?.person ?? duty.person;\n const displayName = duty.displayName\n ?? toDisplayName(person?.givenName, person?.familyName)\n ?? person?.displayName;\n\n return ({\n ids: duty.id,\n displayName: displayName,\n signature: duty.signature,\n ...(duty.person || duty._embedded?.person) && {\n person: {\n type: 'Teacher',\n ...duty.person && { ids: duty.person.id },\n ...duty._embedded?.person && omit(toPerson([ duty._embedded.person ])[0], 'type')\n }\n }\n });\n });\n};\n"],"mappings":";;;;AAKA,sBAAgB,WAAmB;AACjC,KAAI,CAAC,MAAM,QAAQ,OAAO,CACxB,OAAM,IAAI,MAAM,8DAA8D,EAAE,OAAO,iBAAiB,CAAC;CAE3G,MAAM,iBAAiB,WAAoB,aAAsB;EAC/D,MAAM,QAAQ,WAAW,MAAM;EAC/B,MAAM,OAAO,UAAU,MAAM;AAC7B,MAAI,SAAS,KAAM,QAAO,GAAI,MAAO,GAAI;AACzC,SAAO,SAAS,QAAQ;;AAG1B,QAAO,OACJ,KAAK,SAAmD;EACvD,MAAM,SAAS,KAAK,WAAW,UAAU,KAAK;EAC9C,MAAM,cAAc,KAAK,eACpB,cAAc,QAAQ,WAAW,QAAQ,WAAW,IACpD,QAAQ;AAEb,SAAQ;GACN,KAAa,KAAK;GACL;GACb,WAAa,KAAK;GAClB,IAAI,KAAK,UAAU,KAAK,WAAW,WAAW,EAC5C,QAAQ;IACN,MAAM;IACN,GAAG,KAAK,UAAU,EAAE,KAAK,KAAK,OAAO,IAAI;IACzC,GAAG,KAAK,WAAW,UAAU,KAAKA,gBAAS,CAAE,KAAK,UAAU,OAAQ,CAAC,CAAC,IAAI,OAAO;IAClF,EACF;GACF;GACD"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { BaseOptions } from "../../../common/types.js";
|
|
2
2
|
import { Types } from "../../../core/types/index.js";
|
|
3
3
|
import "../../../index.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as xlsx0 from "xlsx";
|
|
5
5
|
|
|
6
6
|
//#region src/SchoolSoft/file/to/index.d.ts
|
|
7
7
|
declare class export_default {
|
|
8
8
|
static schedules: (schedule: Types.Mixed.Schedule & {
|
|
9
9
|
division?: Types.Mixed.Division;
|
|
10
|
-
}, options?: BaseOptions) =>
|
|
10
|
+
}, options?: BaseOptions) => xlsx0.WorkBook;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
export { export_default };
|