@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
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@elaraai/e3-ui/jsx-runtime";
|
|
|
5
5
|
*/
|
|
6
6
|
/** @jsxImportSource @elaraai/e3-ui */
|
|
7
7
|
import { East, ArrayType, BooleanType, DateTimeType, DictType, FloatType, FunctionType, IntegerType, NullType, OptionType, PatchType, SetType, StringType, StructType, VariantType, example, none, some, variant, } from "@elaraai/east";
|
|
8
|
-
import { Badge, Box, Configurator, Field, Format, HStack, Input, Reactive, SegmentGroup, Slice, State, StatusValueType, Style, Switch, Text, UIComponentType, VStack, } from "@elaraai/east-ui";
|
|
8
|
+
import { Badge, Box, Button, Configurator, Field, Format, HStack, Input, Reactive, SegmentGroup, Slice, State, StatusValueType, Style, Switch, Text, UIComponentType, VStack, } from "@elaraai/east-ui";
|
|
9
9
|
import { Data, Record, Sheet } from "@elaraai/e3-ui";
|
|
10
10
|
import e3 from "@elaraai/e3";
|
|
11
11
|
// ============================================================================
|
|
@@ -17,8 +17,9 @@ import e3 from "@elaraai/e3";
|
|
|
17
17
|
// - `sheetBasic`, the smallest: a record's entries as the rows (§3.1);
|
|
18
18
|
// - `sheetVariants`, THE configurator: the sheet's options as axes, over the
|
|
19
19
|
// host's rows (`data`), committed through `onApply`;
|
|
20
|
-
// - `sheetStress`, two thousand rows of a record, read only,
|
|
21
|
-
//
|
|
20
|
+
// - `sheetStress`, two thousand rows of a record, read only, the narrowing
|
|
21
|
+
// its rail makes through the record's indexes drawn over them as the lens,
|
|
22
|
+
// and views over that narrowing;
|
|
22
23
|
// - `sheetLibrary`, a library of the author's own (§4.4);
|
|
23
24
|
// - `sheetWorkshop`, the flagship — the joinery workshop's orders (§3.3):
|
|
24
25
|
// groups, the driver and registers, the link grammar, the copilot,
|
|
@@ -30,7 +31,8 @@ import e3 from "@elaraai/e3";
|
|
|
30
31
|
// narrows;
|
|
31
32
|
// - `sheetLoose`, loose rows between the groups (#846);
|
|
32
33
|
// - `sheetPaged`, a record read a window at a time;
|
|
33
|
-
// - `sheetUpkeep`, the inspector's every field kind (#1220)
|
|
34
|
+
// - `sheetUpkeep`, the inspector's every field kind (#1220);
|
|
35
|
+
// - `sheetConflicts`, your edits meeting someone else's save, in one window.
|
|
34
36
|
//
|
|
35
37
|
// Its panes are optional props, and the examples show each combination:
|
|
36
38
|
// none (`sheetBasic`, `sheetVariants`, `sheetStress`, `sheetLoose`,
|
|
@@ -56,29 +58,37 @@ import e3 from "@elaraai/e3";
|
|
|
56
58
|
/** A job — what it is, when it starts and how many. */
|
|
57
59
|
export const SheetJob = StructType({ task: StringType, start: OptionType(DateTimeType), qty: OptionType(FloatType) });
|
|
58
60
|
/** The jobs, keyed J-0001, J-0002, …: the record's entries are the sheet's rows. */
|
|
59
|
-
export const sheetJobs = e3.record("sheet_jobs", DictType(StringType, SheetJob),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
]
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
export const sheetJobs = e3.record("sheet_jobs", DictType(StringType, SheetJob), {
|
|
62
|
+
initial: new Map([
|
|
63
|
+
["J-0001", { task: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0) }],
|
|
64
|
+
["J-0002", { task: "Edge banding", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0) }],
|
|
65
|
+
["J-0003", { task: "CNC routing", start: none, qty: some(48.0) }],
|
|
66
|
+
["J-0004", { task: "Spray finish", start: none, qty: none }],
|
|
67
|
+
]),
|
|
68
|
+
mutations: (mutation) => ({
|
|
69
|
+
// The jobs' patch door — every Save commits through it.
|
|
70
|
+
patch: mutation.patch(),
|
|
71
|
+
}),
|
|
72
|
+
});
|
|
67
73
|
/** The jobs again, as the edge bander's week holds them: a Save over them is refused for a reason the record gives. */
|
|
68
|
-
export const sheetBookedJobs = e3.record("sheet_booked_jobs", DictType(StringType, SheetJob),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
]
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
})
|
|
74
|
+
export const sheetBookedJobs = e3.record("sheet_booked_jobs", DictType(StringType, SheetJob), {
|
|
75
|
+
initial: new Map([
|
|
76
|
+
["J-0001", { task: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0) }],
|
|
77
|
+
["J-0002", { task: "Edge banding", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0) }],
|
|
78
|
+
["J-0003", { task: "CNC routing", start: none, qty: some(48.0) }],
|
|
79
|
+
["J-0004", { task: "Spray finish", start: none, qty: none }],
|
|
80
|
+
]),
|
|
81
|
+
mutations: (mutation) => ({
|
|
82
|
+
// The booked jobs' patch door: it commits a patch unless a job it leaves bands both edges — the edge bander is booked that week.
|
|
83
|
+
patch: mutation.reduce(East.function([DictType(StringType, SheetJob), PatchType(DictType(StringType, SheetJob))], DictType(StringType, SheetJob), ($, jobs, patch) => {
|
|
84
|
+
const next = $.let(East.applyPatch(jobs, patch));
|
|
85
|
+
$.for(next, ($2, job) => {
|
|
86
|
+
$2.if(job.task.endsWith("both edges"), ($3) => { $3.error("the edge bander is booked that week"); });
|
|
87
|
+
});
|
|
88
|
+
return next;
|
|
89
|
+
})),
|
|
90
|
+
}),
|
|
91
|
+
});
|
|
82
92
|
/**
|
|
83
93
|
* The smallest sheet (§3.1) — the jobs an e3 record holds, in its frame: one
|
|
84
94
|
* row per job in key order and a blank tail for the next, three typed
|
|
@@ -89,7 +99,7 @@ export const sheetBasic = example({
|
|
|
89
99
|
keywords: ["Sheet", "basic", "BuilderFrame", "record", "Record", "Record.bind", "e3.record", "patch", "commit", "column", "date", "text", "quantity", "key order", "Reactive"],
|
|
90
100
|
description: "The smallest sheet — an e3 record's entries as its rows, in key order, under three typed columns, edited as drafts and saved as one commit through the record's patch door, in its frame with no pane",
|
|
91
101
|
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
92
|
-
const jobs = $.let(Record.bind(sheetJobs
|
|
102
|
+
const jobs = $.let(Record.bind(sheetJobs));
|
|
93
103
|
return (_jsx(Box, { height: "560px", children: _jsx(Sheet, { record: jobs, columns: {
|
|
94
104
|
task: Sheet.column.text(SheetJob, { header: "Task", width: "240px" }),
|
|
95
105
|
start: Sheet.column.date(SheetJob, { header: "Start", width: "96px" }),
|
|
@@ -106,15 +116,19 @@ export const VariantsJob = StructType({ id: StringType, start: OptionType(DateTi
|
|
|
106
116
|
/** A plan — its jobs, in the planner's order. */
|
|
107
117
|
export const VariantsPlan = StructType({ jobs: ArrayType(VariantsJob) });
|
|
108
118
|
/** The plans — the configurator's sheet edits the week's jobs. */
|
|
109
|
-
export const sheetVariantsPlans = e3.record("sheet_variants_plans", DictType(StringType, VariantsPlan),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
]
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
export const sheetVariantsPlans = e3.record("sheet_variants_plans", DictType(StringType, VariantsPlan), {
|
|
120
|
+
initial: new Map([
|
|
121
|
+
["week", { jobs: [
|
|
122
|
+
{ id: "j1", start: some(new Date("2026-02-16T00:00:00Z")), task: "Routing", qty: some(1200.0), notes: "Nest the C-18 panels" },
|
|
123
|
+
{ id: "j2", start: some(new Date("2026-03-09T00:00:00Z")), task: "Spraying", qty: some(250.0), notes: "" },
|
|
124
|
+
{ id: "j3", start: none, task: "Wrapping", qty: none, notes: "" },
|
|
125
|
+
] }],
|
|
126
|
+
]),
|
|
127
|
+
mutations: (mutation) => ({
|
|
128
|
+
// The record's patch door — every Save commits through it.
|
|
129
|
+
patch: mutation.patch(),
|
|
130
|
+
}),
|
|
131
|
+
});
|
|
118
132
|
/**
|
|
119
133
|
* THE Sheet configurator — ONE live sheet in its frame; every axis is an
|
|
120
134
|
* expression-fed prop on that single instance: density, the blank tail, read
|
|
@@ -132,7 +146,7 @@ export const sheetVariants = example({
|
|
|
132
146
|
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
133
147
|
const Ctx = Sheet.Types.DraftContext(VariantsJob);
|
|
134
148
|
// The jobs, read from an e3 record bound with its patch door.
|
|
135
|
-
const plans = $.let(Record.bind(sheetVariantsPlans
|
|
149
|
+
const plans = $.let(Record.bind(sheetVariantsPlans));
|
|
136
150
|
const rows = $.let(plans.read().get("week").jobs);
|
|
137
151
|
const onApply = $.const(Record.onApply(plans, {
|
|
138
152
|
entry: "week",
|
|
@@ -226,37 +240,42 @@ export const generateStressJobs = East.function([IntegerType], ArrayType(StressJ
|
|
|
226
240
|
}));
|
|
227
241
|
});
|
|
228
242
|
/** The jobs, keyed by their id — two thousand made by {@link generateStressJobs}: what the stress sheet pages and its rail narrows (#1345). */
|
|
229
|
-
export const sheetStressJobs = e3.record("sheet_stress_jobs", DictType(StringType, StressJob),
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
243
|
+
export const sheetStressJobs = e3.record("sheet_stress_jobs", DictType(StringType, StressJob), {
|
|
244
|
+
initial: () => East.compile(East.function([IntegerType], DictType(StringType, StressJob), ($, count) => {
|
|
245
|
+
const generate = $.const(generateStressJobs);
|
|
246
|
+
return generate(count).toDict((_$, job) => job.id, (_$, job) => job);
|
|
247
|
+
}), [])(2000n),
|
|
248
|
+
indexes: (index) => ({
|
|
249
|
+
// The jobs by activity, by status and by their notes: what the rail narrows them by, each choice one index's runs.
|
|
250
|
+
sheet_stress_by_activity: index.on(["activity"]),
|
|
251
|
+
sheet_stress_by_status: index.on(["status"]),
|
|
252
|
+
sheet_stress_by_notes: index.on(["notes"]),
|
|
253
|
+
}),
|
|
254
|
+
});
|
|
237
255
|
/**
|
|
238
256
|
* Stress (§3.8) — two thousand jobs of an e3 record, read only, every row
|
|
239
|
-
* virtualised,
|
|
257
|
+
* virtualised, in the record's order. The rail is the sheet's
|
|
240
258
|
* `Slice.bindRecords`: its `rows` source narrows the jobs by activity, by
|
|
241
259
|
* status and by a prefix of their notes, each through the record's own index,
|
|
242
|
-
* and the sheet
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
260
|
+
* and the sheet draws the narrowing over the jobs as the lens (#1349), a
|
|
261
|
+
* filtered spreadsheet: only the jobs it keeps, one after another, each at
|
|
262
|
+
* its row number. Saved views each keep every source's narrowing
|
|
263
|
+
* (`Sheet.Types.RecordView`, its values `.east` literals), the first one
|
|
264
|
+
* open, kept per viewer through a `State` bind handle. It is given no pane.
|
|
246
265
|
*/
|
|
247
266
|
export const sheetStress = example({
|
|
248
|
-
keywords: ["Sheet", "stress", "virtualization", "2000", "rows", "performance", "readOnly", "slice", "Slice.bindRecords", "rows", "Data.bindPaged", "
|
|
249
|
-
description: "Two thousand jobs of an e3 record, read only and virtualised in the sheet's frame,
|
|
267
|
+
keywords: ["Sheet", "stress", "virtualization", "2000", "rows", "performance", "readOnly", "slice", "Slice.bindRecords", "rows", "Data.bindPaged", "indexes", "record", "search", "filter", "lens", "views", "RecordView", "State.bind", "activeView", "set", "register", "concat", "footer", "paged", "Reactive", "State"],
|
|
268
|
+
description: "Two thousand jobs of an e3 record, read only and virtualised in the sheet's frame, in the record's order, the rail's narrowing — by activity, by status and by a prefix of their notes, each through the record's index — drawn over them as the lens, a filtered spreadsheet showing only the jobs it keeps, with saved views kept per viewer, each every source's narrowing",
|
|
250
269
|
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
251
270
|
const MachineType = StructType({ code: StringType, family: StringType });
|
|
252
271
|
const machines = $.const([
|
|
253
272
|
{ code: "R2140", family: "CNC router" }, { code: "R2141", family: "CNC router" }, { code: "R2145", family: "CNC router" },
|
|
254
273
|
{ code: "P3210", family: "4-side planer" }, { code: "A7301", family: "assembly bench" },
|
|
255
274
|
], ArrayType(MachineType));
|
|
256
|
-
// One rail over the jobs: the sheet's rows are
|
|
275
|
+
// One rail over the jobs: the sheet's rows are the record's, its `rows` source's narrowing drawn over them as the lens.
|
|
257
276
|
const slice = $.let(Slice.bindRecords("sheet_stress", {
|
|
258
277
|
rows: {
|
|
259
|
-
source: Data.bindPaged(sheetStressJobs, { indexes: [
|
|
278
|
+
source: Data.bindPaged(sheetStressJobs, { indexes: ["sheet_stress_by_activity", "sheet_stress_by_status", "sheet_stress_by_notes"] }),
|
|
260
279
|
fields: {
|
|
261
280
|
activity: { label: "Activity", hints: ["Routing", "Spraying", "Wrapping", "Set-up", "Maintenance"] },
|
|
262
281
|
status: { label: "Status", hints: ["PLANNED", "RELEASED", "COMPLETE"] },
|
|
@@ -267,11 +286,11 @@ export const sheetStress = example({
|
|
|
267
286
|
}));
|
|
268
287
|
// Each view keeps every source's narrowing, by name: an activity's value is its `.east` literal, a search its prefix.
|
|
269
288
|
const views = $.let(State.bind([ArrayType(Sheet.Types.RecordView)], "sheet_stress_views", [
|
|
270
|
-
{ id: "spraying", name: "SPRAYING",
|
|
289
|
+
{ id: "spraying", name: "SPRAYING", folds: new Map(),
|
|
271
290
|
narrowing: new Map([["rows", { where: new Map([["activity", variant("values", ["\"Spraying\""])]]), preset: none, resolution: none }]]) },
|
|
272
|
-
{ id: "routers", name: "ROUTERS",
|
|
291
|
+
{ id: "routers", name: "ROUTERS", folds: new Map(),
|
|
273
292
|
narrowing: new Map([["rows", { where: new Map([["activity", variant("values", ["\"Routing\""])]]), preset: none, resolution: none }]]) },
|
|
274
|
-
{ id: "urgent", name: "URGENT",
|
|
293
|
+
{ id: "urgent", name: "URGENT", folds: new Map(),
|
|
275
294
|
narrowing: new Map([["rows", { where: new Map([["notes", variant("prefix", "urgent")]]), preset: none, resolution: none }]]) },
|
|
276
295
|
]));
|
|
277
296
|
return (_jsx(Box, { height: "480px", children: _jsx(Sheet, { slice: { slice }, name: "stress", registers: {
|
|
@@ -306,7 +325,7 @@ export const sheetLibrary = example({
|
|
|
306
325
|
keywords: ["Sheet", "BuilderFrame", "pane", "library", "Sheet.library", "Sheet.library.tab", "Sheet.library.columns", "tab", "cards", "drop", "Sheet.patch", "group"],
|
|
307
326
|
description: "A sheet whose library pane lists a tab of the author's own — the tasks a job takes, grouped by stage, a card dropped on a job setting its task — beside the columns",
|
|
308
327
|
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
309
|
-
const jobs = $.let(Record.bind(sheetJobs
|
|
328
|
+
const jobs = $.let(Record.bind(sheetJobs));
|
|
310
329
|
const tasks = $.let([
|
|
311
330
|
{ name: "Panel cutting", stage: "Cutting" },
|
|
312
331
|
{ name: "Edge banding", stage: "Cutting" },
|
|
@@ -372,134 +391,150 @@ export const sheetWorkshopActivities = e3.input("sheet_workshop_activities", Arr
|
|
|
372
391
|
{ name: "Delivery", uom: "loads", days: 1n, rate: 1.0, family: "", sides: variant("from", null) },
|
|
373
392
|
]));
|
|
374
393
|
/** The machines, keyed by code — the work centres' register. */
|
|
375
|
-
export const sheetWorkshopMachines = e3.record("sheet_workshop_machines", DictType(StringType, WorkshopMachine),
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
]
|
|
394
|
+
export const sheetWorkshopMachines = e3.record("sheet_workshop_machines", DictType(StringType, WorkshopMachine), {
|
|
395
|
+
initial: new Map([
|
|
396
|
+
["S101", { family: "beam saw", bay: "Bay 1" }],
|
|
397
|
+
["S102", { family: "beam saw", bay: "Bay 1" }],
|
|
398
|
+
["S103", { family: "beam saw", bay: "Bay 1" }],
|
|
399
|
+
["E201", { family: "edge bander", bay: "Bay 2" }],
|
|
400
|
+
["E202", { family: "edge bander", bay: "Bay 2" }],
|
|
401
|
+
["R301", { family: "CNC router", bay: "Bay 3" }],
|
|
402
|
+
["R302", { family: "CNC router", bay: "Bay 3" }],
|
|
403
|
+
["R303", { family: "CNC router", bay: "Bay 3" }],
|
|
404
|
+
["F401", { family: "spray booth", bay: "Bay 4" }],
|
|
405
|
+
["F402", { family: "spray booth", bay: "Bay 4" }],
|
|
406
|
+
["A701", { family: "assembly bench", bay: "Bay 7" }],
|
|
407
|
+
["A702", { family: "assembly bench", bay: "Bay 7" }],
|
|
408
|
+
]),
|
|
409
|
+
});
|
|
389
410
|
/** The orders, keyed by order number: each a group, its operations its lines. */
|
|
390
|
-
export const sheetWorkshopOrders = e3.record("sheet_workshop_orders", DictType(StringType, WorkshopOrder),
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
]
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
411
|
+
export const sheetWorkshopOrders = e3.record("sheet_workshop_orders", DictType(StringType, WorkshopOrder), {
|
|
412
|
+
initial: new Map([
|
|
413
|
+
["WO-2201", { name: "WO-2201 · Kitchen, oak", customer: "Quillfeather Interiors", due: some(new Date("2026-10-23T00:00:00Z")), status: "RELEASED", ops: [
|
|
414
|
+
{ activity: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), end: some(new Date("2026-10-13T00:00:00Z")), qty: some(48.0),
|
|
415
|
+
machines: { from: [variant("identified", { key: "S101" })], to: [variant("identified", { key: "E201" })] }, notes: "Oak veneered board", created_by: "planner" },
|
|
416
|
+
{ activity: "Edge banding", start: some(new Date("2026-10-14T00:00:00Z")), end: some(new Date("2026-10-15T00:00:00Z")), qty: some(120.0),
|
|
417
|
+
machines: { from: [variant("identified", { key: "E201" })], to: [variant("identified", { key: "R301" })] }, notes: "", created_by: "planner" },
|
|
418
|
+
{ activity: "CNC routing", start: some(new Date("2026-10-15T00:00:00Z")), end: some(new Date("2026-10-17T00:00:00Z")), qty: some(48.0),
|
|
419
|
+
machines: { from: [variant("identified", { key: "R301" })], to: [variant("identified", { key: "A701" })] }, notes: "Hinge cups and handle slots", created_by: "planner" },
|
|
420
|
+
{ activity: "Assembly", start: none, end: none, qty: some(12.0),
|
|
421
|
+
machines: { from: [], to: [variant("identified", { key: "A701" })] }, notes: "Twelve carcasses", created_by: "planner" },
|
|
422
|
+
{ activity: "Spray finish", start: none, end: none, qty: some(24.0),
|
|
423
|
+
machines: { from: [], to: [variant("identified", { key: "F401" })] }, notes: "Matt lacquer", created_by: "planner" },
|
|
424
|
+
] }],
|
|
425
|
+
["WO-2202", { name: "WO-2202 · Wardrobes, ash", customer: "Marrowby Lettings", due: some(new Date("2026-10-30T00:00:00Z")), status: "PLANNED", ops: [
|
|
426
|
+
{ activity: "Panel cutting", start: some(new Date("2026-10-13T00:00:00Z")), end: some(new Date("2026-10-14T00:00:00Z")), qty: some(36.0),
|
|
427
|
+
machines: { from: [variant("identified", { key: "S102" })], to: [variant("identified", { key: "E202" })] }, notes: "", created_by: "planner" },
|
|
428
|
+
{ activity: "Edge banding", start: none, end: none, qty: some(90.0),
|
|
429
|
+
machines: { from: [variant("identified", { key: "E202" })], to: [] }, notes: "", created_by: "planner" },
|
|
430
|
+
{ activity: "Drilling", start: none, end: none, qty: some(36.0),
|
|
431
|
+
machines: { from: [], to: [variant("identified", { key: "R302" })] }, notes: "Hinge and shelf pins", created_by: "planner" },
|
|
432
|
+
{ activity: "Assembly", start: none, end: none, qty: some(6.0),
|
|
433
|
+
machines: { from: [], to: [variant("identified", { key: "A702" })] }, notes: "", created_by: "planner" },
|
|
434
|
+
] }],
|
|
435
|
+
["WO-2203", { name: "WO-2203 · Vanity unit, walnut", customer: "Tallowmere Homes", due: some(new Date("2026-11-02T00:00:00Z")), status: "PLANNED", ops: [
|
|
436
|
+
{ activity: "Panel cutting", start: none, end: none, qty: some(12.0),
|
|
437
|
+
machines: { from: [], to: [variant("identified", { key: "S101" })] }, notes: "", created_by: "planner" },
|
|
438
|
+
{ activity: "CNC routing", start: none, end: none, qty: some(12.0),
|
|
439
|
+
machines: { from: [], to: [variant("counted", { n: 1n, key: "CNC router" })] }, notes: "Basin cut-out", created_by: "planner" },
|
|
440
|
+
{ activity: "Spray finish", start: none, end: none, qty: some(4.0),
|
|
441
|
+
machines: { from: [], to: [variant("identified", { key: "F402" })] }, notes: "", created_by: "planner" },
|
|
442
|
+
{ activity: "Assembly", start: none, end: none, qty: some(2.0),
|
|
443
|
+
machines: { from: [], to: [] }, notes: "", created_by: "planner" },
|
|
444
|
+
] }],
|
|
445
|
+
["WO-2204", { name: "WO-2204 · Shelving, birch", customer: "Pebblecombe School", due: some(new Date("2026-10-20T00:00:00Z")), status: "ON HOLD", ops: [
|
|
446
|
+
{ activity: "Panel cutting", start: none, end: none, qty: some(60.0),
|
|
447
|
+
machines: { from: [], to: [variant("counted", { n: 2n, key: "beam saw" })] }, notes: "Awaiting board delivery", created_by: "planner" },
|
|
448
|
+
{ activity: "Edge banding", start: none, end: none, qty: some(150.0),
|
|
449
|
+
machines: { from: [], to: [] }, notes: "", created_by: "planner" },
|
|
450
|
+
{ activity: "Sanding", start: none, end: none, qty: some(60.0),
|
|
451
|
+
machines: { from: [], to: [] }, notes: "", created_by: "planner" },
|
|
452
|
+
] }],
|
|
453
|
+
["WO-2205", { name: "WO-2205 · Office fit-out, maple", customer: "", due: none, status: "PLANNED", ops: [
|
|
454
|
+
{ activity: "Panel cutting", start: none, end: none, qty: some(80.0),
|
|
455
|
+
machines: { from: [], to: [] }, notes: "", created_by: "planner" },
|
|
456
|
+
{ activity: "CNC routing", start: none, end: none, qty: some(40.0),
|
|
457
|
+
machines: { from: [], to: [] }, notes: "Cable ports", created_by: "planner" },
|
|
458
|
+
{ activity: "Assembly", start: none, end: none, qty: some(10.0),
|
|
459
|
+
machines: { from: [], to: [] }, notes: "", created_by: "planner" },
|
|
460
|
+
{ activity: "Wrapping", start: none, end: none, qty: some(10.0),
|
|
461
|
+
machines: { from: [], to: [] }, notes: "", created_by: "planner" },
|
|
462
|
+
{ activity: "Delivery", start: none, end: none, qty: some(2.0),
|
|
463
|
+
machines: { from: [], to: [] }, notes: "", created_by: "planner" },
|
|
464
|
+
] }],
|
|
465
|
+
["WO-2206", { name: "WO-2206 · Kitchen, painted", customer: "Orrisdale Cottages", due: some(new Date("2026-11-06T00:00:00Z")), status: "PLANNED", ops: [
|
|
466
|
+
{ activity: "Panel cutting", start: none, end: none, qty: some(30.0),
|
|
467
|
+
machines: { from: [], to: [variant("identified", { key: "S103" })] }, notes: "", created_by: "planner" },
|
|
468
|
+
{ activity: "Edge banding", start: none, end: none, qty: some(70.0),
|
|
469
|
+
machines: { from: [], to: [variant("counted", { n: 1n, key: "edge bander" })] }, notes: "", created_by: "planner" },
|
|
470
|
+
{ activity: "Spray finish", start: none, end: none, qty: some(18.0),
|
|
471
|
+
machines: { from: [], to: [variant("identified", { key: "F401" })] }, notes: "Primer, then two coats", created_by: "planner" },
|
|
472
|
+
{ activity: "Assembly", start: none, end: none, qty: some(8.0),
|
|
473
|
+
machines: { from: [], to: [] }, notes: "", created_by: "planner" },
|
|
474
|
+
{ activity: "Wrapping", start: none, end: none, qty: some(8.0),
|
|
475
|
+
machines: { from: [], to: [] }, notes: "", created_by: "planner" },
|
|
476
|
+
{ activity: "Delivery", start: none, end: none, qty: some(1.0),
|
|
477
|
+
machines: { from: [], to: [] }, notes: "", created_by: "planner" },
|
|
478
|
+
] }],
|
|
479
|
+
]),
|
|
480
|
+
indexes: (index) => ({
|
|
481
|
+
// The orders by status and by customer: what the rail narrows them by, each choice one index's runs.
|
|
482
|
+
sheet_workshop_orders_by_status: index.on(["status"]),
|
|
483
|
+
sheet_workshop_orders_by_customer: index.on(["customer"]),
|
|
484
|
+
}),
|
|
485
|
+
mutations: (mutation) => ({
|
|
486
|
+
// The orders' patch door — every Save commits through it.
|
|
487
|
+
patch: mutation.patch(),
|
|
488
|
+
}),
|
|
489
|
+
});
|
|
463
490
|
/** An operation template — the Rows tab's card, the group it sits under, and the activity and work centres it drops. */
|
|
464
491
|
export const WorkshopOperationTemplate = StructType({ name: StringType, group: StringType, activity: StringType, machines: Sheet.Types.Link });
|
|
465
492
|
/** The operation templates, keyed by their key: a record of their own, the rail's `rowTemplates` source (#1345). */
|
|
466
|
-
export const sheetWorkshopOperationTemplates = e3.record("sheet_workshop_operation_templates", DictType(StringType, WorkshopOperationTemplate),
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
]
|
|
476
|
-
|
|
477
|
-
|
|
493
|
+
export const sheetWorkshopOperationTemplates = e3.record("sheet_workshop_operation_templates", DictType(StringType, WorkshopOperationTemplate), {
|
|
494
|
+
initial: new Map([
|
|
495
|
+
["assemble", { name: "Assembly", group: "Operations", activity: "Assembly", machines: { from: [], to: [] } }],
|
|
496
|
+
["cut", { name: "Panel cutting", group: "Operations", activity: "Panel cutting", machines: { from: [], to: [variant("counted", { n: 1n, key: "beam saw" })] } }],
|
|
497
|
+
["deliver", { name: "Delivery", group: "Dispatch", activity: "Delivery", machines: { from: [], to: [] } }],
|
|
498
|
+
["edge", { name: "Edge banding", group: "Operations", activity: "Edge banding", machines: { from: [], to: [variant("counted", { n: 1n, key: "edge bander" })] } }],
|
|
499
|
+
["route", { name: "CNC routing", group: "Operations", activity: "CNC routing", machines: { from: [], to: [variant("counted", { n: 1n, key: "CNC router" })] } }],
|
|
500
|
+
["sand", { name: "Sanding", group: "Operations", activity: "Sanding", machines: { from: [], to: [] } }],
|
|
501
|
+
["spray", { name: "Spray finish", group: "Operations", activity: "Spray finish", machines: { from: [], to: [variant("counted", { n: 1n, key: "spray booth" })] } }],
|
|
502
|
+
["wrap", { name: "Wrapping", group: "Dispatch", activity: "Wrapping", machines: { from: [], to: [] } }],
|
|
503
|
+
]),
|
|
504
|
+
indexes: (index) => ({
|
|
505
|
+
// The operation templates by their group: what the rail narrows them by.
|
|
506
|
+
sheet_workshop_operation_templates_by_group: index.on(["group"]),
|
|
507
|
+
}),
|
|
508
|
+
});
|
|
478
509
|
/** An order template — the Rows tab's card, the group it sits under, and the operations each kind of order starts with. */
|
|
479
510
|
export const WorkshopOrderTemplate = StructType({ name: StringType, group: StringType, ops: ArrayType(WorkshopOperation) });
|
|
480
511
|
/** The order templates, keyed by their key: a record of their own, the rail's `groupTemplates` source (#1345). */
|
|
481
|
-
export const sheetWorkshopOrderTemplates = e3.record("sheet_workshop_order_templates", DictType(StringType, WorkshopOrderTemplate),
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
]
|
|
501
|
-
|
|
502
|
-
|
|
512
|
+
export const sheetWorkshopOrderTemplates = e3.record("sheet_workshop_order_templates", DictType(StringType, WorkshopOrderTemplate), {
|
|
513
|
+
initial: new Map([
|
|
514
|
+
["kitchen", { name: "Kitchen order", group: "Orders", ops: [
|
|
515
|
+
{ activity: "Panel cutting", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
516
|
+
{ activity: "Edge banding", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
517
|
+
{ activity: "Assembly", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
518
|
+
{ activity: "Spray finish", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
519
|
+
] }],
|
|
520
|
+
["vanity", { name: "Vanity unit", group: "Orders", ops: [
|
|
521
|
+
{ activity: "Panel cutting", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
522
|
+
{ activity: "CNC routing", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
523
|
+
{ activity: "Spray finish", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
524
|
+
{ activity: "Assembly", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
525
|
+
] }],
|
|
526
|
+
["wardrobe", { name: "Wardrobe order", group: "Orders", ops: [
|
|
527
|
+
{ activity: "Panel cutting", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
528
|
+
{ activity: "Edge banding", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
529
|
+
{ activity: "Drilling", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
530
|
+
{ activity: "Assembly", start: none, end: none, qty: none, machines: { from: [], to: [] }, notes: "", created_by: "" },
|
|
531
|
+
] }],
|
|
532
|
+
]),
|
|
533
|
+
indexes: (index) => ({
|
|
534
|
+
// The order templates by their group: what the rail narrows them by.
|
|
535
|
+
sheet_workshop_order_templates_by_group: index.on(["group"]),
|
|
536
|
+
}),
|
|
537
|
+
});
|
|
503
538
|
/** The model behind the workshop's async proposer — an e3 function, a service, a notebook; the sheet needs only its types. */
|
|
504
539
|
const workshopRecommend = East.asyncPlatform("sheet_workshop_recommend", [Sheet.Types.DraftContext(WorkshopOrder, "ops", WorkshopActivity)], ArrayType(Sheet.Types.Proposal(WorkshopOperation)), { optional: true });
|
|
505
540
|
/**
|
|
@@ -517,7 +552,8 @@ const workshopRecommend = East.asyncPlatform("sheet_workshop_recommend", [Sheet.
|
|
|
517
552
|
* learned from the order, and an async model. A check on each order, and a
|
|
518
553
|
* footer counting every operation. One rail, its `Slice.bindRecords` over
|
|
519
554
|
* three records (#1345): the orders, by status and customer — the sheet's
|
|
520
|
-
* rows,
|
|
555
|
+
* rows, the record's own, its narrowing drawn over them as the lens (#1349),
|
|
556
|
+
* Save committing through the record's patch door — and
|
|
521
557
|
* the operation and order templates, each a record of its own, by their
|
|
522
558
|
* group; views kept per viewer hold every source's narrowing. Both panes: the
|
|
523
559
|
* library lists the templates the rail shows, the statuses — a card dropped
|
|
@@ -526,15 +562,15 @@ const workshopRecommend = East.asyncPlatform("sheet_workshop_recommend", [Sheet.
|
|
|
526
562
|
* and the order with no customer is the batch's issue.
|
|
527
563
|
*/
|
|
528
564
|
export const sheetWorkshop = example({
|
|
529
|
-
keywords: ["Sheet", "BuilderFrame", "record", "Record", "Record.onApply", "group", "driver", "register", "members", "concat", "aliases", "meta", "parent", "Dict", "fold", "duplicate", "link", "multiple", "sides", "locks", "arity", "check", "exists", "uom", "Format", "templates", "Sheet.templates", "library", "Sheet.library", "Sheet.library.tab", "drop", "inspector", "fields", "Sheet.field", "readonly", "views", "RecordView", "slice", "Slice.bindRecords", "Data.bindPaged", "
|
|
565
|
+
keywords: ["Sheet", "BuilderFrame", "record", "Record", "Record.onApply", "group", "driver", "register", "members", "concat", "aliases", "meta", "parent", "Dict", "fold", "duplicate", "link", "multiple", "sides", "locks", "arity", "check", "exists", "uom", "Format", "templates", "Sheet.templates", "library", "Sheet.library", "Sheet.library.tab", "drop", "inspector", "fields", "Sheet.field", "readonly", "views", "RecordView", "slice", "Slice.bindRecords", "Data.bindPaged", "indexes", "search", "filter", "copilot", "fill", "provider", "derive", "history", "sequence", "default", "phrase", "capacity", "propose", "proposer", "suggest", "learned", "follower", "asyncFunction", "asyncPlatform", "ready", "newGroup", "newRow", "footer", "joinery"],
|
|
530
566
|
description: "The flagship sheet — the workshop's orders as groups and their operations as lines; an activity driver giving units, durations and live halves; one work-centre register joined from a machines record (Dict), the bays (aliases) and the families (folded), its link grammar counting, locking, implying and checking machines; the copilot's fills (derive, history, sequence, default, phrase, capacity) and proposers (a pattern, a learned follower, an async model); an order check; one rail over the orders and the operation and order templates records, each its own source; a library of the templates, the statuses (dropped on an order to set its status) and the columns; an inspector pane showing every field; views kept per viewer; and a footer",
|
|
531
567
|
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
532
|
-
const orders = $.let(Record.bind(sheetWorkshopOrders
|
|
568
|
+
const orders = $.let(Record.bind(sheetWorkshopOrders));
|
|
533
569
|
const machines = $.let(Record.bind(sheetWorkshopMachines, []));
|
|
534
570
|
const activities = $.let(Data.bind(sheetWorkshopActivities));
|
|
535
571
|
const operationTemplates = $.let(Data.bind(sheetWorkshopOperationTemplates));
|
|
536
572
|
const orderTemplates = $.let(Data.bind(sheetWorkshopOrderTemplates));
|
|
537
|
-
// The orders read whole, for the footer's count: the sheet
|
|
573
|
+
// The orders read whole, for the footer's count: the sheet reads its rows through the rail's `rows` source,
|
|
538
574
|
// so `orders` is the patch door its Save commits through, never read whole.
|
|
539
575
|
const allOrders = $.let(Data.bind(sheetWorkshopOrders));
|
|
540
576
|
const views = $.let(State.bind([ArrayType(Sheet.Types.RecordView)], "sheet.workshop.views", []));
|
|
@@ -556,18 +592,18 @@ export const sheetWorkshop = example({
|
|
|
556
592
|
// One rail over three records: the orders — the sheet's rows — and each templates record, its own source.
|
|
557
593
|
const slice = $.let(Slice.bindRecords("sheet.workshop", {
|
|
558
594
|
rows: {
|
|
559
|
-
source: Data.bindPaged(sheetWorkshopOrders, { indexes: [
|
|
595
|
+
source: Data.bindPaged(sheetWorkshopOrders, { indexes: ["sheet_workshop_orders_by_status", "sheet_workshop_orders_by_customer"] }),
|
|
560
596
|
label: "Orders",
|
|
561
597
|
fields: { status: { label: "Status", hints: ["PLANNED", "RELEASED", "ON HOLD"] }, customer: { label: "Customer" } },
|
|
562
598
|
search: ["customer"],
|
|
563
599
|
},
|
|
564
600
|
rowTemplates: {
|
|
565
|
-
source: Data.bindPaged(sheetWorkshopOperationTemplates, { indexes: [
|
|
601
|
+
source: Data.bindPaged(sheetWorkshopOperationTemplates, { indexes: ["sheet_workshop_operation_templates_by_group"] }),
|
|
566
602
|
label: "Operation templates",
|
|
567
603
|
fields: { group: { label: "Group", hints: ["Operations", "Dispatch"] } },
|
|
568
604
|
},
|
|
569
605
|
groupTemplates: {
|
|
570
|
-
source: Data.bindPaged(sheetWorkshopOrderTemplates, { indexes: [
|
|
606
|
+
source: Data.bindPaged(sheetWorkshopOrderTemplates, { indexes: ["sheet_workshop_order_templates_by_group"] }),
|
|
571
607
|
label: "Order templates",
|
|
572
608
|
fields: { group: { label: "Group", hints: ["Orders"] } },
|
|
573
609
|
},
|
|
@@ -821,29 +857,33 @@ export const WeekRow = StructType({
|
|
|
821
857
|
/** One week's plan — when it starts, and its rows in the planner's order. */
|
|
822
858
|
export const WeekPlan = StructType({ starts: DateTimeType, rows: ArrayType(WeekRow) });
|
|
823
859
|
/** The plans, one per week, keyed 2026-W42, 2026-W43, … */
|
|
824
|
-
export const sheetWeekPlans = e3.record("sheet_week_plans", DictType(StringType, WeekPlan),
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
]
|
|
845
|
-
|
|
846
|
-
|
|
860
|
+
export const sheetWeekPlans = e3.record("sheet_week_plans", DictType(StringType, WeekPlan), {
|
|
861
|
+
initial: new Map([
|
|
862
|
+
["2026-W42", { starts: new Date("2026-10-12T00:00:00Z"), rows: [
|
|
863
|
+
{ id: "w42-1", task: "Cut the kitchen carcasses", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0), setups: some(2n), site: "Machine shop",
|
|
864
|
+
status: "PLANNED", code: "", level: variant("day", null), started: none,
|
|
865
|
+
machines: { from: [], to: [variant("range", { from: "S101", to: "S103" })] } },
|
|
866
|
+
{ id: "w42-2", task: "Band the carcass edges", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0), setups: some(1n), site: "Machine shop",
|
|
867
|
+
status: "RELEASED", code: "WO-2201", level: variant("day", null), started: some(new Date("2026-10-13T07:30:00Z")),
|
|
868
|
+
machines: { from: [], to: [variant("identified", { key: "E201" })] } },
|
|
869
|
+
{ id: "w42-3", task: "Route the door panels", start: none, qty: some(24.0), setups: none, site: "Bench room",
|
|
870
|
+
status: "PLANNED", code: "", level: variant("week", null), started: none,
|
|
871
|
+
machines: { from: [], to: [] } },
|
|
872
|
+
] }],
|
|
873
|
+
["2026-W43", { starts: new Date("2026-10-19T00:00:00Z"), rows: [
|
|
874
|
+
{ id: "w43-1", task: "Assemble the wardrobes", start: some(new Date("2026-10-19T00:00:00Z")), qty: some(6.0), setups: none, site: "Fitting shop",
|
|
875
|
+
status: "PLANNED", code: "", level: variant("day", null), started: none,
|
|
876
|
+
machines: { from: [], to: [variant("identified", { key: "A701" })] } },
|
|
877
|
+
{ id: "w43-2", task: "Spray the vanity doors", start: none, qty: some(4.0), setups: none, site: "Spray shop",
|
|
878
|
+
status: "PLANNED", code: "", level: variant("time", null), started: none,
|
|
879
|
+
machines: { from: [], to: [] } },
|
|
880
|
+
] }],
|
|
881
|
+
]),
|
|
882
|
+
mutations: (mutation) => ({
|
|
883
|
+
// The plans' patch door — every Save commits through it.
|
|
884
|
+
patch: mutation.patch(),
|
|
885
|
+
}),
|
|
886
|
+
});
|
|
847
887
|
/**
|
|
848
888
|
* One entry's rows (§3.4) — the week the viewer picks, its rows in the
|
|
849
889
|
* planner's order; each week keeps its own drafts until Save or Discard, and
|
|
@@ -864,7 +904,7 @@ export const sheetWeeks = example({
|
|
|
864
904
|
keywords: ["Sheet", "BuilderFrame", "record", "entry", "one entry", "rows", "id", "week", "State", "SegmentGroup", "drafts per entry", "inspector", "update", "Field.Slider", "column", "date", "text", "quantity", "integer", "reference", "enum", "set", "stamped", "owned", "register", "options", "level", "actual", "detail", "ranged", "DateLevel", "week", "day", "range", "time", "rule", "ready", "row", "Readiness", "completeness", "validation", "onPatch", "PatchEvent", "provenance", "source", "newRowId", "newRow", "write-back"],
|
|
865
905
|
description: "A sheet over one entry's rows — the week the viewer picks, its rows in the planner's order, each week its own drafts until Save or Discard — with every column kind and its rules (a date at each row's level with its actual, an integer, a reference, an enum narrowed by an options rule with a detail, a stamped code owning its row, a set of machines in ranges), a row rule, a journal of every gesture, ids minted by a counter, and its own Details in the inspector pane, a row's quantity on a slider written back as one transaction",
|
|
866
906
|
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
867
|
-
const plans = $.let(Record.bind(sheetWeekPlans
|
|
907
|
+
const plans = $.let(Record.bind(sheetWeekPlans));
|
|
868
908
|
// The week the viewer picked, the journal and the id counter: a viewer's own state.
|
|
869
909
|
const week = $.let(State.bind([StringType], "sheet.weeks.week", "2026-W42"));
|
|
870
910
|
const log = $.let(State.bind([ArrayType(StringType)], "sheet.weeks.journal", []));
|
|
@@ -954,50 +994,62 @@ export const Batch = StructType({ id: StringType, name: StringType, steps: Array
|
|
|
954
994
|
/** One day's batches, in the planner's order. */
|
|
955
995
|
export const BatchDay = StructType({ batches: ArrayType(Batch) });
|
|
956
996
|
/** The days, keyed by date. */
|
|
957
|
-
export const sheetBatchDays = e3.record("sheet_batch_days", DictType(StringType, BatchDay),
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
]
|
|
978
|
-
|
|
979
|
-
|
|
997
|
+
export const sheetBatchDays = e3.record("sheet_batch_days", DictType(StringType, BatchDay), {
|
|
998
|
+
initial: new Map([
|
|
999
|
+
["2026-10-12", { batches: [
|
|
1000
|
+
{ id: "B-101", name: "Doors, oak", steps: [
|
|
1001
|
+
{ task: "Cut doors", qty: some(12.0), parts: [
|
|
1002
|
+
{ id: "B-101-1", code: "CUT", name: "Cut the door blanks", materials: ["Oak veneered board × 6"], station: some("S101") },
|
|
1003
|
+
], bookings: [variant("labour", { team: "Cutting", people: 1n, hours: 3.0 })] },
|
|
1004
|
+
{ task: "Band doors", qty: some(48.0), parts: [], bookings: [variant("equipment", { resource: "Edge bander E201" })] },
|
|
1005
|
+
{ task: "Spray doors", qty: some(12.0), parts: [
|
|
1006
|
+
{ id: "B-101-3", code: "SPR", name: "Seal and lacquer", materials: ["Sealer", "Matt lacquer"], station: none },
|
|
1007
|
+
], bookings: [] },
|
|
1008
|
+
] },
|
|
1009
|
+
{ id: "B-102", name: "Carcasses, birch", steps: [
|
|
1010
|
+
{ task: "Cut carcasses", qty: some(8.0), parts: [], bookings: [] },
|
|
1011
|
+
{ task: "Drill carcasses", qty: some(8.0), parts: [], bookings: [variant("labour", { team: "Machining", people: 2n, hours: 2.5 })] },
|
|
1012
|
+
] },
|
|
1013
|
+
{ id: "B-103", name: "Shelves, ash", steps: [
|
|
1014
|
+
{ task: "Cut shelves", qty: some(20.0), parts: [], bookings: [] },
|
|
1015
|
+
{ task: "Sand shelves", qty: some(20.0), parts: [], bookings: [] },
|
|
1016
|
+
] },
|
|
1017
|
+
] }],
|
|
1018
|
+
]),
|
|
1019
|
+
mutations: (mutation) => ({
|
|
1020
|
+
// The days' patch door — every Save commits through it.
|
|
1021
|
+
patch: mutation.patch(),
|
|
1022
|
+
}),
|
|
1023
|
+
});
|
|
980
1024
|
/** A step template — the Rows tab's card, the group it sits under, and the task of the step it drops. */
|
|
981
1025
|
export const BatchStepTemplate = StructType({ name: StringType, group: StringType, task: StringType });
|
|
982
1026
|
/** The step templates, keyed by their key: a record of their own, the rail's `rowTemplates` source (#1345). */
|
|
983
|
-
export const sheetBatchStepTemplates = e3.record("sheet_batch_step_templates", DictType(StringType, BatchStepTemplate),
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
]
|
|
987
|
-
|
|
988
|
-
|
|
1027
|
+
export const sheetBatchStepTemplates = e3.record("sheet_batch_step_templates", DictType(StringType, BatchStepTemplate), {
|
|
1028
|
+
initial: new Map([
|
|
1029
|
+
["sand", { name: "Sand", group: "Steps", task: "Sand" }],
|
|
1030
|
+
["seal", { name: "Seal", group: "Steps", task: "Seal" }],
|
|
1031
|
+
]),
|
|
1032
|
+
indexes: (index) => ({
|
|
1033
|
+
// The step templates by their group: what the rail narrows them by.
|
|
1034
|
+
sheet_batch_step_templates_by_group: index.on(["group"]),
|
|
1035
|
+
}),
|
|
1036
|
+
});
|
|
989
1037
|
/** A batch template — the Rows tab's card, the group it sits under, the batch's name and the steps it starts with. */
|
|
990
1038
|
export const BatchTemplate = StructType({ name: StringType, group: StringType, batch: StringType, steps: ArrayType(BatchStep) });
|
|
991
1039
|
/** The batch templates, keyed by their key: a record of their own, the rail's `groupTemplates` source (#1345). */
|
|
992
|
-
export const sheetBatchTemplates = e3.record("sheet_batch_templates", DictType(StringType, BatchTemplate),
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
]
|
|
999
|
-
|
|
1000
|
-
|
|
1040
|
+
export const sheetBatchTemplates = e3.record("sheet_batch_templates", DictType(StringType, BatchTemplate), {
|
|
1041
|
+
initial: new Map([
|
|
1042
|
+
["finishing", { name: "Finishing batch", group: "Batches", batch: "Finishing", steps: [
|
|
1043
|
+
{ task: "Sand", qty: none, parts: [], bookings: [] },
|
|
1044
|
+
{ task: "Seal", qty: none, parts: [], bookings: [] },
|
|
1045
|
+
{ task: "Spray", qty: none, parts: [], bookings: [] },
|
|
1046
|
+
] }],
|
|
1047
|
+
]),
|
|
1048
|
+
indexes: (index) => ({
|
|
1049
|
+
// The batch templates by their group: what the rail narrows them by.
|
|
1050
|
+
sheet_batch_templates_by_group: index.on(["group"]),
|
|
1051
|
+
}),
|
|
1052
|
+
});
|
|
1001
1053
|
/**
|
|
1002
1054
|
* One day's batches, in the planner's order (#1187, SB39, SB40, SB44) — a
|
|
1003
1055
|
* grouped sheet over one entry's groups, each batch a group of its steps. A
|
|
@@ -1016,20 +1068,20 @@ export const sheetBatchTemplatesByGroup = e3.recordIndex("sheet_batch_templates_
|
|
|
1016
1068
|
* their group.
|
|
1017
1069
|
*/
|
|
1018
1070
|
export const sheetBatches = example({
|
|
1019
|
-
keywords: ["Sheet", "BuilderFrame", "drag", "drop", "move", "grip", "seam", "templates", "Sheet.templates", "slice", "Slice.bindRecords", "Data.bindPaged", "
|
|
1071
|
+
keywords: ["Sheet", "BuilderFrame", "drag", "drop", "move", "grip", "seam", "templates", "Sheet.templates", "slice", "Slice.bindRecords", "Data.bindPaged", "indexes", "group", "grouped", "entry", "order", "Sheet.library.rows", "children", "newGroup", "newRow", "Patch", "defaults", "completeness", "fold", "undo", "redo", "ready", "subRows", "subRow", "sub rows", "SubRow", "Facet", "chips", "facets", "lead", "detail", "noun", "variant", "match", "read-only", "inspector", "Sheet.field", "hidden"],
|
|
1020
1072
|
description: "A sheet over one day's batches in the planner's order — templates dragged from the library onto a seam, steps and whole batches moved to another seam by their grips, a batch named before Save, new steps and batches from their defaults, and each step's parts and bookings as read-only sub rows under it, declared per array field like columns, beside a library and an inspector pane; its step and batch templates two records, each a source of one rail",
|
|
1021
1073
|
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
1022
|
-
const days = $.let(Record.bind(sheetBatchDays
|
|
1074
|
+
const days = $.let(Record.bind(sheetBatchDays));
|
|
1023
1075
|
const stepTemplates = $.let(Data.bind(sheetBatchStepTemplates));
|
|
1024
1076
|
const batchTemplates = $.let(Data.bind(sheetBatchTemplates));
|
|
1025
1077
|
// One rail over the templates records, each its own source: they narrow the Rows tab's cards.
|
|
1026
1078
|
const slice = $.let(Slice.bindRecords("sheet.batches", {
|
|
1027
1079
|
rowTemplates: {
|
|
1028
|
-
source: Data.bindPaged(sheetBatchStepTemplates, { indexes: [
|
|
1080
|
+
source: Data.bindPaged(sheetBatchStepTemplates, { indexes: ["sheet_batch_step_templates_by_group"] }),
|
|
1029
1081
|
label: "Step templates", fields: { group: { label: "Group", hints: ["Steps"] } },
|
|
1030
1082
|
},
|
|
1031
1083
|
groupTemplates: {
|
|
1032
|
-
source: Data.bindPaged(sheetBatchTemplates, { indexes: [
|
|
1084
|
+
source: Data.bindPaged(sheetBatchTemplates, { indexes: ["sheet_batch_templates_by_group"] }),
|
|
1033
1085
|
label: "Batch templates", fields: { group: { label: "Group", hints: ["Batches"] } },
|
|
1034
1086
|
},
|
|
1035
1087
|
}));
|
|
@@ -1080,21 +1132,25 @@ export const LooseEntry = Sheet.Types.Entry(LoosePackage, "tasks");
|
|
|
1080
1132
|
/** A week's work — its entries, in the planner's order. */
|
|
1081
1133
|
export const LooseWork = StructType({ entries: ArrayType(LooseEntry) });
|
|
1082
1134
|
/** The work, one entry per week. */
|
|
1083
|
-
export const sheetLooseWork = e3.record("sheet_loose_work", DictType(StringType, LooseWork),
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
]
|
|
1096
|
-
|
|
1097
|
-
|
|
1135
|
+
export const sheetLooseWork = e3.record("sheet_loose_work", DictType(StringType, LooseWork), {
|
|
1136
|
+
initial: new Map([
|
|
1137
|
+
["2026-W42", { entries: [
|
|
1138
|
+
variant("row", { id: "brief", task: "Check the drawings", qty: none, notes: "Before any cutting" }),
|
|
1139
|
+
variant("group", { id: "doors", name: "Kitchen doors", tasks: [
|
|
1140
|
+
{ id: "doors-1", task: "Cut door blanks", qty: some(24.0), notes: "Oak veneered board" },
|
|
1141
|
+
{ id: "doors-2", task: "Inspect the blanks", qty: some(4.0), notes: "Before finishing" },
|
|
1142
|
+
] }),
|
|
1143
|
+
variant("row", { id: "handover", task: "Hand over to finishing", qty: none, notes: "" }),
|
|
1144
|
+
variant("group", { id: "finish", name: "Door finishing", tasks: [
|
|
1145
|
+
{ id: "finish-1", task: "Spray the doors", qty: some(24.0), notes: "Matt lacquer" },
|
|
1146
|
+
] }),
|
|
1147
|
+
] }],
|
|
1148
|
+
]),
|
|
1149
|
+
mutations: (mutation) => ({
|
|
1150
|
+
// The work's patch door — every Save commits through it.
|
|
1151
|
+
patch: mutation.patch(),
|
|
1152
|
+
}),
|
|
1153
|
+
});
|
|
1098
1154
|
/**
|
|
1099
1155
|
* Loose rows between the groups (#846) — the week's entries are
|
|
1100
1156
|
* `Sheet.Types.Entry(LoosePackage, "tasks")`: a work package with its
|
|
@@ -1110,7 +1166,7 @@ export const sheetLoose = example({
|
|
|
1110
1166
|
keywords: ["Sheet", "BuilderFrame", "group", "grouped", "loose", "ungrouped", "Entry", "Types.Entry", "variant", "entries", "insert", "move", "newRow", "newGroup", "noun", "entry", "record"],
|
|
1111
1167
|
description: "A sheet over one week's entries — work packages and loose tasks: a loose task is a plain row numbered in the packages' sequence, inserted at the seam above a package or beside another loose task, and moved between the entries by its grip",
|
|
1112
1168
|
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
1113
|
-
const work = $.let(Record.bind(sheetLooseWork
|
|
1169
|
+
const work = $.let(Record.bind(sheetLooseWork));
|
|
1114
1170
|
const newTask = $.const(East.function([Sheet.Types.NewRow], Sheet.Types.Patch(LooseTask), () => Sheet.patch(LooseTask, { qty: none, notes: "" })));
|
|
1115
1171
|
const newPackage = $.const(East.function([Sheet.Types.NewGroup], Sheet.Types.Patch(LoosePackage), () => Sheet.patch(LoosePackage, { tasks: [] })));
|
|
1116
1172
|
return (_jsx(Box, { height: "480px", children: _jsx(Sheet, { record: work, entry: { key: "2026-W42", rows: "entries", id: "id" }, group: Sheet.group(LoosePackage, "tasks", { title: "name", noun: { singular: "package", plural: "packages" } }), name: "loose", columns: {
|
|
@@ -1135,7 +1191,7 @@ export const sheetPaged = example({
|
|
|
1135
1191
|
keywords: ["Sheet", "BuilderFrame", "record", "window", "Data.bindPaged", "paged", "key order", "key search", "edits", "insertRows", "removeRows", "insert", "before", "after", "Undo"],
|
|
1136
1192
|
description: "A sheet over a large record, read a window at a time in key order — Data.bindPaged over the same record its Save commits to — whose edits add rows (gutter seams, the selection strip, Alt+Insert) and never remove one",
|
|
1137
1193
|
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
1138
|
-
const jobs = $.let(Record.bind(sheetJobs
|
|
1194
|
+
const jobs = $.let(Record.bind(sheetJobs));
|
|
1139
1195
|
const page = $.let(Data.bindPaged(sheetJobs));
|
|
1140
1196
|
return (_jsx(Box, { height: "560px", children: _jsx(Sheet, { record: jobs, window: page, name: "paged", edits: { insertRows: true, removeRows: false }, columns: {
|
|
1141
1197
|
task: Sheet.column.text(SheetJob, { header: "Task", width: "240px" }),
|
|
@@ -1172,32 +1228,36 @@ export const MachineUpkeep = StructType({
|
|
|
1172
1228
|
serial: StringType, // a stamped column: read only
|
|
1173
1229
|
});
|
|
1174
1230
|
/** The machines' upkeep, keyed by machine code. */
|
|
1175
|
-
export const sheetMachineUpkeep = e3.record("sheet_machine_upkeep", DictType(StringType, MachineUpkeep),
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1231
|
+
export const sheetMachineUpkeep = e3.record("sheet_machine_upkeep", DictType(StringType, MachineUpkeep), {
|
|
1232
|
+
initial: new Map([
|
|
1233
|
+
["S101", { name: "Beam saw", bay: "Bay 1", hours: 1240n, family: variant("beam_saw", null), wear: some(35.5), crew: some("Cutting crew"),
|
|
1234
|
+
tickets: new Set(["Panel saw ticket", "Dust extraction"]),
|
|
1235
|
+
checks: [{ text: "Blade sharpened", done: true }, { text: "Fence squared", done: true }, { text: "Extraction cleaned", done: false }],
|
|
1236
|
+
supplier: { name: "Kestrelmoor Saw Works", phone: "01632 960 118" },
|
|
1237
|
+
in_service: true, guard_checked: some(true),
|
|
1238
|
+
serviced: new Date("2026-09-28T07:30:00Z"), next_service: some(new Date("2026-11-09T07:30:00Z")), serial: "BS-4410-0193" }],
|
|
1239
|
+
["E201", { name: "Edge bander", bay: "Bay 2", hours: 860n, family: variant("edge_bander", null), wear: none, crew: none,
|
|
1240
|
+
tickets: new Set(), checks: [], supplier: { name: "", phone: "" },
|
|
1241
|
+
in_service: true, guard_checked: none,
|
|
1242
|
+
serviced: new Date("2026-08-17T06:00:00Z"), next_service: none, serial: "EB-2207-0457" }],
|
|
1243
|
+
["R301", { name: "CNC router", bay: "Bay 3", hours: 2210n, family: variant("cnc_router", null), wear: some(62.0), crew: some("Machining crew"),
|
|
1244
|
+
tickets: new Set(["Router ticket"]),
|
|
1245
|
+
checks: [{ text: "Spindle greased", done: true }, { text: "Bed vacuum tested", done: false }],
|
|
1246
|
+
supplier: { name: "Brindlecote Tooling", phone: "01632 960 342" },
|
|
1247
|
+
in_service: false, guard_checked: some(false),
|
|
1248
|
+
serviced: new Date("2026-07-06T13:15:00Z"), next_service: none, serial: "CR-5120-0088" }],
|
|
1249
|
+
["F401", { name: "Spray booth", bay: "Bay 4", hours: 540n, family: variant("spray_booth", null), wear: none, crew: some("Finishing crew"),
|
|
1250
|
+
tickets: new Set(["Spray ticket", "First aid"]),
|
|
1251
|
+
checks: [{ text: "Filters changed", done: true }],
|
|
1252
|
+
supplier: { name: "Fennimarsh Coatings", phone: "01632 960 775" },
|
|
1253
|
+
in_service: true, guard_checked: some(true),
|
|
1254
|
+
serviced: new Date("2026-10-01T08:00:00Z"), next_service: some(new Date("2026-12-01T08:00:00Z")), serial: "SB-0391-0017" }],
|
|
1255
|
+
]),
|
|
1256
|
+
mutations: (mutation) => ({
|
|
1257
|
+
// The upkeep's patch door — every Save commits through it.
|
|
1258
|
+
patch: mutation.patch(),
|
|
1259
|
+
}),
|
|
1260
|
+
});
|
|
1201
1261
|
/**
|
|
1202
1262
|
* The inspector's every field kind (#1220) — the workshop's machines' upkeep,
|
|
1203
1263
|
* a record keyed by machine code. The grid shows four columns: a machine's
|
|
@@ -1217,7 +1277,7 @@ export const sheetUpkeep = example({
|
|
|
1217
1277
|
keywords: ["Sheet", "BuilderFrame", "inspector", "fields", "Sheet.field", "Fields", "form", "text", "placeholder", "number", "unit", "min", "max", "step", "select", "labels", "reference", "register", "checkbox", "datetime", "Option", "Set", "Clear", "tags", "options", "checklist", "nested", "struct", "stamped", "readonly", "integer", "ready", "row", "Readiness", "record"],
|
|
1218
1278
|
description: "A sheet whose inspector pane edits one field of every kind over the workshop's machines' upkeep — a number with its unit and bounds, a select of a variant's cases, a reference, a text emptied to none, tags, a checklist, a nested struct's fields under its name, a checkbox, a date and a time, Options set and cleared, and a stamped code read only — the hinted fields leading, with a row rule's issue",
|
|
1219
1279
|
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
1220
|
-
const upkeep = $.let(Record.bind(sheetMachineUpkeep
|
|
1280
|
+
const upkeep = $.let(Record.bind(sheetMachineUpkeep));
|
|
1221
1281
|
const bays = $.let(["Bay 1", "Bay 2", "Bay 3", "Bay 4", "Bay 7"], ArrayType(StringType));
|
|
1222
1282
|
// A machine out of service needs its next service booked.
|
|
1223
1283
|
const readyMachine = $.const(East.function([Sheet.Types.Draft(MachineUpkeep), Sheet.Types.DraftContext(MachineUpkeep)], Sheet.Types.Readiness, ($, row) => {
|
|
@@ -1249,4 +1309,54 @@ export const sheetUpkeep = example({
|
|
|
1249
1309
|
} }))),
|
|
1250
1310
|
inputs: [],
|
|
1251
1311
|
});
|
|
1312
|
+
// ============================================================================
|
|
1313
|
+
// sheetConflicts — your edits meeting someone else's save
|
|
1314
|
+
// ============================================================================
|
|
1315
|
+
/** The jobs the conflicts example edits, in a record of their own, so no other example's edits meet them. */
|
|
1316
|
+
export const sheetConflictJobs = e3.record("sheet_conflict_jobs", DictType(StringType, SheetJob), {
|
|
1317
|
+
initial: new Map([
|
|
1318
|
+
["J-0001", { task: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0) }],
|
|
1319
|
+
["J-0002", { task: "Edge banding", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0) }],
|
|
1320
|
+
["J-0003", { task: "CNC routing", start: some(new Date("2026-10-14T00:00:00Z")), qty: some(48.0) }],
|
|
1321
|
+
["J-0004", { task: "Spray finish", start: some(new Date("2026-10-15T00:00:00Z")), qty: some(36.0) }],
|
|
1322
|
+
]),
|
|
1323
|
+
mutations: (mutation) => ({
|
|
1324
|
+
// The jobs' patch door — every Save commits through it.
|
|
1325
|
+
patch: mutation.patch(),
|
|
1326
|
+
// Someone else's save: every job's quantity 12 more and its start a day later, its task as it was.
|
|
1327
|
+
elsewhere: mutation.reduce(East.function([DictType(StringType, SheetJob)], DictType(StringType, SheetJob), (_$, jobs) => jobs.map((_$2, job) => ({
|
|
1328
|
+
task: job.task,
|
|
1329
|
+
start: job.start.match({
|
|
1330
|
+
some: (_$3, at) => East.value(some(at.addDays(1n)), OptionType(DateTimeType)),
|
|
1331
|
+
none: (_$3) => East.value(none, OptionType(DateTimeType)),
|
|
1332
|
+
}),
|
|
1333
|
+
qty: job.qty.match({
|
|
1334
|
+
some: (_$3, n) => East.value(some(n.add(12.0)), OptionType(FloatType)),
|
|
1335
|
+
none: (_$3) => East.value(none, OptionType(FloatType)),
|
|
1336
|
+
}),
|
|
1337
|
+
})))),
|
|
1338
|
+
}),
|
|
1339
|
+
});
|
|
1340
|
+
/**
|
|
1341
|
+
* Your edits meeting someone else's save, in one window: edit, then press
|
|
1342
|
+
* Someone else saves, which saves another person's change to the same jobs —
|
|
1343
|
+
* every Qty 12 more and every Start a day later. A Qty or a Start you changed
|
|
1344
|
+
* too is a conflict, waiting for you to choose; a Task you changed combines
|
|
1345
|
+
* with theirs. Each press saves their change again.
|
|
1346
|
+
*/
|
|
1347
|
+
export const sheetConflicts = example({
|
|
1348
|
+
keywords: ["Sheet", "conflict", "conflicts", "combine", "someone else", "carry over", "Choose", "record", "Record.bind", "mutate", "Button", "patch"],
|
|
1349
|
+
description: "Your edits meeting someone else's save, in one window — edit a Qty or a Start, then press Someone else saves, which saves another person's change to the same jobs (every Qty 12 more, every Start a day later), so yours conflict and wait to be chosen; a Task you change combines with theirs",
|
|
1350
|
+
fn: East.function([], UIComponentType, (_$) => (_jsx(Reactive, { children: $ => {
|
|
1351
|
+
const jobs = $.let(Record.bind(sheetConflictJobs, ["patch"]));
|
|
1352
|
+
const others = $.let(Record.bind(sheetConflictJobs, ["elsewhere"]));
|
|
1353
|
+
const theirs = $.const(East.function([], NullType, ($) => { $(others.mutate.elsewhere()); }));
|
|
1354
|
+
return (_jsxs(VStack, { gap: "3", align: "stretch", children: [_jsxs(HStack, { gap: "3", children: [_jsx(Button, { variant: "outline", onClick: theirs, loading: others.mutate.pending(), children: "Someone else saves" }), _jsx(Text, { color: "fg.muted", children: "Their change: every Qty 12 more, every Start a day later" })] }), _jsx(Box, { height: "560px", children: _jsx(Sheet, { name: "conflicts", record: jobs, columns: {
|
|
1355
|
+
task: Sheet.column.text(SheetJob, { header: "Task", width: "240px" }),
|
|
1356
|
+
start: Sheet.column.date(SheetJob, { header: "Start", width: "96px" }),
|
|
1357
|
+
qty: Sheet.column.quantity(SheetJob, { header: "Qty", width: "96px" }),
|
|
1358
|
+
} }) })] }));
|
|
1359
|
+
} }))),
|
|
1360
|
+
inputs: [],
|
|
1361
|
+
});
|
|
1252
1362
|
//# sourceMappingURL=sheet.examples.js.map
|