@elaraai/e3-ui 1.0.98 → 1.0.100
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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.examples.d.ts","sourceRoot":"","sources":["../../../test/calendar/calendar.examples.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,sCAAsC;AAEtC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAQ,SAAS,EAAgB,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAW,UAAU,EAAE,UAAU,EAAE,WAAW,EAAuB,OAAO,EAAE,MAAM,eAAe,CAAC;AAKrM,uDAAuD;AACvD,eAAO,MAAM,eAAe;;;EAAqD,CAAC;AAClF,oEAAoE;AACpE,eAAO,MAAM,cAAc;;;EAAqD,CAAC;AACjF,yBAAyB;AACzB,eAAO,MAAM,gBAAgB;;;;EAAuE,CAAC;AACrG,gFAAgF;AAChF,eAAO,MAAM,WAAW;;;;;;;;;;;;;EAC8E,CAAC;AACvG,yDAAyD;AACzD,eAAO,MAAM,iBAAiB;;;;;;;;;;EAAqI,CAAC;AACpK,iFAAiF;AACjF,eAAO,MAAM,eAAe;;;;;;;EAA4I,CAAC;AACzK,8CAA8C;AAC9C,eAAO,MAAM,aAAa;;;;;;EAAmH,CAAC;AAC9I,yIAAyI;AACzI,eAAO,MAAM,mBAAmB;;;;;;;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ui/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
4
4
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
5
5
|
*/
|
|
6
6
|
/** @jsxImportSource @elaraai/e3-ui */
|
|
7
7
|
import { DateTimeType, DictType, East, FloatType, FunctionType, IntegerType, NullType, OptionType, SetType, StringType, StructType, VariantType, example, none, some, variant } from "@elaraai/east";
|
|
8
|
-
import { Box, Input, Reactive, Slice, UIComponentType } from "@elaraai/east-ui";
|
|
8
|
+
import { Box, Button, HStack, Input, Reactive, Slice, Text, UIComponentType, VStack } from "@elaraai/east-ui";
|
|
9
9
|
import { Calendar, Data, Record } from "@elaraai/e3-ui";
|
|
10
10
|
import e3 from "@elaraai/e3";
|
|
11
11
|
/** The resources of a small metal fabrication shop. */
|
|
@@ -29,89 +29,144 @@ export const CalendarJobTemplate = StructType({ name: StringType, group: StringT
|
|
|
29
29
|
export const CalendarServiceTemplate = StructType({ name: StringType, group: StringType, hours: FloatType, values: StructType({ title: StringType, technician: StringType, notes: StringType }) });
|
|
30
30
|
/** Shift templates start at their hour when dropped on a day. */
|
|
31
31
|
export const CalendarShiftTemplate = StructType({ name: StringType, group: StringType, hour: IntegerType, values: StructType({ title: StringType, notes: StringType }) });
|
|
32
|
-
export const calendarMachines = e3.record("calendar_machines", DictType(StringType, CalendarMachine),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
]
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
])
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
])
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
])
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
]))
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
export const
|
|
32
|
+
export const calendarMachines = e3.record("calendar_machines", DictType(StringType, CalendarMachine), {
|
|
33
|
+
initial: new Map([
|
|
34
|
+
["press1", { name: "Press 1", area: "Press shop" }], ["press2", { name: "Press 2", area: "Press shop" }],
|
|
35
|
+
["lathe1", { name: "Lathe 1", area: "Machine shop" }], ["lathe2", { name: "Lathe 2", area: "Machine shop" }],
|
|
36
|
+
]),
|
|
37
|
+
indexes: (index) => ({
|
|
38
|
+
calendar_machines_by_area: index.on(["area"]),
|
|
39
|
+
}),
|
|
40
|
+
mutations: (mutation) => ({
|
|
41
|
+
// The shop edits its machines and job templates elsewhere, each through its patch door; the Calendar reads them live.
|
|
42
|
+
patch: mutation.patch(),
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
export const calendarPeople = e3.record("calendar_people", DictType(StringType, CalendarPerson), {
|
|
46
|
+
initial: new Map([
|
|
47
|
+
["ash", { name: "A. Ash", team: "Maintenance" }], ["birch", { name: "B. Birch", team: "Production" }], ["cedar", { name: "C. Cedar", team: "Maintenance" }],
|
|
48
|
+
]),
|
|
49
|
+
indexes: (index) => ({
|
|
50
|
+
calendar_people_by_team: index.on(["team"]),
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
53
|
+
export const calendarJobs = e3.record("calendar_jobs", DictType(StringType, CalendarJob), {
|
|
54
|
+
initial: new Map([
|
|
55
|
+
["job1", { title: "Mounting brackets · batch 42", start: some(new Date("2026-10-01T06:00:00Z")), end: some(new Date("2026-10-01T10:00:00Z")), machine: some("press1"), status: variant("active", null), hours: 4.0, customer: "Alder Works", due: some(new Date("2026-10-02T00:00:00Z")) }],
|
|
56
|
+
["job2", { title: "Pump housings", start: some(new Date("2026-10-01T08:00:00Z")), end: some(new Date("2026-10-01T13:00:00Z")), machine: some("lathe1"), status: variant("planned", null), hours: 5.0, customer: "Birch Engineering", due: none }],
|
|
57
|
+
["job3", { title: "Long title: stainless steel mounting plates for the prototype assembly", start: some(new Date("2026-10-01T11:00:00Z")), end: some(new Date("2026-10-01T11:30:00Z")), machine: some("press2"), status: variant("planned", null), hours: 0.5, customer: "Cedar Fabrication", due: none }],
|
|
58
|
+
["job4", { title: "Bearing collars", start: some(new Date("2026-10-02T09:00:00Z")), end: some(new Date("2026-10-02T12:00:00Z")), machine: some("lathe2"), status: variant("planned", null), hours: 3.0, customer: "Alder Works", due: none }],
|
|
59
|
+
["job5", { title: "Overnight batch", start: some(new Date("2026-10-01T22:00:00Z")), end: some(new Date("2026-10-02T02:00:00Z")), machine: some("press1"), status: variant("planned", null), hours: 4.0, customer: "Birch Engineering", due: none }],
|
|
60
|
+
["job6", { title: "September closeout", start: some(new Date("2026-09-30T08:00:00Z")), end: some(new Date("2026-09-30T10:00:00Z")), machine: some("press2"), status: variant("done", null), hours: 2.0, customer: "Alder Works", due: none }],
|
|
61
|
+
["backlog1", { title: "Torque-test fixtures", start: none, end: none, machine: some("press1"), status: variant("planned", null), hours: 2.0, customer: "Alder Works", due: some(new Date("2026-10-02T00:00:00Z")) }],
|
|
62
|
+
["backlog2", { title: "Valve bodies", start: none, end: none, machine: none, status: variant("planned", null), hours: 3.0, customer: "Cedar Fabrication", due: some(new Date("2026-10-06T00:00:00Z")) }],
|
|
63
|
+
["backlog3", { title: "Replacement shims", start: none, end: none, machine: none, status: variant("planned", null), hours: 1.0, customer: "Birch Engineering", due: some(new Date("2026-10-20T00:00:00Z")) }],
|
|
64
|
+
["backlog4", { title: "Prototype spacers", start: none, end: none, machine: none, status: variant("planned", null), hours: 2.5, customer: "Alder Works", due: none }],
|
|
65
|
+
]),
|
|
66
|
+
indexes: (index) => ({
|
|
67
|
+
// The rail narrows each record through its own indexes (#1343): each event kind over its interval index — on its own,
|
|
68
|
+
// and after its status, its machine or its person — so a narrowing keeps every event overlapping the window once.
|
|
69
|
+
calendar_jobs_by_time: index.interval({ from: "start", to: "end" }),
|
|
70
|
+
calendar_jobs_by_status_time: index.interval({ on: ["status"], from: "start", to: "end" }),
|
|
71
|
+
calendar_jobs_by_machine_time: index.interval({ on: ["machine"], from: "start", to: "end" }),
|
|
72
|
+
// Each job is indexed under every UTC day it touches, leaving an exact midnight end out.
|
|
73
|
+
calendar_jobs_by_day: index.keys(East.function([StringType, CalendarJob], SetType(DateTimeType), ($, _key, row) => {
|
|
74
|
+
const days = $.const(Calendar.days);
|
|
75
|
+
return row.start.match({
|
|
76
|
+
some: (_$, start) => row.end.match({ some: (_$, end) => days(start, end), none: () => East.value(new Set(), SetType(DateTimeType)) }),
|
|
77
|
+
none: () => East.value(new Set(), SetType(DateTimeType)),
|
|
78
|
+
});
|
|
79
|
+
})),
|
|
80
|
+
// The unscheduled rows are indexed by due date; they remain in the jobs record.
|
|
81
|
+
calendar_jobs_unscheduled: index.keys(East.function([StringType, CalendarJob], SetType(OptionType(DateTimeType)), ($, _key, row) => {
|
|
82
|
+
const unscheduled = $.const(Calendar.unscheduled);
|
|
83
|
+
return unscheduled(row.start, row.due);
|
|
84
|
+
})),
|
|
85
|
+
}),
|
|
86
|
+
mutations: (mutation) => ({
|
|
87
|
+
patch: mutation.patch(),
|
|
88
|
+
}),
|
|
89
|
+
});
|
|
90
|
+
export const calendarServices = e3.record("calendar_services", DictType(StringType, CalendarService), {
|
|
91
|
+
initial: new Map([
|
|
92
|
+
["service1", { title: "Preventive maintenance", start: new Date("2026-10-01T09:00:00Z"), end: new Date("2026-10-01T11:00:00Z"), machine: "press1", technician: "ash", notes: "Inspect the tooling and check torque." }],
|
|
93
|
+
["service2", { title: "Calibration", start: new Date("2026-10-02T13:00:00Z"), end: new Date("2026-10-02T14:00:00Z"), machine: "lathe1", technician: "cedar", notes: "Check against the reference gauge." }],
|
|
94
|
+
]),
|
|
95
|
+
indexes: (index) => ({
|
|
96
|
+
calendar_services_by_time: index.interval({ from: "start", to: "end" }),
|
|
97
|
+
calendar_services_by_machine_time: index.interval({ on: ["machine"], from: "start", to: "end" }),
|
|
98
|
+
}),
|
|
99
|
+
mutations: (mutation) => ({
|
|
100
|
+
patch: mutation.patch(),
|
|
101
|
+
}),
|
|
102
|
+
});
|
|
103
|
+
export const calendarShifts = e3.record("calendar_shifts", DictType(StringType, CalendarShift), {
|
|
104
|
+
initial: new Map([
|
|
105
|
+
["shift1", { title: "Day shift", start: new Date("2026-10-01T06:00:00Z"), end: new Date("2026-10-01T14:00:00Z"), person: "ash", notes: "Press shop" }],
|
|
106
|
+
["shift2", { title: "Late shift", start: new Date("2026-10-01T14:00:00Z"), end: new Date("2026-10-01T22:00:00Z"), person: "birch", notes: "Machine shop" }],
|
|
107
|
+
]),
|
|
108
|
+
indexes: (index) => ({
|
|
109
|
+
calendar_shifts_by_time: index.interval({ from: "start", to: "end" }),
|
|
110
|
+
calendar_shifts_by_person_time: index.interval({ on: ["person"], from: "start", to: "end" }),
|
|
111
|
+
}),
|
|
112
|
+
mutations: (mutation) => ({
|
|
113
|
+
patch: mutation.patch(),
|
|
114
|
+
}),
|
|
115
|
+
});
|
|
116
|
+
export const calendarJobTemplates = e3.record("calendar_job_templates", DictType(StringType, CalendarJobTemplate), {
|
|
117
|
+
initial: new Map([
|
|
118
|
+
["brackets", { name: "Bracket batch", group: "Fabrication", hours: 4.0, values: { title: "Bracket batch", status: variant("planned", null), hours: 4.0, customer: "", due: none } }],
|
|
119
|
+
["housings", { name: "Housing batch", group: "Machining", hours: 2.0, values: { title: "Housing batch", status: variant("planned", null), hours: 2.0, customer: "", due: none } }],
|
|
120
|
+
]),
|
|
121
|
+
indexes: (index) => ({
|
|
122
|
+
calendar_job_templates_by_group: index.on(["group"]),
|
|
123
|
+
}),
|
|
124
|
+
mutations: (mutation) => ({
|
|
125
|
+
patch: mutation.patch(),
|
|
126
|
+
}),
|
|
127
|
+
});
|
|
128
|
+
export const calendarServiceTemplates = e3.record("calendar_service_templates", DictType(StringType, CalendarServiceTemplate), {
|
|
129
|
+
initial: new Map([
|
|
130
|
+
["calibration", { name: "Calibration", group: "Calibration", hours: 1.0, values: { title: "Calibration", technician: "cedar", notes: "Check against the reference gauge." } }],
|
|
131
|
+
["service", { name: "Preventive maintenance", group: "Preventive", hours: 2.0, values: { title: "Preventive maintenance", technician: "ash", notes: "" } }],
|
|
132
|
+
]),
|
|
133
|
+
indexes: (index) => ({
|
|
134
|
+
calendar_service_templates_by_group: index.on(["group"]),
|
|
135
|
+
}),
|
|
136
|
+
});
|
|
137
|
+
export const calendarShiftTemplates = e3.record("calendar_shift_templates", DictType(StringType, CalendarShiftTemplate), {
|
|
138
|
+
initial: new Map([
|
|
139
|
+
["day", { name: "Day shift", group: "Day", hour: 6n, values: { title: "Day shift", notes: "" } }],
|
|
140
|
+
["late", { name: "Late shift", group: "Late", hour: 14n, values: { title: "Late shift", notes: "" } }],
|
|
141
|
+
]),
|
|
142
|
+
indexes: (index) => ({
|
|
143
|
+
calendar_shift_templates_by_group: index.on(["group"]),
|
|
144
|
+
}),
|
|
145
|
+
});
|
|
91
146
|
export const calendarOperations = example({
|
|
92
147
|
inputs: [],
|
|
93
148
|
description: "A metal fabrication calendar over three event records and bound machines, people and templates: Calendar, Resources and Timeline share one frame, one Slice.bindRecords rail — a source per event kind, resource kind and template record — and Save history. Its library schedules the event record's backlog and assigns technicians; overlapping production and maintenance warn without blocking Save.",
|
|
94
|
-
keywords: ["Calendar", "Record.bind", "Data.bind", "Calendar.templates", "Schedule", "Slice", "Slice.bindRecords", "Data.bindPaged", "
|
|
149
|
+
keywords: ["Calendar", "Record.bind", "Data.bind", "Calendar.templates", "Schedule", "Slice", "Slice.bindRecords", "Data.bindPaged", "indexes", "interval", "BuilderFrame", "library", "backlog", "inspector", "overlaps", "Save"],
|
|
95
150
|
fn: East.function([], UIComponentType, _$ => _jsx(Reactive, { children: $ => {
|
|
96
151
|
// What the Calendar reads whole binds with Data.bind, which keeps it loaded beside its pages; the event records
|
|
97
152
|
// it writes bind with Record.bind, and it reads their events through their pages alone.
|
|
98
153
|
const machines = $.let(Data.bind(calendarMachines));
|
|
99
154
|
const people = $.let(Data.bind(calendarPeople));
|
|
100
|
-
const jobs = $.let(Record.bind(calendarJobs
|
|
101
|
-
const services = $.let(Record.bind(calendarServices
|
|
102
|
-
const shifts = $.let(Record.bind(calendarShifts
|
|
155
|
+
const jobs = $.let(Record.bind(calendarJobs));
|
|
156
|
+
const services = $.let(Record.bind(calendarServices));
|
|
157
|
+
const shifts = $.let(Record.bind(calendarShifts));
|
|
103
158
|
const jobTemplates = $.let(Data.bind(calendarJobTemplates));
|
|
104
159
|
const serviceTemplates = $.let(Data.bind(calendarServiceTemplates));
|
|
105
160
|
const shiftTemplates = $.let(Data.bind(calendarShiftTemplates));
|
|
106
161
|
// Every record paged: each event kind's interval indexes and its own entries, the others' fields' indexes.
|
|
107
|
-
const jobIndex = $.let(Data.bindPaged(calendarJobs, { indexes: [
|
|
108
|
-
const serviceIndex = $.let(Data.bindPaged(calendarServices, { indexes: [
|
|
109
|
-
const shiftIndex = $.let(Data.bindPaged(calendarShifts, { indexes: [
|
|
110
|
-
const machineIndex = $.let(Data.bindPaged(calendarMachines, { indexes: [
|
|
111
|
-
const peopleIndex = $.let(Data.bindPaged(calendarPeople, { indexes: [
|
|
112
|
-
const jobTemplateIndex = $.let(Data.bindPaged(calendarJobTemplates, { indexes: [
|
|
113
|
-
const serviceTemplateIndex = $.let(Data.bindPaged(calendarServiceTemplates, { indexes: [
|
|
114
|
-
const shiftTemplateIndex = $.let(Data.bindPaged(calendarShiftTemplates, { indexes: [
|
|
162
|
+
const jobIndex = $.let(Data.bindPaged(calendarJobs, { indexes: ["calendar_jobs_by_time", "calendar_jobs_by_status_time", "calendar_jobs_by_machine_time"] }));
|
|
163
|
+
const serviceIndex = $.let(Data.bindPaged(calendarServices, { indexes: ["calendar_services_by_time", "calendar_services_by_machine_time"] }));
|
|
164
|
+
const shiftIndex = $.let(Data.bindPaged(calendarShifts, { indexes: ["calendar_shifts_by_time", "calendar_shifts_by_person_time"] }));
|
|
165
|
+
const machineIndex = $.let(Data.bindPaged(calendarMachines, { indexes: ["calendar_machines_by_area"] }));
|
|
166
|
+
const peopleIndex = $.let(Data.bindPaged(calendarPeople, { indexes: ["calendar_people_by_team"] }));
|
|
167
|
+
const jobTemplateIndex = $.let(Data.bindPaged(calendarJobTemplates, { indexes: ["calendar_job_templates_by_group"] }));
|
|
168
|
+
const serviceTemplateIndex = $.let(Data.bindPaged(calendarServiceTemplates, { indexes: ["calendar_service_templates_by_group"] }));
|
|
169
|
+
const shiftTemplateIndex = $.let(Data.bindPaged(calendarShiftTemplates, { indexes: ["calendar_shift_templates_by_group"] }));
|
|
115
170
|
const jobEntries = $.let(Data.bindPaged(calendarJobs));
|
|
116
171
|
const serviceEntries = $.let(Data.bindPaged(calendarServices));
|
|
117
172
|
const shiftEntries = $.let(Data.bindPaged(calendarShifts));
|
|
@@ -170,21 +225,21 @@ export const calendarMobile = example({
|
|
|
170
225
|
// it writes bind with Record.bind, and it reads their events through their pages alone.
|
|
171
226
|
const machines = $.let(Data.bind(calendarMachines));
|
|
172
227
|
const people = $.let(Data.bind(calendarPeople));
|
|
173
|
-
const jobs = $.let(Record.bind(calendarJobs
|
|
174
|
-
const services = $.let(Record.bind(calendarServices
|
|
175
|
-
const shifts = $.let(Record.bind(calendarShifts
|
|
228
|
+
const jobs = $.let(Record.bind(calendarJobs));
|
|
229
|
+
const services = $.let(Record.bind(calendarServices));
|
|
230
|
+
const shifts = $.let(Record.bind(calendarShifts));
|
|
176
231
|
const jobTemplates = $.let(Data.bind(calendarJobTemplates));
|
|
177
232
|
const serviceTemplates = $.let(Data.bind(calendarServiceTemplates));
|
|
178
233
|
const shiftTemplates = $.let(Data.bind(calendarShiftTemplates));
|
|
179
234
|
// Every record paged: each event kind's interval indexes and its own entries, the others' fields' indexes.
|
|
180
|
-
const jobIndex = $.let(Data.bindPaged(calendarJobs, { indexes: [
|
|
181
|
-
const serviceIndex = $.let(Data.bindPaged(calendarServices, { indexes: [
|
|
182
|
-
const shiftIndex = $.let(Data.bindPaged(calendarShifts, { indexes: [
|
|
183
|
-
const machineIndex = $.let(Data.bindPaged(calendarMachines, { indexes: [
|
|
184
|
-
const peopleIndex = $.let(Data.bindPaged(calendarPeople, { indexes: [
|
|
185
|
-
const jobTemplateIndex = $.let(Data.bindPaged(calendarJobTemplates, { indexes: [
|
|
186
|
-
const serviceTemplateIndex = $.let(Data.bindPaged(calendarServiceTemplates, { indexes: [
|
|
187
|
-
const shiftTemplateIndex = $.let(Data.bindPaged(calendarShiftTemplates, { indexes: [
|
|
235
|
+
const jobIndex = $.let(Data.bindPaged(calendarJobs, { indexes: ["calendar_jobs_by_time", "calendar_jobs_by_status_time", "calendar_jobs_by_machine_time"] }));
|
|
236
|
+
const serviceIndex = $.let(Data.bindPaged(calendarServices, { indexes: ["calendar_services_by_time", "calendar_services_by_machine_time"] }));
|
|
237
|
+
const shiftIndex = $.let(Data.bindPaged(calendarShifts, { indexes: ["calendar_shifts_by_time", "calendar_shifts_by_person_time"] }));
|
|
238
|
+
const machineIndex = $.let(Data.bindPaged(calendarMachines, { indexes: ["calendar_machines_by_area"] }));
|
|
239
|
+
const peopleIndex = $.let(Data.bindPaged(calendarPeople, { indexes: ["calendar_people_by_team"] }));
|
|
240
|
+
const jobTemplateIndex = $.let(Data.bindPaged(calendarJobTemplates, { indexes: ["calendar_job_templates_by_group"] }));
|
|
241
|
+
const serviceTemplateIndex = $.let(Data.bindPaged(calendarServiceTemplates, { indexes: ["calendar_service_templates_by_group"] }));
|
|
242
|
+
const shiftTemplateIndex = $.let(Data.bindPaged(calendarShiftTemplates, { indexes: ["calendar_shift_templates_by_group"] }));
|
|
188
243
|
const jobEntries = $.let(Data.bindPaged(calendarJobs));
|
|
189
244
|
const serviceEntries = $.let(Data.bindPaged(calendarServices));
|
|
190
245
|
const shiftEntries = $.let(Data.bindPaged(calendarShifts));
|
|
@@ -243,21 +298,21 @@ export const calendarReadOnly = example({
|
|
|
243
298
|
// it writes bind with Record.bind, and it reads their events through their pages alone.
|
|
244
299
|
const machines = $.let(Data.bind(calendarMachines));
|
|
245
300
|
const people = $.let(Data.bind(calendarPeople));
|
|
246
|
-
const jobs = $.let(Record.bind(calendarJobs
|
|
247
|
-
const services = $.let(Record.bind(calendarServices
|
|
248
|
-
const shifts = $.let(Record.bind(calendarShifts
|
|
301
|
+
const jobs = $.let(Record.bind(calendarJobs));
|
|
302
|
+
const services = $.let(Record.bind(calendarServices));
|
|
303
|
+
const shifts = $.let(Record.bind(calendarShifts));
|
|
249
304
|
const jobTemplates = $.let(Data.bind(calendarJobTemplates));
|
|
250
305
|
const serviceTemplates = $.let(Data.bind(calendarServiceTemplates));
|
|
251
306
|
const shiftTemplates = $.let(Data.bind(calendarShiftTemplates));
|
|
252
307
|
// Every record paged: each event kind's interval indexes and its own entries, the others' fields' indexes.
|
|
253
|
-
const jobIndex = $.let(Data.bindPaged(calendarJobs, { indexes: [
|
|
254
|
-
const serviceIndex = $.let(Data.bindPaged(calendarServices, { indexes: [
|
|
255
|
-
const shiftIndex = $.let(Data.bindPaged(calendarShifts, { indexes: [
|
|
256
|
-
const machineIndex = $.let(Data.bindPaged(calendarMachines, { indexes: [
|
|
257
|
-
const peopleIndex = $.let(Data.bindPaged(calendarPeople, { indexes: [
|
|
258
|
-
const jobTemplateIndex = $.let(Data.bindPaged(calendarJobTemplates, { indexes: [
|
|
259
|
-
const serviceTemplateIndex = $.let(Data.bindPaged(calendarServiceTemplates, { indexes: [
|
|
260
|
-
const shiftTemplateIndex = $.let(Data.bindPaged(calendarShiftTemplates, { indexes: [
|
|
308
|
+
const jobIndex = $.let(Data.bindPaged(calendarJobs, { indexes: ["calendar_jobs_by_time", "calendar_jobs_by_status_time", "calendar_jobs_by_machine_time"] }));
|
|
309
|
+
const serviceIndex = $.let(Data.bindPaged(calendarServices, { indexes: ["calendar_services_by_time", "calendar_services_by_machine_time"] }));
|
|
310
|
+
const shiftIndex = $.let(Data.bindPaged(calendarShifts, { indexes: ["calendar_shifts_by_time", "calendar_shifts_by_person_time"] }));
|
|
311
|
+
const machineIndex = $.let(Data.bindPaged(calendarMachines, { indexes: ["calendar_machines_by_area"] }));
|
|
312
|
+
const peopleIndex = $.let(Data.bindPaged(calendarPeople, { indexes: ["calendar_people_by_team"] }));
|
|
313
|
+
const jobTemplateIndex = $.let(Data.bindPaged(calendarJobTemplates, { indexes: ["calendar_job_templates_by_group"] }));
|
|
314
|
+
const serviceTemplateIndex = $.let(Data.bindPaged(calendarServiceTemplates, { indexes: ["calendar_service_templates_by_group"] }));
|
|
315
|
+
const shiftTemplateIndex = $.let(Data.bindPaged(calendarShiftTemplates, { indexes: ["calendar_shift_templates_by_group"] }));
|
|
261
316
|
const jobEntries = $.let(Data.bindPaged(calendarJobs));
|
|
262
317
|
const serviceEntries = $.let(Data.bindPaged(calendarServices));
|
|
263
318
|
const shiftEntries = $.let(Data.bindPaged(calendarShifts));
|
|
@@ -313,36 +368,19 @@ export const calendarMinimal = example({
|
|
|
313
368
|
keywords: ["Calendar", "minimal", "Record.bind", "day", "mobile", "optional panes"],
|
|
314
369
|
fn: East.function([], UIComponentType, _$ => _jsx(Reactive, { children: $ => {
|
|
315
370
|
const machines = $.let(Record.bind(calendarMachines, []));
|
|
316
|
-
const jobs = $.let(Record.bind(calendarJobs
|
|
371
|
+
const jobs = $.let(Record.bind(calendarJobs));
|
|
317
372
|
return _jsx(Box, { height: "680px", children: _jsx(Calendar, { id: "minimal", view: { period: "day", date: new Date("2026-10-01T00:00:00Z") }, now: new Date("2026-10-01T10:15:00Z"), resources: { machines: Calendar.resources(machines.read(), { name: "Machines", icon: "gears", label: row => row.name }) }, events: { job: Calendar.events(jobs, { name: "Production", icon: "industry", title: "title", start: "start", end: "end", resource: { field: "machine", of: "machines" }, backlog: { duration: row => variant("hours", row.hours), due: row => row.due } }) } }) });
|
|
318
373
|
} })),
|
|
319
374
|
});
|
|
320
|
-
/** Each job is indexed under every UTC day it touches, leaving an exact midnight end out. */
|
|
321
|
-
export const calendarJobsByDay = e3.recordIndex("calendar_jobs_by_day", calendarJobs, {
|
|
322
|
-
keys: East.function([StringType, CalendarJob], SetType(DateTimeType), ($, _key, row) => {
|
|
323
|
-
const days = $.const(Calendar.days);
|
|
324
|
-
return row.start.match({
|
|
325
|
-
some: (_$, start) => row.end.match({ some: (_$, end) => days(start, end), none: () => East.value(new Set(), SetType(DateTimeType)) }),
|
|
326
|
-
none: () => East.value(new Set(), SetType(DateTimeType)),
|
|
327
|
-
});
|
|
328
|
-
}),
|
|
329
|
-
});
|
|
330
|
-
/** The unscheduled rows are indexed by due date; they remain in the jobs record. */
|
|
331
|
-
export const calendarJobsUnscheduled = e3.recordIndex("calendar_jobs_unscheduled", calendarJobs, {
|
|
332
|
-
keys: East.function([StringType, CalendarJob], SetType(OptionType(DateTimeType)), ($, _key, row) => {
|
|
333
|
-
const unscheduled = $.const(Calendar.unscheduled);
|
|
334
|
-
return unscheduled(row.start, row.due);
|
|
335
|
-
}),
|
|
336
|
-
});
|
|
337
375
|
export const calendarWindowed = example({
|
|
338
376
|
inputs: [],
|
|
339
377
|
description: "The jobs calendar read by its day and backlog indexes, with by-key reads for the inspector and checked saves. The calendar's own navigation picks the days read. Counts describe the loaded window. The same mobile agenda and explicit actions work over the paged record.",
|
|
340
|
-
keywords: ["Calendar", "Data.bindPaged", "
|
|
378
|
+
keywords: ["Calendar", "Data.bindPaged", "indexes", "window", "backlogWindow", "entries", "day keys", "mobile", "Save"],
|
|
341
379
|
fn: East.function([], UIComponentType, _$ => _jsx(Reactive, { children: $ => {
|
|
342
380
|
const machines = $.let(Record.bind(calendarMachines, []));
|
|
343
|
-
const jobs = $.let(Record.bind(calendarJobs
|
|
344
|
-
const days = $.let(Data.bindPaged(calendarJobs, { index:
|
|
345
|
-
const backlog = $.let(Data.bindPaged(calendarJobs, { index:
|
|
381
|
+
const jobs = $.let(Record.bind(calendarJobs));
|
|
382
|
+
const days = $.let(Data.bindPaged(calendarJobs, { index: "calendar_jobs_by_day", join: true }));
|
|
383
|
+
const backlog = $.let(Data.bindPaged(calendarJobs, { index: "calendar_jobs_unscheduled", join: true }));
|
|
346
384
|
const entries = $.let(Data.bindPaged(calendarJobs));
|
|
347
385
|
// The days in view are the calendar's own navigation's: it reads them through the day index, never the record whole.
|
|
348
386
|
return _jsx(Box, { height: "760px", children: _jsx(Calendar, { id: "windowed", inspector: true, view: { period: "day", date: new Date("2026-10-01T00:00:00Z") }, now: new Date("2026-10-01T10:15:00Z"), resources: { machines: Calendar.resources(machines.read(), { name: "Machines", icon: "gears", label: row => row.name }) }, events: { job: Calendar.events(jobs, { name: "Production", icon: "industry", title: "title", start: "start", end: "end", resource: { field: "machine", of: "machines" },
|
|
@@ -352,17 +390,21 @@ export const calendarWindowed = example({
|
|
|
352
390
|
});
|
|
353
391
|
/** The smallest event record needs only its title and two instants. */
|
|
354
392
|
export const CalendarAppointment = StructType({ title: StringType, start: DateTimeType, end: DateTimeType });
|
|
355
|
-
export const calendarAppointments = e3.record("calendar_appointments", DictType(StringType, CalendarAppointment),
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
393
|
+
export const calendarAppointments = e3.record("calendar_appointments", DictType(StringType, CalendarAppointment), {
|
|
394
|
+
initial: new Map([
|
|
395
|
+
["check", { title: "Safety check", start: new Date("2026-10-01T09:00:00Z"), end: new Date("2026-10-01T10:00:00Z") }],
|
|
396
|
+
["review", { title: "Production review", start: new Date("2026-10-01T11:00:00Z"), end: new Date("2026-10-01T12:00:00Z") }],
|
|
397
|
+
]),
|
|
398
|
+
mutations: (mutation) => ({
|
|
399
|
+
patch: mutation.patch(),
|
|
400
|
+
}),
|
|
401
|
+
});
|
|
360
402
|
export const calendarQuickstart = example({
|
|
361
403
|
inputs: [],
|
|
362
404
|
description: "The smallest Calendar: a bound appointment record and its patch mutation. Calendar owns its frame, toolbar and editing session; the app names the fields that scheduling writes.",
|
|
363
405
|
keywords: ["Calendar", "quickstart", "Record.bind", "events", "Save"],
|
|
364
406
|
fn: East.function([], UIComponentType, _$ => _jsx(Reactive, { children: $ => {
|
|
365
|
-
const appointments = $.let(Record.bind(calendarAppointments
|
|
407
|
+
const appointments = $.let(Record.bind(calendarAppointments));
|
|
366
408
|
return _jsx(Box, { height: "640px", children: _jsx(Calendar, { inspector: true, view: { period: "day", date: new Date("2026-10-01T00:00:00Z") }, events: { appointment: Calendar.events(appointments, { name: "Appointment", icon: "calendar", title: "title", start: "start", end: "end" }) } }) });
|
|
367
409
|
} })),
|
|
368
410
|
});
|
|
@@ -372,7 +414,7 @@ export const calendarCustomInspector = example({
|
|
|
372
414
|
description: "A typed custom appointment inspector updates the whole row through Calendar's shared Undo, Redo and Save session.",
|
|
373
415
|
keywords: ["Calendar", "inspector", "custom", "Schedule.events", "update", "Record.bind"],
|
|
374
416
|
fn: East.function([], UIComponentType, _$ => _jsx(Reactive, { children: $ => {
|
|
375
|
-
const appointments = $.let(Record.bind(calendarAppointments
|
|
417
|
+
const appointments = $.let(Record.bind(calendarAppointments));
|
|
376
418
|
const inspect = $.const(East.function([CalendarAppointment, FunctionType([CalendarAppointment], NullType)], UIComponentType, ($2, row, update) => {
|
|
377
419
|
const change = $2.const(East.function([StringType], NullType, ($3, title) => { $3(update({ title, start: row.start, end: row.end })); }));
|
|
378
420
|
return _jsx(Input.String, { value: row.title, placeholder: "Appointment title", onChange: change });
|
|
@@ -380,4 +422,49 @@ export const calendarCustomInspector = example({
|
|
|
380
422
|
return _jsx(Box, { height: "640px", children: _jsx(Calendar, { inspector: true, view: { period: "day", date: new Date("2026-10-01T00:00:00Z") }, events: { appointment: Calendar.events(appointments, { name: "Appointment", icon: "calendar", title: "title", start: "start", end: "end", inspector: inspect }) } }) });
|
|
381
423
|
} })),
|
|
382
424
|
});
|
|
425
|
+
/** The jobs the conflicts example edits, in a record of their own, so no other example's edits meet them. */
|
|
426
|
+
export const calendarConflictJobs = e3.record("calendar_conflict_jobs", DictType(StringType, CalendarJob), {
|
|
427
|
+
initial: new Map([
|
|
428
|
+
["job1", { title: "Mounting brackets", start: some(new Date("2026-10-01T06:00:00Z")), end: some(new Date("2026-10-01T10:00:00Z")), machine: some("press1"), status: variant("active", null), hours: 4.0, customer: "Alder Works", due: none }],
|
|
429
|
+
["job2", { title: "Pump housings", start: some(new Date("2026-10-01T08:00:00Z")), end: some(new Date("2026-10-01T13:00:00Z")), machine: some("lathe1"), status: variant("planned", null), hours: 5.0, customer: "Birch Engineering", due: none }],
|
|
430
|
+
["job3", { title: "Mounting plates", start: some(new Date("2026-10-01T11:00:00Z")), end: some(new Date("2026-10-01T12:30:00Z")), machine: some("press2"), status: variant("planned", null), hours: 1.5, customer: "Cedar Fabrication", due: none }],
|
|
431
|
+
["job4", { title: "Bearing collars", start: some(new Date("2026-10-01T09:00:00Z")), end: some(new Date("2026-10-01T12:00:00Z")), machine: some("lathe2"), status: variant("planned", null), hours: 3.0, customer: "Alder Works", due: none }],
|
|
432
|
+
]),
|
|
433
|
+
mutations: (mutation) => ({
|
|
434
|
+
// The jobs' patch door — every Save commits through it.
|
|
435
|
+
patch: mutation.patch(),
|
|
436
|
+
// Someone else's save: every job an hour later, its length and its other fields as they were.
|
|
437
|
+
elsewhere: mutation.reduce(East.function([DictType(StringType, CalendarJob)], DictType(StringType, CalendarJob), (_$, jobs) => jobs.map((_$2, job) => ({
|
|
438
|
+
title: job.title,
|
|
439
|
+
start: job.start.match({
|
|
440
|
+
some: (_$3, at) => East.value(some(at.addHours(1n)), OptionType(DateTimeType)),
|
|
441
|
+
none: (_$3) => East.value(none, OptionType(DateTimeType)),
|
|
442
|
+
}),
|
|
443
|
+
end: job.end.match({
|
|
444
|
+
some: (_$3, at) => East.value(some(at.addHours(1n)), OptionType(DateTimeType)),
|
|
445
|
+
none: (_$3) => East.value(none, OptionType(DateTimeType)),
|
|
446
|
+
}),
|
|
447
|
+
machine: job.machine, status: job.status, hours: job.hours, customer: job.customer, due: job.due,
|
|
448
|
+
})))),
|
|
449
|
+
}),
|
|
450
|
+
});
|
|
451
|
+
/**
|
|
452
|
+
* Your edits meeting someone else's save, in one window: edit, then press
|
|
453
|
+
* Someone else saves, which saves another person's change to the same jobs —
|
|
454
|
+
* every job an hour later. A job you moved or resized too is a conflict, its
|
|
455
|
+
* dates one card to choose; a customer or hours you changed in the panel
|
|
456
|
+
* combines with theirs. Each press saves their change again.
|
|
457
|
+
*/
|
|
458
|
+
export const calendarConflicts = example({
|
|
459
|
+
inputs: [],
|
|
460
|
+
description: "Your edits meeting someone else's save, in one window — move or resize a job, then press Someone else saves, which saves another person's change to the same jobs (every job an hour later), so yours conflict, its dates one card to choose; a customer or hours you change in the panel combines with theirs",
|
|
461
|
+
keywords: ["Calendar", "conflict", "conflicts", "combine", "someone else", "Choose", "dates", "Record.bind", "mutate", "Button", "inspector", "Save"],
|
|
462
|
+
fn: East.function([], UIComponentType, _$ => _jsx(Reactive, { children: $ => {
|
|
463
|
+
const machines = $.let(Record.bind(calendarMachines, []));
|
|
464
|
+
const jobs = $.let(Record.bind(calendarConflictJobs, ["patch"]));
|
|
465
|
+
const others = $.let(Record.bind(calendarConflictJobs, ["elsewhere"]));
|
|
466
|
+
const theirs = $.const(East.function([], NullType, ($) => { $(others.mutate.elsewhere()); }));
|
|
467
|
+
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 job an hour later" })] }), _jsx(Box, { height: "680px", children: _jsx(Calendar, { id: "conflicts", inspector: true, view: { period: "week", date: new Date("2026-10-01T00:00:00Z") }, now: new Date("2026-10-01T10:15:00Z"), resources: { machines: Calendar.resources(machines.read(), { name: "Machines", icon: "gears", label: row => row.name }) }, events: { job: Calendar.events(jobs, { name: "Production", icon: "industry", title: "title", start: "start", end: "end", resource: { field: "machine", of: "machines" } }) } }) })] });
|
|
468
|
+
} })),
|
|
469
|
+
});
|
|
383
470
|
//# sourceMappingURL=calendar.examples.js.map
|