@royalschedule/maps 4.0.2 → 4.0.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.
- package/dist/core/to/exceptions.js +5 -3
- package/dist/core/to/exceptions.js.map +1 -1
- package/dist/core/to/groups.js +4 -1
- package/dist/core/to/groups.js.map +1 -1
- package/dist/core/to/locations.js +4 -1
- package/dist/core/to/locations.js.map +1 -1
- package/dist/core/to/settings.js +4 -1
- package/dist/core/to/settings.js.map +1 -1
- package/dist/core/types/exceptions.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7,8 +7,7 @@ var exceptions_default = (exceptions, options) => {
|
|
|
7
7
|
const edges = {
|
|
8
8
|
exception: x.exception ? {
|
|
9
9
|
...x.exception,
|
|
10
|
-
|
|
11
|
-
to: getVertexId(x.exception.to, options)
|
|
10
|
+
...x.exception.to && { to: getVertexId(x.exception.to, options) }
|
|
12
11
|
} : void 0,
|
|
13
12
|
sources: x.sources?.map((x$1) => ({
|
|
14
13
|
toModel: x$1.toModel,
|
|
@@ -18,7 +17,10 @@ var exceptions_default = (exceptions, options) => {
|
|
|
18
17
|
parentExceptions: x.parentExceptions?.map((x$1) => getVertexId(x$1, options))
|
|
19
18
|
};
|
|
20
19
|
const nonEdges = internalKeysOmitted(x, edges);
|
|
21
|
-
|
|
20
|
+
return {
|
|
21
|
+
...nonEdges,
|
|
22
|
+
...edges
|
|
23
|
+
};
|
|
22
24
|
});
|
|
23
25
|
};
|
|
24
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exceptions.js","names":["edges: SerializedEdges<Types.exception>","x"],"sources":["../../../src/core/to/exceptions.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { internalKeysOmitted } from './util';\nimport type { SerializedEdges, SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\n\nexport default (\n exceptions: Types.mixed.exception[],\n options: BaseOptions\n): OutTypes.exception[] => {\n return exceptions\n .map(x => {\n const edges: SerializedEdges<Types.exception> = {\n exception: x.exception\n ? {\n ...x.exception, // typing is not correct, need to be fixed!\n
|
|
1
|
+
{"version":3,"file":"exceptions.js","names":["edges: SerializedEdges<Types.exception>","x"],"sources":["../../../src/core/to/exceptions.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { internalKeysOmitted } from './util';\nimport type { SerializedEdges, SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\nimport type { Collection } from '../types/common';\n\nexport default (\n exceptions: Types.mixed.exception[],\n options: BaseOptions\n): OutTypes.exception[] => {\n return exceptions\n .map(x => {\n const edges: SerializedEdges<Types.exception> = {\n exception: x.exception\n ? {\n ...x.exception, // typing is not correct, need to be fixed!\n ...x.exception.to && {\n to: getVertexId(x.exception.to, options),\n }\n // SerializedEdges assumes every edge is required, but here it's optional\n } as unknown as { toModel: Collection; to: string }\n : undefined,\n sources: x.sources ?.map(x => ({ toModel: x.toModel, to: getVertexId(x.to, options) })),\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n parentExceptions: x.parentExceptions?.map(x => getVertexId(x, options)),\n } satisfies SerializedEdgesShape<Types.exception>;\n const nonEdges = internalKeysOmitted(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAQA,0BACE,YACA,YACyB;AACzB,QAAO,WACJ,KAAI,MAAK;EACR,MAAMA,QAA0C;GAC9C,WAAW,EAAE,YACT;IACA,GAAG,EAAE;IACL,GAAG,EAAE,UAAU,MAAM,EACnB,IAAI,YAAY,EAAE,UAAU,IAAI;OAIlC;GACJ,SAAkB,EAAE,SAAkB,KAAI,SAAM;IAAE,SAASC,IAAE;IAAS,IAAI,YAAYA,IAAE,IAAI;;GAC5F,YAAkB,EAAE,YAAkB,KAAI,QAAK,YAAYA,KAAG;GAC9D,kBAAkB,EAAE,kBAAkB,KAAI,QAAK,YAAYA,KAAG;;EAEhE,MAAM,WAAW,oBAAoB,GAAG;AAExC,SAAO;GAAE,GAAG;GAAU,GAAG"}
|
package/dist/core/to/groups.js
CHANGED
|
@@ -14,7 +14,10 @@ var groups_default = (groups, options) => {
|
|
|
14
14
|
subGroups: x.subGroups?.map((x$1) => getVertexId(x$1, options))
|
|
15
15
|
};
|
|
16
16
|
const nonEdges = internalKeysOmitted(x, edges);
|
|
17
|
-
|
|
17
|
+
return {
|
|
18
|
+
...nonEdges,
|
|
19
|
+
...edges
|
|
20
|
+
};
|
|
18
21
|
});
|
|
19
22
|
};
|
|
20
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups.js","names":["edges: SerializedEdges<Types.group>","x"],"sources":["../../../src/core/to/groups.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { internalKeysOmitted } from './util';\nimport type { SerializedEdges, SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\n\nexport default (\n groups: Types.mixed.group[],\n options: BaseOptions\n): OutTypes.group[] => {\n return groups\n .map(x => {\n const edges: SerializedEdges<Types.group> = {\n rootInterval: x.rootInterval ? getVertexId(x.rootInterval, options) : undefined,\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n lockedTimes: x.lockedTimes ?.map(x => getVertexId(x, options)),\n lunch: x.lunch ?.map(x => getVertexId(x, options)),\n members: x.members ?.map(x => getVertexId(x, options)),\n parentGroups: x.parentGroups?.map(x => getVertexId(x, options)),\n subGroups: x.subGroups ?.map(x => getVertexId(x, options)),\n } satisfies SerializedEdgesShape<Types.group>;\n const nonEdges = internalKeysOmitted(x, edges);\n\n
|
|
1
|
+
{"version":3,"file":"groups.js","names":["edges: SerializedEdges<Types.group>","x"],"sources":["../../../src/core/to/groups.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { internalKeysOmitted } from './util';\nimport type { SerializedEdges, SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\n\nexport default (\n groups: Types.mixed.group[],\n options: BaseOptions\n): OutTypes.group[] => {\n return groups\n .map(x => {\n const edges: SerializedEdges<Types.group> = {\n rootInterval: x.rootInterval ? getVertexId(x.rootInterval, options) : undefined,\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n lockedTimes: x.lockedTimes ?.map(x => getVertexId(x, options)),\n lunch: x.lunch ?.map(x => getVertexId(x, options)),\n members: x.members ?.map(x => getVertexId(x, options)),\n parentGroups: x.parentGroups?.map(x => getVertexId(x, options)),\n subGroups: x.subGroups ?.map(x => getVertexId(x, options)),\n } satisfies SerializedEdgesShape<Types.group>;\n const nonEdges = internalKeysOmitted(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,sBACE,QACA,YACqB;AACrB,QAAO,OACJ,KAAI,MAAK;EACR,MAAMA,QAAsC;GAC1C,cAAc,EAAE,eAAe,YAAY,EAAE,cAAc,WAAW;GACtE,YAAc,EAAE,YAAc,KAAI,QAAK,YAAYC,KAAG;GACtD,aAAc,EAAE,aAAc,KAAI,QAAK,YAAYA,KAAG;GACtD,OAAc,EAAE,OAAc,KAAI,QAAK,YAAYA,KAAG;GACtD,SAAc,EAAE,SAAc,KAAI,QAAK,YAAYA,KAAG;GACtD,cAAc,EAAE,cAAc,KAAI,QAAK,YAAYA,KAAG;GACtD,WAAc,EAAE,WAAc,KAAI,QAAK,YAAYA,KAAG;;EAExD,MAAM,WAAW,oBAAoB,GAAG;AAExC,SAAO;GAAE,GAAG;GAAU,GAAG"}
|
|
@@ -10,7 +10,10 @@ var locations_default = (locations, options) => {
|
|
|
10
10
|
lunch: x.lunch?.map((x$1) => getVertexId(x$1, options))
|
|
11
11
|
};
|
|
12
12
|
const nonEdges = internalKeysOmitted(x, edges);
|
|
13
|
-
|
|
13
|
+
return {
|
|
14
|
+
...nonEdges,
|
|
15
|
+
...edges
|
|
16
|
+
};
|
|
14
17
|
});
|
|
15
18
|
};
|
|
16
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locations.js","names":["edges: SerializedEdges<Types.location>","x"],"sources":["../../../src/core/to/locations.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { internalKeysOmitted } from './util';\nimport type { SerializedEdges, SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\n\nexport default (\n locations: Types.mixed.location[],\n options: BaseOptions\n): OutTypes.location[] => {\n return locations\n .map(x => {\n const edges: SerializedEdges<Types.location> = {\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n lockedTimes: x.lockedTimes?.map(x => getVertexId(x, options)),\n lunch: x.lunch ?.map(x => getVertexId(x, options)),\n } satisfies SerializedEdgesShape<Types.location>;\n const nonEdges = internalKeysOmitted(x, edges);\n\n
|
|
1
|
+
{"version":3,"file":"locations.js","names":["edges: SerializedEdges<Types.location>","x"],"sources":["../../../src/core/to/locations.ts"],"sourcesContent":["import type { Types } from '../types';\nimport type { OutTypes } from './schedules';\nimport { getVertexId } from '../util';\nimport { internalKeysOmitted } from './util';\nimport type { SerializedEdges, SerializedEdgesShape } from './util';\nimport type { BaseOptions } from '../../common/types';\n\nexport default (\n locations: Types.mixed.location[],\n options: BaseOptions\n): OutTypes.location[] => {\n return locations\n .map(x => {\n const edges: SerializedEdges<Types.location> = {\n exceptions: x.exceptions ?.map(x => getVertexId(x, options)),\n lockedTimes: x.lockedTimes?.map(x => getVertexId(x, options)),\n lunch: x.lunch ?.map(x => getVertexId(x, options)),\n } satisfies SerializedEdgesShape<Types.location>;\n const nonEdges = internalKeysOmitted(x, edges);\n\n return { ...nonEdges, ...edges };\n });\n};\n"],"mappings":";;;;AAOA,yBACE,WACA,YACwB;AACxB,QAAO,UACJ,KAAI,MAAK;EACR,MAAMA,QAAyC;GAC7C,YAAa,EAAE,YAAa,KAAI,QAAK,YAAYC,KAAG;GACpD,aAAa,EAAE,aAAa,KAAI,QAAK,YAAYA,KAAG;GACpD,OAAa,EAAE,OAAa,KAAI,QAAK,YAAYA,KAAG;;EAEtD,MAAM,WAAW,oBAAoB,GAAG;AAExC,SAAO;GAAE,GAAG;GAAU,GAAG"}
|
package/dist/core/to/settings.js
CHANGED
|
@@ -8,7 +8,10 @@ var settings_default = (settings, options) => {
|
|
|
8
8
|
defaultRootInterval: settings.defaultRootInterval ? getVertexId(settings.defaultRootInterval, options) : void 0
|
|
9
9
|
};
|
|
10
10
|
const nonEdges = internalKeysOmitted(settings, edges);
|
|
11
|
-
|
|
11
|
+
return {
|
|
12
|
+
...nonEdges,
|
|
13
|
+
...edges
|
|
14
|
+
};
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","names":["edges: SerializedEdges<Types.divisionSettings>"],"sources":["../../../src/core/to/settings.ts"],"sourcesContent":["import type { BaseOptions } from '../../common/types';\nimport type { Types } from '../types';\nimport { getVertexId } from '../util';\nimport type { OutTypes } from './schedules';\nimport type { SerializedEdges, SerializedEdgesShape } from './util';\nimport { internalKeysOmitted } from './util';\n\nexport default (\n settings: Types.mixed.divisionSettings,\n options: BaseOptions\n): OutTypes.settings => {\n const edges: SerializedEdges<Types.divisionSettings> = {\n period: settings.period ? getVertexId(settings.period, options) : undefined,\n defaultRootInterval: settings.defaultRootInterval ? getVertexId(settings.defaultRootInterval, options) : undefined,\n } satisfies SerializedEdgesShape<Types.divisionSettings>;\n const nonEdges = internalKeysOmitted(settings, edges);\n\n
|
|
1
|
+
{"version":3,"file":"settings.js","names":["edges: SerializedEdges<Types.divisionSettings>"],"sources":["../../../src/core/to/settings.ts"],"sourcesContent":["import type { BaseOptions } from '../../common/types';\nimport type { Types } from '../types';\nimport { getVertexId } from '../util';\nimport type { OutTypes } from './schedules';\nimport type { SerializedEdges, SerializedEdgesShape } from './util';\nimport { internalKeysOmitted } from './util';\n\nexport default (\n settings: Types.mixed.divisionSettings,\n options: BaseOptions\n): OutTypes.settings => {\n const edges: SerializedEdges<Types.divisionSettings> = {\n period: settings.period ? getVertexId(settings.period, options) : undefined,\n defaultRootInterval: settings.defaultRootInterval ? getVertexId(settings.defaultRootInterval, options) : undefined,\n } satisfies SerializedEdgesShape<Types.divisionSettings>;\n const nonEdges = internalKeysOmitted(settings, edges);\n\n return { ...nonEdges, ...edges };\n};\n"],"mappings":";;;;AAOA,wBACE,UACA,YACsB;CACtB,MAAMA,QAAiD;EACrD,QAAqB,SAAS,SAAsB,YAAY,SAAS,QAAqB,WAAW;EACzG,qBAAqB,SAAS,sBAAsB,YAAY,SAAS,qBAAqB,WAAW;;CAE3G,MAAM,WAAW,oBAAoB,UAAU;AAE/C,QAAO;EAAE,GAAG;EAAU,GAAG"}
|
|
@@ -24,7 +24,7 @@ type Exception = Vertex & {
|
|
|
24
24
|
type?: 'absence' | 'calendar';
|
|
25
25
|
action?: 'cancel' | 'remove' | 'reschedule' | 'add' | 'substitute';
|
|
26
26
|
handleStatus?: ExceptionStatus;
|
|
27
|
-
exception?: _Exception & {
|
|
27
|
+
exception?: Partial<_Exception> & {
|
|
28
28
|
include?: boolean;
|
|
29
29
|
start?: DateType;
|
|
30
30
|
end?: DateType;
|