@elaraai/e3-ui 1.0.97 → 1.0.99
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/README.md +0 -2
- package/dist/src/allocation/adapters.d.ts +1 -1
- package/dist/src/allocation/adapters.js +1 -1
- package/dist/src/allocation/index.d.ts +232 -25
- package/dist/src/allocation/index.d.ts.map +1 -1
- package/dist/src/allocation/index.js +35 -6
- package/dist/src/allocation/index.js.map +1 -1
- package/dist/src/allocation/types.d.ts +41 -0
- package/dist/src/allocation/types.d.ts.map +1 -1
- package/dist/src/allocation/types.js +35 -0
- package/dist/src/allocation/types.js.map +1 -1
- package/dist/src/bind/data-indexed.d.ts +286 -37
- package/dist/src/bind/data-indexed.d.ts.map +1 -1
- package/dist/src/bind/data-indexed.js +259 -38
- package/dist/src/bind/data-indexed.js.map +1 -1
- package/dist/src/bind/data.d.ts +48 -9
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +48 -3
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/record.d.ts +61 -24
- package/dist/src/bind/record.d.ts.map +1 -1
- package/dist/src/bind/record.js +17 -57
- package/dist/src/bind/record.js.map +1 -1
- package/dist/src/calendar/index.d.ts +522 -36
- package/dist/src/calendar/index.d.ts.map +1 -1
- package/dist/src/calendar/index.js +53 -13
- package/dist/src/calendar/index.js.map +1 -1
- package/dist/src/calendar/paged.d.ts +89 -0
- package/dist/src/calendar/paged.d.ts.map +1 -0
- package/dist/src/calendar/paged.js +148 -0
- package/dist/src/calendar/paged.js.map +1 -0
- package/dist/src/flowchart/index.d.ts +35 -31
- package/dist/src/flowchart/index.d.ts.map +1 -1
- package/dist/src/flowchart/index.js +35 -31
- package/dist/src/flowchart/index.js.map +1 -1
- package/dist/src/flowchart/library.d.ts +108 -84
- package/dist/src/flowchart/library.d.ts.map +1 -1
- package/dist/src/flowchart/library.js +108 -84
- package/dist/src/flowchart/library.js.map +1 -1
- package/dist/src/flowchart/payload.d.ts +105 -17
- package/dist/src/flowchart/payload.d.ts.map +1 -1
- package/dist/src/flowchart/payload.js +3 -3
- package/dist/src/flowchart/payload.js.map +1 -1
- package/dist/src/flowchart/values.d.ts +35 -31
- package/dist/src/flowchart/values.d.ts.map +1 -1
- package/dist/src/flowchart/values.js +35 -31
- package/dist/src/flowchart/values.js.map +1 -1
- package/dist/src/flowchart/window.d.ts.map +1 -1
- package/dist/src/flowchart/window.js +3 -2
- package/dist/src/flowchart/window.js.map +1 -1
- package/dist/src/index.d.ts +13 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +20 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +18 -8
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +40 -10
- package/dist/src/internal.js.map +1 -1
- package/dist/src/plan/assemble.d.ts +8 -0
- package/dist/src/plan/assemble.d.ts.map +1 -1
- package/dist/src/plan/assemble.js +1 -1
- package/dist/src/plan/assemble.js.map +1 -1
- package/dist/src/plan/builders.d.ts +1530 -10
- package/dist/src/plan/builders.d.ts.map +1 -1
- package/dist/src/plan/builders.js +260 -122
- package/dist/src/plan/builders.js.map +1 -1
- package/dist/src/plan/event-rows.d.ts +224 -157
- package/dist/src/plan/event-rows.d.ts.map +1 -1
- package/dist/src/plan/event-rows.js +201 -56
- package/dist/src/plan/event-rows.js.map +1 -1
- package/dist/src/plan/factories.d.ts +72 -4
- package/dist/src/plan/factories.d.ts.map +1 -1
- package/dist/src/plan/factories.js +147 -1
- package/dist/src/plan/factories.js.map +1 -1
- package/dist/src/plan/index.d.ts +152 -125
- package/dist/src/plan/index.d.ts.map +1 -1
- package/dist/src/plan/index.js +138 -122
- package/dist/src/plan/index.js.map +1 -1
- package/dist/src/plan/ir.d.ts +1139 -8
- package/dist/src/plan/ir.d.ts.map +1 -1
- package/dist/src/plan/ir.js +5 -0
- package/dist/src/plan/ir.js.map +1 -1
- package/dist/src/plan/library.d.ts +65 -42
- package/dist/src/plan/library.d.ts.map +1 -1
- package/dist/src/plan/library.js +65 -42
- package/dist/src/plan/library.js.map +1 -1
- package/dist/src/plan/nested-checks.d.ts +146 -0
- package/dist/src/plan/nested-checks.d.ts.map +1 -0
- package/dist/src/plan/nested-checks.js +468 -0
- package/dist/src/plan/nested-checks.js.map +1 -0
- package/dist/src/plan/nested-patch.d.ts +35 -0
- package/dist/src/plan/nested-patch.d.ts.map +1 -0
- package/dist/src/plan/nested-patch.js +143 -0
- package/dist/src/plan/nested-patch.js.map +1 -0
- package/dist/src/plan/nested-read.d.ts +3250 -0
- package/dist/src/plan/nested-read.d.ts.map +1 -0
- package/dist/src/plan/nested-read.js +163 -0
- package/dist/src/plan/nested-read.js.map +1 -0
- package/dist/src/plan/nested.d.ts +280 -0
- package/dist/src/plan/nested.d.ts.map +1 -0
- package/dist/src/plan/nested.js +6 -0
- package/dist/src/plan/nested.js.map +1 -0
- package/dist/src/plan/ordered-source.d.ts +3067 -1
- package/dist/src/plan/ordered-source.d.ts.map +1 -1
- package/dist/src/plan/ordered-source.js +67 -17
- package/dist/src/plan/ordered-source.js.map +1 -1
- package/dist/src/plan/over.d.ts +111 -75
- package/dist/src/plan/over.d.ts.map +1 -1
- package/dist/src/plan/over.js +111 -75
- package/dist/src/plan/over.js.map +1 -1
- package/dist/src/plan/pick.d.ts +15 -3
- package/dist/src/plan/pick.d.ts.map +1 -1
- package/dist/src/plan/pick.js +75 -36
- package/dist/src/plan/pick.js.map +1 -1
- package/dist/src/plan/plan.d.ts +3143 -501
- package/dist/src/plan/plan.d.ts.map +1 -1
- package/dist/src/plan/plan.js +133 -34
- package/dist/src/plan/plan.js.map +1 -1
- package/dist/src/plan/reads.d.ts +421 -0
- package/dist/src/plan/reads.d.ts.map +1 -0
- package/dist/src/plan/reads.js +143 -0
- package/dist/src/plan/reads.js.map +1 -0
- package/dist/src/plan/refs.d.ts +111 -75
- package/dist/src/plan/refs.d.ts.map +1 -1
- package/dist/src/plan/refs.js +111 -75
- package/dist/src/plan/refs.js.map +1 -1
- package/dist/src/plan/root.d.ts +14 -7
- package/dist/src/plan/root.d.ts.map +1 -1
- package/dist/src/plan/root.js +82 -17
- package/dist/src/plan/root.js.map +1 -1
- package/dist/src/plan/series.d.ts +5153 -4331
- package/dist/src/plan/series.d.ts.map +1 -1
- package/dist/src/plan/series.js +1082 -266
- package/dist/src/plan/series.js.map +1 -1
- package/dist/src/plan/shade.d.ts +981 -0
- package/dist/src/plan/shade.d.ts.map +1 -0
- package/dist/src/plan/shade.js +60 -0
- package/dist/src/plan/shade.js.map +1 -0
- package/dist/src/plan/types.d.ts +192 -18
- package/dist/src/plan/types.d.ts.map +1 -1
- package/dist/src/plan/types.js +77 -19
- package/dist/src/plan/types.js.map +1 -1
- package/dist/src/query/builder.d.ts +3 -3
- package/dist/src/query/builder.d.ts.map +1 -1
- package/dist/src/query/builder.js +1 -1
- package/dist/src/query/library.d.ts +3 -3
- package/dist/src/query/library.d.ts.map +1 -1
- package/dist/src/query/library.js +1 -1
- package/dist/src/query/queries.d.ts +2 -2
- package/dist/src/query/queries.js +1 -1
- package/dist/src/query/saved.d.ts +8 -4
- package/dist/src/query/saved.d.ts.map +1 -1
- package/dist/src/query/saved.js +8 -4
- package/dist/src/query/saved.js.map +1 -1
- package/dist/src/query/types.d.ts +8 -3
- package/dist/src/query/types.d.ts.map +1 -1
- package/dist/src/query/types.js +8 -3
- package/dist/src/query/types.js.map +1 -1
- package/dist/src/roster/index.d.ts +583 -39
- package/dist/src/roster/index.d.ts.map +1 -1
- package/dist/src/roster/index.js +109 -35
- package/dist/src/roster/index.js.map +1 -1
- package/dist/src/roster/library.d.ts +12 -2
- package/dist/src/roster/library.d.ts.map +1 -1
- package/dist/src/roster/library.js +8 -0
- package/dist/src/roster/library.js.map +1 -1
- package/dist/src/roster/lists.d.ts +59 -12
- package/dist/src/roster/lists.d.ts.map +1 -1
- package/dist/src/roster/lists.js +51 -58
- package/dist/src/roster/lists.js.map +1 -1
- package/dist/src/roster/targets.d.ts +8 -4
- package/dist/src/roster/targets.d.ts.map +1 -1
- package/dist/src/roster/targets.js +9 -5
- package/dist/src/roster/targets.js.map +1 -1
- package/dist/src/roster/times.d.ts +402 -0
- package/dist/src/roster/times.d.ts.map +1 -1
- package/dist/src/roster/types.d.ts +913 -1
- package/dist/src/roster/types.d.ts.map +1 -1
- package/dist/src/roster/types.js +43 -3
- package/dist/src/roster/types.js.map +1 -1
- package/dist/src/schedule/cell-checks.d.ts +85 -0
- package/dist/src/schedule/cell-checks.d.ts.map +1 -0
- package/dist/src/schedule/cell-checks.js +211 -0
- package/dist/src/schedule/cell-checks.js.map +1 -0
- package/dist/src/schedule/days.d.ts +1 -1
- package/dist/src/schedule/days.js +1 -1
- package/dist/src/schedule/events.d.ts +52 -16
- package/dist/src/schedule/events.d.ts.map +1 -1
- package/dist/src/schedule/events.js +574 -356
- package/dist/src/schedule/events.js.map +1 -1
- package/dist/src/schedule/fields.d.ts +134 -0
- package/dist/src/schedule/fields.d.ts.map +1 -0
- package/dist/src/schedule/fields.js +207 -0
- package/dist/src/schedule/fields.js.map +1 -0
- package/dist/src/schedule/library.d.ts +11 -3
- package/dist/src/schedule/library.d.ts.map +1 -1
- package/dist/src/schedule/library.js +9 -6
- package/dist/src/schedule/library.js.map +1 -1
- package/dist/src/schedule/optimise.d.ts +124 -0
- package/dist/src/schedule/optimise.d.ts.map +1 -0
- package/dist/src/schedule/optimise.js +140 -0
- package/dist/src/schedule/optimise.js.map +1 -0
- package/dist/src/schedule/pages.d.ts +76 -0
- package/dist/src/schedule/pages.d.ts.map +1 -0
- package/dist/src/schedule/pages.js +86 -0
- package/dist/src/schedule/pages.js.map +1 -0
- package/dist/src/schedule/patch.d.ts +1 -1
- package/dist/src/schedule/patch.js +1 -1
- package/dist/src/schedule/periods.d.ts +8 -4
- package/dist/src/schedule/periods.d.ts.map +1 -1
- package/dist/src/schedule/periods.js +1 -1
- package/dist/src/schedule/periods.js.map +1 -1
- package/dist/src/schedule/record-window.d.ts +115 -22
- package/dist/src/schedule/record-window.d.ts.map +1 -1
- package/dist/src/schedule/record-window.js +140 -62
- package/dist/src/schedule/record-window.js.map +1 -1
- package/dist/src/schedule/resources.d.ts +9 -5
- package/dist/src/schedule/resources.d.ts.map +1 -1
- package/dist/src/schedule/resources.js +35 -15
- package/dist/src/schedule/resources.js.map +1 -1
- package/dist/src/schedule/session.d.ts +15 -1
- package/dist/src/schedule/session.d.ts.map +1 -1
- package/dist/src/schedule/session.js +30 -18
- package/dist/src/schedule/session.js.map +1 -1
- package/dist/src/schedule/types.d.ts +455 -37
- package/dist/src/schedule/types.d.ts.map +1 -1
- package/dist/src/schedule/types.js +79 -18
- package/dist/src/schedule/types.js.map +1 -1
- package/dist/src/schedule/window.d.ts +30 -9
- package/dist/src/schedule/window.d.ts.map +1 -1
- package/dist/src/schedule/window.js +101 -49
- package/dist/src/schedule/window.js.map +1 -1
- package/dist/src/schematic/index.d.ts +287 -0
- package/dist/src/schematic/index.d.ts.map +1 -0
- package/dist/src/schematic/index.js +216 -0
- package/dist/src/schematic/index.js.map +1 -0
- package/dist/src/schematic/kinds.d.ts +501 -0
- package/dist/src/schematic/kinds.d.ts.map +1 -0
- package/dist/src/schematic/kinds.js +1027 -0
- package/dist/src/schematic/kinds.js.map +1 -0
- package/dist/src/schematic/layers.d.ts +74 -0
- package/dist/src/schematic/layers.d.ts.map +1 -0
- package/dist/src/schematic/layers.js +99 -0
- package/dist/src/schematic/layers.js.map +1 -0
- package/dist/src/schematic/library.d.ts +202 -0
- package/dist/src/schematic/library.d.ts.map +1 -0
- package/dist/src/schematic/library.js +244 -0
- package/dist/src/schematic/library.js.map +1 -0
- package/dist/src/schematic/payload.d.ts +8310 -0
- package/dist/src/schematic/payload.d.ts.map +1 -0
- package/dist/src/schematic/payload.js +446 -0
- package/dist/src/schematic/payload.js.map +1 -0
- package/dist/src/schematic/schematic.d.ts +27 -0
- package/dist/src/schematic/schematic.d.ts.map +1 -0
- package/dist/src/schematic/schematic.js +17 -0
- package/dist/src/schematic/schematic.js.map +1 -0
- package/dist/src/schematic/shapes.d.ts +150 -0
- package/dist/src/schematic/shapes.d.ts.map +1 -0
- package/dist/src/schematic/shapes.js +171 -0
- package/dist/src/schematic/shapes.js.map +1 -0
- package/dist/src/schematic/templates.d.ts +96 -0
- package/dist/src/schematic/templates.d.ts.map +1 -0
- package/dist/src/schematic/templates.js +91 -0
- package/dist/src/schematic/templates.js.map +1 -0
- package/dist/src/schematic/types.d.ts +5766 -0
- package/dist/src/schematic/types.d.ts.map +1 -0
- package/dist/src/schematic/types.js +688 -0
- package/dist/src/schematic/types.js.map +1 -0
- package/dist/src/schematic/window.d.ts +213 -0
- package/dist/src/schematic/window.d.ts.map +1 -0
- package/dist/src/schematic/window.js +340 -0
- package/dist/src/schematic/window.js.map +1 -0
- package/dist/src/sheet/bridge.d.ts +19 -0
- package/dist/src/sheet/bridge.d.ts.map +1 -1
- package/dist/src/sheet/bridge.js +28 -21
- package/dist/src/sheet/bridge.js.map +1 -1
- package/dist/src/sheet/editing-bridge.d.ts +4 -2
- package/dist/src/sheet/editing-bridge.d.ts.map +1 -1
- package/dist/src/sheet/editing-bridge.js +8 -2
- package/dist/src/sheet/editing-bridge.js.map +1 -1
- package/dist/src/sheet/editing-types.d.ts +9 -5
- package/dist/src/sheet/editing-types.d.ts.map +1 -1
- package/dist/src/sheet/editing-types.js +9 -5
- package/dist/src/sheet/editing-types.js.map +1 -1
- package/dist/src/sheet/index.d.ts +84 -54
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/index.js +81 -53
- package/dist/src/sheet/index.js.map +1 -1
- package/dist/src/sheet/library.d.ts +13 -8
- package/dist/src/sheet/library.d.ts.map +1 -1
- package/dist/src/sheet/library.js +13 -8
- package/dist/src/sheet/library.js.map +1 -1
- package/dist/src/sheet/optimise.d.ts +69 -0
- package/dist/src/sheet/optimise.d.ts.map +1 -0
- package/dist/src/sheet/optimise.js +81 -0
- package/dist/src/sheet/optimise.js.map +1 -0
- package/dist/src/sheet/record.d.ts +1 -1
- package/dist/src/sheet/record.js +2 -2
- package/dist/src/sheet/record.js.map +1 -1
- package/dist/src/sheet/registers.d.ts +157 -133
- package/dist/src/sheet/registers.d.ts.map +1 -1
- package/dist/src/sheet/registers.js +157 -133
- package/dist/src/sheet/registers.js.map +1 -1
- package/dist/src/sheet/root.d.ts +6 -1
- package/dist/src/sheet/root.d.ts.map +1 -1
- package/dist/src/sheet/root.js +17 -5
- package/dist/src/sheet/root.js.map +1 -1
- package/dist/src/sheet/sheet.d.ts +696 -590
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +49 -15
- package/dist/src/sheet/sheet.js.map +1 -1
- package/dist/src/sheet/sub-rows.d.ts +106 -76
- package/dist/src/sheet/sub-rows.d.ts.map +1 -1
- package/dist/src/sheet/sub-rows.js +106 -76
- package/dist/src/sheet/sub-rows.js.map +1 -1
- package/dist/src/sheet/types.d.ts +57 -20
- package/dist/src/sheet/types.d.ts.map +1 -1
- package/dist/src/sheet/types.js +4 -8
- package/dist/src/sheet/types.js.map +1 -1
- package/dist/src/studio/builder.d.ts +3 -153
- package/dist/src/studio/builder.d.ts.map +1 -1
- package/dist/src/studio/builder.js +1 -1
- package/dist/src/studio/canvas.d.ts +5 -4
- package/dist/src/studio/canvas.d.ts.map +1 -1
- package/dist/src/studio/canvas.js +8 -7
- package/dist/src/studio/canvas.js.map +1 -1
- package/dist/src/studio/component.d.ts +30 -20
- package/dist/src/studio/component.d.ts.map +1 -1
- package/dist/src/studio/component.js +26 -61
- package/dist/src/studio/component.js.map +1 -1
- package/dist/src/studio/index.d.ts +2 -2
- package/dist/src/studio/index.d.ts.map +1 -1
- package/dist/src/studio/index.js +1 -1
- package/dist/src/studio/index.js.map +1 -1
- package/dist/src/studio/inspector.d.ts +10 -39
- package/dist/src/studio/inspector.d.ts.map +1 -1
- package/dist/src/studio/inspector.js +11 -31
- package/dist/src/studio/inspector.js.map +1 -1
- package/dist/src/studio/library.d.ts +3 -169
- package/dist/src/studio/library.d.ts.map +1 -1
- package/dist/src/studio/library.js +1 -1
- package/dist/src/studio/page.d.ts +0 -8
- package/dist/src/studio/page.d.ts.map +1 -1
- package/dist/src/studio/pages.d.ts +17 -591
- package/dist/src/studio/pages.d.ts.map +1 -1
- package/dist/src/studio/pages.js +17 -44
- package/dist/src/studio/pages.js.map +1 -1
- package/dist/src/studio/palette.d.ts +2 -7
- package/dist/src/studio/palette.d.ts.map +1 -1
- package/dist/src/studio/palette.js +4 -5
- package/dist/src/studio/palette.js.map +1 -1
- package/dist/src/studio/publish.d.ts +8 -18
- package/dist/src/studio/publish.d.ts.map +1 -1
- package/dist/src/studio/publish.js +10 -36
- package/dist/src/studio/publish.js.map +1 -1
- package/dist/src/utils/derive.d.ts +12 -12
- package/dist/src/utils/derive.d.ts.map +1 -1
- package/dist/src/utils/derive.js +5 -2
- package/dist/src/utils/derive.js.map +1 -1
- package/dist/src/utils/keyed-rows.d.ts +41 -0
- package/dist/src/utils/keyed-rows.d.ts.map +1 -0
- package/dist/src/utils/keyed-rows.js +64 -0
- package/dist/src/utils/keyed-rows.js.map +1 -0
- package/dist/src/utils/optimise.d.ts +79 -0
- package/dist/src/utils/optimise.d.ts.map +1 -0
- package/dist/src/utils/optimise.js +46 -0
- package/dist/src/utils/optimise.js.map +1 -0
- package/dist/src/utils/ordered-source.d.ts.map +1 -1
- package/dist/src/utils/ordered-source.js +14 -5
- package/dist/src/utils/ordered-source.js.map +1 -1
- package/dist/test/allocation/allocation.examples.d.ts +1900 -1610
- package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
- package/dist/test/allocation/allocation.examples.js +179 -89
- package/dist/test/allocation/allocation.examples.js.map +1 -1
- package/dist/test/allocation/optimise.examples.d.ts +109 -0
- package/dist/test/allocation/optimise.examples.d.ts.map +1 -0
- package/dist/test/allocation/optimise.examples.js +223 -0
- package/dist/test/allocation/optimise.examples.js.map +1 -0
- package/dist/test/bind/data/data.examples.d.ts +1172 -514
- package/dist/test/bind/data/data.examples.d.ts.map +1 -1
- package/dist/test/bind/data/data.examples.js +284 -164
- package/dist/test/bind/data/data.examples.js.map +1 -1
- package/dist/test/bind/record/record.examples.d.ts +457 -428
- package/dist/test/bind/record/record.examples.d.ts.map +1 -1
- package/dist/test/bind/record/record.examples.js +41 -21
- package/dist/test/bind/record/record.examples.js.map +1 -1
- package/dist/test/calendar/calendar-records.examples.d.ts +162 -170
- package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar-records.examples.js +20 -12
- package/dist/test/calendar/calendar-records.examples.js.map +1 -1
- package/dist/test/calendar/calendar-windows.examples.d.ts +9 -0
- package/dist/test/calendar/calendar-windows.examples.d.ts.map +1 -0
- package/dist/test/calendar/calendar-windows.examples.js +111 -0
- package/dist/test/calendar/calendar-windows.examples.js.map +1 -0
- package/dist/test/calendar/calendar.examples.d.ts +1172 -915
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar.examples.js +211 -124
- package/dist/test/calendar/calendar.examples.js.map +1 -1
- package/dist/test/calendar/optimise.examples.d.ts +132 -0
- package/dist/test/calendar/optimise.examples.d.ts.map +1 -0
- package/dist/test/calendar/optimise.examples.js +75 -0
- package/dist/test/calendar/optimise.examples.js.map +1 -0
- package/dist/test/examples-package.d.ts +49 -16
- package/dist/test/examples-package.d.ts.map +1 -1
- package/dist/test/examples-package.js +138 -49
- package/dist/test/examples-package.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +3841 -2840
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
- package/dist/test/flowchart/flowchart.examples.js +211 -121
- package/dist/test/flowchart/flowchart.examples.js.map +1 -1
- package/dist/test/plan/optimise.examples.d.ts +207 -0
- package/dist/test/plan/optimise.examples.d.ts.map +1 -0
- package/dist/test/plan/optimise.examples.js +98 -0
- package/dist/test/plan/optimise.examples.js.map +1 -0
- package/dist/test/plan/plan-events.examples.d.ts +4055 -3279
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-events.examples.js +492 -319
- package/dist/test/plan/plan-events.examples.js.map +1 -1
- package/dist/test/plan/plan-nested.examples.d.ts +1829 -0
- package/dist/test/plan/plan-nested.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-nested.examples.js +321 -0
- package/dist/test/plan/plan-nested.examples.js.map +1 -0
- package/dist/test/plan/plan-records.examples.d.ts +391 -244
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-records.examples.js +186 -65
- package/dist/test/plan/plan-records.examples.js.map +1 -1
- package/dist/test/plan/plan-windows.examples.d.ts +1978 -803
- package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-windows.examples.js +269 -99
- package/dist/test/plan/plan-windows.examples.js.map +1 -1
- package/dist/test/plan/plan.examples.d.ts +2238 -5726
- package/dist/test/plan/plan.examples.d.ts.map +1 -1
- package/dist/test/plan/plan.examples.js +846 -973
- package/dist/test/plan/plan.examples.js.map +1 -1
- package/dist/test/query/query.examples.d.ts +5221 -3005
- package/dist/test/query/query.examples.d.ts.map +1 -1
- package/dist/test/query/query.examples.js +169 -118
- package/dist/test/query/query.examples.js.map +1 -1
- package/dist/test/roster/domain.examples.d.ts +804 -0
- package/dist/test/roster/domain.examples.d.ts.map +1 -1
- package/dist/test/roster/domain.examples.js +3 -3
- package/dist/test/roster/domain.examples.js.map +1 -1
- package/dist/test/roster/optimise.examples.d.ts +485 -0
- package/dist/test/roster/optimise.examples.d.ts.map +1 -0
- package/dist/test/roster/optimise.examples.js +155 -0
- package/dist/test/roster/optimise.examples.js.map +1 -0
- package/dist/test/roster/roster-records.examples.d.ts +364 -404
- package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
- package/dist/test/roster/roster-records.examples.js +40 -26
- package/dist/test/roster/roster-records.examples.js.map +1 -1
- package/dist/test/roster/roster.examples.d.ts +5091 -1424
- package/dist/test/roster/roster.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.js +255 -109
- package/dist/test/roster/roster.examples.js.map +1 -1
- package/dist/test/roster/warehouse.d.ts +150 -7
- package/dist/test/roster/warehouse.d.ts.map +1 -1
- package/dist/test/roster/warehouse.js +36 -11
- package/dist/test/roster/warehouse.js.map +1 -1
- package/dist/test/schedule/schedule.examples.d.ts +2646 -2473
- package/dist/test/schedule/schedule.examples.d.ts.map +1 -1
- package/dist/test/schedule/schedule.examples.js +144 -88
- package/dist/test/schedule/schedule.examples.js.map +1 -1
- package/dist/test/schematic/schematic-records.examples.d.ts +454 -0
- package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -0
- package/dist/test/schematic/schematic-records.examples.js +219 -0
- package/dist/test/schematic/schematic-records.examples.js.map +1 -0
- package/dist/test/schematic/schematic.examples.d.ts +2640 -0
- package/dist/test/schematic/schematic.examples.d.ts.map +1 -0
- package/dist/test/schematic/schematic.examples.js +559 -0
- package/dist/test/schematic/schematic.examples.js.map +1 -0
- package/dist/test/sheet/optimise.examples.d.ts +184 -0
- package/dist/test/sheet/optimise.examples.d.ts.map +1 -0
- package/dist/test/sheet/optimise.examples.js +79 -0
- package/dist/test/sheet/optimise.examples.js.map +1 -0
- package/dist/test/sheet/sheet-records.examples.d.ts +208 -356
- package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet-records.examples.js +66 -29
- package/dist/test/sheet/sheet-records.examples.js.map +1 -1
- package/dist/test/sheet/sheet.examples.d.ts +3650 -3377
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet.examples.js +406 -296
- package/dist/test/sheet/sheet.examples.js.map +1 -1
- package/dist/test/studio/component.examples.js +2 -2
- package/dist/test/studio/component.examples.js.map +1 -1
- package/dist/test/studio/page.examples.js +6 -6
- package/dist/test/studio/page.examples.js.map +1 -1
- package/dist/test/studio/studio.examples.d.ts +2329 -873
- package/dist/test/studio/studio.examples.d.ts.map +1 -1
- package/dist/test/studio/studio.examples.js +155 -107
- package/dist/test/studio/studio.examples.js.map +1 -1
- package/package.json +15 -11
|
@@ -0,0 +1,421 @@
|
|
|
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
|
+
* Named reads (#1436) — a series names the collection of its row it reads,
|
|
7
|
+
* and how that collection sits in time, so nothing outside a function has to
|
|
8
|
+
* find either: `Plan.items(field, { from, to } | { at }, draw)` reads the
|
|
9
|
+
* things people drag, a `Dict` keyed by an id, their times the fields named;
|
|
10
|
+
* `Plan.values(field, draw)` reads a value per instant, a `Dict` keyed by the
|
|
11
|
+
* instant. `draw` builds only how an element looks: its key and its instants
|
|
12
|
+
* come from the item's id and its times, or from the value's key.
|
|
13
|
+
*
|
|
14
|
+
* A read, and each consumer of a values read (`Plan.heatCells`,
|
|
15
|
+
* `Plan.tableCells`, `Plan.tableSeries`, `Plan.line` …), is a DESCRIPTION:
|
|
16
|
+
* the series builds each row's elements from it, once per row type, the same
|
|
17
|
+
* East over an inline row and a paged one. Each carries what it reads as a
|
|
18
|
+
* phantom brand ({@link PlanReadsBrand}) beside its axis kind, and the series
|
|
19
|
+
* collects them into its own.
|
|
20
|
+
*
|
|
21
|
+
* @packageDocumentation
|
|
22
|
+
*/
|
|
23
|
+
import type { DateTimeType, DictType, EastType, ExprType, FloatType, IntegerType, OptionType, RecursiveType, StringType, StructType } from "@elaraai/east";
|
|
24
|
+
import { PlanAxisKindBrand, type PlanAxisKindLiteral, type PlanFoldLiteral } from "./types.js";
|
|
25
|
+
import type { PlanEntryExpr, PlanEntryFields, PlanItemFields, PlanItemInstantType } from "./series.js";
|
|
26
|
+
/**
|
|
27
|
+
* The phantom brand of what a series reads (#1436): each collection its named
|
|
28
|
+
* reads name, and how it is read — `{ jobs: { items: { from: "start"; to:
|
|
29
|
+
* "end" } } }`, `{ load: { values: true } }`; a collection whose values a
|
|
30
|
+
* parent subtotals, by the fold and the aggregate (`{ readings: { values: {
|
|
31
|
+
* rollup: { fold: "sum"; aggregate: "sum" } } } }`); a span's runs that roll
|
|
32
|
+
* up into its bands (`rollup: true` beside `items`); a step-down's under its
|
|
33
|
+
* field (`{ members: { rows: … } }`); a tree's (`{ parts: { recursive: true }
|
|
34
|
+
* }`).
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Like {@link PlanAxisKindBrand}, it exists only in the TYPES: the property is
|
|
38
|
+
* optional and never written. A series list held in a variable or built in
|
|
39
|
+
* East is erased; the series' build spec records the same reads at runtime,
|
|
40
|
+
* and a source's index holds both (#1435).
|
|
41
|
+
*/
|
|
42
|
+
export declare const PlanReadsBrand: unique symbol;
|
|
43
|
+
/** The type of {@link PlanReadsBrand}. */
|
|
44
|
+
export type PlanReadsBrand = typeof PlanReadsBrand;
|
|
45
|
+
/**
|
|
46
|
+
* The phantom facts of a values read's consumer (#1436) — what it makes (so
|
|
47
|
+
* each series field takes its own), the entry type its read is over (so the
|
|
48
|
+
* read infers it from where the consumer is used), the fold a bucket folds its
|
|
49
|
+
* values by, and, for a table position, whether it feeds its parent's
|
|
50
|
+
* subtotal. Types only, like {@link PlanReadsBrand}.
|
|
51
|
+
*/
|
|
52
|
+
export declare const PlanUseBrand: unique symbol;
|
|
53
|
+
/** The type of {@link PlanUseBrand}. */
|
|
54
|
+
export type PlanUseBrand = typeof PlanUseBrand;
|
|
55
|
+
/**
|
|
56
|
+
* A `Dict` field of an entry: a nested collection a series reads by name.
|
|
57
|
+
*
|
|
58
|
+
* @typeParam R - The entry type
|
|
59
|
+
*/
|
|
60
|
+
export type PlanCollectionField<R extends EastType> = {
|
|
61
|
+
[F in keyof PlanEntryFields<R> & string]: PlanEntryFields<R>[F] extends DictType<EastType, EastType> ? F : never;
|
|
62
|
+
}[keyof PlanEntryFields<R> & string];
|
|
63
|
+
/**
|
|
64
|
+
* A `Dict` field of an entry keyed by an id: the things people drag (jobs,
|
|
65
|
+
* stops, shifts, drops, alarms, decisions), each a struct.
|
|
66
|
+
*
|
|
67
|
+
* @typeParam R - The entry type
|
|
68
|
+
*/
|
|
69
|
+
export type PlanItemsField<R extends EastType> = {
|
|
70
|
+
[F in PlanCollectionField<R>]: PlanEntryFields<R>[F] extends DictType<StringType, StructType> ? F : never;
|
|
71
|
+
}[PlanCollectionField<R>];
|
|
72
|
+
/**
|
|
73
|
+
* A `Dict` field of an entry keyed by an instant: values, one per instant —
|
|
74
|
+
* `Dict<DateTime, V>` on a time axis, `Dict<Float, V>` or `Dict<Integer, V>`
|
|
75
|
+
* on a number axis, `Dict<String, V>` on an ordinal one.
|
|
76
|
+
*
|
|
77
|
+
* @typeParam R - The entry type
|
|
78
|
+
*/
|
|
79
|
+
export type PlanValuesField<R extends EastType> = {
|
|
80
|
+
[F in PlanCollectionField<R>]: PlanEntryFields<R>[F] extends DictType<DateTimeType | FloatType | IntegerType | StringType, EastType> ? F : never;
|
|
81
|
+
}[PlanCollectionField<R>];
|
|
82
|
+
/**
|
|
83
|
+
* A `Dict` field of an entry holding child rows, keyed by an id: what
|
|
84
|
+
* `Plan.children(field, [series…])` steps down to.
|
|
85
|
+
*
|
|
86
|
+
* @typeParam R - The entry type
|
|
87
|
+
*/
|
|
88
|
+
export type PlanChildField<R extends EastType> = {
|
|
89
|
+
[F in PlanCollectionField<R>]: PlanEntryFields<R>[F] extends DictType<StringType, StructType | RecursiveType<any>> ? F : never;
|
|
90
|
+
}[PlanCollectionField<R>];
|
|
91
|
+
/**
|
|
92
|
+
* A `Dict` field of a recursive entry holding more entries of its own type,
|
|
93
|
+
* keyed by an id: what a series' `children: field` names for a tree.
|
|
94
|
+
*
|
|
95
|
+
* @typeParam R - The entry type
|
|
96
|
+
*/
|
|
97
|
+
export type PlanTreeField<R extends EastType> = {
|
|
98
|
+
[F in PlanCollectionField<R>]: PlanEntryFields<R>[F] extends DictType<StringType, R> ? F : never;
|
|
99
|
+
}[PlanCollectionField<R>];
|
|
100
|
+
/**
|
|
101
|
+
* What a collection holds.
|
|
102
|
+
*
|
|
103
|
+
* @typeParam R - The entry type
|
|
104
|
+
* @typeParam F - The collection's field
|
|
105
|
+
*/
|
|
106
|
+
export type PlanCollectionItem<R extends EastType, F extends string> = F extends keyof PlanEntryFields<R> ? (PlanEntryFields<R>[F] extends DictType<EastType, infer V extends EastType> ? V : never) : never;
|
|
107
|
+
/**
|
|
108
|
+
* What a collection is keyed by.
|
|
109
|
+
*
|
|
110
|
+
* @typeParam R - The entry type
|
|
111
|
+
* @typeParam F - The collection's field
|
|
112
|
+
*/
|
|
113
|
+
export type PlanCollectionKey<R extends EastType, F extends string> = F extends keyof PlanEntryFields<R> ? (PlanEntryFields<R>[F] extends DictType<infer K extends EastType, EastType> ? K : never) : never;
|
|
114
|
+
/**
|
|
115
|
+
* An item's field holding an instant: a {@link PlanItemInstantType}, or an
|
|
116
|
+
* `Option` of a `DateTime` (an item with no start draws nowhere; one with no
|
|
117
|
+
* end is an instant).
|
|
118
|
+
*
|
|
119
|
+
* @typeParam I - The item type
|
|
120
|
+
*/
|
|
121
|
+
export type PlanItemTimeField<I extends EastType> = {
|
|
122
|
+
[K in keyof PlanItemFields<I> & string]: PlanItemFields<I>[K] extends PlanItemInstantType | OptionType<DateTimeType> ? K : never;
|
|
123
|
+
}[keyof PlanItemFields<I> & string];
|
|
124
|
+
/**
|
|
125
|
+
* The times an item may name: a start and an end (a run's, a chip's), or an
|
|
126
|
+
* instant (a decision's, a tile's, a mark's).
|
|
127
|
+
*
|
|
128
|
+
* @typeParam I - The item type
|
|
129
|
+
*/
|
|
130
|
+
export type PlanItemTimes<I extends EastType> = {
|
|
131
|
+
readonly from: PlanItemTimeField<I>;
|
|
132
|
+
readonly to: PlanItemTimeField<I>;
|
|
133
|
+
} | {
|
|
134
|
+
readonly at: PlanItemTimeField<I>;
|
|
135
|
+
};
|
|
136
|
+
/** The times of a run or a chip, their names erased: what a span element field takes. */
|
|
137
|
+
export type PlanSpanTimes = {
|
|
138
|
+
readonly from: string;
|
|
139
|
+
readonly to: string;
|
|
140
|
+
};
|
|
141
|
+
/** The time of a decision, a tile or a mark, its name erased: what a point element field takes. */
|
|
142
|
+
export type PlanPointTimes = {
|
|
143
|
+
readonly at: string;
|
|
144
|
+
};
|
|
145
|
+
/** The axis kind an East type of an instant rides — `never` when it says nothing (a `Plan.Types.Instant`). */
|
|
146
|
+
type PlanKindOfType<T> = T extends DateTimeType ? "time" : T extends FloatType | IntegerType ? "number" : T extends StringType ? "ordinal" : T extends OptionType<DateTimeType> ? "time" : never;
|
|
147
|
+
/**
|
|
148
|
+
* The axis kind an item's named times ride: their fields' types' kinds — a
|
|
149
|
+
* `DateTime` (or an `Option` of one) the time axis, a `Float` or an `Integer`
|
|
150
|
+
* the number axis, a `String` the ordinal axis; `never` for a
|
|
151
|
+
* `Plan.Types.Instant` field, which says nothing.
|
|
152
|
+
*
|
|
153
|
+
* @typeParam I - The item type
|
|
154
|
+
* @typeParam T - The times named
|
|
155
|
+
*/
|
|
156
|
+
export type PlanKindOfTimes<I extends EastType, T> = T extends {
|
|
157
|
+
readonly from: infer A extends string;
|
|
158
|
+
readonly to: infer B extends string;
|
|
159
|
+
} ? PlanKindOfType<PlanItemFields<I>[A & keyof PlanItemFields<I>]> | PlanKindOfType<PlanItemFields<I>[B & keyof PlanItemFields<I>]> : T extends {
|
|
160
|
+
readonly at: infer A extends string;
|
|
161
|
+
} ? PlanKindOfType<PlanItemFields<I>[A & keyof PlanItemFields<I>]> : never;
|
|
162
|
+
/**
|
|
163
|
+
* The axis kind a values collection's key rides: a `DateTime` the time axis,
|
|
164
|
+
* a `Float` or an `Integer` the number axis, a `String` the ordinal axis.
|
|
165
|
+
*
|
|
166
|
+
* @typeParam K - The collection's key type
|
|
167
|
+
*/
|
|
168
|
+
export type PlanKindOfKey<K> = PlanKindOfType<K>;
|
|
169
|
+
/**
|
|
170
|
+
* A row's collection of things people drag, read by name: its items drawn as
|
|
171
|
+
* a kind's elements.
|
|
172
|
+
*
|
|
173
|
+
* @typeParam R - The entry type
|
|
174
|
+
* @typeParam F - The collection's field
|
|
175
|
+
* @typeParam T - Its times, as named
|
|
176
|
+
* @typeParam L - What `draw` gives: the element's look
|
|
177
|
+
* @typeParam K - The axis kind its times ride
|
|
178
|
+
*/
|
|
179
|
+
export interface PlanItems<R extends EastType, F extends string, T, L, K extends PlanAxisKindLiteral = never> {
|
|
180
|
+
/** The collection's field. */
|
|
181
|
+
readonly field: F;
|
|
182
|
+
/** Its times. */
|
|
183
|
+
readonly times: T;
|
|
184
|
+
/** How an item looks, from the item, its id and its row. */
|
|
185
|
+
readonly draw: (item: ExprType<PlanCollectionItem<R, F>>, id: ExprType<StringType>, row: PlanEntryExpr<R>) => L;
|
|
186
|
+
/** The axis kind (phantom). */
|
|
187
|
+
readonly [PlanAxisKindBrand]?: K;
|
|
188
|
+
/** What it reads (phantom): `{ [F]: { items: T } }`. */
|
|
189
|
+
readonly [PlanReadsBrand]?: {
|
|
190
|
+
readonly [P in F]: {
|
|
191
|
+
readonly items: T;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* A row's collection of values, read by name: each value at its instant, its
|
|
197
|
+
* key.
|
|
198
|
+
*
|
|
199
|
+
* @typeParam R - The entry type
|
|
200
|
+
* @typeParam F - The collection's field
|
|
201
|
+
* @typeParam L - What `draw` gives besides the instant
|
|
202
|
+
* @typeParam K - The axis kind the collection's key rides
|
|
203
|
+
*/
|
|
204
|
+
export interface PlanValues<R extends EastType, F extends string, L, K extends PlanAxisKindLiteral = never> {
|
|
205
|
+
/** The collection's field. */
|
|
206
|
+
readonly field: F;
|
|
207
|
+
/** What a value gives, from the value, its instant and its row. */
|
|
208
|
+
readonly draw: (value: ExprType<PlanCollectionItem<R, F>>, at: ExprType<PlanCollectionKey<R, F>>, row: PlanEntryExpr<R>) => L;
|
|
209
|
+
/** The axis kind (phantom). */
|
|
210
|
+
readonly [PlanAxisKindBrand]?: K;
|
|
211
|
+
/** What it reads (phantom): `{ [F]: { values: true } }`. */
|
|
212
|
+
readonly [PlanReadsBrand]?: {
|
|
213
|
+
readonly [P in F]: {
|
|
214
|
+
readonly values: true;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* A read of items as an element field takes it (#1436): a collection of the
|
|
220
|
+
* entry, its times of the shape the element takes (`{ from, to }` for a run or
|
|
221
|
+
* a chip, `{ at }` for the rest), its `draw` giving the element's look.
|
|
222
|
+
*
|
|
223
|
+
* @typeParam R - The entry type
|
|
224
|
+
* @typeParam F - The collection's field
|
|
225
|
+
* @typeParam S - The shape of the times the element takes
|
|
226
|
+
* @typeParam L - The element's look
|
|
227
|
+
* @typeParam K - The axis kind its times ride
|
|
228
|
+
* @typeParam U - What it reads
|
|
229
|
+
*/
|
|
230
|
+
export interface PlanItemsInput<R extends EastType, F extends string, S, L, K extends PlanAxisKindLiteral, U> {
|
|
231
|
+
/** The collection's field. */
|
|
232
|
+
readonly field: F;
|
|
233
|
+
/** Its times. */
|
|
234
|
+
readonly times: S;
|
|
235
|
+
/** How an item looks. */
|
|
236
|
+
readonly draw: (item: never, id: ExprType<StringType>, row: PlanEntryExpr<NoInfer<R>>) => L;
|
|
237
|
+
/** The axis kind (phantom). */
|
|
238
|
+
readonly [PlanAxisKindBrand]?: K;
|
|
239
|
+
/** What it reads (phantom). */
|
|
240
|
+
readonly [PlanReadsBrand]?: U;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* A read of values as an element field or a consumer takes it (#1436): a
|
|
244
|
+
* collection of the entry keyed by its instants, its `draw` giving what each
|
|
245
|
+
* value gives.
|
|
246
|
+
*
|
|
247
|
+
* @typeParam R - The entry type
|
|
248
|
+
* @typeParam L - What a value gives
|
|
249
|
+
* @typeParam K - The axis kind its key rides
|
|
250
|
+
* @typeParam U - What it reads
|
|
251
|
+
*/
|
|
252
|
+
export interface PlanValuesInput<R extends EastType, L, K extends PlanAxisKindLiteral, U> {
|
|
253
|
+
/** The collection's field. */
|
|
254
|
+
readonly field: string;
|
|
255
|
+
/** Values name no times: their key is their instant. */
|
|
256
|
+
readonly times?: never;
|
|
257
|
+
/** What a value gives. */
|
|
258
|
+
readonly draw: (value: never, at: never, row: PlanEntryExpr<NoInfer<R>>) => L;
|
|
259
|
+
/** The axis kind (phantom). */
|
|
260
|
+
readonly [PlanAxisKindBrand]?: K;
|
|
261
|
+
/** What it reads (phantom). */
|
|
262
|
+
readonly [PlanReadsBrand]?: U;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* A consumer of a values read (#1436) — `Plan.heatCells(values)`,
|
|
266
|
+
* `Plan.tableCells(values)`, `Plan.tableSeries({ cells })`, `Plan.line(values)`
|
|
267
|
+
* … — as a description the series builds per row.
|
|
268
|
+
*
|
|
269
|
+
* @typeParam M - What it makes: `"heat"` (a heat row's cells), `"tableCells"`, `"tableSeries"`, `"layer"`
|
|
270
|
+
* @typeParam R - The entry type its read is over
|
|
271
|
+
* @typeParam K - The axis kind its read's key rides
|
|
272
|
+
* @typeParam U - What it reads
|
|
273
|
+
* @typeParam FO - The fold a bucket folds its values by (`undefined` where its row declares it, as a table's `cells`)
|
|
274
|
+
* @typeParam RO - Whether a table position feeds its parent's subtotal
|
|
275
|
+
*/
|
|
276
|
+
export interface PlanValuesUse<M extends string, R extends EastType, K extends PlanAxisKindLiteral, U, FO extends PlanFoldLiteral | undefined = undefined, RO extends boolean = false> {
|
|
277
|
+
/** What it makes, its read's entry type, its fold, and a table position's subtotal flag (phantom). */
|
|
278
|
+
readonly [PlanUseBrand]?: {
|
|
279
|
+
readonly makes: M;
|
|
280
|
+
readonly row: R;
|
|
281
|
+
readonly fold: FO;
|
|
282
|
+
readonly rollup: RO;
|
|
283
|
+
};
|
|
284
|
+
/** The axis kind (phantom). */
|
|
285
|
+
readonly [PlanAxisKindBrand]?: K;
|
|
286
|
+
/** What it reads (phantom). */
|
|
287
|
+
readonly [PlanReadsBrand]?: U;
|
|
288
|
+
}
|
|
289
|
+
/** An item's or a value's `draw`, its types erased. @internal */
|
|
290
|
+
export type PlanAnyDraw = (item: ExprType<EastType>, key: ExprType<EastType>, row: ExprType<EastType>) => unknown;
|
|
291
|
+
/** The times a read of items names. @internal */
|
|
292
|
+
export type PlanTimesSpec = {
|
|
293
|
+
readonly from: string;
|
|
294
|
+
readonly to: string;
|
|
295
|
+
} | {
|
|
296
|
+
readonly at: string;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* A named read as the series build from it (#1436).
|
|
300
|
+
*
|
|
301
|
+
* @internal
|
|
302
|
+
* @property kind - `"items"` or `"values"`
|
|
303
|
+
* @property field - The collection's field
|
|
304
|
+
* @property times - The items' times (items only)
|
|
305
|
+
* @property draw - The look, from the item and its id, or the value and its instant, and the row
|
|
306
|
+
*/
|
|
307
|
+
export type PlanReadSpec = {
|
|
308
|
+
readonly kind: "items";
|
|
309
|
+
readonly field: string;
|
|
310
|
+
readonly times: PlanTimesSpec;
|
|
311
|
+
readonly draw: PlanAnyDraw;
|
|
312
|
+
} | {
|
|
313
|
+
readonly kind: "values";
|
|
314
|
+
readonly field: string;
|
|
315
|
+
readonly draw: PlanAnyDraw;
|
|
316
|
+
};
|
|
317
|
+
/** A read of values, as the series build from it. @internal */
|
|
318
|
+
export type PlanValuesReadSpec = Extract<PlanReadSpec, {
|
|
319
|
+
kind: "values";
|
|
320
|
+
}>;
|
|
321
|
+
/** A read of items, as the series build from it. @internal */
|
|
322
|
+
export type PlanItemsReadSpec = Extract<PlanReadSpec, {
|
|
323
|
+
kind: "items";
|
|
324
|
+
}>;
|
|
325
|
+
/** The cells a values read's draw completes to, by consumer. @internal */
|
|
326
|
+
export type PlanCellKind = "heat" | "weight" | "segment" | "table" | "point" | "band";
|
|
327
|
+
/**
|
|
328
|
+
* A consumer of a values read, as the series build from it (#1436): the cells
|
|
329
|
+
* its read's values complete to, and what it makes of one row's cells.
|
|
330
|
+
*
|
|
331
|
+
* @internal
|
|
332
|
+
* @property makes - What it makes (`"heat"`, `"tableCells"`, `"tableSeries"`, `"layer"`)
|
|
333
|
+
* @property read - The values read it consumes
|
|
334
|
+
* @property cell - The cell each value completes to
|
|
335
|
+
* @property fold - The fold a bucket folds its values by, where it declares one
|
|
336
|
+
* @property rollup - Whether a table position feeds its parent's subtotal
|
|
337
|
+
* @property edit - Whether a table position's values take typed numbers (`edit: true`)
|
|
338
|
+
* @property wrap - One row's value, from its cells
|
|
339
|
+
*/
|
|
340
|
+
export interface PlanValuesUseSpec {
|
|
341
|
+
readonly makes: "heat" | "tableCells" | "tableSeries" | "layer";
|
|
342
|
+
readonly read: PlanValuesReadSpec;
|
|
343
|
+
readonly cell: PlanCellKind;
|
|
344
|
+
readonly fold: PlanFoldLiteral | undefined;
|
|
345
|
+
readonly rollup: boolean;
|
|
346
|
+
readonly edit?: boolean;
|
|
347
|
+
readonly wrap: (cells: ExprType<EastType>) => unknown;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Whether a table position's values take typed numbers (#1436): `true`, on
|
|
351
|
+
* `Plan.series.table` for its `cells` or on a `Plan.tableSeries` position,
|
|
352
|
+
* its cells a `Plan.values` read drawing each value as it is stored
|
|
353
|
+
* (`value: some(v)`). A number typed into a cell sets the collection's value
|
|
354
|
+
* at the bucket's start, adds one where it holds none, or, cleared, deletes it.
|
|
355
|
+
*/
|
|
356
|
+
export type PlanValuesEdit = true;
|
|
357
|
+
/**
|
|
358
|
+
* The read a `Plan.items` or `Plan.values` call made, if `x` is one.
|
|
359
|
+
*
|
|
360
|
+
* @internal
|
|
361
|
+
* @param x - Anything a config field holds
|
|
362
|
+
* @returns The read, or `undefined`
|
|
363
|
+
*/
|
|
364
|
+
export declare function planReadOf(x: unknown): PlanReadSpec | undefined;
|
|
365
|
+
/**
|
|
366
|
+
* The consumer description `x` is, if a cell builder or a layer made it from a
|
|
367
|
+
* values read.
|
|
368
|
+
*
|
|
369
|
+
* @internal
|
|
370
|
+
* @param x - Anything a config field holds
|
|
371
|
+
* @returns The consumer, or `undefined`
|
|
372
|
+
*/
|
|
373
|
+
export declare function planUseOf(x: unknown): PlanValuesUseSpec | undefined;
|
|
374
|
+
/**
|
|
375
|
+
* Record a consumer description a builder made from a values read.
|
|
376
|
+
*
|
|
377
|
+
* @internal
|
|
378
|
+
* @param spec - What it consumes and makes
|
|
379
|
+
* @returns The description: a frozen object the series reads through {@link planUseOf}
|
|
380
|
+
*/
|
|
381
|
+
export declare function planUse<T>(spec: PlanValuesUseSpec): T;
|
|
382
|
+
/**
|
|
383
|
+
* Refuse a read, or a consumer of one, where no row gives its collection — a
|
|
384
|
+
* hand-built row, or any field that is not a series' (#1436).
|
|
385
|
+
*
|
|
386
|
+
* @internal
|
|
387
|
+
* @param x - The input to check
|
|
388
|
+
* @throws {Error} Naming where a read goes
|
|
389
|
+
*/
|
|
390
|
+
export declare function refuseReadOutsideSeries(x: unknown): void;
|
|
391
|
+
/**
|
|
392
|
+
* Read a row's collection of things people drag: each item an element — a
|
|
393
|
+
* run, a decision, a tile, a chip or a mark — its key the item's id, its
|
|
394
|
+
* instants the times named, its look `draw`'s.
|
|
395
|
+
*
|
|
396
|
+
* @typeParam R - The entry type, inferred from where it is used, as `Plan.children`'s is
|
|
397
|
+
* @typeParam F - The collection's field
|
|
398
|
+
* @typeParam T - The times, as named
|
|
399
|
+
* @typeParam L - The look `draw` gives
|
|
400
|
+
* @param field - The collection: a Dict field of the entry, keyed by an id
|
|
401
|
+
* @param times - Its items' times: `{ from, to }` for a run or a chip; `{ at }` for the rest
|
|
402
|
+
* @param draw - How an item looks: everything its element takes but its key and its instants
|
|
403
|
+
* @returns The read, for the series' element field
|
|
404
|
+
*/
|
|
405
|
+
export declare function createItems<R extends EastType, F extends PlanItemsField<R>, const T extends PlanItemTimes<PlanCollectionItem<R, F>>, L>(field: F, times: T, draw: (item: ExprType<PlanCollectionItem<R, F>>, id: ExprType<StringType>, row: PlanEntryExpr<R>) => L): PlanItems<R, F, T, L, PlanKindOfTimes<PlanCollectionItem<R, F>, T>>;
|
|
406
|
+
/**
|
|
407
|
+
* Read a row's collection of values: each value at its instant — the
|
|
408
|
+
* collection's key — with what `draw` gives: a heat, weight, segment or table
|
|
409
|
+
* row's cells, a table series' cells, a chart layer's points, a span's ports,
|
|
410
|
+
* a bucket row's markers.
|
|
411
|
+
*
|
|
412
|
+
* @typeParam R - The entry type, inferred from where it is used
|
|
413
|
+
* @typeParam F - The collection's field
|
|
414
|
+
* @typeParam L - What a value gives
|
|
415
|
+
* @param field - The collection: a Dict field of the entry, keyed by an instant
|
|
416
|
+
* @param draw - What a value gives besides its instant (`{ value }`, `{ fraction, planned }`, `{ y }`, `{ label }`, …)
|
|
417
|
+
* @returns The read, for the cell builders, the chart layers, a group's `summary`, `ports` and `markers`
|
|
418
|
+
*/
|
|
419
|
+
export declare function createValues<R extends EastType, F extends PlanValuesField<R>, L>(field: F, draw: (value: ExprType<PlanCollectionItem<R, F>>, at: ExprType<PlanCollectionKey<R, F>>, row: PlanEntryExpr<R>) => L): PlanValues<R, F, L, PlanKindOfKey<PlanCollectionKey<R, F>>>;
|
|
420
|
+
export {};
|
|
421
|
+
//# sourceMappingURL=reads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reads.d.ts","sourceRoot":"","sources":["../../../src/plan/reads.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACR,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EACxH,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAC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AAC,CAAC,CAAC,EACvD,CAAC,EAED,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,CAAC,EACR,IAAI,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,GACvG,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAOrE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5E,KAAK,EAAE,CAAC,EACR,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,GACrH,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAM7D"}
|
|
@@ -0,0 +1,143 @@
|
|
|
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
|
+
import { PlanAxisKindBrand } from "./types.js";
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// The brands — what a series reads, and what a description makes
|
|
8
|
+
// ============================================================================
|
|
9
|
+
/**
|
|
10
|
+
* The phantom brand of what a series reads (#1436): each collection its named
|
|
11
|
+
* reads name, and how it is read — `{ jobs: { items: { from: "start"; to:
|
|
12
|
+
* "end" } } }`, `{ load: { values: true } }`; a collection whose values a
|
|
13
|
+
* parent subtotals, by the fold and the aggregate (`{ readings: { values: {
|
|
14
|
+
* rollup: { fold: "sum"; aggregate: "sum" } } } }`); a span's runs that roll
|
|
15
|
+
* up into its bands (`rollup: true` beside `items`); a step-down's under its
|
|
16
|
+
* field (`{ members: { rows: … } }`); a tree's (`{ parts: { recursive: true }
|
|
17
|
+
* }`).
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Like {@link PlanAxisKindBrand}, it exists only in the TYPES: the property is
|
|
21
|
+
* optional and never written. A series list held in a variable or built in
|
|
22
|
+
* East is erased; the series' build spec records the same reads at runtime,
|
|
23
|
+
* and a source's index holds both (#1435).
|
|
24
|
+
*/
|
|
25
|
+
export const PlanReadsBrand = Symbol("PlanReads");
|
|
26
|
+
/**
|
|
27
|
+
* The phantom facts of a values read's consumer (#1436) — what it makes (so
|
|
28
|
+
* each series field takes its own), the entry type its read is over (so the
|
|
29
|
+
* read infers it from where the consumer is used), the fold a bucket folds its
|
|
30
|
+
* values by, and, for a table position, whether it feeds its parent's
|
|
31
|
+
* subtotal. Types only, like {@link PlanReadsBrand}.
|
|
32
|
+
*/
|
|
33
|
+
export const PlanUseBrand = Symbol("PlanUse");
|
|
34
|
+
const READS = new WeakMap();
|
|
35
|
+
const USES = new WeakMap();
|
|
36
|
+
/**
|
|
37
|
+
* The read a `Plan.items` or `Plan.values` call made, if `x` is one.
|
|
38
|
+
*
|
|
39
|
+
* @internal
|
|
40
|
+
* @param x - Anything a config field holds
|
|
41
|
+
* @returns The read, or `undefined`
|
|
42
|
+
*/
|
|
43
|
+
export function planReadOf(x) {
|
|
44
|
+
return typeof x === "object" && x !== null ? READS.get(x) : undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The consumer description `x` is, if a cell builder or a layer made it from a
|
|
48
|
+
* values read.
|
|
49
|
+
*
|
|
50
|
+
* @internal
|
|
51
|
+
* @param x - Anything a config field holds
|
|
52
|
+
* @returns The consumer, or `undefined`
|
|
53
|
+
*/
|
|
54
|
+
export function planUseOf(x) {
|
|
55
|
+
return typeof x === "object" && x !== null ? USES.get(x) : undefined;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Record a consumer description a builder made from a values read.
|
|
59
|
+
*
|
|
60
|
+
* @internal
|
|
61
|
+
* @param spec - What it consumes and makes
|
|
62
|
+
* @returns The description: a frozen object the series reads through {@link planUseOf}
|
|
63
|
+
*/
|
|
64
|
+
export function planUse(spec) {
|
|
65
|
+
const description = Object.freeze({});
|
|
66
|
+
USES.set(description, spec);
|
|
67
|
+
return description;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Refuse a read, or a consumer of one, where no row gives its collection — a
|
|
71
|
+
* hand-built row, or any field that is not a series' (#1436).
|
|
72
|
+
*
|
|
73
|
+
* @internal
|
|
74
|
+
* @param x - The input to check
|
|
75
|
+
* @throws {Error} Naming where a read goes
|
|
76
|
+
*/
|
|
77
|
+
export function refuseReadOutsideSeries(x) {
|
|
78
|
+
const read = planReadOf(x) ?? planUseOf(x)?.read;
|
|
79
|
+
if (read === undefined)
|
|
80
|
+
return;
|
|
81
|
+
if (read.kind === "items") {
|
|
82
|
+
throw new Error("Plan.items reads a row's collection: give it to a series' runs, decisions, events, chips or marks");
|
|
83
|
+
}
|
|
84
|
+
throw new Error("Plan.values reads a row's collection: give it to a series' cells, series, layers, summary, ports or markers");
|
|
85
|
+
}
|
|
86
|
+
/** The words for a times argument that names no field. */
|
|
87
|
+
function timesShape(times) {
|
|
88
|
+
const t = times;
|
|
89
|
+
if (t !== null && typeof t === "object") {
|
|
90
|
+
if (typeof t.from === "string" && typeof t.to === "string" && t.at === undefined)
|
|
91
|
+
return Object.freeze({ from: t.from, to: t.to });
|
|
92
|
+
if (typeof t.at === "string" && t.from === undefined && t.to === undefined)
|
|
93
|
+
return Object.freeze({ at: t.at });
|
|
94
|
+
}
|
|
95
|
+
throw new Error("Plan.items: name the items' times — { from, to } for a run or a chip, { at } for a decision, a tile or a mark — each a field of the item");
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Read a row's collection of things people drag: each item an element — a
|
|
99
|
+
* run, a decision, a tile, a chip or a mark — its key the item's id, its
|
|
100
|
+
* instants the times named, its look `draw`'s.
|
|
101
|
+
*
|
|
102
|
+
* @typeParam R - The entry type, inferred from where it is used, as `Plan.children`'s is
|
|
103
|
+
* @typeParam F - The collection's field
|
|
104
|
+
* @typeParam T - The times, as named
|
|
105
|
+
* @typeParam L - The look `draw` gives
|
|
106
|
+
* @param field - The collection: a Dict field of the entry, keyed by an id
|
|
107
|
+
* @param times - Its items' times: `{ from, to }` for a run or a chip; `{ at }` for the rest
|
|
108
|
+
* @param draw - How an item looks: everything its element takes but its key and its instants
|
|
109
|
+
* @returns The read, for the series' element field
|
|
110
|
+
*/
|
|
111
|
+
export function createItems(field, times, draw) {
|
|
112
|
+
if (typeof field !== "string")
|
|
113
|
+
throw new Error("Plan.items: name the collection — a Dict field of the row, keyed by an id");
|
|
114
|
+
if (typeof draw !== "function")
|
|
115
|
+
throw new Error(`Plan.items: "${field}" needs a draw — how an item looks, from the item, its id and its row`);
|
|
116
|
+
const shape = timesShape(times);
|
|
117
|
+
const read = Object.freeze({ field, times: shape, draw });
|
|
118
|
+
READS.set(read, { kind: "items", field, times: shape, draw: draw });
|
|
119
|
+
return read;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Read a row's collection of values: each value at its instant — the
|
|
123
|
+
* collection's key — with what `draw` gives: a heat, weight, segment or table
|
|
124
|
+
* row's cells, a table series' cells, a chart layer's points, a span's ports,
|
|
125
|
+
* a bucket row's markers.
|
|
126
|
+
*
|
|
127
|
+
* @typeParam R - The entry type, inferred from where it is used
|
|
128
|
+
* @typeParam F - The collection's field
|
|
129
|
+
* @typeParam L - What a value gives
|
|
130
|
+
* @param field - The collection: a Dict field of the entry, keyed by an instant
|
|
131
|
+
* @param draw - What a value gives besides its instant (`{ value }`, `{ fraction, planned }`, `{ y }`, `{ label }`, …)
|
|
132
|
+
* @returns The read, for the cell builders, the chart layers, a group's `summary`, `ports` and `markers`
|
|
133
|
+
*/
|
|
134
|
+
export function createValues(field, draw) {
|
|
135
|
+
if (typeof field !== "string")
|
|
136
|
+
throw new Error("Plan.values: name the collection — a Dict field of the row, keyed by its instants");
|
|
137
|
+
if (typeof draw !== "function")
|
|
138
|
+
throw new Error(`Plan.values: "${field}" needs a draw — what a value gives, from the value, its instant and its row`);
|
|
139
|
+
const read = Object.freeze({ field, draw });
|
|
140
|
+
READS.set(read, { kind: "values", field, draw: draw });
|
|
141
|
+
return read;
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=reads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reads.js","sourceRoot":"","sources":["../../../src/plan/reads.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyBH,OAAO,EAAE,iBAAiB,EAAkD,MAAM,YAAY,CAAC;AAG/F,+EAA+E;AAC/E,iEAAiE;AACjE,+EAA+E;AAE/E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB,MAAM,CAAC,WAAW,CAAC,CAAC;AAIjE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAkB,MAAM,CAAC,SAAS,CAAC,CAAC;AA6T7D,MAAM,KAAK,GAAG,IAAI,OAAO,EAAwB,CAAC;AAClD,MAAM,IAAI,GAAG,IAAI,OAAO,EAA6B,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,CAAU;IACjC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC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