@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,78 @@
|
|
|
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
|
+
* `Plan.pick` — the Plan's façade over the shared pick contract (#590).
|
|
7
|
+
*
|
|
8
|
+
* The contract holds identified things and does not know what they are, so an
|
|
9
|
+
* adopter supplies what it cannot: how to read identity off one item. For a
|
|
10
|
+
* Plan that is an eleven-arm match over the series variant — every arm carries
|
|
11
|
+
* the same four identity fields, and the arm itself picks the kind's icon.
|
|
12
|
+
*
|
|
13
|
+
* There are no per-series row counts (#822): a count means something only when
|
|
14
|
+
* every entry is in hand, and nothing on a Plan may behave differently because
|
|
15
|
+
* its data is inline or paged.
|
|
16
|
+
*
|
|
17
|
+
* @packageDocumentation
|
|
18
|
+
*/
|
|
19
|
+
import { type ExprType, ArrayType } from "@elaraai/east";
|
|
20
|
+
import { type PickHandle, type PickItemType } from "@elaraai/east-ui";
|
|
21
|
+
import { PlanSeriesType, type PlanSeriesArm, type PlanSeriesInput } from "./series.js";
|
|
22
|
+
/**
|
|
23
|
+
* The FA glyph the library shows for each series kind — the row kind's glyph
|
|
24
|
+
* for the seven row kinds; the four composites take the marks that read as
|
|
25
|
+
* "a group per entry", "a titled block", "one entry several ways" and "a
|
|
26
|
+
* hand-built list". The library pane's Series tab lists a measure and a
|
|
27
|
+
* Plan's own rows with them too (#1195).
|
|
28
|
+
*
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare const KIND_ICONS: Readonly<Record<PlanSeriesArm, string>>;
|
|
32
|
+
/** Options for {@link createPlanPick}. */
|
|
33
|
+
export interface PlanPickOptions {
|
|
34
|
+
/** Series switched off to begin with; omit ⇒ everything shows. */
|
|
35
|
+
hidden?: readonly string[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Bind a Plan's row series to a persisted pick.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* The list is the layout (#822): the canvas shows the series still switched
|
|
42
|
+
* on, in the order they are listed, one block each — so the order written here
|
|
43
|
+
* is the order on screen. A section, a group or a views series is the unit a
|
|
44
|
+
* person picks — "add Presses" — and hiding one takes its whole subtree with
|
|
45
|
+
* it, because its members are built by its own `derive`.
|
|
46
|
+
*
|
|
47
|
+
* Identity is read through ONE match rather than one match per accessor —
|
|
48
|
+
* every arm carries the same four fields, so matching four times would build
|
|
49
|
+
* four copies of the same traversal. A TS list is checked here for two series
|
|
50
|
+
* sharing a key (one switch would wear two labels).
|
|
51
|
+
*
|
|
52
|
+
* The handle is STATE (`State.bind` underneath), so it is built inside a
|
|
53
|
+
* `Reactive`. Pass it to the canvas as `pick`, in place of `series`: the Plan
|
|
54
|
+
* shows the picked series, and its library's Series tab
|
|
55
|
+
* (`Plan.library.series()`) lists them, each with its eye. The data flagship,
|
|
56
|
+
* `planTargetState`, picks its whole series list this way, one hidden to
|
|
57
|
+
* start.
|
|
58
|
+
*
|
|
59
|
+
* @param key - The store key; also the persistence key
|
|
60
|
+
* @param all - Every series that COULD show, in layout order
|
|
61
|
+
* @param options - The initial hidden set ({@link PlanPickOptions})
|
|
62
|
+
* @returns A pick handle over the series type — the canvas's `pick` prop
|
|
63
|
+
*/
|
|
64
|
+
export declare function createPlanPick(key: string, all: PlanSeriesInput, options?: PlanPickOptions): PickHandle<ReturnType<typeof PlanSeriesType>>;
|
|
65
|
+
/**
|
|
66
|
+
* The library entries for a Plan's series — described, with NO state binding.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* {@link createPlanPick} builds its `items` from the same accessors, so proving
|
|
70
|
+
* this proves the bound path too. Split out because `State.bind` is not
|
|
71
|
+
* runnable in a `describeEast` spec (`TestImpl` carries no State runtime), and
|
|
72
|
+
* identity and kind icons are exactly the part worth asserting.
|
|
73
|
+
*
|
|
74
|
+
* @param all - Every series that COULD show
|
|
75
|
+
* @returns One descriptor per series, in declaration order
|
|
76
|
+
*/
|
|
77
|
+
export declare function createPlanPickItems(all: PlanSeriesInput): ExprType<ArrayType<PickItemType>>;
|
|
78
|
+
//# sourceMappingURL=pick.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pick.d.ts","sourceRoot":"","sources":["../../../src/plan/pick.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAEH,KAAK,QAAQ,EAEb,SAAS,EAQZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAY,KAAK,UAAU,EAAE,KAAK,YAAY,EAAoB,MAAM,kBAAkB,CAAC;AAElG,OAAO,EAAE,cAAc,EAAe,KAAK,aAAa,EAAE,KAAK,eAAe,EAAwB,MAAM,aAAa,CAAC;AAE1H;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAgB9D,CAAC;AAUF,0CAA0C;AAC1C,MAAM,WAAW,eAAe;IAC5B,kEAAkE;IAClE,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B;AAmDD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,cAAc,CAC1B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,eAAe,EACpB,OAAO,CAAC,EAAE,eAAe,GAC1B,UAAU,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAO/C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,eAAe,GAAG,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAI3F"}
|
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
* `Plan.pick` — the Plan's façade over the shared pick contract (#590).
|
|
7
|
+
*
|
|
8
|
+
* The contract holds identified things and does not know what they are, so an
|
|
9
|
+
* adopter supplies what it cannot: how to read identity off one item. For a
|
|
10
|
+
* Plan that is an eleven-arm match over the series variant — every arm carries
|
|
11
|
+
* the same four identity fields, and the arm itself picks the kind's icon.
|
|
12
|
+
*
|
|
13
|
+
* There are no per-series row counts (#822): a count means something only when
|
|
14
|
+
* every entry is in hand, and nothing on a Plan may behave differently because
|
|
15
|
+
* its data is inline or paged.
|
|
16
|
+
*
|
|
17
|
+
* @packageDocumentation
|
|
18
|
+
*/
|
|
19
|
+
import { ArrayType, East, Expr, OptionType, StringType, StructType, some, none, } from "@elaraai/east";
|
|
20
|
+
import { IconType } from "@elaraai/east-ui";
|
|
21
|
+
import { createPickBind, pickItems } from "@elaraai/east-ui/internal";
|
|
22
|
+
import { PlanSeriesType, checkSeries } from "./series.js";
|
|
23
|
+
/**
|
|
24
|
+
* The FA glyph the library shows for each series kind — the row kind's glyph
|
|
25
|
+
* for the seven row kinds; the four composites take the marks that read as
|
|
26
|
+
* "a group per entry", "a titled block", "one entry several ways" and "a
|
|
27
|
+
* hand-built list". The library pane's Series tab lists a measure and a
|
|
28
|
+
* Plan's own rows with them too (#1195).
|
|
29
|
+
*
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export const KIND_ICONS = {
|
|
33
|
+
span: "bars-staggered",
|
|
34
|
+
// `border-all` was a 2x2 grid of squares — the same mark `table-cells-large`
|
|
35
|
+
// draws for heat, and at 12px the two were indistinguishable (#590 §6.3).
|
|
36
|
+
// Buckets quantise into COLUMNS with lanes inside them, so a columns mark
|
|
37
|
+
// says what the row is and separates cleanly from heat's grid.
|
|
38
|
+
buckets: "table-columns",
|
|
39
|
+
chart: "chart-line",
|
|
40
|
+
heat: "table-cells-large",
|
|
41
|
+
table: "table-list",
|
|
42
|
+
cards: "user-group",
|
|
43
|
+
events: "flag",
|
|
44
|
+
group: "layer-group",
|
|
45
|
+
section: "heading",
|
|
46
|
+
views: "clone",
|
|
47
|
+
rows: "list",
|
|
48
|
+
};
|
|
49
|
+
/** Identity read off ONE series — the whole of what the library needs. */
|
|
50
|
+
const PlanSeriesIdentityType = StructType({
|
|
51
|
+
key: StringType,
|
|
52
|
+
title: StringType,
|
|
53
|
+
subtitle: OptionType(StringType),
|
|
54
|
+
icon: OptionType(IconType),
|
|
55
|
+
});
|
|
56
|
+
/** The shared accessors — see {@link createPlanPick}. */
|
|
57
|
+
function planPickOptions(allExpr, options) {
|
|
58
|
+
const itemType = Expr.type(allExpr).value;
|
|
59
|
+
/** One arm's identity, with the KIND's glyph when the series declares none. */
|
|
60
|
+
const ident = (v, tag) => East.value({
|
|
61
|
+
key: v["key"],
|
|
62
|
+
title: v["title"],
|
|
63
|
+
subtitle: v["subtitle"],
|
|
64
|
+
icon: v["icon"].match({
|
|
65
|
+
some: (_$, ic) => East.value(some(ic), OptionType(IconType)),
|
|
66
|
+
none: (_$) => East.value(some({ name: KIND_ICONS[tag], prefix: "fas", label: none, style: none }), OptionType(IconType)),
|
|
67
|
+
}),
|
|
68
|
+
}, PlanSeriesIdentityType);
|
|
69
|
+
// ONE reified match, CALLED by each accessor — every arm carries the same
|
|
70
|
+
// four fields, so matching per accessor would build four copies of the same
|
|
71
|
+
// traversal (`shared/reify.ts`: reify once, then call). The arms are spelled
|
|
72
|
+
// out rather than generated, mirroring `applySeriesValue` — an arm added to
|
|
73
|
+
// the variant should fail this match, not fall through a computed map.
|
|
74
|
+
const identityOf = East.function([itemType], PlanSeriesIdentityType, (_$, s) => s.match({
|
|
75
|
+
span: (_$2, v) => ident(v, "span"),
|
|
76
|
+
buckets: (_$2, v) => ident(v, "buckets"),
|
|
77
|
+
chart: (_$2, v) => ident(v, "chart"),
|
|
78
|
+
heat: (_$2, v) => ident(v, "heat"),
|
|
79
|
+
table: (_$2, v) => ident(v, "table"),
|
|
80
|
+
cards: (_$2, v) => ident(v, "cards"),
|
|
81
|
+
events: (_$2, v) => ident(v, "events"),
|
|
82
|
+
group: (_$2, v) => ident(v, "group"),
|
|
83
|
+
section: (_$2, v) => ident(v, "section"),
|
|
84
|
+
views: (_$2, v) => ident(v, "views"),
|
|
85
|
+
rows: (_$2, v) => ident(v, "rows"),
|
|
86
|
+
}));
|
|
87
|
+
return {
|
|
88
|
+
id: (s) => identityOf(s).key,
|
|
89
|
+
title: (s) => identityOf(s).title,
|
|
90
|
+
subtitle: (s) => identityOf(s).subtitle,
|
|
91
|
+
icon: (s) => identityOf(s).icon,
|
|
92
|
+
...(options?.hidden !== undefined ? { hidden: options.hidden } : {}),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Bind a Plan's row series to a persisted pick.
|
|
97
|
+
*
|
|
98
|
+
* @remarks
|
|
99
|
+
* The list is the layout (#822): the canvas shows the series still switched
|
|
100
|
+
* on, in the order they are listed, one block each — so the order written here
|
|
101
|
+
* is the order on screen. A section, a group or a views series is the unit a
|
|
102
|
+
* person picks — "add Presses" — and hiding one takes its whole subtree with
|
|
103
|
+
* it, because its members are built by its own `derive`.
|
|
104
|
+
*
|
|
105
|
+
* Identity is read through ONE match rather than one match per accessor —
|
|
106
|
+
* every arm carries the same four fields, so matching four times would build
|
|
107
|
+
* four copies of the same traversal. A TS list is checked here for two series
|
|
108
|
+
* sharing a key (one switch would wear two labels).
|
|
109
|
+
*
|
|
110
|
+
* The handle is STATE (`State.bind` underneath), so it is built inside a
|
|
111
|
+
* `Reactive`. Pass it to the canvas as `pick`, in place of `series`: the Plan
|
|
112
|
+
* shows the picked series, and its library's Series tab
|
|
113
|
+
* (`Plan.library.series()`) lists them, each with its eye. The data flagship,
|
|
114
|
+
* `planTargetState`, picks its whole series list this way, one hidden to
|
|
115
|
+
* start.
|
|
116
|
+
*
|
|
117
|
+
* @param key - The store key; also the persistence key
|
|
118
|
+
* @param all - Every series that COULD show, in layout order
|
|
119
|
+
* @param options - The initial hidden set ({@link PlanPickOptions})
|
|
120
|
+
* @returns A pick handle over the series type — the canvas's `pick` prop
|
|
121
|
+
*/
|
|
122
|
+
export function createPlanPick(key, all, options) {
|
|
123
|
+
checkSeries(all, "Plan.pick");
|
|
124
|
+
const allExpr = East.value(all);
|
|
125
|
+
// Typed at the SERIES shape, not the erased element type: that is what
|
|
126
|
+
// makes `Pick.active(shown)` assignable straight back to the `series` prop.
|
|
127
|
+
return createPickBind(key, allExpr, planPickOptions(allExpr, options));
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The library entries for a Plan's series — described, with NO state binding.
|
|
131
|
+
*
|
|
132
|
+
* @remarks
|
|
133
|
+
* {@link createPlanPick} builds its `items` from the same accessors, so proving
|
|
134
|
+
* this proves the bound path too. Split out because `State.bind` is not
|
|
135
|
+
* runnable in a `describeEast` spec (`TestImpl` carries no State runtime), and
|
|
136
|
+
* identity and kind icons are exactly the part worth asserting.
|
|
137
|
+
*
|
|
138
|
+
* @param all - Every series that COULD show
|
|
139
|
+
* @returns One descriptor per series, in declaration order
|
|
140
|
+
*/
|
|
141
|
+
export function createPlanPickItems(all) {
|
|
142
|
+
checkSeries(all, "Plan.pickItems");
|
|
143
|
+
const allExpr = East.value(all);
|
|
144
|
+
return pickItems(allExpr, planPickOptions(allExpr));
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=pick.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pick.js","sourceRoot":"","sources":["../../../src/plan/pick.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAIH,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,UAAU,EACV,UAAU,EACV,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,QAAQ,EAAwD,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAkE,MAAM,aAAa,CAAC;AAE1H;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAA4C;IAC/D,IAAI,EAAK,gBAAgB;IACzB,6EAA6E;IAC7E,0EAA0E;IAC1E,0EAA0E;IAC1E,+DAA+D;IAC/D,OAAO,EAAE,eAAe;IACxB,KAAK,EAAI,YAAY;IACrB,IAAI,EAAK,mBAAmB;IAC5B,KAAK,EAAI,YAAY;IACrB,KAAK,EAAI,YAAY;IACrB,MAAM,EAAG,MAAM;IACf,KAAK,EAAI,aAAa;IACtB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAI,OAAO;IAChB,IAAI,EAAK,MAAM;CAClB,CAAC;AAEF,0EAA0E;AAC1E,MAAM,sBAAsB,GAAG,UAAU,CAAC;IACtC,GAAG,EAAO,UAAU;IACpB,KAAK,EAAK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