@elaraai/e3-ui 1.0.98 → 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 +46 -90
- package/dist/src/allocation/index.d.ts.map +1 -1
- package/dist/src/allocation/index.js +5 -5
- package/dist/src/allocation/index.js.map +1 -1
- package/dist/src/bind/data-indexed.d.ts +273 -51
- package/dist/src/bind/data-indexed.d.ts.map +1 -1
- package/dist/src/bind/data-indexed.js +233 -56
- 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 +55 -95
- package/dist/src/calendar/index.d.ts.map +1 -1
- package/dist/src/calendar/index.js +10 -6
- package/dist/src/calendar/index.js.map +1 -1
- 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 +39 -107
- 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 +0 -12
- 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 +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +7 -3
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +12 -3
- 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 +1518 -2
- package/dist/src/plan/builders.d.ts.map +1 -1
- package/dist/src/plan/builders.js +248 -114
- package/dist/src/plan/builders.js.map +1 -1
- package/dist/src/plan/event-rows.d.ts +9 -14
- package/dist/src/plan/event-rows.d.ts.map +1 -1
- package/dist/src/plan/event-rows.js +6 -46
- 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 +147 -125
- package/dist/src/plan/index.d.ts.map +1 -1
- package/dist/src/plan/index.js +135 -122
- package/dist/src/plan/index.js.map +1 -1
- package/dist/src/plan/ir.d.ts +1105 -44
- 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 +1030 -1
- package/dist/src/plan/ordered-source.d.ts.map +1 -1
- package/dist/src/plan/ordered-source.js +48 -6
- 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 +2719 -558
- package/dist/src/plan/plan.d.ts.map +1 -1
- package/dist/src/plan/plan.js +14 -2
- 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 +10 -5
- package/dist/src/plan/root.d.ts.map +1 -1
- package/dist/src/plan/root.js +76 -13
- package/dist/src/plan/root.js.map +1 -1
- package/dist/src/plan/series.d.ts +5140 -4331
- package/dist/src/plan/series.d.ts.map +1 -1
- package/dist/src/plan/series.js +1026 -264
- 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 +178 -18
- package/dist/src/plan/types.d.ts.map +1 -1
- package/dist/src/plan/types.js +69 -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 +47 -91
- package/dist/src/roster/index.d.ts.map +1 -1
- package/dist/src/roster/index.js +6 -6
- package/dist/src/roster/index.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/schedule/cell-checks.js +3 -3
- package/dist/src/schedule/cell-checks.js.map +1 -1
- package/dist/src/schedule/days.d.ts +1 -1
- package/dist/src/schedule/days.js +1 -1
- package/dist/src/schedule/events.d.ts +10 -6
- package/dist/src/schedule/events.d.ts.map +1 -1
- package/dist/src/schedule/events.js +252 -228
- package/dist/src/schedule/events.js.map +1 -1
- 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 +38 -58
- package/dist/src/schedule/record-window.d.ts.map +1 -1
- package/dist/src/schedule/record-window.js +15 -16
- package/dist/src/schedule/record-window.js.map +1 -1
- package/dist/src/schedule/resources.d.ts +1 -1
- package/dist/src/schedule/session.d.ts +1 -1
- package/dist/src/schedule/session.js +1 -1
- package/dist/src/schedule/types.d.ts +29 -1
- package/dist/src/schedule/types.d.ts.map +1 -1
- package/dist/src/schedule/types.js +16 -1
- package/dist/src/schedule/types.js.map +1 -1
- package/dist/src/schematic/index.d.ts +19 -9
- package/dist/src/schematic/index.d.ts.map +1 -1
- package/dist/src/schematic/index.js +19 -9
- package/dist/src/schematic/index.js.map +1 -1
- package/dist/src/schematic/kinds.d.ts +4 -4
- package/dist/src/schematic/kinds.js +9 -9
- package/dist/src/schematic/kinds.js.map +1 -1
- package/dist/src/schematic/payload.d.ts +38 -88
- package/dist/src/schematic/payload.d.ts.map +1 -1
- package/dist/src/schematic/payload.js +4 -4
- package/dist/src/schematic/payload.js.map +1 -1
- package/dist/src/schematic/window.d.ts +8 -7
- package/dist/src/schematic/window.d.ts.map +1 -1
- package/dist/src/schematic/window.js +22 -19
- package/dist/src/schematic/window.js.map +1 -1
- 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/index.d.ts +66 -46
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/index.js +66 -46
- 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/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 +152 -128
- package/dist/src/sheet/registers.d.ts.map +1 -1
- package/dist/src/sheet/registers.js +152 -128
- package/dist/src/sheet/registers.js.map +1 -1
- package/dist/src/sheet/root.d.ts +4 -1
- package/dist/src/sheet/root.d.ts.map +1 -1
- package/dist/src/sheet/root.js +15 -3
- package/dist/src/sheet/root.js.map +1 -1
- package/dist/src/sheet/sheet.d.ts +39 -113
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +7 -5
- 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 +19 -62
- package/dist/src/sheet/types.d.ts.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/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 -1598
- 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.map +1 -1
- package/dist/test/allocation/optimise.examples.js +7 -7
- package/dist/test/allocation/optimise.examples.js.map +1 -1
- package/dist/test/bind/data/data.examples.d.ts +1057 -903
- package/dist/test/bind/data/data.examples.d.ts.map +1 -1
- package/dist/test/bind/data/data.examples.js +260 -204
- package/dist/test/bind/data/data.examples.js.map +1 -1
- package/dist/test/bind/record/record.examples.d.ts +457 -426
- 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.map +1 -1
- package/dist/test/calendar/calendar-windows.examples.js +12 -12
- package/dist/test/calendar/calendar-windows.examples.js.map +1 -1
- package/dist/test/calendar/calendar.examples.d.ts +1172 -901
- 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.js +2 -2
- package/dist/test/calendar/optimise.examples.js.map +1 -1
- package/dist/test/examples-package.d.ts +6 -9
- package/dist/test/examples-package.d.ts.map +1 -1
- package/dist/test/examples-package.js +11 -32
- package/dist/test/examples-package.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +3841 -2820
- 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.js +2 -2
- package/dist/test/plan/optimise.examples.js.map +1 -1
- package/dist/test/plan/plan-events.examples.d.ts +4055 -3263
- 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 +328 -362
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-records.examples.js +81 -57
- package/dist/test/plan/plan-records.examples.js.map +1 -1
- package/dist/test/plan/plan-windows.examples.d.ts +1756 -1398
- package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-windows.examples.js +161 -128
- package/dist/test/plan/plan-windows.examples.js.map +1 -1
- package/dist/test/plan/plan.examples.d.ts +2238 -5712
- package/dist/test/plan/plan.examples.d.ts.map +1 -1
- package/dist/test/plan/plan.examples.js +839 -968
- 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/optimise.examples.d.ts.map +1 -1
- package/dist/test/roster/optimise.examples.js +7 -7
- package/dist/test/roster/optimise.examples.js.map +1 -1
- package/dist/test/roster/roster-records.examples.d.ts +364 -392
- 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 +4605 -4308
- package/dist/test/roster/roster.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.js +212 -113
- package/dist/test/roster/roster.examples.js.map +1 -1
- package/dist/test/schedule/schedule.examples.d.ts +2646 -2471
- 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 +286 -276
- package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic-records.examples.js +52 -38
- package/dist/test/schematic/schematic-records.examples.js.map +1 -1
- package/dist/test/schematic/schematic.examples.d.ts +1842 -1491
- package/dist/test/schematic/schematic.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic.examples.js +240 -134
- package/dist/test/schematic/schematic.examples.js.map +1 -1
- package/dist/test/sheet/optimise.examples.d.ts +102 -95
- package/dist/test/sheet/optimise.examples.d.ts.map +1 -1
- package/dist/test/sheet/optimise.examples.js +7 -3
- package/dist/test/sheet/optimise.examples.js.map +1 -1
- package/dist/test/sheet/sheet-records.examples.d.ts +175 -214
- package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet-records.examples.js +29 -17
- package/dist/test/sheet/sheet-records.examples.js.map +1 -1
- package/dist/test/sheet/sheet.examples.d.ts +3642 -3353
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet.examples.js +389 -282
- 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
package/dist/src/plan/refs.js
CHANGED
|
@@ -29,7 +29,7 @@ const EVENT_REFS = new WeakMap();
|
|
|
29
29
|
* @example
|
|
30
30
|
* ```tsx
|
|
31
31
|
* // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
|
|
32
|
-
* import {
|
|
32
|
+
* import { DateTimeType, DictType, East, FloatType, NullType, OptionType, SortedMap, StringType, StructType, VariantType, compareFor, some, variant } from "@elaraai/east";
|
|
33
33
|
* import { EventStateType, Format, Reactive, UIComponentType } from "@elaraai/east-ui";
|
|
34
34
|
* import { Data, Plan, Record, Schedule } from "@elaraai/e3-ui";
|
|
35
35
|
* import e3 from "@elaraai/e3";
|
|
@@ -46,76 +46,117 @@ const EVENT_REFS = new WeakMap();
|
|
|
46
46
|
* stock: VariantType({ coated: NullType, uncoated: NullType, board: NullType }),
|
|
47
47
|
* due: OptionType(DateTimeType),
|
|
48
48
|
* });
|
|
49
|
-
* export const PrintStock = StructType({ name: StringType, weekly:
|
|
49
|
+
* export const PrintStock = StructType({ name: StringType, weekly: DictType(DateTimeType, FloatType) });
|
|
50
50
|
* export const PrintCentre = StructType({ name: StringType });
|
|
51
51
|
* export const PrintPlates = StructType({ title: StringType, at: DateTimeType, setter: StringType });
|
|
52
52
|
* export const PrintBinding = StructType({ title: StringType, start: DateTimeType, end: DateTimeType, line: StringType, state: EventStateType });
|
|
53
53
|
* export const PrintDelivery = StructType({ title: StringType, at: DateTimeType, bay: StringType });
|
|
54
|
-
* export const planPrintPresses = e3.record("plan_print_presses", DictType(StringType, PrintPress),
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* ]
|
|
54
|
+
* export const planPrintPresses = e3.record("plan_print_presses", DictType(StringType, PrintPress), {
|
|
55
|
+
* initial: new Map([
|
|
56
|
+
* ["a1", { name: "Press A1", hall: "Hall A", sheets_per_hour: 12000.0 }],
|
|
57
|
+
* ["a2", { name: "Press A2", hall: "Hall A", sheets_per_hour: 10000.0 }],
|
|
58
|
+
* ["a3", { name: "Press A3", hall: "Hall A", sheets_per_hour: 8000.0 }],
|
|
59
|
+
* ["b1", { name: "Press B1", hall: "Hall B", sheets_per_hour: 15000.0 }],
|
|
60
|
+
* ["b2", { name: "Press B2", hall: "Hall B", sheets_per_hour: 12000.0 }],
|
|
61
|
+
* ["b3", { name: "Press B3", hall: "Hall B", sheets_per_hour: 6000.0 }],
|
|
62
|
+
* ]),
|
|
63
|
+
* indexes: (index) => ({
|
|
64
|
+
* plan_print_presses_by_hall: index.on(["hall"]),
|
|
65
|
+
* }),
|
|
66
|
+
* mutations: (mutation) => ({
|
|
67
|
+
* // The presses' patch door: the works edits its presses elsewhere, and a Plan reads them live.
|
|
68
|
+
* patch: mutation.patch(),
|
|
69
|
+
* }),
|
|
70
|
+
* });
|
|
62
71
|
* export const planLinkStock = e3.input("plan_link_stock", DictType(StringType, PrintStock), variant("value", new Map([
|
|
63
|
-
* ["board", { name: "Board", weekly: [
|
|
64
|
-
*
|
|
65
|
-
*
|
|
72
|
+
* ["board", { name: "Board", weekly: new SortedMap([
|
|
73
|
+
* [new Date("2026-10-05T00:00:00Z"), 40.0], [new Date("2026-10-12T00:00:00Z"), 22.0], [new Date("2026-10-19T00:00:00Z"), 31.0], [new Date("2026-10-26T00:00:00Z"), 18.0],
|
|
74
|
+
* ], compareFor(DateTimeType)) }],
|
|
75
|
+
* ["coated", { name: "Coated", weekly: new SortedMap([
|
|
76
|
+
* [new Date("2026-10-05T00:00:00Z"), 520.0], [new Date("2026-10-12T00:00:00Z"), 410.0], [new Date("2026-10-19T00:00:00Z"), 460.0], [new Date("2026-10-26T00:00:00Z"), 380.0],
|
|
77
|
+
* ], compareFor(DateTimeType)) }],
|
|
78
|
+
* ["uncoated", { name: "Uncoated", weekly: new SortedMap([
|
|
79
|
+
* [new Date("2026-10-05T00:00:00Z"), 300.0], [new Date("2026-10-12T00:00:00Z"), 260.0], [new Date("2026-10-19T00:00:00Z"), 280.0], [new Date("2026-10-26T00:00:00Z"), 240.0],
|
|
80
|
+
* ], compareFor(DateTimeType)) }],
|
|
66
81
|
* ])));
|
|
67
|
-
* export const planLinkSetters = e3.record("plan_link_setters", DictType(StringType, PrintCentre),
|
|
68
|
-
*
|
|
69
|
-
* ]
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
82
|
+
* export const planLinkSetters = e3.record("plan_link_setters", DictType(StringType, PrintCentre), {
|
|
83
|
+
* initial: new Map([
|
|
84
|
+
* ["ps", { name: "Platesetter" }],
|
|
85
|
+
* ]),
|
|
86
|
+
* });
|
|
87
|
+
* export const planLinkLines = e3.record("plan_link_lines", DictType(StringType, PrintCentre), {
|
|
88
|
+
* initial: new Map([
|
|
89
|
+
* ["fold", { name: "Folder" }],
|
|
90
|
+
* ["bind", { name: "Binder" }],
|
|
91
|
+
* ]),
|
|
92
|
+
* });
|
|
93
|
+
* export const planLinkBays = e3.record("plan_link_bays", DictType(StringType, PrintCentre), {
|
|
94
|
+
* initial: new Map([
|
|
95
|
+
* ["bay", { name: "Dispatch bay" }],
|
|
96
|
+
* ]),
|
|
97
|
+
* });
|
|
98
|
+
* export const planLinkPlates = e3.record("plan_link_plates", DictType(StringType, PrintPlates), {
|
|
99
|
+
* initial: new Map([
|
|
100
|
+
* ["P-01", { title: "Catalogue plates", at: new Date("2026-10-05T12:00:00Z"), setter: "ps" }],
|
|
101
|
+
* ]),
|
|
102
|
+
* mutations: (mutation) => ({
|
|
103
|
+
* // The plates' patch door.
|
|
104
|
+
* patch: mutation.patch(),
|
|
105
|
+
* }),
|
|
106
|
+
* });
|
|
107
|
+
* export const planLinkCaseJobs = e3.record("plan_link_case_jobs", DictType(StringType, PrintJob), {
|
|
108
|
+
* initial: new Map([
|
|
109
|
+
* ["J-2001", { title: "Catalogue covers", start: some(new Date("2026-10-08T06:00:00Z")), end: some(new Date("2026-10-08T08:00:00Z")), press: some("a1"), state: variant("confirmed", null), sheets: 12000.0, customer: "Larkspur Home", stock: variant("board", null), due: some(new Date("2026-10-09T00:00:00Z")) }],
|
|
110
|
+
* ["J-2002", { title: "Shop posters", start: some(new Date("2026-10-10T06:00:00Z")), end: some(new Date("2026-10-11T06:00:00Z")), press: some("a1"), state: variant("confirmed", null), sheets: 24000.0, customer: "Orchard Street Market", stock: variant("uncoated", null), due: some(new Date("2026-10-20T00:00:00Z")) }],
|
|
111
|
+
* ["J-2003", { title: "Catalogue inserts", start: some(new Date("2026-10-15T06:00:00Z")), end: some(new Date("2026-10-17T18:00:00Z")), press: some("a1"), state: variant("confirmed", null), sheets: 96000.0, customer: "Larkspur Home", stock: variant("coated", null), due: some(new Date("2026-10-19T00:00:00Z")) }],
|
|
112
|
+
* ["J-2004", { title: "Price lists", start: some(new Date("2026-10-07T12:00:00Z")), end: some(new Date("2026-10-08T18:00:00Z")), press: some("a2"), state: variant("confirmed", null), sheets: 16000.0, customer: "Northwind Outfitters", stock: variant("uncoated", null), due: some(new Date("2026-10-09T00:00:00Z")) }],
|
|
113
|
+
* ["J-2005", { title: "Menu cards", start: some(new Date("2026-10-11T06:00:00Z")), end: some(new Date("2026-10-11T18:00:00Z")), press: some("a2"), state: variant("confirmed", null), sheets: 30000.0, customer: "Copperleaf Cafe", stock: variant("board", null), due: some(new Date("2026-10-13T00:00:00Z")) }],
|
|
114
|
+
* ["J-2006", { title: "Gift tags", start: some(new Date("2026-10-25T06:00:00Z")), end: some(new Date("2026-10-25T18:00:00Z")), press: some("a2"), state: variant("proposed", variant("recommended", null)), sheets: 20000.0, customer: "Juniper Toys", stock: variant("board", null), due: some(new Date("2026-10-28T00:00:00Z")) }],
|
|
115
|
+
* ["J-2007", { title: "Gift boxes", start: some(new Date("2026-10-27T06:00:00Z")), end: some(new Date("2026-10-27T14:00:00Z")), press: some("a2"), state: variant("proposed", variant("recommended", null)), sheets: 48000.0, customer: "Juniper Toys", stock: variant("board", null), due: some(new Date("2026-10-30T00:00:00Z")) }],
|
|
116
|
+
* ["J-2008", { title: "Proof run", start: some(new Date("2026-10-02T06:00:00Z")), end: some(new Date("2026-10-05T18:00:00Z")), press: some("a3"), state: variant("actual", null), sheets: 16000.0, customer: "Meridian Monthly", stock: variant("coated", null), due: some(new Date("2026-10-06T00:00:00Z")) }],
|
|
117
|
+
* ["J-2009", { title: "Annual report", start: some(new Date("2026-10-19T18:00:00Z")), end: some(new Date("2026-10-21T06:00:00Z")), press: some("a3"), state: variant("confirmed", null), sheets: 48000.0, customer: "Harbour Arts Society", stock: variant("coated", null), due: some(new Date("2026-10-23T00:00:00Z")) }],
|
|
118
|
+
* ["J-2010", { title: "Desk calendars", start: some(new Date("2026-10-28T06:00:00Z")), end: some(new Date("2026-10-29T06:00:00Z")), press: some("a3"), state: variant("proposed", variant("added", null)), sheets: 36000.0, customer: "Foxglove Gardens", stock: variant("board", null), due: some(new Date("2026-11-02T00:00:00Z")) }],
|
|
119
|
+
* ["J-2011", { title: "Calendar pads", start: some(new Date("2026-10-29T06:00:00Z")), end: some(new Date("2026-10-30T18:00:00Z")), press: some("a3"), state: variant("proposed", variant("added", null)), sheets: 72000.0, customer: "Foxglove Gardens", stock: variant("uncoated", null), due: some(new Date("2026-11-02T00:00:00Z")) }],
|
|
120
|
+
* ["J-2012", { title: "Proof sheets", start: some(new Date("2026-09-28T06:00:00Z")), end: some(new Date("2026-09-30T18:00:00Z")), press: some("b1"), state: variant("actual", null), sheets: 8000.0, customer: "Northwind Outfitters", stock: variant("uncoated", null), due: some(new Date("2026-10-01T00:00:00Z")) }],
|
|
121
|
+
* ["J-2013", { title: "Catalogue", start: some(new Date("2026-10-12T06:00:00Z")), end: some(new Date("2026-10-13T18:00:00Z")), press: some("b1"), state: variant("confirmed", null), sheets: 144000.0, customer: "Larkspur Home", stock: variant("coated", null), due: some(new Date("2026-10-16T00:00:00Z")) }],
|
|
122
|
+
* ["J-2014", { title: "Seed catalogue", start: some(new Date("2026-10-22T06:00:00Z")), end: some(new Date("2026-10-23T12:00:00Z")), press: some("b1"), state: variant("confirmed", null), sheets: 100000.0, customer: "Foxglove Gardens", stock: variant("coated", null), due: some(new Date("2026-10-26T00:00:00Z")) }],
|
|
123
|
+
* ["J-2015", { title: "Night run", start: some(new Date("2026-10-05T00:00:00Z")), end: some(new Date("2026-10-05T08:00:00Z")), press: some("b2"), state: variant("actual", null), sheets: 16000.0, customer: "Meridian Monthly", stock: variant("coated", null), due: some(new Date("2026-10-06T00:00:00Z")) }],
|
|
124
|
+
* ["J-2016", { title: "Store flyers", start: some(new Date("2026-10-16T06:00:00Z")), end: some(new Date("2026-10-16T20:00:00Z")), press: some("b2"), state: variant("confirmed", null), sheets: 96000.0, customer: "Larkspur Home", stock: variant("uncoated", null), due: some(new Date("2026-10-19T00:00:00Z")) }],
|
|
125
|
+
* ["J-2017", { title: "Seed packets", start: some(new Date("2026-10-23T06:00:00Z")), end: some(new Date("2026-10-24T06:00:00Z")), press: some("b2"), state: variant("confirmed", null), sheets: 72000.0, customer: "Foxglove Gardens", stock: variant("board", null), due: some(new Date("2026-10-27T00:00:00Z")) }],
|
|
126
|
+
* ["J-2018", { title: "Exhibition book", start: some(new Date("2026-10-26T06:00:00Z")), end: some(new Date("2026-10-27T18:00:00Z")), press: some("b2"), state: variant("proposed", variant("recommended", null)), sheets: 54000.0, customer: "Driftwood Museum", stock: variant("coated", null), due: some(new Date("2026-10-30T00:00:00Z")) }],
|
|
127
|
+
* ["J-2019", { title: "Ticket books", start: some(new Date("2026-10-29T06:00:00Z")), end: some(new Date("2026-10-30T06:00:00Z")), press: some("b2"), state: variant("estimated", null), sheets: 60000.0, customer: "Heathfield Theatre", stock: variant("uncoated", null), due: some(new Date("2026-11-02T00:00:00Z")) }],
|
|
128
|
+
* ["J-2020", { title: "Card stock", start: some(new Date("2026-10-06T06:00:00Z")), end: some(new Date("2026-10-06T14:00:00Z")), press: some("b3"), state: variant("actual", null), sheets: 30000.0, customer: "Copperleaf Cafe", stock: variant("board", null), due: some(new Date("2026-10-08T00:00:00Z")) }],
|
|
129
|
+
* ["J-2021", { title: "Book sections", start: some(new Date("2026-10-11T06:00:00Z")), end: some(new Date("2026-10-12T12:00:00Z")), press: some("b3"), state: variant("confirmed", null), sheets: 84000.0, customer: "Driftwood Museum", stock: variant("coated", null), due: some(new Date("2026-10-14T00:00:00Z")) }],
|
|
130
|
+
* ["J-2022", { title: "Report covers", start: some(new Date("2026-10-19T06:00:00Z")), end: some(new Date("2026-10-20T18:00:00Z")), press: some("b3"), state: variant("confirmed", null), sheets: 48000.0, customer: "Harbour Arts Society", stock: variant("board", null), due: some(new Date("2026-10-21T00:00:00Z")) }],
|
|
131
|
+
* ["J-2023", { title: "Spring brochure", start: some(new Date("2026-11-03T06:00:00Z")), end: some(new Date("2026-11-04T18:00:00Z")), press: some("b3"), state: variant("estimated", null), sheets: 60000.0, customer: "Heathfield Theatre", stock: variant("coated", null), due: some(new Date("2026-11-09T00:00:00Z")) }],
|
|
132
|
+
* ]),
|
|
133
|
+
* mutations: (mutation) => ({
|
|
134
|
+
* // The jobs' patch door.
|
|
135
|
+
* patch: mutation.patch(),
|
|
136
|
+
* }),
|
|
137
|
+
* });
|
|
138
|
+
* export const planLinkBindings = e3.record("plan_link_bindings", DictType(StringType, PrintBinding), {
|
|
139
|
+
* initial: new Map([
|
|
140
|
+
* ["B-01", { title: "Fold sections", start: new Date("2026-10-15T06:00:00Z"), end: new Date("2026-10-16T06:00:00Z"), line: "fold", state: variant("confirmed", null) }],
|
|
141
|
+
* ["B-02", { title: "Fold sections", start: new Date("2026-10-17T06:00:00Z"), end: new Date("2026-10-18T06:00:00Z"), line: "fold", state: variant("confirmed", null) }],
|
|
142
|
+
* ["B-03", { title: "Bind books", start: new Date("2026-10-20T18:00:00Z"), end: new Date("2026-10-21T18:00:00Z"), line: "bind", state: variant("confirmed", null) }],
|
|
143
|
+
* ["B-04", { title: "Bind exhibition book", start: new Date("2026-10-25T06:00:00Z"), end: new Date("2026-10-26T06:00:00Z"), line: "bind", state: variant("proposed", variant("recommended", null)) }],
|
|
144
|
+
* ]),
|
|
145
|
+
* mutations: (mutation) => ({
|
|
146
|
+
* // The bindery's patch door.
|
|
147
|
+
* patch: mutation.patch(),
|
|
148
|
+
* }),
|
|
149
|
+
* });
|
|
150
|
+
* export const planLinkDeliveries = e3.record("plan_link_deliveries", DictType(StringType, PrintDelivery), {
|
|
151
|
+
* initial: new Map([
|
|
152
|
+
* ["D-01", { title: "Books", at: new Date("2026-10-28T10:00:00Z"), bay: "bay" }],
|
|
153
|
+
* ["D-02", { title: "Posters", at: new Date("2026-10-20T10:00:00Z"), bay: "bay" }],
|
|
154
|
+
* ]),
|
|
155
|
+
* mutations: (mutation) => ({
|
|
156
|
+
* // The deliveries' patch door.
|
|
157
|
+
* patch: mutation.patch(),
|
|
158
|
+
* }),
|
|
159
|
+
* });
|
|
119
160
|
*
|
|
120
161
|
* const planEventLinks = East.function([], UIComponentType, (_$) => (
|
|
121
162
|
* <Reactive>{$ => {
|
|
@@ -123,16 +164,11 @@ const EVENT_REFS = new WeakMap();
|
|
|
123
164
|
* const presses = $.let(Record.bind(planPrintPresses, []));
|
|
124
165
|
* const lines = $.let(Record.bind(planLinkLines, []));
|
|
125
166
|
* const bays = $.let(Record.bind(planLinkBays, []));
|
|
126
|
-
* const plates = $.let(Record.bind(planLinkPlates
|
|
127
|
-
* const jobs = $.let(Record.bind(planLinkCaseJobs
|
|
128
|
-
* const bindings = $.let(Record.bind(planLinkBindings
|
|
129
|
-
* const deliveries = $.let(Record.bind(planLinkDeliveries
|
|
167
|
+
* const plates = $.let(Record.bind(planLinkPlates));
|
|
168
|
+
* const jobs = $.let(Record.bind(planLinkCaseJobs));
|
|
169
|
+
* const bindings = $.let(Record.bind(planLinkBindings));
|
|
170
|
+
* const deliveries = $.let(Record.bind(planLinkDeliveries));
|
|
130
171
|
* const stock = $.let(Data.bind(planLinkStock));
|
|
131
|
-
* // The window's first Monday: each stock reading runs from it, a week apiece.
|
|
132
|
-
* const first = $.const(new Date("2026-10-05T00:00:00Z"), DateTimeType);
|
|
133
|
-
* const StockWeek = StructType({ at: DateTimeType, value: OptionType(FloatType) });
|
|
134
|
-
* const weekly = $.const(East.function([ArrayType(FloatType)], ArrayType(StockWeek), (_$2, readings) =>
|
|
135
|
-
* East.Array.generate(readings.size(), StockWeek, (_$3, i) => ({ at: first.addWeeks(i), value: some(readings.get(i)) }))));
|
|
136
172
|
* const axis = $.let(Plan.axis({
|
|
137
173
|
* window: { min: new Date("2026-10-05T00:00:00Z"), max: new Date("2026-11-02T00:00:00Z") },
|
|
138
174
|
* resolution: "week", now: new Date("2026-10-14T09:00:00Z"),
|
|
@@ -174,7 +210,7 @@ const EVENT_REFS = new WeakMap();
|
|
|
174
210
|
* Plan.over(stock, [
|
|
175
211
|
* Plan.series.table(PrintStock, {
|
|
176
212
|
* key: "stock", title: "Paper stock", label: s => s.name,
|
|
177
|
-
* cells:
|
|
213
|
+
* cells: Plan.tableCells(Plan.values("weekly", (level) => ({ value: level }))),
|
|
178
214
|
* format: Format.Number({ maximumFractionDigits: 0n }),
|
|
179
215
|
* }),
|
|
180
216
|
* ]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refs.js","sourceRoot":"","sources":["../../../src/plan/refs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAA2D,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,2EAA2E;AAC3E,MAAM,UAAU,GAAG,IAAI,OAAO,EAAkB,CAAC;AAEjD
|
|
1
|
+
{"version":3,"file":"refs.js","sourceRoot":"","sources":["../../../src/plan/refs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAA2D,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,2EAA2E;AAC3E,MAAM,UAAU,GAAG,IAAI,OAAO,EAAkB,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+NG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,GAAmC;IAC5E,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;IACxG,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC1B,OAAO,GAAG,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,GAAY;IACrC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACrF,CAAC"}
|
package/dist/src/plan/root.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
*/
|
|
13
|
-
import { type EastType, type ExprType, type SubtypeExprOrValue, Expr, ArrayType, BooleanType, DictType, FunctionType, NullType, OptionType, StringType, type option } from "@elaraai/east";
|
|
13
|
+
import { type EastType, type ExprType, type SubtypeExprOrValue, Expr, ArrayType, BooleanType, DictType, FunctionType, NullType, OptionType, StringType, StructType, type option } from "@elaraai/east";
|
|
14
14
|
import { DensityType, DragEventType, StatusValueType, UIComponentType, type DensityLiteral, type PagedSourceLike, type PickHandle, type StatusValueLiteral } from "@elaraai/east-ui";
|
|
15
15
|
import { type RecordSlicesChromeType } from "@elaraai/east-ui/internal";
|
|
16
16
|
import { PlanGrainType, type PlanGrainLiteral, PlanLinkType, PlanRowIdType, PlanGroupToggleEventType, PlanElementRefType, PlanBlocksType, PlanUiBindType, type PlanAxisKindLiteral, type PlanAxisInput } from "./types.js";
|
|
@@ -190,9 +190,9 @@ export interface PlanConfig<K extends PlanAxisKindLiteral = PlanAxisKindLiteral>
|
|
|
190
190
|
/** DnD target identity — names the Plan in drag-grammar cell refs, which is how a Library beside the Plan
|
|
191
191
|
* reaches it: its cards land only on a Plan with an `id` whose `sources` lists it. The Plan's own library
|
|
192
192
|
* panel needs neither — an author's tab's cards land without them (#1259). A card lands only on a row whose
|
|
193
|
-
* series declares `edit
|
|
194
|
-
* move whether or not it has an `id` — where their series declares
|
|
195
|
-
*
|
|
193
|
+
* series declares `edit: { create }` (how it becomes an item, under the id the canvas mints, #1436). The
|
|
194
|
+
* canvas's own elements move whether or not it has an `id` — where their series declares `edit`, its elements
|
|
195
|
+
* read with `Plan.items` (#825, #1436). Each is a draft of the root's `editing` session. */
|
|
196
196
|
id?: string;
|
|
197
197
|
/** The ids of the Libraries beside the Plan whose cards it takes (`add`), reached by its `id` — its own
|
|
198
198
|
* library panel's need none (omit = no Library beside it). */
|
|
@@ -279,10 +279,15 @@ export type PlanCanvasOptions = Omit<PlanConfig, "data"> & {
|
|
|
279
279
|
* @param config - The canvas's configuration, `data` optional
|
|
280
280
|
* @param extra - The fixed blocks after `data`'s: a Plan's `rows`
|
|
281
281
|
* @param chrome - The chrome of the Plan's `Slice.bindRecords`; `none` with no slice
|
|
282
|
+
* @param rowsNested - The nested part of the Slice's `rows` source, where it gives the canvas its rows
|
|
283
|
+
* @param rowsBinding - The binding the Slice's `rows` source narrows, there: what its nested index is read through
|
|
284
|
+
* @param pickHeld - The pick, held in a variable of the block the root is built in: what the root's reads of its
|
|
285
|
+
* series read. `config.pick` still says which series it lists; written out at each read, it would copy every series'
|
|
286
|
+
* code into each
|
|
282
287
|
* @returns An East expression of {@link PlanRootType}
|
|
283
288
|
* @throws {Error} As {@link createPlanRoot} does — an axis stating no window is taken beside a slice, a source of which
|
|
284
289
|
* holds the window in its `range`; and with no `data`, a `series`, `pick` or `editing`, each of which reads it
|
|
285
290
|
* @internal
|
|
286
291
|
*/
|
|
287
|
-
export declare function buildPlanRoot(config: PlanCanvasOptions, extra: ExprType<PlanBlocksType> | undefined, chrome: option<ExprType<RecordSlicesChromeType
|
|
292
|
+
export declare function buildPlanRoot(config: PlanCanvasOptions, extra: ExprType<PlanBlocksType> | undefined, chrome: option<ExprType<RecordSlicesChromeType>>, rowsNested?: EastType, rowsBinding?: ExprType<StructType>, pickHeld?: ExprType<StructType>): ExprType<PlanRootType>;
|
|
288
293
|
//# sourceMappingURL=root.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/plan/root.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAEvB,IAAI,EACJ,SAAS,EAGT,WAAW,EACX,QAAQ,EACR,YAAY,EAEZ,QAAQ,EACR,UAAU,EACV,UAAU,
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/plan/root.ts"],"names":[],"mappings":"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"}
|
package/dist/src/plan/root.js
CHANGED
|
@@ -16,7 +16,11 @@ import { EditingApplyResultType, EditingChangeSetTypeFor, EditingDraftFieldType,
|
|
|
16
16
|
import { PlanAxisType, PlanGrainType, PlanLinkType, PlanRowIdType, PlanGroupToggleEventType, PlanFooterItemType, PlanStyleType, PlanElementRefType, PlanBlocksType, PlanRowsType, PlanUiBindType, PlanEditingType, PlanReadyEntryType, PlanWriteRequestType, PLAN_PAGE_SIZE, } from "./types.js";
|
|
17
17
|
import { orderedPlanSource } from "./ordered-source.js";
|
|
18
18
|
import { PlanRootType } from "./ir.js";
|
|
19
|
-
import { WINDOWLESS_AXES } from "./builders.js";
|
|
19
|
+
import { WINDOWLESS_AXES, axisKindOf, axisResolutionsOf } from "./builders.js";
|
|
20
|
+
import { checkPlanNested, nestedPartOf, planNestedIndex } from "./nested-checks.js";
|
|
21
|
+
import { planNestedRestatement } from "./nested-patch.js";
|
|
22
|
+
import { PlanNestedType, planNestedUses } from "./nested-read.js";
|
|
23
|
+
import { pickedSeriesOf } from "./pick.js";
|
|
20
24
|
import { applySeries, checkSeries, seriesWriteFn, PlanCarriedType, PlanSeriesType } from "./series.js";
|
|
21
25
|
/** The source collection a series list's East type reads — its `derive`'s input, when the list's element is a series variant. */
|
|
22
26
|
function seriesSourceOf(list) {
|
|
@@ -56,12 +60,17 @@ export function createPlanRoot(config) {
|
|
|
56
60
|
* @param config - The canvas's configuration, `data` optional
|
|
57
61
|
* @param extra - The fixed blocks after `data`'s: a Plan's `rows`
|
|
58
62
|
* @param chrome - The chrome of the Plan's `Slice.bindRecords`; `none` with no slice
|
|
63
|
+
* @param rowsNested - The nested part of the Slice's `rows` source, where it gives the canvas its rows
|
|
64
|
+
* @param rowsBinding - The binding the Slice's `rows` source narrows, there: what its nested index is read through
|
|
65
|
+
* @param pickHeld - The pick, held in a variable of the block the root is built in: what the root's reads of its
|
|
66
|
+
* series read. `config.pick` still says which series it lists; written out at each read, it would copy every series'
|
|
67
|
+
* code into each
|
|
59
68
|
* @returns An East expression of {@link PlanRootType}
|
|
60
69
|
* @throws {Error} As {@link createPlanRoot} does — an axis stating no window is taken beside a slice, a source of which
|
|
61
70
|
* holds the window in its `range`; and with no `data`, a `series`, `pick` or `editing`, each of which reads it
|
|
62
71
|
* @internal
|
|
63
72
|
*/
|
|
64
|
-
export function buildPlanRoot(config, extra, chrome) {
|
|
73
|
+
export function buildPlanRoot(config, extra, chrome, rowsNested, rowsBinding, pickHeld) {
|
|
65
74
|
// A canvas is DEFINED as data + series (+ the root resolvers) — there
|
|
66
75
|
// is no rows-authoring channel; the IR's inline arm is what inline
|
|
67
76
|
// application collapses to. A Plan of event kinds or `rows` alone has no data.
|
|
@@ -72,7 +81,7 @@ export function buildPlanRoot(config, extra, chrome) {
|
|
|
72
81
|
// lose them silently.
|
|
73
82
|
if ("onDrag" in config) {
|
|
74
83
|
throw new Error("Plan: `onDrag` is removed (#880) — a card dropped on a row is a draft of the `editing` session: declare " +
|
|
75
|
-
"`edit: {
|
|
84
|
+
"`edit: { create }` on the series it lands on, and commit with `editing.onApply` (or `onUpdate`)");
|
|
76
85
|
}
|
|
77
86
|
if ("review" in config) {
|
|
78
87
|
throw new Error("Plan: `review` is removed (#1260) — a Plan approves and rejects nothing: its changes are drafts of the " +
|
|
@@ -99,16 +108,43 @@ export function buildPlanRoot(config, extra, chrome) {
|
|
|
99
108
|
"an event kind's, or a tab's: slice={{ slice: Slice.bindRecords(key, { <kind>: { source, range } }) }}. " +
|
|
100
109
|
"A canvas never fits its axis to the data, so it reads the same inline and paged.");
|
|
101
110
|
}
|
|
111
|
+
// Over a record's paged rows, each series is held to the rows' nested series index first (#1435): where its slice's
|
|
112
|
+
// `rows` source gives them, or `data` is the record's indexed binding, whose type carries its nested part. Rows paged
|
|
113
|
+
// whole (`Data.bindPaged(dataset)`) are read as #1436 reads them.
|
|
114
|
+
const nested = config.data === undefined ? undefined
|
|
115
|
+
: rowsNested ?? nestedPartOf(Expr.type(East.value(config.data)));
|
|
116
|
+
let reads = [];
|
|
117
|
+
if (nested !== undefined) {
|
|
118
|
+
// What each series reads is known as the Plan is built: from the list it was given, or the one its pick was. A pick
|
|
119
|
+
// read through an East variable is an expression whose series the build cannot see.
|
|
120
|
+
const declared = config.pick !== undefined ? pickedSeriesOf(config.pick) : config.series;
|
|
121
|
+
const index = planNestedIndex(nested);
|
|
122
|
+
if (index !== undefined && !Array.isArray(declared)) {
|
|
123
|
+
throw new Error(config.pick !== undefined
|
|
124
|
+
? "Plan: its rows are read through a nested series index, a cell at a time, by what each series reads — known as the Plan is " +
|
|
125
|
+
"built — and its pick is an East expression whose series it cannot see. Give `pick` Plan.pick(key, [Plan.series.span(…), …]) " +
|
|
126
|
+
"as it returns it: its series a list, and the pick held in no East variable ($.let)"
|
|
127
|
+
: "Plan: its rows are read through a nested series index, a cell at a time, by what each series reads — known as the Plan is " +
|
|
128
|
+
"built — and its `series` are an East expression of a list. Give `series` the list itself: [Plan.series.span(…), …]");
|
|
129
|
+
}
|
|
130
|
+
reads = checkPlanNested(declared, { index, axisKind: axisKindOf(config.axis), resolutions: axisResolutionsOf(config.axis) });
|
|
131
|
+
}
|
|
102
132
|
if (config.series !== undefined)
|
|
103
|
-
checkSeries(config.series, "Plan");
|
|
133
|
+
checkSeries(config.series, "Plan", axisKindOf(config.axis));
|
|
104
134
|
const data = config.data;
|
|
105
135
|
if (data === undefined)
|
|
106
|
-
return rootOf(config, East.value(variant("inline", extra), PlanRowsType), undefined, chrome);
|
|
136
|
+
return rootOf(config, East.value(variant("inline", extra), PlanRowsType), undefined, chrome, undefined);
|
|
107
137
|
// A pick feeds the canvas its SURVIVING series; everything downstream sees
|
|
108
138
|
// one series input either way.
|
|
109
|
-
const
|
|
110
|
-
|
|
139
|
+
const pick = pickHeld ?? config.pick;
|
|
140
|
+
const seriesInput = pick !== undefined
|
|
141
|
+
? pickActive(pick)
|
|
111
142
|
: config.series;
|
|
143
|
+
// A gesture writes the data, whichever series show (#1440): the editing session is built over every series a pick
|
|
144
|
+
// holds, so a number written as its series is switched off — its field leaving with its row — lands, never refused.
|
|
145
|
+
const editSeries = pick !== undefined
|
|
146
|
+
? pick.all
|
|
147
|
+
: seriesInput;
|
|
112
148
|
// The shared row-source resolution (#567): inline collection, paged
|
|
113
149
|
// source, or a whole-value bind handle — one dispatch, one vocabulary,
|
|
114
150
|
// and the series pipeline is the `make` that turns each window's entries
|
|
@@ -144,8 +180,21 @@ export function buildPlanRoot(config, extra, chrome) {
|
|
|
144
180
|
const blocks = ordered === undefined ? applySeries(seriesInput, source) : ordered.make(seriesInput, source);
|
|
145
181
|
return extra === undefined ? blocks : blocks.concat(extra);
|
|
146
182
|
});
|
|
147
|
-
const editing = config.editing === undefined ? undefined : buildPlanEditing(resolved,
|
|
148
|
-
|
|
183
|
+
const editing = config.editing === undefined ? undefined : buildPlanEditing(resolved, editSeries, config.editing, planNestedIndex(nested));
|
|
184
|
+
// Paged beside their nested series index (#1438): the seam the reader reads the index's cells through, and the window
|
|
185
|
+
// its rows are drawn from with what it read — the binding's, or the one the Slice's `rows` source narrows.
|
|
186
|
+
const index = planNestedIndex(nested);
|
|
187
|
+
const binding = (rowsBinding ?? config.data);
|
|
188
|
+
const uses = index === undefined ? [] : planNestedUses(reads, index);
|
|
189
|
+
const nestedSeam = index === undefined || ordered === undefined ? undefined : East.value({
|
|
190
|
+
index: index.name,
|
|
191
|
+
source: binding.id,
|
|
192
|
+
tile: variant(index.tile, null),
|
|
193
|
+
summary: index.summary === undefined ? none : some(variant(index.summary, null)),
|
|
194
|
+
uses,
|
|
195
|
+
rows: ordered.nestedRows(seriesInput, binding.fill.unwrap(), new Set(uses.filter((use) => use.shade.type === "booked").map((use) => use.series))),
|
|
196
|
+
}, PlanNestedType);
|
|
197
|
+
return rootOf(pick === config.pick ? config : { ...config, pick }, rowsValue, editing === undefined ? undefined : ordered?.editing(editing) ?? editing, chrome, nestedSeam);
|
|
149
198
|
}
|
|
150
199
|
/**
|
|
151
200
|
* The canvas's root around its rows, its editing session and its narrowing's chrome.
|
|
@@ -154,9 +203,10 @@ export function buildPlanRoot(config, extra, chrome) {
|
|
|
154
203
|
* @param rowsValue - Its rows: inline blocks, or a paged source of them
|
|
155
204
|
* @param editing - Its editing session over `data`, if it has one
|
|
156
205
|
* @param chrome - The chrome of the Plan's `Slice.bindRecords`; `none` with no slice
|
|
206
|
+
* @param nested - What its paged rows' reader reads of their nested series index, if it reads it (#1438)
|
|
157
207
|
* @returns An East expression of {@link PlanRootType}
|
|
158
208
|
*/
|
|
159
|
-
function rootOf(config, rowsValue, editing, chrome) {
|
|
209
|
+
function rootOf(config, rowsValue, editing, chrome, nested) {
|
|
160
210
|
const style = config.style;
|
|
161
211
|
const styleValue = style !== undefined
|
|
162
212
|
? some(East.value({
|
|
@@ -192,6 +242,7 @@ function rootOf(config, rowsValue, editing, chrome) {
|
|
|
192
242
|
? some(East.value(config.pick.pick, PickBindType))
|
|
193
243
|
: none,
|
|
194
244
|
slice: chrome,
|
|
245
|
+
nested: nested !== undefined ? some(nested) : none,
|
|
195
246
|
footer: (config.footer ?? []).map(f => East.value({
|
|
196
247
|
text: f.text,
|
|
197
248
|
tone: f.tone !== undefined ? some(resolveTag(f.tone, StatusValueType)) : none,
|
|
@@ -231,7 +282,7 @@ function rootOf(config, rowsValue, editing, chrome) {
|
|
|
231
282
|
* @returns The editing declaration, on the wire
|
|
232
283
|
* @throws {Error} When the declaration is inconsistent, or a callback has another signature
|
|
233
284
|
*/
|
|
234
|
-
function buildPlanEditing(resolved, series, input) {
|
|
285
|
+
function buildPlanEditing(resolved, series, input, nested) {
|
|
235
286
|
const sourceType = resolved.collectionType;
|
|
236
287
|
const entryType = sourceType.value;
|
|
237
288
|
const keyType = sourceType.key;
|
|
@@ -413,18 +464,30 @@ function buildPlanEditing(resolved, series, input) {
|
|
|
413
464
|
}
|
|
414
465
|
else if (authorApply !== undefined) {
|
|
415
466
|
const typedBatch = batchType;
|
|
467
|
+
// Over rows read beside their nested series index (#1438), each change's patch restated by key before the author's
|
|
468
|
+
// apply: a collection's whole `replace` the operations it stands for, so a commit names only what it changed.
|
|
469
|
+
const restatement = nested === undefined ? undefined
|
|
470
|
+
: planNestedRestatement(entryType, keyType, nested);
|
|
416
471
|
if (Expr.type(authorApply).type === "AsyncFunction") {
|
|
417
472
|
const fn = authorApply;
|
|
418
473
|
onApply = East.value(variant("async", East.asyncFunction([BlobType], EditingApplyResultType, ($, blob) => {
|
|
419
474
|
const apply = $.const(fn);
|
|
420
|
-
|
|
475
|
+
const batch = $.let(blob.decodeBeast(typedBatch, "v2"));
|
|
476
|
+
if (restatement === undefined)
|
|
477
|
+
return apply(batch);
|
|
478
|
+
const restate = $.const(restatement);
|
|
479
|
+
return apply(restate(batch));
|
|
421
480
|
})), EditingWireApplyType);
|
|
422
481
|
}
|
|
423
482
|
else {
|
|
424
483
|
const fn = authorApply;
|
|
425
484
|
onApply = East.value(variant("sync", East.function([BlobType], EditingApplyResultType, ($, blob) => {
|
|
426
485
|
const apply = $.const(fn);
|
|
427
|
-
|
|
486
|
+
const batch = $.let(blob.decodeBeast(typedBatch, "v2"));
|
|
487
|
+
if (restatement === undefined)
|
|
488
|
+
return apply(batch);
|
|
489
|
+
const restate = $.const(restatement);
|
|
490
|
+
return apply(restate(batch));
|
|
428
491
|
})), EditingWireApplyType);
|
|
429
492
|
}
|
|
430
493
|
}
|