@elaraai/e3-ui 1.0.86 → 1.0.87
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/bind/data-indexed.d.ts +159 -0
- package/dist/src/bind/data-indexed.d.ts.map +1 -0
- package/dist/src/bind/data-indexed.js +105 -0
- package/dist/src/bind/data-indexed.js.map +1 -0
- package/dist/src/bind/data.d.ts +5 -3
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +6 -0
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/record.d.ts +34 -23
- package/dist/src/bind/record.d.ts.map +1 -1
- package/dist/src/bind/record.js +46 -19
- package/dist/src/bind/record.js.map +1 -1
- package/dist/src/calendar/index.d.ts +2923 -0
- package/dist/src/calendar/index.d.ts.map +1 -0
- package/dist/src/calendar/index.js +135 -0
- package/dist/src/calendar/index.js.map +1 -0
- package/dist/src/decision/queue.d.ts +3 -3
- package/dist/src/decision/queue.d.ts.map +1 -1
- package/dist/src/decision/queue.js +2 -2
- package/dist/src/decision/queue.js.map +1 -1
- package/dist/src/decision/types.d.ts +4 -0
- package/dist/src/decision/types.d.ts.map +1 -1
- package/dist/src/decision/types.js +4 -0
- package/dist/src/decision/types.js.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +114 -0
- package/dist/src/flowchart/canvas.d.ts.map +1 -0
- package/dist/src/flowchart/canvas.js +84 -0
- package/dist/src/flowchart/canvas.js.map +1 -0
- package/dist/src/flowchart/flowchart.d.ts +79 -0
- package/dist/src/flowchart/flowchart.d.ts.map +1 -0
- package/dist/src/flowchart/flowchart.js +9 -0
- package/dist/src/flowchart/flowchart.js.map +1 -0
- package/dist/src/flowchart/index.d.ts +305 -0
- package/dist/src/flowchart/index.d.ts.map +1 -0
- package/dist/src/flowchart/index.js +267 -0
- package/dist/src/flowchart/index.js.map +1 -0
- package/dist/src/flowchart/library.d.ts +720 -0
- package/dist/src/flowchart/library.d.ts.map +1 -0
- package/dist/src/flowchart/library.js +611 -0
- package/dist/src/flowchart/library.js.map +1 -0
- package/dist/src/flowchart/over.d.ts +234 -0
- package/dist/src/flowchart/over.d.ts.map +1 -0
- package/dist/src/flowchart/over.js +220 -0
- package/dist/src/flowchart/over.js.map +1 -0
- package/dist/src/flowchart/patch.d.ts +64 -0
- package/dist/src/flowchart/patch.d.ts.map +1 -0
- package/dist/src/flowchart/patch.js +67 -0
- package/dist/src/flowchart/patch.js.map +1 -0
- package/dist/src/flowchart/payload.d.ts +8220 -0
- package/dist/src/flowchart/payload.d.ts.map +1 -0
- package/dist/src/flowchart/payload.js +521 -0
- package/dist/src/flowchart/payload.js.map +1 -0
- package/dist/src/flowchart/types.d.ts +393 -0
- package/dist/src/flowchart/types.d.ts.map +1 -0
- package/dist/src/flowchart/types.js +216 -0
- package/dist/src/flowchart/types.js.map +1 -0
- package/dist/src/flowchart/values.d.ts +267 -0
- package/dist/src/flowchart/values.d.ts.map +1 -0
- package/dist/src/flowchart/values.js +216 -0
- package/dist/src/flowchart/values.js.map +1 -0
- package/dist/src/flowchart/window.d.ts +521 -0
- package/dist/src/flowchart/window.d.ts.map +1 -0
- package/dist/src/flowchart/window.js +69 -0
- package/dist/src/flowchart/window.js.map +1 -0
- package/dist/src/index.d.ts +25 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +48 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +35 -3
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +72 -3
- package/dist/src/internal.js.map +1 -1
- package/dist/src/plan/assemble.d.ts +2224 -0
- package/dist/src/plan/assemble.d.ts.map +1 -0
- package/dist/src/plan/assemble.js +210 -0
- package/dist/src/plan/assemble.js.map +1 -0
- package/dist/src/plan/builders.d.ts +790 -0
- package/dist/src/plan/builders.d.ts.map +1 -0
- package/dist/src/plan/builders.js +749 -0
- package/dist/src/plan/builders.js.map +1 -0
- package/dist/src/plan/event-rows.d.ts +2565 -0
- package/dist/src/plan/event-rows.d.ts.map +1 -0
- package/dist/src/plan/event-rows.js +689 -0
- package/dist/src/plan/event-rows.js.map +1 -0
- package/dist/src/plan/factories.d.ts +458 -0
- package/dist/src/plan/factories.d.ts.map +1 -0
- package/dist/src/plan/factories.js +484 -0
- package/dist/src/plan/factories.js.map +1 -0
- package/dist/src/plan/index.d.ts +672 -0
- package/dist/src/plan/index.d.ts.map +1 -0
- package/dist/src/plan/index.js +532 -0
- package/dist/src/plan/index.js.map +1 -0
- package/dist/src/plan/ir.d.ts +2594 -0
- package/dist/src/plan/ir.d.ts.map +1 -0
- package/dist/src/plan/ir.js +78 -0
- package/dist/src/plan/ir.js.map +1 -0
- package/dist/src/plan/library.d.ts +772 -0
- package/dist/src/plan/library.d.ts.map +1 -0
- package/dist/src/plan/library.js +424 -0
- package/dist/src/plan/library.js.map +1 -0
- package/dist/src/plan/ordered-source.d.ts +27 -0
- package/dist/src/plan/ordered-source.d.ts.map +1 -0
- package/dist/src/plan/ordered-source.js +48 -0
- package/dist/src/plan/ordered-source.js.map +1 -0
- package/dist/src/plan/over.d.ts +247 -0
- package/dist/src/plan/over.d.ts.map +1 -0
- package/dist/src/plan/over.js +266 -0
- package/dist/src/plan/over.js.map +1 -0
- package/dist/src/plan/pick.d.ts +78 -0
- package/dist/src/plan/pick.d.ts.map +1 -0
- package/dist/src/plan/pick.js +146 -0
- package/dist/src/plan/pick.js.map +1 -0
- package/dist/src/plan/plan.d.ts +11611 -0
- package/dist/src/plan/plan.d.ts.map +1 -0
- package/dist/src/plan/plan.js +428 -0
- package/dist/src/plan/plan.js.map +1 -0
- package/dist/src/plan/refs.d.ts +218 -0
- package/dist/src/plan/refs.d.ts.map +1 -0
- package/dist/src/plan/refs.js +226 -0
- package/dist/src/plan/refs.js.map +1 -0
- package/dist/src/plan/root.d.ts +290 -0
- package/dist/src/plan/root.d.ts.map +1 -0
- package/dist/src/plan/root.js +463 -0
- package/dist/src/plan/root.js.map +1 -0
- package/dist/src/plan/series.d.ts +13554 -0
- package/dist/src/plan/series.d.ts.map +1 -0
- package/dist/src/plan/series.js +1921 -0
- package/dist/src/plan/series.js.map +1 -0
- package/dist/src/plan/types.d.ts +12400 -0
- package/dist/src/plan/types.d.ts.map +1 -0
- package/dist/src/plan/types.js +1335 -0
- package/dist/src/plan/types.js.map +1 -0
- package/dist/src/roster/coverage.d.ts +240 -0
- package/dist/src/roster/coverage.d.ts.map +1 -0
- package/dist/src/roster/coverage.js +109 -0
- package/dist/src/roster/coverage.js.map +1 -0
- package/dist/src/roster/index.d.ts +4028 -0
- package/dist/src/roster/index.d.ts.map +1 -0
- package/dist/src/roster/index.js +115 -0
- package/dist/src/roster/index.js.map +1 -0
- package/dist/src/roster/library.d.ts +106 -0
- package/dist/src/roster/library.d.ts.map +1 -0
- package/dist/src/roster/library.js +78 -0
- package/dist/src/roster/library.js.map +1 -0
- package/dist/src/roster/people.d.ts +50 -0
- package/dist/src/roster/people.d.ts.map +1 -0
- package/dist/src/roster/people.js +32 -0
- package/dist/src/roster/people.js.map +1 -0
- package/dist/src/roster/rules.d.ts +275 -0
- package/dist/src/roster/rules.d.ts.map +1 -0
- package/dist/src/roster/rules.js +162 -0
- package/dist/src/roster/rules.js.map +1 -0
- package/dist/src/roster/types.d.ts +672 -0
- package/dist/src/roster/types.d.ts.map +1 -0
- package/dist/src/roster/types.js +248 -0
- package/dist/src/roster/types.js.map +1 -0
- package/dist/src/roster/visibility.d.ts +66 -0
- package/dist/src/roster/visibility.d.ts.map +1 -0
- package/dist/src/roster/visibility.js +25 -0
- package/dist/src/roster/visibility.js.map +1 -0
- package/dist/src/schedule/days.d.ts +54 -0
- package/dist/src/schedule/days.d.ts.map +1 -0
- package/dist/src/schedule/days.js +68 -0
- package/dist/src/schedule/days.js.map +1 -0
- package/dist/src/schedule/events.d.ts +433 -0
- package/dist/src/schedule/events.d.ts.map +1 -0
- package/dist/src/schedule/events.js +851 -0
- package/dist/src/schedule/events.js.map +1 -0
- package/dist/src/schedule/index.d.ts +150 -0
- package/dist/src/schedule/index.d.ts.map +1 -0
- package/dist/src/schedule/index.js +132 -0
- package/dist/src/schedule/index.js.map +1 -0
- package/dist/src/schedule/library.d.ts +70 -0
- package/dist/src/schedule/library.d.ts.map +1 -0
- package/dist/src/schedule/library.js +102 -0
- package/dist/src/schedule/library.js.map +1 -0
- package/dist/src/schedule/patch.d.ts +74 -0
- package/dist/src/schedule/patch.d.ts.map +1 -0
- package/dist/src/schedule/patch.js +68 -0
- package/dist/src/schedule/patch.js.map +1 -0
- package/dist/src/schedule/record-window.d.ts +189 -0
- package/dist/src/schedule/record-window.d.ts.map +1 -0
- package/dist/src/schedule/record-window.js +95 -0
- package/dist/src/schedule/record-window.js.map +1 -0
- package/dist/src/schedule/resources.d.ts +165 -0
- package/dist/src/schedule/resources.d.ts.map +1 -0
- package/dist/src/schedule/resources.js +234 -0
- package/dist/src/schedule/resources.js.map +1 -0
- package/dist/src/schedule/templates.d.ts +47 -0
- package/dist/src/schedule/templates.d.ts.map +1 -0
- package/dist/src/schedule/templates.js +61 -0
- package/dist/src/schedule/templates.js.map +1 -0
- package/dist/src/schedule/types.d.ts +1677 -0
- package/dist/src/schedule/types.d.ts.map +1 -0
- package/dist/src/schedule/types.js +374 -0
- package/dist/src/schedule/types.js.map +1 -0
- package/dist/src/schedule/window.d.ts +154 -0
- package/dist/src/schedule/window.d.ts.map +1 -0
- package/dist/src/schedule/window.js +363 -0
- package/dist/src/schedule/window.js.map +1 -0
- package/dist/src/sheet/bridge.d.ts +385 -0
- package/dist/src/sheet/bridge.d.ts.map +1 -0
- package/dist/src/sheet/bridge.js +809 -0
- package/dist/src/sheet/bridge.js.map +1 -0
- package/dist/src/sheet/columns.d.ts +410 -0
- package/dist/src/sheet/columns.d.ts.map +1 -0
- package/dist/src/sheet/columns.js +99 -0
- package/dist/src/sheet/columns.js.map +1 -0
- package/dist/src/sheet/context-bridge.d.ts +48 -0
- package/dist/src/sheet/context-bridge.d.ts.map +1 -0
- package/dist/src/sheet/context-bridge.js +216 -0
- package/dist/src/sheet/context-bridge.js.map +1 -0
- package/dist/src/sheet/draft-bridge.d.ts +37 -0
- package/dist/src/sheet/draft-bridge.d.ts.map +1 -0
- package/dist/src/sheet/draft-bridge.js +153 -0
- package/dist/src/sheet/draft-bridge.js.map +1 -0
- package/dist/src/sheet/drafts.d.ts +14 -0
- package/dist/src/sheet/drafts.d.ts.map +1 -0
- package/dist/src/sheet/drafts.js +14 -0
- package/dist/src/sheet/drafts.js.map +1 -0
- package/dist/src/sheet/editing-bridge.d.ts +40 -0
- package/dist/src/sheet/editing-bridge.d.ts.map +1 -0
- package/dist/src/sheet/editing-bridge.js +231 -0
- package/dist/src/sheet/editing-bridge.js.map +1 -0
- package/dist/src/sheet/editing-types.d.ts +268 -0
- package/dist/src/sheet/editing-types.d.ts.map +1 -0
- package/dist/src/sheet/editing-types.js +34 -0
- package/dist/src/sheet/editing-types.js.map +1 -0
- package/dist/src/sheet/edits.d.ts +37 -0
- package/dist/src/sheet/edits.d.ts.map +1 -0
- package/dist/src/sheet/edits.js +31 -0
- package/dist/src/sheet/edits.js.map +1 -0
- package/dist/src/sheet/fields.d.ts +693 -0
- package/dist/src/sheet/fields.d.ts.map +1 -0
- package/dist/src/sheet/fields.js +280 -0
- package/dist/src/sheet/fields.js.map +1 -0
- package/dist/src/sheet/group.d.ts +165 -0
- package/dist/src/sheet/group.d.ts.map +1 -0
- package/dist/src/sheet/group.js +52 -0
- package/dist/src/sheet/group.js.map +1 -0
- package/dist/src/sheet/index.d.ts +542 -0
- package/dist/src/sheet/index.d.ts.map +1 -0
- package/dist/src/sheet/index.js +387 -0
- package/dist/src/sheet/index.js.map +1 -0
- package/dist/src/sheet/library.d.ts +284 -0
- package/dist/src/sheet/library.d.ts.map +1 -0
- package/dist/src/sheet/library.js +259 -0
- package/dist/src/sheet/library.js.map +1 -0
- package/dist/src/sheet/link.d.ts +398 -0
- package/dist/src/sheet/link.d.ts.map +1 -0
- package/dist/src/sheet/link.js +228 -0
- package/dist/src/sheet/link.js.map +1 -0
- package/dist/src/sheet/record.d.ts +75 -0
- package/dist/src/sheet/record.d.ts.map +1 -0
- package/dist/src/sheet/record.js +128 -0
- package/dist/src/sheet/record.js.map +1 -0
- package/dist/src/sheet/registers.d.ts +681 -0
- package/dist/src/sheet/registers.d.ts.map +1 -0
- package/dist/src/sheet/registers.js +671 -0
- package/dist/src/sheet/registers.js.map +1 -0
- package/dist/src/sheet/root.d.ts +329 -0
- package/dist/src/sheet/root.d.ts.map +1 -0
- package/dist/src/sheet/root.js +511 -0
- package/dist/src/sheet/root.js.map +1 -0
- package/dist/src/sheet/seed-bridge.d.ts +14 -0
- package/dist/src/sheet/seed-bridge.d.ts.map +1 -0
- package/dist/src/sheet/seed-bridge.js +51 -0
- package/dist/src/sheet/seed-bridge.js.map +1 -0
- package/dist/src/sheet/sheet.d.ts +11819 -0
- package/dist/src/sheet/sheet.d.ts.map +1 -0
- package/dist/src/sheet/sheet.js +236 -0
- package/dist/src/sheet/sheet.js.map +1 -0
- package/dist/src/sheet/sub-rows.d.ts +299 -0
- package/dist/src/sheet/sub-rows.d.ts.map +1 -0
- package/dist/src/sheet/sub-rows.js +272 -0
- package/dist/src/sheet/sub-rows.js.map +1 -0
- package/dist/src/sheet/templates.d.ts +161 -0
- package/dist/src/sheet/templates.d.ts.map +1 -0
- package/dist/src/sheet/templates.js +122 -0
- package/dist/src/sheet/templates.js.map +1 -0
- package/dist/src/sheet/transactions.d.ts +76 -0
- package/dist/src/sheet/transactions.d.ts.map +1 -0
- package/dist/src/sheet/transactions.js +40 -0
- package/dist/src/sheet/transactions.js.map +1 -0
- package/dist/src/sheet/types.d.ts +15226 -0
- package/dist/src/sheet/types.d.ts.map +1 -0
- package/dist/src/sheet/types.js +1070 -0
- package/dist/src/sheet/types.js.map +1 -0
- package/dist/src/sheet/views.d.ts +29 -0
- package/dist/src/sheet/views.d.ts.map +1 -0
- package/dist/src/sheet/views.js +43 -0
- package/dist/src/sheet/views.js.map +1 -0
- package/dist/src/studio/component.d.ts.map +1 -1
- package/dist/src/studio/component.js +11 -8
- package/dist/src/studio/component.js.map +1 -1
- package/dist/src/utils/derive.d.ts +134 -8
- package/dist/src/utils/derive.d.ts.map +1 -1
- package/dist/src/utils/derive.js +409 -7
- package/dist/src/utils/derive.js.map +1 -1
- package/dist/src/utils/ordered-source.d.ts +38 -0
- package/dist/src/utils/ordered-source.d.ts.map +1 -0
- package/dist/src/utils/ordered-source.js +45 -0
- package/dist/src/utils/ordered-source.js.map +1 -0
- package/dist/src/utils/row-inspector.d.ts +36 -0
- package/dist/src/utils/row-inspector.d.ts.map +1 -0
- package/dist/src/utils/row-inspector.js +49 -0
- package/dist/src/utils/row-inspector.js.map +1 -0
- package/dist/test/bind/data/data.examples.d.ts +21 -19
- package/dist/test/bind/data/data.examples.d.ts.map +1 -1
- package/dist/test/bind/data/data.examples.js +122 -122
- package/dist/test/bind/data/data.examples.js.map +1 -1
- package/dist/test/bind/record/record.examples.d.ts.map +1 -1
- package/dist/test/bind/record/record.examples.js +9 -9
- package/dist/test/bind/record/record.examples.js.map +1 -1
- package/dist/test/calendar/calendar-records.examples.d.ts +228 -0
- package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -0
- package/dist/test/calendar/calendar-records.examples.js +91 -0
- package/dist/test/calendar/calendar-records.examples.js.map +1 -0
- package/dist/test/calendar/calendar.examples.d.ts +776 -0
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -0
- package/dist/test/calendar/calendar.examples.js +336 -0
- package/dist/test/calendar/calendar.examples.js.map +1 -0
- package/dist/test/decision/journal.examples.d.ts +28 -28
- package/dist/test/decision/journal.examples.d.ts.map +1 -1
- package/dist/test/decision/journal.examples.js +4 -4
- package/dist/test/decision/journal.examples.js.map +1 -1
- package/dist/test/decision/queue.examples.d.ts.map +1 -1
- package/dist/test/decision/queue.examples.js +5 -7
- package/dist/test/decision/queue.examples.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +3713 -0
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -0
- package/dist/test/flowchart/flowchart.examples.js +465 -0
- package/dist/test/flowchart/flowchart.examples.js.map +1 -0
- package/dist/test/plan/plan-events.examples.d.ts +3666 -0
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-events.examples.js +773 -0
- package/dist/test/plan/plan-events.examples.js.map +1 -0
- package/dist/test/plan/plan-records.examples.d.ts +3 -0
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-records.examples.js +45 -0
- package/dist/test/plan/plan-records.examples.js.map +1 -0
- package/dist/test/plan/plan-windows.examples.d.ts +588 -0
- package/dist/test/plan/plan-windows.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-windows.examples.js +170 -0
- package/dist/test/plan/plan-windows.examples.js.map +1 -0
- package/dist/test/plan/plan.examples.d.ts +8095 -0
- package/dist/test/plan/plan.examples.d.ts.map +1 -0
- package/dist/test/plan/plan.examples.js +2500 -0
- package/dist/test/plan/plan.examples.js.map +1 -0
- package/dist/test/roster/domain.examples.d.ts +367 -0
- package/dist/test/roster/domain.examples.d.ts.map +1 -0
- package/dist/test/roster/domain.examples.js +72 -0
- package/dist/test/roster/domain.examples.js.map +1 -0
- package/dist/test/roster/roster-records.examples.d.ts +729 -0
- package/dist/test/roster/roster-records.examples.d.ts.map +1 -0
- package/dist/test/roster/roster-records.examples.js +86 -0
- package/dist/test/roster/roster-records.examples.js.map +1 -0
- package/dist/test/roster/roster.examples.d.ts +750 -0
- package/dist/test/roster/roster.examples.d.ts.map +1 -0
- package/dist/test/roster/roster.examples.js +198 -0
- package/dist/test/roster/roster.examples.js.map +1 -0
- package/dist/test/roster/warehouse.d.ts +87 -0
- package/dist/test/roster/warehouse.d.ts.map +1 -0
- package/dist/test/roster/warehouse.js +883 -0
- package/dist/test/roster/warehouse.js.map +1 -0
- package/dist/test/sheet/sheet-link.examples.d.ts +7 -0
- package/dist/test/sheet/sheet-link.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-link.examples.js +41 -0
- package/dist/test/sheet/sheet-link.examples.js.map +1 -0
- package/dist/test/sheet/sheet-records.examples.d.ts +421 -0
- package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-records.examples.js +79 -0
- package/dist/test/sheet/sheet-records.examples.js.map +1 -0
- package/dist/test/sheet/sheet-transactions.examples.d.ts +7 -0
- package/dist/test/sheet/sheet-transactions.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-transactions.examples.js +58 -0
- package/dist/test/sheet/sheet-transactions.examples.js.map +1 -0
- package/dist/test/sheet/sheet.examples.d.ts +5562 -0
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet.examples.js +1178 -0
- package/dist/test/sheet/sheet.examples.js.map +1 -0
- package/dist/test/studio/studio.examples.d.ts.map +1 -1
- package/dist/test/studio/studio.examples.js +11 -11
- package/dist/test/studio/studio.examples.js.map +1 -1
- package/package.json +12 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/schedule/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAEH,OAAO,EACH,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EACrH,UAAU,EAAE,WAAW,EAC1B,MAAM,eAAe,CAAC;AAWvB;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;EAAoD,CAAC;AAEzF,yDAAyD;AACzD,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAC;AAErE;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;EAAoD,CAAC;AAEtF,sDAAsD;AACtD,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC;AAE/D;;;;;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H,mDAAmD;AACnD,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,374 @@
|
|
|
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`'s East types (#1218): what an author meets (`Calendar Spec.md`
|
|
7
|
+
* §5.1), and the kinds' wire (§5.2) that a builder's payload holds — the
|
|
8
|
+
* Calendar's, and Plan's builder's (#1190, `Plan Builder Spec.md` §5.2): the
|
|
9
|
+
* same kinds with Plan's options resolved beside them.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
import { ArrayType, BlobType, BooleanType, DateTimeType, DictType, FunctionType, IntegerType, NullType, OptionType, StringType, StructType, VariantType, } from "@elaraai/east";
|
|
14
|
+
import { RecordCommitInfoType } from "@elaraai/e3-types";
|
|
15
|
+
import { EventStateType, StatusTokenType, StatusValueType, TimeStepType } from "@elaraai/east-ui";
|
|
16
|
+
import { EditingReadinessType, EditingType, FieldSpecType } from "@elaraai/east-ui/internal";
|
|
17
|
+
import { PlanDrawType, PlanQuantityType, PlanRollupType } from "../plan/types.js";
|
|
18
|
+
import { RowInspectorType } from "../utils/row-inspector.js";
|
|
19
|
+
// ============================================================================
|
|
20
|
+
// What an author meets
|
|
21
|
+
// ============================================================================
|
|
22
|
+
/**
|
|
23
|
+
* A resource: its kind's slot name, and its key's text (a String key as it
|
|
24
|
+
* is, any other key as East prints it).
|
|
25
|
+
*
|
|
26
|
+
* @property kind - The resource kind's slot name (`people`)
|
|
27
|
+
* @property key - The resource's key, as text
|
|
28
|
+
*/
|
|
29
|
+
export const ScheduleResourceRefType = StructType({ kind: StringType, key: StringType });
|
|
30
|
+
/**
|
|
31
|
+
* An event: its kind's slot name, and its record key's text.
|
|
32
|
+
*
|
|
33
|
+
* @property kind - The event kind's slot name (`shift`)
|
|
34
|
+
* @property key - The event's record key, as text
|
|
35
|
+
*/
|
|
36
|
+
export const ScheduleEventRefType = StructType({ kind: StringType, key: StringType });
|
|
37
|
+
/**
|
|
38
|
+
* How one case of an event's status shows.
|
|
39
|
+
*
|
|
40
|
+
* @property label - Its words
|
|
41
|
+
* @property tone - Its tone: success, warning, danger, info or neutral
|
|
42
|
+
* @property ring - Whether it draws as an open ring, as a tentative status does
|
|
43
|
+
*/
|
|
44
|
+
export const ScheduleStatusType = StructType({ label: StringType, tone: StatusTokenType, ring: BooleanType });
|
|
45
|
+
/**
|
|
46
|
+
* Constructs the status table of a status variant: one
|
|
47
|
+
* {@link ScheduleStatusType} per case.
|
|
48
|
+
*
|
|
49
|
+
* @typeParam V - The status variant
|
|
50
|
+
* @param statusType - The status variant
|
|
51
|
+
* @returns A struct with a field per case
|
|
52
|
+
* @throws {Error} When the type is not a variant
|
|
53
|
+
*/
|
|
54
|
+
export function ScheduleStatusCasesFor(statusType) {
|
|
55
|
+
if (statusType.type !== "Variant")
|
|
56
|
+
throw new Error("Schedule.Types.StatusCases: a status is a variant, one case per status");
|
|
57
|
+
const cases = Object.keys(statusType.cases);
|
|
58
|
+
return StructType(Object.fromEntries(cases.map((c) => [c, ScheduleStatusType])));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A time of day: what a template starts at when it is dropped on a whole day.
|
|
62
|
+
*
|
|
63
|
+
* @property hour - The hour, 0–23
|
|
64
|
+
* @property minute - The minute, 0–59
|
|
65
|
+
*/
|
|
66
|
+
export const ScheduleClockType = StructType({ hour: IntegerType, minute: IntegerType });
|
|
67
|
+
/** How long something takes: the time contract's minutes, hours, days, weeks or months, as a Float. */
|
|
68
|
+
export const ScheduleDurationType = TimeStepType;
|
|
69
|
+
/**
|
|
70
|
+
* Where a drop would put an event: what a builder's `canDrop` is asked.
|
|
71
|
+
*
|
|
72
|
+
* @property kind - The event kind's slot name
|
|
73
|
+
* @property from - What is dropped: a template's key, a backlog row's key, or an event's key
|
|
74
|
+
* @property start - Where it would start
|
|
75
|
+
* @property end - Where it would end
|
|
76
|
+
* @property resource - The resource it would be on, if any
|
|
77
|
+
*/
|
|
78
|
+
export const ScheduleCandidateType = StructType({
|
|
79
|
+
kind: StringType,
|
|
80
|
+
from: VariantType({ template: StringType, backlog: StringType, event: StringType }),
|
|
81
|
+
start: DateTimeType,
|
|
82
|
+
end: DateTimeType,
|
|
83
|
+
resource: OptionType(ScheduleResourceRefType),
|
|
84
|
+
});
|
|
85
|
+
// ============================================================================
|
|
86
|
+
// The kinds' wire
|
|
87
|
+
// ============================================================================
|
|
88
|
+
/**
|
|
89
|
+
* One event, as every view draws it.
|
|
90
|
+
*
|
|
91
|
+
* @property kind - Its kind's slot name
|
|
92
|
+
* @property key - Its record key's text
|
|
93
|
+
* @property title - Its title
|
|
94
|
+
* @property start - When it starts; `none` in the backlog
|
|
95
|
+
* @property end - When it ends; `none` in the backlog
|
|
96
|
+
* @property resource - The resource it is on, if any
|
|
97
|
+
* @property status - Its status, as its kind's `status` shows it
|
|
98
|
+
* @property minutes - Its length in minutes, or a backlog row's duration (a month counts 30 days)
|
|
99
|
+
* @property due - When it is due, for a backlog row
|
|
100
|
+
*/
|
|
101
|
+
export const ScheduleItemType = StructType({
|
|
102
|
+
kind: StringType,
|
|
103
|
+
key: StringType,
|
|
104
|
+
title: StringType,
|
|
105
|
+
start: OptionType(DateTimeType),
|
|
106
|
+
end: OptionType(DateTimeType),
|
|
107
|
+
resource: OptionType(ScheduleResourceRefType),
|
|
108
|
+
status: OptionType(ScheduleStatusType),
|
|
109
|
+
minutes: IntegerType,
|
|
110
|
+
due: OptionType(DateTimeType),
|
|
111
|
+
});
|
|
112
|
+
/**
|
|
113
|
+
* One field written into an event: its path, and its new value as bytes at
|
|
114
|
+
* the field's type — what an inspector edit writes, and each field a library
|
|
115
|
+
* card's drop sets (#1195).
|
|
116
|
+
*
|
|
117
|
+
* @property path - The field's path, a step per struct
|
|
118
|
+
* @property value - Its new value, as bytes at the field's type
|
|
119
|
+
*/
|
|
120
|
+
export const ScheduleFieldWriteType = StructType({ path: ArrayType(StringType), value: BlobType });
|
|
121
|
+
/**
|
|
122
|
+
* One gesture, as `write` takes it.
|
|
123
|
+
*
|
|
124
|
+
* @property place - A move, a resize or a schedule: the start, the end and the resource
|
|
125
|
+
* @property unplace - Back to the backlog: no start and no end
|
|
126
|
+
* @property field - An inspector edit: the field's path and its new value, as bytes at the field's type
|
|
127
|
+
* @property create - A template dropped: its key, and where the new event goes
|
|
128
|
+
*/
|
|
129
|
+
export const ScheduleGestureType = VariantType({
|
|
130
|
+
place: StructType({ start: DateTimeType, end: DateTimeType, resource: OptionType(ScheduleResourceRefType) }),
|
|
131
|
+
unplace: NullType,
|
|
132
|
+
field: ScheduleFieldWriteType,
|
|
133
|
+
create: StructType({ template: StringType, start: DateTimeType, end: DateTimeType, resource: OptionType(ScheduleResourceRefType) }),
|
|
134
|
+
});
|
|
135
|
+
/**
|
|
136
|
+
* One gesture, written into one entry through the kind's field names.
|
|
137
|
+
*
|
|
138
|
+
* @property id - The entry's id: its key's text
|
|
139
|
+
* @property entry - The entry as the gesture finds it, as bytes at the record's entry type; empty for a `create`
|
|
140
|
+
* @property gesture - The gesture
|
|
141
|
+
*/
|
|
142
|
+
export const ScheduleWriteType = StructType({ id: StringType, entry: BlobType, gesture: ScheduleGestureType });
|
|
143
|
+
/**
|
|
144
|
+
* One template, as the library lists it and a drop creates from it.
|
|
145
|
+
*
|
|
146
|
+
* @property key - Unique within its kind
|
|
147
|
+
* @property name - The card's name
|
|
148
|
+
* @property group - The library's group for it
|
|
149
|
+
* @property at - When it starts if dropped on a whole day
|
|
150
|
+
* @property duration - How long it runs
|
|
151
|
+
* @property values - A value for every field but the start, the end and the resource, as bytes
|
|
152
|
+
*/
|
|
153
|
+
export const ScheduleTemplateType = StructType({
|
|
154
|
+
key: StringType,
|
|
155
|
+
name: StringType,
|
|
156
|
+
group: OptionType(StringType),
|
|
157
|
+
at: OptionType(ScheduleClockType),
|
|
158
|
+
duration: ScheduleDurationType,
|
|
159
|
+
values: BlobType,
|
|
160
|
+
});
|
|
161
|
+
/**
|
|
162
|
+
* The drafts a seam reads, by entry id: each the entry's draft, as bytes at
|
|
163
|
+
* the kind's draft type (`Editing.Types.DraftField(R)`) — `value` the entry
|
|
164
|
+
* as drafted, `missing` an entry deleted.
|
|
165
|
+
*/
|
|
166
|
+
export const ScheduleDraftsType = DictType(StringType, BlobType);
|
|
167
|
+
/**
|
|
168
|
+
* One drafted entry, as a kind's `ready` reads it.
|
|
169
|
+
*
|
|
170
|
+
* @property id - The entry's id: its key's text
|
|
171
|
+
* @property entry - The drafted entry, as bytes at the record's entry type
|
|
172
|
+
*/
|
|
173
|
+
export const ScheduleReadyEntryType = StructType({ id: StringType, entry: BlobType });
|
|
174
|
+
/**
|
|
175
|
+
* A kind's record read by key, for a kind read a window at a time (#1199):
|
|
176
|
+
* what its editing session's base is — the record's revision — and how one
|
|
177
|
+
* event is read without the record whole.
|
|
178
|
+
*
|
|
179
|
+
* @property revision - The record's revision, `none` while it resolves: the snapshot every read of the record is at
|
|
180
|
+
* @property refresh - Moves every read of the record to a revision, or to the one it holds now
|
|
181
|
+
* @property entry - One event by its key's text: `none` while its read is in flight, `some(none)` for a key the record does not hold, else its row as bytes at the record's entry type
|
|
182
|
+
* @property last - The record's largest key's text — how a new Integer key is made past every key it holds: `none` while its read is in flight, `some(none)` for an empty record
|
|
183
|
+
*/
|
|
184
|
+
export const ScheduleEntriesType = StructType({
|
|
185
|
+
revision: FunctionType([], OptionType(StringType)),
|
|
186
|
+
refresh: FunctionType([OptionType(StringType)], NullType),
|
|
187
|
+
entry: FunctionType([StringType], OptionType(OptionType(BlobType))),
|
|
188
|
+
last: FunctionType([], OptionType(OptionType(StringType))),
|
|
189
|
+
});
|
|
190
|
+
/**
|
|
191
|
+
* Whether two events of a kind on one resource at once are a conflict.
|
|
192
|
+
*
|
|
193
|
+
* @property warn - They are: both wear a warn ring, and the overlaps count them (the default)
|
|
194
|
+
* @property allow - They are not: the kind's events run in parallel
|
|
195
|
+
*/
|
|
196
|
+
export const ScheduleOverlapsType = VariantType({ warn: NullType, allow: NullType });
|
|
197
|
+
/** One event and its full record row, read with the current drafts in place. */
|
|
198
|
+
export const ScheduleReadType = StructType({ item: ScheduleItemType, row: BlobType });
|
|
199
|
+
/** The fields whose edits are owned by the schedule section of an inspector. */
|
|
200
|
+
export const ScheduleRolesType = StructType({
|
|
201
|
+
title: StringType, start: StringType, end: StringType,
|
|
202
|
+
resource: OptionType(StringType), status: OptionType(StringType),
|
|
203
|
+
});
|
|
204
|
+
/**
|
|
205
|
+
* One event kind, closed: every row crosses as bytes at the record's own entry
|
|
206
|
+
* type, so a builder's payload is one type whatever the records hold.
|
|
207
|
+
*
|
|
208
|
+
* @property key - The kind's slot name
|
|
209
|
+
* @property name - Its name
|
|
210
|
+
* @property icon - Its Font Awesome icon
|
|
211
|
+
* @property takes - The resource kinds its events may be on
|
|
212
|
+
* @property status - How each case of its status shows
|
|
213
|
+
* @property backlog - Whether its rows with no time are its backlog
|
|
214
|
+
* @property templates - Its templates, for the library
|
|
215
|
+
* @property fields - The inspector's form over its other fields (`Fields`)
|
|
216
|
+
* @property items - Its events overlapping `[from, to)`, the drafts in place; `none` while a read is in flight
|
|
217
|
+
* @property unscheduled - Its backlog: the rows with no time, the drafts in place
|
|
218
|
+
* @property write - Each gesture into its entry's new bytes; `none` for a gesture the kind refuses
|
|
219
|
+
* @property ready - The author's check over drafted entries, one result each
|
|
220
|
+
* @property editing - The shared session over the record: its entry and key types, and its patch door — its base the record's snapshot, or for a kind read a window at a time (#1199) its revision
|
|
221
|
+
* @property entries - The record read by key, for a kind read a window at a time (#1199); `none` for a kind read whole
|
|
222
|
+
* @property history - The record's commits, newest first
|
|
223
|
+
*/
|
|
224
|
+
export const ScheduleKindType = StructType({
|
|
225
|
+
key: StringType,
|
|
226
|
+
name: StringType,
|
|
227
|
+
icon: StringType,
|
|
228
|
+
takes: ArrayType(StringType),
|
|
229
|
+
status: ArrayType(StructType({ case: StringType, status: ScheduleStatusType })),
|
|
230
|
+
backlog: BooleanType,
|
|
231
|
+
templates: ArrayType(ScheduleTemplateType),
|
|
232
|
+
fields: ArrayType(FieldSpecType),
|
|
233
|
+
items: FunctionType([DateTimeType, DateTimeType, ScheduleDraftsType], OptionType(ArrayType(ScheduleItemType))),
|
|
234
|
+
unscheduled: FunctionType([ScheduleDraftsType], OptionType(ArrayType(ScheduleItemType))),
|
|
235
|
+
write: FunctionType([ArrayType(ScheduleWriteType)], ArrayType(OptionType(BlobType))),
|
|
236
|
+
ready: OptionType(FunctionType([ArrayType(ScheduleReadyEntryType)], ArrayType(EditingReadinessType))),
|
|
237
|
+
editing: EditingType,
|
|
238
|
+
entries: OptionType(ScheduleEntriesType),
|
|
239
|
+
history: FunctionType([], OptionType(ArrayType(RecordCommitInfoType))),
|
|
240
|
+
/** One event and its row, read from the window or by key, with drafts applied. */
|
|
241
|
+
event: FunctionType([StringType, ScheduleDraftsType, DateTimeType, DateTimeType], OptionType(ScheduleReadType)),
|
|
242
|
+
/** The inspector's schedule fields. */
|
|
243
|
+
schedule: ScheduleRolesType,
|
|
244
|
+
/** Whether this kind participates in overlap warnings. */
|
|
245
|
+
overlaps: ScheduleOverlapsType,
|
|
246
|
+
/** The author's form in place of the default fields. */
|
|
247
|
+
inspector: OptionType(RowInspectorType),
|
|
248
|
+
});
|
|
249
|
+
/**
|
|
250
|
+
* One resource, resolved.
|
|
251
|
+
*
|
|
252
|
+
* @property key - Its key's text
|
|
253
|
+
* @property label - Its name
|
|
254
|
+
* @property meta - Its second line
|
|
255
|
+
*/
|
|
256
|
+
export const ScheduleResourceRowType = StructType({ key: StringType, label: StringType, meta: OptionType(StringType) });
|
|
257
|
+
/**
|
|
258
|
+
* One resource kind, its rows resolved.
|
|
259
|
+
*
|
|
260
|
+
* @property key - The kind's slot name
|
|
261
|
+
* @property name - Its name
|
|
262
|
+
* @property icon - Its Font Awesome icon
|
|
263
|
+
* @property rows - Its resources, in key order
|
|
264
|
+
*/
|
|
265
|
+
export const ScheduleResourcesType = StructType({
|
|
266
|
+
key: StringType,
|
|
267
|
+
name: StringType,
|
|
268
|
+
icon: StringType,
|
|
269
|
+
rows: ArrayType(ScheduleResourceRowType),
|
|
270
|
+
});
|
|
271
|
+
// ============================================================================
|
|
272
|
+
// The kinds as Plan's builder takes them (#1190)
|
|
273
|
+
// ============================================================================
|
|
274
|
+
/**
|
|
275
|
+
* One event as Plan draws it: what every view draws ({@link ScheduleItemType}),
|
|
276
|
+
* with its lifecycle, its quantity and its lane.
|
|
277
|
+
*
|
|
278
|
+
* @property state - The lifecycle it wears, from its kind's `state` field; confirmed when the kind has none
|
|
279
|
+
* @property quantity - Its kind's `quantity` field, with the kind's unit and format: what a bar prints and a parent's rollup sums
|
|
280
|
+
* @property lane - The lane its tile sits in, from its kind's `lane` field
|
|
281
|
+
*/
|
|
282
|
+
export const PlanEventItemType = StructType({
|
|
283
|
+
...ScheduleItemType.fields,
|
|
284
|
+
state: EventStateType,
|
|
285
|
+
quantity: OptionType(PlanQuantityType),
|
|
286
|
+
lane: OptionType(StringType),
|
|
287
|
+
});
|
|
288
|
+
/**
|
|
289
|
+
* One event read by its key, as a Plan's inspector shows it (#1197).
|
|
290
|
+
*
|
|
291
|
+
* @property item - The event as Plan draws it
|
|
292
|
+
* @property row - Its row, as bytes at the record's entry type: what the kind's form and its own inspector read
|
|
293
|
+
*/
|
|
294
|
+
export const PlanEventReadType = StructType({ item: PlanEventItemType, row: BlobType });
|
|
295
|
+
/**
|
|
296
|
+
* The fields an event kind's roles read on a Plan, by name: what a gesture
|
|
297
|
+
* writes to change one (a `field` gesture's path), and what the inspector
|
|
298
|
+
* draws in its own sections rather than in the kind's form.
|
|
299
|
+
*
|
|
300
|
+
* @property state - The `EventStateType` field
|
|
301
|
+
* @property quantity - The `Float` quantity field
|
|
302
|
+
* @property lane - The `String` lane field
|
|
303
|
+
*/
|
|
304
|
+
export const PlanEventRolesType = StructType({
|
|
305
|
+
state: OptionType(StringType),
|
|
306
|
+
quantity: OptionType(StringType),
|
|
307
|
+
lane: OptionType(StringType),
|
|
308
|
+
});
|
|
309
|
+
/**
|
|
310
|
+
* One event kind as Plan's builder takes it: the Calendar's closed kind
|
|
311
|
+
* ({@link ScheduleKindType}), field for field, with how the kind draws and its
|
|
312
|
+
* roles, its events as Plan draws them, and its own inspector.
|
|
313
|
+
*
|
|
314
|
+
* @property draw - How it draws: bars, tiles, chips or marks
|
|
315
|
+
* @property instant - Whether each of its events is one instant (`at`), its start and its end the same
|
|
316
|
+
* @property overlaps - Whether two of its events on one resource at once are a conflict
|
|
317
|
+
* @property roles - The fields its roles read
|
|
318
|
+
* @property planItems - Its events overlapping `[from, to)` as Plan draws them, the drafts in place; `none` while a read is in flight
|
|
319
|
+
* @property planUnscheduled - Its backlog as Plan draws it, the drafts in place
|
|
320
|
+
* @property planEvent - One event by its key's text, the drafts in place (#1197): as Plan draws it, and its row; `none` when there is no such event. A kind read a window at a time (#1199) looks for it first among the rows its windows hold over `[from, to)` — the range the canvas reads, where a gesture's event is drawn — and its backlog's, then reads it by its key, `none` while that read is in flight; a kind read whole takes no notice of the range
|
|
321
|
+
* @property inspector - Its own inspector for one event (PB60, #1197): the event's row and a writer of the edited row, as bytes, to what the inspector shows in place of the kind's form; `none`, the form
|
|
322
|
+
*/
|
|
323
|
+
export const PlanEventKindType = StructType({
|
|
324
|
+
...ScheduleKindType.fields,
|
|
325
|
+
draw: PlanDrawType,
|
|
326
|
+
instant: BooleanType,
|
|
327
|
+
overlaps: ScheduleOverlapsType,
|
|
328
|
+
roles: PlanEventRolesType,
|
|
329
|
+
planItems: FunctionType([DateTimeType, DateTimeType, ScheduleDraftsType], OptionType(ArrayType(PlanEventItemType))),
|
|
330
|
+
planUnscheduled: FunctionType([ScheduleDraftsType], OptionType(ArrayType(PlanEventItemType))),
|
|
331
|
+
planEvent: FunctionType([StringType, ScheduleDraftsType, DateTimeType, DateTimeType], OptionType(PlanEventReadType)),
|
|
332
|
+
inspector: OptionType(RowInspectorType),
|
|
333
|
+
});
|
|
334
|
+
/**
|
|
335
|
+
* One resource as Plan's builder takes it: what every view draws
|
|
336
|
+
* ({@link ScheduleResourceRowType}), with where it sits and its gutter.
|
|
337
|
+
*
|
|
338
|
+
* @property group - The group strip it sits under (a hall); `none` when the kind has no `group`
|
|
339
|
+
* @property parent - The key's text of the resource of its kind it nests under
|
|
340
|
+
* @property sub - The gutter's sub line
|
|
341
|
+
* @property value - The gutter's value slot
|
|
342
|
+
* @property status - The gutter's status dot
|
|
343
|
+
* @property collapsed - Whether it starts folded, when it has resources under it
|
|
344
|
+
*/
|
|
345
|
+
export const PlanResourceRowType = StructType({
|
|
346
|
+
...ScheduleResourceRowType.fields,
|
|
347
|
+
group: OptionType(StringType),
|
|
348
|
+
parent: OptionType(StringType),
|
|
349
|
+
sub: OptionType(StringType),
|
|
350
|
+
value: OptionType(StringType),
|
|
351
|
+
status: OptionType(StatusValueType),
|
|
352
|
+
collapsed: BooleanType,
|
|
353
|
+
});
|
|
354
|
+
/**
|
|
355
|
+
* One resource kind as Plan's builder takes it, its rows resolved.
|
|
356
|
+
*
|
|
357
|
+
* @property key - The kind's slot name
|
|
358
|
+
* @property name - Its name
|
|
359
|
+
* @property icon - Its Font Awesome icon
|
|
360
|
+
* @property rollup - How a parent's bands roll its children's events up
|
|
361
|
+
* @property measures - Its measures' keys, in order: the rows under each of its resources, each at its resource's path (#1197)
|
|
362
|
+
* @property rows - Its resources, in key order — none for a kind paged a window at a time (#1199)
|
|
363
|
+
* @property byKey - A paged kind's resource by its key's text (#1199): its window's key search for the key, then a one-row page, as Plan's builder takes it — `none` while either is in flight, `some(none)` for a key the kind does not have; `none` for a kind whose rows are listed
|
|
364
|
+
*/
|
|
365
|
+
export const PlanResourcesType = StructType({
|
|
366
|
+
key: StringType,
|
|
367
|
+
name: StringType,
|
|
368
|
+
icon: StringType,
|
|
369
|
+
rollup: PlanRollupType,
|
|
370
|
+
measures: ArrayType(StringType),
|
|
371
|
+
rows: ArrayType(PlanResourceRowType),
|
|
372
|
+
byKey: OptionType(FunctionType([StringType], OptionType(OptionType(PlanResourceRowType)))),
|
|
373
|
+
});
|
|
374
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/schedule/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAEH,OAAO,EACH,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EACrH,UAAU,EAAE,WAAW,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,+EAA+E;AAC/E,uBAAuB;AACvB,+EAA+E;AAE/E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AAKzF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AAKtF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM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E,UAAU,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;CAC7F,CAAC,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
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
|
+
* The window reader (#1199, `Calendar Spec.md` decision 9 and §3.4, `Plan
|
|
7
|
+
* Builder Spec.md` §9.11, PB54): an event kind's large record read a window
|
|
8
|
+
* at a time, through its record indexes, never whole — the days in view
|
|
9
|
+
* through an index on the days each event touches (`Schedule.days`), and the
|
|
10
|
+
* backlog through an index on the rows with no start (`Schedule.unscheduled`).
|
|
11
|
+
* The Calendar's windowed reads (#1156) and the Plan's are this one reader: a
|
|
12
|
+
* kind's seams read through it when the kind is given `window` or
|
|
13
|
+
* `backlogWindow`, and the record whole otherwise.
|
|
14
|
+
*
|
|
15
|
+
* - **A window** is a `Data.bindPaged(record, { index, join: true })` handle:
|
|
16
|
+
* its pages are the index's entries in the index's own order, each
|
|
17
|
+
* `{ ik, key, value, row }`, its `seek` the index's key search, and its
|
|
18
|
+
* revision the record's state, so a Save that moves the record moves the
|
|
19
|
+
* window, which reads again. Its type is checked at build
|
|
20
|
+
* ({@link checkIndexWindow}). Whether it joins each entry to its row can't
|
|
21
|
+
* be told from its type, so a read that meets an entry with no row refuses,
|
|
22
|
+
* naming `join: true`.
|
|
23
|
+
* - **The days of `[from, to)`**: the midnight of the first day is sought in
|
|
24
|
+
* the index (a `range` from it), and the pages are read from the one holding
|
|
25
|
+
* that row — each page from its start to the next page's, at the reader's
|
|
26
|
+
* own page size, so the pages a pan read before are the runtime's again —
|
|
27
|
+
* until an entry filed under a day the window does not reach, or the
|
|
28
|
+
* index's end. An event filed under several of the days is kept once, by
|
|
29
|
+
* its key.
|
|
30
|
+
* - **The backlog**: every page of the backlog index, from its start.
|
|
31
|
+
* - **One event by its key** — the inspector's, a draft's original, a Save's
|
|
32
|
+
* entries read back and a conflict's — through a paged read of the record's
|
|
33
|
+
* own entries (`entries`, `Data.bindPaged(record)`): its key sought, then a
|
|
34
|
+
* one-row page at the row the search found ({@link scheduleEntryByKey}).
|
|
35
|
+
* The index windows can't be sought by the record's key, as their key leads
|
|
36
|
+
* with the index's, and a kind can't open a read of the record's own entries
|
|
37
|
+
* itself: a paged read is declared where it is bound, which is what lets a
|
|
38
|
+
* `ui()` task read it at all.
|
|
39
|
+
* - **In flight**, the search or a page answers `none`, and so does the read:
|
|
40
|
+
* the reader keeps nothing between reads, and the read that asked is asked
|
|
41
|
+
* again when it lands.
|
|
42
|
+
*
|
|
43
|
+
* @packageDocumentation
|
|
44
|
+
*/
|
|
45
|
+
import { DateTimeType, DictType, NullType, OptionType, StringType, VariantType, type EastType, type ExprType, type FunctionType } from "@elaraai/east";
|
|
46
|
+
/**
|
|
47
|
+
* How many index entries the reader asks for at a time: each read starts at a
|
|
48
|
+
* whole multiple of it and ends at the next, so two windows that share a page
|
|
49
|
+
* share its read.
|
|
50
|
+
*/
|
|
51
|
+
export declare const SCHEDULE_INDEX_PAGE = 256n;
|
|
52
|
+
/** Which of a kind's windows: the days in view, or the backlog. */
|
|
53
|
+
export type ScheduleWindowProp = "window" | "backlogWindow";
|
|
54
|
+
/**
|
|
55
|
+
* Checks a kind's `window` or `backlogWindow` at build: a paged read of an
|
|
56
|
+
* index over the kind's own record, whose pages serve the index's entries —
|
|
57
|
+
* `Array<{ ik, key, value, row: Option<R> }>`, `ik` the index's key (a
|
|
58
|
+
* `DateTime` day for `window`, an `Option<DateTime>` due date for
|
|
59
|
+
* `backlogWindow`), `key` the record's key and `row` its row.
|
|
60
|
+
*
|
|
61
|
+
* @param window - The window, as the author gave it
|
|
62
|
+
* @param prop - Which window it is
|
|
63
|
+
* @param keyType - The record's key type
|
|
64
|
+
* @param rowType - The record's row type
|
|
65
|
+
* @param ik - The index key the window's entries are filed under
|
|
66
|
+
* @param where - The kind, as a refusal names it
|
|
67
|
+
* @returns The window, as an East expression
|
|
68
|
+
* @throws {Error} Naming the window, the index it reads through and what it serves instead
|
|
69
|
+
*/
|
|
70
|
+
export declare function checkIndexWindow(window: unknown, prop: ScheduleWindowProp, keyType: EastType, rowType: EastType, ik: EastType, where: string): ExprType<EastType>;
|
|
71
|
+
/**
|
|
72
|
+
* The words a read refuses a window in when it meets an entry with no row:
|
|
73
|
+
* the window reads the index alone, not each entry's row.
|
|
74
|
+
*
|
|
75
|
+
* @param where - The kind, as a refusal names it
|
|
76
|
+
* @param prop - Which window it is
|
|
77
|
+
* @returns The refusal
|
|
78
|
+
*/
|
|
79
|
+
export declare function joinRefusal(where: string, prop: ScheduleWindowProp): string;
|
|
80
|
+
/**
|
|
81
|
+
* Reads the days of `[from, to)` through a kind's day index (see the module
|
|
82
|
+
* docs): the rows filed under them, each once, by the record's key.
|
|
83
|
+
*
|
|
84
|
+
* @param window - The kind's `window`, checked ({@link checkIndexWindow})
|
|
85
|
+
* @param keyType - The record's key type
|
|
86
|
+
* @param rowType - The record's row type
|
|
87
|
+
* @param where - The kind, as a refusal names it
|
|
88
|
+
* @returns `(from, to)` → the rows, by key; `none` while the search or a page is in flight
|
|
89
|
+
*/
|
|
90
|
+
export declare function scheduleDayWindow(window: ExprType<EastType>, keyType: EastType, rowType: EastType, where: string): ExprType<FunctionType<[DateTimeType, DateTimeType], OptionType<DictType<EastType, EastType>>>>;
|
|
91
|
+
/**
|
|
92
|
+
* Reads a kind's backlog through its backlog index (see the module docs):
|
|
93
|
+
* the rows the index files, each once, by the record's key.
|
|
94
|
+
*
|
|
95
|
+
* @param window - The kind's `backlogWindow`, checked ({@link checkIndexWindow})
|
|
96
|
+
* @param keyType - The record's key type
|
|
97
|
+
* @param rowType - The record's row type
|
|
98
|
+
* @param where - The kind, as a refusal names it
|
|
99
|
+
* @returns `()` → the rows, by key; `none` while a page is in flight
|
|
100
|
+
*/
|
|
101
|
+
export declare function scheduleBacklogWindow(window: ExprType<EastType>, keyType: EastType, rowType: EastType, where: string): ExprType<FunctionType<[], OptionType<DictType<EastType, EastType>>>>;
|
|
102
|
+
/**
|
|
103
|
+
* Checks a paged read of a record's own entries at build (#1199): the record's
|
|
104
|
+
* entries by key, `Data.bindPaged(record)`, which names the snapshot its reads
|
|
105
|
+
* are at — what a kind given `window` reads one event by, and a paged resource
|
|
106
|
+
* kind its resources.
|
|
107
|
+
*
|
|
108
|
+
* @param entries - The read, as the author gave it
|
|
109
|
+
* @param keyType - The record's key type
|
|
110
|
+
* @param rowType - The record's row type
|
|
111
|
+
* @param where - What reads it, as a refusal names it: the option and its kind
|
|
112
|
+
* @returns The read, as an East expression
|
|
113
|
+
* @throws {Error} Naming what it serves instead: the entries whole, an index's window, another collection, or a read that names no snapshot
|
|
114
|
+
*/
|
|
115
|
+
export declare function checkEntries(entries: unknown, keyType: EastType, rowType: EastType, where: string): ExprType<EastType>;
|
|
116
|
+
/**
|
|
117
|
+
* One entry of a record read by its key (#1199): its read still in flight, the
|
|
118
|
+
* key the record does not hold, or the entry held — its row.
|
|
119
|
+
*
|
|
120
|
+
* @param rowType - The record's row type
|
|
121
|
+
* @returns The variant
|
|
122
|
+
*/
|
|
123
|
+
export declare function ScheduleKeyReadType<R extends EastType>(rowType: R): VariantType<{
|
|
124
|
+
reading: NullType;
|
|
125
|
+
absent: NullType;
|
|
126
|
+
held: R;
|
|
127
|
+
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Reads one entry of a record by its key through a paged read of the record's
|
|
130
|
+
* own entries (#1199): the key sought — the `.east` literal of the key its text
|
|
131
|
+
* names — then a one-row page at the row the search found.
|
|
132
|
+
*
|
|
133
|
+
* @param entries - The read, checked ({@link checkEntries})
|
|
134
|
+
* @param keyType - The record's key type
|
|
135
|
+
* @param rowType - The record's row type
|
|
136
|
+
* @returns `(id)` → the entry's row, held; `absent` for a key the record does not hold; `reading` while the search or the page is in flight
|
|
137
|
+
*/
|
|
138
|
+
export declare function scheduleEntryByKey(entries: ExprType<EastType>, keyType: EastType, rowType: EastType): ExprType<FunctionType<[StringType], VariantType<{
|
|
139
|
+
reading: NullType;
|
|
140
|
+
absent: NullType;
|
|
141
|
+
held: EastType;
|
|
142
|
+
}>>>;
|
|
143
|
+
/**
|
|
144
|
+
* Reads the largest key of a record through a paged read of its own entries
|
|
145
|
+
* (#1199) — the last entry, as the read serves them in key order: how a new
|
|
146
|
+
* Integer key is made past every key the record holds, which no window of it
|
|
147
|
+
* says.
|
|
148
|
+
*
|
|
149
|
+
* @param entries - The read, checked ({@link checkEntries})
|
|
150
|
+
* @param keyType - The record's key type
|
|
151
|
+
* @returns `()` → `some(some(text))`, the largest key's text; `some(none)` for an empty record; `none` while a read is in flight
|
|
152
|
+
*/
|
|
153
|
+
export declare function scheduleLastKey(entries: ExprType<EastType>, keyType: EastType): ExprType<FunctionType<[], OptionType<OptionType<StringType>>>>;
|
|
154
|
+
//# sourceMappingURL=window.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/schedule/window.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EACH,YAAY,EAAE,QAAQ,EAA2B,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAC9E,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAClE,MAAM,eAAe,CAAC;AAIvB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAWxC,mEAAmE;AACnE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,eAAe,CAAC;AAoB5D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC5B,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB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