@elaraai/e3-ui 1.0.94 → 1.0.96
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/src/allocation/adapters.d.ts +159 -0
- package/dist/src/allocation/adapters.d.ts.map +1 -0
- package/dist/src/allocation/adapters.js +241 -0
- package/dist/src/allocation/adapters.js.map +1 -0
- package/dist/src/allocation/functions.d.ts +664 -0
- package/dist/src/allocation/functions.d.ts.map +1 -0
- package/dist/src/allocation/functions.js +782 -0
- package/dist/src/allocation/functions.js.map +1 -0
- package/dist/src/allocation/index.d.ts +2985 -0
- package/dist/src/allocation/index.d.ts.map +1 -0
- package/dist/src/allocation/index.js +499 -0
- package/dist/src/allocation/index.js.map +1 -0
- package/dist/src/allocation/types.d.ts +832 -0
- package/dist/src/allocation/types.d.ts.map +1 -0
- package/dist/src/allocation/types.js +360 -0
- package/dist/src/allocation/types.js.map +1 -0
- package/dist/src/bind/func.d.ts +14 -0
- package/dist/src/bind/func.d.ts.map +1 -1
- package/dist/src/bind/func.js +22 -1
- package/dist/src/bind/func.js.map +1 -1
- package/dist/src/calendar/index.d.ts +510 -1639
- package/dist/src/calendar/index.d.ts.map +1 -1
- package/dist/src/calendar/index.js +56 -29
- package/dist/src/calendar/index.js.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +9 -21
- package/dist/src/flowchart/canvas.d.ts.map +1 -1
- package/dist/src/flowchart/canvas.js +10 -22
- package/dist/src/flowchart/canvas.js.map +1 -1
- package/dist/src/flowchart/flowchart.d.ts +19 -13
- package/dist/src/flowchart/flowchart.d.ts.map +1 -1
- package/dist/src/flowchart/flowchart.js.map +1 -1
- package/dist/src/flowchart/index.d.ts +44 -21
- package/dist/src/flowchart/index.d.ts.map +1 -1
- package/dist/src/flowchart/index.js +43 -20
- package/dist/src/flowchart/index.js.map +1 -1
- package/dist/src/flowchart/library.d.ts +166 -81
- package/dist/src/flowchart/library.d.ts.map +1 -1
- package/dist/src/flowchart/library.js +232 -105
- package/dist/src/flowchart/library.js.map +1 -1
- package/dist/src/flowchart/over.d.ts +9 -16
- package/dist/src/flowchart/over.d.ts.map +1 -1
- package/dist/src/flowchart/over.js +9 -16
- package/dist/src/flowchart/over.js.map +1 -1
- package/dist/src/flowchart/payload.d.ts +710 -508
- package/dist/src/flowchart/payload.d.ts.map +1 -1
- package/dist/src/flowchart/payload.js +128 -74
- package/dist/src/flowchart/payload.js.map +1 -1
- package/dist/src/flowchart/window.d.ts +132 -347
- package/dist/src/flowchart/window.d.ts.map +1 -1
- package/dist/src/flowchart/window.js +48 -55
- package/dist/src/flowchart/window.js.map +1 -1
- package/dist/src/index.d.ts +11 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +14 -6
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +18 -7
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +28 -9
- package/dist/src/internal.js.map +1 -1
- package/dist/src/plan/event-rows.d.ts +26 -10
- package/dist/src/plan/event-rows.d.ts.map +1 -1
- package/dist/src/plan/event-rows.js +39 -13
- package/dist/src/plan/event-rows.js.map +1 -1
- package/dist/src/plan/ir.d.ts +244 -815
- package/dist/src/plan/ir.d.ts.map +1 -1
- package/dist/src/plan/ir.js +8 -6
- package/dist/src/plan/ir.js.map +1 -1
- package/dist/src/plan/library.d.ts +3 -0
- package/dist/src/plan/library.d.ts.map +1 -1
- package/dist/src/plan/library.js +1 -1
- package/dist/src/plan/library.js.map +1 -1
- package/dist/src/plan/ordered-source.d.ts +1 -0
- package/dist/src/plan/ordered-source.d.ts.map +1 -1
- package/dist/src/plan/plan.d.ts +559 -1667
- package/dist/src/plan/plan.d.ts.map +1 -1
- package/dist/src/plan/plan.js +123 -45
- package/dist/src/plan/plan.js.map +1 -1
- package/dist/src/plan/root.d.ts +16 -20
- package/dist/src/plan/root.d.ts.map +1 -1
- package/dist/src/plan/root.js +23 -33
- package/dist/src/plan/root.js.map +1 -1
- package/dist/src/roster/coverage.d.ts +17 -231
- package/dist/src/roster/coverage.d.ts.map +1 -1
- package/dist/src/roster/coverage.js +94 -90
- package/dist/src/roster/coverage.js.map +1 -1
- package/dist/src/roster/fit.d.ts +59 -0
- package/dist/src/roster/fit.d.ts.map +1 -0
- package/dist/src/roster/fit.js +155 -0
- package/dist/src/roster/fit.js.map +1 -0
- package/dist/src/roster/index.d.ts +2862 -3662
- package/dist/src/roster/index.d.ts.map +1 -1
- package/dist/src/roster/index.js +383 -81
- package/dist/src/roster/index.js.map +1 -1
- package/dist/src/roster/library.d.ts +37 -92
- package/dist/src/roster/library.d.ts.map +1 -1
- package/dist/src/roster/library.js +25 -64
- package/dist/src/roster/library.js.map +1 -1
- package/dist/src/roster/lists.d.ts +195 -0
- package/dist/src/roster/lists.d.ts.map +1 -0
- package/dist/src/roster/lists.js +233 -0
- package/dist/src/roster/lists.js.map +1 -0
- package/dist/src/roster/rules.d.ts +17 -260
- package/dist/src/roster/rules.d.ts.map +1 -1
- package/dist/src/roster/rules.js +135 -132
- package/dist/src/roster/rules.js.map +1 -1
- package/dist/src/roster/targets.d.ts +115 -0
- package/dist/src/roster/targets.d.ts.map +1 -0
- package/dist/src/roster/targets.js +213 -0
- package/dist/src/roster/targets.js.map +1 -0
- package/dist/src/roster/times.d.ts +251 -0
- package/dist/src/roster/times.d.ts.map +1 -0
- package/dist/src/roster/times.js +174 -0
- package/dist/src/roster/times.js.map +1 -0
- package/dist/src/roster/types.d.ts +828 -183
- package/dist/src/roster/types.d.ts.map +1 -1
- package/dist/src/roster/types.js +224 -97
- package/dist/src/roster/types.js.map +1 -1
- package/dist/src/schedule/accessor.d.ts +28 -0
- package/dist/src/schedule/accessor.d.ts.map +1 -0
- package/dist/src/schedule/accessor.js +39 -0
- package/dist/src/schedule/accessor.js.map +1 -0
- package/dist/src/schedule/events.d.ts +170 -42
- package/dist/src/schedule/events.d.ts.map +1 -1
- package/dist/src/schedule/events.js +431 -171
- package/dist/src/schedule/events.js.map +1 -1
- package/dist/src/schedule/index.d.ts +41 -4
- package/dist/src/schedule/index.d.ts.map +1 -1
- package/dist/src/schedule/index.js +35 -3
- package/dist/src/schedule/index.js.map +1 -1
- package/dist/src/schedule/library.d.ts +13 -3
- package/dist/src/schedule/library.d.ts.map +1 -1
- package/dist/src/schedule/library.js +11 -4
- package/dist/src/schedule/library.js.map +1 -1
- package/dist/src/schedule/periods.d.ts +115 -0
- package/dist/src/schedule/periods.d.ts.map +1 -0
- package/dist/src/schedule/periods.js +215 -0
- package/dist/src/schedule/periods.js.map +1 -0
- package/dist/src/schedule/record-window.d.ts +25 -3
- package/dist/src/schedule/record-window.d.ts.map +1 -1
- package/dist/src/schedule/record-window.js +31 -18
- package/dist/src/schedule/record-window.js.map +1 -1
- package/dist/src/schedule/resources.d.ts +82 -4
- package/dist/src/schedule/resources.d.ts.map +1 -1
- package/dist/src/schedule/resources.js +44 -14
- package/dist/src/schedule/resources.js.map +1 -1
- package/dist/src/schedule/session.d.ts +69 -0
- package/dist/src/schedule/session.d.ts.map +1 -0
- package/dist/src/schedule/session.js +121 -0
- package/dist/src/schedule/session.js.map +1 -0
- package/dist/src/schedule/templates.d.ts +14 -2
- package/dist/src/schedule/templates.d.ts.map +1 -1
- package/dist/src/schedule/templates.js +5 -3
- package/dist/src/schedule/templates.js.map +1 -1
- package/dist/src/schedule/types.d.ts +1671 -37
- package/dist/src/schedule/types.d.ts.map +1 -1
- package/dist/src/schedule/types.js +196 -5
- package/dist/src/schedule/types.js.map +1 -1
- package/dist/src/schedule/window.d.ts +14 -0
- package/dist/src/schedule/window.d.ts.map +1 -1
- package/dist/src/schedule/window.js +14 -4
- package/dist/src/schedule/window.js.map +1 -1
- package/dist/src/schedule/words.d.ts +22 -0
- package/dist/src/schedule/words.d.ts.map +1 -0
- package/dist/src/schedule/words.js +25 -0
- package/dist/src/schedule/words.js.map +1 -0
- package/dist/src/sheet/index.d.ts +61 -27
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/index.js +59 -25
- package/dist/src/sheet/index.js.map +1 -1
- package/dist/src/sheet/library.d.ts +21 -3
- package/dist/src/sheet/library.d.ts.map +1 -1
- package/dist/src/sheet/library.js +23 -6
- package/dist/src/sheet/library.js.map +1 -1
- package/dist/src/sheet/registers.d.ts +100 -85
- package/dist/src/sheet/registers.d.ts.map +1 -1
- package/dist/src/sheet/registers.js +100 -85
- package/dist/src/sheet/registers.js.map +1 -1
- package/dist/src/sheet/root.d.ts +8 -12
- package/dist/src/sheet/root.d.ts.map +1 -1
- package/dist/src/sheet/root.js +6 -40
- package/dist/src/sheet/root.js.map +1 -1
- package/dist/src/sheet/sheet.d.ts +598 -2349
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +124 -37
- package/dist/src/sheet/sheet.js.map +1 -1
- package/dist/src/sheet/sub-rows.d.ts +74 -28
- package/dist/src/sheet/sub-rows.d.ts.map +1 -1
- package/dist/src/sheet/sub-rows.js +74 -28
- package/dist/src/sheet/sub-rows.js.map +1 -1
- package/dist/src/sheet/templates.d.ts +98 -34
- package/dist/src/sheet/templates.d.ts.map +1 -1
- package/dist/src/sheet/templates.js +102 -58
- package/dist/src/sheet/templates.js.map +1 -1
- package/dist/src/sheet/types.d.ts +289 -1359
- package/dist/src/sheet/types.d.ts.map +1 -1
- package/dist/src/sheet/types.js +20 -26
- package/dist/src/sheet/types.js.map +1 -1
- package/dist/src/sheet/views.d.ts +10 -11
- package/dist/src/sheet/views.d.ts.map +1 -1
- package/dist/src/sheet/views.js +15 -20
- package/dist/src/sheet/views.js.map +1 -1
- package/dist/src/{roster/visibility.d.ts → utils/key-visibility.d.ts} +42 -7
- package/dist/src/utils/key-visibility.d.ts.map +1 -0
- package/dist/src/utils/key-visibility.js +36 -0
- package/dist/src/utils/key-visibility.js.map +1 -0
- package/dist/src/utils/ordered-source.d.ts +1 -0
- package/dist/src/utils/ordered-source.d.ts.map +1 -1
- package/dist/src/utils/ordered-source.js +8 -3
- package/dist/src/utils/ordered-source.js.map +1 -1
- package/dist/src/utils/record-sources.d.ts +107 -0
- package/dist/src/utils/record-sources.d.ts.map +1 -0
- package/dist/src/utils/record-sources.js +132 -0
- package/dist/src/utils/record-sources.js.map +1 -0
- package/dist/test/allocation/allocation.examples.d.ts +2902 -0
- package/dist/test/allocation/allocation.examples.d.ts.map +1 -0
- package/dist/test/allocation/allocation.examples.js +643 -0
- package/dist/test/allocation/allocation.examples.js.map +1 -0
- package/dist/test/allocation/fit.examples.d.ts +546 -0
- package/dist/test/allocation/fit.examples.d.ts.map +1 -0
- package/dist/test/allocation/fit.examples.js +171 -0
- package/dist/test/allocation/fit.examples.js.map +1 -0
- package/dist/test/allocation/kiln-yard.d.ts +181 -0
- package/dist/test/allocation/kiln-yard.d.ts.map +1 -0
- package/dist/test/allocation/kiln-yard.js +228 -0
- package/dist/test/allocation/kiln-yard.js.map +1 -0
- package/dist/test/bind/data/data.examples.d.ts +651 -1
- package/dist/test/bind/data/data.examples.d.ts.map +1 -1
- package/dist/test/bind/data/data.examples.js +140 -2
- package/dist/test/bind/data/data.examples.js.map +1 -1
- package/dist/test/bind/func/func.examples.d.ts +10 -1
- package/dist/test/bind/func/func.examples.d.ts.map +1 -1
- package/dist/test/bind/func/func.examples.js +8 -1
- package/dist/test/bind/func/func.examples.js.map +1 -1
- package/dist/test/bind/record/record.examples.d.ts +633 -1
- package/dist/test/bind/record/record.examples.d.ts.map +1 -1
- package/dist/test/bind/record/record.examples.js +26 -2
- package/dist/test/bind/record/record.examples.js.map +1 -1
- package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar-records.examples.js +18 -14
- package/dist/test/calendar/calendar-records.examples.js.map +1 -1
- package/dist/test/calendar/calendar.examples.d.ts +521 -16
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar.examples.js +182 -135
- package/dist/test/calendar/calendar.examples.js.map +1 -1
- package/dist/test/examples-package.d.ts +75 -0
- package/dist/test/examples-package.d.ts.map +1 -0
- package/dist/test/examples-package.js +263 -0
- package/dist/test/examples-package.js.map +1 -0
- package/dist/test/flowchart/flowchart.examples.d.ts +211 -19
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
- package/dist/test/flowchart/flowchart.examples.js +102 -75
- package/dist/test/flowchart/flowchart.examples.js.map +1 -1
- package/dist/test/plan/plan-events.examples.d.ts +1439 -209
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-events.examples.js +199 -59
- package/dist/test/plan/plan-events.examples.js.map +1 -1
- package/dist/test/plan/plan-records.examples.d.ts +420 -0
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-records.examples.js +70 -19
- package/dist/test/plan/plan-records.examples.js.map +1 -1
- package/dist/test/plan/plan-windows.examples.d.ts +636 -55
- package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-windows.examples.js +69 -33
- package/dist/test/plan/plan-windows.examples.js.map +1 -1
- package/dist/test/plan/plan.examples.d.ts +153 -31
- package/dist/test/plan/plan.examples.d.ts.map +1 -1
- package/dist/test/plan/plan.examples.js +178 -101
- package/dist/test/plan/plan.examples.js.map +1 -1
- package/dist/test/roster/domain.examples.d.ts +467 -250
- package/dist/test/roster/domain.examples.d.ts.map +1 -1
- package/dist/test/roster/domain.examples.js +92 -29
- package/dist/test/roster/domain.examples.js.map +1 -1
- package/dist/test/roster/roster-records.examples.d.ts +430 -586
- package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
- package/dist/test/roster/roster-records.examples.js +102 -43
- package/dist/test/roster/roster-records.examples.js.map +1 -1
- package/dist/test/roster/roster.examples.d.ts +2319 -606
- package/dist/test/roster/roster.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.js +456 -148
- package/dist/test/roster/roster.examples.js.map +1 -1
- package/dist/test/roster/warehouse.d.ts +172 -63
- package/dist/test/roster/warehouse.d.ts.map +1 -1
- package/dist/test/roster/warehouse.js +172 -39
- package/dist/test/roster/warehouse.js.map +1 -1
- package/dist/test/schedule/schedule.examples.d.ts +3499 -0
- package/dist/test/schedule/schedule.examples.d.ts.map +1 -0
- package/dist/test/schedule/schedule.examples.js +192 -0
- package/dist/test/schedule/schedule.examples.js.map +1 -0
- package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet-records.examples.js +22 -18
- package/dist/test/sheet/sheet-records.examples.js.map +1 -1
- package/dist/test/sheet/sheet.examples.d.ts +715 -26
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet.examples.js +204 -130
- package/dist/test/sheet/sheet.examples.js.map +1 -1
- package/package.json +17 -10
- package/dist/src/roster/people.d.ts +0 -50
- package/dist/src/roster/people.d.ts.map +0 -1
- package/dist/src/roster/people.js +0 -32
- package/dist/src/roster/people.js.map +0 -1
- package/dist/src/roster/visibility.d.ts.map +0 -1
- package/dist/src/roster/visibility.js +0 -25
- package/dist/src/roster/visibility.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/roster/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/roster/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AAEH,OAAO,EACH,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAgB,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EACtH,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,QAAQ,EAC1E,MAAM,eAAe,CAAC;AAOvB;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;;EAAyE,CAAC;AACrG,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC;AACjE;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0G,CAAC;AAC3I,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC"}
|
package/dist/src/roster/types.js
CHANGED
|
@@ -2,39 +2,52 @@
|
|
|
2
2
|
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
3
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The Roster's East types (#1368, `Builder Interfaces Spec.md` §5.3). A week
|
|
7
|
+
* is the Roster's reading of the app's own rows — each duty the app's row,
|
|
8
|
+
* with the roles the Roster reads from it — carried in the fit's, the pay's
|
|
9
|
+
* and the check's requests and in the renderer, and stored nowhere. The types
|
|
10
|
+
* over a week take the app's duty row type, `R`: each is a constructor, and
|
|
11
|
+
* the same `R` gives the same East type (`isTypeEqual`).
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
import { ArrayType, BlobType, BooleanType, DateTimeType, DictType, EastTypeType, FloatType, FunctionType, IntegerType, NullType, OptionType, SetType, StringType, StructType, VariantType, } from "@elaraai/east";
|
|
16
|
+
import { RecordCommitInfoType } from "@elaraai/e3-types";
|
|
6
17
|
import { StatusTokenType } from "@elaraai/east-ui";
|
|
7
|
-
import {
|
|
18
|
+
import { EditingType } from "@elaraai/east-ui/internal";
|
|
19
|
+
import { RowInspectorType } from "../utils/row-inspector.js";
|
|
20
|
+
import { ScheduleClockType, ScheduleEntriesType, ScheduleFitType, SchedulePeriodStatusType, ScheduleRefusalType } from "../schedule/types.js";
|
|
8
21
|
/**
|
|
9
|
-
* One shift of one group on one day
|
|
22
|
+
* One shift of one group on one day of the week.
|
|
10
23
|
* @remarks Slot keys compare by East value, including when decoded in the browser.
|
|
11
|
-
* @property day - Day within the week, from zero to six
|
|
24
|
+
* @property day - Day within the week, from zero to six: the duty's day (§5.5, rule 1) less the week's first
|
|
12
25
|
* @property group - Group key
|
|
13
26
|
* @property shift - Shift key
|
|
14
27
|
*/
|
|
15
28
|
export const RosterSlotType = StructType({ day: IntegerType, group: StringType, shift: StringType });
|
|
16
29
|
/**
|
|
17
|
-
*
|
|
30
|
+
* Who a duty is: a person, or an agency asked to send someone.
|
|
18
31
|
* @remarks Requests reserve positions without pretending an agency has supplied a named person.
|
|
19
|
-
* @property person - The
|
|
20
|
-
* @property request - The agency
|
|
32
|
+
* @property person - The person's key, of the `people` resource kind
|
|
33
|
+
* @property request - The agency's key, of the `agencies` resource kind
|
|
21
34
|
*/
|
|
22
35
|
export const RosterWhoType = VariantType({ person: StringType, request: StringType });
|
|
23
36
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* @
|
|
28
|
-
* @
|
|
29
|
-
* @
|
|
30
|
-
* @
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
37
|
+
* One duty, as the Roster reads it from the app's row (`R`): its slot, who it
|
|
38
|
+
* is, and its roles, beside the row itself, every field of it.
|
|
39
|
+
*
|
|
40
|
+
* @typeParam R - The app's duty row type
|
|
41
|
+
* @param row - The app's duty row type
|
|
42
|
+
* @returns The assignment type over it
|
|
43
|
+
* @remarks Its times are the duty's own; the Roster gives them no name and no worth (§5.5). Its `hours` are what the duty counts.
|
|
44
|
+
*/
|
|
45
|
+
export function RosterAssignmentTypeFor(row) {
|
|
46
|
+
return StructType({
|
|
47
|
+
slot: RosterSlotType, who: RosterWhoType, position: StringType, activity: OptionType(StringType),
|
|
48
|
+
start: DateTimeType, end: DateTimeType, hours: FloatType, row,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
38
51
|
/**
|
|
39
52
|
* A slot's staffing and work targets.
|
|
40
53
|
* @remarks A duty needs assigned hours, whereas a skill also has holder capacity.
|
|
@@ -45,50 +58,61 @@ export const RosterRequirementType = StructType({ positions: IntegerType, hours:
|
|
|
45
58
|
/** Targets keyed by the complete slot. @remarks Use East's comparator for these struct keys. */
|
|
46
59
|
export const RosterRequirementsType = DictType(RosterSlotType, RosterRequirementType);
|
|
47
60
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
61
|
+
* A week's status: Schedule's period status, read from the app's weeks record
|
|
62
|
+
* (`Schedule.periods`).
|
|
50
63
|
* @property draft - An editable week
|
|
51
|
-
* @property published - A read-only week and
|
|
64
|
+
* @property published - A read-only week, and when it was published when the app's published case holds the time
|
|
65
|
+
* @property other - Another case of the app's status, by its name: read-only
|
|
52
66
|
*/
|
|
53
|
-
export const RosterStatusType =
|
|
67
|
+
export const RosterStatusType = SchedulePeriodStatusType;
|
|
54
68
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* @
|
|
58
|
-
* @
|
|
59
|
-
* @
|
|
60
|
-
* @
|
|
69
|
+
* One week of the app's rows, as the Roster reads them.
|
|
70
|
+
*
|
|
71
|
+
* @typeParam R - The app's duty row type
|
|
72
|
+
* @param row - The app's duty row type
|
|
73
|
+
* @returns The week type over it
|
|
74
|
+
* @remarks Its assignments are the week's duties by their keys; its requirements the app's targets by slot; its status and its dismissals the app's week row's.
|
|
61
75
|
*/
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
export function RosterWeekTypeFor(row) {
|
|
77
|
+
return StructType({
|
|
78
|
+
status: RosterStatusType, assignments: DictType(StringType, RosterAssignmentTypeFor(row)),
|
|
79
|
+
requirements: RosterRequirementsType, dismissed: SetType(StringType),
|
|
80
|
+
});
|
|
81
|
+
}
|
|
68
82
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* @
|
|
83
|
+
* One row of an activities record, keyed by the activity's key: a skill of one
|
|
84
|
+
* group, or a duty of none, which every group may assign (#1342).
|
|
85
|
+
* @remarks `Roster.activities` reads a record of these, or of the app's own rows through its accessors.
|
|
86
|
+
* @property label - Display name
|
|
87
|
+
* @property code - Short code on assignment chips
|
|
88
|
+
* @property group - The group whose skill it is; none, a duty every group shares
|
|
89
|
+
*/
|
|
90
|
+
export const RosterActivityType = StructType({ label: StringType, code: StringType, group: OptionType(StringType) });
|
|
91
|
+
/**
|
|
92
|
+
* An activity resolved from the author's keyed activities: a skill within a
|
|
93
|
+
* group, or a duty available to every group.
|
|
94
|
+
* @remarks Keys are unique across all skills and duties: they are the activities record's keys.
|
|
95
|
+
* @property key - Stable identifier: its key in the activities record
|
|
72
96
|
* @property label - Display name
|
|
73
97
|
* @property code - Short code on assignment chips
|
|
98
|
+
* @property group - The group whose skill it is; none, a duty
|
|
74
99
|
*/
|
|
75
|
-
export const RosterSkillType = StructType({ key: StringType, label: StringType, code: StringType });
|
|
100
|
+
export const RosterSkillType = StructType({ key: StringType, label: StringType, code: StringType, group: OptionType(StringType) });
|
|
76
101
|
/**
|
|
77
|
-
* A group of people
|
|
102
|
+
* A group of people. Its skills are the activities of that group.
|
|
78
103
|
* @remarks The array order controls the grid and library order.
|
|
79
104
|
* @property key - Stable identifier
|
|
80
105
|
* @property label - Display name
|
|
81
|
-
* @property skills - Skills in display order
|
|
82
106
|
*/
|
|
83
|
-
export const RosterGroupType = StructType({ key: StringType, label: StringType
|
|
107
|
+
export const RosterGroupType = StructType({ key: StringType, label: StringType });
|
|
84
108
|
/**
|
|
85
|
-
* A recurring shift's
|
|
86
|
-
* @remarks An end past midnight belongs to the following day;
|
|
109
|
+
* A recurring shift's start and nominal hours.
|
|
110
|
+
* @remarks An end past midnight belongs to the following day; a duty still belongs to its shift's start day.
|
|
87
111
|
* @property key - Stable identifier
|
|
88
112
|
* @property label - Display name
|
|
89
113
|
* @property code - Short code in the week layout
|
|
90
114
|
* @property start - Start time in UTC, shared with Schedule
|
|
91
|
-
* @property hours - Nominal shift duration
|
|
115
|
+
* @property hours - Nominal shift duration: what a new duty runs, and a skill holder's capacity
|
|
92
116
|
*/
|
|
93
117
|
export const RosterShiftType = StructType({
|
|
94
118
|
key: StringType, label: StringType, code: StringType, start: ScheduleClockType, hours: FloatType,
|
|
@@ -105,13 +129,13 @@ export const RosterPositionType = StructType({ key: StringType, label: StringTyp
|
|
|
105
129
|
/**
|
|
106
130
|
* An agency from which positions may be requested.
|
|
107
131
|
* @remarks The first agency supplies the suggested open-position fix.
|
|
108
|
-
* @property key - Stable identifier
|
|
132
|
+
* @property key - Stable identifier: its key in the `agencies` resource kind
|
|
109
133
|
* @property name - Display name
|
|
110
134
|
*/
|
|
111
135
|
export const RosterAgencyType = StructType({ key: StringType, name: StringType });
|
|
112
136
|
/**
|
|
113
|
-
* A person resolved from the
|
|
114
|
-
* @remarks Roster reads staff;
|
|
137
|
+
* A person resolved from the app's staff rows (the `people` resource kind).
|
|
138
|
+
* @remarks Roster reads staff; it never writes them.
|
|
115
139
|
* @property key - Original staff key
|
|
116
140
|
* @property name - Display name
|
|
117
141
|
* @property group - Home group
|
|
@@ -130,39 +154,27 @@ export const RosterPersonType = StructType({
|
|
|
130
154
|
/**
|
|
131
155
|
* Built-in checks enabled for the roster.
|
|
132
156
|
* @remarks Rest reads this week only; double booking is always reported.
|
|
133
|
-
* @property rest - Minimum hours between
|
|
157
|
+
* @property rest - Minimum hours between duties; zero disables the rest check
|
|
134
158
|
* @property lead - Check staffed slots for a lead
|
|
135
159
|
* @property trainer - Check trainees have a trainer
|
|
136
160
|
* @property skill - Check activities against held skills
|
|
137
|
-
* @property agree - Report unagreed changed hours
|
|
138
161
|
*/
|
|
139
|
-
export const RosterRulesType = StructType({ rest: FloatType, lead: BooleanType, trainer: BooleanType, skill: BooleanType
|
|
140
|
-
/**
|
|
141
|
-
* Optional costing configuration.
|
|
142
|
-
* @remarks Omitting costs hides monetary readouts; it does not affect staffing checks.
|
|
143
|
-
* @property currency - Currency identifier for the shared formatter
|
|
144
|
-
* @property rates - Permanent, overtime and agency hourly rates
|
|
145
|
-
* @property budget - Daily budget, or none
|
|
146
|
-
*/
|
|
147
|
-
export const RosterCostsType = StructType({
|
|
148
|
-
currency: StringType, rates: StructType({ permanent: FloatType, overtime: FloatType, agency: FloatType }), budget: OptionType(FloatType),
|
|
149
|
-
});
|
|
162
|
+
export const RosterRulesType = StructType({ rest: FloatType, lead: BooleanType, trainer: BooleanType, skill: BooleanType });
|
|
150
163
|
/**
|
|
151
164
|
* Complete reference data used by coverage and checks.
|
|
152
|
-
* @remarks Visibility filters never remove people from this context.
|
|
165
|
+
* @remarks Visibility filters never remove people or activities from this context.
|
|
153
166
|
* @property people - All resolved staff by original key
|
|
154
|
-
* @property groups - Groups
|
|
155
|
-
* @property
|
|
167
|
+
* @property groups - Groups
|
|
168
|
+
* @property activities - Every activity: each group's skills, and the duties of no group
|
|
156
169
|
* @property shifts - Shift definitions
|
|
157
170
|
* @property positions - Position definitions
|
|
158
171
|
* @property agencies - Agencies available for gap fixes
|
|
159
172
|
* @property rules - Enabled rules
|
|
160
|
-
* @property costs - Optional monetary configuration
|
|
161
173
|
*/
|
|
162
174
|
export const RosterContextType = StructType({
|
|
163
|
-
people: DictType(StringType, RosterPersonType), groups: ArrayType(RosterGroupType),
|
|
175
|
+
people: DictType(StringType, RosterPersonType), groups: ArrayType(RosterGroupType), activities: ArrayType(RosterSkillType),
|
|
164
176
|
shifts: ArrayType(RosterShiftType), positions: ArrayType(RosterPositionType), agencies: ArrayType(RosterAgencyType),
|
|
165
|
-
rules: RosterRulesType,
|
|
177
|
+
rules: RosterRulesType,
|
|
166
178
|
});
|
|
167
179
|
/**
|
|
168
180
|
* Coverage for one required activity.
|
|
@@ -172,77 +184,192 @@ export const RosterContextType = StructType({
|
|
|
172
184
|
* @property holders - Number of people holding the skill, or none for a duty
|
|
173
185
|
* @property capacity - Nominal hours available from holders, or none for a duty
|
|
174
186
|
* @property gap - Positive shortfall in skill capacity
|
|
175
|
-
* @property assigned - Hours
|
|
187
|
+
* @property assigned - Hours of the duties assigned to this activity
|
|
176
188
|
*/
|
|
177
189
|
export const RosterCoverageLineType = StructType({
|
|
178
190
|
skill: StringType, needed: FloatType, holders: OptionType(IntegerType), capacity: OptionType(FloatType), gap: FloatType, assigned: FloatType,
|
|
179
191
|
});
|
|
180
192
|
/**
|
|
181
|
-
* Staffing, work and
|
|
182
|
-
* @remarks Requests fill positions and contribute
|
|
193
|
+
* Staffing, work and pay for a complete slot.
|
|
194
|
+
* @remarks Requests fill positions and contribute their hours, but never count as named people or skilled holders.
|
|
183
195
|
* @property positions - Required positions
|
|
184
196
|
* @property filled - Assignments including requests
|
|
185
197
|
* @property open - Unfilled positions, at least zero
|
|
186
198
|
* @property people - Named people assigned
|
|
187
|
-
* @property hours - Permanent, agency,
|
|
199
|
+
* @property hours - Permanent, agency, requested, needed and total rostered hours: each duty's hours
|
|
188
200
|
* @property lines - Required skills in group order, then duties
|
|
189
|
-
* @property cost -
|
|
201
|
+
* @property cost - The slot's pay: its duties' costs summed over every code; zero without `pay`
|
|
190
202
|
* @property lead - A named person holds a lead position
|
|
191
203
|
* @property trainer - A trainer is assigned
|
|
192
204
|
*/
|
|
193
205
|
export const RosterCoverageType = StructType({
|
|
194
206
|
positions: IntegerType, filled: IntegerType, open: IntegerType, people: IntegerType,
|
|
195
|
-
hours: StructType({ permanent: FloatType, agency: FloatType,
|
|
207
|
+
hours: StructType({ permanent: FloatType, agency: FloatType, requested: FloatType, needed: FloatType, rostered: FloatType }),
|
|
196
208
|
lines: ArrayType(RosterCoverageLineType), cost: FloatType, lead: BooleanType, trainer: BooleanType,
|
|
197
209
|
});
|
|
198
210
|
/**
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
* @
|
|
202
|
-
* @property
|
|
203
|
-
* @property
|
|
211
|
+
* A suggested placement, as the Roster reads it from the app's rows
|
|
212
|
+
* (`Roster.proposals`).
|
|
213
|
+
* @remarks Acceptance creates a duty; rejection keeps this key in the week's dismissed set.
|
|
214
|
+
* @property key - Its row's key
|
|
215
|
+
* @property day - The day it suggests, a UTC midnight
|
|
216
|
+
* @property group - The group it suggests
|
|
217
|
+
* @property shift - The shift it suggests
|
|
204
218
|
* @property person - Original staff key
|
|
205
219
|
* @property reason - Explanation presented to the planner
|
|
206
220
|
*/
|
|
207
|
-
export const RosterProposalType = StructType({ key: StringType,
|
|
221
|
+
export const RosterProposalType = StructType({ key: StringType, day: DateTimeType, group: StringType, shift: StringType, person: StringType, reason: StringType });
|
|
222
|
+
/**
|
|
223
|
+
* What a Find fix looks for (#1334): what the app's fit is asked who fits.
|
|
224
|
+
* @property leads - Someone in a lead position
|
|
225
|
+
* @property trainers - Someone who trains others
|
|
226
|
+
* @property skill - Someone who holds this skill, by its activity key
|
|
227
|
+
*/
|
|
228
|
+
export const RosterNeedType = VariantType({ leads: NullType, trainers: NullType, skill: StringType });
|
|
208
229
|
/**
|
|
209
230
|
* A corrective action offered for an issue.
|
|
210
|
-
* @remarks Every data-changing action is one gesture of the shared edit
|
|
231
|
+
* @remarks Every data-changing action is one gesture of the shared edit history. A find edits nothing: it asks the app's fit who fits its need on the issue's slot, and is offered only when the Roster has a `fit` (#1334).
|
|
211
232
|
* @property request - Request someone from this agency
|
|
212
|
-
* @property agree - Mark the assignment agreed
|
|
213
233
|
* @property accept - Accept this proposal key
|
|
214
|
-
* @property move - Move the
|
|
215
|
-
* @property start -
|
|
216
|
-
* @property find -
|
|
234
|
+
* @property move - Move the duty to this shift
|
|
235
|
+
* @property start - Move the duty to start at this later time, its length kept
|
|
236
|
+
* @property find - Find who fits this need on the issue's slot: the app's fit's answer, in the People tab
|
|
217
237
|
*/
|
|
218
238
|
export const RosterFixType = VariantType({
|
|
219
|
-
request: StringType,
|
|
220
|
-
find: VariantType({ leads: NullType, trainers: NullType, skill: StringType }),
|
|
239
|
+
request: StringType, accept: StringType, move: StringType, start: DateTimeType, find: RosterNeedType,
|
|
221
240
|
});
|
|
222
241
|
/**
|
|
223
242
|
* One explanation or warning about the drafted roster.
|
|
224
243
|
* @remarks Warnings do not introduce a separate validation barrier to Save or Publish.
|
|
225
|
-
* @property kind - Breach, gap
|
|
244
|
+
* @property kind - Breach, gap or proposal
|
|
226
245
|
* @property tone - Shared semantic tone
|
|
227
246
|
* @property title - Short explanation
|
|
228
247
|
* @property detail - Supporting explanation
|
|
229
248
|
* @property slot - Affected slot, or none
|
|
230
|
-
* @property assignment - Affected
|
|
249
|
+
* @property assignment - Affected duty key, or none
|
|
231
250
|
* @property flag - Short text on a chip, or none
|
|
232
251
|
* @property fix - Offered action, or none
|
|
233
252
|
*/
|
|
234
253
|
export const RosterIssueType = StructType({
|
|
235
|
-
kind: VariantType({ breach: NullType, gap: NullType,
|
|
254
|
+
kind: VariantType({ breach: NullType, gap: NullType, proposal: NullType }),
|
|
236
255
|
tone: StatusTokenType, title: StringType, detail: StringType, slot: OptionType(RosterSlotType),
|
|
237
256
|
assignment: OptionType(StringType), flag: OptionType(StringType), fix: OptionType(RosterFixType),
|
|
238
257
|
});
|
|
258
|
+
/**
|
|
259
|
+
* The app's pay's answer (§5.6): each duty's cost, by its key, in the app's
|
|
260
|
+
* own pay codes.
|
|
261
|
+
* @remarks The Roster knows no pay code in advance: it totals what the app gives, by code and in all.
|
|
262
|
+
*/
|
|
263
|
+
export const RosterPayType = DictType(StringType, DictType(StringType, FloatType));
|
|
264
|
+
/**
|
|
265
|
+
* One question to the app's pay (§5.6): one person's duties for the week, or
|
|
266
|
+
* one agency's requests.
|
|
267
|
+
*
|
|
268
|
+
* @typeParam R - The app's duty row type
|
|
269
|
+
* @param row - The app's duty row type
|
|
270
|
+
* @returns The request type over it
|
|
271
|
+
* @remarks `who` is the person or the agency; `duties` its duties, by key; `context` the complete staff and configuration.
|
|
272
|
+
*/
|
|
273
|
+
export function RosterPayRequestTypeFor(row) {
|
|
274
|
+
return StructType({ who: RosterWhoType, start: DateTimeType, duties: DictType(StringType, RosterAssignmentTypeFor(row)), context: RosterContextType });
|
|
275
|
+
}
|
|
239
276
|
/**
|
|
240
277
|
* Input to an application's additional roster checks.
|
|
241
|
-
*
|
|
242
|
-
* @
|
|
243
|
-
* @
|
|
244
|
-
* @
|
|
245
|
-
* @
|
|
278
|
+
*
|
|
279
|
+
* @typeParam R - The app's duty row type
|
|
280
|
+
* @param row - The app's duty row type
|
|
281
|
+
* @returns The check's context over it
|
|
282
|
+
* @remarks The built-in coverage has already been calculated for the same draft, and so have the pay's costs: `start` the week's first day, `week` the drafted week, `context` the complete reference data, `coverage` every configured slot's, `pay` each duty's costs by code.
|
|
283
|
+
*/
|
|
284
|
+
export function RosterCheckContextTypeFor(row) {
|
|
285
|
+
return StructType({
|
|
286
|
+
start: DateTimeType, week: RosterWeekTypeFor(row), context: RosterContextType,
|
|
287
|
+
coverage: DictType(RosterSlotType, RosterCoverageType), pay: RosterPayType,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
/** Why someone does not fit a need: Schedule's, shared with the Allocation (#1334). */
|
|
291
|
+
export const RosterRefusalType = ScheduleRefusalType;
|
|
292
|
+
/** One verdict of the app's fit: Schedule's, shared with the Allocation — it fits with a score, a reason and a warning, or it is refused (#1334). */
|
|
293
|
+
export const RosterFitType = ScheduleFitType;
|
|
294
|
+
/**
|
|
295
|
+
* One question to the app's fit (#1334): who fits a Find fix's need on its
|
|
296
|
+
* issue's slot, over the drafted week.
|
|
297
|
+
*
|
|
298
|
+
* @typeParam R - The app's duty row type
|
|
299
|
+
* @param row - The app's duty row type
|
|
300
|
+
* @returns The request type over it
|
|
301
|
+
* @remarks `need` what is looked for, `slot` the issue's, `start` the week's first day, `week` the drafted week, `context` the complete staff and configuration — every person, whatever the rail shows — and `coverage` the drafted week's.
|
|
302
|
+
*/
|
|
303
|
+
export function RosterFitRequestTypeFor(row) {
|
|
304
|
+
return StructType({
|
|
305
|
+
need: RosterNeedType, slot: RosterSlotType, start: DateTimeType, week: RosterWeekTypeFor(row), context: RosterContextType,
|
|
306
|
+
coverage: DictType(RosterSlotType, RosterCoverageType),
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Where a duty sits, as the Roster reads it from its roles (§5.5, rules 1 and
|
|
311
|
+
* 8): placed in the week, another week's, or a duty the Roster cannot place —
|
|
312
|
+
* one whose shift or group isn't configured, or that names no one — which it
|
|
313
|
+
* lists in Issues and keeps as stored.
|
|
314
|
+
*
|
|
315
|
+
* @typeParam R - The app's duty row type
|
|
316
|
+
* @param row - The app's duty row type
|
|
317
|
+
* @returns The placement type over it
|
|
318
|
+
* @remarks `placed` the duty as the week holds it; `elsewhere` a duty of another week; `unplaced` the issue that lists it.
|
|
319
|
+
*/
|
|
320
|
+
export function RosterPlacementTypeFor(row) {
|
|
321
|
+
return VariantType({ placed: RosterAssignmentTypeFor(row), elsewhere: NullType, unplaced: RosterIssueType });
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* A target's roles, as the Roster reads them from the app's row
|
|
325
|
+
* (`Roster.targets`): the slot it is for, and what it asks of it.
|
|
326
|
+
* @property day - The day, a UTC midnight
|
|
327
|
+
* @property group - The group's key
|
|
328
|
+
* @property shift - The shift's key
|
|
329
|
+
* @property positions - Positions to fill
|
|
330
|
+
* @property hours - Hours required, by activity key
|
|
331
|
+
*/
|
|
332
|
+
export const RosterTargetRolesType = StructType({
|
|
333
|
+
day: DateTimeType, group: StringType, shift: StringType, positions: IntegerType, hours: DictType(StringType, FloatType),
|
|
334
|
+
});
|
|
335
|
+
/**
|
|
336
|
+
* One stored target, as the targets' `rows` gives it: its roles, read in the
|
|
337
|
+
* pass that reads the row, and the row as bytes at the row type.
|
|
338
|
+
* @property roles - Its roles
|
|
339
|
+
* @property row - Its row, as bytes at the row type
|
|
340
|
+
*/
|
|
341
|
+
export const RosterTargetEntryType = StructType({ roles: RosterTargetRolesType, row: BlobType });
|
|
342
|
+
/**
|
|
343
|
+
* The app's targets, closed (`Roster.targets`): its record of targets, a row
|
|
344
|
+
* per slot, read and written through its roles over bytes, so the Roster's
|
|
345
|
+
* payload is one type whatever the record holds.
|
|
346
|
+
* @property editing - The shared session over the record: whole rows by their key, its patch door
|
|
347
|
+
* @property entries - The record read by key, when it is given `entries`; `none` for a record read whole
|
|
348
|
+
* @property rows - The targets whose day falls in `[from, to)`, by key, each its roles and its row; `none` while a read is in flight
|
|
349
|
+
* @property read - A drafted row's roles, from its bytes
|
|
350
|
+
* @property write - The row with its roles written, and every other field as it was
|
|
351
|
+
* @property create - A new row from the roles, every other field its type's default
|
|
352
|
+
* @property history - The record's commits, newest first
|
|
353
|
+
* @property inspector - The app's own form for one target, over its row as bytes; `none`, the Roster's
|
|
354
|
+
* @property rowType - The row type
|
|
355
|
+
*/
|
|
356
|
+
export const RosterTargetsKindType = StructType({
|
|
357
|
+
editing: EditingType,
|
|
358
|
+
entries: OptionType(ScheduleEntriesType),
|
|
359
|
+
rows: FunctionType([DateTimeType, DateTimeType], OptionType(DictType(StringType, RosterTargetEntryType))),
|
|
360
|
+
read: FunctionType([BlobType], RosterTargetRolesType),
|
|
361
|
+
write: FunctionType([BlobType, RosterTargetRolesType], BlobType),
|
|
362
|
+
create: FunctionType([RosterTargetRolesType], BlobType),
|
|
363
|
+
history: FunctionType([], OptionType(ArrayType(RecordCommitInfoType))),
|
|
364
|
+
inspector: OptionType(RowInspectorType),
|
|
365
|
+
rowType: EastTypeType,
|
|
366
|
+
});
|
|
367
|
+
/**
|
|
368
|
+
* The app's fit's answer (#1334). It echoes its question, so the Roster
|
|
369
|
+
* matches each answer to the question it asked.
|
|
370
|
+
* @property need - The need answered
|
|
371
|
+
* @property slot - The slot answered
|
|
372
|
+
* @property people - A verdict for every person, by staff key; the People tab shows the fits, best first
|
|
246
373
|
*/
|
|
247
|
-
export const
|
|
374
|
+
export const RosterFitResultType = StructType({ need: RosterNeedType, slot: RosterSlotType, people: DictType(StringType, RosterFitType) });
|
|
248
375
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/roster/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/roster/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AAEH,OAAO,EACH,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EACtH,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,GAC3D,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE9I;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AAGrG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,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 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* An accessor of a Schedule declaration, `(row, key) => …`, reified once
|
|
7
|
+
* (#1367): a real East function over the row and its key, which the kind
|
|
8
|
+
* calls per row (`shared/reify.ts`' rule), held to the type it returns. One
|
|
9
|
+
* returning another type is refused at build, naming the accessor and what it
|
|
10
|
+
* returns, rather than in East's own words.
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
import { type EastType, type ExprType, type FunctionType, type SubtypeExprOrValue } from "@elaraai/east";
|
|
15
|
+
/**
|
|
16
|
+
* Reifies an accessor over a row and its key, held to the type it returns.
|
|
17
|
+
*
|
|
18
|
+
* @typeParam T - The type it returns
|
|
19
|
+
* @param rowType - The row type
|
|
20
|
+
* @param keyType - The key type
|
|
21
|
+
* @param out - The type it returns
|
|
22
|
+
* @param accessor - The author's accessor
|
|
23
|
+
* @param refusal - The refusal's words, given what the accessor returns instead, as East prints a type (`.String`)
|
|
24
|
+
* @returns The accessor, an East function `(row, key) => T`
|
|
25
|
+
* @throws {Error} The refusal, for an accessor returning another type; any other error its body throws, as it threw it
|
|
26
|
+
*/
|
|
27
|
+
export declare function scheduleAccessor<T extends EastType>(rowType: EastType, keyType: EastType, out: T, accessor: (row: ExprType<EastType>, key: ExprType<EastType>) => SubtypeExprOrValue<T>, refusal: (returns: string) => string): ExprType<FunctionType<[EastType, EastType], T>>;
|
|
28
|
+
//# sourceMappingURL=accessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessor.d.ts","sourceRoot":"","sources":["../../../src/schedule/accessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAA4C,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnJ;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,QAAQ,EAC/C,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,QAAQ,EACjB,GAAG,EAAE,CAAC,EACN,QAAQ,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,kBAAkB,CAAC,CAAC,CAAC,EACrF,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GACrC,QAAQ,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CASjD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* An accessor of a Schedule declaration, `(row, key) => …`, reified once
|
|
7
|
+
* (#1367): a real East function over the row and its key, which the kind
|
|
8
|
+
* calls per row (`shared/reify.ts`' rule), held to the type it returns. One
|
|
9
|
+
* returning another type is refused at build, naming the accessor and what it
|
|
10
|
+
* returns, rather than in East's own words.
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
import { East, Expr, TypeMismatchError, printType } from "@elaraai/east";
|
|
15
|
+
/**
|
|
16
|
+
* Reifies an accessor over a row and its key, held to the type it returns.
|
|
17
|
+
*
|
|
18
|
+
* @typeParam T - The type it returns
|
|
19
|
+
* @param rowType - The row type
|
|
20
|
+
* @param keyType - The key type
|
|
21
|
+
* @param out - The type it returns
|
|
22
|
+
* @param accessor - The author's accessor
|
|
23
|
+
* @param refusal - The refusal's words, given what the accessor returns instead, as East prints a type (`.String`)
|
|
24
|
+
* @returns The accessor, an East function `(row, key) => T`
|
|
25
|
+
* @throws {Error} The refusal, for an accessor returning another type; any other error its body throws, as it threw it
|
|
26
|
+
*/
|
|
27
|
+
export function scheduleAccessor(rowType, keyType, out, accessor, refusal) {
|
|
28
|
+
try {
|
|
29
|
+
return East.function([rowType, keyType], out, (_$, row, key) => accessor(row, key));
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
if (!(err instanceof TypeMismatchError))
|
|
33
|
+
throw err;
|
|
34
|
+
// What it returns, as East infers it from the accessor's own body.
|
|
35
|
+
const inferred = East.function([rowType, keyType], undefined, (_$, row, key) => accessor(row, key));
|
|
36
|
+
throw new Error(refusal(printType(Expr.type(inferred).output)));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=accessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessor.js","sourceRoot":"","sources":["../../../src/schedule/accessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,SAAS,EAA4E,MAAM,eAAe,CAAC;AAEnJ;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAC5B,OAAiB,EACjB,OAAiB,EACjB,GAAM,EACN,QAAqF,EACrF,OAAoC;IAEpC,IAAI,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAA+D,CAAC;IACtJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,YAAY,iBAAiB,CAAC;YAAE,MAAM,GAAG,CAAC;QACnD,mEAAmE;QACnE,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAuB,CAAC,CAAC;QAC1H,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAE,IAAI,CAAC,IAAI,CAAC,QAA2B,CAAkB,CAAC,MAAkB,CAAC,CAAC,CAAC,CAAC;IACrH,CAAC;AACL,CAAC"}
|