@elaraai/e3-ui 1.0.86 → 1.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/bind/data-indexed.d.ts +159 -0
- package/dist/src/bind/data-indexed.d.ts.map +1 -0
- package/dist/src/bind/data-indexed.js +105 -0
- package/dist/src/bind/data-indexed.js.map +1 -0
- package/dist/src/bind/data.d.ts +5 -3
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +6 -0
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/record.d.ts +34 -23
- package/dist/src/bind/record.d.ts.map +1 -1
- package/dist/src/bind/record.js +46 -19
- package/dist/src/bind/record.js.map +1 -1
- package/dist/src/calendar/index.d.ts +2923 -0
- package/dist/src/calendar/index.d.ts.map +1 -0
- package/dist/src/calendar/index.js +135 -0
- package/dist/src/calendar/index.js.map +1 -0
- package/dist/src/decision/queue.d.ts +3 -3
- package/dist/src/decision/queue.d.ts.map +1 -1
- package/dist/src/decision/queue.js +2 -2
- package/dist/src/decision/queue.js.map +1 -1
- package/dist/src/decision/types.d.ts +4 -0
- package/dist/src/decision/types.d.ts.map +1 -1
- package/dist/src/decision/types.js +4 -0
- package/dist/src/decision/types.js.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +114 -0
- package/dist/src/flowchart/canvas.d.ts.map +1 -0
- package/dist/src/flowchart/canvas.js +84 -0
- package/dist/src/flowchart/canvas.js.map +1 -0
- package/dist/src/flowchart/flowchart.d.ts +79 -0
- package/dist/src/flowchart/flowchart.d.ts.map +1 -0
- package/dist/src/flowchart/flowchart.js +9 -0
- package/dist/src/flowchart/flowchart.js.map +1 -0
- package/dist/src/flowchart/index.d.ts +305 -0
- package/dist/src/flowchart/index.d.ts.map +1 -0
- package/dist/src/flowchart/index.js +267 -0
- package/dist/src/flowchart/index.js.map +1 -0
- package/dist/src/flowchart/library.d.ts +720 -0
- package/dist/src/flowchart/library.d.ts.map +1 -0
- package/dist/src/flowchart/library.js +611 -0
- package/dist/src/flowchart/library.js.map +1 -0
- package/dist/src/flowchart/over.d.ts +234 -0
- package/dist/src/flowchart/over.d.ts.map +1 -0
- package/dist/src/flowchart/over.js +220 -0
- package/dist/src/flowchart/over.js.map +1 -0
- package/dist/src/flowchart/patch.d.ts +64 -0
- package/dist/src/flowchart/patch.d.ts.map +1 -0
- package/dist/src/flowchart/patch.js +67 -0
- package/dist/src/flowchart/patch.js.map +1 -0
- package/dist/src/flowchart/payload.d.ts +8220 -0
- package/dist/src/flowchart/payload.d.ts.map +1 -0
- package/dist/src/flowchart/payload.js +521 -0
- package/dist/src/flowchart/payload.js.map +1 -0
- package/dist/src/flowchart/types.d.ts +393 -0
- package/dist/src/flowchart/types.d.ts.map +1 -0
- package/dist/src/flowchart/types.js +216 -0
- package/dist/src/flowchart/types.js.map +1 -0
- package/dist/src/flowchart/values.d.ts +267 -0
- package/dist/src/flowchart/values.d.ts.map +1 -0
- package/dist/src/flowchart/values.js +216 -0
- package/dist/src/flowchart/values.js.map +1 -0
- package/dist/src/flowchart/window.d.ts +521 -0
- package/dist/src/flowchart/window.d.ts.map +1 -0
- package/dist/src/flowchart/window.js +69 -0
- package/dist/src/flowchart/window.js.map +1 -0
- package/dist/src/index.d.ts +25 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +48 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +35 -3
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +72 -3
- package/dist/src/internal.js.map +1 -1
- package/dist/src/plan/assemble.d.ts +2224 -0
- package/dist/src/plan/assemble.d.ts.map +1 -0
- package/dist/src/plan/assemble.js +210 -0
- package/dist/src/plan/assemble.js.map +1 -0
- package/dist/src/plan/builders.d.ts +790 -0
- package/dist/src/plan/builders.d.ts.map +1 -0
- package/dist/src/plan/builders.js +749 -0
- package/dist/src/plan/builders.js.map +1 -0
- package/dist/src/plan/event-rows.d.ts +2565 -0
- package/dist/src/plan/event-rows.d.ts.map +1 -0
- package/dist/src/plan/event-rows.js +689 -0
- package/dist/src/plan/event-rows.js.map +1 -0
- package/dist/src/plan/factories.d.ts +458 -0
- package/dist/src/plan/factories.d.ts.map +1 -0
- package/dist/src/plan/factories.js +484 -0
- package/dist/src/plan/factories.js.map +1 -0
- package/dist/src/plan/index.d.ts +672 -0
- package/dist/src/plan/index.d.ts.map +1 -0
- package/dist/src/plan/index.js +532 -0
- package/dist/src/plan/index.js.map +1 -0
- package/dist/src/plan/ir.d.ts +2594 -0
- package/dist/src/plan/ir.d.ts.map +1 -0
- package/dist/src/plan/ir.js +78 -0
- package/dist/src/plan/ir.js.map +1 -0
- package/dist/src/plan/library.d.ts +772 -0
- package/dist/src/plan/library.d.ts.map +1 -0
- package/dist/src/plan/library.js +424 -0
- package/dist/src/plan/library.js.map +1 -0
- package/dist/src/plan/ordered-source.d.ts +27 -0
- package/dist/src/plan/ordered-source.d.ts.map +1 -0
- package/dist/src/plan/ordered-source.js +48 -0
- package/dist/src/plan/ordered-source.js.map +1 -0
- package/dist/src/plan/over.d.ts +247 -0
- package/dist/src/plan/over.d.ts.map +1 -0
- package/dist/src/plan/over.js +266 -0
- package/dist/src/plan/over.js.map +1 -0
- package/dist/src/plan/pick.d.ts +78 -0
- package/dist/src/plan/pick.d.ts.map +1 -0
- package/dist/src/plan/pick.js +146 -0
- package/dist/src/plan/pick.js.map +1 -0
- package/dist/src/plan/plan.d.ts +11611 -0
- package/dist/src/plan/plan.d.ts.map +1 -0
- package/dist/src/plan/plan.js +428 -0
- package/dist/src/plan/plan.js.map +1 -0
- package/dist/src/plan/refs.d.ts +218 -0
- package/dist/src/plan/refs.d.ts.map +1 -0
- package/dist/src/plan/refs.js +226 -0
- package/dist/src/plan/refs.js.map +1 -0
- package/dist/src/plan/root.d.ts +290 -0
- package/dist/src/plan/root.d.ts.map +1 -0
- package/dist/src/plan/root.js +463 -0
- package/dist/src/plan/root.js.map +1 -0
- package/dist/src/plan/series.d.ts +13554 -0
- package/dist/src/plan/series.d.ts.map +1 -0
- package/dist/src/plan/series.js +1921 -0
- package/dist/src/plan/series.js.map +1 -0
- package/dist/src/plan/types.d.ts +12400 -0
- package/dist/src/plan/types.d.ts.map +1 -0
- package/dist/src/plan/types.js +1335 -0
- package/dist/src/plan/types.js.map +1 -0
- package/dist/src/roster/coverage.d.ts +240 -0
- package/dist/src/roster/coverage.d.ts.map +1 -0
- package/dist/src/roster/coverage.js +109 -0
- package/dist/src/roster/coverage.js.map +1 -0
- package/dist/src/roster/index.d.ts +4028 -0
- package/dist/src/roster/index.d.ts.map +1 -0
- package/dist/src/roster/index.js +115 -0
- package/dist/src/roster/index.js.map +1 -0
- package/dist/src/roster/library.d.ts +106 -0
- package/dist/src/roster/library.d.ts.map +1 -0
- package/dist/src/roster/library.js +78 -0
- package/dist/src/roster/library.js.map +1 -0
- package/dist/src/roster/people.d.ts +50 -0
- package/dist/src/roster/people.d.ts.map +1 -0
- package/dist/src/roster/people.js +32 -0
- package/dist/src/roster/people.js.map +1 -0
- package/dist/src/roster/rules.d.ts +275 -0
- package/dist/src/roster/rules.d.ts.map +1 -0
- package/dist/src/roster/rules.js +162 -0
- package/dist/src/roster/rules.js.map +1 -0
- package/dist/src/roster/types.d.ts +672 -0
- package/dist/src/roster/types.d.ts.map +1 -0
- package/dist/src/roster/types.js +248 -0
- package/dist/src/roster/types.js.map +1 -0
- package/dist/src/roster/visibility.d.ts +66 -0
- package/dist/src/roster/visibility.d.ts.map +1 -0
- package/dist/src/roster/visibility.js +25 -0
- package/dist/src/roster/visibility.js.map +1 -0
- package/dist/src/schedule/days.d.ts +54 -0
- package/dist/src/schedule/days.d.ts.map +1 -0
- package/dist/src/schedule/days.js +68 -0
- package/dist/src/schedule/days.js.map +1 -0
- package/dist/src/schedule/events.d.ts +433 -0
- package/dist/src/schedule/events.d.ts.map +1 -0
- package/dist/src/schedule/events.js +851 -0
- package/dist/src/schedule/events.js.map +1 -0
- package/dist/src/schedule/index.d.ts +150 -0
- package/dist/src/schedule/index.d.ts.map +1 -0
- package/dist/src/schedule/index.js +132 -0
- package/dist/src/schedule/index.js.map +1 -0
- package/dist/src/schedule/library.d.ts +70 -0
- package/dist/src/schedule/library.d.ts.map +1 -0
- package/dist/src/schedule/library.js +102 -0
- package/dist/src/schedule/library.js.map +1 -0
- package/dist/src/schedule/patch.d.ts +74 -0
- package/dist/src/schedule/patch.d.ts.map +1 -0
- package/dist/src/schedule/patch.js +68 -0
- package/dist/src/schedule/patch.js.map +1 -0
- package/dist/src/schedule/record-window.d.ts +189 -0
- package/dist/src/schedule/record-window.d.ts.map +1 -0
- package/dist/src/schedule/record-window.js +95 -0
- package/dist/src/schedule/record-window.js.map +1 -0
- package/dist/src/schedule/resources.d.ts +165 -0
- package/dist/src/schedule/resources.d.ts.map +1 -0
- package/dist/src/schedule/resources.js +234 -0
- package/dist/src/schedule/resources.js.map +1 -0
- package/dist/src/schedule/templates.d.ts +47 -0
- package/dist/src/schedule/templates.d.ts.map +1 -0
- package/dist/src/schedule/templates.js +61 -0
- package/dist/src/schedule/templates.js.map +1 -0
- package/dist/src/schedule/types.d.ts +1677 -0
- package/dist/src/schedule/types.d.ts.map +1 -0
- package/dist/src/schedule/types.js +374 -0
- package/dist/src/schedule/types.js.map +1 -0
- package/dist/src/schedule/window.d.ts +154 -0
- package/dist/src/schedule/window.d.ts.map +1 -0
- package/dist/src/schedule/window.js +363 -0
- package/dist/src/schedule/window.js.map +1 -0
- package/dist/src/sheet/bridge.d.ts +385 -0
- package/dist/src/sheet/bridge.d.ts.map +1 -0
- package/dist/src/sheet/bridge.js +809 -0
- package/dist/src/sheet/bridge.js.map +1 -0
- package/dist/src/sheet/columns.d.ts +410 -0
- package/dist/src/sheet/columns.d.ts.map +1 -0
- package/dist/src/sheet/columns.js +99 -0
- package/dist/src/sheet/columns.js.map +1 -0
- package/dist/src/sheet/context-bridge.d.ts +48 -0
- package/dist/src/sheet/context-bridge.d.ts.map +1 -0
- package/dist/src/sheet/context-bridge.js +216 -0
- package/dist/src/sheet/context-bridge.js.map +1 -0
- package/dist/src/sheet/draft-bridge.d.ts +37 -0
- package/dist/src/sheet/draft-bridge.d.ts.map +1 -0
- package/dist/src/sheet/draft-bridge.js +153 -0
- package/dist/src/sheet/draft-bridge.js.map +1 -0
- package/dist/src/sheet/drafts.d.ts +14 -0
- package/dist/src/sheet/drafts.d.ts.map +1 -0
- package/dist/src/sheet/drafts.js +14 -0
- package/dist/src/sheet/drafts.js.map +1 -0
- package/dist/src/sheet/editing-bridge.d.ts +40 -0
- package/dist/src/sheet/editing-bridge.d.ts.map +1 -0
- package/dist/src/sheet/editing-bridge.js +231 -0
- package/dist/src/sheet/editing-bridge.js.map +1 -0
- package/dist/src/sheet/editing-types.d.ts +268 -0
- package/dist/src/sheet/editing-types.d.ts.map +1 -0
- package/dist/src/sheet/editing-types.js +34 -0
- package/dist/src/sheet/editing-types.js.map +1 -0
- package/dist/src/sheet/edits.d.ts +37 -0
- package/dist/src/sheet/edits.d.ts.map +1 -0
- package/dist/src/sheet/edits.js +31 -0
- package/dist/src/sheet/edits.js.map +1 -0
- package/dist/src/sheet/fields.d.ts +693 -0
- package/dist/src/sheet/fields.d.ts.map +1 -0
- package/dist/src/sheet/fields.js +280 -0
- package/dist/src/sheet/fields.js.map +1 -0
- package/dist/src/sheet/group.d.ts +165 -0
- package/dist/src/sheet/group.d.ts.map +1 -0
- package/dist/src/sheet/group.js +52 -0
- package/dist/src/sheet/group.js.map +1 -0
- package/dist/src/sheet/index.d.ts +542 -0
- package/dist/src/sheet/index.d.ts.map +1 -0
- package/dist/src/sheet/index.js +387 -0
- package/dist/src/sheet/index.js.map +1 -0
- package/dist/src/sheet/library.d.ts +284 -0
- package/dist/src/sheet/library.d.ts.map +1 -0
- package/dist/src/sheet/library.js +259 -0
- package/dist/src/sheet/library.js.map +1 -0
- package/dist/src/sheet/link.d.ts +398 -0
- package/dist/src/sheet/link.d.ts.map +1 -0
- package/dist/src/sheet/link.js +228 -0
- package/dist/src/sheet/link.js.map +1 -0
- package/dist/src/sheet/record.d.ts +75 -0
- package/dist/src/sheet/record.d.ts.map +1 -0
- package/dist/src/sheet/record.js +128 -0
- package/dist/src/sheet/record.js.map +1 -0
- package/dist/src/sheet/registers.d.ts +681 -0
- package/dist/src/sheet/registers.d.ts.map +1 -0
- package/dist/src/sheet/registers.js +671 -0
- package/dist/src/sheet/registers.js.map +1 -0
- package/dist/src/sheet/root.d.ts +329 -0
- package/dist/src/sheet/root.d.ts.map +1 -0
- package/dist/src/sheet/root.js +511 -0
- package/dist/src/sheet/root.js.map +1 -0
- package/dist/src/sheet/seed-bridge.d.ts +14 -0
- package/dist/src/sheet/seed-bridge.d.ts.map +1 -0
- package/dist/src/sheet/seed-bridge.js +51 -0
- package/dist/src/sheet/seed-bridge.js.map +1 -0
- package/dist/src/sheet/sheet.d.ts +11819 -0
- package/dist/src/sheet/sheet.d.ts.map +1 -0
- package/dist/src/sheet/sheet.js +236 -0
- package/dist/src/sheet/sheet.js.map +1 -0
- package/dist/src/sheet/sub-rows.d.ts +299 -0
- package/dist/src/sheet/sub-rows.d.ts.map +1 -0
- package/dist/src/sheet/sub-rows.js +272 -0
- package/dist/src/sheet/sub-rows.js.map +1 -0
- package/dist/src/sheet/templates.d.ts +161 -0
- package/dist/src/sheet/templates.d.ts.map +1 -0
- package/dist/src/sheet/templates.js +122 -0
- package/dist/src/sheet/templates.js.map +1 -0
- package/dist/src/sheet/transactions.d.ts +76 -0
- package/dist/src/sheet/transactions.d.ts.map +1 -0
- package/dist/src/sheet/transactions.js +40 -0
- package/dist/src/sheet/transactions.js.map +1 -0
- package/dist/src/sheet/types.d.ts +15226 -0
- package/dist/src/sheet/types.d.ts.map +1 -0
- package/dist/src/sheet/types.js +1070 -0
- package/dist/src/sheet/types.js.map +1 -0
- package/dist/src/sheet/views.d.ts +29 -0
- package/dist/src/sheet/views.d.ts.map +1 -0
- package/dist/src/sheet/views.js +43 -0
- package/dist/src/sheet/views.js.map +1 -0
- package/dist/src/studio/component.d.ts.map +1 -1
- package/dist/src/studio/component.js +11 -8
- package/dist/src/studio/component.js.map +1 -1
- package/dist/src/utils/derive.d.ts +134 -8
- package/dist/src/utils/derive.d.ts.map +1 -1
- package/dist/src/utils/derive.js +409 -7
- package/dist/src/utils/derive.js.map +1 -1
- package/dist/src/utils/ordered-source.d.ts +38 -0
- package/dist/src/utils/ordered-source.d.ts.map +1 -0
- package/dist/src/utils/ordered-source.js +45 -0
- package/dist/src/utils/ordered-source.js.map +1 -0
- package/dist/src/utils/row-inspector.d.ts +36 -0
- package/dist/src/utils/row-inspector.d.ts.map +1 -0
- package/dist/src/utils/row-inspector.js +49 -0
- package/dist/src/utils/row-inspector.js.map +1 -0
- package/dist/test/bind/data/data.examples.d.ts +21 -19
- package/dist/test/bind/data/data.examples.d.ts.map +1 -1
- package/dist/test/bind/data/data.examples.js +122 -122
- package/dist/test/bind/data/data.examples.js.map +1 -1
- package/dist/test/bind/record/record.examples.d.ts.map +1 -1
- package/dist/test/bind/record/record.examples.js +9 -9
- package/dist/test/bind/record/record.examples.js.map +1 -1
- package/dist/test/calendar/calendar-records.examples.d.ts +228 -0
- package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -0
- package/dist/test/calendar/calendar-records.examples.js +91 -0
- package/dist/test/calendar/calendar-records.examples.js.map +1 -0
- package/dist/test/calendar/calendar.examples.d.ts +776 -0
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -0
- package/dist/test/calendar/calendar.examples.js +336 -0
- package/dist/test/calendar/calendar.examples.js.map +1 -0
- package/dist/test/decision/journal.examples.d.ts +28 -28
- package/dist/test/decision/journal.examples.d.ts.map +1 -1
- package/dist/test/decision/journal.examples.js +4 -4
- package/dist/test/decision/journal.examples.js.map +1 -1
- package/dist/test/decision/queue.examples.d.ts.map +1 -1
- package/dist/test/decision/queue.examples.js +5 -7
- package/dist/test/decision/queue.examples.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +3713 -0
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -0
- package/dist/test/flowchart/flowchart.examples.js +465 -0
- package/dist/test/flowchart/flowchart.examples.js.map +1 -0
- package/dist/test/plan/plan-events.examples.d.ts +3666 -0
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-events.examples.js +773 -0
- package/dist/test/plan/plan-events.examples.js.map +1 -0
- package/dist/test/plan/plan-records.examples.d.ts +3 -0
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-records.examples.js +45 -0
- package/dist/test/plan/plan-records.examples.js.map +1 -0
- package/dist/test/plan/plan-windows.examples.d.ts +588 -0
- package/dist/test/plan/plan-windows.examples.d.ts.map +1 -0
- package/dist/test/plan/plan-windows.examples.js +170 -0
- package/dist/test/plan/plan-windows.examples.js.map +1 -0
- package/dist/test/plan/plan.examples.d.ts +8095 -0
- package/dist/test/plan/plan.examples.d.ts.map +1 -0
- package/dist/test/plan/plan.examples.js +2500 -0
- package/dist/test/plan/plan.examples.js.map +1 -0
- package/dist/test/roster/domain.examples.d.ts +367 -0
- package/dist/test/roster/domain.examples.d.ts.map +1 -0
- package/dist/test/roster/domain.examples.js +72 -0
- package/dist/test/roster/domain.examples.js.map +1 -0
- package/dist/test/roster/roster-records.examples.d.ts +729 -0
- package/dist/test/roster/roster-records.examples.d.ts.map +1 -0
- package/dist/test/roster/roster-records.examples.js +86 -0
- package/dist/test/roster/roster-records.examples.js.map +1 -0
- package/dist/test/roster/roster.examples.d.ts +750 -0
- package/dist/test/roster/roster.examples.d.ts.map +1 -0
- package/dist/test/roster/roster.examples.js +198 -0
- package/dist/test/roster/roster.examples.js.map +1 -0
- package/dist/test/roster/warehouse.d.ts +87 -0
- package/dist/test/roster/warehouse.d.ts.map +1 -0
- package/dist/test/roster/warehouse.js +883 -0
- package/dist/test/roster/warehouse.js.map +1 -0
- package/dist/test/sheet/sheet-link.examples.d.ts +7 -0
- package/dist/test/sheet/sheet-link.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-link.examples.js +41 -0
- package/dist/test/sheet/sheet-link.examples.js.map +1 -0
- package/dist/test/sheet/sheet-records.examples.d.ts +421 -0
- package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-records.examples.js +79 -0
- package/dist/test/sheet/sheet-records.examples.js.map +1 -0
- package/dist/test/sheet/sheet-transactions.examples.d.ts +7 -0
- package/dist/test/sheet/sheet-transactions.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-transactions.examples.js +58 -0
- package/dist/test/sheet/sheet-transactions.examples.js.map +1 -0
- package/dist/test/sheet/sheet.examples.d.ts +5562 -0
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet.examples.js +1178 -0
- package/dist/test/sheet/sheet.examples.js.map +1 -0
- package/dist/test/studio/studio.examples.d.ts.map +1 -1
- package/dist/test/studio/studio.examples.js +11 -11
- package/dist/test/studio/studio.examples.js.map +1 -1
- package/package.json +12 -9
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* `Sheet` — the planning spreadsheet (`libs/east-ui/docs/proposals/Sheet
|
|
7
|
+
* Spec.md`): a sheet whose rows are the host's records, whose columns are
|
|
8
|
+
* TYPED (a date, a quantity with a unit, a register lookup, a directed link
|
|
9
|
+
* between register members, a stamped read-only code), whose blank tail
|
|
10
|
+
* invites the next row, and whose copilot fills cells and proposes whole
|
|
11
|
+
* rows from rules the author writes as East functions.
|
|
12
|
+
*
|
|
13
|
+
* The module is the namespace assembler over the split sources:
|
|
14
|
+
* `types.ts` (the closed wire types + the typed constructors) ·
|
|
15
|
+
* `columns.ts` (`Sheet.column.*`) · `registers.ts` (`Sheet.register.*`,
|
|
16
|
+
* `Sheet.driver`) · `link.ts` (`Sheet.link.*`) · `group.ts` (`Sheet.group`,
|
|
17
|
+
* `Sheet.group.cell.*`) · `sub-rows.ts` (`Sheet.subRows` / `Sheet.subRow`) ·
|
|
18
|
+
* `transactions.ts` and `drafts.ts` (the Sheet's names for the shared editing
|
|
19
|
+
* contract, `contracts/editing.ts` #879 — `Sheet.apply`, the checked batch
|
|
20
|
+
* types, the draft entry types and the `onPatch` event — plus the new-row
|
|
21
|
+
* contexts only a sheet has) · `edits.ts` (the `edits` capabilities) ·
|
|
22
|
+
* `bridge.ts` (the typed bridge) · `context-bridge.ts`, `draft-bridge.ts` and
|
|
23
|
+
* `seed-bridge.ts` (draft-aware contexts, draft decoding and the `newRow` /
|
|
24
|
+
* `newGroup` defaults) · `editing-bridge.ts` and `editing-types.ts` (the
|
|
25
|
+
* editing session's callbacks and their closed transport, the inline
|
|
26
|
+
* `onUpdate` adapter among them) · `root.ts` (the grid's root) · `sheet.ts`
|
|
27
|
+
* (`<Sheet>` itself, its payload and its `Sheet` carrier, #1216) with
|
|
28
|
+
* `record.ts` (a record's rows, #1182), `templates.ts` (the Rows tab's
|
|
29
|
+
* cards), `library.ts` (`Sheet.library.*`, the library pane's tabs, #1186),
|
|
30
|
+
* `fields.ts` (`Sheet.field`, the inspector pane's forms, #1188) and
|
|
31
|
+
* `views.ts` (the views' bind handle).
|
|
32
|
+
*
|
|
33
|
+
* `Sheet` is the tag and the namespace at once, as east-ui's `Table` is: one
|
|
34
|
+
* namespace object per category on it, the `Plan.series` / `Plan.at` /
|
|
35
|
+
* `Plan.Types` split, so categories never mix as they grow.
|
|
36
|
+
*
|
|
37
|
+
* @packageDocumentation
|
|
38
|
+
*/
|
|
39
|
+
import { East, some, none, } from "@elaraai/east";
|
|
40
|
+
import { SheetMemberType, SheetLinkType, SheetCellType, SheetRowType, SheetLineType, SheetBandType, SheetGroupCellType, SheetGroupType, SheetRowsCollectionType, SheetRowsType, SheetRegisterMemberType, SheetRegisterType, SheetDriverType, SheetHalfType, SheetSidesValueType, SheetStoreType, SheetMemberKindType, SheetMultipleType, SheetSideLockType, SheetSidesType, SheetCountedType, SheetContextType, SheetFillType, SheetProposalType, SheetProviderType, SheetProposerType, SheetSuggestType, SheetCheckContextType, SheetCheckType, SheetArityType, SheetColumnKindType, SheetColumnType, SheetViewType, SheetRecordViewType, SheetEditType, SheetSelectionType, SheetFooterItemType, SheetStyleType, SheetRootType, SheetFillTypeFor, SheetPatchTypeFor, SheetProposalTypeFor, SheetFacetType, SheetSubRowType, SheetDateLevelType, SheetOptionsRuleType, SheetNounType, sheetContextType, sheetCheckContextType, } from "./types.js";
|
|
41
|
+
import { text, date, quantity, integer, lookup, reference, enumColumn, set, link, stamped, custom } from "./columns.js";
|
|
42
|
+
import { createMembers, concatMembers, createDriver } from "./registers.js";
|
|
43
|
+
import { createArity, check, parseLink, printLink, SheetMembersType, SheetRegisterMembersType } from "./link.js";
|
|
44
|
+
import { createSheetRoot } from "./root.js";
|
|
45
|
+
import { SheetComponent, SheetTag, createSheetPayload } from "./sheet.js";
|
|
46
|
+
import { libraryColumns, libraryRows, libraryTab } from "./library.js";
|
|
47
|
+
import { SheetField } from "./fields.js";
|
|
48
|
+
import { createSubRows, createSubRow } from "./sub-rows.js";
|
|
49
|
+
import { createGroup, text as groupText, date as groupDate, quantity as groupQuantity, integer as groupInteger, reference as groupReference, enumCell as groupEnum, stamped as groupStamped, } from "./group.js";
|
|
50
|
+
import { applySheet, SheetPositionType, SheetEntryPlacementType, SheetRowDestinationType, SheetFieldIssueType, SheetReadinessType, SheetIssueType, SheetBatchReadinessType, SheetOriginType, SheetApplyResultType, SheetNewRowType, SheetNewGroupType, SheetDraftTypeFor, SheetBaseTypeFor, SheetChangeTypeFor, SheetChangeSetTypeFor, SheetAppliedTypeFor } from "./transactions.js";
|
|
51
|
+
export * from "./transactions.js";
|
|
52
|
+
import { SheetEntryTypeFor, SheetDraftGroupTypeFor, SheetDraftEntryTypeFor, SheetDraftChangeTypeFor, SheetPatchEventTypeFor } from "./drafts.js";
|
|
53
|
+
export * from "./drafts.js";
|
|
54
|
+
export * from "./editing-types.js";
|
|
55
|
+
// Re-export the UIComp-free types so consumers reach everything via this barrel.
|
|
56
|
+
export { SheetMemberType, SheetLinkType, SheetCellType, SheetRowType, SheetLineType, SheetBandType, SheetFacetType, SheetSubRowType, SheetDateLevelType, SheetOptionsRuleType, SheetNounType, SHEET_TITLE_CELL, sheetRuleCell, SheetGroupCellType, SheetGroupType, SheetRowsCollectionType, SheetRowsType, SheetRegisterMemberType, SheetRegisterType, SheetDriverType, SheetHalfType, SheetSidesValueType, SheetStoreType, SheetMemberKindType, SheetMultipleType, SheetSideLockType, SheetSidesType, SheetCountedType, SheetContextType, SheetFillType, SheetProposalType, SheetProviderType, SheetProposerType, SheetSuggestType, SheetCheckContextType, SheetCheckType, SheetArityType, SheetColumnKindType, SheetColumnType, SheetViewType, SheetRecordViewType, SheetEditType, SheetSelectionType, SheetFooterItemType, SheetStyleType, SheetRootType, SheetContextTypeFor, SheetFillTypeFor, SheetPatchTypeFor, SheetProposalTypeFor, SheetCheckContextTypeFor, SheetGroupContextTypeFor, SheetGroupCheckContextTypeFor, sheetContextType, sheetCheckContextType, sheetLinesOf, } from "./types.js";
|
|
57
|
+
export {} from "./columns.js";
|
|
58
|
+
export {} from "./registers.js";
|
|
59
|
+
export { SheetMembersType, SheetRegisterMembersType, printMember, linkKeys, } from "./link.js";
|
|
60
|
+
export { createSheetRoot, } from "./root.js";
|
|
61
|
+
export { SheetTag, SheetComponent, SheetPayloadType, SheetInspectorType, SheetInspectorPaneType, SheetHistoryType, createSheetPayload, buildInspector, buildInspectorPane, sheetKeys, } from "./sheet.js";
|
|
62
|
+
export { SheetTemplateWireType } from "./templates.js";
|
|
63
|
+
export { SheetLibraryCardType, SheetLibraryDropType, SheetLibraryTabType, } from "./library.js";
|
|
64
|
+
export { SheetFieldType, SheetFormType, SheetFormsType } from "./fields.js";
|
|
65
|
+
export { createGroup, } from "./group.js";
|
|
66
|
+
export { createSubRows, createSubRow, } from "./sub-rows.js";
|
|
67
|
+
export { describeColumn, describeGroupCell, optionPayload, cellTagOf } from "./bridge.js";
|
|
68
|
+
// ============================================================================
|
|
69
|
+
// Sheet.patch
|
|
70
|
+
// ============================================================================
|
|
71
|
+
/**
|
|
72
|
+
* Builds a row patch — `Sheet.patch(R, { … })`: the fields it sets, every
|
|
73
|
+
* other field `none`. A proposer returns patches as its proposed rows
|
|
74
|
+
* (§3.6), and `newRow` / `newGroup` return one as a new row's explicit
|
|
75
|
+
* defaults, including required fields no column shows — a field it leaves
|
|
76
|
+
* `none` starts missing. Takes the literal-record form of `R`'s fields, each
|
|
77
|
+
* a literal or an expression of the FIELD's type.
|
|
78
|
+
*
|
|
79
|
+
* @typeParam R - The host's row type
|
|
80
|
+
* @param rowType - The row type value
|
|
81
|
+
* @param record - The fields to set
|
|
82
|
+
* @returns An expression of `Sheet.Types.Patch(R)`
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```tsx
|
|
86
|
+
* // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
|
|
87
|
+
* import { ArrayType, DictType, East, FloatType, IntegerType, OptionType, StringType, StructType, VariantType, none, some, variant } from "@elaraai/east";
|
|
88
|
+
* import { Box, Reactive, UIComponentType } from "@elaraai/east-ui";
|
|
89
|
+
* import { Record, Sheet } from "@elaraai/e3-ui";
|
|
90
|
+
* import e3 from "@elaraai/e3";
|
|
91
|
+
*
|
|
92
|
+
* export const BatchPart = StructType({ id: StringType, code: StringType, name: StringType, materials: ArrayType(StringType), station: OptionType(StringType) });
|
|
93
|
+
* export const BatchBooking = VariantType({
|
|
94
|
+
* labour: StructType({ team: StringType, people: IntegerType, hours: FloatType }),
|
|
95
|
+
* equipment: StructType({ resource: StringType }),
|
|
96
|
+
* });
|
|
97
|
+
* export const BatchStep = StructType({ task: StringType, qty: OptionType(FloatType), parts: ArrayType(BatchPart), bookings: ArrayType(BatchBooking) });
|
|
98
|
+
* export const Batch = StructType({ id: StringType, name: StringType, steps: ArrayType(BatchStep) });
|
|
99
|
+
* export const BatchDay = StructType({ batches: ArrayType(Batch) });
|
|
100
|
+
* export const sheetBatchDays = e3.record("sheet_batch_days", DictType(StringType, BatchDay), new Map([
|
|
101
|
+
* ["2026-10-12", { batches: [
|
|
102
|
+
* { id: "B-101", name: "Doors, oak", steps: [
|
|
103
|
+
* { task: "Cut doors", qty: some(12.0), parts: [
|
|
104
|
+
* { id: "B-101-1", code: "CUT", name: "Cut the door blanks", materials: ["Oak veneered board × 6"], station: some("S101") },
|
|
105
|
+
* ], bookings: [variant("labour", { team: "Cutting", people: 1n, hours: 3.0 })] },
|
|
106
|
+
* { task: "Band doors", qty: some(48.0), parts: [], bookings: [variant("equipment", { resource: "Edge bander E201" })] },
|
|
107
|
+
* { task: "Spray doors", qty: some(12.0), parts: [
|
|
108
|
+
* { id: "B-101-3", code: "SPR", name: "Seal and lacquer", materials: ["Sealer", "Matt lacquer"], station: none },
|
|
109
|
+
* ], bookings: [] },
|
|
110
|
+
* ] },
|
|
111
|
+
* { id: "B-102", name: "Carcasses, birch", steps: [
|
|
112
|
+
* { task: "Cut carcasses", qty: some(8.0), parts: [], bookings: [] },
|
|
113
|
+
* { task: "Drill carcasses", qty: some(8.0), parts: [], bookings: [variant("labour", { team: "Machining", people: 2n, hours: 2.5 })] },
|
|
114
|
+
* ] },
|
|
115
|
+
* { id: "B-103", name: "Shelves, ash", steps: [
|
|
116
|
+
* { task: "Cut shelves", qty: some(20.0), parts: [], bookings: [] },
|
|
117
|
+
* { task: "Sand shelves", qty: some(20.0), parts: [], bookings: [] },
|
|
118
|
+
* ] },
|
|
119
|
+
* ] }],
|
|
120
|
+
* ]));
|
|
121
|
+
* export const sheetBatchDaysPatch = e3.mutation.patch(sheetBatchDays);
|
|
122
|
+
*
|
|
123
|
+
* const sheet = East.function([], UIComponentType, (_$) => (
|
|
124
|
+
* <Reactive>{$ => {
|
|
125
|
+
* const days = $.let(Record.bind(sheetBatchDays, [sheetBatchDaysPatch]));
|
|
126
|
+
* // The steps a finishing batch starts with: the batch template's lines.
|
|
127
|
+
* const finishing = $.let([
|
|
128
|
+
* { task: "Sand", qty: none, parts: [], bookings: [] },
|
|
129
|
+
* { task: "Seal", qty: none, parts: [], bookings: [] },
|
|
130
|
+
* { task: "Spray", qty: none, parts: [], bookings: [] },
|
|
131
|
+
* ], ArrayType(BatchStep));
|
|
132
|
+
* // A batch needs a name before Save.
|
|
133
|
+
* const readyBatch = $.const(East.function([Sheet.Types.DraftGroup(Batch, "steps")], Sheet.Types.Readiness, ($, batch) => {
|
|
134
|
+
* $.if(batch.name.hasTag("value").and(() => batch.name.unwrap("value").length().equal(0n)), $ => {
|
|
135
|
+
* $.return(East.value(variant("incomplete", [{ field: "name", message: "Name the batch" }]), Sheet.Types.Readiness));
|
|
136
|
+
* });
|
|
137
|
+
* return East.value(variant("ready", null), Sheet.Types.Readiness);
|
|
138
|
+
* }));
|
|
139
|
+
* const newStep = $.const(East.function([Sheet.Types.NewRow], Sheet.Types.Patch(BatchStep), () => Sheet.patch(BatchStep, { qty: none, parts: [], bookings: [] })));
|
|
140
|
+
* const newBatch = $.const(East.function([Sheet.Types.NewGroup], Sheet.Types.Patch(Batch), () => Sheet.patch(Batch, { steps: [] })));
|
|
141
|
+
* return (
|
|
142
|
+
* <Box height="560px">
|
|
143
|
+
* <Sheet
|
|
144
|
+
* record={days}
|
|
145
|
+
* entry={{ key: "2026-10-12", rows: "batches", id: "id" }}
|
|
146
|
+
* group={Sheet.group(Batch, "steps", { title: "name", noun: { singular: "batch", plural: "batches" } })}
|
|
147
|
+
* name="batches"
|
|
148
|
+
* columns={{
|
|
149
|
+
* task: Sheet.column.text(BatchStep, { header: "Step", width: "240px" }),
|
|
150
|
+
* qty: Sheet.column.quantity(BatchStep, { header: "Qty", width: "96px" }),
|
|
151
|
+
* }}
|
|
152
|
+
* subRows={Sheet.subRows(BatchStep, {
|
|
153
|
+
* parts: (p) => Sheet.subRow({
|
|
154
|
+
* code: p.code,
|
|
155
|
+
* name: p.name,
|
|
156
|
+
* chips: p.materials,
|
|
157
|
+
* facets: { station: p.station }, // a none drops out
|
|
158
|
+
* id: p.id,
|
|
159
|
+
* }),
|
|
160
|
+
* bookings: (b) => b.match({
|
|
161
|
+
* labour: (_$2, l) => Sheet.subRow({ code: "LABOUR", name: East.str`${l.team} · ${l.people} people · ${l.hours} hours` }),
|
|
162
|
+
* equipment: (_$2, e) => Sheet.subRow({ code: "EQUIPMENT", name: e.resource }),
|
|
163
|
+
* }),
|
|
164
|
+
* })}
|
|
165
|
+
* // The sub rows show a step's parts and bookings; the inspector's form leaves them out.
|
|
166
|
+
* inspector
|
|
167
|
+
* fields={{ parts: Sheet.field.hidden(), bookings: Sheet.field.hidden() }}
|
|
168
|
+
* templates={{
|
|
169
|
+
* groups: [{ key: "finishing", name: "Finishing batch", group: "Batches",
|
|
170
|
+
* values: Sheet.patch(Batch, { name: "Finishing", steps: finishing }) }],
|
|
171
|
+
* rows: [{ key: "sand", name: "Sand", group: "Steps", values: Sheet.patch(BatchStep, { task: "Sand", qty: none }) },
|
|
172
|
+
* { key: "seal", name: "Seal", group: "Steps", values: Sheet.patch(BatchStep, { task: "Seal", qty: none }) }],
|
|
173
|
+
* }}
|
|
174
|
+
* library={[Sheet.library.rows(), Sheet.library.columns()]}
|
|
175
|
+
* ready={{ group: readyBatch }}
|
|
176
|
+
* newRow={newStep}
|
|
177
|
+
* newGroup={newBatch}
|
|
178
|
+
* />
|
|
179
|
+
* </Box>
|
|
180
|
+
* );
|
|
181
|
+
* }}</Reactive>
|
|
182
|
+
* ));
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
export function createPatch(rowType, record) {
|
|
186
|
+
const patchType = SheetPatchTypeFor(rowType);
|
|
187
|
+
const fields = {};
|
|
188
|
+
const rec = record;
|
|
189
|
+
for (const name of Object.keys(rowType.fields)) {
|
|
190
|
+
fields[name] = rec[name] !== undefined ? some(rec[name]) : none;
|
|
191
|
+
}
|
|
192
|
+
return East.value(fields, patchType);
|
|
193
|
+
}
|
|
194
|
+
/** The namespace's members — everything `Sheet` carries beside the tag itself. */
|
|
195
|
+
const SHEET_MEMBERS = {
|
|
196
|
+
column: { text, date, quantity, integer, lookup, reference, enum: enumColumn, set, link, stamped, custom },
|
|
197
|
+
register: { members: createMembers, concat: concatMembers },
|
|
198
|
+
driver: createDriver,
|
|
199
|
+
link: { arity: createArity, check, parse: parseLink, print: printLink },
|
|
200
|
+
patch: createPatch,
|
|
201
|
+
library: { rows: libraryRows, columns: libraryColumns, tab: libraryTab },
|
|
202
|
+
field: SheetField,
|
|
203
|
+
subRows: createSubRows,
|
|
204
|
+
subRow: createSubRow,
|
|
205
|
+
apply: applySheet,
|
|
206
|
+
group: Object.assign(createGroup, {
|
|
207
|
+
cell: { text: groupText, date: groupDate, quantity: groupQuantity, integer: groupInteger, reference: groupReference, enum: groupEnum, stamped: groupStamped },
|
|
208
|
+
}),
|
|
209
|
+
Types: {
|
|
210
|
+
Entry: SheetEntryTypeFor,
|
|
211
|
+
DraftGroup: SheetDraftGroupTypeFor,
|
|
212
|
+
DraftEntry: SheetDraftEntryTypeFor,
|
|
213
|
+
DraftChange: SheetDraftChangeTypeFor,
|
|
214
|
+
PatchEvent: SheetPatchEventTypeFor,
|
|
215
|
+
Position: SheetPositionType,
|
|
216
|
+
EntryPlacement: SheetEntryPlacementType,
|
|
217
|
+
RowDestination: SheetRowDestinationType,
|
|
218
|
+
FieldIssue: SheetFieldIssueType,
|
|
219
|
+
Readiness: SheetReadinessType,
|
|
220
|
+
Issue: SheetIssueType,
|
|
221
|
+
BatchReadiness: SheetBatchReadinessType,
|
|
222
|
+
Origin: SheetOriginType,
|
|
223
|
+
ApplyResult: SheetApplyResultType,
|
|
224
|
+
NewRow: SheetNewRowType,
|
|
225
|
+
NewGroup: SheetNewGroupType,
|
|
226
|
+
Draft: SheetDraftTypeFor,
|
|
227
|
+
Base: SheetBaseTypeFor,
|
|
228
|
+
Change: SheetChangeTypeFor,
|
|
229
|
+
ChangeSet: SheetChangeSetTypeFor,
|
|
230
|
+
Applied: SheetAppliedTypeFor,
|
|
231
|
+
Root: SheetRootType,
|
|
232
|
+
Row: SheetRowType,
|
|
233
|
+
Line: SheetLineType,
|
|
234
|
+
SubRow: SheetSubRowType,
|
|
235
|
+
Facet: SheetFacetType,
|
|
236
|
+
DateLevel: SheetDateLevelType,
|
|
237
|
+
OptionsRule: SheetOptionsRuleType,
|
|
238
|
+
Noun: SheetNounType,
|
|
239
|
+
Band: SheetBandType,
|
|
240
|
+
Group: SheetGroupType,
|
|
241
|
+
GroupCell: SheetGroupCellType,
|
|
242
|
+
Rows: SheetRowsCollectionType,
|
|
243
|
+
RowSource: SheetRowsType,
|
|
244
|
+
Cell: SheetCellType,
|
|
245
|
+
Link: SheetLinkType,
|
|
246
|
+
Member: SheetMemberType,
|
|
247
|
+
Members: SheetMembersType,
|
|
248
|
+
Counted: SheetCountedType,
|
|
249
|
+
Sides: SheetSidesValueType,
|
|
250
|
+
Half: SheetHalfType,
|
|
251
|
+
Store: SheetStoreType,
|
|
252
|
+
RegisterMember: SheetRegisterMemberType,
|
|
253
|
+
RegisterMembers: SheetRegisterMembersType,
|
|
254
|
+
Register: SheetRegisterType,
|
|
255
|
+
Driver: SheetDriverType,
|
|
256
|
+
MemberKind: SheetMemberKindType,
|
|
257
|
+
Multiple: SheetMultipleType,
|
|
258
|
+
SideLock: SheetSideLockType,
|
|
259
|
+
SidesDeclaration: SheetSidesType,
|
|
260
|
+
Column: SheetColumnType,
|
|
261
|
+
ColumnKind: SheetColumnKindType,
|
|
262
|
+
WireContext: SheetContextType,
|
|
263
|
+
WireFill: SheetFillType,
|
|
264
|
+
WireProposal: SheetProposalType,
|
|
265
|
+
Provider: SheetProviderType,
|
|
266
|
+
Proposer: SheetProposerType,
|
|
267
|
+
Suggest: SheetSuggestType,
|
|
268
|
+
WireCheckContext: SheetCheckContextType,
|
|
269
|
+
Check: SheetCheckType,
|
|
270
|
+
Arity: SheetArityType,
|
|
271
|
+
View: SheetViewType,
|
|
272
|
+
RecordView: SheetRecordViewType,
|
|
273
|
+
WireEdit: SheetEditType,
|
|
274
|
+
Selection: SheetSelectionType,
|
|
275
|
+
FooterItem: SheetFooterItemType,
|
|
276
|
+
Style: SheetStyleType,
|
|
277
|
+
Context: sheetContextType,
|
|
278
|
+
DraftContext: sheetContextType,
|
|
279
|
+
Fill: SheetFillTypeFor,
|
|
280
|
+
Patch: SheetPatchTypeFor,
|
|
281
|
+
Proposal: SheetProposalTypeFor,
|
|
282
|
+
CheckContext: sheetCheckContextType,
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* The planning spreadsheet, `<Sheet>`: the one Sheet. It renders in its
|
|
287
|
+
* `BuilderFrame` wherever it is used — one toolbar holding every control the
|
|
288
|
+
* sheet has, the banners, the grid in main with its strip docked under it,
|
|
289
|
+
* the footer — and its panes are optional props: no prop, no pane.
|
|
290
|
+
*
|
|
291
|
+
* @remarks
|
|
292
|
+
* - **The rows** are `record`'s — its entries, in key order, each row's id
|
|
293
|
+
* its key's text (`window` reads a large one a window at a time); or with
|
|
294
|
+
* `entry`, one entry's Array field, in its own order, identified by
|
|
295
|
+
* `entry.id` — its rows, its groups, or its groups with loose rows between
|
|
296
|
+
* them (`Sheet.Types.Entry(P, "lines")`, #846). Or they are `data`'s: an
|
|
297
|
+
* `Array<R>`, a bind handle or a paged source, identified by `id`.
|
|
298
|
+
* - **Every gesture is a draft** of the shared editing session, which the
|
|
299
|
+
* history item in the one toolbar undoes, redoes and discards. Over a
|
|
300
|
+
* record, Save commits the drafts as one patch through the record's patch
|
|
301
|
+
* mutation, checked against what each row was when the edit began; over
|
|
302
|
+
* `data`, it hands the checked batch to `onApply` (or `onUpdate` rebuilds
|
|
303
|
+
* the collection), and with neither the sheet is read only.
|
|
304
|
+
* - **The library pane** (`library`) lists its tabs, in order:
|
|
305
|
+
* `Sheet.library.rows()` (the templates), `Sheet.library.columns()` (hide
|
|
306
|
+
* and show columns, per viewer) and `Sheet.library.tab(data, { … })`, the
|
|
307
|
+
* author's own cards, whose `drop` is the `Sheet.patch` a dropped card sets.
|
|
308
|
+
* - **The inspector pane** (`inspector`) shows the selected row's every
|
|
309
|
+
* field — a field with a column through its column's kind, any other by its
|
|
310
|
+
* type, hinted with `fields={{ created_by: Sheet.field.readonly() }}` (and
|
|
311
|
+
* `groupFields` for a group's own) — and the batch's Issues; given a
|
|
312
|
+
* function `(row, update) => UIComponentType`, Details for a complete row
|
|
313
|
+
* are the author's own.
|
|
314
|
+
* - **Templates** (`templates={{ rows, groups }}`) are the Rows tab's cards,
|
|
315
|
+
* each `{ key, name, group?, values: Sheet.patch(…) }`: a dropped card is
|
|
316
|
+
* `newRow`'s (or `newGroup`'s) defaults with the template's fields over them.
|
|
317
|
+
* - **Views** (`views`) are a bind handle: `State.bind` keeps them per viewer,
|
|
318
|
+
* `Data.bind` shares them.
|
|
319
|
+
* - **The namespace**: the columns (`Sheet.column.*`, row type first),
|
|
320
|
+
* registers (`Sheet.register.members` / `.concat`) and the driver
|
|
321
|
+
* (`Sheet.driver`), link rules (`Sheet.link.*`), proposed rows and new-row
|
|
322
|
+
* defaults (`Sheet.patch`), the library's tabs (`Sheet.library.*`) and the
|
|
323
|
+
* inspector's hints (`Sheet.field.*`), groups (`Sheet.group`, #740), sub
|
|
324
|
+
* rows (`Sheet.subRows` / `Sheet.subRow`, #844), a checked batch applied to
|
|
325
|
+
* a collection (`Sheet.apply`), and every East type — the closed wire types
|
|
326
|
+
* and the typed constructors `DraftContext(R, D)` / `Fill(T)` / `Patch(R)`
|
|
327
|
+
* / `Proposal(R)` / `PatchEvent(E)` / `ChangeSet(E)` / `Entry(G, "rows")` /
|
|
328
|
+
* `CheckContext(R)` — via `Sheet.Types.*`.
|
|
329
|
+
*
|
|
330
|
+
* The sheet fills its parent and draws no border of its own: a ui task's
|
|
331
|
+
* page fills the window, and a sheet among other components is given a box
|
|
332
|
+
* of its own height. `name` keeps two sheets on one surface apart.
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* ```tsx
|
|
336
|
+
* // .tsx file with the `@jsxImportSource @elaraai/e3-ui` pragma
|
|
337
|
+
* import { DateTimeType, DictType, East, FloatType, OptionType, StringType, StructType, none, some } from "@elaraai/east";
|
|
338
|
+
* import { Box, Reactive, UIComponentType } from "@elaraai/east-ui";
|
|
339
|
+
* import { Record, Sheet } from "@elaraai/e3-ui";
|
|
340
|
+
* import e3 from "@elaraai/e3";
|
|
341
|
+
*
|
|
342
|
+
* export const SheetJob = StructType({ task: StringType, start: OptionType(DateTimeType), qty: OptionType(FloatType) });
|
|
343
|
+
* export const sheetJobs = e3.record("sheet_jobs", DictType(StringType, SheetJob), new Map([
|
|
344
|
+
* ["J-0001", { task: "Panel cutting", start: some(new Date("2026-10-12T00:00:00Z")), qty: some(48.0) }],
|
|
345
|
+
* ["J-0002", { task: "Edge banding", start: some(new Date("2026-10-13T00:00:00Z")), qty: some(120.0) }],
|
|
346
|
+
* ["J-0003", { task: "CNC routing", start: none, qty: some(48.0) }],
|
|
347
|
+
* ["J-0004", { task: "Spray finish", start: none, qty: none }],
|
|
348
|
+
* ]));
|
|
349
|
+
* export const sheetJobsPatch = e3.mutation.patch(sheetJobs);
|
|
350
|
+
*
|
|
351
|
+
* const sheet = East.function([], UIComponentType, (_$) => (
|
|
352
|
+
* <Reactive>{$ => {
|
|
353
|
+
* const jobs = $.let(Record.bind(sheetJobs, [sheetJobsPatch]));
|
|
354
|
+
* return (
|
|
355
|
+
* <Box height="560px">
|
|
356
|
+
* <Sheet
|
|
357
|
+
* record={jobs}
|
|
358
|
+
* columns={{
|
|
359
|
+
* task: Sheet.column.text(SheetJob, { header: "Task", width: "240px" }),
|
|
360
|
+
* start: Sheet.column.date(SheetJob, { header: "Start", width: "96px" }),
|
|
361
|
+
* qty: Sheet.column.quantity(SheetJob, { header: "Qty", width: "96px" }),
|
|
362
|
+
* }}
|
|
363
|
+
* />
|
|
364
|
+
* </Box>
|
|
365
|
+
* );
|
|
366
|
+
* }}</Reactive>
|
|
367
|
+
* ));
|
|
368
|
+
* ```
|
|
369
|
+
*/
|
|
370
|
+
export const Sheet = Object.assign(SheetTag, SHEET_MEMBERS);
|
|
371
|
+
/** `<Sheet>`, for the internal namespace: the tag, on an object of its own, so the public `Sheet` carries none of the internal members. */
|
|
372
|
+
function SheetInternalTag(props) {
|
|
373
|
+
return SheetTag(props);
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* The internal Sheet namespace — `@elaraai/e3-ui/internal`'s `Sheet`: the
|
|
377
|
+
* public one, `Sheet.Payload`, `Sheet.Root` and the `Sheet` carrier, for the
|
|
378
|
+
* renderer and the tests.
|
|
379
|
+
*
|
|
380
|
+
* @internal
|
|
381
|
+
*/
|
|
382
|
+
export const SheetInternal = Object.assign(SheetInternalTag, SHEET_MEMBERS, {
|
|
383
|
+
Payload: createSheetPayload,
|
|
384
|
+
Root: createSheetRoot,
|
|
385
|
+
Component: SheetComponent,
|
|
386
|
+
});
|
|
387
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sheet/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAIH,IAAI,EAEJ,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,eAAe,EACf,aAAa,EACb,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,g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