@elaraai/e3-ui 1.0.93 → 1.0.95
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
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
* `Schedule.periods(record, config)` (#1367, `Builder Interfaces Spec.md`
|
|
7
|
+
* §4.3): what a builder publishes — the app's own record of periods, one row
|
|
8
|
+
* of the app's per period, keyed by its start (a UTC midnight: a week's first
|
|
9
|
+
* day by the builder's week start, or a day), its status a variant field of
|
|
10
|
+
* the app's whose cases the builder maps.
|
|
11
|
+
*
|
|
12
|
+
* - **Status.** `status.field` names a variant field of the row, not an
|
|
13
|
+
* Option; `draft` and `published` name two of its cases. The published case
|
|
14
|
+
* holds Null, or `{ at: DateTime }`, the time it was published. A period in
|
|
15
|
+
* any other case is read-only, its chip naming the case; a period with no
|
|
16
|
+
* row is not started.
|
|
17
|
+
* - **Publish** writes the published case, with the time in `at` when the
|
|
18
|
+
* case holds one. A builder saves the period's drafts first, and writes the
|
|
19
|
+
* status only once every session reads back confirmed (§7).
|
|
20
|
+
* - **Dismissed**, the Roster's: a `Set<String>` field, the proposals a week
|
|
21
|
+
* dismissed. Without it the builder dismisses none.
|
|
22
|
+
* - **New rows.** A row the builder creates holds its type's default
|
|
23
|
+
* (`defaultValue`) in every field it doesn't map: its status the published
|
|
24
|
+
* case when it publishes, else the draft case, holding its payload's
|
|
25
|
+
* default.
|
|
26
|
+
* - **Reads.** By key through `entries`, a paged read of the record's own
|
|
27
|
+
* entries — each span the builder reads (its period, the one before it, the
|
|
28
|
+
* open picker's) one key search and one page — or the record whole.
|
|
29
|
+
*
|
|
30
|
+
* The periods are one session of the builder's history (`session.ts`), as
|
|
31
|
+
* each of its event kinds is: Save sends their changes through the record's
|
|
32
|
+
* patch door as a request of their own.
|
|
33
|
+
*
|
|
34
|
+
* @packageDocumentation
|
|
35
|
+
*/
|
|
36
|
+
import { DateTimeType, StructType, type ExprType } from "@elaraai/east";
|
|
37
|
+
import type { ScheduleCaseOf, ScheduleRecordHandle, ScheduleSetStringField, ScheduleStatusField } from "./events.js";
|
|
38
|
+
import { SCHEDULE_DEF } from "./resources.js";
|
|
39
|
+
import { SchedulePeriodsKindType } from "./types.js";
|
|
40
|
+
/**
|
|
41
|
+
* What a builder publishes, declared over the app's record of periods (see
|
|
42
|
+
* the module docs).
|
|
43
|
+
*
|
|
44
|
+
* @typeParam R - The period's row type
|
|
45
|
+
* @typeParam SF - The status field
|
|
46
|
+
*/
|
|
47
|
+
export interface SchedulePeriodsConfig<R extends StructType, SF extends string> {
|
|
48
|
+
/** What a period is: a week from the builder's week start (`"week"`), or a UTC day (`"day"`). */
|
|
49
|
+
every: "week" | "day";
|
|
50
|
+
/** The status: a variant field of the row, and which of its cases are the draft and the published. */
|
|
51
|
+
status: {
|
|
52
|
+
/** The variant field, not an Option. */
|
|
53
|
+
field: SF;
|
|
54
|
+
/** The case a period being planned is in: editable. */
|
|
55
|
+
draft: ScheduleCaseOf<R["fields"][SF]>;
|
|
56
|
+
/** The case Publish writes, read-only: it holds Null, or `{ at: DateTime }`, the time it was published. */
|
|
57
|
+
published: ScheduleCaseOf<R["fields"][SF]>;
|
|
58
|
+
};
|
|
59
|
+
/** The Roster's: the `Set<String>` field holding the proposals a week dismissed. Omitted, the builder dismisses none. */
|
|
60
|
+
dismissed?: ScheduleSetStringField<R>;
|
|
61
|
+
/**
|
|
62
|
+
* A paged read of the record's own entries (`Data.bindPaged(record)`): the periods read by key — the period, the
|
|
63
|
+
* one before it, the open picker's span — never the record whole. Omitted, the record is read whole.
|
|
64
|
+
*/
|
|
65
|
+
entries?: unknown;
|
|
66
|
+
}
|
|
67
|
+
/** What a builder publishes, declared: what its `periods` takes. */
|
|
68
|
+
export interface SchedulePeriods {
|
|
69
|
+
/** What it is. */
|
|
70
|
+
readonly [SCHEDULE_DEF]: "periods";
|
|
71
|
+
/** What a period is. */
|
|
72
|
+
readonly every: "week" | "day";
|
|
73
|
+
/** The period's row type. */
|
|
74
|
+
readonly rowType: StructType;
|
|
75
|
+
/**
|
|
76
|
+
* The periods on the wire.
|
|
77
|
+
*
|
|
78
|
+
* @returns The periods, closed: their session, their reads, and each row's status written and read
|
|
79
|
+
*/
|
|
80
|
+
build(): ExprType<SchedulePeriodsKindType>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Declares what a builder publishes (see the module docs).
|
|
84
|
+
*
|
|
85
|
+
* @typeParam R - The period's row type
|
|
86
|
+
* @typeParam SF - The status field
|
|
87
|
+
* @param record - The app's record of periods, `Record.bind(record, [e3.mutation.patch(record)])`: a `Dict` keyed by each period's start
|
|
88
|
+
* @param config - What a period is, its status field and cases, the Roster's dismissals, and its read by key
|
|
89
|
+
* @returns The periods, for a builder's `periods`
|
|
90
|
+
* @throws {Error} Naming the option: a record not bound with its patch mutation, not keyed by DateTime, or whose rows
|
|
91
|
+
* are no structs; an `every` that is neither "week" nor "day"; a `status.field` the row lacks, or that is no variant
|
|
92
|
+
* or is an Option; a `status.draft` or `status.published` that is no case of it, or both naming one; a published case
|
|
93
|
+
* holding anything but Null or `{ at: DateTime }`; a `dismissed` that is no `Set<String>` field; and `entries` that is
|
|
94
|
+
* not a paged read of the record's own entries naming its snapshot
|
|
95
|
+
* @example
|
|
96
|
+
* ```tsx
|
|
97
|
+
* import { DateTimeType, DictType, NullType, SetType, StringType, StructType, VariantType } from "@elaraai/east";
|
|
98
|
+
* import { Record, Schedule } from "@elaraai/e3-ui";
|
|
99
|
+
* import e3 from "@elaraai/e3";
|
|
100
|
+
*
|
|
101
|
+
* const RotaWeek = StructType({
|
|
102
|
+
* state: VariantType({ open: NullType, issued: StructType({ at: DateTimeType }) }),
|
|
103
|
+
* dismissed: SetType(StringType),
|
|
104
|
+
* });
|
|
105
|
+
* const rotaWeeks = e3.record("rota_weeks", DictType(DateTimeType, RotaWeek), new Map());
|
|
106
|
+
* const rotaWeeksPatch = e3.mutation.patch(rotaWeeks);
|
|
107
|
+
*
|
|
108
|
+
* // Inside a builder's Reactive body: a week each, published when it is issued.
|
|
109
|
+
* const periods = Schedule.periods(Record.bind(rotaWeeks, [rotaWeeksPatch]), {
|
|
110
|
+
* every: "week", status: { field: "state", draft: "open", published: "issued" }, dismissed: "dismissed",
|
|
111
|
+
* });
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
export declare function schedulePeriods<R extends StructType, SF extends ScheduleStatusField<R>>(record: ScheduleRecordHandle<DateTimeType, R>, config: SchedulePeriodsConfig<R, SF>): SchedulePeriods;
|
|
115
|
+
//# sourceMappingURL=periods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"periods.d.ts","sourceRoot":"","sources":["../../../src/schedule/periods.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EACO,YA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AAU,EAAE,EAAE,SAAS,mBAAmB,CAAC,CAAC,CAAC,EACnF,MAAM,EAAE,oBAAoB,CAAC,YAAY,EAAE,CAAC,CAAC,EAC7C,MAAM,EAAE,qBAAqB,CAAC,CAAC,EAAE,EAAE,CAAC,GACrC,eAAe,CAAC"}
|
|
@@ -0,0 +1,215 @@
|
|
|
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
|
+
* `Schedule.periods(record, config)` (#1367, `Builder Interfaces Spec.md`
|
|
7
|
+
* §4.3): what a builder publishes — the app's own record of periods, one row
|
|
8
|
+
* of the app's per period, keyed by its start (a UTC midnight: a week's first
|
|
9
|
+
* day by the builder's week start, or a day), its status a variant field of
|
|
10
|
+
* the app's whose cases the builder maps.
|
|
11
|
+
*
|
|
12
|
+
* - **Status.** `status.field` names a variant field of the row, not an
|
|
13
|
+
* Option; `draft` and `published` name two of its cases. The published case
|
|
14
|
+
* holds Null, or `{ at: DateTime }`, the time it was published. A period in
|
|
15
|
+
* any other case is read-only, its chip naming the case; a period with no
|
|
16
|
+
* row is not started.
|
|
17
|
+
* - **Publish** writes the published case, with the time in `at` when the
|
|
18
|
+
* case holds one. A builder saves the period's drafts first, and writes the
|
|
19
|
+
* status only once every session reads back confirmed (§7).
|
|
20
|
+
* - **Dismissed**, the Roster's: a `Set<String>` field, the proposals a week
|
|
21
|
+
* dismissed. Without it the builder dismisses none.
|
|
22
|
+
* - **New rows.** A row the builder creates holds its type's default
|
|
23
|
+
* (`defaultValue`) in every field it doesn't map: its status the published
|
|
24
|
+
* case when it publishes, else the draft case, holding its payload's
|
|
25
|
+
* default.
|
|
26
|
+
* - **Reads.** By key through `entries`, a paged read of the record's own
|
|
27
|
+
* entries — each span the builder reads (its period, the one before it, the
|
|
28
|
+
* open picker's) one key search and one page — or the record whole.
|
|
29
|
+
*
|
|
30
|
+
* The periods are one session of the builder's history (`session.ts`), as
|
|
31
|
+
* each of its event kinds is: Save sends their changes through the record's
|
|
32
|
+
* patch door as a request of their own.
|
|
33
|
+
*
|
|
34
|
+
* @packageDocumentation
|
|
35
|
+
*/
|
|
36
|
+
import { BlobType, DateTimeType, DictType, East, Expr, NullType, OptionType, SetType, StringType, StructType, defaultValue, isTypeEqual, none, printType, some, toEastTypeValue, variant, } from "@elaraai/east";
|
|
37
|
+
import { SeekQueryType } from "@elaraai/east-ui";
|
|
38
|
+
import { SCHEDULE_DEF } from "./resources.js";
|
|
39
|
+
import { scheduleRecordSession } from "./session.js";
|
|
40
|
+
import { SchedulePeriodStatusType, SchedulePeriodsKindType } from "./types.js";
|
|
41
|
+
import { checkEntries, optionOf, typeText } from "./window.js";
|
|
42
|
+
/** A field of a struct as an East expression, by name. */
|
|
43
|
+
function fieldOf(row, name) {
|
|
44
|
+
return row[name];
|
|
45
|
+
}
|
|
46
|
+
/** What the published case holds, beside Null: when it was published. */
|
|
47
|
+
const StampType = StructType({ at: DateTimeType });
|
|
48
|
+
export function schedulePeriods(record, input) {
|
|
49
|
+
const config = input;
|
|
50
|
+
const where = "Schedule.periods";
|
|
51
|
+
const handleType = Expr.type(record);
|
|
52
|
+
const read = handleType.type === "Struct" ? handleType.fields["read"] : undefined;
|
|
53
|
+
if (handleType.type !== "Struct" || read === undefined || read.type !== "Function"
|
|
54
|
+
|| handleType.fields["binding"] === undefined) {
|
|
55
|
+
throw new Error(`${where}: \`record\` is the app's record of periods, bound with its patch mutation — Record.bind(record, [e3.mutation.patch(record)])`);
|
|
56
|
+
}
|
|
57
|
+
const recordType = read.output;
|
|
58
|
+
if (recordType.type !== "Dict" || !isTypeEqual(recordType.key, DateTimeType)) {
|
|
59
|
+
throw new Error(`${where}: a period's row is keyed by its start — a Dict keyed by DateTime, each key a UTC midnight — and this record holds ${typeText(recordType)}`);
|
|
60
|
+
}
|
|
61
|
+
const rowType = recordType.value;
|
|
62
|
+
if (rowType.type !== "Struct") {
|
|
63
|
+
throw new Error(`${where}: a period's row is a struct of the app's fields, its status among them — and this record's rows are ${typeText(rowType)}`);
|
|
64
|
+
}
|
|
65
|
+
const fields = rowType.fields;
|
|
66
|
+
const fieldType = (prop, name) => {
|
|
67
|
+
const type = fields[name];
|
|
68
|
+
if (type === undefined)
|
|
69
|
+
throw new Error(`${where}: \`${prop}\` names "${name}", a field the row does not have (${Object.keys(fields).join(", ")})`);
|
|
70
|
+
return type;
|
|
71
|
+
};
|
|
72
|
+
if (config.every !== "week" && config.every !== "day") {
|
|
73
|
+
throw new Error(`${where}: \`every\` is "week" or "day" — a week from the builder's week start, or a day — and it is "${String(config.every)}"`);
|
|
74
|
+
}
|
|
75
|
+
const every = config.every;
|
|
76
|
+
// The status: a variant field of the app's, two of whose cases are the draft and the published.
|
|
77
|
+
const status = config.status;
|
|
78
|
+
if (status === undefined)
|
|
79
|
+
throw new Error(`${where}: \`status\` names the row's status field and its cases — { field, draft, published }`);
|
|
80
|
+
const statusType = fieldType("status.field", status.field);
|
|
81
|
+
if (statusType.type !== "Variant" || optionOf(statusType) !== undefined) {
|
|
82
|
+
throw new Error(`${where}: \`status.field\` names a variant field, not an Option — "${status.field}" holds ${typeText(statusType)}`);
|
|
83
|
+
}
|
|
84
|
+
const cases = statusType.cases;
|
|
85
|
+
const names = Object.keys(cases);
|
|
86
|
+
for (const prop of ["draft", "published"]) {
|
|
87
|
+
if (!names.includes(status[prop])) {
|
|
88
|
+
throw new Error(`${where}: \`status.${prop}\` names a case of "${status.field}" (${names.join(", ")}) — and it names "${status[prop]}"`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (status.draft === status.published) {
|
|
92
|
+
throw new Error(`${where}: \`status.draft\` and \`status.published\` name two cases of "${status.field}" — and both name "${status.draft}"`);
|
|
93
|
+
}
|
|
94
|
+
// The published case holds nothing, or when it was published.
|
|
95
|
+
const publishedHolds = cases[status.published];
|
|
96
|
+
const stamped = isTypeEqual(publishedHolds, StampType);
|
|
97
|
+
if (!stamped && !isTypeEqual(publishedHolds, NullType)) {
|
|
98
|
+
throw new Error(`${where}: the published case "${status.published}" holds Null or { at: DateTime }, the time it was published — and it holds ${printType(publishedHolds)}`);
|
|
99
|
+
}
|
|
100
|
+
// The proposals a week dismissed: the Roster's.
|
|
101
|
+
const dismissedField = config.dismissed;
|
|
102
|
+
if (dismissedField !== undefined) {
|
|
103
|
+
const type = fieldType("dismissed", dismissedField);
|
|
104
|
+
if (!isTypeEqual(type, SetType(StringType))) {
|
|
105
|
+
throw new Error(`${where}: \`dismissed\` names a Set of String field — "${dismissedField}" holds ${typeText(type)}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// The periods read by key, or whole; and their session, declared now, so a record bound without its patch door is
|
|
109
|
+
// refused here.
|
|
110
|
+
const entries = config.entries === undefined ? undefined : checkEntries(config.entries, DateTimeType, rowType, `${where}: \`entries\``);
|
|
111
|
+
const session = scheduleRecordSession(record, DateTimeType, rowType, entries);
|
|
112
|
+
return {
|
|
113
|
+
[SCHEDULE_DEF]: "periods",
|
|
114
|
+
every,
|
|
115
|
+
rowType,
|
|
116
|
+
build() {
|
|
117
|
+
const { editing, entries: seam } = session.build();
|
|
118
|
+
// The row with one field replaced, and every other as it was.
|
|
119
|
+
const withField = (row, field, value) => East.value(Object.fromEntries(Object.keys(fields).map((f) => [f, f === field ? value : fieldOf(row, f)])), rowType);
|
|
120
|
+
// A period's new row: every field its type's default, its status the draft case.
|
|
121
|
+
const blank = East.value({
|
|
122
|
+
...defaultValue(rowType),
|
|
123
|
+
[status.field]: variant(status.draft, defaultValue(cases[status.draft])),
|
|
124
|
+
}, rowType);
|
|
125
|
+
const rowOf = (held) => held.match({
|
|
126
|
+
some: (_$, bytes) => bytes.decodeBeast(rowType, "v2"),
|
|
127
|
+
none: (_$) => blank,
|
|
128
|
+
});
|
|
129
|
+
// The periods starting in [from, to), by their start: one key search and one page of the record's own
|
|
130
|
+
// entries, or the record whole.
|
|
131
|
+
const Rows = OptionType(DictType(DateTimeType, BlobType));
|
|
132
|
+
const rows = entries === undefined
|
|
133
|
+
? East.function([DateTimeType, DateTimeType], Rows, ($, from, to) => {
|
|
134
|
+
const held = $.const(session.readAll());
|
|
135
|
+
const out = $.let(new Map(), DictType(DateTimeType, BlobType));
|
|
136
|
+
$.for(held, ($2, row, start) => {
|
|
137
|
+
$2.if(East.greaterEqual(start, from).and(() => East.less(start, to)), ($3) => {
|
|
138
|
+
$3(out.insert(start, East.Blob.encodeBeast(row, "v2")));
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
return East.value(some(out), Rows);
|
|
142
|
+
})
|
|
143
|
+
: East.function([DateTimeType, DateTimeType], Rows, ($, from, to) => {
|
|
144
|
+
const src = $.const(entries);
|
|
145
|
+
const result = $.let(East.value(none, Rows), Rows);
|
|
146
|
+
$.match(src.seek, {
|
|
147
|
+
none: ($2) => { $2.error(`${where}: \`entries\` finds a span of periods by its key search — Data.bindPaged(record) — and this read has none`); },
|
|
148
|
+
some: ($2, seek) => {
|
|
149
|
+
const query = $2.let(variant("range", { from: [East.print(from)], to: [East.print(to)] }), SeekQueryType);
|
|
150
|
+
$2.match(seek(query), {
|
|
151
|
+
some: ($3, found) => {
|
|
152
|
+
$3.if(found.found.not(), ($4) => {
|
|
153
|
+
$4.assign(result, East.value(some(new Map()), Rows));
|
|
154
|
+
}).else(($4) => {
|
|
155
|
+
$4.match(src.page(found.row, found.count), {
|
|
156
|
+
some: ($5, page) => {
|
|
157
|
+
const out = $5.let(new Map(), DictType(DateTimeType, BlobType));
|
|
158
|
+
$5.for(page, ($6, row, start) => { $6(out.insert(start, East.Blob.encodeBeast(row, "v2"))); });
|
|
159
|
+
$5.assign(result, East.value(some(out), Rows));
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
return result;
|
|
168
|
+
});
|
|
169
|
+
// A row's status: its draft case, its published case and when, or another case by its name.
|
|
170
|
+
const statusOf = East.function([BlobType], SchedulePeriodStatusType, ($, bytes) => {
|
|
171
|
+
const row = $.const(bytes.decodeBeast(rowType, "v2"));
|
|
172
|
+
const held = fieldOf(row, status.field);
|
|
173
|
+
return held.match(Object.fromEntries(names.map((c) => [c, (_$2, payload) => c === status.draft ? East.value(variant("draft", null), SchedulePeriodStatusType)
|
|
174
|
+
: c === status.published ? East.value(variant("published", { at: stamped ? some(payload.at) : none }), SchedulePeriodStatusType)
|
|
175
|
+
: East.value(variant("other", c), SchedulePeriodStatusType)])));
|
|
176
|
+
});
|
|
177
|
+
// The row, or a new one, with its status the published case at the time given.
|
|
178
|
+
const publish = East.function([OptionType(BlobType), DateTimeType], BlobType, ($, held, at) => {
|
|
179
|
+
const row = $.const(rowOf(held));
|
|
180
|
+
const published = $.const(East.value(variant(status.published, stamped ? { at } : null), statusType));
|
|
181
|
+
return East.Blob.encodeBeast(withField(row, status.field, published), "v2");
|
|
182
|
+
});
|
|
183
|
+
// The proposals a row dismissed, and the row, or a new one, dismissing the set given: the Roster's.
|
|
184
|
+
const dismissedOf = East.function([BlobType], SetType(StringType), ($, bytes) => {
|
|
185
|
+
if (dismissedField === undefined)
|
|
186
|
+
return East.value(new Set(), SetType(StringType));
|
|
187
|
+
const row = $.const(bytes.decodeBeast(rowType, "v2"));
|
|
188
|
+
return fieldOf(row, dismissedField);
|
|
189
|
+
});
|
|
190
|
+
const dismiss = East.function([OptionType(BlobType), SetType(StringType)], BlobType, ($, held, keys) => {
|
|
191
|
+
const row = $.const(rowOf(held));
|
|
192
|
+
if (dismissedField === undefined) {
|
|
193
|
+
// The builder offers no Reject without `dismissed` (`dismissible`), so nothing asks this.
|
|
194
|
+
$.error(`${where}: the builder maps no \`dismissed\` field — give \`dismissed\` to keep the proposals a period dismissed`);
|
|
195
|
+
return East.Blob.encodeBeast(row, "v2");
|
|
196
|
+
}
|
|
197
|
+
return East.Blob.encodeBeast(withField(row, dismissedField, keys), "v2");
|
|
198
|
+
});
|
|
199
|
+
return East.value({
|
|
200
|
+
every: variant(every, null),
|
|
201
|
+
editing,
|
|
202
|
+
entries: seam,
|
|
203
|
+
rows,
|
|
204
|
+
status: statusOf,
|
|
205
|
+
publish,
|
|
206
|
+
dismissible: dismissedField !== undefined,
|
|
207
|
+
dismissed: dismissedOf,
|
|
208
|
+
dismiss,
|
|
209
|
+
history: session.history,
|
|
210
|
+
rowType: toEastTypeValue(rowType),
|
|
211
|
+
}, SchedulePeriodsKindType);
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=periods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"periods.js","sourceRoot":"","sources":["../../../src/schedule/periods.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EACH,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,IAAI,EACpI,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,GAE5C,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA4D/D,0DAA0D;AAC1D,SAAS,OAAO,CAAC,GAAY,EAAE,IAAY;IACvC,OAAQ,GAA0C,CAAC,IAAI,CAAE,CAAC;AA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C,KAAK,EAAE,IAAI,CAAC;gBAC3B,OAAO;gBACP,OAAO,EAAE,IAAI;gBACb,IAAI;gBACJ,MAAM,EAAE,QAAQ;gBAChB,OAAO;gBACP,WAAW,EAAE,cAAc,KAAK,SAAS;gBACzC,SAAS,EAAE,WAAW;gBACtB,OAAO;gBACP,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC;aAC3B,EAAE,uBAAuB,CAAC,CAAC;QACzC,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -168,14 +168,34 @@ export declare function ScheduleRecordSliceType<K extends EastType, R extends Ea
|
|
|
168
168
|
}>;
|
|
169
169
|
readonly prefix: StringType;
|
|
170
170
|
}>>, StringType], OptionType<import("@elaraai/east").BooleanType>>;
|
|
171
|
+
readonly containsRow: FunctionType<[DictType<StringType, import("@elaraai/east").VariantType<{
|
|
172
|
+
readonly values: ArrayType<StringType>;
|
|
173
|
+
readonly range: StructType<{
|
|
174
|
+
readonly from: StringType;
|
|
175
|
+
readonly to: StringType;
|
|
176
|
+
}>;
|
|
177
|
+
readonly prefix: StringType;
|
|
178
|
+
}>>, StringType, import("@elaraai/east").BlobType], OptionType<import("@elaraai/east").BooleanType>>;
|
|
171
179
|
}>;
|
|
172
180
|
/** A record Slice over the event record's original key and row types. */
|
|
173
181
|
export type ScheduleRecordSlice<K extends EastType, R extends EastType> = SubtypeExprOrValue<ReturnType<typeof ScheduleRecordSliceType<K, R>>>;
|
|
182
|
+
/**
|
|
183
|
+
* A kind's source of its builder's slice, as the builder hands it to the kind
|
|
184
|
+
* (#1343, #1356): the source's typed record Slice handle, `Slice.bindRecords`'
|
|
185
|
+
* part named after the kind's slot, bound once in the builder's payload by
|
|
186
|
+
* `recordSources(…).bind($)`. The kind's reads read its members inside their
|
|
187
|
+
* functions, so each holds this one source, never the whole slice.
|
|
188
|
+
*/
|
|
189
|
+
export type ScheduleKindPart = ExprType<StructType>;
|
|
174
190
|
/**
|
|
175
191
|
* Read a visible interval or backlog through the same declared Slice paths.
|
|
176
192
|
* This reads only the chosen result, in bounded pages. Index bounds own all
|
|
177
193
|
* membership and distinct counts; no row predicate implements narrowing.
|
|
178
|
-
*
|
|
194
|
+
* The narrowing is the source's choices but its start field's and, on the
|
|
195
|
+
* start field, the window's half-open range — or, for a backlog, the start
|
|
196
|
+
* Unset; exact start values a choice holds stand for a window.
|
|
197
|
+
* @param part - The kind's source of its builder's slice, bound in the builder's payload.
|
|
198
|
+
* @param slot - The kind's slot, which names its source.
|
|
179
199
|
* @param key - Original record key type.
|
|
180
200
|
* @param row - Record row type.
|
|
181
201
|
* @param start - Interval start field.
|
|
@@ -183,7 +203,9 @@ export type ScheduleRecordSlice<K extends EastType, R extends EastType> = Subtyp
|
|
|
183
203
|
* @param optional - Whether the time fields admit backlog rows.
|
|
184
204
|
* @param backlog - Read Unset starts instead of a scheduled interval.
|
|
185
205
|
* @param label - Kind name used by authoring errors.
|
|
186
|
-
* @returns A window reader compatible with the existing Schedule seams
|
|
206
|
+
* @returns A window reader compatible with the existing Schedule seams; refused as it reads when the source's range is
|
|
207
|
+
* not the start field, or it declares no interval index from the start to the end.
|
|
208
|
+
* @throws {Error} When the source is not a record Slice over this event record with joined rows.
|
|
187
209
|
*/
|
|
188
|
-
export declare function scheduleRecordWindow(
|
|
210
|
+
export declare function scheduleRecordWindow(part: ScheduleKindPart, slot: string, key: EastType, row: EastType, start: string, end: string, optional: boolean, backlog: boolean, label: string): ExprType<FunctionType<[DateTimeType, DateTimeType], OptionType<DictType<EastType, EastType>>>>;
|
|
189
211
|
//# sourceMappingURL=record-window.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-window.d.ts","sourceRoot":"","sources":["../../../src/schedule/record-window.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,kEAAkE;AAClE,OAAO,EACH,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAc,YAAY,EAAE,WAAW,EAAE,U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EAAE,MAAM,EAC/H,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE,YAAY,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CA8EtJ"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/** Schedule's typed adapter to record Slice's indexed queries. */
|
|
6
6
|
import { ArrayType, DateTimeType, DictType, East, Expr, FunctionType, IntegerType, OptionType, StringType, StructType, isSubtype, isTypeEqual, none, some, variant, } from "@elaraai/east";
|
|
7
|
-
import { RecordSliceBindType, RecordSliceChoiceType, RecordSliceWhereType, recordSliceReadPlatform } from "@elaraai/east-ui/internal";
|
|
7
|
+
import { RecordSliceBindType, RecordSliceChoiceType, RecordSliceConfigType, RecordSliceStateType, RecordSliceWhereType, recordSliceReadPlatform, } from "@elaraai/east-ui/internal";
|
|
8
8
|
/** Minimal typed query reader; additional index-entry fields remain opaque. */
|
|
9
9
|
export function ScheduleRecordSliceType(key, row) {
|
|
10
10
|
return StructType({ ...RecordSliceBindType.fields,
|
|
@@ -16,7 +16,11 @@ export function ScheduleRecordSliceType(key, row) {
|
|
|
16
16
|
* Read a visible interval or backlog through the same declared Slice paths.
|
|
17
17
|
* This reads only the chosen result, in bounded pages. Index bounds own all
|
|
18
18
|
* membership and distinct counts; no row predicate implements narrowing.
|
|
19
|
-
*
|
|
19
|
+
* The narrowing is the source's choices but its start field's and, on the
|
|
20
|
+
* start field, the window's half-open range — or, for a backlog, the start
|
|
21
|
+
* Unset; exact start values a choice holds stand for a window.
|
|
22
|
+
* @param part - The kind's source of its builder's slice, bound in the builder's payload.
|
|
23
|
+
* @param slot - The kind's slot, which names its source.
|
|
20
24
|
* @param key - Original record key type.
|
|
21
25
|
* @param row - Record row type.
|
|
22
26
|
* @param start - Interval start field.
|
|
@@ -24,12 +28,13 @@ export function ScheduleRecordSliceType(key, row) {
|
|
|
24
28
|
* @param optional - Whether the time fields admit backlog rows.
|
|
25
29
|
* @param backlog - Read Unset starts instead of a scheduled interval.
|
|
26
30
|
* @param label - Kind name used by authoring errors.
|
|
27
|
-
* @returns A window reader compatible with the existing Schedule seams
|
|
31
|
+
* @returns A window reader compatible with the existing Schedule seams; refused as it reads when the source's range is
|
|
32
|
+
* not the start field, or it declares no interval index from the start to the end.
|
|
33
|
+
* @throws {Error} When the source is not a record Slice over this event record with joined rows.
|
|
28
34
|
*/
|
|
29
|
-
export function scheduleRecordWindow(
|
|
30
|
-
const value = East.value(input);
|
|
35
|
+
export function scheduleRecordWindow(part, slot, key, row, start, end, optional, backlog, label) {
|
|
31
36
|
const Type = ScheduleRecordSliceType(key, row);
|
|
32
|
-
const type = Expr.type(
|
|
37
|
+
const type = Expr.type(part);
|
|
33
38
|
const fields = type.type === "Struct" ? type.fields : {};
|
|
34
39
|
const data = fields.data;
|
|
35
40
|
const page = fields.pageWhere;
|
|
@@ -43,24 +48,35 @@ export function scheduleRecordWindow(input, key, row, start, end, optional, back
|
|
|
43
48
|
&& data?.type === "Struct"
|
|
44
49
|
&& Object.entries(Type.fields.data.fields).every(([name, expected]) => data.fields[name] !== undefined && isSubtype(data.fields[name], expected))
|
|
45
50
|
&& Object.entries(RecordSliceBindType.fields).every(([name, expected]) => fields[name] !== undefined && isSubtype(fields[name], expected));
|
|
46
|
-
if (!fits)
|
|
47
|
-
throw new Error(`${label}:
|
|
48
|
-
|
|
51
|
+
if (!fits) {
|
|
52
|
+
throw new Error(`${label}: the builder's source "${slot}" narrows another record — name it after this kind's slot over the kind's own record, ` +
|
|
53
|
+
"Data.bindPaged(record, { indexes }), its rows joined");
|
|
54
|
+
}
|
|
49
55
|
const Held = DictType(key, row);
|
|
56
|
+
// Preserve the actual window's wire type (including its index key and
|
|
57
|
+
// covering value); only the two validated entry fields are inspected.
|
|
58
|
+
const Entries = collection;
|
|
50
59
|
return East.function([DateTimeType, DateTimeType], OptionType(Held), ($, from, to) => {
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
// The source as the builder bound it, its members read here: the reader captures the source alone.
|
|
61
|
+
const source = $.const(part);
|
|
62
|
+
const config = $.const(source.config);
|
|
63
|
+
const read = $.const(source.read);
|
|
64
|
+
const countWhere = $.const(source.countWhere);
|
|
65
|
+
const pageWhere = $.const(source.pageWhere);
|
|
66
|
+
const id = $.const(source.data.id);
|
|
67
|
+
const revision = $.const(source.data.revision);
|
|
68
|
+
$.if(config.range.match({ none: () => true, some: (_$2, field) => field.notEqual(start) }), $2 => {
|
|
53
69
|
$2.error(`${label}: set the record Slice range to '${start}' so navigation and filters share one window`);
|
|
54
70
|
});
|
|
55
71
|
const supported = $.let(false);
|
|
56
|
-
$.for(
|
|
72
|
+
$.for(config.indexes, ($2, index) => {
|
|
57
73
|
$2.match(index.interval, { some: ($3, interval) => {
|
|
58
74
|
$3.if(interval.from.equal(start).and(() => interval.to.equal(end)), $4 => { $4.assign(supported, true); });
|
|
59
75
|
} });
|
|
60
76
|
});
|
|
61
77
|
$.if(supported.not(), $2 => { $2.error(`${label}: declare an interval index for ${start} and ${end} to preserve overlapping events`); });
|
|
62
78
|
const where = $.let(new Map(), RecordSliceWhereType);
|
|
63
|
-
const state = $.const(
|
|
79
|
+
const state = $.const(read());
|
|
64
80
|
$.for(state.where, ($2, choice, field) => {
|
|
65
81
|
$2.if(field.notEqual(start), $3 => { $3(where.insert(field, choice)); });
|
|
66
82
|
});
|
|
@@ -74,15 +90,12 @@ export function scheduleRecordWindow(input, key, row, start, end, optional, back
|
|
|
74
90
|
}
|
|
75
91
|
$(where.insert(start, time));
|
|
76
92
|
const result = $.let(none, OptionType(Held));
|
|
77
|
-
|
|
78
|
-
// covering value); only the two validated entry fields are inspected.
|
|
79
|
-
const Entries = collection;
|
|
80
|
-
$.match(recordSliceReadPlatform([Entries], src.data.id, src.data.revision, src.countWhere, src.pageWhere, where), {
|
|
93
|
+
$.match(recordSliceReadPlatform([Entries], id, revision, countWhere, pageWhere, where), {
|
|
81
94
|
some: ($2, entries) => {
|
|
82
95
|
const held = $2.let(new Map(), Held);
|
|
83
96
|
$2.for(entries, ($3, entry) => {
|
|
84
97
|
$3.match(entry.row, {
|
|
85
|
-
none: $4 => { $4.error(`${label}:
|
|
98
|
+
none: $4 => { $4.error(`${label}: the builder's source "${slot}" reads no rows — bind it with Data.bindPaged with join: true`); },
|
|
86
99
|
some: ($4, value) => { $4(held.insert(entry.key, value)); },
|
|
87
100
|
});
|
|
88
101
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-window.js","sourceRoot":"","sources":["../../../src/schedule/record-window.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,kEAAkE;AAClE,OAAO,EACH,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAC5G,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,GAC9C,MAAM,eAAe,CAAC;AACvB,OAAO,
|
|
1
|
+
{"version":3,"file":"record-window.js","sourceRoot":"","sources":["../../../src/schedule/record-window.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,kEAAkE;AAClE,OAAO,EACH,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAC5G,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,GAC9C,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,mBAAmB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,uBAAuB,GACzI,MAAM,2BAA2B,CAAC;AAEnC,+EAA+E;AAC/E,MAAM,UAAU,uBAAuB,CAAyC,GAAM,E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